rox-react-components 0.0.37 → 0.0.39
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/README.md +1 -1
- package/dist/es/Card/Card.js +1 -1
- package/dist/es/Popup/Popup.js +1 -1
- package/dist/es/Popup/styles.js +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/lib/Card/Card.js +1 -1
- package/dist/lib/Popup/Popup.js +1 -1
- package/dist/lib/Popup/styles.js +1 -1
- package/package.json +5 -7
- package/dist/es/Button/Button.d.ts +0 -10
- package/dist/es/Button/index.d.ts +0 -2
- package/dist/es/Button/styles.d.ts +0 -6
- package/dist/es/Card/Card.d.ts +0 -7
- package/dist/es/Card/index.d.ts +0 -2
- package/dist/es/Card/styles.d.ts +0 -6
- package/dist/es/Container/Container.d.ts +0 -6
- package/dist/es/Container/index.d.ts +0 -2
- package/dist/es/Container/styles.d.ts +0 -11
- package/dist/es/Loading/Inner.d.ts +0 -15
- package/dist/es/Loading/Loading.d.ts +0 -17
- package/dist/es/Loading/dom.d.ts +0 -7
- package/dist/es/Loading/index.d.ts +0 -2
- package/dist/es/Loading/styles.d.ts +0 -16
- package/dist/es/Loading/type.d.ts +0 -13
- package/dist/es/Popup/Popup.d.ts +0 -17
- package/dist/es/Popup/index.d.ts +0 -2
- package/dist/es/Popup/styles.d.ts +0 -4
- package/dist/es/Popup/type.d.ts +0 -2
- package/dist/es/ScrollView/ScrollView.d.ts +0 -19
- package/dist/es/ScrollView/index.d.ts +0 -2
- package/dist/es/ScrollView/styles.d.ts +0 -7
- package/dist/es/ScrollView/type.d.ts +0 -8
- package/dist/es/Swiper/Swiper.d.ts +0 -7
- package/dist/es/Swiper/index.d.ts +0 -2
- package/dist/es/Swiper/styles.d.ts +0 -17
- package/dist/es/Swiper/type.d.ts +0 -20
- package/dist/es/index.d.ts +0 -9
- package/dist/es/types.d.ts +0 -3
- package/dist/es/utils.d.ts +0 -8
- package/dist/lib/Button/Button.d.ts +0 -10
- package/dist/lib/Button/index.d.ts +0 -2
- package/dist/lib/Button/styles.d.ts +0 -6
- package/dist/lib/Card/Card.d.ts +0 -7
- package/dist/lib/Card/index.d.ts +0 -2
- package/dist/lib/Card/styles.d.ts +0 -6
- package/dist/lib/Container/Container.d.ts +0 -6
- package/dist/lib/Container/index.d.ts +0 -2
- package/dist/lib/Container/styles.d.ts +0 -11
- package/dist/lib/Loading/Inner.d.ts +0 -15
- package/dist/lib/Loading/Loading.d.ts +0 -17
- package/dist/lib/Loading/dom.d.ts +0 -7
- package/dist/lib/Loading/index.d.ts +0 -2
- package/dist/lib/Loading/styles.d.ts +0 -16
- package/dist/lib/Loading/type.d.ts +0 -13
- package/dist/lib/Popup/Popup.d.ts +0 -17
- package/dist/lib/Popup/index.d.ts +0 -2
- package/dist/lib/Popup/styles.d.ts +0 -4
- package/dist/lib/Popup/type.d.ts +0 -2
- package/dist/lib/ScrollView/ScrollView.d.ts +0 -19
- package/dist/lib/ScrollView/index.d.ts +0 -2
- package/dist/lib/ScrollView/styles.d.ts +0 -7
- package/dist/lib/ScrollView/type.d.ts +0 -8
- package/dist/lib/Swiper/Swiper.d.ts +0 -7
- package/dist/lib/Swiper/index.d.ts +0 -2
- package/dist/lib/Swiper/styles.d.ts +0 -17
- package/dist/lib/Swiper/type.d.ts +0 -20
- package/dist/lib/index.d.ts +0 -9
- package/dist/lib/types.d.ts +0 -3
- package/dist/lib/utils.d.ts +0 -8
package/README.md
CHANGED
package/dist/es/Card/Card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as n}from"tslib";import{css as t}from"aphrodite/no-important";import o,{useMemo as a,useCallback as r}from"react";import i from"./styles.js";var e={expand:!1,duration:200,onClose:function(){return null}},c=function(c){var s=n(n({},e),c),l=s.duration,m=s.expand,u=s.children,d=s.onClose,p=a((function(){return{transitionDuration:"".concat(l,"ms"),msTransitionDuration:"".concat(l,"ms"),MozTransitionDuration:"".concat(l,"ms"),WebkitTransitionDuration:"".concat(l,"ms")}}),[l]),f=r((function(){null==d||d()}),[d]);return o.createElement("div",{onBlur:f,style:p,className:"".concat(t(i.collapse)," ").concat(m?t(i.expand):""),tabIndex:-1},o.createElement("div",{className:t(i.hide0)},u))};export{c as default};
|
package/dist/es/Popup/Popup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as
|
|
1
|
+
import{__assign as t}from"tslib";import e,{useRef as n,useCallback as i,useEffect as o,useState as r,useMemo as a}from"react";import{createPortal as l}from"react-dom";import{css as s}from"aphrodite/no-important";import c,{animateStyles as u}from"./styles.js";var f={visible:!1,position:"bottom",duration:200,bg:"rgba(0,0,0,.35)",maskClosable:!0,popupType:"fade",onClose:function(){return null},contentClassName:"",contentStyle:{},scale:[.2],curve:"linear"};function m(n){var l=n.bg,f=n.visible,m=n.duration,d=n.inject,p=n.dispose,_=n.maskClosable,y=n.onClose,b=n.children,v=n.position,g=n.contentStyle,C=n.contentClassName,h=n.popupType,j=n.scale,E=n.curve,x=r(f),I=x[0],N=x[1],k=r(!1),A=k[0],S=k[1];o((function(){N(f),f&&(p(),d(),S(!0))}),[f]),o((function(){return function(){S(!1),p()}}),[]);var T=i((function(){_&&N(!1)}),[_]),q=i((function(){I||(S(!1),y(),p())}),[I,y]),w=a((function(){return"bottom"===v?{justifyContent:"center",alignItems:"flex-end"}:"top"===v?{justifyContent:"center",alignItems:"flex-start"}:"left"===v?{justifyContent:"flex-start",alignItems:"center"}:"right"===v?{justifyContent:"flex-end",alignItems:"center"}:"center"===v?{justifyContent:"center",alignItems:"center"}:{}}),[v]),z=a((function(){if("slide"===h){if("top"===v)return I?c.slide_in_top:c.slide_out_top;if("bottom"===v)return I?c.slide_in_bottom:c.slide_out_bottom;if("left"===v)return I?c.slide_in_left:c.slide_out_left;if("right"===v)return I?c.slide_in_right:c.slide_out_right}else if("scale"===h&&Array.isArray(j)&&j.length>=1){var t=u(j);return I?t.scale_in:t.scale_out}return I?c.fade_in:c.fade_out}),[h,v,I,j]);return A?e.createElement("div",{style:t({"--bg":l,"--duration":m+"ms","--curve":E},w),className:s(c.container)},e.createElement("div",{onClick:T,onAnimationEnd:q,className:s(c.mask,c.animation_properties,I?c.fade_in:c.fade_out)}),e.createElement("div",{style:g,className:"".concat(C," ").concat(s(c.animation_properties,z))},b)):null}function d(r){var a=t(t({},f),r),s=n(document.createElement("div")),c=i((function(){document.body.appendChild(s.current)}),[]),u=i((function(){try{document.body.removeChild(s.current)}catch(t){}}),[]);return o((function(){return function(){return u()}}),[]),l(e.createElement(m,t({},a,{inject:c,dispose:u})),s.current)}export{d as default};
|
package/dist/es/Popup/styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{StyleSheet as
|
|
1
|
+
import{__assign as t}from"tslib";import{StyleSheet as a}from"aphrodite/no-important";function n(t){return{from:{opacity:t?0:1},to:{opacity:t?1:0}}}function i(t,a){var n="0",i="0";return t?(n=a?"-100%":"100%",i="0"):(n="0",i=a?"-100%":"100%"),{from:{transform:"translate3d(0, ".concat(n,", 0)")},to:{transform:"translate3d(0, ".concat(i,", 0)")}}}function o(t,a){var n="0",i="0";return t?(n=a?"-100%":"100%",i="0"):(n="0",i=a?"-100%":"100%"),{from:{transform:"translate3d(".concat(n,", 0, 0)")},to:{transform:"translate3d(".concat(i,", 0, 0)")}}}var e=a.create({container:{position:"absolute",display:"flex",width:"100%",height:"100%",top:0,left:0,zIndex:99},mask:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-10,backgroundColor:"var(--bg)"},animation_properties:{animationFillMode:"forwards",animationTimingFunction:"var(--curve)",animationDuration:"var(--duration)"},fade_in:{animationName:[n(!0)]},fade_out:{animationName:[n(!1)]},slide_in_top:{animationName:[i(!0,!0)]},slide_out_top:{animationName:[i(!1,!0)]},slide_in_right:{animationName:[o(!0,!1)]},slide_out_right:{animationName:[o(!1,!1)]},slide_in_bottom:{animationName:[i(!0,!1)]},slide_out_bottom:{animationName:[i(!1,!1)]},slide_in_left:{animationName:[o(!0,!0)]},slide_out_left:{animationName:[o(!1,!0)]}}),r=function(n){var i=1===n[n.length-1]?n.slice(0,-1):n,o={},e={};if(i.length){var r=100/i.length;o=t(t({},m({step:"0%",value:i[0]})),m({step:"100%",value:1})),e=t(t({},m({step:"0%",value:1})),m({step:"100%",value:i[0]})),i.forEach((function(t,a){a>0&&(Object.assign(o,m({step:"".concat(r*a,"%"),value:t})),Object.assign(e,m({step:"".concat(r*(n.length-a),"%"),value:t})))}))}return a.create({scale_in:{animationName:[o]},scale_out:{animationName:[e]}})};function m(t){var a;return(a={})[t.step]={transform:"scale3d(".concat(t.value,", ").concat(t.value,", 1)")},a}export{r as animateStyles,e as default};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import React, { PropsWithChildren, ReactNode,
|
|
1
|
+
import React, { CSSProperties, PropsWithChildren, ReactNode, FC, HTMLAttributes, Component } from 'react';
|
|
2
2
|
|
|
3
3
|
type PopupPosition = 'left' | 'top' | 'right' | 'bottom' | 'center';
|
|
4
4
|
type PopupType = 'slide' | 'fade' | 'scale';
|
|
5
|
+
type AnimationTimingFunction = CSSProperties['animationTimingFunction'];
|
|
5
6
|
|
|
6
7
|
interface ToParams {
|
|
7
8
|
x?: number;
|
|
@@ -52,6 +53,7 @@ declare const Button: FC<ButtonProps>;
|
|
|
52
53
|
interface CardProps extends PropsWithChildren {
|
|
53
54
|
expand?: boolean;
|
|
54
55
|
duration?: number;
|
|
56
|
+
onClose?: () => any;
|
|
55
57
|
}
|
|
56
58
|
declare const Card: FC<CardProps>;
|
|
57
59
|
|
|
@@ -90,6 +92,8 @@ declare class Loading extends Component<LoadingProps, LoadingState> {
|
|
|
90
92
|
declare module 'react' {
|
|
91
93
|
interface CSSProperties {
|
|
92
94
|
'--bg'?: string;
|
|
95
|
+
'--duration'?: string;
|
|
96
|
+
'--curve'?: AnimationTimingFunction;
|
|
93
97
|
}
|
|
94
98
|
}
|
|
95
99
|
interface PopupProps extends PropsWithChildren {
|
|
@@ -99,8 +103,13 @@ interface PopupProps extends PropsWithChildren {
|
|
|
99
103
|
bg?: string;
|
|
100
104
|
maskClosable?: boolean;
|
|
101
105
|
popupType?: PopupType;
|
|
106
|
+
onClose?: Function;
|
|
107
|
+
contentClassName?: string;
|
|
108
|
+
contentStyle?: CSSProperties;
|
|
109
|
+
scale?: number[];
|
|
110
|
+
curve?: AnimationTimingFunction;
|
|
102
111
|
}
|
|
103
|
-
declare function
|
|
112
|
+
declare function Popup(_props: PopupProps): React.ReactPortal;
|
|
104
113
|
|
|
105
114
|
interface OnScrollParameters {
|
|
106
115
|
x?: number;
|
|
@@ -124,4 +133,4 @@ declare module 'react' {
|
|
|
124
133
|
}
|
|
125
134
|
declare const _default: <T extends unknown>(props: SwiperProps<T> & React.RefAttributes<SwiperExposeMethods>) => React.ReactNode;
|
|
126
135
|
|
|
127
|
-
export { Button, Card, Container, Loading,
|
|
136
|
+
export { type AnimationTimingFunction, Button, Card, Container, Loading, Popup, type PopupPosition, type PopupType, _default$1 as ScrollView, type ScrollViewExposeMethods, _default as Swiper, type SwiperExposeMethods, type SwiperProps, type ToParams, _default$2 as utils };
|
package/dist/lib/Card/Card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("aphrodite/no-important"),t=require("react"),a=require("./styles.js"),r={expand:!1,duration:200,onClose:function(){return null}};exports.default=function(s){var o=e.__assign(e.__assign({},r),s),i=o.duration,c=o.expand,u=o.children,l=o.onClose,d=t.useMemo((function(){return{transitionDuration:"".concat(i,"ms"),msTransitionDuration:"".concat(i,"ms"),MozTransitionDuration:"".concat(i,"ms"),WebkitTransitionDuration:"".concat(i,"ms")}}),[i]),m=t.useCallback((function(){null==l||l()}),[l]);return t.createElement("div",{onBlur:m,style:d,className:"".concat(n.css(a.default.collapse)," ").concat(c?n.css(a.default.expand):""),tabIndex:-1},t.createElement("div",{className:n.css(a.default.hide0)},u))};
|
package/dist/lib/Popup/Popup.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react"),n=require("react-dom"),a=require("aphrodite/no-important"),i=require("./styles.js"),r={visible:!1,position:"bottom",duration:200,bg:"rgba(0,0,0,.35)",maskClosable:!0,popupType:"fade",onClose:function(){return null},contentClassName:"",contentStyle:{},scale:[.2],curve:"linear"};function s(n){var r=n.bg,s=n.visible,u=n.duration,l=n.inject,o=n.dispose,c=n.maskClosable,f=n.onClose,d=n.children,m=n.position,_=n.contentStyle,p=n.contentClassName,b=n.popupType,y=n.scale,g=n.curve,C=t.useState(s),v=C[0],h=C[1],j=t.useState(!1),E=j[0],k=j[1];t.useEffect((function(){h(s),s&&(o(),l(),k(!0))}),[s]),t.useEffect((function(){return function(){k(!1),o()}}),[]);var x=t.useCallback((function(){c&&h(!1)}),[c]),q=t.useCallback((function(){v||(k(!1),f(),o())}),[v,f]),I=t.useMemo((function(){return"bottom"===m?{justifyContent:"center",alignItems:"flex-end"}:"top"===m?{justifyContent:"center",alignItems:"flex-start"}:"left"===m?{justifyContent:"flex-start",alignItems:"center"}:"right"===m?{justifyContent:"flex-end",alignItems:"center"}:"center"===m?{justifyContent:"center",alignItems:"center"}:{}}),[m]),N=t.useMemo((function(){if("slide"===b){if("top"===m)return v?i.default.slide_in_top:i.default.slide_out_top;if("bottom"===m)return v?i.default.slide_in_bottom:i.default.slide_out_bottom;if("left"===m)return v?i.default.slide_in_left:i.default.slide_out_left;if("right"===m)return v?i.default.slide_in_right:i.default.slide_out_right}else if("scale"===b&&Array.isArray(y)&&y.length>=1){var e=i.animateStyles(y);return v?e.scale_in:e.scale_out}return v?i.default.fade_in:i.default.fade_out}),[b,m,v,y]);return E?t.createElement("div",{style:e.__assign({"--bg":r,"--duration":u+"ms","--curve":g},I),className:a.css(i.default.container)},t.createElement("div",{onClick:x,onAnimationEnd:q,className:a.css(i.default.mask,i.default.animation_properties,v?i.default.fade_in:i.default.fade_out)}),t.createElement("div",{style:_,className:"".concat(p," ").concat(a.css(i.default.animation_properties,N))},d)):null}exports.default=function(a){var i=e.__assign(e.__assign({},r),a),u=t.useRef(document.createElement("div")),l=t.useCallback((function(){document.body.appendChild(u.current)}),[]),o=t.useCallback((function(){try{document.body.removeChild(u.current)}catch(e){}}),[]);return t.useEffect((function(){return function(){return o()}}),[]),n.createPortal(t.createElement(s,e.__assign({},i,{inject:l,dispose:o})),u.current)};
|
package/dist/lib/Popup/styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),a=require("aphrodite/no-important");function e(t){return{from:{opacity:t?0:1},to:{opacity:t?1:0}}}function n(t,a){var e="0",n="0";return t?(e=a?"-100%":"100%",n="0"):(e="0",n=a?"-100%":"100%"),{from:{transform:"translate3d(0, ".concat(e,", 0)")},to:{transform:"translate3d(0, ".concat(n,", 0)")}}}function i(t,a){var e="0",n="0";return t?(e=a?"-100%":"100%",n="0"):(e="0",n=a?"-100%":"100%"),{from:{transform:"translate3d(".concat(e,", 0, 0)")},to:{transform:"translate3d(".concat(n,", 0, 0)")}}}var o=a.StyleSheet.create({container:{position:"absolute",display:"flex",width:"100%",height:"100%",top:0,left:0,zIndex:99},mask:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-10,backgroundColor:"var(--bg)"},animation_properties:{animationFillMode:"forwards",animationTimingFunction:"var(--curve)",animationDuration:"var(--duration)"},fade_in:{animationName:[e(!0)]},fade_out:{animationName:[e(!1)]},slide_in_top:{animationName:[n(!0,!0)]},slide_out_top:{animationName:[n(!1,!0)]},slide_in_right:{animationName:[i(!0,!1)]},slide_out_right:{animationName:[i(!1,!1)]},slide_in_bottom:{animationName:[n(!0,!1)]},slide_out_bottom:{animationName:[n(!1,!1)]},slide_in_left:{animationName:[i(!0,!0)]},slide_out_left:{animationName:[i(!1,!0)]}});function r(t){var a;return(a={})[t.step]={transform:"scale3d(".concat(t.value,", ").concat(t.value,", 1)")},a}exports.animateStyles=function(e){var n=1===e[e.length-1]?e.slice(0,-1):e,i={},o={};if(n.length){var s=100/n.length;i=t.__assign(t.__assign({},r({step:"0%",value:n[0]})),r({step:"100%",value:1})),o=t.__assign(t.__assign({},r({step:"0%",value:1})),r({step:"100%",value:n[0]})),n.forEach((function(t,a){a>0&&(Object.assign(i,r({step:"".concat(s*a,"%"),value:t})),Object.assign(o,r({step:"".concat(s*(e.length-a),"%"),value:t})))}))}return a.StyleSheet.create({scale_in:{animationName:[i]},scale_out:{animationName:[o]}})},exports.default=o;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rox-react-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.39",
|
|
4
4
|
"main": "dist/lib/index.js",
|
|
5
5
|
"module": "dist/es/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
"react swiper carousel pc mobile touch mouse",
|
|
21
21
|
"touch events swiper",
|
|
22
22
|
"touch events carousel",
|
|
23
|
-
"scrollview reachTop reachBottom reachLeft reachRight"
|
|
23
|
+
"scrollview reachTop reachBottom reachLeft reachRight",
|
|
24
|
+
"popup、modal"
|
|
24
25
|
],
|
|
25
26
|
"files": [
|
|
26
27
|
"dist",
|
|
@@ -31,10 +32,6 @@
|
|
|
31
32
|
"node": ">=14"
|
|
32
33
|
},
|
|
33
34
|
"author": "YangSu.Zhou",
|
|
34
|
-
"scripts": {
|
|
35
|
-
"dev": "cross-env NODE_ENV=development rollup -c -w",
|
|
36
|
-
"build": "cross-env NODE_ENV=production rollup -c"
|
|
37
|
-
},
|
|
38
35
|
"license": "MIT",
|
|
39
36
|
"devDependencies": {
|
|
40
37
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -49,7 +46,8 @@
|
|
|
49
46
|
"rollup": "^4.3.0",
|
|
50
47
|
"rollup-plugin-delete": "^2.0.0",
|
|
51
48
|
"rollup-plugin-dts": "^6.1.0",
|
|
52
|
-
"rollup-plugin-node-externals": "^6.1.2"
|
|
49
|
+
"rollup-plugin-node-externals": "^6.1.2",
|
|
50
|
+
"typescript": "^5.3.3"
|
|
53
51
|
},
|
|
54
52
|
"peerDependencies": {
|
|
55
53
|
"react": "^18.2.0",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
-
interface ButtonProps extends HTMLAttributes<HTMLButtonElement>, PropsWithChildren {
|
|
3
|
-
wavesColor?: string;
|
|
4
|
-
radius?: number;
|
|
5
|
-
bg?: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
block?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const Button: FC<ButtonProps>;
|
|
10
|
-
export default Button;
|
package/dist/es/Card/Card.d.ts
DELETED
package/dist/es/Card/index.d.ts
DELETED
package/dist/es/Card/styles.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { LoadingProps } from './type';
|
|
3
|
-
declare module 'react' {
|
|
4
|
-
interface CSSProperties {
|
|
5
|
-
'--delay'?: string;
|
|
6
|
-
'--width'?: string;
|
|
7
|
-
'--height'?: string;
|
|
8
|
-
'--bg'?: string;
|
|
9
|
-
'--margin'?: string;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
declare const Inner: FC<{
|
|
13
|
-
style: LoadingProps['loadingStyle'];
|
|
14
|
-
}>;
|
|
15
|
-
export default Inner;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import { LoadingProps } from './type';
|
|
3
|
-
interface LoadingState {
|
|
4
|
-
}
|
|
5
|
-
declare class Loading extends Component<LoadingProps, LoadingState> {
|
|
6
|
-
state: Readonly<LoadingState>;
|
|
7
|
-
static defaultProps: LoadingProps;
|
|
8
|
-
private static el;
|
|
9
|
-
static show(options?: Pick<LoadingProps, 'bg' | 'loadingStyle' | 'customLoading'>): void;
|
|
10
|
-
static hide(): void;
|
|
11
|
-
render(): ReactNode;
|
|
12
|
-
static getDerivedStateFromProps(props: LoadingProps, state: LoadingState): null;
|
|
13
|
-
getSnapshotBeforeUpdate(prevProps: Readonly<LoadingProps>, prevState: Readonly<LoadingState>): null;
|
|
14
|
-
componentDidUpdate(prevProps: Readonly<LoadingProps>, prevState: Readonly<LoadingState>, snapshot?: any): void;
|
|
15
|
-
componentWillUnmount(): void;
|
|
16
|
-
}
|
|
17
|
-
export default Loading;
|
package/dist/es/Loading/dom.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare function addClass<T extends HTMLElement>(el: T, cls: string): void;
|
|
2
|
-
declare function removeClass<T extends HTMLElement>(el: T, cls: string): void;
|
|
3
|
-
declare const _default: {
|
|
4
|
-
addClass: typeof addClass;
|
|
5
|
-
removeClass: typeof removeClass;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const styles: {
|
|
2
|
-
relative: object;
|
|
3
|
-
center: object;
|
|
4
|
-
absolute: object;
|
|
5
|
-
top_0: object;
|
|
6
|
-
left_0: object;
|
|
7
|
-
w_full: object;
|
|
8
|
-
h_full: object;
|
|
9
|
-
border_box: object;
|
|
10
|
-
z_99: object;
|
|
11
|
-
inner_box: object;
|
|
12
|
-
inner_box_item: object;
|
|
13
|
-
fixed: object;
|
|
14
|
-
page_hide: object;
|
|
15
|
-
};
|
|
16
|
-
export default styles;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
export interface LoadingProps extends PropsWithChildren {
|
|
3
|
-
visible?: boolean;
|
|
4
|
-
bg?: string;
|
|
5
|
-
customLoading?: ReactNode;
|
|
6
|
-
loadingStyle?: {
|
|
7
|
-
width?: string;
|
|
8
|
-
height?: string;
|
|
9
|
-
bg?: string;
|
|
10
|
-
margin?: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const initLoadingStyle: LoadingProps['loadingStyle'];
|
package/dist/es/Popup/Popup.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { PopupPosition, PopupType } from './type';
|
|
3
|
-
declare module 'react' {
|
|
4
|
-
interface CSSProperties {
|
|
5
|
-
'--bg'?: string;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
interface PopupProps extends PropsWithChildren {
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
position?: PopupPosition;
|
|
11
|
-
duration?: number;
|
|
12
|
-
bg?: string;
|
|
13
|
-
maskClosable?: boolean;
|
|
14
|
-
popupType?: PopupType;
|
|
15
|
-
}
|
|
16
|
-
declare function PopupContainer(_props: PopupProps): React.ReactPortal | null;
|
|
17
|
-
export default PopupContainer;
|
package/dist/es/Popup/index.d.ts
DELETED
package/dist/es/Popup/type.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
-
import { ScrollViewExposeMethods } from './type';
|
|
3
|
-
interface OnScrollParameters {
|
|
4
|
-
x?: number;
|
|
5
|
-
y?: number;
|
|
6
|
-
}
|
|
7
|
-
interface ScrollViewProps extends PropsWithChildren {
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
horizontal?: boolean;
|
|
10
|
-
vertical?: boolean;
|
|
11
|
-
onScroll?: (position: OnScrollParameters) => void;
|
|
12
|
-
threshold?: number;
|
|
13
|
-
onReachTop?: (done: Function) => void;
|
|
14
|
-
onReachBottom?: (done: Function) => void;
|
|
15
|
-
onReachLeft?: (done: Function) => void;
|
|
16
|
-
onReachRight?: (done: Function) => void;
|
|
17
|
-
}
|
|
18
|
-
declare const _default: (props: ScrollViewProps & React.RefAttributes<ScrollViewExposeMethods>) => React.ReactNode;
|
|
19
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SwiperExposeMethods, SwiperProps } from './type';
|
|
3
|
-
declare module 'react' {
|
|
4
|
-
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode | null): (props: P & React.RefAttributes<T>) => React.ReactNode | null;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: <T extends unknown>(props: SwiperProps<T> & React.RefAttributes<SwiperExposeMethods>) => React.ReactNode;
|
|
7
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const styles: {
|
|
2
|
-
relative: object;
|
|
3
|
-
absolute: object;
|
|
4
|
-
w_full: object;
|
|
5
|
-
border_box: object;
|
|
6
|
-
overflow_hidden: object;
|
|
7
|
-
flex: object;
|
|
8
|
-
nowrap: object;
|
|
9
|
-
flex_1: object;
|
|
10
|
-
item_center: object;
|
|
11
|
-
justify_center: object;
|
|
12
|
-
left_0: object;
|
|
13
|
-
bottom_20: object;
|
|
14
|
-
style_none: object;
|
|
15
|
-
gap: object;
|
|
16
|
-
};
|
|
17
|
-
export default styles;
|
package/dist/es/Swiper/type.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
export interface SwiperProps<T> extends PropsWithChildren {
|
|
3
|
-
data: T[];
|
|
4
|
-
renderItem: (item: T) => ReactNode;
|
|
5
|
-
onChange?: (index: number) => void;
|
|
6
|
-
boundary?: number;
|
|
7
|
-
duration?: number;
|
|
8
|
-
delay?: number;
|
|
9
|
-
autoPlay?: boolean;
|
|
10
|
-
active?: number;
|
|
11
|
-
dotVisible?: boolean;
|
|
12
|
-
renderDots?: ReactNode;
|
|
13
|
-
dotBoxStyle?: CSSProperties;
|
|
14
|
-
dotStyle?: CSSProperties;
|
|
15
|
-
activeDotStyle?: CSSProperties;
|
|
16
|
-
}
|
|
17
|
-
export interface SwiperExposeMethods {
|
|
18
|
-
next: () => any;
|
|
19
|
-
pre: () => any;
|
|
20
|
-
}
|
package/dist/es/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export { default as utils } from './utils';
|
|
3
|
-
export { default as Button } from './Button';
|
|
4
|
-
export { default as Card } from './Card';
|
|
5
|
-
export { default as Container } from './Container';
|
|
6
|
-
export { default as Loading } from './Loading';
|
|
7
|
-
export { default as Popup } from './Popup';
|
|
8
|
-
export { default as ScrollView } from './ScrollView';
|
|
9
|
-
export { default as Swiper } from './Swiper';
|
package/dist/es/types.d.ts
DELETED
package/dist/es/utils.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare function sleep(timestamp?: number, result?: boolean): Promise<boolean>;
|
|
2
|
-
type parseUrlResponse = Record<string, string | (string | boolean)[] | boolean> | string | boolean | (string | boolean)[] | undefined;
|
|
3
|
-
declare function parseUrl(key?: string): parseUrlResponse;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
sleep: typeof sleep;
|
|
6
|
-
parseUrl: typeof parseUrl;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { FC, HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
-
interface ButtonProps extends HTMLAttributes<HTMLButtonElement>, PropsWithChildren {
|
|
3
|
-
wavesColor?: string;
|
|
4
|
-
radius?: number;
|
|
5
|
-
bg?: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
block?: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const Button: FC<ButtonProps>;
|
|
10
|
-
export default Button;
|
package/dist/lib/Card/Card.d.ts
DELETED
package/dist/lib/Card/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { LoadingProps } from './type';
|
|
3
|
-
declare module 'react' {
|
|
4
|
-
interface CSSProperties {
|
|
5
|
-
'--delay'?: string;
|
|
6
|
-
'--width'?: string;
|
|
7
|
-
'--height'?: string;
|
|
8
|
-
'--bg'?: string;
|
|
9
|
-
'--margin'?: string;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
declare const Inner: FC<{
|
|
13
|
-
style: LoadingProps['loadingStyle'];
|
|
14
|
-
}>;
|
|
15
|
-
export default Inner;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import { LoadingProps } from './type';
|
|
3
|
-
interface LoadingState {
|
|
4
|
-
}
|
|
5
|
-
declare class Loading extends Component<LoadingProps, LoadingState> {
|
|
6
|
-
state: Readonly<LoadingState>;
|
|
7
|
-
static defaultProps: LoadingProps;
|
|
8
|
-
private static el;
|
|
9
|
-
static show(options?: Pick<LoadingProps, 'bg' | 'loadingStyle' | 'customLoading'>): void;
|
|
10
|
-
static hide(): void;
|
|
11
|
-
render(): ReactNode;
|
|
12
|
-
static getDerivedStateFromProps(props: LoadingProps, state: LoadingState): null;
|
|
13
|
-
getSnapshotBeforeUpdate(prevProps: Readonly<LoadingProps>, prevState: Readonly<LoadingState>): null;
|
|
14
|
-
componentDidUpdate(prevProps: Readonly<LoadingProps>, prevState: Readonly<LoadingState>, snapshot?: any): void;
|
|
15
|
-
componentWillUnmount(): void;
|
|
16
|
-
}
|
|
17
|
-
export default Loading;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
declare function addClass<T extends HTMLElement>(el: T, cls: string): void;
|
|
2
|
-
declare function removeClass<T extends HTMLElement>(el: T, cls: string): void;
|
|
3
|
-
declare const _default: {
|
|
4
|
-
addClass: typeof addClass;
|
|
5
|
-
removeClass: typeof removeClass;
|
|
6
|
-
};
|
|
7
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare const styles: {
|
|
2
|
-
relative: object;
|
|
3
|
-
center: object;
|
|
4
|
-
absolute: object;
|
|
5
|
-
top_0: object;
|
|
6
|
-
left_0: object;
|
|
7
|
-
w_full: object;
|
|
8
|
-
h_full: object;
|
|
9
|
-
border_box: object;
|
|
10
|
-
z_99: object;
|
|
11
|
-
inner_box: object;
|
|
12
|
-
inner_box_item: object;
|
|
13
|
-
fixed: object;
|
|
14
|
-
page_hide: object;
|
|
15
|
-
};
|
|
16
|
-
export default styles;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
export interface LoadingProps extends PropsWithChildren {
|
|
3
|
-
visible?: boolean;
|
|
4
|
-
bg?: string;
|
|
5
|
-
customLoading?: ReactNode;
|
|
6
|
-
loadingStyle?: {
|
|
7
|
-
width?: string;
|
|
8
|
-
height?: string;
|
|
9
|
-
bg?: string;
|
|
10
|
-
margin?: string;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
export declare const initLoadingStyle: LoadingProps['loadingStyle'];
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
import { PopupPosition, PopupType } from './type';
|
|
3
|
-
declare module 'react' {
|
|
4
|
-
interface CSSProperties {
|
|
5
|
-
'--bg'?: string;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
interface PopupProps extends PropsWithChildren {
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
position?: PopupPosition;
|
|
11
|
-
duration?: number;
|
|
12
|
-
bg?: string;
|
|
13
|
-
maskClosable?: boolean;
|
|
14
|
-
popupType?: PopupType;
|
|
15
|
-
}
|
|
16
|
-
declare function PopupContainer(_props: PopupProps): React.ReactPortal | null;
|
|
17
|
-
export default PopupContainer;
|
package/dist/lib/Popup/type.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
-
import { ScrollViewExposeMethods } from './type';
|
|
3
|
-
interface OnScrollParameters {
|
|
4
|
-
x?: number;
|
|
5
|
-
y?: number;
|
|
6
|
-
}
|
|
7
|
-
interface ScrollViewProps extends PropsWithChildren {
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
horizontal?: boolean;
|
|
10
|
-
vertical?: boolean;
|
|
11
|
-
onScroll?: (position: OnScrollParameters) => void;
|
|
12
|
-
threshold?: number;
|
|
13
|
-
onReachTop?: (done: Function) => void;
|
|
14
|
-
onReachBottom?: (done: Function) => void;
|
|
15
|
-
onReachLeft?: (done: Function) => void;
|
|
16
|
-
onReachRight?: (done: Function) => void;
|
|
17
|
-
}
|
|
18
|
-
declare const _default: (props: ScrollViewProps & React.RefAttributes<ScrollViewExposeMethods>) => React.ReactNode;
|
|
19
|
-
export default _default;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SwiperExposeMethods, SwiperProps } from './type';
|
|
3
|
-
declare module 'react' {
|
|
4
|
-
function forwardRef<T, P = {}>(render: (props: P, ref: React.Ref<T>) => React.ReactNode | null): (props: P & React.RefAttributes<T>) => React.ReactNode | null;
|
|
5
|
-
}
|
|
6
|
-
declare const _default: <T extends unknown>(props: SwiperProps<T> & React.RefAttributes<SwiperExposeMethods>) => React.ReactNode;
|
|
7
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
declare const styles: {
|
|
2
|
-
relative: object;
|
|
3
|
-
absolute: object;
|
|
4
|
-
w_full: object;
|
|
5
|
-
border_box: object;
|
|
6
|
-
overflow_hidden: object;
|
|
7
|
-
flex: object;
|
|
8
|
-
nowrap: object;
|
|
9
|
-
flex_1: object;
|
|
10
|
-
item_center: object;
|
|
11
|
-
justify_center: object;
|
|
12
|
-
left_0: object;
|
|
13
|
-
bottom_20: object;
|
|
14
|
-
style_none: object;
|
|
15
|
-
gap: object;
|
|
16
|
-
};
|
|
17
|
-
export default styles;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
export interface SwiperProps<T> extends PropsWithChildren {
|
|
3
|
-
data: T[];
|
|
4
|
-
renderItem: (item: T) => ReactNode;
|
|
5
|
-
onChange?: (index: number) => void;
|
|
6
|
-
boundary?: number;
|
|
7
|
-
duration?: number;
|
|
8
|
-
delay?: number;
|
|
9
|
-
autoPlay?: boolean;
|
|
10
|
-
active?: number;
|
|
11
|
-
dotVisible?: boolean;
|
|
12
|
-
renderDots?: ReactNode;
|
|
13
|
-
dotBoxStyle?: CSSProperties;
|
|
14
|
-
dotStyle?: CSSProperties;
|
|
15
|
-
activeDotStyle?: CSSProperties;
|
|
16
|
-
}
|
|
17
|
-
export interface SwiperExposeMethods {
|
|
18
|
-
next: () => any;
|
|
19
|
-
pre: () => any;
|
|
20
|
-
}
|
package/dist/lib/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export { default as utils } from './utils';
|
|
3
|
-
export { default as Button } from './Button';
|
|
4
|
-
export { default as Card } from './Card';
|
|
5
|
-
export { default as Container } from './Container';
|
|
6
|
-
export { default as Loading } from './Loading';
|
|
7
|
-
export { default as Popup } from './Popup';
|
|
8
|
-
export { default as ScrollView } from './ScrollView';
|
|
9
|
-
export { default as Swiper } from './Swiper';
|
package/dist/lib/types.d.ts
DELETED
package/dist/lib/utils.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare function sleep(timestamp?: number, result?: boolean): Promise<boolean>;
|
|
2
|
-
type parseUrlResponse = Record<string, string | (string | boolean)[] | boolean> | string | boolean | (string | boolean)[] | undefined;
|
|
3
|
-
declare function parseUrl(key?: string): parseUrlResponse;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
sleep: typeof sleep;
|
|
6
|
-
parseUrl: typeof parseUrl;
|
|
7
|
-
};
|
|
8
|
-
export default _default;
|