@kubit-ui-web/react-components 2.0.0-beta.29 → 2.0.0-beta.30

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.
@@ -1 +1 @@
1
- const e=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),t=require("../text/text2.js"),s=require("../../lib/utils/process/processCommonProp.js"),a=require("../dot/dot.js"),r=require("../../lib/components/elementOrIcon/elementOrIcon.js");let o=require("react"),n=require("react/jsx-runtime");const i=(0,o.forwardRef)(({active:i,ariaLiveText:c,cssSizeClasses:l,cssVariantClasses:u,dot:d,hasDot:b,icon:m,label:p,labelIcon:x,onBadgeBlur:j,onClick:C,role:h,...A},k)=>{const I=(0,o.useRef)(null),g=(0,o.useRef)(null),q={"data-active":!!i},N=e.pickCustomAttributes({...A,customAttributes:q}),$=e.pickCustomAttributes(q),f=N["data-testid"]||"badge";(0,o.useImperativeHandle)(k,()=>g.current,[]);const v=(0,o.useCallback)(e=>{j?.(e)},[j]),B=(0,o.useCallback)(e=>{C?.(e)},[C]);return(0,n.jsx)("div",{ref:g,className:`${u?.badge} ${l?.badge}`,"data-testid":`${f}-container`,...$,children:(0,n.jsxs)("button",{ref:I,className:u?.button,"data-testid":f,role:h,type:"button",onBlur:v,onClick:B,...N,children:[(0,n.jsxs)("span",{className:u?.dotcontainer,children:[!!d&&!!b&&(0,n.jsx)("span",{"aria-hidden":!0,className:u?.dot,children:(0,n.jsx)(a.Dot,{...d})}),(0,n.jsx)(r.ElementOrIcon,{className:`${u?.icon} ${l?.icon}`,...s.processIconProp(m),customAttributes:q})]}),!!p&&(0,n.jsxs)("span",{"aria-hidden":!0,className:u?.labelcontainer,children:[(0,n.jsx)(t.Text,{additionalClasses:{text:`${l?.label} ${u?.label}`},component:"span",...s.processTextProp(p),customAttributes:q}),(0,n.jsx)(r.ElementOrIcon,{className:u?.labelicon,rotate:i?"180deg":"0deg",transitionDuration:"0.2s",...s.processIconProp(x),customAttributes:q})]}),(0,n.jsx)("screen-reader-only",{"aria-live":"polite",children:c})]})})});exports.BadgeStandAlone=i;
1
+ const e=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),t=require("../text/text2.js"),s=require("../../lib/utils/process/processCommonProp.js"),r=require("../dot/dot.js"),a=require("../../lib/components/screen-reader-only/screenReaderOnly.js"),n=require("../../lib/components/elementOrIcon/elementOrIcon.js");let o=require("react"),i=require("react/jsx-runtime");const c=(0,o.forwardRef)(({active:c,ariaLiveText:l,cssSizeClasses:u,cssVariantClasses:d,dot:b,hasDot:m,icon:p,label:x,labelIcon:j,onBadgeBlur:C,onClick:h,role:A,...k},q)=>{const I=(0,o.useRef)(null),g=(0,o.useRef)(null),N={"data-active":!!c},$=e.pickCustomAttributes({...k,customAttributes:N}),f=e.pickCustomAttributes(N),v=$["data-testid"]||"badge";(0,o.useImperativeHandle)(q,()=>g.current,[]);const O=(0,o.useCallback)(e=>{C?.(e)},[C]),R=(0,o.useCallback)(e=>{h?.(e)},[h]);return(0,i.jsx)("div",{ref:g,className:`${d?.badge} ${u?.badge}`,"data-testid":`${v}-container`,...f,children:(0,i.jsxs)("button",{ref:I,className:d?.button,"data-testid":v,role:A,type:"button",onBlur:O,onClick:R,...$,children:[(0,i.jsxs)("span",{className:d?.dotcontainer,children:[!!b&&!!m&&(0,i.jsx)("span",{"aria-hidden":!0,className:d?.dot,children:(0,i.jsx)(r.Dot,{...b})}),(0,i.jsx)(n.ElementOrIcon,{className:`${d?.icon} ${u?.icon}`,...s.processIconProp(p),customAttributes:N})]}),!!x&&(0,i.jsxs)("span",{"aria-hidden":!0,className:d?.labelcontainer,children:[(0,i.jsx)(t.Text,{additionalClasses:{text:`${u?.label} ${d?.label}`},component:"span",...s.processTextProp(x),customAttributes:N}),(0,i.jsx)(n.ElementOrIcon,{className:d?.labelicon,rotate:c?"180deg":"0deg",transitionDuration:"0.2s",...s.processIconProp(j),customAttributes:N})]}),(0,i.jsx)(a.ScreenReaderOnly,{ariaLive:"polite",children:l})]})})});exports.BadgeStandAlone=c;
@@ -1 +1 @@
1
- let e=require("react"),t=require("react/jsx-runtime");const a=(0,e.forwardRef)(({allowModifySliceWidth:e,centerMode:a,contentContainer:r,contentContainerRef:i,cssClasses:n,disabled:s,elements:d,rootContainer:o,screenReaderOnly:l,viewerContainer:c,viewerContainerRef:f,...v},u)=>{const w=v["data-testid"]??"carousel";return(0,t.jsxs)("div",{ref:u,"aria-roledescription":"carousel",className:n?.carousel,"data-testid":w,...v,...o,children:[(0,t.jsx)("div",{ref:f,className:n?.viewer,"data-allow-modify-slice-width":e,"data-disabled":s,"data-testid":`${w}-viewer`,...c,children:(0,t.jsx)("div",{ref:i,"aria-live":"polite",className:n?.content,"data-center-mode":a,"data-testid":`${w}-content`,...r,children:d})}),l&&(0,t.jsx)("screen-reader-only",{"aria-live":"off",...l,children:l.content})]})});exports.CarouselStandAlone=a;
1
+ const e=require("../../lib/components/screen-reader-only/screenReaderOnly.js");let r=require("react"),t=require("react/jsx-runtime");const a=(0,r.forwardRef)(({allowModifySliceWidth:r,centerMode:a,contentContainer:n,contentContainerRef:i,cssClasses:s,disabled:d,elements:o,rootContainer:c,screenReaderOnly:l,viewerContainer:f,viewerContainerRef:u,...v},m)=>{const w=v["data-testid"]??"carousel";return(0,t.jsxs)("div",{ref:m,"aria-roledescription":"carousel",className:s?.carousel,"data-testid":w,...v,...c,children:[(0,t.jsx)("div",{ref:u,className:s?.viewer,"data-allow-modify-slice-width":r,"data-disabled":d,"data-testid":`${w}-viewer`,...f,children:(0,t.jsx)("div",{ref:i,"aria-live":"polite",className:s?.content,"data-center-mode":a,"data-testid":`${w}-content`,...n,children:o})}),l&&(0,t.jsx)(e.ScreenReaderOnly,{ariaLive:"off",...l,children:l.content})]})});exports.CarouselStandAlone=a;
@@ -1 +1 @@
1
- const e=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),r=require("../../lib/utils/process/processCommonProp.js"),s=require("../checkboxBase/checkboxBaseControlled.js"),a=require("./components/errorMessage.js"),i=require("./components/label.js"),l=require("./utils/aria.utils.js");let c=require("react"),d=require("react/jsx-runtime");const t=(0,c.forwardRef)(({checkboxBase:t,cssClasses:o,errorMessage:b,id:n,label:u,screenReaderText:x,...h},p)=>{const{"aria-describedby":j,"aria-hidden":m,"aria-label":k,"aria-labelledby":C,...y}=e.pickCustomAttributes(h),q=`checkbox-${(0,c.useId)().replace(/:/g,"")}`,g=n??q,v=`${g}-label`,B=`${g}-error`,A=`${g}-screen-reader`,I=t?.variant,$=l.buildAriaDescribedBy({ariaDescribedBy:h["aria-describedby"],error:h.error&&!!b?.message,errorMessageId:B,screenReader:!!x,screenReaderId:A});return(0,d.jsxs)("div",{ref:p,...y,className:o?.checkbox,children:[(0,d.jsxs)("div",{className:o?.checkboxwithlabelcontainer,children:[!!I&&(0,d.jsx)(s.CheckboxBaseControlled,{...h,"aria-describedby":$,"aria-hidden":h["aria-hidden"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],id:g,variant:I}),(0,d.jsx)("screen-reader-only",{id:A,children:x}),(0,d.jsx)(i.Label,{content:r.processTextProp(u).children,cssClasses:o,id:v,inputId:g})]}),!!h.error&&(0,d.jsx)(a.ErrorMessage,{"aria-live":"assertive",cssClasses:o,"data-testid":`${h["data-testid"]}-error-message`,...b,id:B,inputId:g,show:h.error&&!h.disabled})]})});exports.CheckboxStandAlone=t;
1
+ const e=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),r=require("../../lib/utils/process/processCommonProp.js"),s=require("../../lib/components/screen-reader-only/screenReaderOnly.js"),a=require("../checkboxBase/checkboxBaseControlled.js"),i=require("./components/errorMessage.js"),l=require("./components/label.js"),c=require("./utils/aria.utils.js");let d=require("react"),o=require("react/jsx-runtime");const t=(0,d.forwardRef)(({checkboxBase:t,cssClasses:n,errorMessage:b,id:u,label:x,screenReaderText:h,...p},j)=>{const{"aria-describedby":m,"aria-hidden":k,"aria-label":y,"aria-labelledby":C,...q}=e.pickCustomAttributes(p),g=`checkbox-${(0,d.useId)().replace(/:/g,"")}`,v=u??g,B=`${v}-label`,R=`${v}-error`,A=`${v}-screen-reader`,I=t?.variant,$=c.buildAriaDescribedBy({ariaDescribedBy:p["aria-describedby"],error:p.error&&!!b?.message,errorMessageId:R,screenReader:!!h,screenReaderId:A});return(0,o.jsxs)("div",{ref:j,...q,className:n?.checkbox,children:[(0,o.jsxs)("div",{className:n?.checkboxwithlabelcontainer,children:[!!I&&(0,o.jsx)(a.CheckboxBaseControlled,{...p,"aria-describedby":$,"aria-hidden":p["aria-hidden"],"aria-label":p["aria-label"],"aria-labelledby":p["aria-labelledby"],id:v,variant:I}),(0,o.jsx)(s.ScreenReaderOnly,{id:A,children:h}),(0,o.jsx)(l.Label,{content:r.processTextProp(x).children,cssClasses:n,id:B,inputId:v})]}),!!p.error&&(0,o.jsx)(i.ErrorMessage,{"aria-live":"assertive",cssClasses:n,"data-testid":`${p["data-testid"]}-error-message`,...b,id:R,inputId:v,show:p.error&&!p.disabled})]})});exports.CheckboxStandAlone=t;
@@ -1 +1 @@
1
- const e=require("../../lib/hooks/useClassName/useClassName.js"),s=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),t=require("../../lib/utils/classNames/classNames.js"),a=require("./iconStandAlone.js");let i=require("react"),l=require("react/jsx-runtime");const n=(0,i.forwardRef)(({className:i,color:n,height:r,icon:c,id:o,tabIndex:d,title:u,width:b,...h},m)=>{const{altText:x,disabled:C,onClick:N,screenReaderText:j,...I}=h,k=s.pickCustomAttributes(h),p=!(Object.keys(h).includes("color")&&!n||!n),q=e.useClassName({component:"ICON"});return c?N?(0,l.jsxs)("button",{"aria-disabled":C,"aria-label":h["aria-label"]||x,className:t.classNames(q.button,i),"data-testid":"button",disabled:C,id:o,style:{height:r,width:b},tabIndex:d,title:u||"",type:"button",onClick:N,...k,children:[(0,l.jsx)("screen-reader-only",{children:j}),(0,l.jsx)(a.IconStandAlone,{icon:c,...I,ref:m,"aria-label":void 0,className:i,cssClasses:q,"data-testid":void 0,height:r,id:void 0,linearIcon:p,width:b})]}):(0,l.jsx)(a.IconStandAlone,{icon:c,...I,ref:m,altText:x,className:i,cssClasses:q,"data-testid":"icon",height:r,linearIcon:p,width:b}):null});exports.IconBasic=n;
1
+ const e=require("../../lib/hooks/useClassName/useClassName.js"),s=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),t=require("../../lib/utils/classNames/classNames.js"),a=require("../../lib/components/screen-reader-only/screenReaderOnly.js"),i=require("./iconStandAlone.js");let l=require("react"),n=require("react/jsx-runtime");const r=(0,l.forwardRef)(({className:l,color:r,height:c,icon:o,id:d,tabIndex:u,title:b,width:m,...h},j)=>{const{altText:x,disabled:C,onClick:N,screenReaderText:I,...k}=h,p=s.pickCustomAttributes(h),q=!(Object.keys(h).includes("color")&&!r||!r),y=e.useClassName({component:"ICON"});return o?N?(0,n.jsxs)("button",{"aria-disabled":C,"aria-label":h["aria-label"]||x,className:t.classNames(y.button,l),"data-testid":"button",disabled:C,id:d,style:{height:c,width:m},tabIndex:u,title:b||"",type:"button",onClick:N,...p,children:[(0,n.jsx)(a.ScreenReaderOnly,{children:I}),(0,n.jsx)(i.IconStandAlone,{icon:o,...k,ref:j,"aria-label":void 0,className:l,cssClasses:y,"data-testid":void 0,height:c,id:void 0,linearIcon:q,width:m})]}):(0,n.jsx)(i.IconStandAlone,{icon:o,...k,ref:j,altText:x,className:l,cssClasses:y,"data-testid":"icon",height:c,linearIcon:q,width:m}):null});exports.IconBasic=r;
@@ -1 +1 @@
1
- const e=require("../../lib/components/customComponent/customComponent.js"),t=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),s=require("../../lib/utils/classNames/classNames.js"),a=require("../text/text2.js"),n=require("../../lib/components/elementOrIcon/elementOrIcon.js"),r=require("../../lib/types/states/states.js"),i=require("./helpers/aria.js"),c=require("./helpers/screnReader.js"),l=require("./helpers/stepState.js");let o=require("react"),d=require("react/jsx-runtime");const p=(0,o.forwardRef)(({completedStepIcon:o,cssOrientationClasses:p,cssVariantClasses:m,currentStep:u=0,horizontalOrientationWidth:x,orientation:j,screenReaderCompletedStep:h,screenReaderTextBuilder:b,screenReaderTitle:N,stepMaxTruncatedLines:C,steps:S,...T},q)=>{const A=l.mapToStepState(S,u),y="vertical"===j,$=Boolean(N),k=T["data-testid"]||"stepper-number";return(0,d.jsxs)("div",{ref:q,"aria-hidden":!y,"data-testid":k,children:[N?.content&&(0,d.jsx)(e.CustomComponent,{className:"kbt-sr-only",component:N.component,children:N?.content}),(0,d.jsx)("ol",{className:s.classNames(p?.stepper_number,m?.stepper_number),"data-testid":`${k}-steps-container`,children:A.map((l,N)=>{const S=N===A.length-1,T={"data-state":l.state},q=t.pickCustomAttributes(T);return(0,d.jsxs)("li",{"aria-current":i.buildAriaCurrent(u,N,j),"data-testid":`${k}-li-${N}`,style:{display:y?"flex":"block",width:!y&&S?"auto":x},children:[$&&(0,d.jsx)("screen-reader-only",{children:c.buildScreenReaderText(N,u,A.length,b,l.name,y)}),(0,d.jsxs)("span",{"aria-hidden":!(y&&!$)||void 0,className:s.classNames(p?.stepcontainer,m?.stepcontainer),...q,children:[(0,d.jsxs)("span",{className:m?.stepcirclecontainer,"data-testid":`${k}-step-${N}`,style:{flexDirection:"vertical"===j?"column":"row"},children:[(0,d.jsx)("span",{className:s.classNames(p?.stepcircle,m?.stepcircle),...q,children:l.state===r.STATES.COMPLETED?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.ElementOrIcon,{className:s.classNames(p?.iconselected,m?.iconselected),customAttributes:T,...o}),(0,d.jsx)("screen-reader-only",{children:N+1})]}):(0,d.jsx)(a.Text,{additionalClasses:{text:s.classNames(p?.stepindex,m?.stepindex)},component:"span",customAttributes:T,children:N+1})}),!S&&(0,d.jsx)("span",{className:s.classNames(p?.stepbar,m?.stepbar),...t.pickCustomAttributes({"data-state":A[N+1].state})})]}),y&&(0,d.jsxs)("span",{"aria-hidden":!!$||void 0,className:s.classNames(p?.stepnamecontainer,m?.stepnamecontainer),"data-islast":S,"data-testid":`${k}-step-description-${N}`,...q,children:[(0,d.jsx)(a.Text,{additionalClasses:{text:s.classNames(p?.stepname,m?.stepname)},component:"span",customAttributes:T,maxTruncatedLines:C,children:l.name}),!$&&l.state===r.STATES.COMPLETED&&h?.content&&(0,d.jsxs)(e.CustomComponent,{className:"kbt-sr-only",component:h.component,"data-testid":h["data-testid"],children:[" ",h.content]})]})]})]},`stepContainer-${N.toString()}`)})})]})});exports.StepperNumberStandAlone=p;
1
+ const e=require("../../lib/components/customComponent/customComponent.js"),t=require("../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),s=require("../../lib/utils/classNames/classNames.js"),a=require("../text/text2.js"),n=require("../../lib/components/screen-reader-only/screenReaderOnly.js"),r=require("../../lib/components/elementOrIcon/elementOrIcon.js"),i=require("../../lib/types/states/states.js"),c=require("./helpers/aria.js"),l=require("./helpers/screnReader.js"),o=require("./helpers/stepState.js");let d=require("react"),p=require("react/jsx-runtime");const m=(0,d.forwardRef)(({completedStepIcon:d,cssOrientationClasses:m,cssVariantClasses:u,currentStep:x=0,horizontalOrientationWidth:j,orientation:h,screenReaderCompletedStep:b,screenReaderTextBuilder:N,screenReaderTitle:C,stepMaxTruncatedLines:S,steps:T,...q},A)=>{const y=o.mapToStepState(T,x),O="vertical"===h,R=Boolean(C),$=q["data-testid"]||"stepper-number";return(0,p.jsxs)("div",{ref:A,"aria-hidden":!O,"data-testid":$,children:[C?.content&&(0,p.jsx)(e.CustomComponent,{className:"kbt-sr-only",component:C.component,children:C?.content}),(0,p.jsx)("ol",{className:s.classNames(m?.stepper_number,u?.stepper_number),"data-testid":`${$}-steps-container`,children:y.map((o,C)=>{const T=C===y.length-1,q={"data-state":o.state},A=t.pickCustomAttributes(q);return(0,p.jsxs)("li",{"aria-current":c.buildAriaCurrent(x,C,h),"data-testid":`${$}-li-${C}`,style:{display:O?"flex":"block",width:!O&&T?"auto":j},children:[R&&(0,p.jsx)(n.ScreenReaderOnly,{children:l.buildScreenReaderText(C,x,y.length,N,o.name,O)}),(0,p.jsxs)("span",{"aria-hidden":!(O&&!R)||void 0,className:s.classNames(m?.stepcontainer,u?.stepcontainer),...A,children:[(0,p.jsxs)("span",{className:u?.stepcirclecontainer,"data-testid":`${$}-step-${C}`,style:{flexDirection:"vertical"===h?"column":"row"},children:[(0,p.jsx)("span",{className:s.classNames(m?.stepcircle,u?.stepcircle),...A,children:o.state===i.STATES.COMPLETED?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r.ElementOrIcon,{className:s.classNames(m?.iconselected,u?.iconselected),customAttributes:q,...d}),(0,p.jsx)(n.ScreenReaderOnly,{children:C+1})]}):(0,p.jsx)(a.Text,{additionalClasses:{text:s.classNames(m?.stepindex,u?.stepindex)},component:"span",customAttributes:q,children:C+1})}),!T&&(0,p.jsx)("span",{className:s.classNames(m?.stepbar,u?.stepbar),...t.pickCustomAttributes({"data-state":y[C+1].state})})]}),O&&(0,p.jsxs)("span",{"aria-hidden":!!R||void 0,className:s.classNames(m?.stepnamecontainer,u?.stepnamecontainer),"data-islast":T,"data-testid":`${$}-step-description-${C}`,...A,children:[(0,p.jsx)(a.Text,{additionalClasses:{text:s.classNames(m?.stepname,u?.stepname)},component:"span",customAttributes:q,maxTruncatedLines:S,children:o.name}),!R&&o.state===i.STATES.COMPLETED&&b?.content&&(0,p.jsxs)(e.CustomComponent,{className:"kbt-sr-only",component:b.component,"data-testid":b["data-testid"],children:[" ",b.content]})]})]})]},`stepContainer-${C.toString()}`)})})]})});exports.StepperNumberStandAlone=m;
@@ -1 +1 @@
1
- const t=require("../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),e=require("../../../text/text2.js");let r=require("react"),i=require("react/jsx-runtime");const s=(0,r.forwardRef)(({cssClasses:r,currentCharacters:s,id:a,leftColor:n,leftWeight:o,marginTop:l,maxLength:c,rightColor:d,rightWeight:x,screenReaderText:u,textVariant:h,...p},g)=>{const m=t.pickCustomAttributes(p);return(0,i.jsxs)("div",{ref:g,"aria-live":(()=>{if(0===s||s>=c)return"polite"})(),className:r?.text_count,"data-testid":"text-count",style:{marginTop:l},...m,children:[(0,i.jsx)("screen-reader-only",{children:u},s),(0,i.jsx)(e.Text,{additionalClasses:{text:r?.letftext},"aria-hidden":!0,color:n,component:"span",variant:h,weight:o,children:s}),(0,i.jsx)(e.Text,{additionalClasses:{text:r?.righttext},"aria-hidden":!0,color:d,component:"span",variant:h,weight:x,children:` / ${c}`})]})});exports.TextCountStandAlone=s;
1
+ const e=require("../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js"),t=require("../../../text/text2.js"),r=require("../../../../lib/components/screen-reader-only/screenReaderOnly.js");let i=require("react"),s=require("react/jsx-runtime");const n=(0,i.forwardRef)(({cssClasses:i,currentCharacters:n,id:a,leftColor:o,leftWeight:l,marginTop:c,maxLength:d,rightColor:x,rightWeight:u,screenReaderText:h,textVariant:p,...m},g)=>{const C=e.pickCustomAttributes(m);return(0,s.jsxs)("div",{ref:g,"aria-live":(()=>{if(0===n||n>=d)return"polite"})(),className:i?.text_count,"data-testid":"text-count",style:{marginTop:c},...C,children:[(0,s.jsx)(r.ScreenReaderOnly,{children:h},n),(0,s.jsx)(t.Text,{additionalClasses:{text:i?.letftext},"aria-hidden":!0,color:o,component:"span",variant:p,weight:l,children:n}),(0,s.jsx)(t.Text,{additionalClasses:{text:i?.righttext},"aria-hidden":!0,color:x,component:"span",variant:p,weight:u,children:` / ${d}`})]})});exports.TextCountStandAlone=n;
@@ -0,0 +1 @@
1
+ const e=require("./screenReaderOnlyStandAlone.js");let r=require("react"),n=require("react/jsx-runtime");const a=(0,r.forwardRef)((r,a)=>(0,n.jsx)(e.ScreenReaderOnlyStandAlone,{ref:a,...r}));a.displayName="ScreenReaderOnly",exports.ScreenReaderOnly=a;
@@ -0,0 +1 @@
1
+ const e=require("../../utils/pickCustomAttributes/pickCustomAttributes.js"),r=require("../../utils/classNames/classNames.js");let s=require("react"),a=require("react/jsx-runtime");const i=(0,s.forwardRef)(({ariaAtomic:s,ariaLive:i,children:t,className:c,id:l,role:n,...o},d)=>{const u=e.pickCustomAttributes(o),m=r.classNames("kbt-screen-reader-only",c),p={};return void 0!==i&&(p["aria-live"]=i),void 0!==s&&(p["aria-atomic"]=s),void 0!==n&&(p.role=n),(0,a.jsx)("span",{ref:d,className:m,id:l,...p,...u,children:t})});i.displayName="ScreenReaderOnlyStandAlone",exports.ScreenReaderOnlyStandAlone=i;
@@ -1 +1 @@
1
- let e=require("react");exports.useSwipeDown=({handleClose:t})=>{const n=(0,e.useRef)(null),r=(0,e.useRef)(null),u=(0,e.useRef)(!1),s=(0,e.useRef)(""),o=(0,e.useRef)(0),c=(0,e.useRef)(null);return{setPopoverRef:(0,e.useCallback)(e=>{n.current=e},[]),setDragIconRef:(0,e.useCallback)(e=>{if(c.current&&(c.current(),c.current=null),r.current=e,e){const r=e=>"touches"in e?(e.touches[0]||e.changedTouches[0])?.clientY||0:e.clientY,v=e=>{!u.current&&n.current&&(e.preventDefault(),u.current=!0,o.current=r(e),s.current=window.getComputedStyle(n.current).bottom,document.addEventListener("mousemove",d,{passive:!1}),document.addEventListener("mouseup",m,{passive:!1}),document.addEventListener("touchmove",d,{passive:!1}),document.addEventListener("touchend",m,{passive:!1}))},d=e=>{if(!u.current||!n.current)return;e.preventDefault();const t=r(e)-o.current;t>0&&(n.current.style.bottom=`-${t}px`)},m=e=>{u.current&&n.current&&(u.current=!1,r(e)-o.current>30?t?.():n.current.style.bottom=s.current)};e.addEventListener("mousedown",v,{passive:!1}),e.addEventListener("touchstart",v,{passive:!1}),c.current=()=>{e.removeEventListener("mousedown",v),e.removeEventListener("touchstart",v),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",m),document.removeEventListener("touchmove",d),document.removeEventListener("touchend",m),u.current=!1}}},[t])}};
1
+ let e=require("react");exports.useSwipeDown=({handleClose:t})=>{const n=(0,e.useRef)(null),r=(0,e.useRef)(null),u=(0,e.useRef)(!1),s=(0,e.useRef)(""),o=(0,e.useRef)(0),c=(0,e.useRef)(null),v=(0,e.useCallback)(e=>{n.current=e},[]);return{setDragIconRef:(0,e.useCallback)(e=>{if(c.current&&(c.current(),c.current=null),r.current=e,e){const r=e=>"touches"in e?(e.touches[0]||e.changedTouches[0])?.clientY||0:e.clientY,v=e=>{u.current&&n.current&&(u.current=!1,r(e)-o.current>30?t?.():n.current.style.bottom=s.current)},d=e=>{if(!u.current||!n.current)return;e.preventDefault();const t=r(e)-o.current;t>0&&(n.current.style.bottom=`-${t}px`)},m=e=>{!u.current&&n.current&&(e.preventDefault(),u.current=!0,o.current=r(e),s.current=window.getComputedStyle(n.current).bottom,document.addEventListener("mousemove",d,{passive:!1}),document.addEventListener("mouseup",v,{passive:!1}),document.addEventListener("touchmove",d,{passive:!1}),document.addEventListener("touchend",v,{passive:!1}))};e.addEventListener("mousedown",m,{passive:!1}),e.addEventListener("touchstart",m,{passive:!1}),c.current=()=>{e.removeEventListener("mousedown",m),e.removeEventListener("touchstart",m),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",v),document.removeEventListener("touchmove",d),document.removeEventListener("touchend",v),u.current=!1}}},[t]),setPopoverRef:v}};
@@ -1,4 +1,4 @@
1
- import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{Text as e}from"../text/text2.js";import{processIconProp as s,processTextProp as o}from"../../lib/utils/process/processCommonProp.js";import{Dot as a}from"../dot/dot.js";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{forwardRef as i,useCallback as n,useImperativeHandle as l,useRef as c}from"react";import{jsx as m,jsxs as d}from"react/jsx-runtime";const u=i(({active:i,ariaLiveText:u,cssSizeClasses:b,cssVariantClasses:p,dot:f,hasDot:h,icon:C,label:N,labelIcon:$,onBadgeBlur:g,onClick:j,role:x,...A},v)=>{const k=c(null),B=c(null),I={"data-active":!!i},y=t({...A,customAttributes:I}),D=t(I),O=y["data-testid"]||"badge";l(v,()=>B.current,[]);const z=n(t=>{g?.(t)},[g]),L=n(t=>{j?.(t)},[j]);/* @__PURE__ */
2
- return m("div",{ref:B,className:`${p?.badge} ${b?.badge}`,"data-testid":`${O}-container`,...D,children:/* @__PURE__ */d("button",{ref:k,className:p?.button,"data-testid":O,role:x,type:"button",onBlur:z,onClick:L,...y,children:[
3
- /* @__PURE__ */d("span",{className:p?.dotcontainer,children:[!!f&&!!h&&/* @__PURE__ */m("span",{"aria-hidden":!0,className:p?.dot,children:/* @__PURE__ */m(a,{...f})}),/* @__PURE__ */m(r,{className:`${p?.icon} ${b?.icon}`,...s(C),customAttributes:I})]}),!!N&&/* @__PURE__ */d("span",{"aria-hidden":!0,className:p?.labelcontainer,children:[/* @__PURE__ */m(e,{additionalClasses:{text:`${b?.label} ${p?.label}`},component:"span",...o(N),customAttributes:I}),/* @__PURE__ */m(r,{className:p?.labelicon,rotate:i?"180deg":"0deg",transitionDuration:"0.2s",...s($),customAttributes:I})]}),
4
- /* @__PURE__ */m("screen-reader-only",{"aria-live":"polite",children:u})]})})});export{u as BadgeStandAlone};
1
+ import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{Text as e}from"../text/text2.js";import{processIconProp as s,processTextProp as o}from"../../lib/utils/process/processCommonProp.js";import{Dot as a}from"../dot/dot.js";import{ScreenReaderOnly as r}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{forwardRef as n,useCallback as l,useImperativeHandle as c,useRef as m}from"react";import{jsx as d,jsxs as u}from"react/jsx-runtime";const p=n(({active:n,ariaLiveText:p,cssSizeClasses:b,cssVariantClasses:f,dot:h,hasDot:C,icon:j,label:N,labelIcon:$,onBadgeBlur:g,onClick:x,role:A,...v},k)=>{const y=m(null),B=m(null),I={"data-active":!!n},O=t({...v,customAttributes:I}),D=t(I),L=O["data-testid"]||"badge";c(k,()=>B.current,[]);const z=l(t=>{g?.(t)},[g]),P=l(t=>{x?.(t)},[x]);/* @__PURE__ */
2
+ return d("div",{ref:B,className:`${f?.badge} ${b?.badge}`,"data-testid":`${L}-container`,...D,children:/* @__PURE__ */u("button",{ref:y,className:f?.button,"data-testid":L,role:A,type:"button",onBlur:z,onClick:P,...O,children:[
3
+ /* @__PURE__ */u("span",{className:f?.dotcontainer,children:[!!h&&!!C&&/* @__PURE__ */d("span",{"aria-hidden":!0,className:f?.dot,children:/* @__PURE__ */d(a,{...h})}),/* @__PURE__ */d(i,{className:`${f?.icon} ${b?.icon}`,...s(j),customAttributes:I})]}),!!N&&/* @__PURE__ */u("span",{"aria-hidden":!0,className:f?.labelcontainer,children:[/* @__PURE__ */d(e,{additionalClasses:{text:`${b?.label} ${f?.label}`},component:"span",...o(N),customAttributes:I}),/* @__PURE__ */d(i,{className:f?.labelicon,rotate:n?"180deg":"0deg",transitionDuration:"0.2s",...s($),customAttributes:I})]}),
4
+ /* @__PURE__ */d(r,{ariaLive:"polite",children:p})]})})});export{p as BadgeStandAlone};
@@ -1,2 +1,2 @@
1
- import{forwardRef as e}from"react";import{jsx as t,jsxs as a}from"react/jsx-runtime";const r=e(({allowModifySliceWidth:e,centerMode:r,contentContainer:i,contentContainerRef:n,cssClasses:o,disabled:d,elements:s,rootContainer:c,screenReaderOnly:l,viewerContainer:f,viewerContainerRef:m,...v},w)=>{const h=v["data-testid"]??"carousel";/* @__PURE__ */
2
- return a("div",{ref:w,"aria-roledescription":"carousel",className:o?.carousel,"data-testid":h,...v,...c,children:[/* @__PURE__ */t("div",{ref:m,className:o?.viewer,"data-allow-modify-slice-width":e,"data-disabled":d,"data-testid":`${h}-viewer`,...f,children:/* @__PURE__ */t("div",{ref:n,"aria-live":"polite",className:o?.content,"data-center-mode":r,"data-testid":`${h}-content`,...i,children:s})}),l&&/* @__PURE__ */t("screen-reader-only",{"aria-live":"off",...l,children:l.content})]})});export{r as CarouselStandAlone};
1
+ import{ScreenReaderOnly as e}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{forwardRef as t}from"react";import{jsx as r,jsxs as a}from"react/jsx-runtime";const i=t(({allowModifySliceWidth:t,centerMode:i,contentContainer:n,contentContainerRef:o,cssClasses:d,disabled:s,elements:c,rootContainer:l,screenReaderOnly:m,viewerContainer:f,viewerContainerRef:v,...p},w)=>{const h=p["data-testid"]??"carousel";/* @__PURE__ */
2
+ return a("div",{ref:w,"aria-roledescription":"carousel",className:d?.carousel,"data-testid":h,...p,...l,children:[/* @__PURE__ */r("div",{ref:v,className:d?.viewer,"data-allow-modify-slice-width":t,"data-disabled":s,"data-testid":`${h}-viewer`,...f,children:/* @__PURE__ */r("div",{ref:o,"aria-live":"polite",className:d?.content,"data-center-mode":i,"data-testid":`${h}-content`,...n,children:c})}),m&&/* @__PURE__ */r(e,{ariaLive:"off",...m,children:m.content})]})});export{i as CarouselStandAlone};
@@ -1,4 +1,4 @@
1
- import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processTextProp as r}from"../../lib/utils/process/processCommonProp.js";import{CheckboxBaseControlled as a}from"../checkboxBase/checkboxBaseControlled.js";import{ErrorMessage as s}from"./components/errorMessage.js";import{Label as i}from"./components/label.js";import{buildAriaDescribedBy as o}from"./utils/aria.utils.js";import{forwardRef as t,useId as l}from"react";import{jsx as c,jsxs as d}from"react/jsx-runtime";const b=t(({checkboxBase:t,cssClasses:b,errorMessage:n,id:m,label:p,screenReaderText:h,...u},f)=>{const{"aria-describedby":x,"aria-hidden":k,"aria-label":y,"aria-labelledby":j,...C}=e(u),g=`checkbox-${l().replace(/:/g,"")}`,v=m??g,$=`${v}-label`,B=`${v}-error`,I=`${v}-screen-reader`,M=t?.variant,R=o({ariaDescribedBy:u["aria-describedby"],error:u.error&&!!n?.message,errorMessageId:B,screenReader:!!h,screenReaderId:I});/* @__PURE__ */
2
- return d("div",{ref:f,...C,className:b?.checkbox,children:[/* @__PURE__ */d("div",{className:b?.checkboxwithlabelcontainer,children:[!!M&&/* @__PURE__ */c(a,{...u,"aria-describedby":R,"aria-hidden":u["aria-hidden"],"aria-label":u["aria-label"],"aria-labelledby":u["aria-labelledby"],id:v,variant:M}),
3
- /* @__PURE__ */c("screen-reader-only",{id:I,children:h}),
4
- /* @__PURE__ */c(i,{content:r(p).children,cssClasses:b,id:$,inputId:v})]}),!!u.error&&/* @__PURE__ */c(s,{"aria-live":"assertive",cssClasses:b,"data-testid":`${u["data-testid"]}-error-message`,...n,id:B,inputId:v,show:u.error&&!u.disabled})]})});export{b as CheckboxStandAlone};
1
+ import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processTextProp as r}from"../../lib/utils/process/processCommonProp.js";import{ScreenReaderOnly as a}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{CheckboxBaseControlled as s}from"../checkboxBase/checkboxBaseControlled.js";import{ErrorMessage as i}from"./components/errorMessage.js";import{Label as o}from"./components/label.js";import{buildAriaDescribedBy as t}from"./utils/aria.utils.js";import{forwardRef as l,useId as c}from"react";import{jsx as d,jsxs as n}from"react/jsx-runtime";const b=l(({checkboxBase:l,cssClasses:b,errorMessage:m,id:p,label:h,screenReaderText:u,...f},x)=>{const{"aria-describedby":y,"aria-hidden":j,"aria-label":k,"aria-labelledby":C,...g}=e(f),v=`checkbox-${c().replace(/:/g,"")}`,$=p??v,B=`${$}-label`,I=`${$}-error`,R=`${$}-screen-reader`,M=l?.variant,w=t({ariaDescribedBy:f["aria-describedby"],error:f.error&&!!m?.message,errorMessageId:I,screenReader:!!u,screenReaderId:R});/* @__PURE__ */
2
+ return n("div",{ref:x,...g,className:b?.checkbox,children:[/* @__PURE__ */n("div",{className:b?.checkboxwithlabelcontainer,children:[!!M&&/* @__PURE__ */d(s,{...f,"aria-describedby":w,"aria-hidden":f["aria-hidden"],"aria-label":f["aria-label"],"aria-labelledby":f["aria-labelledby"],id:$,variant:M}),
3
+ /* @__PURE__ */d(a,{id:R,children:u}),
4
+ /* @__PURE__ */d(o,{content:r(h).children,cssClasses:b,id:B,inputId:$})]}),!!f.error&&/* @__PURE__ */d(i,{"aria-live":"assertive",cssClasses:b,"data-testid":`${f["data-testid"]}-error-message`,...m,id:I,inputId:$,show:f.error&&!f.disabled})]})});export{b as CheckboxStandAlone};
@@ -1 +1 @@
1
- import{useClassName as t}from"../../lib/hooks/useClassName/useClassName.js";import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{classNames as s}from"../../lib/utils/classNames/classNames.js";import{IconStandAlone as i}from"./iconStandAlone.js";import{forwardRef as a}from"react";import{jsx as o,jsxs as l}from"react/jsx-runtime";const r=a(({className:a,color:r,height:c,icon:n,id:d,tabIndex:m,title:b,width:u,...h},p)=>{const{altText:C,disabled:N,onClick:f,screenReaderText:x,...j}=h,k=e(h),I=!(Object.keys(h).includes("color")&&!r||!r),g=t({component:"ICON"});return n?f?/* @__PURE__ */l("button",{"aria-disabled":N,"aria-label":h["aria-label"]||C,className:s(g.button,a),"data-testid":"button",disabled:N,id:d,style:{height:c,width:u},tabIndex:m,title:b||"",type:"button",onClick:f,...k,children:[/* @__PURE__ */o("screen-reader-only",{children:x}),/* @__PURE__ */o(i,{icon:n,...j,ref:p,"aria-label":void 0,className:a,cssClasses:g,"data-testid":void 0,height:c,id:void 0,linearIcon:I,width:u})]}):/* @__PURE__ */o(i,{icon:n,...j,ref:p,altText:C,className:a,cssClasses:g,"data-testid":"icon",height:c,linearIcon:I,width:u}):null});export{r as IconBasic};
1
+ import{useClassName as t}from"../../lib/hooks/useClassName/useClassName.js";import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{classNames as s}from"../../lib/utils/classNames/classNames.js";import{ScreenReaderOnly as i}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{IconStandAlone as a}from"./iconStandAlone.js";import{forwardRef as o}from"react";import{jsx as l,jsxs as r}from"react/jsx-runtime";const n=o(({className:o,color:n,height:c,icon:d,id:m,tabIndex:b,title:u,width:h,...p},f)=>{const{altText:C,disabled:N,onClick:j,screenReaderText:x,...k}=p,y=e(p),I=!(Object.keys(p).includes("color")&&!n||!n),g=t({component:"ICON"});return d?j?/* @__PURE__ */r("button",{"aria-disabled":N,"aria-label":p["aria-label"]||C,className:s(g.button,o),"data-testid":"button",disabled:N,id:m,style:{height:c,width:h},tabIndex:b,title:u||"",type:"button",onClick:j,...y,children:[/* @__PURE__ */l(i,{children:x}),/* @__PURE__ */l(a,{icon:d,...k,ref:f,"aria-label":void 0,className:o,cssClasses:g,"data-testid":void 0,height:c,id:void 0,linearIcon:I,width:h})]}):/* @__PURE__ */l(a,{icon:d,...k,ref:f,altText:C,className:o,cssClasses:g,"data-testid":"icon",height:c,linearIcon:I,width:h}):null});export{n as IconBasic};
@@ -1,3 +1,3 @@
1
- import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{classNames as s}from"../../lib/utils/classNames/classNames.js";import{Text as n}from"../text/text2.js";import{ElementOrIcon as a}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as r}from"../../lib/types/states/states.js";import{buildAriaCurrent as i}from"./helpers/aria.js";import{buildScreenReaderText as o}from"./helpers/screnReader.js";import{mapToStepState as c}from"./helpers/stepState.js";import{forwardRef as l}from"react";import{Fragment as p,jsx as m,jsxs as d}from"react/jsx-runtime";const u=l(({completedStepIcon:l,cssOrientationClasses:u,cssVariantClasses:h,currentStep:b=0,horizontalOrientationWidth:f,orientation:x,screenReaderCompletedStep:C,screenReaderTextBuilder:N,screenReaderTitle:j,stepMaxTruncatedLines:y,steps:$,...O},T)=>{const k=c($,b),v="vertical"===x,A=Boolean(j),S=O["data-testid"]||"stepper-number";/* @__PURE__ */
2
- return d("div",{ref:T,"aria-hidden":!v,"data-testid":S,children:[j?.content&&/* @__PURE__ */m(e,{className:"kbt-sr-only",component:j.component,children:j?.content}),/* @__PURE__ */m("ol",{className:s(u?.stepper_number,h?.stepper_number),"data-testid":`${S}-steps-container`,children:k.map((c,j)=>{const $=j===k.length-1,O={"data-state":c.state},T=t(O);/* @__PURE__ */
3
- return d("li",{"aria-current":i(b,j,x),"data-testid":`${S}-li-${j}`,style:{display:v?"flex":"block",width:!v&&$?"auto":f},children:[A&&/* @__PURE__ */m("screen-reader-only",{children:o(j,b,k.length,N,c.name,v)}),/* @__PURE__ */d("span",{"aria-hidden":!(v&&!A)||void 0,className:s(u?.stepcontainer,h?.stepcontainer),...T,children:[/* @__PURE__ */d("span",{className:h?.stepcirclecontainer,"data-testid":`${S}-step-${j}`,style:{flexDirection:"vertical"===x?"column":"row"},children:[/* @__PURE__ */m("span",{className:s(u?.stepcircle,h?.stepcircle),...T,children:c.state===r.COMPLETED?/* @__PURE__ */d(p,{children:[/* @__PURE__ */m(a,{className:s(u?.iconselected,h?.iconselected),customAttributes:O,...l}),/* @__PURE__ */m("screen-reader-only",{children:j+1})]}):/* @__PURE__ */m(n,{additionalClasses:{text:s(u?.stepindex,h?.stepindex)},component:"span",customAttributes:O,children:j+1})}),!$&&/* @__PURE__ */m("span",{className:s(u?.stepbar,h?.stepbar),...t({"data-state":k[j+1].state})})]}),v&&/* @__PURE__ */d("span",{"aria-hidden":!!A||void 0,className:s(u?.stepnamecontainer,h?.stepnamecontainer),"data-islast":$,"data-testid":`${S}-step-description-${j}`,...T,children:[/* @__PURE__ */m(n,{additionalClasses:{text:s(u?.stepname,h?.stepname)},component:"span",customAttributes:O,maxTruncatedLines:y,children:c.name}),!A&&c.state===r.COMPLETED&&C?.content&&/* @__PURE__ */d(e,{className:"kbt-sr-only",component:C.component,"data-testid":C["data-testid"],children:[" ",C.content]})]})]})]},`stepContainer-${j.toString()}`)})})]})});export{u as StepperNumberStandAlone};
1
+ import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{pickCustomAttributes as t}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{classNames as s}from"../../lib/utils/classNames/classNames.js";import{Text as n}from"../text/text2.js";import{ScreenReaderOnly as a}from"../../lib/components/screen-reader-only/screenReaderOnly.js";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as i}from"../../lib/types/states/states.js";import{buildAriaCurrent as o}from"./helpers/aria.js";import{buildScreenReaderText as c}from"./helpers/screnReader.js";import{mapToStepState as l}from"./helpers/stepState.js";import{forwardRef as m}from"react";import{Fragment as p,jsx as d,jsxs as u}from"react/jsx-runtime";const h=m(({completedStepIcon:m,cssOrientationClasses:h,cssVariantClasses:b,currentStep:f=0,horizontalOrientationWidth:x,orientation:C,screenReaderCompletedStep:j,screenReaderTextBuilder:N,screenReaderTitle:y,stepMaxTruncatedLines:$,steps:O,...T},k)=>{const v=l(O,f),A="vertical"===C,R=Boolean(y),S=T["data-testid"]||"stepper-number";/* @__PURE__ */
2
+ return u("div",{ref:k,"aria-hidden":!A,"data-testid":S,children:[y?.content&&/* @__PURE__ */d(e,{className:"kbt-sr-only",component:y.component,children:y?.content}),/* @__PURE__ */d("ol",{className:s(h?.stepper_number,b?.stepper_number),"data-testid":`${S}-steps-container`,children:v.map((l,y)=>{const O=y===v.length-1,T={"data-state":l.state},k=t(T);/* @__PURE__ */
3
+ return u("li",{"aria-current":o(f,y,C),"data-testid":`${S}-li-${y}`,style:{display:A?"flex":"block",width:!A&&O?"auto":x},children:[R&&/* @__PURE__ */d(a,{children:c(y,f,v.length,N,l.name,A)}),/* @__PURE__ */u("span",{"aria-hidden":!(A&&!R)||void 0,className:s(h?.stepcontainer,b?.stepcontainer),...k,children:[/* @__PURE__ */u("span",{className:b?.stepcirclecontainer,"data-testid":`${S}-step-${y}`,style:{flexDirection:"vertical"===C?"column":"row"},children:[/* @__PURE__ */d("span",{className:s(h?.stepcircle,b?.stepcircle),...k,children:l.state===i.COMPLETED?/* @__PURE__ */u(p,{children:[/* @__PURE__ */d(r,{className:s(h?.iconselected,b?.iconselected),customAttributes:T,...m}),/* @__PURE__ */d(a,{children:y+1})]}):/* @__PURE__ */d(n,{additionalClasses:{text:s(h?.stepindex,b?.stepindex)},component:"span",customAttributes:T,children:y+1})}),!O&&/* @__PURE__ */d("span",{className:s(h?.stepbar,b?.stepbar),...t({"data-state":v[y+1].state})})]}),A&&/* @__PURE__ */u("span",{"aria-hidden":!!R||void 0,className:s(h?.stepnamecontainer,b?.stepnamecontainer),"data-islast":O,"data-testid":`${S}-step-description-${y}`,...k,children:[/* @__PURE__ */d(n,{additionalClasses:{text:s(h?.stepname,b?.stepname)},component:"span",customAttributes:T,maxTruncatedLines:$,children:l.name}),!R&&l.state===i.COMPLETED&&j?.content&&/* @__PURE__ */u(e,{className:"kbt-sr-only",component:j.component,"data-testid":j["data-testid"],children:[" ",j.content]})]})]})]},`stepContainer-${y.toString()}`)})})]})});export{h as StepperNumberStandAlone};
@@ -1,5 +1,5 @@
1
- import{pickCustomAttributes as t}from"../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{Text as e}from"../../../text/text2.js";import{forwardRef as r}from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=r(({cssClasses:r,currentCharacters:o,id:n,leftColor:s,leftWeight:l,marginTop:c,maxLength:d,rightColor:m,rightWeight:h,screenReaderText:p,textVariant:x,...u},g)=>{const f=t(u);/* @__PURE__ */
2
- return a("div",{ref:g,"aria-live":(()=>{if(0===o||o>=d)return"polite"})(),className:r?.text_count,"data-testid":"text-count",style:{marginTop:c},...f,children:[
3
- /* @__PURE__ */i("screen-reader-only",{children:p},o),
4
- /* @__PURE__ */i(e,{additionalClasses:{text:r?.letftext},"aria-hidden":!0,color:s,component:"span",variant:x,weight:l,children:o}),
5
- /* @__PURE__ */i(e,{additionalClasses:{text:r?.righttext},"aria-hidden":!0,color:m,component:"span",variant:x,weight:h,children:` / ${d}`})]})});export{o as TextCountStandAlone};
1
+ import{pickCustomAttributes as t}from"../../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{Text as e}from"../../../text/text2.js";import{ScreenReaderOnly as r}from"../../../../lib/components/screen-reader-only/screenReaderOnly.js";import{forwardRef as i}from"react";import{jsx as o,jsxs as a}from"react/jsx-runtime";const n=i(({cssClasses:i,currentCharacters:n,id:s,leftColor:l,leftWeight:c,marginTop:m,maxLength:d,rightColor:p,rightWeight:h,screenReaderText:x,textVariant:u,...f},g)=>{const C=t(f);/* @__PURE__ */
2
+ return a("div",{ref:g,"aria-live":(()=>{if(0===n||n>=d)return"polite"})(),className:i?.text_count,"data-testid":"text-count",style:{marginTop:m},...C,children:[
3
+ /* @__PURE__ */o(r,{children:x},n),
4
+ /* @__PURE__ */o(e,{additionalClasses:{text:i?.letftext},"aria-hidden":!0,color:l,component:"span",variant:u,weight:c,children:n}),
5
+ /* @__PURE__ */o(e,{additionalClasses:{text:i?.righttext},"aria-hidden":!0,color:p,component:"span",variant:u,weight:h,children:` / ${d}`})]})});export{n as TextCountStandAlone};
@@ -0,0 +1 @@
1
+ import{ScreenReaderOnlyStandAlone as e}from"./screenReaderOnlyStandAlone.js";import{forwardRef as r}from"react";import{jsx as o}from"react/jsx-runtime";const t=r((r,t)=>/* @__PURE__ */o(e,{ref:t,...r}));t.displayName="ScreenReaderOnly";export{t as ScreenReaderOnly};
@@ -0,0 +1 @@
1
+ import{pickCustomAttributes as r}from"../../utils/pickCustomAttributes/pickCustomAttributes.js";import{classNames as e}from"../../utils/classNames/classNames.js";import{forwardRef as i}from"react";import{jsx as a}from"react/jsx-runtime";const t=i(({ariaAtomic:i,ariaLive:t,children:s,className:o,id:m,role:c,...l},n)=>{const d=r(l),p=e("kbt-screen-reader-only",o),u={};return void 0!==t&&(u["aria-live"]=t),void 0!==i&&(u["aria-atomic"]=i),void 0!==c&&(u.role=c),/* @__PURE__ */a("span",{ref:n,className:p,id:m,...u,...d,children:s})});t.displayName="ScreenReaderOnlyStandAlone";export{t as ScreenReaderOnlyStandAlone};
@@ -1 +1 @@
1
- import{useCallback as e,useRef as t}from"react";const n=({handleClose:n})=>{const r=t(null),u=t(null),o=t(!1),c=t(""),s=t(0),v=t(null);return{setPopoverRef:e(e=>{r.current=e},[]),setDragIconRef:e(e=>{if(v.current&&(v.current(),v.current=null),u.current=e,e){const t=e=>"touches"in e?(e.touches[0]||e.changedTouches[0])?.clientY||0:e.clientY,u=e=>{!o.current&&r.current&&(e.preventDefault(),o.current=!0,s.current=t(e),c.current=window.getComputedStyle(r.current).bottom,document.addEventListener("mousemove",m,{passive:!1}),document.addEventListener("mouseup",d,{passive:!1}),document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",d,{passive:!1}))},m=e=>{if(!o.current||!r.current)return;e.preventDefault();const n=t(e)-s.current;n>0&&(r.current.style.bottom=`-${n}px`)},d=e=>{o.current&&r.current&&(o.current=!1,t(e)-s.current>30?n?.():r.current.style.bottom=c.current)};e.addEventListener("mousedown",u,{passive:!1}),e.addEventListener("touchstart",u,{passive:!1}),v.current=()=>{e.removeEventListener("mousedown",u),e.removeEventListener("touchstart",u),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",d),o.current=!1}}},[n])}};export{n as useSwipeDown};
1
+ import{useCallback as e,useRef as t}from"react";const n=({handleClose:n})=>{const r=t(null),u=t(null),o=t(!1),c=t(""),s=t(0),v=t(null),m=e(e=>{r.current=e},[]);return{setDragIconRef:e(e=>{if(v.current&&(v.current(),v.current=null),u.current=e,e){const t=e=>"touches"in e?(e.touches[0]||e.changedTouches[0])?.clientY||0:e.clientY,u=e=>{o.current&&r.current&&(o.current=!1,t(e)-s.current>30?n?.():r.current.style.bottom=c.current)},m=e=>{if(!o.current||!r.current)return;e.preventDefault();const n=t(e)-s.current;n>0&&(r.current.style.bottom=`-${n}px`)},d=e=>{!o.current&&r.current&&(e.preventDefault(),o.current=!0,s.current=t(e),c.current=window.getComputedStyle(r.current).bottom,document.addEventListener("mousemove",m,{passive:!1}),document.addEventListener("mouseup",u,{passive:!1}),document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",u,{passive:!1}))};e.addEventListener("mousedown",d,{passive:!1}),e.addEventListener("touchstart",d,{passive:!1}),v.current=()=>{e.removeEventListener("mousedown",d),e.removeEventListener("touchstart",d),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",u),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",u),o.current=!1}}},[n]),setPopoverRef:m}};export{n as useSwipeDown};
@@ -4878,11 +4878,14 @@ declare type RecoverComponentStyles = <T extends ComponentsTypesAvailableCompone
4878
4878
  additionalClassNames?: Partial<ComponentSelected_2<ComponentsTypesComponents[T]>>;
4879
4879
  }) => ComponentSelected_2<ComponentsTypesComponents[T]>;
4880
4880
 
4881
- declare interface ScreenReaderOnlyProps extends DataAttributes {
4881
+ declare type ScreenReaderOnlyProps = ScreenReaderOnlyStandAloneProps;
4882
+
4883
+ declare interface ScreenReaderOnlyStandAloneProps extends DataAttributes {
4884
+ ariaAtomic?: AriaAttributes['aria-atomic'];
4885
+ ariaLive?: AriaAttributes['aria-live'];
4882
4886
  children?: React.ReactNode;
4887
+ className?: string;
4883
4888
  id?: string;
4884
- show?: boolean;
4885
- ariaLive?: AriaAttributes['aria-live'];
4886
4889
  role?: React.AriaRole;
4887
4890
  }
4888
4891
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubit-ui-web/react-components",
3
- "version": "2.0.0-beta.29",
3
+ "version": "2.0.0-beta.30",
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",
@@ -135,14 +135,14 @@
135
135
  "@testing-library/react": "^16.3.1",
136
136
  "@testing-library/user-event": "^14.6.1",
137
137
  "@trivago/prettier-plugin-sort-imports": "^6.0.2",
138
- "@types/node": "^25.0.7",
138
+ "@types/node": "^25.0.8",
139
139
  "@types/react": "^18.3.12",
140
140
  "@types/react-dom": "^18.3.1",
141
141
  "@types/testing-library__jest-dom": "^6.0.0",
142
142
  "@vitejs/plugin-react": "^5.1.2",
143
143
  "@vitest/coverage-v8": "^4.0.17",
144
144
  "@vitest/ui": "^4.0.17",
145
- "bernova": "1.0.1",
145
+ "bernova": "1.1.0",
146
146
  "cssnano": "^7.1.2",
147
147
  "eslint": "^9.39.2",
148
148
  "eslint-config-kubit": "1.2.0",