@kubit-ui-web/react-components 2.0.0-beta.4 → 2.0.0-beta.6
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/dist/cjs/components/accordion/accordionStandAlone.js +1 -1
- package/dist/cjs/components/avatar/fragments/drawContent.js +1 -1
- package/dist/cjs/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +1 -1
- package/dist/cjs/components/calendar/selector/selector.js +1 -1
- package/dist/cjs/components/checkbox/checkboxStandAlone.js +1 -1
- package/dist/cjs/components/chip/chipStandAlone.js +1 -1
- package/dist/cjs/components/dataTable/dataTableStandAlone.js +1 -1
- package/dist/cjs/components/dropdownSelected/dropdownSelectedStandAlone.js +1 -1
- package/dist/cjs/components/input/input.js +1 -1
- package/dist/cjs/components/input/inputStandAlone.js +1 -1
- package/dist/cjs/components/inputBase/inputBase.js +1 -1
- package/dist/cjs/components/inputSignature/inputSignatureStandAlone.js +1 -1
- package/dist/cjs/components/label/labelStandAlone.js +1 -1
- package/dist/cjs/components/listOptions/listOptionsStandAlone.js +1 -1
- package/dist/cjs/components/message/messageStandAlone.js +1 -1
- package/dist/cjs/components/modal/fragments/modalHeader.js +1 -1
- package/dist/cjs/components/modal/modalStandAlone.js +1 -1
- package/dist/cjs/components/option/optionStandAlone.js +1 -1
- package/dist/cjs/components/pageControl/components/controls.js +1 -1
- package/dist/cjs/components/pageControl/pageControlStandAlone.js +1 -1
- package/dist/cjs/components/radioButton/radioButtonStandAlone.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileAnimation.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileHeader.js +1 -1
- package/dist/cjs/components/selectorBoxFile/selectorBoxFileStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderHelperTextStandAlone.js +1 -1
- package/dist/cjs/components/slider/components/sliderScaleStandAlone.js +1 -1
- package/dist/cjs/components/slider/sliderStandAlone.js +1 -1
- package/dist/cjs/components/tabs/tabsStandAlone.js +1 -1
- package/dist/cjs/components/textArea/components/errorStandAlone.js +1 -1
- package/dist/cjs/components/textArea/textAreaStandAlone.js +1 -1
- package/dist/cjs/components/tooltip/tooltipStandAlone.js +1 -1
- package/dist/cjs/components/virtualKeyboard/virtualKeyboardStandAlone.js +1 -1
- package/dist/cjs/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
- package/dist/cjs/lib/utils/process/processIcon/processIcon.js +1 -1
- package/dist/cjs/lib/utils/process/processText/processText.js +1 -1
- package/dist/esm/components/accordion/accordionStandAlone.js +4 -4
- package/dist/esm/components/avatar/fragments/drawContent.js +1 -4
- package/dist/esm/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +3 -6
- package/dist/esm/components/calendar/selector/selector.js +7 -9
- package/dist/esm/components/checkbox/checkboxStandAlone.js +5 -7
- package/dist/esm/components/chip/chipStandAlone.js +8 -9
- package/dist/esm/components/dataTable/dataTableStandAlone.js +10 -14
- package/dist/esm/components/dropdownSelected/dropdownSelectedStandAlone.js +5 -6
- package/dist/esm/components/input/input.js +2 -2
- package/dist/esm/components/input/inputStandAlone.js +3 -5
- package/dist/esm/components/inputBase/inputBase.js +2 -2
- package/dist/esm/components/inputSignature/inputSignatureStandAlone.js +3 -4
- package/dist/esm/components/label/labelStandAlone.js +2 -3
- package/dist/esm/components/listOptions/listOptionsStandAlone.js +2 -4
- package/dist/esm/components/message/messageStandAlone.js +5 -10
- package/dist/esm/components/modal/fragments/modalHeader.js +3 -9
- package/dist/esm/components/modal/modalStandAlone.js +4 -5
- package/dist/esm/components/option/optionStandAlone.js +9 -12
- package/dist/esm/components/pageControl/components/controls.js +2 -4
- package/dist/esm/components/pageControl/pageControlStandAlone.js +6 -8
- package/dist/esm/components/radioButton/radioButtonStandAlone.js +4 -8
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileAnimation.js +3 -7
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +9 -13
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileHeader.js +5 -9
- package/dist/esm/components/selectorBoxFile/selectorBoxFileStandAlone.js +7 -8
- package/dist/esm/components/slider/components/sliderHelperTextStandAlone.js +1 -3
- package/dist/esm/components/slider/components/sliderScaleStandAlone.js +2 -2
- package/dist/esm/components/slider/sliderStandAlone.js +17 -19
- package/dist/esm/components/tabs/tabsStandAlone.js +5 -6
- package/dist/esm/components/textArea/components/errorStandAlone.js +3 -3
- package/dist/esm/components/textArea/textAreaStandAlone.js +11 -12
- package/dist/esm/components/tooltip/tooltipStandAlone.js +8 -10
- package/dist/esm/components/virtualKeyboard/virtualKeyboardStandAlone.js +4 -4
- package/dist/esm/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
- package/dist/esm/lib/utils/process/processIcon/processIcon.js +1 -1
- package/dist/esm/lib/utils/process/processText/processText.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/lib/components/renderIf/renderIf.js +0 -1
- package/dist/cjs/lib/hooks/useId/useId.js +0 -1
- package/dist/cjs/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
- package/dist/cjs/lib/utils/is/isReactNode.js +0 -1
- package/dist/cjs/lib/utils/is/isString.js +0 -1
- package/dist/esm/lib/components/renderIf/renderIf.js +0 -1
- package/dist/esm/lib/hooks/useId/useId.js +0 -1
- package/dist/esm/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
- package/dist/esm/lib/utils/is/isReactNode.js +0 -1
- package/dist/esm/lib/utils/is/isString.js +0 -1
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{
|
|
2
|
-
return e.jsxs("div",{className:
|
|
3
|
-
/* @__PURE__ */e.jsx("div",{...
|
|
4
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
5
|
-
/* @__PURE__ */e.jsx(t,{condition:!!I?.content,children:/* @__PURE__ */e.jsx("div",{className:b?.labelcontainer,children:/* @__PURE__ */e.jsx(s,{cursor:u?"default":"pointer",customAttributes:O,inputId:$,textCssClasses:o(b?.label,{[`${b?.speciallabel}`]:!!k}),...I,children:I?.content})})}),
|
|
6
|
-
/* @__PURE__ */e.jsx(t,{condition:!!n(k).children,children:"string"==typeof n(k)?/* @__PURE__ */e.jsx(r,{additionalClasses:{text:b?.sublabel},...n(k),id:M}):/* @__PURE__ */e.jsx("div",{id:M,children:n(k).children})}),
|
|
7
|
-
/* @__PURE__ */e.jsx(t,{condition:!(!p||!h),children:/* @__PURE__ */e.jsx("div",{"aria-live":j,className:b?.errormessagecontainer,id:R,...w,children:/* @__PURE__ */e.jsxs(r,{additionalClasses:{text:b?.errormessage},customAttributes:O,children:[
|
|
8
|
-
/* @__PURE__ */e.jsx(t,{condition:!!x,children:/* @__PURE__ */e.jsx("span",{...w,className:b?.errormessageiconcontainer,children:/* @__PURE__ */e.jsx(i,{className:b?.errormessageicon,customAttributes:O,...x})})}),h]})})})]})]})};export{c as RadioButtonStandAlone};
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{useId as s}from"react";import{LabelStandAlone as r}from"../label/labelStandAlone.js";import{Text as a}from"../text/text.js";import{ElementOrIcon as t}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{classNames as i}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as o}from"../../lib/utils/process/processText/processText.js";import{buildAriaLabelledBy as n}from"./utils/aria.utils.js";const d=({altVariant:d=!1,checked:c,cssClasses:m,disabled:b,error:u,errorAriaLiveType:p,errorIcon:x,errorMessage:j,id:h,label:g,lastChild:f,name:v,onBlur:C,onChange:I,screenReaderId:N,state:y,subTitle:A,tabIndex:_,value:k,...$})=>{let T=`radiobutton-${s().replace(/:/g,"")}`;T=h??T;const B=o(A).id&&`${T}__description`,M=j&&`${T}__error`,O={"data-state":y},R=l(O),w=$["data-testid"]??"radio-button";/* @__PURE__ */
|
|
2
|
+
return e.jsxs("div",{className:m?.rowcontainer,"data-testid":w,...R,style:{display:g?"grid":"block",marginBottom:f?0:void 0},children:[
|
|
3
|
+
/* @__PURE__ */e.jsx("div",{...R,className:m?.radiobuttoncontainer,children:/* @__PURE__ */e.jsx("input",{"aria-describedby":n({descriptionId:B,error:u,errorMessage:j,errorMessageId:M,screenReaderId:N}),"aria-hidden":$["aria-hidden"],"aria-label":$["aria-label"],"aria-labelledby":$["aria-labelledby"],checked:c,className:i(m?.radio_button,{"global-focus-visible":!!d}),"data-testid":`${w}-input`,disabled:b,id:T,name:v,tabIndex:_,type:"radio",value:k,onBlur:C,onChange:I,...R})}),
|
|
4
|
+
/* @__PURE__ */e.jsxs("div",{className:m?.infocontainer,children:[!!g?.content&&/* @__PURE__ */e.jsx("div",{className:m?.labelcontainer,children:/* @__PURE__ */e.jsx(r,{cursor:b?"default":"pointer",customAttributes:O,inputId:T,textCssClasses:i(m?.label,{[`${m?.speciallabel}`]:!!A}),...g,children:g?.content})}),!!o(A).children&&("string"==typeof o(A)?/* @__PURE__ */e.jsx(a,{additionalClasses:{text:m?.sublabel},...o(A),id:B}):/* @__PURE__ */e.jsx("div",{id:B,children:o(A).children})),!(!u||!j)&&/* @__PURE__ */e.jsx("div",{"aria-live":p,className:m?.errormessagecontainer,id:M,...R,children:/* @__PURE__ */e.jsxs(a,{additionalClasses:{text:m?.errormessage},customAttributes:O,children:[!!x&&/* @__PURE__ */e.jsx("span",{...R,className:m?.errormessageiconcontainer,children:/* @__PURE__ */e.jsx(t,{className:m?.errormessageicon,customAttributes:O,...x})}),j]})})]})]})};export{d as RadioButtonStandAlone};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Children as
|
|
2
|
-
/* @__PURE__ */t.jsx(
|
|
3
|
-
/* @__PURE__ */t.jsx(
|
|
4
|
-
/* @__PURE__ */t.jsx(o,{condition:!!A,children:/* @__PURE__ */t.jsx("div",{...b,ref:p,className:A})}),
|
|
5
|
-
/* @__PURE__ */t.jsx(o,{condition:!!C,children:/* @__PURE__ */t.jsx("div",{...b,ref:u,className:C})}),
|
|
6
|
-
/* @__PURE__ */t.jsx("div",{...b,className:c.borderanimationcontainer,children:r})]}):
|
|
7
|
-
/* @__PURE__ */t.jsx(t.Fragment,{children:R})};export{r as SelectorBoxFileAnimation};
|
|
1
|
+
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Children as a,isValidElement as i,cloneElement as e}from"react";import{pickCustomAttributes as s}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{useBorderAnimation as o}from"../hooks/useBorderAnimation.js";const n=({children:n,cssClasses:r,focus:m,onAnimationCompleted:c,percentage:d,state:f,...l})=>{const{bottomRef:p,leftRef:u,rightRef:j,topRef:x}=o({onAnimationCompleted:c,percentage:d}),h=s({...{"data-focus":m,"data-state":f}}),v=r?.animationcontainer,b=r?.topanimationcontainer,N=r?.rightanimationcontainer,g=r?.bottomanimationcontainer,A=r?.leftanimationcontainer,C=a.map(n,t=>i(t)?e(t,{focus:m}):t);return v?/* @__PURE__ */t.jsxs("div",{className:v,"data-focus":m,"data-testid":`${l["data-testid"]}-animations`,...h,children:[!!b&&/* @__PURE__ */t.jsx("div",{...h,ref:x,className:b}),!!N&&/* @__PURE__ */t.jsx("div",{...h,ref:j,className:N}),!!g&&/* @__PURE__ */t.jsx("div",{...h,ref:p,className:g}),!!A&&/* @__PURE__ */t.jsx("div",{...h,ref:u,className:A}),
|
|
2
|
+
/* @__PURE__ */t.jsx("div",{...h,className:r.borderanimationcontainer,children:n})]}):
|
|
3
|
+
/* @__PURE__ */t.jsx(t.Fragment,{children:C})};export{n as SelectorBoxFileAnimation};
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Text as s}from"../../text/text.js";import{ElementOrIcon as n}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{
|
|
2
|
-
return t.jsxs("label",{className:
|
|
3
|
-
/* @__PURE__ */t.jsxs("span",{children:[
|
|
4
|
-
/* @__PURE__ */t.jsx(n,{className:
|
|
5
|
-
/* @__PURE__ */t.jsx(n,{className:
|
|
6
|
-
/* @__PURE__ */t.jsxs("span",{className:
|
|
7
|
-
/* @__PURE__ */t.
|
|
8
|
-
/* @__PURE__ */t.
|
|
9
|
-
/* @__PURE__ */t.jsx(
|
|
10
|
-
/* @__PURE__ */t.jsx(n,{className:r?.actionicon,customAttributes:u,...a[p]?.actionIcon}),
|
|
11
|
-
/* @__PURE__ */t.jsx(s,{additionalClasses:{text:r?.containerboxactiontext},component:"span",customAttributes:u,...c(a[p]?.actionText),children:c(a[p]?.actionText).children})]})}),
|
|
12
|
-
/* @__PURE__ */t.jsx(o,{condition:!!a[p]?.description,children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:r?.containerboxdescription},component:"span",customAttributes:u,...c(a[p]?.description),children:c(a[p]?.description).children})})]})]}),
|
|
13
|
-
/* @__PURE__ */t.jsx(o,{condition:!!a[p]?.iconRight,children:/* @__PURE__ */t.jsx("span",{children:/* @__PURE__ */t.jsx(n,{className:r?.containerboxicon,customAttributes:u,...a[p]?.iconRight})})})]})};export{a as SelectorBoxFileContainerBox};
|
|
1
|
+
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Text as s}from"../../text/text.js";import{ElementOrIcon as n}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as e}from"../../../lib/types/states/states.js";import{pickCustomAttributes as o}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as i}from"../../../lib/utils/process/processText/processText.js";const c=({containerBoxStateContent:c,cssClasses:a,filename:r,focus:l,htmlFor:m,loader:x,state:p})=>{const d={"data-focus":l,"data-state":p};/* @__PURE__ */
|
|
2
|
+
return t.jsxs("label",{className:a?.containerboxcontainer,"data-focus":l,htmlFor:m,...o(d),children:[
|
|
3
|
+
/* @__PURE__ */t.jsxs("span",{children:[x,
|
|
4
|
+
/* @__PURE__ */t.jsx(n,{className:a?.containerboxicon,customAttributes:d,...c[p]?.icon}),
|
|
5
|
+
/* @__PURE__ */t.jsx(n,{className:a?.containerboxicon,customAttributes:d,...c[p]?.icon})]}),
|
|
6
|
+
/* @__PURE__ */t.jsxs("span",{className:a?.containerboxtextscontainer,...o(d),children:[!!r&&[e.LOADING,e.SUCCESS,e.ERROR].includes(p)&&/* @__PURE__ */t.jsx(s,{additionalClasses:{text:a?.containerboxfilename},component:"span",customAttributes:d,children:r}),
|
|
7
|
+
/* @__PURE__ */t.jsxs("span",{className:a?.actiondescriptioncontainer,children:[!!i(c[p]?.actionText).children&&/* @__PURE__ */t.jsxs("span",{className:a?.actioniconandactiontextcontainer,...o(d),children:[
|
|
8
|
+
/* @__PURE__ */t.jsx(n,{className:a?.actionicon,customAttributes:d,...c[p]?.actionIcon}),
|
|
9
|
+
/* @__PURE__ */t.jsx(s,{additionalClasses:{text:a?.containerboxactiontext},component:"span",customAttributes:d,...i(c[p]?.actionText),children:i(c[p]?.actionText).children})]}),!!c[p]?.description&&/* @__PURE__ */t.jsx(s,{additionalClasses:{text:a?.containerboxdescription},component:"span",customAttributes:d,...i(c[p]?.description),children:i(c[p]?.description).children})]})]}),!!c[p]?.iconRight&&/* @__PURE__ */t.jsx("span",{children:/* @__PURE__ */t.jsx(n,{className:a?.containerboxicon,customAttributes:d,...c[p]?.iconRight})})]})};export{c as SelectorBoxFileContainerBox};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Button as
|
|
2
|
-
/* @__PURE__ */t.jsxs("div",{className:
|
|
3
|
-
/* @__PURE__ */t.jsx(
|
|
4
|
-
/* @__PURE__ */t.jsx(o,{
|
|
5
|
-
/* @__PURE__ */t.jsx(
|
|
6
|
-
/* @__PURE__ */t.jsx(n,{cssClasses:a,tooltip:j,tooltipIcon:p})]})})]}),
|
|
7
|
-
/* @__PURE__ */t.jsx(o,{condition:!(!l&&!r),children:/* @__PURE__ */t.jsxs("div",{className:a?.descriptioncontainer,children:[
|
|
8
|
-
/* @__PURE__ */t.jsx(s,{additionalClasses:{text:a?.description},...e(l)}),
|
|
9
|
-
/* @__PURE__ */t.jsx(o,{condition:!(!a?.button_variant&&!r?.size||!a?.button_size&&!r?.variant),children:/* @__PURE__ */t.jsx(i,{additionalSizeClasses:r?.variant?void 0:a?.button_size,additionalVariantClasses:r?.size?void 0:a?.button_variant,size:r?.size,variant:r?.variant,...r,children:r?.content})})]})})]});export{r as SelectorBoxFileHeader};
|
|
1
|
+
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Button as s}from"../../button/button.js";import{Text as i}from"../../text/text.js";import{processText as e}from"../../../lib/utils/process/processText/processText.js";import{SelectorBoxFileTooltip as o}from"./selectorBoxFileTooltip.js";const a=({button:a,cssClasses:n,description:r,headerId:l,subtitle:c,title:d,tooltip:p,tooltipIcon:x})=>/* @__PURE__ */t.jsxs(t.Fragment,{children:[
|
|
2
|
+
/* @__PURE__ */t.jsxs("div",{className:n?.titlesubtitlecontainer,id:l,children:[!!d&&/* @__PURE__ */t.jsx(i,{additionalClasses:{text:n?.title},component:"h5",...e(d)}),!!c&&/* @__PURE__ */t.jsxs("div",{className:n?.actiondescriptioncontainer,children:[
|
|
3
|
+
/* @__PURE__ */t.jsx(i,{additionalClasses:{text:n?.subtitle},...e(c)}),
|
|
4
|
+
/* @__PURE__ */t.jsx(o,{cssClasses:n,tooltip:p,tooltipIcon:x})]})]}),!(!r&&!a)&&/* @__PURE__ */t.jsxs("div",{className:n?.descriptioncontainer,children:[
|
|
5
|
+
/* @__PURE__ */t.jsx(i,{additionalClasses:{text:n?.description},...e(r)}),(!!n?.button_variant||!!a?.size)&&(!!n?.button_size||!!a?.variant)&&/* @__PURE__ */t.jsx(s,{additionalSizeClasses:a?.variant?void 0:n?.button_size,additionalVariantClasses:a?.size?void 0:n?.button_variant,size:a?.size,variant:a?.variant,...a,children:a?.content})]})]});export{a as SelectorBoxFileHeader};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as s
|
|
2
|
-
return e.jsxs("div",{ref:
|
|
3
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
4
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
5
|
-
/* @__PURE__ */e.jsx(
|
|
6
|
-
/* @__PURE__ */e.jsx(
|
|
7
|
-
/* @__PURE__ */e.jsx(
|
|
8
|
-
/* @__PURE__ */e.jsx("input",{accept:s,"aria-describedby":(()=>{let e="";return(A||y)&&(e+=` ${D}`),k===r.ERROR&&x&&(e+=` ${H}`),e||void 0})(),className:"kbt-sr-only",disabled:k===r.DISABLED,id:_,multiple:b,name:I,type:"file",onBlur:B,onChange:g,onClick:F,onFocus:M})]})});export{c as SelectorBoxFileStandAlone};
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as s,useId as t}from"react";import{STATES as o}from"../../lib/types/states/states.js";import{SelectorBoxFileAnimation as r}from"./components/selectorBoxFileAnimation.js";import{SelectorBoxFileContainerBox as i}from"./components/selectorBoxFileContainerBox.js";import{SelectorBoxFileErrorMessage as n}from"./components/selectorBoxFileErrorMessage.js";import{SelectorBoxFileHeader as a}from"./components/selectorBoxFileHeader.js";const l=s(({accept:s,button:l,containerBoxStateContent:c,cssClasses:m,description:d,errorMessage:p,errorMessageIcon:x,filename:u,focus:f,id:j,multiple:C,name:b,onAnimationCompleted:g,onBlur:B,onChange:h,onClick:I,onFocus:F,percentage:M,state:v,subtitle:$,title:y,tooltip:A,tooltipIcon:E,...k},N)=>{const R=`selectorboxfile-${t().replace(/:/g,"")}`,S=j??R,_=`${S}HeaderId`,D=`${S}ErrorId`,H=k["data-testid"]??"selector-box-file";/* @__PURE__ */
|
|
2
|
+
return e.jsxs("div",{ref:N,children:[
|
|
3
|
+
/* @__PURE__ */e.jsxs("div",{className:m?.selector_box_file,"data-testid":H,children:[
|
|
4
|
+
/* @__PURE__ */e.jsxs("div",{className:m?.header,children:[!(!y&&!$)&&/* @__PURE__ */e.jsx(a,{button:l,cssClasses:m,description:d,headerId:_,subtitle:$,title:y,tooltip:A,tooltipIcon:E}),
|
|
5
|
+
/* @__PURE__ */e.jsx(r,{cssClasses:m,"data-testid":H,focus:f,percentage:M,state:v,onAnimationCompleted:g,children:/* @__PURE__ */e.jsx(i,{containerBoxStateContent:c,cssClasses:m,filename:u,focus:!1,htmlFor:S,state:v})})]}),
|
|
6
|
+
/* @__PURE__ */e.jsx(n,{cssClasses:m,errorMessage:p,errorMessageIcon:x,errorMessageId:D,state:v})]}),
|
|
7
|
+
/* @__PURE__ */e.jsx("input",{accept:s,"aria-describedby":(()=>{let e="";return(y||$)&&(e+=` ${_}`),v===o.ERROR&&p&&(e+=` ${D}`),e||void 0})(),className:"kbt-sr-only",disabled:v===o.DISABLED,id:S,multiple:C,name:b,type:"file",onBlur:B,onChange:h,onClick:I,onFocus:F})]})});export{l as SelectorBoxFileStandAlone};
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import{j as e}from"../../../_virtual/jsx-runtime.js";import{Text as t}from"../../text/text.js";
|
|
2
|
-
/* @__PURE__ */e.jsx(s,{condition:!!n,children:/* @__PURE__ */e.jsx("div",{className:r?.helpertextleftcontainer,children:/* @__PURE__ */e.jsx(t,{additionalClasses:{text:r?.helpertext},component:"span",customAttributes:i,id:l,children:n})})}),
|
|
3
|
-
/* @__PURE__ */e.jsx(s,{condition:!!o,children:/* @__PURE__ */e.jsx("div",{className:r?.helpertextrightcontainer,children:/* @__PURE__ */e.jsx(t,{additionalClasses:{text:r?.helpertext},component:"span",customAttributes:i,id:c,children:o})})})]}):null;export{r as SliderHelperTextStandAlone};
|
|
1
|
+
import{j as e}from"../../../_virtual/jsx-runtime.js";import{Text as t}from"../../text/text.js";const s=({cssClasses:s,customAttributes:r,leftHelperText:l,leftHelperTextId:i,rightHelperText:n,rightHelperTextId:a})=>l||n?/* @__PURE__ */e.jsxs("div",{className:s?.helpertextcontainer,children:[!!l&&/* @__PURE__ */e.jsx("div",{className:s?.helpertextleftcontainer,children:/* @__PURE__ */e.jsx(t,{additionalClasses:{text:s?.helpertext},component:"span",customAttributes:r,id:i,children:l})}),!!n&&/* @__PURE__ */e.jsx("div",{className:s?.helpertextrightcontainer,children:/* @__PURE__ */e.jsx(t,{additionalClasses:{text:s?.helpertext},component:"span",customAttributes:r,id:a,children:n})})]}):null;export{s as SliderHelperTextStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as
|
|
2
|
-
return
|
|
1
|
+
import{j as t}from"../../../_virtual/jsx-runtime.js";import{useId as s,useState as r,useRef as e,useEffect as c}from"react";import{pickCustomAttributes as i}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";const l=({cssClasses:l,customAttributes:o,scaleOffsets:a,showScale:n})=>{const u=`tickmarks-${s().replace(/:/g,"")}`,[m,p]=r("0px"),f=e(null);return c(()=>{f.current&&p(`${f.current.offsetWidth}px`)},[f.current]),n&&n?/* @__PURE__ */t.jsx("div",{className:l?.scalecontainer,id:u,...i(o),children:a.map((s,r)=>{const e={left:`calc(${s}% - ${m} / 2)`};/* @__PURE__ */
|
|
2
|
+
return t.jsx("span",{className:l?.scaleoption,style:e},`${u}-${r.toString()}`)})}):null};export{l as SliderScaleStandAlone};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t
|
|
2
|
-
return e.jsxs("div",{ref:
|
|
3
|
-
/* @__PURE__ */e.jsx("div",{className:
|
|
4
|
-
/* @__PURE__ */e.jsx(
|
|
5
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
6
|
-
/* @__PURE__ */e.jsx(
|
|
7
|
-
/* @__PURE__ */e.jsx("div",{className:
|
|
8
|
-
/* @__PURE__ */e.jsx(
|
|
9
|
-
/* @__PURE__ */e.jsx("div",{className:
|
|
10
|
-
/* @__PURE__ */e.jsx("div",{className:
|
|
11
|
-
/* @__PURE__ */e.jsx(
|
|
12
|
-
/* @__PURE__ */e.jsx(
|
|
13
|
-
/* @__PURE__ */e.jsx(
|
|
14
|
-
/* @__PURE__ */e.jsx(
|
|
15
|
-
/* @__PURE__ */e.jsx(
|
|
16
|
-
/* @__PURE__ */e.jsx(
|
|
17
|
-
/* @__PURE__ */e.jsx(
|
|
18
|
-
/* @__PURE__ */e.jsx(c,{...g,cssClasses:f,customAttributes:Y})]}),
|
|
19
|
-
/* @__PURE__ */e.jsx(d,{cssClasses:f,customAttributes:Y,leftHelperText:y,leftHelperTextId:se,rightHelperText:K,rightHelperTextId:ae})]})});export{b as SliderStandAlone};
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t,useId as s}from"react";import{classNames as a}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as r}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as i}from"../../lib/utils/process/processText/processText.js";import{Text as l}from"../text/text.js";import{SliderButtonStandAlone as o}from"./components/sliderButtonStandAlone.js";import{SliderHelperTextStandAlone as c}from"./components/sliderHelperTextStandAlone.js";import{SliderScaleStandAlone as d}from"./components/sliderScaleStandAlone.js";import{SliderThumbStandAlone as n}from"./components/sliderThumbStandAlone.js";import{buildAriaDescribedBy as u}from"./utils/accessibility.utils.js";import{getState as m}from"./utils/state.utils.js";import{isActive as h}from"./utils/ui.utils.js";const p=t(({activePointer:t,ariaLabel:p,ariaLabelBy:b,containerRef:x,cssClasses:v,decrementButton:f,disabled:j,hover:T,incrementButton:$,label:g,leftHelperText:y,max:k,min:A,offset:L,offsetLeft:C,offsetRight:N,onChange:w,onKeyPress:B,onMouseDown:I,onTouchStart:S,pressed:H,range:M,rightAriaLabel:D,rightAriaLabelBy:O,rightHelperText:F,rightThumbIcon:K,rightTooltip:R,scaleOffsets:P,setHover:_,showScale:q,step:z,thumbIcon:E,tooltip:G,value:J,...Q},U)=>{const V=`slider-${s().replace(/:/g,"")}`,W=m({disabled:j,hover:T,pressed:H}),X={"data-state":W},Y=Q["data-testid"]??"slider",Z=r(X),ee=i(g).children&&!M?`${V}Label`:void 0,te=`${V}LeftHelperText`,se=`${V}RightHelperText`,ae=b??ee;/* @__PURE__ */
|
|
2
|
+
return e.jsxs("div",{ref:U,className:v?.slider,"data-disabled":j,"data-hover":T,"data-pressed":H,...Z,children:[
|
|
3
|
+
/* @__PURE__ */e.jsx("div",{className:v?.labelcontainer,...Z,children:/* @__PURE__ */e.jsx(l,{additionalClasses:{text:v?.label},component:"label",customAttributes:X,id:ee,...i(g)})}),
|
|
4
|
+
/* @__PURE__ */e.jsx(d,{cssClasses:v,customAttributes:X,scaleOffsets:P,showScale:q}),
|
|
5
|
+
/* @__PURE__ */e.jsxs("div",{className:v?.buttonstrackscontainer,children:[
|
|
6
|
+
/* @__PURE__ */e.jsx(o,{...f,cssClasses:v,customAttributes:X}),
|
|
7
|
+
/* @__PURE__ */e.jsx("div",{className:v?.tracksthumbscontainer,children:/* @__PURE__ */e.jsxs("div",{ref:x,className:v?.tracksthumbsinnercontainer,"data-testid":`${Y}-container`,role:"button",tabIndex:0,onMouseDown:I,onTouchMove:w,onTouchStart:S,children:[M&&/* @__PURE__ */e.jsxs(e.Fragment,{children:[
|
|
8
|
+
/* @__PURE__ */e.jsx("div",{className:a({[`${v?.activetrack}`]:!1,[`${v?.inactivetrack}`]:!0}),...Z,"data-disabled":j,"data-hover":T,"data-pressed":H,"data-testid":`${Y}-inactive-left-track`,style:{left:0,width:`${C}%`}}),
|
|
9
|
+
/* @__PURE__ */e.jsx("div",{className:a({[`${v?.activetrack}`]:!0,[`${v?.inactivetrack}`]:!1}),"data-disabled":j,"data-hover":T,"data-pressed":H,"data-testid":`${Y}-active-track`,style:{left:`${C}%`,right:`${N}%`},...Z}),
|
|
10
|
+
/* @__PURE__ */e.jsx("div",{className:a({[`${v?.activetrack}`]:!1,[`${v?.inactivetrack}`]:!0}),"data-disabled":j,"data-hover":T,"data-pressed":H,"data-testid":`${Y}-inactive-right-track`,style:{right:0,width:`${N}%`},...Z}),
|
|
11
|
+
/* @__PURE__ */e.jsx(n,{ariaDescribedBy:u([{helperText:y,helperTextId:te},{helperText:F,helperTextId:se}]),ariaLabel:p,ariaLabelBy:ae,cssClasses:v,customAttributes:X,"data-testid":`${Y}-left-thumb`,disabled:j,hover:h(T,t.current,"left"),icon:E,max:J[1]-z,min:A,pressed:h(H,t.current,"left"),state:W,style:{left:`${C}%`},tooltip:G,value:J[0],onFocus:()=>t.current="left",onKeyDown:B,onMouseOut:()=>_(!1),onMouseOver:()=>{_(!0),t.current="left"},onTouchStart:()=>{t.current="left"}}),
|
|
12
|
+
/* @__PURE__ */e.jsx(n,{ariaDescribedBy:u([{helperText:y,helperTextId:te},{helperText:F,helperTextId:se}]),ariaLabel:D,ariaLabelBy:O,cssClasses:v,customAttributes:X,"data-testid":`${Y}-right-thumb`,disabled:j,hover:h(T,t.current,"right"),icon:K,max:k,min:J[0]+z,pressed:h(H,t.current,"right"),rightThumb:!0,state:W,style:{right:`${N}%`},tooltip:R,value:J[1],onFocus:()=>t.current="right",onKeyDown:B,onMouseOut:()=>_(!1),onMouseOver:()=>{_(!0),t.current="right"},onTouchStart:()=>{t.current="right"}})]}),!M&&/* @__PURE__ */e.jsxs(e.Fragment,{children:[
|
|
13
|
+
/* @__PURE__ */e.jsx("div",{className:a({[`${v?.activetrack}`]:!0,[`${v?.inactivetrack}`]:!1}),"data-disabled":j,"data-hover":T,"data-pressed":H,"data-testid":`${Y}-active-track`,style:{width:`${L}%`},...Z}),
|
|
14
|
+
/* @__PURE__ */e.jsx("div",{className:a({[`${v?.activetrack}`]:!1,[`${v?.inactivetrack}`]:!0}),"data-disabled":j,"data-hover":T,"data-pressed":H,"data-testid":`${Y}-inactive-track`,style:{right:0,width:`calc(${100-L}%)`},...Z}),
|
|
15
|
+
/* @__PURE__ */e.jsx(n,{ariaDescribedBy:u([{helperText:y,helperTextId:te},{helperText:F,helperTextId:se}]),ariaLabel:p,ariaLabelBy:ae,cssClasses:v,customAttributes:X,"data-testid":`${Y}-thumb`,disabled:j,hover:T,icon:E,max:k,min:A,pressed:H,state:W,style:{left:`${L}%`},tooltip:G,value:J,onKeyDown:B,onMouseOut:()=>_(!1),onMouseOver:()=>_(!0)})]})]})}),
|
|
16
|
+
/* @__PURE__ */e.jsx(o,{...$,cssClasses:v,customAttributes:X})]}),
|
|
17
|
+
/* @__PURE__ */e.jsx(c,{cssClasses:v,customAttributes:X,leftHelperText:y,leftHelperTextId:te,rightHelperText:F,rightHelperTextId:se})]})});export{p as SliderStandAlone};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as e}from"react";import{Text as s}from"../text/text.js";import{ElementOrIcon as
|
|
2
|
-
return t.
|
|
3
|
-
|
|
4
|
-
/* @__PURE__ */t.
|
|
5
|
-
|
|
6
|
-
return t.jsx("div",{className:h?.tabcontainer,"data-testid":`${U}-tab-${a}`,...b(m),style:{minWidth:A?`calc(100% / ${F})`:"auto",width:u?"auto":`calc(100% / ${D})`},children:D>1?/* @__PURE__ */t.jsx(i,{ariaDisabled:A&&!l||e.disabled,ariaSelected:o,asElement:"button",checkIsFirstTime:!0,classNames:c(h?.tabbutton,{[`${h?.firsttabbutton}`]:0===a,[`${h?.lasttabbutton}`]:a===D-1}),customAttributes:m,disabled:A&&!l||e.disabled,focus:M===a,id:`${E}-tab-${a}`,index:a,preventScrollOnFocus:!0,role:"tab",type:"button",onSelectItem:()=>{I?.(a),R(a)},children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:h?.label},component:"span",customAttributes:m,"data-hidden":!!f,...d(e)})}):/* @__PURE__ */t.jsx("div",{className:c(h?.onetabcontainer,{[`${h?.tabbutton}`]:!!f}),id:`${E}-tab-${a}`,role:"tab",children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:h?.label},"data-hidden":!!f,...d(e),children:d(e).children})})},`${U}-tab-${a.toString()}`)})}),q("right")]}),(()=>{const s={role:"tabpanel",tabIndex:e?0:-1};return g?null!=N&&/* @__PURE__ */t.jsx("div",{"aria-labelledby":`${E}-tab-${N}`,className:h?.contentcontainer,...s,children:p?.[N]}):p?.map((e,a)=>/* @__PURE__ */t.jsx("div",{"aria-labelledby":`${E}-tab-${a}`,className:h?.contentcontainer,id:`${w}-${a}`,style:{display:N===a?"block":"none"},...s,children:e},`${E}-${a.toString()}-tab`))})()]})});export{u as TabsStandAlone};
|
|
1
|
+
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as e,useId as a}from"react";import{Text as s}from"../text/text.js";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{ItemRove as o}from"../../lib/components/itemRove/itemRove.js";import{useActiveBreakpoints as l}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.js";import{STATES as n}from"../../lib/types/states/states.js";import{classNames as r}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as c}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as b}from"../../lib/utils/process/processText/processText.js";import{useTabs as d}from"./hooks/useTabs/useTabs.js";const m=e(({allowFocusTabPanel:e=!0,autoWidth:m=!1,content:u,cssClasses:p,device:h,hideLabelForSingleTab:$,leftControlAriaLabel:j,leftIcon:x,maxTabsInView:f=3,onSelectTab:T,rightControlAriaLabel:v,rightIcon:C,selectedTab:N,tabs:g,unMountContent:I=!0,...k},S)=>{const{isMobile:y}=l(),A=`tabs-${a().replace(/:/g,"")}`,E=`${A}-tab-list`,L=`${A}-tab-panel`,w=g?.length??0,D=Math.min(w,f),{focus:F,handleClickIcon:M,handleClickTab:O,listEl:R,position:V}=d({numTabsInView:D,selectedTab:N,tabsLength:w}),W=0===V,B=V>=w-D,P=k["data-testid"]||"tabs",U=c(k),_=e=>{const a="left"===e,s=a?W:B;return w>D?/* @__PURE__ */t.jsx("button",{"aria-label":a?j:v,className:p?.arrowiconcontainer,"data-position":a?"left":"right","data-testid":`${P}-icon-${e}`,disabled:s,tabIndex:0,type:"button",onClick:()=>{s||M(!a)},children:/* @__PURE__ */t.jsx(i,{className:p?.icon,customAttributes:{"data-disabled":s},"data-position":a?"left":"right",...a?x:C})}):null};/* @__PURE__ */
|
|
2
|
+
return t.jsxs("div",{ref:S,className:p?.tabs,"data-testid":P,...U,children:[
|
|
3
|
+
/* @__PURE__ */t.jsxs("div",{className:p?.container,children:[_("left"),
|
|
4
|
+
/* @__PURE__ */t.jsx("div",{ref:R,className:p?.tabbuttonscontainer,id:E,role:"tablist",children:g?.map((e,a)=>{const i=N===a,l=i?n.SELECTED:n.UNSELECTED,d=a>=V&&a<V+D,u={"data-state":l};/* @__PURE__ */
|
|
5
|
+
return t.jsx("div",{className:p?.tabcontainer,"data-testid":`${P}-tab-${a}`,...c(u),style:{minWidth:y?`calc(100% / ${D})`:"auto",width:m?"auto":`calc(100% / ${w})`},children:w>1?/* @__PURE__ */t.jsx(o,{ariaDisabled:y&&!d||e.disabled,ariaSelected:i,asElement:"button",checkIsFirstTime:!0,classNames:r(p?.tabbutton,{[`${p?.firsttabbutton}`]:0===a,[`${p?.lasttabbutton}`]:a===w-1}),customAttributes:u,disabled:y&&!d||e.disabled,focus:F===a,id:`${A}-tab-${a}`,index:a,preventScrollOnFocus:!0,role:"tab",type:"button",onSelectItem:()=>{T?.(a),O(a)},children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:p?.label},component:"span",customAttributes:u,"data-hidden":!!$,...b(e)})}):/* @__PURE__ */t.jsx("div",{className:r(p?.onetabcontainer,{[`${p?.tabbutton}`]:!!$}),id:`${A}-tab-${a}`,role:"tab",children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:p?.label},"data-hidden":!!$,...b(e),children:b(e).children})})},`${P}-tab-${a.toString()}`)})}),_("right")]}),(()=>{const a={role:"tabpanel",tabIndex:e?0:-1};return I?null!=N&&/* @__PURE__ */t.jsx("div",{"aria-labelledby":`${A}-tab-${N}`,className:p?.contentcontainer,...a,children:u?.[N]}):u?.map((e,s)=>/* @__PURE__ */t.jsx("div",{"aria-labelledby":`${A}-tab-${s}`,className:p?.contentcontainer,id:`${L}-${s}`,style:{display:N===s?"block":"none"},...a,children:e},`${A}-${s.toString()}-tab`))})()]})});export{m as TabsStandAlone};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as e}from"../../../_virtual/jsx-runtime.js";import{Text as
|
|
2
|
-
/* @__PURE__ */e.jsx(
|
|
3
|
-
/* @__PURE__ */e.jsx(
|
|
1
|
+
import{j as e}from"../../../_virtual/jsx-runtime.js";import{Text as s}from"../../text/text.js";import{ElementOrIcon as r}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as t}from"../../../lib/types/states/states.js";import{processText as o}from"../../../lib/utils/process/processText/processText.js";const i=({cssClasses:i,customAttributtes:c,errorAriaLiveType:m,errorIcon:n,errorMessage:a,id:l,state:p})=>/* @__PURE__ */e.jsx("div",{"aria-live":m,className:i?.errorcontainer,id:l,...c,children:!!o(a).children&&p===t.ERROR&&/* @__PURE__ */e.jsxs(e.Fragment,{children:[
|
|
2
|
+
/* @__PURE__ */e.jsx(r,{className:i?.erroricon,customAttributes:c,...n}),
|
|
3
|
+
/* @__PURE__ */e.jsx(s,{additionalClasses:{text:i?.errormessage},component:"p",customAttributes:c,...o(a),children:o(a).children})]})});export{i as ErrorStandAlone};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{LabelStandAlone as
|
|
2
|
-
return e.jsxs("div",{ref:
|
|
3
|
-
/* @__PURE__ */e.jsx(
|
|
4
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
5
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
6
|
-
/* @__PURE__ */e.jsx(
|
|
7
|
-
/* @__PURE__ */e.jsx("textarea",{"aria-describedby":
|
|
8
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
9
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
10
|
-
/* @__PURE__ */e.jsx(l,{cssClasses:
|
|
11
|
-
/* @__PURE__ */e.jsx(
|
|
12
|
-
/* @__PURE__ */e.jsx(r,{condition:!!x,children:/* @__PURE__ */e.jsx(d,{additionalClasses:{letftext:p?.counterleft,righttext:p?.counterright,text_count:p?.counter},currentCharacters:S?.length??0,id:w,maxLength:v,screenReaderText:M,variant:x})})]})]})});export{x as TextAreaStandAlone};
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t,useId as s}from"react";import{LabelStandAlone as r}from"../label/labelStandAlone.js";import{STATES as a}from"../../lib/types/states/states.js";import{pickCustomAttributes as o}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as i}from"../../lib/utils/process/processText/processText.js";import{ErrorStandAlone as l}from"./components/errorStandAlone.js";import{HelpMessageStandAlone as n}from"./components/helpMessageStandAlone.js";import{TextCount as c}from"./components/textCount/textCount.js";import{TitleStandAlone as d}from"./components/titleStandAlone.js";import{buildAriaDescribedBy as m}from"./utils/aria.utils.js";const u=t(({additionalInfo:t,counterVariant:u,cssClasses:x,errorAriaLiveType:p="assertive",errorIcon:h,errorMessage:j,height:b,helpMessage:g,id:C,label:f,labelInsideTextArea:A,maxLength:v,onBlur:I,onChange:T,onFocus:y,placeholder:E,required:L,screenReaderTextCount:M,spellCheck:k,state:B,title:D,value:N,...S},_)=>{const q=`textarea-${s().replace(/:/g,"")}`,$=C??q,F=`${$}HelpText`,H=`${$}Error`,R=`${$}TextCount`,w=o({"data-state":B}),K=[a.DISABLED_EMPTY,a.DISABLED_FILLED].includes(B);/* @__PURE__ */
|
|
2
|
+
return e.jsxs("div",{ref:_,className:x?.text_area,"data-testid":"text-area",...w,...o(S),children:[
|
|
3
|
+
/* @__PURE__ */e.jsx(d,{cssClasses:x,customAttributtes:w,title:D}),
|
|
4
|
+
/* @__PURE__ */e.jsxs("div",{className:x?.labeltextareacontainer,role:"button",style:{height:A?b:void 0},tabIndex:0,onClick:()=>document.getElementById($)?.focus(),onKeyDown:e=>{"Enter"===e.key&&document.getElementById($)?.focus()},children:[
|
|
5
|
+
/* @__PURE__ */e.jsxs("div",{className:x?.labelandadditionalinfocontainer,children:[
|
|
6
|
+
/* @__PURE__ */e.jsx(r,{asteriskCssClasses:x?.required,customAttributes:w,inputId:$,required:L,textCssClasses:x?.label,...i(f),children:i(f).children}),t]}),
|
|
7
|
+
/* @__PURE__ */e.jsx("textarea",{"aria-describedby":m({errorMessage:i(j).children,helpMessage:i(g).children,state:B,textAreaErrorId:H,textAreaHelpTextId:F}),className:x?.textarea,disabled:K,id:$,maxLength:v,placeholder:E,required:L,spellCheck:k,style:{height:b||void 0},value:N,onBlur:I,onChange:T,onFocus:y,...w,children:N})]}),
|
|
8
|
+
/* @__PURE__ */e.jsxs("div",{className:x?.bottomcontainer,...w,children:[
|
|
9
|
+
/* @__PURE__ */e.jsxs("div",{className:x?.helpmessageerrorcontainer,...w,children:[
|
|
10
|
+
/* @__PURE__ */e.jsx(l,{cssClasses:x,customAttributtes:w,errorAriaLiveType:p,errorIcon:h,errorMessage:j,id:H,state:B}),
|
|
11
|
+
/* @__PURE__ */e.jsx(n,{cssClasses:x,customAttributtes:w,helpMessage:g,id:F})]}),!!u&&/* @__PURE__ */e.jsx(c,{additionalClasses:{letftext:x?.counterleft,righttext:x?.counterright,text_count:x?.counter},currentCharacters:N?.length??0,id:R,maxLength:v,screenReaderText:M,variant:u})]})]})});export{u as TextAreaStandAlone};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import{j as o}from"../../_virtual/jsx-runtime.js";/* empty css */import{
|
|
2
|
-
return o.jsx("div",{className:"kbt-tooltip","data-testid":
|
|
3
|
-
/* @__PURE__ */o.jsxs("div",{className:
|
|
4
|
-
/* @__PURE__ */o.
|
|
5
|
-
/* @__PURE__ */o.
|
|
6
|
-
/* @__PURE__ */o.jsx(
|
|
7
|
-
|
|
8
|
-
/* @__PURE__ */o.jsx(
|
|
9
|
-
return o.jsxs("div",{ref:w,className:"kbt-tooltip","data-testid":G,children:[
|
|
10
|
-
/* @__PURE__ */o.jsx(j,{ariaDescribedBy:z||!to&&!H?void 0:so,childrenAsButton:x,triggerAsButton:L,onClick:O,onKeyDown:$,onMouseDown:K,onMouseUp:R,children:v}),to?no:/* @__PURE__ */o.jsx(b,{additionalClasses:I?.popover?{arrow:"",popover:I.popover.popover||""}:void 0,"aria-label":S?.["aria-label"]||U,"aria-labelledby":h({hasTitle:!!Y.children,titleId:V}),"aria-modal":z||void 0,component:"div",disableAutoFocusFirstDescendantAfterClose:!0,disableTrapFocus:!1,open:H,preventCloseOnClickElements:[w?.current],role:z?"dialog":"tooltip",strategy:"absolute",onClose:B,...S,children:no})]})};export{u as TooltipStandAlone};
|
|
1
|
+
import{j as o}from"../../_virtual/jsx-runtime.js";/* empty css */import{useId as e}from"react";import{Text as t}from"../text/text.js";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{useActiveBreakpoints as s}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.js";import{POSITIONS as l}from"../../lib/types/positions/positions.js";import{classNames as r}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as n}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processIcon as a}from"../../lib/utils/process/processIcon/processIcon.js";import{processText as c}from"../../lib/utils/process/processText/processText.js";import{IconHost as d}from"../icon/iconHost.js";import{Popover as p}from"../popover/popover.js";import{TooltipTrigger as m}from"./components/tooltipTrigger.js";import{getAriaDescriptorsBy as b}from"./utils/tooltip.utils.js";const v=({align:v,children:h,childrenAsButton:j=!0,closeIcon:u,content:x,contentHasScroll:g,contentRef:f,contentScrollArias:C,cssClasses:y,disabled:k,dragIcon:N,dragIconRef:T,labelRef:I,mediaDevice:A,onCloseIconClick:w,onPopoverCloseInternally:D,onTooltipFocus:_,onTooltipKeyDown:B,onTriggerClick:M,onTriggerKeyDown:$,onTriggerMouseDown:F,onTriggerMouseUp:O,popover:K,popoverOpen:R,title:H,tooltipAriaLabel:P,tooltipAsModal:S,tooltipRef:U,triggerAsButton:z,...E})=>{const L=E["data-testid"]||"tooltip",q=n(E),G=`tooltip-${e().replace(/:/g,"")}`,J=`${G}-title`,Q=`${G}-content`,V=c(x),W=c(H),X="string"==typeof V.children,{isDesktop:Y,isMobile:Z,isTablet:oo}=s(),eo=Y||oo;if(k)/* @__PURE__ */
|
|
2
|
+
return o.jsx("div",{className:"kbt-tooltip","data-testid":L,children:/* @__PURE__ */o.jsx(m,{childrenAsButton:j,disabled:!0,children:h})});const to=b({contentId:Q,hasContent:!!x,hasTitle:!!W.children,titleId:J}),io={"data-align":v||l.TOP},so=n(io),lo=/* @__PURE__ */o.jsxs("div",{ref:U,"aria-label":eo?P:void 0,"aria-labelledby":eo?b({hasTitle:!!W.children,titleId:J}):void 0,"aria-modal":!(!eo||!S)||void 0,className:r("kbt-tooltip__external-container",y?.tooltipexternalcontainer),"data-testid":`${L}-content`,id:G,role:eo?S?"dialog":"tooltip":void 0,...eo&&{onFocus:_,onKeyDown:B},...q,children:[
|
|
3
|
+
/* @__PURE__ */o.jsxs("div",{className:y?.tooltipinternalcontainer,children:[(Z||oo)&&!!N&&/* @__PURE__ */o.jsx("div",{ref:T,className:y?.dragiconcontainer,"data-testid":`${L}-drag`,children:/* @__PURE__ */o.jsx(i,{className:y?.dragicon,...N})}),
|
|
4
|
+
/* @__PURE__ */o.jsxs("div",{className:r(y?.title,y?.headercontainer),style:(ro=!!W.children,no=!!u?.icon,ro&&no?{justifyContent:"space-between"}:ro?{justifyContent:"flex-end"}:no?{justifyContent:"flex-start"}:{display:"none"}),children:[a(u).icon&&/* @__PURE__ */o.jsx("div",{className:y?.closebuttoncontainer,children:/* @__PURE__ */o.jsx(d,{...a(u),className:y?.closebuttonicon,icon:a(u).icon,onClick:w})}),!!W.children&&/* @__PURE__ */o.jsx("div",{className:"kbt-tooltip__title",id:J,children:/* @__PURE__ */o.jsx(t,{additionalClasses:{text:y?.title},component:"h2",...W,children:W.children})})]}),
|
|
5
|
+
/* @__PURE__ */o.jsx("div",{ref:f,"aria-label":g?C?.["aria-label"]:void 0,"aria-labelledby":g?C?.["aria-labelledby"]:void 0,className:"kbt-tooltip__inner-content",role:g?"region":void 0,...g&&{tabIndex:0},children:!!x&&/* @__PURE__ */o.jsx("div",{className:r("kbt-tooltip__paragraph",y?.paragraphcontainer,{[`${y?.divider}`]:!!W.children}),id:Q,children:X?/* @__PURE__ */o.jsx(t,{additionalClasses:{text:y?.paragraph},...V}):V.children})})]}),
|
|
6
|
+
/* @__PURE__ */o.jsx("div",{...so,className:r("kbt-tooltip__arrow",y?.arrowsize,y?.tooltipalignstyles,y?.arrowcontainer),children:/* @__PURE__ */o.jsx("div",{className:y?.arrow})})]});var ro,no;/* @__PURE__ */
|
|
7
|
+
return o.jsxs("div",{ref:I,className:"kbt-tooltip","data-testid":L,children:[
|
|
8
|
+
/* @__PURE__ */o.jsx(m,{ariaDescribedBy:S||!eo&&!R?void 0:to,childrenAsButton:j,triggerAsButton:z,onClick:M,onKeyDown:$,onMouseDown:F,onMouseUp:O,children:h}),eo?lo:/* @__PURE__ */o.jsx(p,{additionalClasses:y?.popover?{arrow:"",popover:y.popover.popover||""}:void 0,"aria-label":K?.["aria-label"]||P,"aria-labelledby":b({hasTitle:!!W.children,titleId:J}),"aria-modal":S||void 0,component:"div",disableAutoFocusFirstDescendantAfterClose:!0,disableTrapFocus:!1,open:R,preventCloseOnClickElements:[I?.current],role:S?"dialog":"tooltip",strategy:"absolute",onClose:D,...K,children:lo})]})};export{v as TooltipStandAlone};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{ElementOrIcon as
|
|
2
|
-
return t.jsxs("div",{ref:C,className:s?.virtual_keyboard,"data-testid":
|
|
3
|
-
/* @__PURE__ */t.jsx("div",{className:s?.digitwrapper,...r(
|
|
4
|
-
/* @__PURE__ */t.jsx("button",{className:s?.removebutton,type:"button",onClick:u,children:/* @__PURE__ */t.jsx(
|
|
1
|
+
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as s,useId as o}from"react";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as e}from"../../lib/types/states/states.js";import{pickCustomAttributes as r}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{DigitButton as a}from"./components/digitButton.js";const n=s(({cssClasses:s,digits:n,icon:c,id:l,onDigitButtonClick:m,onRemoveButtonClick:u,onVirtualKeyboardBlur:d,onVirtualKeyboardFocus:p,state:b,...j},C)=>{const k=`virtualkeyboard-${o().replace(/:/g,"")}`,v=l??k,I={[e.ACTIVE]:b===e.ACTIVE,[e.INACTIVE]:b===e.INACTIVE},f=j["data-testid"]||"virtual-keyboard";/* @__PURE__ */
|
|
2
|
+
return t.jsxs("div",{ref:C,className:s?.virtual_keyboard,"data-testid":f,id:v,role:"presentation",onBlur:d,onFocus:p,...r(I),children:[
|
|
3
|
+
/* @__PURE__ */t.jsx("div",{className:s?.digitwrapper,...r(I),children:n?.map((o,i)=>/* @__PURE__ */t.jsx(a,{cssClasses:s,"data-testid":`${f}-digit-button-${i}`,digit:o,onClick:m},o))}),
|
|
4
|
+
/* @__PURE__ */t.jsx("button",{className:s?.removebutton,type:"button",onClick:u,children:/* @__PURE__ */t.jsx(i,{className:s?.iconcontainer,customAttributes:I,...c})})]})});export{n as VirtualKeyboardStandAlone};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as r,useCallback as e}from"react";import{
|
|
1
|
+
import{useRef as r,useCallback as e}from"react";import{scrollPercentage as t}from"./utils/scrollPercentage.js";const c=({conditional:c=!0,scrollCallback:n,shadowStyles:s,shadowVisible:l=1})=>{const u=r(null),o=r(null),a=r(null),i=r(0),p=r(0),d=e(()=>{if(!u.current)return;const r=t(u.current,1.25);if(o.current){const e=r*i.current/100,t=r*p.current/100;[{cssPropertyName:"min-height",cssPropertyValue:`calc(${i.current}px - ${e}px)`},{cssPropertyName:"height",cssPropertyValue:`calc(${i.current}px - ${e}px)`},{cssPropertyName:"min-width",cssPropertyValue:`calc(${p.current}px - ${t}px)`},{cssPropertyName:"width",cssPropertyValue:`calc(${p.current}px - ${t}px)`}].forEach(({cssPropertyName:r,cssPropertyValue:e})=>{o.current?.style.setProperty(r,e)})}a.current&&(r>l?a.current.classList.add(...s.split(" ")):a.current.classList.remove(...s.split(" ")))},[c,s,l]),m=e(r=>{r?(u.current=r,d(),u.current?.addEventListener("scroll",r=>{d(),n?.(r)})):(u.current?.removeEventListener("scroll",r=>{d(),n?.(r)}),u.current=null)},[d,n]);return{resizeRef:e(r=>{const e=()=>{o.current&&(i.current=o.current.clientHeight,p.current=o.current.clientWidth)};r?(o.current=r,o.current?.addEventListener("load",e)):(o.current?.removeEventListener("load",e),o.current=null)},[]),scrollableRef:m,shadowRef:e(r=>{a.current=r||null},[])}};export{c as useScrollEffect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const o=o=>o?"string"==typeof o?{icon:o}:o:{};export{o as processIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{isValidElement as t}from"react";const e=(e,n)=>{if(!e)return{children:null};let r;return"string"==typeof e||t(e)?r="string"==typeof e?e:void 0:"object"==typeof e&&"content"in e&&(r=e.content),n&&r&&(r=r.substring(0,n)),t(e)?{children:e}:"object"==typeof e?{children:r,...e}:{children:r}};export{e as processText};
|
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.6",
|
|
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",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.RenderIf=({children:e,condition:t})=>t?e:null;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t={};exports.useId=r=>{const[o]=e.useState(()=>(e=>(t[e]||(t[e]=0),t[e]++))(r||"$component$"));return`${r}${o}`};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.changeCssProperty=(e,t)=>{if(!(t.length<1))for(let r=0;r<t.length;r++)e.style.setProperty(t[r].cssPropertyName,t[r].cssPropertyValue)};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react");exports.isReactNode=t=>e.isValidElement(t);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.isString=t=>"string"==typeof t||t instanceof String;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const n=({children:n,condition:o})=>o?n:null;export{n as RenderIf};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useState as o}from"react";const t={},r=r=>{const[n]=o(()=>(o=>(t[o]||(t[o]=0),t[o]++))(r||"$component$"));return`${r}${n}`};export{r as useId};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(e,t)=>{if(!(t.length<1))for(let r=0;r<t.length;r++)e.style.setProperty(t[r].cssPropertyName,t[r].cssPropertyValue)};export{e as changeCssProperty};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{isValidElement as o}from"react";const r=r=>o(r);export{r as isReactNode};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const t=t=>"string"==typeof t||t instanceof String;export{t as isString};
|