@purr-react-styled-components/components.loading-ellipsis 0.0.1
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.d.ts +4 -0
- package/dist/_style.d.ts +9 -0
- package/dist/_types.d.ts +10 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +53 -0
- package/package.json +39 -0
package/dist/_style.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const Styled: {
|
|
2
|
+
Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
3
|
+
$fullScreen: boolean;
|
|
4
|
+
}>> & string;
|
|
5
|
+
Spinner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {
|
|
6
|
+
$size: number;
|
|
7
|
+
$color: string;
|
|
8
|
+
}>> & string;
|
|
9
|
+
};
|
package/dist/_types.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { IExtendable } from '@purr-core/utils.definitions';
|
|
3
|
+
|
|
4
|
+
export interface ILoadingEllipsisProps {
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
fullScreen?: boolean;
|
|
9
|
+
htmlAttributes?: HTMLAttributes<HTMLSpanElement> & IExtendable;
|
|
10
|
+
}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),p=require("clsx"),s=require("styled-components"),c=s.keyframes(["0%{transform:scale(0);}100%{transform:scale(1);}"]),a=n=>s.keyframes(["0%{transform:translate(0,0);}100%{transform:",";}"],`translate(${5*n/3}px, 0)`),d=s.keyframes(["0%{transform:scale(1);}100%{transform:scale(0);}"]),l={Container:s.span.withConfig({displayName:"_style__Container",componentId:"sc-1ktgpxe-0"})(["display:flex;align-items:center;justify-content:center;width:",";height:",";"],({$fullScreen:n})=>n?"100vw":"100%",({$fullScreen:n})=>n?"100vh":"100%"),Spinner:s.span.withConfig({displayName:"_style__Spinner",componentId:"sc-1ktgpxe-1"})(["display:flex;position:relative;width:",";height:",";span{position:absolute;width:",";height:",";border-radius:50%;background:",";}span:nth-child(1){left:",";animation:"," 0.6s infinite;}span:nth-child(2){left:",";animation:"," 0.6s infinite;}span:nth-child(3){left:",";animation:"," 0.6s infinite;}span:nth-child(4){left:",";animation:"," 0.6s infinite;}"],({$size:n})=>`${17*n/3}px`,({$size:n})=>`${n}px`,({$size:n})=>`${n}px`,({$size:n})=>`${n}px`,({$color:n})=>n,({$size:n})=>`${2*n/3}px`,c,({$size:n})=>`${2*n/3}px`,({$size:n})=>a(n),({$size:n})=>`${7*n/3}px`,({$size:n})=>a(n),({$size:n})=>`${4*n}px`,d)},f=({size:n=12,color:e="#00bfff",fullScreen:t=!1,className:o,htmlAttributes:r})=>i.jsx(l.Container,{...r,$fullScreen:t,className:p("loading-ellipsis",`loading-ellipsis--size-${n}`,`loading-ellipsis--color-${e}`,t&&"loading-ellipsis--fullScreen",o),children:i.jsxs(l.Spinner,{$size:n,$color:e,className:"loading-ellipsis-inner",children:[i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{}),i.jsx("span",{})]})});exports.LoadingEllipsis=f;
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as i, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import c from "clsx";
|
|
3
|
+
import a, { keyframes as s } from "styled-components";
|
|
4
|
+
const d = /* @__PURE__ */ s(["0%{transform:scale(0);}100%{transform:scale(1);}"]), o = (n) => s(["0%{transform:translate(0,0);}100%{transform:", ";}"], `translate(${5 * n / 3}px, 0)`), m = /* @__PURE__ */ s(["0%{transform:scale(1);}100%{transform:scale(0);}"]), l = {
|
|
5
|
+
Container: a.span.withConfig({
|
|
6
|
+
displayName: "_style__Container",
|
|
7
|
+
componentId: "sc-1ktgpxe-0"
|
|
8
|
+
})(["display:flex;align-items:center;justify-content:center;width:", ";height:", ";"], ({
|
|
9
|
+
$fullScreen: n
|
|
10
|
+
}) => n ? "100vw" : "100%", ({
|
|
11
|
+
$fullScreen: n
|
|
12
|
+
}) => n ? "100vh" : "100%"),
|
|
13
|
+
Spinner: a.span.withConfig({
|
|
14
|
+
displayName: "_style__Spinner",
|
|
15
|
+
componentId: "sc-1ktgpxe-1"
|
|
16
|
+
})(["display:flex;position:relative;width:", ";height:", ";span{position:absolute;width:", ";height:", ";border-radius:50%;background:", ";}span:nth-child(1){left:", ";animation:", " 0.6s infinite;}span:nth-child(2){left:", ";animation:", " 0.6s infinite;}span:nth-child(3){left:", ";animation:", " 0.6s infinite;}span:nth-child(4){left:", ";animation:", " 0.6s infinite;}"], ({
|
|
17
|
+
$size: n
|
|
18
|
+
}) => `${17 * n / 3}px`, ({
|
|
19
|
+
$size: n
|
|
20
|
+
}) => `${n}px`, ({
|
|
21
|
+
$size: n
|
|
22
|
+
}) => `${n}px`, ({
|
|
23
|
+
$size: n
|
|
24
|
+
}) => `${n}px`, ({
|
|
25
|
+
$color: n
|
|
26
|
+
}) => n, ({
|
|
27
|
+
$size: n
|
|
28
|
+
}) => `${2 * n / 3}px`, d, ({
|
|
29
|
+
$size: n
|
|
30
|
+
}) => `${2 * n / 3}px`, ({
|
|
31
|
+
$size: n
|
|
32
|
+
}) => o(n), ({
|
|
33
|
+
$size: n
|
|
34
|
+
}) => `${7 * n / 3}px`, ({
|
|
35
|
+
$size: n
|
|
36
|
+
}) => o(n), ({
|
|
37
|
+
$size: n
|
|
38
|
+
}) => `${4 * n}px`, m)
|
|
39
|
+
}, $ = ({
|
|
40
|
+
size: n = 12,
|
|
41
|
+
color: t = "#00bfff",
|
|
42
|
+
fullScreen: e = !1,
|
|
43
|
+
className: p,
|
|
44
|
+
htmlAttributes: r
|
|
45
|
+
}) => /* @__PURE__ */ i(l.Container, { ...r, $fullScreen: e, className: c("loading-ellipsis", `loading-ellipsis--size-${n}`, `loading-ellipsis--color-${t}`, e && "loading-ellipsis--fullScreen", p), children: /* @__PURE__ */ f(l.Spinner, { $size: n, $color: t, className: "loading-ellipsis-inner", children: [
|
|
46
|
+
/* @__PURE__ */ i("span", {}),
|
|
47
|
+
/* @__PURE__ */ i("span", {}),
|
|
48
|
+
/* @__PURE__ */ i("span", {}),
|
|
49
|
+
/* @__PURE__ */ i("span", {})
|
|
50
|
+
] }) });
|
|
51
|
+
export {
|
|
52
|
+
$ as LoadingEllipsis
|
|
53
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@purr-react-styled-components/components.loading-ellipsis",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.cjs"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"typescript": "*",
|
|
25
|
+
"react": "*",
|
|
26
|
+
"styled-components": "*",
|
|
27
|
+
"clsx": "*",
|
|
28
|
+
"@purr-core/utils.definitions": "0.0.4"
|
|
29
|
+
},
|
|
30
|
+
"author": "@DinhThienPhuc",
|
|
31
|
+
"license": "ISC",
|
|
32
|
+
"description": "",
|
|
33
|
+
"sideEffects": false,
|
|
34
|
+
"scripts": {
|
|
35
|
+
"dev": "vite build --watch",
|
|
36
|
+
"build": "tsc && vite build",
|
|
37
|
+
"lint": "eslint . --ext ts,tsx --max-warnings 0"
|
|
38
|
+
}
|
|
39
|
+
}
|