@kubit-ui-web/react-components 2.0.0-beta.52 → 2.0.0-beta.53
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/cjs/components/skeleton/skeleton2.js +1 -1
- package/dist/cjs/components/skeleton/skeletonStandAlone.js +1 -1
- package/dist/esm/components/skeleton/skeleton2.js +2 -0
- package/dist/esm/components/skeleton/skeletonStandAlone.js +17 -11
- package/dist/types/index.d.ts +12 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../lib/hooks/useClassName/useClassName.js`),t=require(`./skeletonStandAlone.js`);let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.forwardRef)(({additionalClasses:n,additionalShapeClasses:i,shapeVariant:a,variant:o,...s},c)=>{let l=e.useClassName({component:`SKELETON`,variant:o}),u=e.useClassName({component:`SKELETON`,variant:a});return(0,r.jsx)(t.SkeletonStandAlone,{...s,ref:c,cssClasses:l,cssShapeClasses:u,shapeVariant:o})});exports.Skeleton=i;
|
|
1
|
+
const e=require(`../../lib/hooks/useClassName/useClassName.js`),t=require(`./skeletonStandAlone.js`);let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.forwardRef)(({additionalClasses:n,additionalShapeClasses:i,shapeVariant:a,variant:o,...s},c)=>{let l=e.useClassName({additionalClassNames:n,component:`SKELETON`,variant:o}),u=e.useClassName({additionalClassNames:i,component:`SKELETON`,variant:a});return(0,r.jsx)(t.SkeletonStandAlone,{...s,ref:c,cssClasses:l,cssShapeClasses:u,shapeVariant:o})});exports.Skeleton=i;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../../lib/utils/pickCustomAttributes/pickCustomAttributes.js`),t=require(`../../lib/utils/classNames/classNames.js`);;/* empty css */let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.forwardRef)(({cssClasses:
|
|
1
|
+
const e=require(`../../lib/utils/pickCustomAttributes/pickCustomAttributes.js`),t=require(`../../lib/utils/classNames/classNames.js`);;/* empty css */let n=require(`react`),r=require(`react/jsx-runtime`);const i=(0,n.forwardRef)(({borderRadius:i=``,cssClasses:a,cssShapeClasses:o,duration:s=`1.2s`,height:c=`20px`,width:l=`100%`,...u},d)=>{let f=e.pickCustomAttributes(u),p=(0,n.useMemo)(()=>a?.dynamic_values({$skeletonBorderRadius:i,$skeletonDuration:s,$skeletonHeight:c,$skeletonWidth:l}).object,[c,l,i,s]);return(0,r.jsx)(`div`,{ref:d,className:t.classNames(`kbt-skeleton`,a?.skeleton,o?.skeleton),"data-testid":`skeleton`,style:p,...f})});exports.SkeletonStandAlone=i;
|
|
@@ -4,9 +4,11 @@ import { forwardRef } from "react";
|
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
const Skeleton = forwardRef(({ additionalClasses: e, additionalShapeClasses: t, shapeVariant: n, variant: r, ...i }, a) => {
|
|
6
6
|
let o = useClassName({
|
|
7
|
+
additionalClassNames: e,
|
|
7
8
|
component: "SKELETON",
|
|
8
9
|
variant: r
|
|
9
10
|
}), s = useClassName({
|
|
11
|
+
additionalClassNames: t,
|
|
10
12
|
component: "SKELETON",
|
|
11
13
|
variant: n
|
|
12
14
|
});
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
import { pickCustomAttributes } from "../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";
|
|
2
2
|
import { classNames } from "../../lib/utils/classNames/classNames.js";
|
|
3
3
|
/* empty css */
|
|
4
|
-
import { forwardRef } from "react";
|
|
4
|
+
import { forwardRef, useMemo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
const SkeletonStandAlone = forwardRef(({
|
|
7
|
-
let
|
|
6
|
+
const SkeletonStandAlone = forwardRef(({ borderRadius: e = "", cssClasses: t, cssShapeClasses: n, duration: r = "1.2s", height: i = "20px", width: a = "100%", ...o }, s) => {
|
|
7
|
+
let c = pickCustomAttributes(o), l = useMemo(() => t?.dynamic_values({
|
|
8
|
+
$skeletonBorderRadius: e,
|
|
9
|
+
$skeletonDuration: r,
|
|
10
|
+
$skeletonHeight: i,
|
|
11
|
+
$skeletonWidth: a
|
|
12
|
+
}).object, [
|
|
13
|
+
i,
|
|
14
|
+
a,
|
|
15
|
+
e,
|
|
16
|
+
r
|
|
17
|
+
]);
|
|
8
18
|
return /* @__PURE__ */ jsx("div", {
|
|
9
|
-
ref:
|
|
10
|
-
className: classNames("kbt-skeleton",
|
|
19
|
+
ref: s,
|
|
20
|
+
className: classNames("kbt-skeleton", t?.skeleton, n?.skeleton),
|
|
11
21
|
"data-testid": "skeleton",
|
|
12
|
-
style:
|
|
13
|
-
|
|
14
|
-
"--skeleton-height": r,
|
|
15
|
-
"--skeleton-width": i
|
|
16
|
-
},
|
|
17
|
-
...s
|
|
22
|
+
style: l,
|
|
23
|
+
...c
|
|
18
24
|
});
|
|
19
25
|
});
|
|
20
26
|
export { SkeletonStandAlone };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1841,6 +1841,15 @@ declare type ComponentsTypesComponents = {
|
|
|
1841
1841
|
$_default: {
|
|
1842
1842
|
skeleton: string;
|
|
1843
1843
|
};
|
|
1844
|
+
dynamic_values: (styles: {
|
|
1845
|
+
$skeletonWidth: string;
|
|
1846
|
+
$skeletonHeight: string;
|
|
1847
|
+
$skeletonBorderRadius: string;
|
|
1848
|
+
$skeletonDuration: string;
|
|
1849
|
+
}) => {
|
|
1850
|
+
string: string;
|
|
1851
|
+
object: object;
|
|
1852
|
+
};
|
|
1844
1853
|
};
|
|
1845
1854
|
SLIDER: {
|
|
1846
1855
|
slider: string;
|
|
@@ -5528,8 +5537,8 @@ declare type SkeletonCssClasses = ComponentSelected<ComponentsTypesComponents['S
|
|
|
5528
5537
|
*/
|
|
5529
5538
|
export declare interface SkeletonProps<Variant = undefined extends string ? unknown : string> extends SkeletonStandAloneProps {
|
|
5530
5539
|
variant?: Variant;
|
|
5531
|
-
additionalClasses?:
|
|
5532
|
-
additionalShapeClasses?:
|
|
5540
|
+
additionalClasses?: Partial<SkeletonCssClasses>;
|
|
5541
|
+
additionalShapeClasses?: Partial<SkeletonCssClasses>;
|
|
5533
5542
|
}
|
|
5534
5543
|
|
|
5535
5544
|
export declare type SkeletonShapeStyles<Shape extends string> = CssLibPropsType & {
|
|
@@ -5543,6 +5552,7 @@ export declare type SkeletonShapeStyles<Shape extends string> = CssLibPropsType
|
|
|
5543
5552
|
export declare interface SkeletonStandAloneProps extends SkeletonAriaProps, DataAttributes {
|
|
5544
5553
|
width?: string;
|
|
5545
5554
|
height?: string;
|
|
5555
|
+
borderRadius?: string;
|
|
5546
5556
|
duration?: string;
|
|
5547
5557
|
cssClasses?: SkeletonCssClasses;
|
|
5548
5558
|
shapeVariant?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubit-ui-web/react-components",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.53",
|
|
4
4
|
"description": "Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Kubit",
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
"vite-plugin-dts": "^4.5.4",
|
|
172
172
|
"vitest": "^4.0.18",
|
|
173
173
|
"vitest-axe": "^0.1.0",
|
|
174
|
-
"@kubit-ui-web/design-system": "2.0.0-beta.
|
|
174
|
+
"@kubit-ui-web/design-system": "2.0.0-beta.12"
|
|
175
175
|
},
|
|
176
176
|
"publishConfig": {
|
|
177
177
|
"access": "public",
|