@yamada-ui/skeleton 0.2.5 → 0.2.7
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/{chunk-IYTD2ZGA.mjs → chunk-AV6M3SU3.mjs} +9 -1
- package/dist/{chunk-J7ZVFXMK.mjs → chunk-PF2UDEMS.mjs} +35 -19
- package/dist/index.js +43 -19
- package/dist/index.mjs +2 -2
- package/dist/skeleton-circle.js +9 -1
- package/dist/skeleton-circle.mjs +2 -2
- package/dist/skeleton-text.js +43 -19
- package/dist/skeleton-text.mjs +2 -2
- package/dist/skeleton.js +9 -1
- package/dist/skeleton.mjs +1 -1
- package/package.json +6 -6
|
@@ -69,7 +69,15 @@ var Skeleton = forwardRef((props, ref) => {
|
|
|
69
69
|
};
|
|
70
70
|
if (isLoaded) {
|
|
71
71
|
const animation2 = !isMounted.current || prevIsLoaded ? "none" : fadeIn;
|
|
72
|
-
return /* @__PURE__ */ jsx(
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
ui.div,
|
|
74
|
+
{
|
|
75
|
+
ref,
|
|
76
|
+
className: cx("ui-skeleton", className),
|
|
77
|
+
...rest,
|
|
78
|
+
animation: animation2
|
|
79
|
+
}
|
|
80
|
+
);
|
|
73
81
|
} else {
|
|
74
82
|
return /* @__PURE__ */ jsx(
|
|
75
83
|
ui.div,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Skeleton
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AV6M3SU3.mjs";
|
|
4
4
|
|
|
5
5
|
// src/skeleton-circle.tsx
|
|
6
6
|
import { forwardRef as forwardRef2 } from "@yamada-ui/core";
|
|
@@ -29,24 +29,40 @@ var SkeletonText = forwardRef(
|
|
|
29
29
|
const css = {
|
|
30
30
|
w: "full"
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */ jsx(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
ui.div,
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
className: cx("ui-skeleton-text", className),
|
|
37
|
+
__css: css,
|
|
38
|
+
...rest,
|
|
39
|
+
children: Array(computedNoOfLines).fill(0).map((_, index) => {
|
|
40
|
+
if (isLoaded && index > 0)
|
|
41
|
+
return null;
|
|
42
|
+
const isLast = index + 1 === computedNoOfLines;
|
|
43
|
+
const props = !isLoaded ? {
|
|
44
|
+
mb: !isLast ? gap : void 0,
|
|
45
|
+
w: computedNoOfLines > 1 ? !isLast ? "100%" : "80%" : "100%",
|
|
46
|
+
h: textHeight
|
|
47
|
+
} : {};
|
|
48
|
+
return /* @__PURE__ */ jsx(
|
|
49
|
+
Skeleton,
|
|
50
|
+
{
|
|
51
|
+
...{
|
|
52
|
+
startColor,
|
|
53
|
+
endColor,
|
|
54
|
+
fadeDuration,
|
|
55
|
+
speed,
|
|
56
|
+
isLoaded,
|
|
57
|
+
...props
|
|
58
|
+
},
|
|
59
|
+
children: index === 0 ? children : void 0
|
|
60
|
+
},
|
|
61
|
+
index
|
|
62
|
+
);
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
);
|
|
50
66
|
}
|
|
51
67
|
);
|
|
52
68
|
|
package/dist/index.js
CHANGED
|
@@ -92,7 +92,15 @@ var Skeleton = (0, import_core.forwardRef)((props, ref) => {
|
|
|
92
92
|
};
|
|
93
93
|
if (isLoaded) {
|
|
94
94
|
const animation2 = !isMounted.current || prevIsLoaded ? "none" : fadeIn;
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
import_core.ui.div,
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
className: (0, import_utils.cx)("ui-skeleton", className),
|
|
100
|
+
...rest,
|
|
101
|
+
animation: animation2
|
|
102
|
+
}
|
|
103
|
+
);
|
|
96
104
|
} else {
|
|
97
105
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
106
|
import_core.ui.div,
|
|
@@ -149,24 +157,40 @@ var SkeletonText = (0, import_core3.forwardRef)(
|
|
|
149
157
|
const css = {
|
|
150
158
|
w: "full"
|
|
151
159
|
};
|
|
152
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
161
|
+
import_core3.ui.div,
|
|
162
|
+
{
|
|
163
|
+
ref,
|
|
164
|
+
className: (0, import_utils3.cx)("ui-skeleton-text", className),
|
|
165
|
+
__css: css,
|
|
166
|
+
...rest,
|
|
167
|
+
children: Array(computedNoOfLines).fill(0).map((_, index) => {
|
|
168
|
+
if (isLoaded && index > 0)
|
|
169
|
+
return null;
|
|
170
|
+
const isLast = index + 1 === computedNoOfLines;
|
|
171
|
+
const props = !isLoaded ? {
|
|
172
|
+
mb: !isLast ? gap : void 0,
|
|
173
|
+
w: computedNoOfLines > 1 ? !isLast ? "100%" : "80%" : "100%",
|
|
174
|
+
h: textHeight
|
|
175
|
+
} : {};
|
|
176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
177
|
+
Skeleton,
|
|
178
|
+
{
|
|
179
|
+
...{
|
|
180
|
+
startColor,
|
|
181
|
+
endColor,
|
|
182
|
+
fadeDuration,
|
|
183
|
+
speed,
|
|
184
|
+
isLoaded,
|
|
185
|
+
...props
|
|
186
|
+
},
|
|
187
|
+
children: index === 0 ? children : void 0
|
|
188
|
+
},
|
|
189
|
+
index
|
|
190
|
+
);
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
);
|
|
170
194
|
}
|
|
171
195
|
);
|
|
172
196
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
package/dist/skeleton-circle.js
CHANGED
|
@@ -92,7 +92,15 @@ var Skeleton = (0, import_core.forwardRef)((props, ref) => {
|
|
|
92
92
|
};
|
|
93
93
|
if (isLoaded) {
|
|
94
94
|
const animation2 = !isMounted.current || prevIsLoaded ? "none" : fadeIn;
|
|
95
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
import_core.ui.div,
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
className: (0, import_utils.cx)("ui-skeleton", className),
|
|
100
|
+
...rest,
|
|
101
|
+
animation: animation2
|
|
102
|
+
}
|
|
103
|
+
);
|
|
96
104
|
} else {
|
|
97
105
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
98
106
|
import_core.ui.div,
|
package/dist/skeleton-circle.mjs
CHANGED
package/dist/skeleton-text.js
CHANGED
|
@@ -93,7 +93,15 @@ var Skeleton = (0, import_core.forwardRef)((props, ref) => {
|
|
|
93
93
|
};
|
|
94
94
|
if (isLoaded) {
|
|
95
95
|
const animation2 = !isMounted.current || prevIsLoaded ? "none" : fadeIn;
|
|
96
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
96
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
+
import_core.ui.div,
|
|
98
|
+
{
|
|
99
|
+
ref,
|
|
100
|
+
className: (0, import_utils.cx)("ui-skeleton", className),
|
|
101
|
+
...rest,
|
|
102
|
+
animation: animation2
|
|
103
|
+
}
|
|
104
|
+
);
|
|
97
105
|
} else {
|
|
98
106
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
107
|
import_core.ui.div,
|
|
@@ -128,24 +136,40 @@ var SkeletonText = (0, import_core2.forwardRef)(
|
|
|
128
136
|
const css = {
|
|
129
137
|
w: "full"
|
|
130
138
|
};
|
|
131
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
140
|
+
import_core2.ui.div,
|
|
141
|
+
{
|
|
142
|
+
ref,
|
|
143
|
+
className: (0, import_utils2.cx)("ui-skeleton-text", className),
|
|
144
|
+
__css: css,
|
|
145
|
+
...rest,
|
|
146
|
+
children: Array(computedNoOfLines).fill(0).map((_, index) => {
|
|
147
|
+
if (isLoaded && index > 0)
|
|
148
|
+
return null;
|
|
149
|
+
const isLast = index + 1 === computedNoOfLines;
|
|
150
|
+
const props = !isLoaded ? {
|
|
151
|
+
mb: !isLast ? gap : void 0,
|
|
152
|
+
w: computedNoOfLines > 1 ? !isLast ? "100%" : "80%" : "100%",
|
|
153
|
+
h: textHeight
|
|
154
|
+
} : {};
|
|
155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
156
|
+
Skeleton,
|
|
157
|
+
{
|
|
158
|
+
...{
|
|
159
|
+
startColor,
|
|
160
|
+
endColor,
|
|
161
|
+
fadeDuration,
|
|
162
|
+
speed,
|
|
163
|
+
isLoaded,
|
|
164
|
+
...props
|
|
165
|
+
},
|
|
166
|
+
children: index === 0 ? children : void 0
|
|
167
|
+
},
|
|
168
|
+
index
|
|
169
|
+
);
|
|
170
|
+
})
|
|
171
|
+
}
|
|
172
|
+
);
|
|
149
173
|
}
|
|
150
174
|
);
|
|
151
175
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/skeleton-text.mjs
CHANGED
package/dist/skeleton.js
CHANGED
|
@@ -88,7 +88,15 @@ var Skeleton = (0, import_core.forwardRef)((props, ref) => {
|
|
|
88
88
|
};
|
|
89
89
|
if (isLoaded) {
|
|
90
90
|
const animation2 = !isMounted.current || prevIsLoaded ? "none" : fadeIn;
|
|
91
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
92
|
+
import_core.ui.div,
|
|
93
|
+
{
|
|
94
|
+
ref,
|
|
95
|
+
className: (0, import_utils.cx)("ui-skeleton", className),
|
|
96
|
+
...rest,
|
|
97
|
+
animation: animation2
|
|
98
|
+
}
|
|
99
|
+
);
|
|
92
100
|
} else {
|
|
93
101
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
102
|
import_core.ui.div,
|
package/dist/skeleton.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/skeleton",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Yamada UI skeleton component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yamada-ui/core": "0.5.
|
|
39
|
-
"@yamada-ui/use-animation": "0.1.
|
|
40
|
-
"@yamada-ui/use-value": "0.1.
|
|
41
|
-
"@yamada-ui/use-previous": "0.1.
|
|
42
|
-
"@yamada-ui/utils": "0.1.
|
|
38
|
+
"@yamada-ui/core": "0.5.2",
|
|
39
|
+
"@yamada-ui/use-animation": "0.1.19",
|
|
40
|
+
"@yamada-ui/use-value": "0.1.19",
|
|
41
|
+
"@yamada-ui/use-previous": "0.1.4",
|
|
42
|
+
"@yamada-ui/utils": "0.1.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"react": "^18.0.0",
|