@skel-ui/core 1.0.0-alpha.c5b371c → 1.0.0-alpha.e84c1ff
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/index.cjs.js +5 -5
- package/dist/index.d.ts +1 -3
- package/dist/index.esm.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -16,19 +16,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var index_exports = {};
|
|
20
|
+
__export(index_exports, {
|
|
21
21
|
IsLoadingContext: () => IsLoadingContext,
|
|
22
22
|
SkelRoot: () => SkelRoot,
|
|
23
23
|
generatePlaceholder: () => generatePlaceholder
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
26
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
27
|
var import_react = require("react");
|
|
28
28
|
const IsLoadingContext = (0, import_react.createContext)(false);
|
|
29
29
|
function SkelRoot({ children, isLoading = true }) {
|
|
30
30
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IsLoadingContext.Provider, { value: isLoading, children });
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
function generatePlaceholder(length, primary) {
|
|
33
33
|
return Array(length).fill(null).map((_, index) => ({ [primary]: `${primary}-${index}` }));
|
|
34
|
-
}
|
|
34
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,5 @@ export declare function SkelRoot({ children, isLoading }: {
|
|
|
10
10
|
children: ReactNode;
|
|
11
11
|
isLoading: boolean;
|
|
12
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare
|
|
14
|
-
[k: string]: any;
|
|
15
|
-
}>(length: number, primary: string) => T[];
|
|
13
|
+
export declare function generatePlaceholder<T>(length: number, primary: string): T[];
|
|
16
14
|
export {};
|
package/dist/index.esm.js
CHANGED
|
@@ -4,9 +4,9 @@ const IsLoadingContext = createContext(false);
|
|
|
4
4
|
function SkelRoot({ children, isLoading = true }) {
|
|
5
5
|
return /* @__PURE__ */ jsx(IsLoadingContext.Provider, { value: isLoading, children });
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
function generatePlaceholder(length, primary) {
|
|
8
8
|
return Array(length).fill(null).map((_, index) => ({ [primary]: `${primary}-${index}` }));
|
|
9
|
-
}
|
|
9
|
+
}
|
|
10
10
|
export {
|
|
11
11
|
IsLoadingContext,
|
|
12
12
|
SkelRoot,
|
package/package.json
CHANGED