@skel-ui/react 1.0.0-alpha.87a0363 → 1.0.0-alpha.a8d28e6

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/cjs/index.js CHANGED
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var src_exports = {};
31
- __export(src_exports, {
32
- Custom: () => Custom,
30
+ var index_exports = {};
31
+ __export(index_exports, {
32
+ Item: () => Item,
33
33
  Root: () => Root,
34
34
  a: () => a,
35
35
  address: () => address,
@@ -130,7 +130,7 @@ __export(src_exports, {
130
130
  wbr: () => wbr,
131
131
  webview: () => webview
132
132
  });
133
- module.exports = __toCommonJS(src_exports);
133
+ module.exports = __toCommonJS(index_exports);
134
134
  var import_core = require("@skel-ui/core");
135
135
  var import_react = __toESM(require("react"));
136
136
  function createSkelComponent(type, isVoidTag = false) {
@@ -152,8 +152,8 @@ function createSkelComponent(type, isVoidTag = false) {
152
152
  style: { ...style, ...loadingStyle },
153
153
  "aria-hidden": isLoading,
154
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 ? {
155
+ // Use base64 transparent image while loading to avoid broken image ui for falsy src. This doesn't trigger error on other media tags.
156
+ ...isLoading && "src" in props ? {
157
157
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgEB/6mZBQAAAABJRU5ErkJggg=="
158
158
  } : {}
159
159
  },
@@ -161,11 +161,11 @@ function createSkelComponent(type, isVoidTag = false) {
161
161
  );
162
162
  };
163
163
  }
164
- function SkelCustom({ as, ...rest }) {
164
+ function SkelItem({ as, ...rest }) {
165
165
  return createSkelComponent(as)(rest);
166
166
  }
167
167
  const Root = import_core.SkelRoot;
168
- const Custom = SkelCustom;
168
+ const Item = SkelItem;
169
169
  const a = createSkelComponent("a");
170
170
  const address = createSkelComponent("address");
171
171
  const article = createSkelComponent("article");
package/dist/esm/index.js CHANGED
@@ -20,8 +20,8 @@ function createSkelComponent(type, isVoidTag = false) {
20
20
  style: { ...style, ...loadingStyle },
21
21
  "aria-hidden": isLoading,
22
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 ? {
23
+ // Use base64 transparent image while loading to avoid broken image ui for falsy src. This doesn't trigger error on other media tags.
24
+ ...isLoading && "src" in props ? {
25
25
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/wcAAgEB/6mZBQAAAABJRU5ErkJggg=="
26
26
  } : {}
27
27
  },
@@ -29,11 +29,11 @@ function createSkelComponent(type, isVoidTag = false) {
29
29
  );
30
30
  };
31
31
  }
32
- function SkelCustom({ as, ...rest }) {
32
+ function SkelItem({ as, ...rest }) {
33
33
  return createSkelComponent(as)(rest);
34
34
  }
35
35
  const Root = SkelRoot;
36
- const Custom = SkelCustom;
36
+ const Item = SkelItem;
37
37
  const a = createSkelComponent("a");
38
38
  const address = createSkelComponent("address");
39
39
  const article = createSkelComponent("article");
@@ -133,7 +133,7 @@ const video = createSkelComponent("video");
133
133
  const wbr = createSkelComponent("wbr", true);
134
134
  const webview = createSkelComponent("webview");
135
135
  export {
136
- Custom,
136
+ Item,
137
137
  Root,
138
138
  a,
139
139
  address,
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import { SkelComponentProps, SkelRoot } from "@skel-ui/core";
2
2
  import type { ComponentProps, ComponentType } from "react";
3
3
  import React from "react";
4
- type SkelCustomProps<T extends ComponentType<ComponentProps<T>>> = {
4
+ type SkelItemProps<T extends ComponentType<ComponentProps<T>>> = {
5
5
  as: T;
6
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>>;
7
+ declare function SkelItem<T extends ComponentType<ComponentProps<T>>>({ as, ...rest }: SkelItemProps<T>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
8
8
  export declare const Root: typeof SkelRoot;
9
- export declare const Custom: typeof SkelCustom;
9
+ export declare const Item: typeof SkelItem;
10
10
  export declare const a: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"a">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
11
11
  export declare const address: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"address">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
12
12
  export declare const article: ({ sw, sh, sr, style, children, ...props }: SkelComponentProps<"article">) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
package/dist/styles.css CHANGED
@@ -1,23 +1,25 @@
1
1
  :root {
2
- --skel-ui-color1: #cbd5e1;
3
- --skel-ui-color2: #f1f0f0;
2
+ --skel-ui-color: #cbd5e1;
4
3
  --skel-ui-radius: 0.25rem;
4
+ --skel-ui-animation-delay: 0s;
5
5
  --skel-ui-animation-easing: cubic-bezier(0.4, 0, 0.6, 1);
6
6
  }
7
- [aria-hidden=true][data-loading=true] {
7
+ [data-loading=true] {
8
8
  border-radius: var(--skel-ui-radius);
9
- animation: skel-ui-shimmer var(--skel-ui-animation-duration, 2s) var(--skel-ui-animation-easing) infinite !important;
9
+ }
10
+ [data-loading=true] {
11
+ animation: skel-ui-shimmer var(--skel-ui-animation-duration, 2s) var(--skel-ui-animation-easing) var(--skel-ui-animation-delay) infinite !important;
10
12
  background-image:
11
13
  linear-gradient(
12
14
  to right,
13
- var(--skel-ui-color1) 33%,
14
- var(--skel-ui-color2),
15
- var(--skel-ui-color1) 66%);
15
+ var(--skel-ui-color) 33%,
16
+ var(--skel-ui-shimmer-color, #f1f0f0),
17
+ var(--skel-ui-color) 66%);
16
18
  background-size: 300%;
17
19
  }
18
- .skel-ui-pulse [aria-hidden=true][data-loading=true] {
19
- animation: skel-ui-pulse var(--skel-ui-animation-duration, 1s) var(--skel-ui-animation-easing) infinite alternate-reverse !important;
20
- background-color: var(--skel-ui-color1);
20
+ .skel-ui-pulse [data-loading=true] {
21
+ animation: skel-ui-pulse var(--skel-ui-animation-duration, 1s) var(--skel-ui-animation-easing) var(--skel-ui-animation-delay) infinite alternate-reverse !important;
22
+ background-color: var(--skel-ui-color);
21
23
  }
22
24
  @keyframes skel-ui-pulse {
23
25
  0% {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@skel-ui/react",
3
3
  "author": "https://github.com/sudoaugustin",
4
- "version": "1.0.0-alpha.87a0363",
4
+ "version": "1.0.0-alpha.a8d28e6",
5
5
  "license": "MIT",
6
- "description": "Next era of skeleton loading for React",
6
+ "description": "Small but mighty skeleton loading for React",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
@@ -75,8 +75,8 @@
75
75
  "tailwindcss": "^3.4.13",
76
76
  "typescript": "^5.7.2",
77
77
  "@skel-ui/core": "1.0.0",
78
- "commons-tsconfig": "0.0.1",
79
- "commons-utils": "0.0.1"
78
+ "commons-utils": "0.0.1",
79
+ "commons-tsconfig": "0.0.1"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "react": "^17.0 || ^18.0",