@koslibs/components 1.10.0 → 1.11.0
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/CHANGELOG.md +6 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.js +1 -0
- package/dist/components/Skeleton/index.module.js +7 -0
- package/dist/components/Skeleton/index_module.css +26 -0
- package/dist/components/Skeleton/skeleton.d.ts +5 -0
- package/dist/components/Skeleton/skeleton.js +14 -0
- package/dist/components/Skeleton/types.d.ts +16 -0
- package/dist/components/Skeleton/types.js +0 -0
- package/dist/components/Skeleton/vars.css +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @koslibs/components
|
|
2
2
|
|
|
3
|
+
## 1.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#12](https://github.com/koslibs/components/pull/12) [`563c38f`](https://github.com/koslibs/components/commit/563c38f0dcaf306c4993e50d5e7f5e4ddd44368d) Thanks [@holypower777](https://github.com/holypower777)! - Добавлен Skeleton: CSS-пульсация с управлением через animated, настраиваемые размеры и скругление через стили, CSS-переменные фона, радиуса и длительности. Доступны ref, нативные атрибуты div, dataTestId, Storybook Docs и Playground.
|
|
8
|
+
|
|
3
9
|
## 1.10.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from "./skeleton.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
@import "./vars.css";
|
|
2
|
+
|
|
3
|
+
.component-dYdUkS {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
border-radius: var(--skeleton-border-radius);
|
|
6
|
+
background-color: var(--skeleton-background-color);
|
|
7
|
+
flex-shrink: 0;
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.animated-RXyKCh {
|
|
14
|
+
animation: pulse-Qjbi05 var(--skeleton-animation-duration) ease-in-out infinite;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@keyframes pulse-Qjbi05 {
|
|
18
|
+
0%, 100% {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
50% {
|
|
23
|
+
opacity: .45;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<import("react").HTMLAttributes<HTMLDivElement>, "children" | "dangerouslySetInnerHTML"> & {
|
|
2
|
+
animated?: boolean;
|
|
3
|
+
children?: never;
|
|
4
|
+
dataTestId?: string;
|
|
5
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import classnames from "classnames";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import index_module from "./index.module.js";
|
|
5
|
+
const Skeleton = /*#__PURE__*/ forwardRef(({ animated = true, className, dataTestId, ...restProps }, ref)=>/*#__PURE__*/ jsx("div", {
|
|
6
|
+
...restProps,
|
|
7
|
+
ref: ref,
|
|
8
|
+
className: classnames(index_module.component, {
|
|
9
|
+
[index_module.animated]: animated
|
|
10
|
+
}, className),
|
|
11
|
+
"data-test-id": dataTestId
|
|
12
|
+
}));
|
|
13
|
+
Skeleton.displayName = 'Skeleton';
|
|
14
|
+
export { Skeleton };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type SkeletonProps = Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dangerouslySetInnerHTML'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Включает пульсацию.
|
|
5
|
+
* @default true
|
|
6
|
+
*/
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Skeleton не содержит дочерних элементов.
|
|
10
|
+
*/
|
|
11
|
+
children?: never;
|
|
12
|
+
/**
|
|
13
|
+
* Идентификатор корневого элемента для тестов.
|
|
14
|
+
*/
|
|
15
|
+
dataTestId?: string;
|
|
16
|
+
};
|
|
File without changes
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { Tab, Tabs } from './components/Tabs/index.js';
|
|
|
10
10
|
export type { TabProps, TabsProps } from './components/Tabs/index.js';
|
|
11
11
|
export { Spinner } from './components/Spinner/index.js';
|
|
12
12
|
export type { SpinnerProps } from './components/Spinner/index.js';
|
|
13
|
+
export { Skeleton } from './components/Skeleton/index.js';
|
|
14
|
+
export type { SkeletonProps } from './components/Skeleton/index.js';
|
|
13
15
|
export { Status } from './components/Status/index.js';
|
|
14
16
|
export type { StatusProps } from './components/Status/index.js';
|
|
15
17
|
export { Space } from './components/Space/index.js';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export { Select } from "./components/Select/index.js";
|
|
|
4
4
|
export { Textarea } from "./components/Textarea/index.js";
|
|
5
5
|
export { Tab, Tabs } from "./components/Tabs/index.js";
|
|
6
6
|
export { Spinner } from "./components/Spinner/index.js";
|
|
7
|
+
export { Skeleton } from "./components/Skeleton/index.js";
|
|
7
8
|
export { Status } from "./components/Status/index.js";
|
|
8
9
|
export { Space } from "./components/Space/index.js";
|
|
9
10
|
export { Text, Title, Typography, TypographyText, TypographyTitle } from "./components/Typography/index.js";
|