@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @kubit-ui-web/react-components
2
2
 
3
+ ## 2.0.0-beta.53
4
+
5
+ ### Major Changes
6
+
7
+ - Include borderRadius prop to skeleton (#62)
8
+
3
9
  ## 2.0.0-beta.52
4
10
 
5
11
  ### Major Changes
@@ -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:n,cssShapeClasses:i,duration:a=`1.2s`,height:o,width:s,...c},l)=>{let u=e.pickCustomAttributes(c);return(0,r.jsx)(`div`,{ref:l,className:t.classNames(`kbt-skeleton`,n?.skeleton,i?.skeleton),"data-testid":`skeleton`,style:{"--skeleton-duration":a,"--skeleton-height":o,"--skeleton-width":s},...u})});exports.SkeletonStandAlone=i;
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(({ cssClasses: e, cssShapeClasses: t, duration: n = "1.2s", height: r, width: i, ...a }, o) => {
7
- let s = pickCustomAttributes(a);
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: o,
10
- className: classNames("kbt-skeleton", e?.skeleton, t?.skeleton),
19
+ ref: s,
20
+ className: classNames("kbt-skeleton", t?.skeleton, n?.skeleton),
11
21
  "data-testid": "skeleton",
12
- style: {
13
- "--skeleton-duration": n,
14
- "--skeleton-height": r,
15
- "--skeleton-width": i
16
- },
17
- ...s
22
+ style: l,
23
+ ...c
18
24
  });
19
25
  });
20
26
  export { SkeletonStandAlone };
@@ -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?: string;
5532
- additionalShapeClasses?: string;
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.52",
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.11"
174
+ "@kubit-ui-web/design-system": "2.0.0-beta.12"
175
175
  },
176
176
  "publishConfig": {
177
177
  "access": "public",