@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.
@@ -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(ui.div, { ref, className: cx("ui-skeleton", className), ...rest, animation: animation2 });
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-IYTD2ZGA.mjs";
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(ui.div, { ref, className: cx("ui-skeleton-text", className), __css: css, ...rest, children: Array(computedNoOfLines).fill(0).map((_, index) => {
33
- if (isLoaded && index > 0)
34
- return null;
35
- const isLast = index + 1 === computedNoOfLines;
36
- const props = !isLoaded ? {
37
- mb: !isLast ? gap : void 0,
38
- w: computedNoOfLines > 1 ? !isLast ? "100%" : "80%" : "100%",
39
- h: textHeight
40
- } : {};
41
- return /* @__PURE__ */ jsx(
42
- Skeleton,
43
- {
44
- ...{ startColor, endColor, fadeDuration, speed, isLoaded, ...props },
45
- children: index === 0 ? children : void 0
46
- },
47
- index
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)(import_core.ui.div, { ref, className: (0, import_utils.cx)("ui-skeleton", className), ...rest, animation: animation2 });
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)(import_core3.ui.div, { ref, className: (0, import_utils3.cx)("ui-skeleton-text", className), __css: css, ...rest, children: Array(computedNoOfLines).fill(0).map((_, index) => {
153
- if (isLoaded && index > 0)
154
- return null;
155
- const isLast = index + 1 === computedNoOfLines;
156
- const props = !isLoaded ? {
157
- mb: !isLast ? gap : void 0,
158
- w: computedNoOfLines > 1 ? !isLast ? "100%" : "80%" : "100%",
159
- h: textHeight
160
- } : {};
161
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
162
- Skeleton,
163
- {
164
- ...{ startColor, endColor, fadeDuration, speed, isLoaded, ...props },
165
- children: index === 0 ? children : void 0
166
- },
167
- index
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
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  SkeletonCircle,
3
3
  SkeletonText
4
- } from "./chunk-J7ZVFXMK.mjs";
4
+ } from "./chunk-PF2UDEMS.mjs";
5
5
  import {
6
6
  Skeleton
7
- } from "./chunk-IYTD2ZGA.mjs";
7
+ } from "./chunk-AV6M3SU3.mjs";
8
8
  export {
9
9
  Skeleton,
10
10
  SkeletonCircle,
@@ -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)(import_core.ui.div, { ref, className: (0, import_utils.cx)("ui-skeleton", className), ...rest, animation: animation2 });
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,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SkeletonCircle
3
- } from "./chunk-J7ZVFXMK.mjs";
4
- import "./chunk-IYTD2ZGA.mjs";
3
+ } from "./chunk-PF2UDEMS.mjs";
4
+ import "./chunk-AV6M3SU3.mjs";
5
5
  export {
6
6
  SkeletonCircle
7
7
  };
@@ -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)(import_core.ui.div, { ref, className: (0, import_utils.cx)("ui-skeleton", className), ...rest, animation: animation2 });
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)(import_core2.ui.div, { ref, className: (0, import_utils2.cx)("ui-skeleton-text", className), __css: css, ...rest, children: Array(computedNoOfLines).fill(0).map((_, index) => {
132
- if (isLoaded && index > 0)
133
- return null;
134
- const isLast = index + 1 === computedNoOfLines;
135
- const props = !isLoaded ? {
136
- mb: !isLast ? gap : void 0,
137
- w: computedNoOfLines > 1 ? !isLast ? "100%" : "80%" : "100%",
138
- h: textHeight
139
- } : {};
140
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
141
- Skeleton,
142
- {
143
- ...{ startColor, endColor, fadeDuration, speed, isLoaded, ...props },
144
- children: index === 0 ? children : void 0
145
- },
146
- index
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:
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SkeletonText
3
- } from "./chunk-J7ZVFXMK.mjs";
4
- import "./chunk-IYTD2ZGA.mjs";
3
+ } from "./chunk-PF2UDEMS.mjs";
4
+ import "./chunk-AV6M3SU3.mjs";
5
5
  export {
6
6
  SkeletonText
7
7
  };
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)(import_core.ui.div, { ref, className: (0, import_utils.cx)("ui-skeleton", className), ...rest, animation: animation2 });
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Skeleton
3
- } from "./chunk-IYTD2ZGA.mjs";
3
+ } from "./chunk-AV6M3SU3.mjs";
4
4
  export {
5
5
  Skeleton
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/skeleton",
3
- "version": "0.2.5",
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.0",
39
- "@yamada-ui/use-animation": "0.1.17",
40
- "@yamada-ui/use-value": "0.1.17",
41
- "@yamada-ui/use-previous": "0.1.3",
42
- "@yamada-ui/utils": "0.1.3"
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",