rox-react-components 0.0.38 → 0.0.40

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.
Files changed (66) hide show
  1. package/dist/es/Card/Card.js +1 -1
  2. package/dist/es/Card/styles.js +1 -1
  3. package/dist/index.d.ts +3 -2
  4. package/dist/lib/Card/Card.js +1 -1
  5. package/dist/lib/Card/styles.js +1 -1
  6. package/package.json +3 -6
  7. package/dist/es/Button/Button.d.ts +0 -10
  8. package/dist/es/Button/index.d.ts +0 -2
  9. package/dist/es/Button/styles.d.ts +0 -6
  10. package/dist/es/Card/Card.d.ts +0 -7
  11. package/dist/es/Card/index.d.ts +0 -2
  12. package/dist/es/Card/styles.d.ts +0 -6
  13. package/dist/es/Container/Container.d.ts +0 -6
  14. package/dist/es/Container/index.d.ts +0 -2
  15. package/dist/es/Container/styles.d.ts +0 -11
  16. package/dist/es/Loading/Inner.d.ts +0 -15
  17. package/dist/es/Loading/Loading.d.ts +0 -17
  18. package/dist/es/Loading/dom.d.ts +0 -7
  19. package/dist/es/Loading/index.d.ts +0 -2
  20. package/dist/es/Loading/styles.d.ts +0 -16
  21. package/dist/es/Loading/type.d.ts +0 -13
  22. package/dist/es/Popup/Popup.d.ts +0 -24
  23. package/dist/es/Popup/index.d.ts +0 -2
  24. package/dist/es/Popup/styles.d.ts +0 -20
  25. package/dist/es/Popup/type.d.ts +0 -4
  26. package/dist/es/ScrollView/ScrollView.d.ts +0 -19
  27. package/dist/es/ScrollView/index.d.ts +0 -2
  28. package/dist/es/ScrollView/styles.d.ts +0 -7
  29. package/dist/es/ScrollView/type.d.ts +0 -8
  30. package/dist/es/Swiper/Swiper.d.ts +0 -7
  31. package/dist/es/Swiper/index.d.ts +0 -2
  32. package/dist/es/Swiper/styles.d.ts +0 -17
  33. package/dist/es/Swiper/type.d.ts +0 -20
  34. package/dist/es/index.d.ts +0 -9
  35. package/dist/es/types.d.ts +0 -3
  36. package/dist/es/utils.d.ts +0 -8
  37. package/dist/lib/Button/Button.d.ts +0 -10
  38. package/dist/lib/Button/index.d.ts +0 -2
  39. package/dist/lib/Button/styles.d.ts +0 -6
  40. package/dist/lib/Card/Card.d.ts +0 -7
  41. package/dist/lib/Card/index.d.ts +0 -2
  42. package/dist/lib/Card/styles.d.ts +0 -6
  43. package/dist/lib/Container/Container.d.ts +0 -6
  44. package/dist/lib/Container/index.d.ts +0 -2
  45. package/dist/lib/Container/styles.d.ts +0 -11
  46. package/dist/lib/Loading/Inner.d.ts +0 -15
  47. package/dist/lib/Loading/Loading.d.ts +0 -17
  48. package/dist/lib/Loading/dom.d.ts +0 -7
  49. package/dist/lib/Loading/index.d.ts +0 -2
  50. package/dist/lib/Loading/styles.d.ts +0 -16
  51. package/dist/lib/Loading/type.d.ts +0 -13
  52. package/dist/lib/Popup/Popup.d.ts +0 -24
  53. package/dist/lib/Popup/index.d.ts +0 -2
  54. package/dist/lib/Popup/styles.d.ts +0 -20
  55. package/dist/lib/Popup/type.d.ts +0 -4
  56. package/dist/lib/ScrollView/ScrollView.d.ts +0 -19
  57. package/dist/lib/ScrollView/index.d.ts +0 -2
  58. package/dist/lib/ScrollView/styles.d.ts +0 -7
  59. package/dist/lib/ScrollView/type.d.ts +0 -8
  60. package/dist/lib/Swiper/Swiper.d.ts +0 -7
  61. package/dist/lib/Swiper/index.d.ts +0 -2
  62. package/dist/lib/Swiper/styles.d.ts +0 -17
  63. package/dist/lib/Swiper/type.d.ts +0 -20
  64. package/dist/lib/index.d.ts +0 -9
  65. package/dist/lib/types.d.ts +0 -3
  66. package/dist/lib/utils.d.ts +0 -8
@@ -1 +1 @@
1
- import{__assign as t}from"tslib";import{css as n}from"aphrodite/no-important";import a,{useMemo as o}from"react";import r from"./styles.js";var i={expand:!1,duration:200},e=function(e){var c=t(t({},i),e),s=c.duration,m=c.expand,d=c.children,l=o((function(){return{transitionDuration:"".concat(s,"ms"),msTransitionDuration:"".concat(s,"ms"),MozTransitionDuration:"".concat(s,"ms"),WebkitTransitionDuration:"".concat(s,"ms")}}),[s]);return a.createElement("div",{style:l,className:"".concat(n(r.collapse)," ").concat(m?n(r.expand):"")},a.createElement("div",{className:n(r.hide0)},d))};export{e as default};
1
+ import{__assign as n}from"tslib";import{css as t}from"aphrodite/no-important";import o,{useRef as r,useMemo as a,useCallback as i,useEffect as e}from"react";import c from"./styles.js";var l={expand:!1,duration:200,toggleExpand:function(){return null}},u=function(u){var s=n(n({},l),u),m=s.duration,d=s.expand,p=s.children,f=s.toggleExpand,x=r(null),v=a((function(){return{transitionDuration:"".concat(m,"ms"),msTransitionDuration:"".concat(m,"ms"),MozTransitionDuration:"".concat(m,"ms"),WebkitTransitionDuration:"".concat(m,"ms")}}),[m]),g=i((function(){null==f||f()}),[f]);return e((function(){var n;d&&(null===(n=x.current)||void 0===n||n.focus())}),[d]),o.createElement("div",{ref:x,onBlur:g,style:v,className:"".concat(t(c.collapse)," ").concat(d?t(c.expand):""),tabIndex:-1},o.createElement("div",{className:t(c.hide0)},p))};export{u as default};
@@ -1 +1 @@
1
- import{StyleSheet as e}from"aphrodite/no-important";var r=e.create({collapse:{display:"grid",gridTemplateRows:"0fr",overflow:"hidden"},expand:{gridTemplateRows:"1fr"},hide0:{minHeight:0}});export{r as default};
1
+ import{StyleSheet as e}from"aphrodite/no-important";var o=e.create({collapse:{display:"grid",gridTemplateRows:"0fr",overflow:"hidden",outline:"none"},expand:{gridTemplateRows:"1fr"},hide0:{minHeight:0}});export{o as default};
package/dist/index.d.ts CHANGED
@@ -53,6 +53,7 @@ declare const Button: FC<ButtonProps>;
53
53
  interface CardProps extends PropsWithChildren {
54
54
  expand?: boolean;
55
55
  duration?: number;
56
+ toggleExpand?: () => any;
56
57
  }
57
58
  declare const Card: FC<CardProps>;
58
59
 
@@ -108,7 +109,7 @@ interface PopupProps extends PropsWithChildren {
108
109
  scale?: number[];
109
110
  curve?: AnimationTimingFunction;
110
111
  }
111
- declare function PopupContainer(_props: PopupProps): React.ReactPortal;
112
+ declare function Popup(_props: PopupProps): React.ReactPortal;
112
113
 
113
114
  interface OnScrollParameters {
114
115
  x?: number;
@@ -132,4 +133,4 @@ declare module 'react' {
132
133
  }
133
134
  declare const _default: <T extends unknown>(props: SwiperProps<T> & React.RefAttributes<SwiperExposeMethods>) => React.ReactNode;
134
135
 
135
- export { type AnimationTimingFunction, Button, Card, Container, Loading, PopupContainer as Popup, type PopupPosition, type PopupType, _default$1 as ScrollView, type ScrollViewExposeMethods, _default as Swiper, type SwiperExposeMethods, type SwiperProps, type ToParams, _default$2 as utils };
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 };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("aphrodite/no-important"),a=require("react"),n=require("./styles.js"),r={expand:!1,duration:200};exports.default=function(s){var i=e.__assign(e.__assign({},r),s),o=i.duration,c=i.expand,u=i.children,d=a.useMemo((function(){return{transitionDuration:"".concat(o,"ms"),msTransitionDuration:"".concat(o,"ms"),MozTransitionDuration:"".concat(o,"ms"),WebkitTransitionDuration:"".concat(o,"ms")}}),[o]);return a.createElement("div",{style:d,className:"".concat(t.css(n.default.collapse)," ").concat(c?t.css(n.default.expand):"")},a.createElement("div",{className:t.css(n.default.hide0)},u))};
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,toggleExpand:function(){return null}};exports.default=function(s){var i=e.__assign(e.__assign({},r),s),o=i.duration,u=i.expand,c=i.children,l=i.toggleExpand,d=t.useRef(null),f=t.useMemo((function(){return{transitionDuration:"".concat(o,"ms"),msTransitionDuration:"".concat(o,"ms"),MozTransitionDuration:"".concat(o,"ms"),WebkitTransitionDuration:"".concat(o,"ms")}}),[o]),m=t.useCallback((function(){null==l||l()}),[l]);return t.useEffect((function(){var e;u&&(null===(e=d.current)||void 0===e||e.focus())}),[u]),t.createElement("div",{ref:d,onBlur:m,style:f,className:"".concat(n.css(a.default.collapse)," ").concat(u?n.css(a.default.expand):""),tabIndex:-1},t.createElement("div",{className:n.css(a.default.hide0)},c))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("aphrodite/no-important").StyleSheet.create({collapse:{display:"grid",gridTemplateRows:"0fr",overflow:"hidden"},expand:{gridTemplateRows:"1fr"},hide0:{minHeight:0}});exports.default=e;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("aphrodite/no-important").StyleSheet.create({collapse:{display:"grid",gridTemplateRows:"0fr",overflow:"hidden",outline:"none"},expand:{gridTemplateRows:"1fr"},hide0:{minHeight:0}});exports.default=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rox-react-components",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "main": "dist/lib/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -32,10 +32,6 @@
32
32
  "node": ">=14"
33
33
  },
34
34
  "author": "YangSu.Zhou",
35
- "scripts": {
36
- "dev": "cross-env NODE_ENV=development rollup -c -w",
37
- "build": "cross-env NODE_ENV=production rollup -c"
38
- },
39
35
  "license": "MIT",
40
36
  "devDependencies": {
41
37
  "@rollup/plugin-commonjs": "^25.0.7",
@@ -50,7 +46,8 @@
50
46
  "rollup": "^4.3.0",
51
47
  "rollup-plugin-delete": "^2.0.0",
52
48
  "rollup-plugin-dts": "^6.1.0",
53
- "rollup-plugin-node-externals": "^6.1.2"
49
+ "rollup-plugin-node-externals": "^6.1.2",
50
+ "typescript": "^5.3.3"
54
51
  },
55
52
  "peerDependencies": {
56
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;
@@ -1,2 +0,0 @@
1
- import Button from './Button';
2
- export default Button;
@@ -1,6 +0,0 @@
1
- declare const styles: {
2
- button: object;
3
- block: object;
4
- ripple: object;
5
- };
6
- export default styles;
@@ -1,7 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- interface CardProps extends PropsWithChildren {
3
- expand?: boolean;
4
- duration?: number;
5
- }
6
- declare const Card: FC<CardProps>;
7
- export default Card;
@@ -1,2 +0,0 @@
1
- import Card from './Card';
2
- export default Card;
@@ -1,6 +0,0 @@
1
- declare const styles: {
2
- collapse: object;
3
- expand: object;
4
- hide0: object;
5
- };
6
- export default styles;
@@ -1,6 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- interface ContainerProps extends PropsWithChildren {
3
- ratio?: number;
4
- }
5
- declare const Container: FC<ContainerProps>;
6
- export default Container;
@@ -1,2 +0,0 @@
1
- import Container from './Container';
2
- export default Container;
@@ -1,11 +0,0 @@
1
- declare const styles: {
2
- relative: object;
3
- absolute: object;
4
- top_0: object;
5
- left_0: object;
6
- w_full: object;
7
- h_full: object;
8
- h_0: object;
9
- border_box: object;
10
- };
11
- export default styles;
@@ -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,2 +0,0 @@
1
- import Loading from './Loading';
2
- export default Loading;
@@ -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,24 +0,0 @@
1
- import React, { CSSProperties, PropsWithChildren } from 'react';
2
- import { AnimationTimingFunction, PopupPosition, PopupType } from './type';
3
- declare module 'react' {
4
- interface CSSProperties {
5
- '--bg'?: string;
6
- '--duration'?: string;
7
- '--curve'?: AnimationTimingFunction;
8
- }
9
- }
10
- interface PopupProps extends PropsWithChildren {
11
- visible?: boolean;
12
- position?: PopupPosition;
13
- duration?: number;
14
- bg?: string;
15
- maskClosable?: boolean;
16
- popupType?: PopupType;
17
- onClose?: Function;
18
- contentClassName?: string;
19
- contentStyle?: CSSProperties;
20
- scale?: number[];
21
- curve?: AnimationTimingFunction;
22
- }
23
- declare function PopupContainer(_props: PopupProps): React.ReactPortal;
24
- export default PopupContainer;
@@ -1,2 +0,0 @@
1
- import Popup from './Popup';
2
- export default Popup;
@@ -1,20 +0,0 @@
1
- declare const styles: {
2
- container: object;
3
- mask: object;
4
- animation_properties: object;
5
- fade_in: object;
6
- fade_out: object;
7
- slide_in_top: object;
8
- slide_out_top: object;
9
- slide_in_right: object;
10
- slide_out_right: object;
11
- slide_in_bottom: object;
12
- slide_out_bottom: object;
13
- slide_in_left: object;
14
- slide_out_left: object;
15
- };
16
- export default styles;
17
- export declare const animateStyles: (scale: number[]) => {
18
- scale_in: object;
19
- scale_out: object;
20
- };
@@ -1,4 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- export type PopupPosition = 'left' | 'top' | 'right' | 'bottom' | 'center';
3
- export type PopupType = 'slide' | 'fade' | 'scale';
4
- export type AnimationTimingFunction = CSSProperties['animationTimingFunction'];
@@ -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,2 +0,0 @@
1
- import ScrollView from './ScrollView';
2
- export default ScrollView;
@@ -1,7 +0,0 @@
1
- declare const styles: {
2
- border_box: object;
3
- w_full: object;
4
- h_full: object;
5
- scroll_bar_hide: object;
6
- };
7
- export default styles;
@@ -1,8 +0,0 @@
1
- export interface ToParams {
2
- x?: number;
3
- y?: number;
4
- animation?: boolean;
5
- }
6
- export interface ScrollViewExposeMethods {
7
- to: (data?: ToParams) => void;
8
- }
@@ -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,2 +0,0 @@
1
- import Swiper from './Swiper';
2
- export default Swiper;
@@ -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
- }
@@ -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';
@@ -1,3 +0,0 @@
1
- export * from './Popup/type';
2
- export * from './ScrollView/type';
3
- export * from './Swiper/type';
@@ -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;
@@ -1,2 +0,0 @@
1
- import Button from './Button';
2
- export default Button;
@@ -1,6 +0,0 @@
1
- declare const styles: {
2
- button: object;
3
- block: object;
4
- ripple: object;
5
- };
6
- export default styles;
@@ -1,7 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- interface CardProps extends PropsWithChildren {
3
- expand?: boolean;
4
- duration?: number;
5
- }
6
- declare const Card: FC<CardProps>;
7
- export default Card;
@@ -1,2 +0,0 @@
1
- import Card from './Card';
2
- export default Card;
@@ -1,6 +0,0 @@
1
- declare const styles: {
2
- collapse: object;
3
- expand: object;
4
- hide0: object;
5
- };
6
- export default styles;
@@ -1,6 +0,0 @@
1
- import { FC, PropsWithChildren } from 'react';
2
- interface ContainerProps extends PropsWithChildren {
3
- ratio?: number;
4
- }
5
- declare const Container: FC<ContainerProps>;
6
- export default Container;
@@ -1,2 +0,0 @@
1
- import Container from './Container';
2
- export default Container;
@@ -1,11 +0,0 @@
1
- declare const styles: {
2
- relative: object;
3
- absolute: object;
4
- top_0: object;
5
- left_0: object;
6
- w_full: object;
7
- h_full: object;
8
- h_0: object;
9
- border_box: object;
10
- };
11
- export default styles;
@@ -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,2 +0,0 @@
1
- import Loading from './Loading';
2
- export default Loading;
@@ -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,24 +0,0 @@
1
- import React, { CSSProperties, PropsWithChildren } from 'react';
2
- import { AnimationTimingFunction, PopupPosition, PopupType } from './type';
3
- declare module 'react' {
4
- interface CSSProperties {
5
- '--bg'?: string;
6
- '--duration'?: string;
7
- '--curve'?: AnimationTimingFunction;
8
- }
9
- }
10
- interface PopupProps extends PropsWithChildren {
11
- visible?: boolean;
12
- position?: PopupPosition;
13
- duration?: number;
14
- bg?: string;
15
- maskClosable?: boolean;
16
- popupType?: PopupType;
17
- onClose?: Function;
18
- contentClassName?: string;
19
- contentStyle?: CSSProperties;
20
- scale?: number[];
21
- curve?: AnimationTimingFunction;
22
- }
23
- declare function PopupContainer(_props: PopupProps): React.ReactPortal;
24
- export default PopupContainer;
@@ -1,2 +0,0 @@
1
- import Popup from './Popup';
2
- export default Popup;
@@ -1,20 +0,0 @@
1
- declare const styles: {
2
- container: object;
3
- mask: object;
4
- animation_properties: object;
5
- fade_in: object;
6
- fade_out: object;
7
- slide_in_top: object;
8
- slide_out_top: object;
9
- slide_in_right: object;
10
- slide_out_right: object;
11
- slide_in_bottom: object;
12
- slide_out_bottom: object;
13
- slide_in_left: object;
14
- slide_out_left: object;
15
- };
16
- export default styles;
17
- export declare const animateStyles: (scale: number[]) => {
18
- scale_in: object;
19
- scale_out: object;
20
- };
@@ -1,4 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- export type PopupPosition = 'left' | 'top' | 'right' | 'bottom' | 'center';
3
- export type PopupType = 'slide' | 'fade' | 'scale';
4
- export type AnimationTimingFunction = CSSProperties['animationTimingFunction'];
@@ -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,2 +0,0 @@
1
- import ScrollView from './ScrollView';
2
- export default ScrollView;
@@ -1,7 +0,0 @@
1
- declare const styles: {
2
- border_box: object;
3
- w_full: object;
4
- h_full: object;
5
- scroll_bar_hide: object;
6
- };
7
- export default styles;
@@ -1,8 +0,0 @@
1
- export interface ToParams {
2
- x?: number;
3
- y?: number;
4
- animation?: boolean;
5
- }
6
- export interface ScrollViewExposeMethods {
7
- to: (data?: ToParams) => void;
8
- }
@@ -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,2 +0,0 @@
1
- import Swiper from './Swiper';
2
- export default Swiper;
@@ -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
- }
@@ -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';
@@ -1,3 +0,0 @@
1
- export * from './Popup/type';
2
- export * from './ScrollView/type';
3
- export * from './Swiper/type';
@@ -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;