@koslibs/components 1.10.0 → 1.11.1
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 +14 -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 +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @koslibs/components
|
|
2
2
|
|
|
3
|
+
## 1.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#13](https://github.com/koslibs/components/pull/13) [`02a80ad`](https://github.com/koslibs/components/commit/02a80ad207cb62f8084cacc343d5d1cb24861db2) Thanks [@holypower777](https://github.com/holypower777)! - Use @koslibs/builder 2 and @koslibs/configs 2 for development, builds and validation, and pin reusable Changeset and release workflows to configs v2.0.0.
|
|
8
|
+
|
|
9
|
+
Update @koslibs/icons to 1.2.1.
|
|
10
|
+
|
|
11
|
+
## 1.11.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [#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.
|
|
16
|
+
|
|
3
17
|
## 1.10.0
|
|
4
18
|
|
|
5
19
|
### 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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koslibs/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"description": "Shared React components for koslibs projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
]
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@koslibs/builder": "^
|
|
72
|
-
"@koslibs/configs": "^
|
|
71
|
+
"@koslibs/builder": "^2.0.0",
|
|
72
|
+
"@koslibs/configs": "^2.0.0",
|
|
73
73
|
"@types/node": "^24.19.0",
|
|
74
74
|
"@types/react": "^18.3.18",
|
|
75
75
|
"@types/react-dom": "^18.3.5",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"react-dom": "^18.3.1 || ^19.0.0"
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@koslibs/icons": "1.2.
|
|
84
|
+
"@koslibs/icons": "1.2.1",
|
|
85
85
|
"@popperjs/core": "2.11.8",
|
|
86
86
|
"classnames": "2.5.1"
|
|
87
87
|
}
|