@skel-ui/react 1.0.0-alpha.d89053b → 1.0.0-alpha.fa3737d
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 +64 -18
- package/dist/cjs/index.js +266 -0
- package/dist/cjs/utils.js +24 -0
- package/dist/esm/index.js +236 -0
- package/dist/esm/utils.js +4 -0
- package/dist/src/index.d.ts +108 -0
- package/dist/src/utils.d.ts +2 -0
- package/dist/stories/components/Animations.d.ts +1 -0
- package/dist/stories/components/Image.d.ts +4 -0
- package/dist/stories/components/PostCard.d.ts +5 -0
- package/dist/stories/components/PostCardList.d.ts +1 -0
- package/dist/stories/components/index.d.ts +5 -0
- package/dist/stories/index.stories.d.ts +8 -0
- package/dist/styles.css +36 -0
- package/package.json +54 -35
- package/cjs/index.css +0 -21
- package/cjs/index.js +0 -53
- package/dts/index.d.ts +0 -19
- package/esm/index.css +0 -21
- package/esm/index.js +0 -23
- package/types/index.d.ts +0 -0
- /package/{cjs → dist/cjs}/tailwind.js +0 -0
- /package/{esm → dist/esm}/tailwind.js +0 -0
- /package/{dts → dist/src}/tailwind.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,25 +1,71 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Getting Started
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
const { user, isLoading } = useProfile();
|
|
3
|
+
Skel UI resolves the challenges of implementing skeletons by eliminating the need to create dedicated loading screens and providing an easier way to manage skeleton states using react-context.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Install the package into your project via command line.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @skel-ui/react
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Importing CSS
|
|
14
|
+
|
|
15
|
+
Import the CSS file into the root of your application.
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import "@skel-ui/react/styles.css";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Start crafting UI
|
|
22
|
+
|
|
23
|
+
Now it's time for you to craft your user interface to life!
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
import * as Skel from "@skel-ui/react";
|
|
27
|
+
import Image from "next/image";
|
|
28
|
+
|
|
29
|
+
function Profile() {
|
|
30
|
+
const { user, isLoading } = useProfile();
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Skel.Root isLoading={isLoading}>
|
|
34
|
+
<Skel.Item className="user-avatar">
|
|
35
|
+
<Image src={user.profile} />
|
|
36
|
+
</Skel.Item>
|
|
37
|
+
<Skel.Item as="h1" className="user-email">
|
|
38
|
+
{user.email}
|
|
39
|
+
</Skel.Item>
|
|
40
|
+
</Skel.Root>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Now, not only have you designed the skeleton, but you have also done the actual UI. Additionally, the skeleton state for the entire UI is handled in a single place at the `<Skel.Root>` .
|
|
46
|
+
|
|
47
|
+
## Customization
|
|
48
|
+
|
|
49
|
+
Customize the default color and border-radius of skeleton using css variables.
|
|
50
|
+
|
|
51
|
+
```css title="global.css"
|
|
52
|
+
:root {
|
|
53
|
+
--skel-ui-color1: #a1a1aa;
|
|
54
|
+
--skel-ui-color2: #e4e4e7;
|
|
55
|
+
--skel-ui-radius: 0.25rem;
|
|
9
56
|
}
|
|
57
|
+
```
|
|
10
58
|
|
|
11
|
-
|
|
12
|
-
{isLoading ? (
|
|
13
|
-
<Skeleton circle />
|
|
14
|
-
) : (
|
|
15
|
-
<Avatar src={user.image} name={user.name} />
|
|
16
|
-
)}
|
|
17
|
-
<h1>{user.name || <Skeleton />}</h1>
|
|
59
|
+
Each `Skel.Item` will have a `data-loading` attribute that is set to `"true"` when the item is in a loading state, and `"false"` otherwise. You can use this attribute in your CSS to create styles based on the loading state.
|
|
18
60
|
|
|
61
|
+
```css
|
|
62
|
+
/* This style will be applied during loading. */
|
|
63
|
+
.user-email[data-loading="true"] {
|
|
64
|
+
width: 5rem;
|
|
65
|
+
}
|
|
19
66
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</Skel.Root>
|
|
67
|
+
/* This style will be applied after loading is done. */
|
|
68
|
+
.user-email[data-loading="false"]:hover {
|
|
69
|
+
background: #f97316;
|
|
70
|
+
}
|
|
25
71
|
```
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var src_exports = {};
|
|
31
|
+
__export(src_exports, {
|
|
32
|
+
Custom: () => Custom,
|
|
33
|
+
Root: () => Root,
|
|
34
|
+
a: () => a,
|
|
35
|
+
address: () => address,
|
|
36
|
+
article: () => article,
|
|
37
|
+
aside: () => aside,
|
|
38
|
+
b: () => b,
|
|
39
|
+
bdi: () => bdi,
|
|
40
|
+
bdo: () => bdo,
|
|
41
|
+
blockquote: () => blockquote,
|
|
42
|
+
br: () => br,
|
|
43
|
+
button: () => button,
|
|
44
|
+
canvas: () => canvas,
|
|
45
|
+
caption: () => caption,
|
|
46
|
+
cite: () => cite,
|
|
47
|
+
code: () => code,
|
|
48
|
+
col: () => col,
|
|
49
|
+
colgroup: () => colgroup,
|
|
50
|
+
data: () => data,
|
|
51
|
+
datalist: () => datalist,
|
|
52
|
+
dd: () => dd,
|
|
53
|
+
del: () => del,
|
|
54
|
+
details: () => details,
|
|
55
|
+
dfn: () => dfn,
|
|
56
|
+
dialog: () => dialog,
|
|
57
|
+
div: () => div,
|
|
58
|
+
dl: () => dl,
|
|
59
|
+
dt: () => dt,
|
|
60
|
+
em: () => em,
|
|
61
|
+
embed: () => embed,
|
|
62
|
+
fieldset: () => fieldset,
|
|
63
|
+
figcaption: () => figcaption,
|
|
64
|
+
figure: () => figure,
|
|
65
|
+
footer: () => footer,
|
|
66
|
+
form: () => form,
|
|
67
|
+
h1: () => h1,
|
|
68
|
+
h2: () => h2,
|
|
69
|
+
h3: () => h3,
|
|
70
|
+
h4: () => h4,
|
|
71
|
+
h5: () => h5,
|
|
72
|
+
h6: () => h6,
|
|
73
|
+
header: () => header,
|
|
74
|
+
hgroup: () => hgroup,
|
|
75
|
+
hr: () => hr,
|
|
76
|
+
i: () => i,
|
|
77
|
+
iframe: () => iframe,
|
|
78
|
+
img: () => img,
|
|
79
|
+
input: () => input,
|
|
80
|
+
ins: () => ins,
|
|
81
|
+
kbd: () => kbd,
|
|
82
|
+
label: () => label,
|
|
83
|
+
legend: () => legend,
|
|
84
|
+
li: () => li,
|
|
85
|
+
main: () => main,
|
|
86
|
+
map: () => map,
|
|
87
|
+
mark: () => mark,
|
|
88
|
+
menu: () => menu,
|
|
89
|
+
menuitem: () => menuitem,
|
|
90
|
+
meter: () => meter,
|
|
91
|
+
nav: () => nav,
|
|
92
|
+
object: () => object,
|
|
93
|
+
ol: () => ol,
|
|
94
|
+
optgroup: () => optgroup,
|
|
95
|
+
option: () => option,
|
|
96
|
+
output: () => output,
|
|
97
|
+
p: () => p,
|
|
98
|
+
param: () => param,
|
|
99
|
+
picture: () => picture,
|
|
100
|
+
pre: () => pre,
|
|
101
|
+
progress: () => progress,
|
|
102
|
+
q: () => q,
|
|
103
|
+
rp: () => rp,
|
|
104
|
+
rt: () => rt,
|
|
105
|
+
ruby: () => ruby,
|
|
106
|
+
s: () => s,
|
|
107
|
+
samp: () => samp,
|
|
108
|
+
section: () => section,
|
|
109
|
+
select: () => select,
|
|
110
|
+
small: () => small,
|
|
111
|
+
source: () => source,
|
|
112
|
+
span: () => span,
|
|
113
|
+
strong: () => strong,
|
|
114
|
+
sub: () => sub,
|
|
115
|
+
summary: () => summary,
|
|
116
|
+
sup: () => sup,
|
|
117
|
+
table: () => table,
|
|
118
|
+
tbody: () => tbody,
|
|
119
|
+
td: () => td,
|
|
120
|
+
textarea: () => textarea,
|
|
121
|
+
tfoot: () => tfoot,
|
|
122
|
+
th: () => th,
|
|
123
|
+
thead: () => thead,
|
|
124
|
+
time: () => time,
|
|
125
|
+
tr: () => tr,
|
|
126
|
+
track: () => track,
|
|
127
|
+
u: () => u,
|
|
128
|
+
ul: () => ul,
|
|
129
|
+
video: () => video,
|
|
130
|
+
wbr: () => wbr,
|
|
131
|
+
webview: () => webview
|
|
132
|
+
});
|
|
133
|
+
module.exports = __toCommonJS(src_exports);
|
|
134
|
+
var import_core = require("@skel-ui/core");
|
|
135
|
+
var import_react = __toESM(require("react"));
|
|
136
|
+
function createSkelComponent(type, isVoidTag = false) {
|
|
137
|
+
return ({ sw, sh, sr, style, children, ...props }) => {
|
|
138
|
+
const isLoading = import_react.default.useContext(import_core.IsLoadingContext);
|
|
139
|
+
const loadingStyle = isLoading ? {
|
|
140
|
+
width: sw,
|
|
141
|
+
height: sh,
|
|
142
|
+
borderRadius: sr || "var(--skel-ui-radius)",
|
|
143
|
+
color: "transparent",
|
|
144
|
+
cursor: "default",
|
|
145
|
+
userSelect: "none",
|
|
146
|
+
pointerEvents: "none"
|
|
147
|
+
} : {};
|
|
148
|
+
return import_react.default.createElement(
|
|
149
|
+
type,
|
|
150
|
+
{
|
|
151
|
+
...props,
|
|
152
|
+
style: { ...style, ...loadingStyle },
|
|
153
|
+
"aria-hidden": isLoading,
|
|
154
|
+
"data-loading": isLoading,
|
|
155
|
+
// Use base64 transparent image while loading to avoid broken image ui. This doesn't trigger error on other media tags.
|
|
156
|
+
...isLoading && "src" in props && props.src === void 0 ? {
|
|
157
|
+
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgEB/6mZBQAAAABJRU5ErkJggg=="
|
|
158
|
+
} : {}
|
|
159
|
+
},
|
|
160
|
+
isVoidTag ? void 0 : isLoading && typeof type === "string" ? " \u200C " : children
|
|
161
|
+
);
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
function SkelCustom({ as, ...rest }) {
|
|
165
|
+
return createSkelComponent(as)(rest);
|
|
166
|
+
}
|
|
167
|
+
const Root = import_core.SkelRoot;
|
|
168
|
+
const Custom = SkelCustom;
|
|
169
|
+
const a = createSkelComponent("a");
|
|
170
|
+
const address = createSkelComponent("address");
|
|
171
|
+
const article = createSkelComponent("article");
|
|
172
|
+
const aside = createSkelComponent("aside");
|
|
173
|
+
const b = createSkelComponent("b");
|
|
174
|
+
const br = createSkelComponent("br", true);
|
|
175
|
+
const bdi = createSkelComponent("bdi");
|
|
176
|
+
const bdo = createSkelComponent("bdo");
|
|
177
|
+
const blockquote = createSkelComponent("blockquote");
|
|
178
|
+
const button = createSkelComponent("button");
|
|
179
|
+
const canvas = createSkelComponent("canvas");
|
|
180
|
+
const caption = createSkelComponent("caption");
|
|
181
|
+
const cite = createSkelComponent("cite");
|
|
182
|
+
const code = createSkelComponent("code");
|
|
183
|
+
const col = createSkelComponent("col");
|
|
184
|
+
const colgroup = createSkelComponent("colgroup");
|
|
185
|
+
const data = createSkelComponent("data");
|
|
186
|
+
const datalist = createSkelComponent("datalist");
|
|
187
|
+
const dd = createSkelComponent("dd");
|
|
188
|
+
const del = createSkelComponent("del");
|
|
189
|
+
const details = createSkelComponent("details");
|
|
190
|
+
const dfn = createSkelComponent("dfn");
|
|
191
|
+
const dialog = createSkelComponent("dialog");
|
|
192
|
+
const div = createSkelComponent("div");
|
|
193
|
+
const dl = createSkelComponent("dl");
|
|
194
|
+
const dt = createSkelComponent("dt");
|
|
195
|
+
const em = createSkelComponent("em");
|
|
196
|
+
const embed = createSkelComponent("embed", true);
|
|
197
|
+
const fieldset = createSkelComponent("fieldset");
|
|
198
|
+
const figcaption = createSkelComponent("figcaption");
|
|
199
|
+
const figure = createSkelComponent("figure");
|
|
200
|
+
const footer = createSkelComponent("footer");
|
|
201
|
+
const form = createSkelComponent("form");
|
|
202
|
+
const h1 = createSkelComponent("h1");
|
|
203
|
+
const h2 = createSkelComponent("h2");
|
|
204
|
+
const h3 = createSkelComponent("h3");
|
|
205
|
+
const h4 = createSkelComponent("h4");
|
|
206
|
+
const h5 = createSkelComponent("h5");
|
|
207
|
+
const h6 = createSkelComponent("h6");
|
|
208
|
+
const header = createSkelComponent("header");
|
|
209
|
+
const hgroup = createSkelComponent("hgroup");
|
|
210
|
+
const hr = createSkelComponent("hr", true);
|
|
211
|
+
const i = createSkelComponent("i");
|
|
212
|
+
const iframe = createSkelComponent("iframe");
|
|
213
|
+
const img = createSkelComponent("img", true);
|
|
214
|
+
const input = createSkelComponent("input", true);
|
|
215
|
+
const ins = createSkelComponent("ins");
|
|
216
|
+
const kbd = createSkelComponent("kbd");
|
|
217
|
+
const label = createSkelComponent("label");
|
|
218
|
+
const legend = createSkelComponent("legend");
|
|
219
|
+
const li = createSkelComponent("li");
|
|
220
|
+
const main = createSkelComponent("main");
|
|
221
|
+
const map = createSkelComponent("map");
|
|
222
|
+
const mark = createSkelComponent("mark");
|
|
223
|
+
const menu = createSkelComponent("menu");
|
|
224
|
+
const menuitem = createSkelComponent("menuitem");
|
|
225
|
+
const meter = createSkelComponent("meter");
|
|
226
|
+
const nav = createSkelComponent("nav");
|
|
227
|
+
const object = createSkelComponent("object");
|
|
228
|
+
const ol = createSkelComponent("ol");
|
|
229
|
+
const optgroup = createSkelComponent("optgroup");
|
|
230
|
+
const option = createSkelComponent("option");
|
|
231
|
+
const output = createSkelComponent("output");
|
|
232
|
+
const p = createSkelComponent("p");
|
|
233
|
+
const param = createSkelComponent("param");
|
|
234
|
+
const picture = createSkelComponent("picture");
|
|
235
|
+
const pre = createSkelComponent("pre");
|
|
236
|
+
const progress = createSkelComponent("progress");
|
|
237
|
+
const q = createSkelComponent("q");
|
|
238
|
+
const rp = createSkelComponent("rp");
|
|
239
|
+
const rt = createSkelComponent("rt");
|
|
240
|
+
const ruby = createSkelComponent("ruby");
|
|
241
|
+
const s = createSkelComponent("s");
|
|
242
|
+
const samp = createSkelComponent("samp");
|
|
243
|
+
const section = createSkelComponent("section");
|
|
244
|
+
const select = createSkelComponent("select");
|
|
245
|
+
const small = createSkelComponent("small");
|
|
246
|
+
const source = createSkelComponent("source");
|
|
247
|
+
const span = createSkelComponent("span");
|
|
248
|
+
const strong = createSkelComponent("strong");
|
|
249
|
+
const sub = createSkelComponent("sub");
|
|
250
|
+
const summary = createSkelComponent("summary");
|
|
251
|
+
const sup = createSkelComponent("sup");
|
|
252
|
+
const table = createSkelComponent("table");
|
|
253
|
+
const tbody = createSkelComponent("tbody");
|
|
254
|
+
const td = createSkelComponent("td");
|
|
255
|
+
const textarea = createSkelComponent("textarea");
|
|
256
|
+
const tfoot = createSkelComponent("tfoot");
|
|
257
|
+
const th = createSkelComponent("th");
|
|
258
|
+
const thead = createSkelComponent("thead");
|
|
259
|
+
const time = createSkelComponent("time");
|
|
260
|
+
const tr = createSkelComponent("tr");
|
|
261
|
+
const track = createSkelComponent("track");
|
|
262
|
+
const u = createSkelComponent("u");
|
|
263
|
+
const ul = createSkelComponent("ul");
|
|
264
|
+
const video = createSkelComponent("video");
|
|
265
|
+
const wbr = createSkelComponent("wbr", true);
|
|
266
|
+
const webview = createSkelComponent("webview");
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var utils_exports = {};
|
|
20
|
+
__export(utils_exports, {
|
|
21
|
+
generatePlaceholder: () => import_core.generatePlaceholder
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(utils_exports);
|
|
24
|
+
var import_core = require("@skel-ui/core");
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { IsLoadingContext, SkelRoot } from "@skel-ui/core";
|
|
3
|
+
import React from "react";
|
|
4
|
+
function createSkelComponent(type, isVoidTag = false) {
|
|
5
|
+
return ({ sw, sh, sr, style, children, ...props }) => {
|
|
6
|
+
const isLoading = React.useContext(IsLoadingContext);
|
|
7
|
+
const loadingStyle = isLoading ? {
|
|
8
|
+
width: sw,
|
|
9
|
+
height: sh,
|
|
10
|
+
borderRadius: sr || "var(--skel-ui-radius)",
|
|
11
|
+
color: "transparent",
|
|
12
|
+
cursor: "default",
|
|
13
|
+
userSelect: "none",
|
|
14
|
+
pointerEvents: "none"
|
|
15
|
+
} : {};
|
|
16
|
+
return React.createElement(
|
|
17
|
+
type,
|
|
18
|
+
{
|
|
19
|
+
...props,
|
|
20
|
+
style: { ...style, ...loadingStyle },
|
|
21
|
+
"aria-hidden": isLoading,
|
|
22
|
+
"data-loading": isLoading,
|
|
23
|
+
// Use base64 transparent image while loading to avoid broken image ui. This doesn't trigger error on other media tags.
|
|
24
|
+
...isLoading && "src" in props && props.src === void 0 ? {
|
|
25
|
+
src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgEB/6mZBQAAAABJRU5ErkJggg=="
|
|
26
|
+
} : {}
|
|
27
|
+
},
|
|
28
|
+
isVoidTag ? void 0 : isLoading && typeof type === "string" ? " \u200C " : children
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function SkelCustom({ as, ...rest }) {
|
|
33
|
+
return createSkelComponent(as)(rest);
|
|
34
|
+
}
|
|
35
|
+
const Root = SkelRoot;
|
|
36
|
+
const Custom = SkelCustom;
|
|
37
|
+
const a = createSkelComponent("a");
|
|
38
|
+
const address = createSkelComponent("address");
|
|
39
|
+
const article = createSkelComponent("article");
|
|
40
|
+
const aside = createSkelComponent("aside");
|
|
41
|
+
const b = createSkelComponent("b");
|
|
42
|
+
const br = createSkelComponent("br", true);
|
|
43
|
+
const bdi = createSkelComponent("bdi");
|
|
44
|
+
const bdo = createSkelComponent("bdo");
|
|
45
|
+
const blockquote = createSkelComponent("blockquote");
|
|
46
|
+
const button = createSkelComponent("button");
|
|
47
|
+
const canvas = createSkelComponent("canvas");
|
|
48
|
+
const caption = createSkelComponent("caption");
|
|
49
|
+
const cite = createSkelComponent("cite");
|
|
50
|
+
const code = createSkelComponent("code");
|
|
51
|
+
const col = createSkelComponent("col");
|
|
52
|
+
const colgroup = createSkelComponent("colgroup");
|
|
53
|
+
const data = createSkelComponent("data");
|
|
54
|
+
const datalist = createSkelComponent("datalist");
|
|
55
|
+
const dd = createSkelComponent("dd");
|
|
56
|
+
const del = createSkelComponent("del");
|
|
57
|
+
const details = createSkelComponent("details");
|
|
58
|
+
const dfn = createSkelComponent("dfn");
|
|
59
|
+
const dialog = createSkelComponent("dialog");
|
|
60
|
+
const div = createSkelComponent("div");
|
|
61
|
+
const dl = createSkelComponent("dl");
|
|
62
|
+
const dt = createSkelComponent("dt");
|
|
63
|
+
const em = createSkelComponent("em");
|
|
64
|
+
const embed = createSkelComponent("embed", true);
|
|
65
|
+
const fieldset = createSkelComponent("fieldset");
|
|
66
|
+
const figcaption = createSkelComponent("figcaption");
|
|
67
|
+
const figure = createSkelComponent("figure");
|
|
68
|
+
const footer = createSkelComponent("footer");
|
|
69
|
+
const form = createSkelComponent("form");
|
|
70
|
+
const h1 = createSkelComponent("h1");
|
|
71
|
+
const h2 = createSkelComponent("h2");
|
|
72
|
+
const h3 = createSkelComponent("h3");
|
|
73
|
+
const h4 = createSkelComponent("h4");
|
|
74
|
+
const h5 = createSkelComponent("h5");
|
|
75
|
+
const h6 = createSkelComponent("h6");
|
|
76
|
+
const header = createSkelComponent("header");
|
|
77
|
+
const hgroup = createSkelComponent("hgroup");
|
|
78
|
+
const hr = createSkelComponent("hr", true);
|
|
79
|
+
const i = createSkelComponent("i");
|
|
80
|
+
const iframe = createSkelComponent("iframe");
|
|
81
|
+
const img = createSkelComponent("img", true);
|
|
82
|
+
const input = createSkelComponent("input", true);
|
|
83
|
+
const ins = createSkelComponent("ins");
|
|
84
|
+
const kbd = createSkelComponent("kbd");
|
|
85
|
+
const label = createSkelComponent("label");
|
|
86
|
+
const legend = createSkelComponent("legend");
|
|
87
|
+
const li = createSkelComponent("li");
|
|
88
|
+
const main = createSkelComponent("main");
|
|
89
|
+
const map = createSkelComponent("map");
|
|
90
|
+
const mark = createSkelComponent("mark");
|
|
91
|
+
const menu = createSkelComponent("menu");
|
|
92
|
+
const menuitem = createSkelComponent("menuitem");
|
|
93
|
+
const meter = createSkelComponent("meter");
|
|
94
|
+
const nav = createSkelComponent("nav");
|
|
95
|
+
const object = createSkelComponent("object");
|
|
96
|
+
const ol = createSkelComponent("ol");
|
|
97
|
+
const optgroup = createSkelComponent("optgroup");
|
|
98
|
+
const option = createSkelComponent("option");
|
|
99
|
+
const output = createSkelComponent("output");
|
|
100
|
+
const p = createSkelComponent("p");
|
|
101
|
+
const param = createSkelComponent("param");
|
|
102
|
+
const picture = createSkelComponent("picture");
|
|
103
|
+
const pre = createSkelComponent("pre");
|
|
104
|
+
const progress = createSkelComponent("progress");
|
|
105
|
+
const q = createSkelComponent("q");
|
|
106
|
+
const rp = createSkelComponent("rp");
|
|
107
|
+
const rt = createSkelComponent("rt");
|
|
108
|
+
const ruby = createSkelComponent("ruby");
|
|
109
|
+
const s = createSkelComponent("s");
|
|
110
|
+
const samp = createSkelComponent("samp");
|
|
111
|
+
const section = createSkelComponent("section");
|
|
112
|
+
const select = createSkelComponent("select");
|
|
113
|
+
const small = createSkelComponent("small");
|
|
114
|
+
const source = createSkelComponent("source");
|
|
115
|
+
const span = createSkelComponent("span");
|
|
116
|
+
const strong = createSkelComponent("strong");
|
|
117
|
+
const sub = createSkelComponent("sub");
|
|
118
|
+
const summary = createSkelComponent("summary");
|
|
119
|
+
const sup = createSkelComponent("sup");
|
|
120
|
+
const table = createSkelComponent("table");
|
|
121
|
+
const tbody = createSkelComponent("tbody");
|
|
122
|
+
const td = createSkelComponent("td");
|
|
123
|
+
const textarea = createSkelComponent("textarea");
|
|
124
|
+
const tfoot = createSkelComponent("tfoot");
|
|
125
|
+
const th = createSkelComponent("th");
|
|
126
|
+
const thead = createSkelComponent("thead");
|
|
127
|
+
const time = createSkelComponent("time");
|
|
128
|
+
const tr = createSkelComponent("tr");
|
|
129
|
+
const track = createSkelComponent("track");
|
|
130
|
+
const u = createSkelComponent("u");
|
|
131
|
+
const ul = createSkelComponent("ul");
|
|
132
|
+
const video = createSkelComponent("video");
|
|
133
|
+
const wbr = createSkelComponent("wbr", true);
|
|
134
|
+
const webview = createSkelComponent("webview");
|
|
135
|
+
export {
|
|
136
|
+
Custom,
|
|
137
|
+
Root,
|
|
138
|
+
a,
|
|
139
|
+
address,
|
|
140
|
+
article,
|
|
141
|
+
aside,
|
|
142
|
+
b,
|
|
143
|
+
bdi,
|
|
144
|
+
bdo,
|
|
145
|
+
blockquote,
|
|
146
|
+
br,
|
|
147
|
+
button,
|
|
148
|
+
canvas,
|
|
149
|
+
caption,
|
|
150
|
+
cite,
|
|
151
|
+
code,
|
|
152
|
+
col,
|
|
153
|
+
colgroup,
|
|
154
|
+
data,
|
|
155
|
+
datalist,
|
|
156
|
+
dd,
|
|
157
|
+
del,
|
|
158
|
+
details,
|
|
159
|
+
dfn,
|
|
160
|
+
dialog,
|
|
161
|
+
div,
|
|
162
|
+
dl,
|
|
163
|
+
dt,
|
|
164
|
+
em,
|
|
165
|
+
embed,
|
|
166
|
+
fieldset,
|
|
167
|
+
figcaption,
|
|
168
|
+
figure,
|
|
169
|
+
footer,
|
|
170
|
+
form,
|
|
171
|
+
h1,
|
|
172
|
+
h2,
|
|
173
|
+
h3,
|
|
174
|
+
h4,
|
|
175
|
+
h5,
|
|
176
|
+
h6,
|
|
177
|
+
header,
|
|
178
|
+
hgroup,
|
|
179
|
+
hr,
|
|
180
|
+
i,
|
|
181
|
+
iframe,
|
|
182
|
+
img,
|
|
183
|
+
input,
|
|
184
|
+
ins,
|
|
185
|
+
kbd,
|
|
186
|
+
label,
|
|
187
|
+
legend,
|
|
188
|
+
li,
|
|
189
|
+
main,
|
|
190
|
+
map,
|
|
191
|
+
mark,
|
|
192
|
+
menu,
|
|
193
|
+
menuitem,
|
|
194
|
+
meter,
|
|
195
|
+
nav,
|
|
196
|
+
object,
|
|
197
|
+
ol,
|
|
198
|
+
optgroup,
|
|
199
|
+
option,
|
|
200
|
+
output,
|
|
201
|
+
p,
|
|
202
|
+
param,
|
|
203
|
+
picture,
|
|
204
|
+
pre,
|
|
205
|
+
progress,
|
|
206
|
+
q,
|
|
207
|
+
rp,
|
|
208
|
+
rt,
|
|
209
|
+
ruby,
|
|
210
|
+
s,
|
|
211
|
+
samp,
|
|
212
|
+
section,
|
|
213
|
+
select,
|
|
214
|
+
small,
|
|
215
|
+
source,
|
|
216
|
+
span,
|
|
217
|
+
strong,
|
|
218
|
+
sub,
|
|
219
|
+
summary,
|
|
220
|
+
sup,
|
|
221
|
+
table,
|
|
222
|
+
tbody,
|
|
223
|
+
td,
|
|
224
|
+
textarea,
|
|
225
|
+
tfoot,
|
|
226
|
+
th,
|
|
227
|
+
thead,
|
|
228
|
+
time,
|
|
229
|
+
tr,
|
|
230
|
+
track,
|
|
231
|
+
u,
|
|
232
|
+
ul,
|
|
233
|
+
video,
|
|
234
|
+
wbr,
|
|
235
|
+
webview
|
|
236
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { SkelComponentProps, SkelRoot } from "@skel-ui/core";
|
|
2
|
+
import type { ComponentProps, ComponentType } from "react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
type SkelCustomProps<T extends ComponentType<ComponentProps<T>>> = {
|
|
5
|
+
as: T;
|
|
6
|
+
} & ComponentProps<T> & Pick<SkelComponentProps<T>, "sw" | "sh" | "sr">;
|
|
7
|
+
declare function SkelCustom<T extends ComponentType<ComponentProps<T>>>({ as, ...rest }: SkelCustomProps<T>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
export declare const Root: typeof SkelRoot;
|
|
9
|
+
export declare const Custom: typeof SkelCustom;
|
|
10
|
+
export declare const a: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"a">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
11
|
+
export declare const address: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"address">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
export declare const article: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"article">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
export declare const aside: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"aside">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
14
|
+
export declare const b: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"b">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
export declare const br: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"br">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
export declare const bdi: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"bdi">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
export declare const bdo: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"bdo">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
18
|
+
export declare const blockquote: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"blockquote">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
19
|
+
export declare const button: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"button">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
20
|
+
export declare const canvas: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"canvas">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
21
|
+
export declare const caption: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"caption">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
22
|
+
export declare const cite: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"cite">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
23
|
+
export declare const code: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"code">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
24
|
+
export declare const col: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"col">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
25
|
+
export declare const colgroup: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"colgroup">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
26
|
+
export declare const data: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"data">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
export declare const datalist: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"datalist">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
28
|
+
export declare const dd: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"dd">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
29
|
+
export declare const del: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"del">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
30
|
+
export declare const details: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"details">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
31
|
+
export declare const dfn: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"dfn">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
32
|
+
export declare const dialog: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"dialog">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
33
|
+
export declare const div: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"div">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
34
|
+
export declare const dl: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"dl">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
35
|
+
export declare const dt: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"dt">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
36
|
+
export declare const em: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"em">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
37
|
+
export declare const embed: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"embed">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
38
|
+
export declare const fieldset: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"fieldset">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
39
|
+
export declare const figcaption: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"figcaption">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
40
|
+
export declare const figure: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"figure">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
41
|
+
export declare const footer: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"footer">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
42
|
+
export declare const form: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"form">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
43
|
+
export declare const h1: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"h1">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
44
|
+
export declare const h2: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"h2">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
45
|
+
export declare const h3: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"h3">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
46
|
+
export declare const h4: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"h4">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
47
|
+
export declare const h5: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"h5">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
48
|
+
export declare const h6: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"h6">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
49
|
+
export declare const header: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"header">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
50
|
+
export declare const hgroup: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"hgroup">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
51
|
+
export declare const hr: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"hr">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
52
|
+
export declare const i: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"i">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
53
|
+
export declare const iframe: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"iframe">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
54
|
+
export declare const img: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"img">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
55
|
+
export declare const input: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"input">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
56
|
+
export declare const ins: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"ins">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
57
|
+
export declare const kbd: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"kbd">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
58
|
+
export declare const label: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"label">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
59
|
+
export declare const legend: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"legend">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
60
|
+
export declare const li: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"li">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
61
|
+
export declare const main: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"main">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
62
|
+
export declare const map: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"map">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
63
|
+
export declare const mark: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"mark">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
64
|
+
export declare const menu: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"menu">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
65
|
+
export declare const menuitem: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"menuitem">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
66
|
+
export declare const meter: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"meter">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
67
|
+
export declare const nav: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"nav">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
68
|
+
export declare const object: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"object">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
69
|
+
export declare const ol: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"ol">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
70
|
+
export declare const optgroup: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"optgroup">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
71
|
+
export declare const option: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"option">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
72
|
+
export declare const output: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"output">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
73
|
+
export declare const p: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"p">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
74
|
+
export declare const param: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"param">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
75
|
+
export declare const picture: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"picture">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
76
|
+
export declare const pre: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"pre">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
77
|
+
export declare const progress: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"progress">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
78
|
+
export declare const q: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"q">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
79
|
+
export declare const rp: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"rp">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
80
|
+
export declare const rt: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"rt">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
81
|
+
export declare const ruby: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"ruby">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
82
|
+
export declare const s: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"s">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
83
|
+
export declare const samp: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"samp">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
84
|
+
export declare const section: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"section">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
85
|
+
export declare const select: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"select">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
86
|
+
export declare const small: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"small">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
87
|
+
export declare const source: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"source">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
88
|
+
export declare const span: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"span">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
89
|
+
export declare const strong: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"strong">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
90
|
+
export declare const sub: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"sub">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
91
|
+
export declare const summary: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"summary">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
92
|
+
export declare const sup: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"sup">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
93
|
+
export declare const table: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"table">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
94
|
+
export declare const tbody: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"tbody">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
95
|
+
export declare const td: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"td">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
96
|
+
export declare const textarea: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"textarea">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
97
|
+
export declare const tfoot: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"tfoot">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
98
|
+
export declare const th: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"th">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
99
|
+
export declare const thead: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"thead">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
100
|
+
export declare const time: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"time">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
101
|
+
export declare const tr: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"tr">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
102
|
+
export declare const track: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"track">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
103
|
+
export declare const u: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"u">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
104
|
+
export declare const ul: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"ul">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
105
|
+
export declare const video: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"video">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
106
|
+
export declare const wbr: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"wbr">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
107
|
+
export declare const webview: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"webview">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
108
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Animations(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function PostCardList(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../src/styles.css";
|
|
2
|
+
import { Animations, PostCard, PostCardList } from "./components";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof import("@skel-ui/core").SkelRoot;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
export { Animations, PostCard, PostCardList };
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--skel-ui-color1: #cbd5e1;
|
|
3
|
+
--skel-ui-color2: #f1f0f0;
|
|
4
|
+
--skel-ui-radius: 0.25rem;
|
|
5
|
+
--skel-ui-animation-easing: cubic-bezier(0.4, 0, 0.6, 1);
|
|
6
|
+
}
|
|
7
|
+
[aria-hidden=true][data-loading=true] {
|
|
8
|
+
animation: skel-ui-shimmer var(--skel-ui-animation-duration, 2s) var(--skel-ui-animation-easing) infinite !important;
|
|
9
|
+
background-image:
|
|
10
|
+
linear-gradient(
|
|
11
|
+
to right,
|
|
12
|
+
var(--skel-ui-color1) 33%,
|
|
13
|
+
var(--skel-ui-color2),
|
|
14
|
+
var(--skel-ui-color1) 66%);
|
|
15
|
+
background-size: 300%;
|
|
16
|
+
}
|
|
17
|
+
.skel-ui-pulse [aria-hidden=true][data-loading=true] {
|
|
18
|
+
animation: skel-ui-pulse var(--skel-ui-animation-duration, 1s) var(--skel-ui-animation-easing) infinite alternate-reverse !important;
|
|
19
|
+
background-color: var(--skel-ui-color1);
|
|
20
|
+
}
|
|
21
|
+
@keyframes skel-ui-pulse {
|
|
22
|
+
0% {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
}
|
|
25
|
+
100% {
|
|
26
|
+
opacity: 0.35;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
@keyframes skel-ui-shimmer {
|
|
30
|
+
0% {
|
|
31
|
+
background-position: 100%;
|
|
32
|
+
}
|
|
33
|
+
100% {
|
|
34
|
+
background-position: 0%;
|
|
35
|
+
}
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,62 +1,81 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skel-ui/react",
|
|
3
3
|
"author": "https://github.com/sudoaugustin",
|
|
4
|
-
"version": "1.0.0-alpha.
|
|
4
|
+
"version": "1.0.0-alpha.fa3737d",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"description": "Next era of skeleton loading for
|
|
7
|
-
"main": "cjs/index.js",
|
|
8
|
-
"types": "dts/index.d.ts",
|
|
9
|
-
"module": "esm/index.js",
|
|
10
|
-
"sideEffects": false,
|
|
6
|
+
"description": "Next era of skeleton loading for React",
|
|
11
7
|
"files": [
|
|
12
|
-
"
|
|
13
|
-
"esm",
|
|
14
|
-
"dts",
|
|
15
|
-
"types"
|
|
8
|
+
"dist"
|
|
16
9
|
],
|
|
10
|
+
"main": "dist/cjs/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"module": "dist/esm/index.js",
|
|
17
13
|
"keywords": [
|
|
18
14
|
"react",
|
|
19
15
|
"skeleton",
|
|
20
16
|
"loading",
|
|
21
17
|
"placeholder"
|
|
22
18
|
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/esm/index.js",
|
|
23
|
+
"require": "./dist/cjs/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./utils": {
|
|
26
|
+
"types": "./dist/utils.d.ts",
|
|
27
|
+
"import": "./dist/esm/utils.js",
|
|
28
|
+
"require": "./dist/cjs/utils.js"
|
|
29
|
+
},
|
|
30
|
+
"./tailwind": {
|
|
31
|
+
"types": "./dist/tailwind.d.ts",
|
|
32
|
+
"import": "./dist/esm/tailwind.js",
|
|
33
|
+
"require": "./dist/cjs/tailwind.js"
|
|
34
|
+
},
|
|
35
|
+
"./styles.css": "./dist/styles.css",
|
|
36
|
+
"./$components": "./stories/components/index.tsx"
|
|
37
|
+
},
|
|
23
38
|
"bugs": {
|
|
24
|
-
"url": "https://github.com/sudoaugustin/
|
|
39
|
+
"url": "https://github.com/sudoaugustin/skel-ui/issues"
|
|
25
40
|
},
|
|
26
|
-
"homepage": "https://
|
|
41
|
+
"homepage": "https://skel-ui.augustin.zip",
|
|
27
42
|
"repository": {
|
|
28
43
|
"type": "git",
|
|
29
|
-
"url": "git+https://github.com/sudoaugustin/
|
|
44
|
+
"url": "git+https://github.com/sudoaugustin/skel-ui"
|
|
30
45
|
},
|
|
31
46
|
"devDependencies": {
|
|
32
47
|
"@chromatic-com/storybook": "^1.9.0",
|
|
33
|
-
"@storybook/addon-essentials": "^8.3.
|
|
34
|
-
"@storybook/addon-interactions": "^8.3.
|
|
35
|
-
"@storybook/addon-links": "^8.3.
|
|
36
|
-
"@storybook/addon-onboarding": "^8.3.
|
|
37
|
-
"@storybook/blocks": "^8.3.
|
|
38
|
-
"@storybook/react": "^8.3.
|
|
39
|
-
"@storybook/react-vite": "^8.3.
|
|
40
|
-
"@storybook/test": "^8.3.
|
|
41
|
-
"@types/react": "^18.3.
|
|
42
|
-
"@types/react-dom": "^18.
|
|
43
|
-
"esbuild": "^0.
|
|
44
|
-
"react": "^18.
|
|
45
|
-
"react-dom": "^18.
|
|
46
|
-
"storybook": "^8.3.
|
|
47
|
-
"swr": "^2.2.5",
|
|
48
|
+
"@storybook/addon-essentials": "^8.3.4",
|
|
49
|
+
"@storybook/addon-interactions": "^8.3.4",
|
|
50
|
+
"@storybook/addon-links": "^8.3.4",
|
|
51
|
+
"@storybook/addon-onboarding": "^8.3.4",
|
|
52
|
+
"@storybook/blocks": "^8.3.4",
|
|
53
|
+
"@storybook/react": "^8.3.4",
|
|
54
|
+
"@storybook/react-vite": "^8.3.4",
|
|
55
|
+
"@storybook/test": "^8.3.4",
|
|
56
|
+
"@types/react": "^18.3.12",
|
|
57
|
+
"@types/react-dom": "^18.3.1",
|
|
58
|
+
"esbuild": "^0.24.0",
|
|
59
|
+
"react": "^18.3.1",
|
|
60
|
+
"react-dom": "^18.3.1",
|
|
61
|
+
"storybook": "^8.3.4",
|
|
48
62
|
"tailwindcss": "^3.4.13",
|
|
49
|
-
"typescript": "^5.
|
|
63
|
+
"typescript": "^5.7.2",
|
|
64
|
+
"@skel-ui/core": "1.0.0",
|
|
65
|
+
"commons-tsconfig": "0.0.1",
|
|
66
|
+
"commons-utils": "0.0.1"
|
|
50
67
|
},
|
|
51
68
|
"peerDependencies": {
|
|
52
|
-
"react": "^
|
|
53
|
-
"react-dom": "^
|
|
69
|
+
"react": "^17.0 || ^18.0",
|
|
70
|
+
"react-dom": "^17.0 || ^18.0",
|
|
71
|
+
"@skel-ui/core": "1.0.0"
|
|
54
72
|
},
|
|
55
73
|
"scripts": {
|
|
56
74
|
"dev": "storybook dev -p 6006 --no-open",
|
|
57
|
-
"build": "rm -rf
|
|
58
|
-
"build:dts": "tsc -p tsconfig.
|
|
59
|
-
"build:
|
|
60
|
-
"build:
|
|
75
|
+
"build": "rm -rf dist && pnpm build:dts && pnpm build:css && pnpm build:esm && pnpm build:cjs",
|
|
76
|
+
"build:dts": "tsc -p tsconfig.json --outDir dist --emitDeclarationOnly",
|
|
77
|
+
"build:css": "esbuild src/styles.css --outdir=dist",
|
|
78
|
+
"build:esm": "esbuild src/*.ts* --format=esm --outdir=dist/esm",
|
|
79
|
+
"build:cjs": "esbuild src/*.ts* --format=cjs --outdir=dist/cjs"
|
|
61
80
|
}
|
|
62
81
|
}
|
package/cjs/index.css
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--skel-ui-color: #f0f0f0;
|
|
3
|
-
--skel-ui-radius: 0.25rem;
|
|
4
|
-
}
|
|
5
|
-
[data-loading=true] {
|
|
6
|
-
animation: skel-ui-pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate-reverse;
|
|
7
|
-
border-radius: var(--skel-ui-radius);
|
|
8
|
-
background-color: var(--skel-ui-color);
|
|
9
|
-
color: transparent !important;
|
|
10
|
-
cursor: default !important;
|
|
11
|
-
user-select: none !important;
|
|
12
|
-
pointer-events: none !important;
|
|
13
|
-
}
|
|
14
|
-
@keyframes skel-ui-pulse {
|
|
15
|
-
0% {
|
|
16
|
-
opacity: 1;
|
|
17
|
-
}
|
|
18
|
-
100% {
|
|
19
|
-
opacity: 0.5;
|
|
20
|
-
}
|
|
21
|
-
}
|
package/cjs/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var src_exports = {};
|
|
30
|
-
__export(src_exports, {
|
|
31
|
-
default: () => src_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(src_exports);
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
const IsLoadingContext = import_react.default.createContext(false);
|
|
36
|
-
function Root({ isLoading = true, children }) {
|
|
37
|
-
return <IsLoadingContext.Provider value={isLoading}>{children}</IsLoadingContext.Provider>;
|
|
38
|
-
}
|
|
39
|
-
function Item({ as, color, radius, children, ...props }) {
|
|
40
|
-
const isLoading = import_react.default.useContext(IsLoadingContext);
|
|
41
|
-
const Component = as || "p";
|
|
42
|
-
return <Component
|
|
43
|
-
{...props}
|
|
44
|
-
style={{
|
|
45
|
-
// @ts-ignore
|
|
46
|
-
...props.style,
|
|
47
|
-
"--skel-ui-color": color,
|
|
48
|
-
"--skel-ui-radius": radius
|
|
49
|
-
}}
|
|
50
|
-
data-loading={isLoading}
|
|
51
|
-
>{isLoading ? null : typeof children === "function" ? children() : children}</Component>;
|
|
52
|
-
}
|
|
53
|
-
var src_default = { Root, Item };
|
package/dts/index.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
type As<T> = React.ElementType | React.JSXElementConstructor<T>;
|
|
3
|
-
type RootProps = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
isLoading: boolean;
|
|
6
|
-
};
|
|
7
|
-
type ItemProps<T extends As<T>> = {
|
|
8
|
-
as?: T;
|
|
9
|
-
children?: React.ReactNode | (() => React.ReactNode);
|
|
10
|
-
color?: string;
|
|
11
|
-
radius?: string;
|
|
12
|
-
} & (T extends React.ElementType ? Omit<React.ComponentPropsWithoutRef<T>, "children"> : {});
|
|
13
|
-
declare function Root({ isLoading, children }: RootProps): React.JSX.Element;
|
|
14
|
-
declare function Item<T extends As<T>>({ as, color, radius, children, ...props }: ItemProps<T>): React.JSX.Element;
|
|
15
|
-
declare const _default: {
|
|
16
|
-
Root: typeof Root;
|
|
17
|
-
Item: typeof Item;
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
package/esm/index.css
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--skel-ui-color: #f0f0f0;
|
|
3
|
-
--skel-ui-radius: 0.25rem;
|
|
4
|
-
}
|
|
5
|
-
[data-loading=true] {
|
|
6
|
-
animation: skel-ui-pulse 1s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate-reverse;
|
|
7
|
-
border-radius: var(--skel-ui-radius);
|
|
8
|
-
background-color: var(--skel-ui-color);
|
|
9
|
-
color: transparent !important;
|
|
10
|
-
cursor: default !important;
|
|
11
|
-
user-select: none !important;
|
|
12
|
-
pointer-events: none !important;
|
|
13
|
-
}
|
|
14
|
-
@keyframes skel-ui-pulse {
|
|
15
|
-
0% {
|
|
16
|
-
opacity: 1;
|
|
17
|
-
}
|
|
18
|
-
100% {
|
|
19
|
-
opacity: 0.5;
|
|
20
|
-
}
|
|
21
|
-
}
|
package/esm/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
const IsLoadingContext = React.createContext(false);
|
|
3
|
-
function Root({ isLoading = true, children }) {
|
|
4
|
-
return <IsLoadingContext.Provider value={isLoading}>{children}</IsLoadingContext.Provider>;
|
|
5
|
-
}
|
|
6
|
-
function Item({ as, color, radius, children, ...props }) {
|
|
7
|
-
const isLoading = React.useContext(IsLoadingContext);
|
|
8
|
-
const Component = as || "p";
|
|
9
|
-
return <Component
|
|
10
|
-
{...props}
|
|
11
|
-
style={{
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
...props.style,
|
|
14
|
-
"--skel-ui-color": color,
|
|
15
|
-
"--skel-ui-radius": radius
|
|
16
|
-
}}
|
|
17
|
-
data-loading={isLoading}
|
|
18
|
-
>{isLoading ? null : typeof children === "function" ? children() : children}</Component>;
|
|
19
|
-
}
|
|
20
|
-
var src_default = { Root, Item };
|
|
21
|
-
export {
|
|
22
|
-
src_default as default
|
|
23
|
-
};
|
package/types/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|