@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.
Files changed (83) hide show
  1. package/dist/cjs/components/accordion/accordionStandAlone.js +1 -1
  2. package/dist/cjs/components/avatar/fragments/drawContent.js +1 -1
  3. package/dist/cjs/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +1 -1
  4. package/dist/cjs/components/calendar/selector/selector.js +1 -1
  5. package/dist/cjs/components/checkbox/checkboxStandAlone.js +1 -1
  6. package/dist/cjs/components/chip/chipStandAlone.js +1 -1
  7. package/dist/cjs/components/dataTable/dataTableStandAlone.js +1 -1
  8. package/dist/cjs/components/dropdownSelected/dropdownSelectedStandAlone.js +1 -1
  9. package/dist/cjs/components/input/input.js +1 -1
  10. package/dist/cjs/components/input/inputStandAlone.js +1 -1
  11. package/dist/cjs/components/inputBase/inputBase.js +1 -1
  12. package/dist/cjs/components/inputSignature/inputSignatureStandAlone.js +1 -1
  13. package/dist/cjs/components/label/labelStandAlone.js +1 -1
  14. package/dist/cjs/components/listOptions/listOptionsStandAlone.js +1 -1
  15. package/dist/cjs/components/message/messageStandAlone.js +1 -1
  16. package/dist/cjs/components/modal/fragments/modalHeader.js +1 -1
  17. package/dist/cjs/components/modal/modalStandAlone.js +1 -1
  18. package/dist/cjs/components/option/optionStandAlone.js +1 -1
  19. package/dist/cjs/components/pageControl/components/controls.js +1 -1
  20. package/dist/cjs/components/pageControl/pageControlStandAlone.js +1 -1
  21. package/dist/cjs/components/radioButton/radioButtonStandAlone.js +1 -1
  22. package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileAnimation.js +1 -1
  23. package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +1 -1
  24. package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileHeader.js +1 -1
  25. package/dist/cjs/components/selectorBoxFile/selectorBoxFileStandAlone.js +1 -1
  26. package/dist/cjs/components/slider/components/sliderHelperTextStandAlone.js +1 -1
  27. package/dist/cjs/components/slider/components/sliderScaleStandAlone.js +1 -1
  28. package/dist/cjs/components/slider/sliderStandAlone.js +1 -1
  29. package/dist/cjs/components/tabs/tabsStandAlone.js +1 -1
  30. package/dist/cjs/components/textArea/components/errorStandAlone.js +1 -1
  31. package/dist/cjs/components/textArea/textAreaStandAlone.js +1 -1
  32. package/dist/cjs/components/tooltip/tooltipStandAlone.js +1 -1
  33. package/dist/cjs/components/virtualKeyboard/virtualKeyboardStandAlone.js +1 -1
  34. package/dist/cjs/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
  35. package/dist/cjs/lib/utils/process/processIcon/processIcon.js +1 -1
  36. package/dist/cjs/lib/utils/process/processText/processText.js +1 -1
  37. package/dist/esm/components/accordion/accordionStandAlone.js +4 -4
  38. package/dist/esm/components/avatar/fragments/drawContent.js +1 -4
  39. package/dist/esm/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +3 -6
  40. package/dist/esm/components/calendar/selector/selector.js +7 -9
  41. package/dist/esm/components/checkbox/checkboxStandAlone.js +5 -7
  42. package/dist/esm/components/chip/chipStandAlone.js +8 -9
  43. package/dist/esm/components/dataTable/dataTableStandAlone.js +10 -14
  44. package/dist/esm/components/dropdownSelected/dropdownSelectedStandAlone.js +5 -6
  45. package/dist/esm/components/input/input.js +2 -2
  46. package/dist/esm/components/input/inputStandAlone.js +3 -5
  47. package/dist/esm/components/inputBase/inputBase.js +2 -2
  48. package/dist/esm/components/inputSignature/inputSignatureStandAlone.js +3 -4
  49. package/dist/esm/components/label/labelStandAlone.js +2 -3
  50. package/dist/esm/components/listOptions/listOptionsStandAlone.js +2 -4
  51. package/dist/esm/components/message/messageStandAlone.js +5 -10
  52. package/dist/esm/components/modal/fragments/modalHeader.js +3 -9
  53. package/dist/esm/components/modal/modalStandAlone.js +4 -5
  54. package/dist/esm/components/option/optionStandAlone.js +9 -12
  55. package/dist/esm/components/pageControl/components/controls.js +2 -4
  56. package/dist/esm/components/pageControl/pageControlStandAlone.js +6 -8
  57. package/dist/esm/components/radioButton/radioButtonStandAlone.js +4 -8
  58. package/dist/esm/components/selectorBoxFile/components/selectorBoxFileAnimation.js +3 -7
  59. package/dist/esm/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +9 -13
  60. package/dist/esm/components/selectorBoxFile/components/selectorBoxFileHeader.js +5 -9
  61. package/dist/esm/components/selectorBoxFile/selectorBoxFileStandAlone.js +7 -8
  62. package/dist/esm/components/slider/components/sliderHelperTextStandAlone.js +1 -3
  63. package/dist/esm/components/slider/components/sliderScaleStandAlone.js +2 -2
  64. package/dist/esm/components/slider/sliderStandAlone.js +17 -19
  65. package/dist/esm/components/tabs/tabsStandAlone.js +5 -6
  66. package/dist/esm/components/textArea/components/errorStandAlone.js +3 -3
  67. package/dist/esm/components/textArea/textAreaStandAlone.js +11 -12
  68. package/dist/esm/components/tooltip/tooltipStandAlone.js +8 -10
  69. package/dist/esm/components/virtualKeyboard/virtualKeyboardStandAlone.js +4 -4
  70. package/dist/esm/lib/hooks/useScrollEffect/useScrollEffect.js +1 -1
  71. package/dist/esm/lib/utils/process/processIcon/processIcon.js +1 -1
  72. package/dist/esm/lib/utils/process/processText/processText.js +1 -1
  73. package/package.json +1 -1
  74. package/dist/cjs/lib/components/renderIf/renderIf.js +0 -1
  75. package/dist/cjs/lib/hooks/useId/useId.js +0 -1
  76. package/dist/cjs/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
  77. package/dist/cjs/lib/utils/is/isReactNode.js +0 -1
  78. package/dist/cjs/lib/utils/is/isString.js +0 -1
  79. package/dist/esm/lib/components/renderIf/renderIf.js +0 -1
  80. package/dist/esm/lib/hooks/useId/useId.js +0 -1
  81. package/dist/esm/lib/utils/changeCssProperty/changeCssProperty.js +0 -1
  82. package/dist/esm/lib/utils/is/isReactNode.js +0 -1
  83. 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{LabelStandAlone as s}from"../label/labelStandAlone.js";import{Text as r}from"../text/text.js";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as t}from"../../lib/components/renderIf/renderIf.js";import{useId as a}from"../../lib/hooks/useId/useId.js";import{classNames as o}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as n}from"../../lib/utils/process/processText/processText.js";import{buildAriaLabelledBy as d}from"./utils/aria.utils.js";const c=({altVariant:c=!1,checked:m,cssClasses:b,disabled:u,error:p,errorAriaLiveType:j,errorIcon:x,errorMessage:h,id:f,label:I,lastChild:g,name:v,onBlur:C,onChange:N,screenReaderId:y,state:A,subTitle:k,tabIndex:_,value:B,...T})=>{let $=a("RadioButton");$=f??$;const M=n(k).id&&`${$}__description`,R=h&&`${$}__error`,O={"data-state":A},w=l(O),L=T["data-testid"]??"radio-button";/* @__PURE__ */
2
- return e.jsxs("div",{className:b?.rowcontainer,"data-testid":L,...w,style:{display:I?"grid":"block",marginBottom:g?0:void 0},children:[
3
- /* @__PURE__ */e.jsx("div",{...w,className:b?.radiobuttoncontainer,children:/* @__PURE__ */e.jsx("input",{"aria-describedby":d({descriptionId:M,error:p,errorMessage:h,errorMessageId:R,screenReaderId:y}),"aria-hidden":T["aria-hidden"],"aria-label":T["aria-label"],"aria-labelledby":T["aria-labelledby"],checked:m,className:o(b?.radio_button,{"global-focus-visible":!!c}),"data-testid":`${L}-input`,disabled:u,id:$,name:v,tabIndex:_,type:"radio",value:B,onBlur:C,onChange:N,...w})}),
4
- /* @__PURE__ */e.jsxs("div",{className:b?.infocontainer,children:[
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 i,isValidElement as n,cloneElement as e}from"react";import{RenderIf as o}from"../../../lib/components/renderIf/renderIf.js";import{pickCustomAttributes as a}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{useBorderAnimation as s}from"../hooks/useBorderAnimation.js";const r=({children:r,cssClasses:c,focus:m,onAnimationCompleted:d,percentage:l,state:f,...j})=>{const{bottomRef:p,leftRef:u,rightRef:x,topRef:h}=s({onAnimationCompleted:d,percentage:l}),b=a({...{"data-focus":m,"data-state":f}}),v=c?.animationcontainer,N=c?.topanimationcontainer,g=c?.rightanimationcontainer,A=c?.bottomanimationcontainer,C=c?.leftanimationcontainer,R=i.map(r,t=>n(t)?e(t,{focus:m}):t);return v?/* @__PURE__ */t.jsxs("div",{className:v,"data-focus":m,"data-testid":`${j["data-testid"]}-animations`,...b,children:[
2
- /* @__PURE__ */t.jsx(o,{condition:!!N,children:/* @__PURE__ */t.jsx("div",{...b,ref:h,className:N})}),
3
- /* @__PURE__ */t.jsx(o,{condition:!!g,children:/* @__PURE__ */t.jsx("div",{...b,ref:x,className:g})}),
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{RenderIf as o}from"../../../lib/components/renderIf/renderIf.js";import{STATES as e}from"../../../lib/types/states/states.js";import{pickCustomAttributes as i}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as c}from"../../../lib/utils/process/processText/processText.js";const a=({containerBoxStateContent:a,cssClasses:r,filename:l,focus:m,htmlFor:x,loader:d,state:p})=>{const u={"data-focus":m,"data-state":p};/* @__PURE__ */
2
- return t.jsxs("label",{className:r?.containerboxcontainer,"data-focus":m,htmlFor:x,...i(u),children:[
3
- /* @__PURE__ */t.jsxs("span",{children:[d,
4
- /* @__PURE__ */t.jsx(n,{className:r?.containerboxicon,customAttributes:u,...a[p]?.icon}),
5
- /* @__PURE__ */t.jsx(n,{className:r?.containerboxicon,customAttributes:u,...a[p]?.icon})]}),
6
- /* @__PURE__ */t.jsxs("span",{className:r?.containerboxtextscontainer,...i(u),children:[
7
- /* @__PURE__ */t.jsx(o,{condition:!!l&&[e.LOADING,e.SUCCESS,e.ERROR].includes(p),children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:r?.containerboxfilename},component:"span",customAttributes:u,children:l})}),
8
- /* @__PURE__ */t.jsxs("span",{className:r?.actiondescriptioncontainer,children:[
9
- /* @__PURE__ */t.jsx(o,{condition:!!c(a[p]?.actionText).children,children:/* @__PURE__ */t.jsxs("span",{className:r?.actioniconandactiontextcontainer,...i(u),children:[
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 i}from"../../button/button.js";import{Text as s}from"../../text/text.js";import{RenderIf as o}from"../../../lib/components/renderIf/renderIf.js";import{processText as e}from"../../../lib/utils/process/processText/processText.js";import{SelectorBoxFileTooltip as n}from"./selectorBoxFileTooltip.js";const r=({button:r,cssClasses:a,description:l,headerId:d,subtitle:c,title:x,tooltip:j,tooltipIcon:p})=>/* @__PURE__ */t.jsxs(t.Fragment,{children:[
2
- /* @__PURE__ */t.jsxs("div",{className:a?.titlesubtitlecontainer,id:d,children:[
3
- /* @__PURE__ */t.jsx(o,{condition:!!x,children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:a?.title},component:"h5",...e(x)})}),
4
- /* @__PURE__ */t.jsx(o,{condition:!!c,children:/* @__PURE__ */t.jsxs("div",{className:a?.actiondescriptioncontainer,children:[
5
- /* @__PURE__ */t.jsx(s,{additionalClasses:{text:a?.subtitle},...e(c)}),
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}from"react";import{RenderIf as o}from"../../lib/components/renderIf/renderIf.js";import{useId as t}from"../../lib/hooks/useId/useId.js";import{STATES as r}from"../../lib/types/states/states.js";import{SelectorBoxFileAnimation as i}from"./components/selectorBoxFileAnimation.js";import{SelectorBoxFileContainerBox as n}from"./components/selectorBoxFileContainerBox.js";import{SelectorBoxFileErrorMessage as a}from"./components/selectorBoxFileErrorMessage.js";import{SelectorBoxFileHeader as l}from"./components/selectorBoxFileHeader.js";const c=s(({accept:s,button:c,containerBoxStateContent:m,cssClasses:d,description:p,errorMessage:x,errorMessageIcon:f,filename:u,focus:j,id:C,multiple:b,name:I,onAnimationCompleted:h,onBlur:B,onChange:g,onClick:F,onFocus:M,percentage:v,state:k,subtitle:y,title:A,tooltip:E,tooltipIcon:$,...N},R)=>{const S=t("selectorBoxFile"),_=C??S,D=`${_}HeaderId`,H=`${_}ErrorId`,L=N["data-testid"]??"selector-box-file";/* @__PURE__ */
2
- return e.jsxs("div",{ref:R,children:[
3
- /* @__PURE__ */e.jsxs("div",{className:d?.selector_box_file,"data-testid":L,children:[
4
- /* @__PURE__ */e.jsxs("div",{className:d?.header,children:[
5
- /* @__PURE__ */e.jsx(o,{condition:!(!A&&!y),children:/* @__PURE__ */e.jsx(l,{button:c,cssClasses:d,description:p,headerId:D,subtitle:y,title:A,tooltip:E,tooltipIcon:$})}),
6
- /* @__PURE__ */e.jsx(i,{cssClasses:d,"data-testid":L,focus:j,percentage:v,state:k,onAnimationCompleted:h,children:/* @__PURE__ */e.jsx(n,{containerBoxStateContent:m,cssClasses:d,filename:u,focus:!1,htmlFor:_,state:k})})]}),
7
- /* @__PURE__ */e.jsx(a,{cssClasses:d,errorMessage:x,errorMessageIcon:f,errorMessageId:H,state:k})]}),
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";import{RenderIf as s}from"../../../lib/components/renderIf/renderIf.js";const r=({cssClasses:r,customAttributes:i,leftHelperText:n,leftHelperTextId:l,rightHelperText:o,rightHelperTextId:c})=>n||o?/* @__PURE__ */e.jsxs("div",{className:r?.helpertextcontainer,children:[
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 s}from"../../../_virtual/jsx-runtime.js";import{useState as t,useRef as r,useEffect as e}from"react";import{useId as o}from"../../../lib/hooks/useId/useId.js";import{pickCustomAttributes as c}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";const i=({cssClasses:i,customAttributes:l,scaleOffsets:u,showScale:a})=>{const n=o("tickmarks"),[m,p]=t("0px"),f=r(null);return e(()=>{f.current&&p(`${f.current.offsetWidth}px`)},[f.current]),a&&a?/* @__PURE__ */s.jsx("div",{className:i?.scalecontainer,id:n,...c(l),children:u.map((t,r)=>{const e={left:`calc(${t}% - ${m} / 2)`};/* @__PURE__ */
2
- return s.jsx("span",{className:i?.scaleoption,style:e},`${n}-${r.toString()}`)})}):null};export{i as SliderScaleStandAlone};
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}from"react";import{RenderIf as s}from"../../lib/components/renderIf/renderIf.js";import{useId as a}from"../../lib/hooks/useId/useId.js";import{classNames as r}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as o}from"../../lib/utils/process/processText/processText.js";import{Text as l}from"../text/text.js";import{SliderButtonStandAlone as c}from"./components/sliderButtonStandAlone.js";import{SliderHelperTextStandAlone as d}from"./components/sliderHelperTextStandAlone.js";import{SliderScaleStandAlone as n}from"./components/sliderScaleStandAlone.js";import{SliderThumbStandAlone as u}from"./components/sliderThumbStandAlone.js";import{buildAriaDescribedBy as m}from"./utils/accessibility.utils.js";import{getState as h}from"./utils/state.utils.js";import{isActive as p}from"./utils/ui.utils.js";const b=t(({activePointer:t,ariaLabel:b,ariaLabelBy:x,containerRef:v,cssClasses:f,decrementButton:j,disabled:T,hover:$,incrementButton:g,label:k,leftHelperText:y,max:A,min:I,offset:L,offsetLeft:C,offsetRight:N,onChange:w,onKeyPress:B,onMouseDown:S,onTouchStart:H,pressed:M,range:D,rightAriaLabel:O,rightAriaLabelBy:F,rightHelperText:K,rightThumbIcon:R,rightTooltip:P,scaleOffsets:_,setHover:q,showScale:z,step:E,thumbIcon:G,tooltip:J,value:Q,...U},V)=>{const W=a("slider"),X=h({disabled:T,hover:$,pressed:M}),Y={"data-state":X},Z=U["data-testid"]??"slider",ee=i(Y),te=o(k).children&&!D?`${W}Label`:void 0,se=`${W}LeftHelperText`,ae=`${W}RightHelperText`,re=x??te;/* @__PURE__ */
2
- return e.jsxs("div",{ref:V,className:f?.slider,"data-disabled":T,"data-hover":$,"data-pressed":M,...ee,children:[
3
- /* @__PURE__ */e.jsx("div",{className:f?.labelcontainer,...ee,children:/* @__PURE__ */e.jsx(l,{additionalClasses:{text:f?.label},component:"label",customAttributes:Y,id:te,...o(k)})}),
4
- /* @__PURE__ */e.jsx(n,{cssClasses:f,customAttributes:Y,scaleOffsets:_,showScale:z}),
5
- /* @__PURE__ */e.jsxs("div",{className:f?.buttonstrackscontainer,children:[
6
- /* @__PURE__ */e.jsx(c,{...j,cssClasses:f,customAttributes:Y}),
7
- /* @__PURE__ */e.jsx("div",{className:f?.tracksthumbscontainer,children:/* @__PURE__ */e.jsxs("div",{ref:v,className:f?.tracksthumbsinnercontainer,"data-testid":`${Z}-container`,role:"button",tabIndex:0,onMouseDown:S,onTouchMove:w,onTouchStart:H,children:[
8
- /* @__PURE__ */e.jsx(s,{condition:D,children:/* @__PURE__ */e.jsxs(e.Fragment,{children:[
9
- /* @__PURE__ */e.jsx("div",{className:r({[`${f?.activetrack}`]:!1,[`${f?.inactivetrack}`]:!0}),...ee,"data-disabled":T,"data-hover":$,"data-pressed":M,"data-testid":`${Z}-inactive-left-track`,style:{left:0,width:`${C}%`}}),
10
- /* @__PURE__ */e.jsx("div",{className:r({[`${f?.activetrack}`]:!0,[`${f?.inactivetrack}`]:!1}),"data-disabled":T,"data-hover":$,"data-pressed":M,"data-testid":`${Z}-active-track`,style:{left:`${C}%`,right:`${N}%`},...ee}),
11
- /* @__PURE__ */e.jsx("div",{className:r({[`${f?.activetrack}`]:!1,[`${f?.inactivetrack}`]:!0}),"data-disabled":T,"data-hover":$,"data-pressed":M,"data-testid":`${Z}-inactive-right-track`,style:{right:0,width:`${N}%`},...ee}),
12
- /* @__PURE__ */e.jsx(u,{ariaDescribedBy:m([{helperText:y,helperTextId:se},{helperText:K,helperTextId:ae}]),ariaLabel:b,ariaLabelBy:re,cssClasses:f,customAttributes:Y,"data-testid":`${Z}-left-thumb`,disabled:T,hover:p($,t.current,"left"),icon:G,max:Q[1]-E,min:I,pressed:p(M,t.current,"left"),state:X,style:{left:`${C}%`},tooltip:J,value:Q[0],onFocus:()=>t.current="left",onKeyDown:B,onMouseOut:()=>q(!1),onMouseOver:()=>{q(!0),t.current="left"},onTouchStart:()=>{t.current="left"}}),
13
- /* @__PURE__ */e.jsx(u,{ariaDescribedBy:m([{helperText:y,helperTextId:se},{helperText:K,helperTextId:ae}]),ariaLabel:O,ariaLabelBy:F,cssClasses:f,customAttributes:Y,"data-testid":`${Z}-right-thumb`,disabled:T,hover:p($,t.current,"right"),icon:R,max:A,min:Q[0]+E,pressed:p(M,t.current,"right"),rightThumb:!0,state:X,style:{right:`${N}%`},tooltip:P,value:Q[1],onFocus:()=>t.current="right",onKeyDown:B,onMouseOut:()=>q(!1),onMouseOver:()=>{q(!0),t.current="right"},onTouchStart:()=>{t.current="right"}})]})}),
14
- /* @__PURE__ */e.jsx(s,{condition:!D,children:/* @__PURE__ */e.jsxs(e.Fragment,{children:[
15
- /* @__PURE__ */e.jsx("div",{className:r({[`${f?.activetrack}`]:!0,[`${f?.inactivetrack}`]:!1}),"data-disabled":T,"data-hover":$,"data-pressed":M,"data-testid":`${Z}-active-track`,style:{width:`${L}%`},...ee}),
16
- /* @__PURE__ */e.jsx("div",{className:r({[`${f?.activetrack}`]:!1,[`${f?.inactivetrack}`]:!0}),"data-disabled":T,"data-hover":$,"data-pressed":M,"data-testid":`${Z}-inactive-track`,style:{right:0,width:`calc(${100-L}%)`},...ee}),
17
- /* @__PURE__ */e.jsx(u,{ariaDescribedBy:m([{helperText:y,helperTextId:se},{helperText:K,helperTextId:ae}]),ariaLabel:b,ariaLabelBy:re,cssClasses:f,customAttributes:Y,"data-testid":`${Z}-thumb`,disabled:T,hover:$,icon:G,max:A,min:I,pressed:M,state:X,style:{left:`${L}%`},tooltip:J,value:Q,onKeyDown:B,onMouseOut:()=>q(!1),onMouseOver:()=>q(!0)})]})})]})}),
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 a}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{ItemRove as i}from"../../lib/components/itemRove/itemRove.js";import{RenderIf as o}from"../../lib/components/renderIf/renderIf.js";import{useId as n}from"../../lib/hooks/useId/useId.js";import{useActiveBreakpoints as l}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.js";import{STATES as r}from"../../lib/types/states/states.js";import{classNames as c}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as b}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as d}from"../../lib/utils/process/processText/processText.js";import{useTabs as m}from"./hooks/useTabs/useTabs.js";const u=e(({allowFocusTabPanel:e=!0,autoWidth:u=!1,content:p,cssClasses:h,device:j,hideLabelForSingleTab:f,leftControlAriaLabel:x,leftIcon:$,maxTabsInView:T=3,onSelectTab:I,rightControlAriaLabel:v,rightIcon:C,selectedTab:N,tabs:k,unMountContent:g=!0,...S},y)=>{const{isMobile:A}=l(),E=n("Tabs"),L=`${E}-tab-list`,w=`${E}-tab-panel`,D=k?.length??0,F=Math.min(D,T),{focus:M,handleClickIcon:O,handleClickTab:R,listEl:V,position:W}=m({numTabsInView:F,selectedTab:N,tabsLength:D}),B=0===W,P=W>=D-F,U=S["data-testid"]||"tabs",_=b(S),q=e=>{const s="left"===e,i=s?B:P;/* @__PURE__ */
2
- return t.jsx(o,{condition:D>F,children:/* @__PURE__ */t.jsx("button",{"aria-label":s?x:v,className:h?.arrowiconcontainer,"data-position":s?"left":"right","data-testid":`${U}-icon-${e}`,disabled:i,tabIndex:0,type:"button",onClick:()=>{i||O(!s)},children:/* @__PURE__ */t.jsx(a,{className:h?.icon,customAttributes:{"data-disabled":i},"data-position":s?"left":"right",...s?$:C})})})};/* @__PURE__ */
3
- return t.jsxs("div",{ref:y,className:h?.tabs,"data-testid":U,..._,children:[
4
- /* @__PURE__ */t.jsxs("div",{className:h?.container,children:[q("left"),
5
- /* @__PURE__ */t.jsx("div",{ref:V,className:h?.tabbuttonscontainer,id:L,role:"tablist",children:k?.map((e,a)=>{const o=N===a,n=o?r.SELECTED:r.UNSELECTED,l=a>=W&&a<W+F,m={"data-state":n};/* @__PURE__ */
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 r}from"../../text/text.js";import{ElementOrIcon as s}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as t}from"../../../lib/components/renderIf/renderIf.js";import{STATES as o}from"../../../lib/types/states/states.js";import{processText as i}from"../../../lib/utils/process/processText/processText.js";const n=({cssClasses:n,customAttributtes:c,errorAriaLiveType:m,errorIcon:a,errorMessage:l,id:p,state:d})=>/* @__PURE__ */e.jsx("div",{"aria-live":m,className:n?.errorcontainer,id:p,...c,children:/* @__PURE__ */e.jsx(t,{condition:!!i(l).children&&d===o.ERROR,children:/* @__PURE__ */e.jsxs(e.Fragment,{children:[
2
- /* @__PURE__ */e.jsx(s,{className:n?.erroricon,customAttributes:c,...a}),
3
- /* @__PURE__ */e.jsx(r,{additionalClasses:{text:n?.errormessage},component:"p",customAttributes:c,...i(l),children:i(l).children})]})})});export{n as ErrorStandAlone};
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 s}from"../label/labelStandAlone.js";import{RenderIf as r}from"../../lib/components/renderIf/renderIf.js";import{useId as o}from"../../lib/hooks/useId/useId.js";import{STATES as a}from"../../lib/types/states/states.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as n}from"../../lib/utils/process/processText/processText.js";import{ErrorStandAlone as l}from"./components/errorStandAlone.js";import{HelpMessageStandAlone as c}from"./components/helpMessageStandAlone.js";import{TextCount as d}from"./components/textCount/textCount.js";import{TitleStandAlone as m}from"./components/titleStandAlone.js";import{buildAriaDescribedBy as u}from"./utils/aria.utils.js";const x=t(({additionalInfo:t,counterVariant:x,cssClasses:p,errorAriaLiveType:h="assertive",errorIcon:j,errorMessage:b,height:f,helpMessage:g,id:C,label:A,labelInsideTextArea:I,maxLength:v,onBlur:T,onChange:y,onFocus:E,placeholder:L,required:k,screenReaderTextCount:M,spellCheck:B,state:D,title:N,value:S,..._},q)=>{const F=o("textArea"),$=C??F,H=`${$}HelpText`,R=`${$}Error`,w=`${$}TextCount`,K=i({"data-state":D}),P=[a.DISABLED_EMPTY,a.DISABLED_FILLED].includes(D);/* @__PURE__ */
2
- return e.jsxs("div",{ref:q,className:p?.text_area,"data-testid":"text-area",...K,...i(_),children:[
3
- /* @__PURE__ */e.jsx(m,{cssClasses:p,customAttributtes:K,title:N}),
4
- /* @__PURE__ */e.jsxs("div",{className:p?.labeltextareacontainer,role:"button",style:{height:I?f:void 0},tabIndex:0,onClick:()=>document.getElementById($)?.focus(),onKeyDown:e=>{"Enter"===e.key&&document.getElementById($)?.focus()},children:[
5
- /* @__PURE__ */e.jsxs("div",{className:p?.labelandadditionalinfocontainer,children:[
6
- /* @__PURE__ */e.jsx(s,{asteriskCssClasses:p?.required,customAttributes:K,inputId:$,required:k,textCssClasses:p?.label,...n(A),children:n(A).children}),t]}),
7
- /* @__PURE__ */e.jsx("textarea",{"aria-describedby":u({errorMessage:n(b).children,helpMessage:n(g).children,state:D,textAreaErrorId:R,textAreaHelpTextId:H}),className:p?.textarea,disabled:P,id:$,maxLength:v,placeholder:L,required:k,spellCheck:B,style:{height:f||void 0},value:S,onBlur:T,onChange:y,onFocus:E,...K,children:S})]}),
8
- /* @__PURE__ */e.jsxs("div",{className:p?.bottomcontainer,...K,children:[
9
- /* @__PURE__ */e.jsxs("div",{className:p?.helpmessageerrorcontainer,...K,children:[
10
- /* @__PURE__ */e.jsx(l,{cssClasses:p,customAttributtes:K,errorAriaLiveType:h,errorIcon:j,errorMessage:b,id:R,state:D}),
11
- /* @__PURE__ */e.jsx(c,{cssClasses:p,customAttributtes:K,helpMessage:g,id:H})]}),
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{Text as e}from"../text/text.js";import{ElementOrIcon as i}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as t}from"../../lib/components/renderIf/renderIf.js";import{useId as s}from"../../lib/hooks/useId/useId.js";import{useActiveBreakpoints as r}from"../../lib/hooks/useMediaDevice/useActiveBreakpoints.js";import{POSITIONS as l}from"../../lib/types/positions/positions.js";import{classNames as n}from"../../lib/utils/classNames/classNames.js";import{isString as a}from"../../lib/utils/is/isString.js";import{pickCustomAttributes as c}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processIcon as d}from"../../lib/utils/process/processIcon/processIcon.js";import{processText as p}from"../../lib/utils/process/processText/processText.js";import{IconHost as m}from"../icon/iconHost.js";import{Popover as b}from"../popover/popover.js";import{TooltipTrigger as j}from"./components/tooltipTrigger.js";import{getAriaDescriptorsBy as h}from"./utils/tooltip.utils.js";const u=({align:u,children:v,childrenAsButton:x=!0,closeIcon:f,content:g,contentHasScroll:C,contentRef:k,contentScrollArias:y,cssClasses:I,disabled:N,dragIcon:T,dragIconRef:A,labelRef:w,mediaDevice:D,onCloseIconClick:_,onPopoverCloseInternally:B,onTooltipFocus:M,onTooltipKeyDown:F,onTriggerClick:O,onTriggerKeyDown:$,onTriggerMouseDown:K,onTriggerMouseUp:R,popover:S,popoverOpen:H,title:P,tooltipAriaLabel:U,tooltipAsModal:z,tooltipRef:E,triggerAsButton:L,...q})=>{const G=q["data-testid"]||"tooltip",J=c(q),Q=s("tooltip"),V=`${Q}Title`,W=`${Q}Content`,X=p(g),Y=p(P),Z=a(X.children),{isDesktop:oo,isMobile:eo,isTablet:io}=r(),to=oo||io;if(N)/* @__PURE__ */
2
- return o.jsx("div",{className:"kbt-tooltip","data-testid":G,children:/* @__PURE__ */o.jsx(j,{childrenAsButton:x,disabled:!0,children:v})});const so=h({contentId:W,hasContent:!!g,hasTitle:!!Y.children,titleId:V}),ro={"data-align":u||l.TOP},lo=c(ro),no=/* @__PURE__ */o.jsxs("div",{ref:E,"aria-label":to?U:void 0,"aria-labelledby":to?h({hasTitle:!!Y.children,titleId:V}):void 0,"aria-modal":!(!to||!z)||void 0,className:n("kbt-tooltip__external-container",I?.tooltipexternalcontainer),"data-testid":`${G}-content`,id:Q,role:to?z?"dialog":"tooltip":void 0,...to&&{onFocus:M,onKeyDown:F},...J,children:[
3
- /* @__PURE__ */o.jsxs("div",{className:I?.tooltipinternalcontainer,children:[
4
- /* @__PURE__ */o.jsx(t,{condition:(eo||io)&&!!T,children:/* @__PURE__ */o.jsx("div",{ref:A,className:I?.dragiconcontainer,"data-testid":`${G}-drag`,children:/* @__PURE__ */o.jsx(i,{className:I?.dragicon,...T})})}),
5
- /* @__PURE__ */o.jsxs("div",{className:n(I?.title,I?.headercontainer),style:(ao=!!Y.children,co=!!f?.icon,ao&&co?{justifyContent:"space-between"}:ao?{justifyContent:"flex-end"}:co?{justifyContent:"flex-start"}:{display:"none"}),children:[d(f).icon&&/* @__PURE__ */o.jsx("div",{className:I?.closebuttoncontainer,children:/* @__PURE__ */o.jsx(m,{...d(f),className:I?.closebuttonicon,icon:d(f).icon,onClick:_})}),
6
- /* @__PURE__ */o.jsx(t,{condition:!!Y.children,children:/* @__PURE__ */o.jsx("div",{className:"kbt-tooltip__title",id:V,children:/* @__PURE__ */o.jsx(e,{additionalClasses:{text:I?.title},component:"h2",...Y,children:Y.children})})})]}),
7
- /* @__PURE__ */o.jsx("div",{ref:k,"aria-label":C?y?.["aria-label"]:void 0,"aria-labelledby":C?y?.["aria-labelledby"]:void 0,className:"kbt-tooltip__inner-content",role:C?"region":void 0,...C&&{tabIndex:0},children:/* @__PURE__ */o.jsx(t,{condition:!!g,children:/* @__PURE__ */o.jsx("div",{className:n("kbt-tooltip__paragraph",I?.paragraphcontainer,{[`${I?.divider}`]:!!Y.children}),id:W,children:Z?/* @__PURE__ */o.jsx(e,{additionalClasses:{text:I?.paragraph},...X}):X.children})})})]}),
8
- /* @__PURE__ */o.jsx("div",{...lo,className:n("kbt-tooltip__arrow",I?.arrowsize,I?.tooltipalignstyles,I?.arrowcontainer),children:/* @__PURE__ */o.jsx("div",{className:I?.arrow})})]});var ao,co;/* @__PURE__ */
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 o}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{useId as i}from"../../lib/hooks/useId/useId.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:l,id:m,onDigitButtonClick:c,onRemoveButtonClick:u,onVirtualKeyboardBlur:d,onVirtualKeyboardFocus:p,state:b,...j},C)=>{const I=i("virtualKeyboard"),k=m??I,f={[e.ACTIVE]:b===e.ACTIVE,[e.INACTIVE]:b===e.INACTIVE},v=j["data-testid"]||"virtual-keyboard";/* @__PURE__ */
2
- return t.jsxs("div",{ref:C,className:s?.virtual_keyboard,"data-testid":v,id:k,role:"presentation",onBlur:d,onFocus:p,...r(f),children:[
3
- /* @__PURE__ */t.jsx("div",{className:s?.digitwrapper,...r(f),children:n?.map((o,i)=>/* @__PURE__ */t.jsx(a,{cssClasses:s,"data-testid":`${v}-digit-button-${i}`,digit:o,onClick:c},o))}),
4
- /* @__PURE__ */t.jsx("button",{className:s?.removebutton,type:"button",onClick:u,children:/* @__PURE__ */t.jsx(o,{className:s?.iconcontainer,customAttributes:f,...l})})]})});export{n as VirtualKeyboardStandAlone};
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{changeCssProperty as t}from"../../utils/changeCssProperty/changeCssProperty.js";import{scrollPercentage as c}from"./utils/scrollPercentage.js";const n=({conditional:n=!0,scrollCallback:s,shadowStyles:l,shadowVisible:u=1})=>{const o=r(null),a=r(null),i=r(null),p=r(0),d=r(0),m=e(()=>{if(!o.current)return;const r=c(o.current,1.25);if(a.current){const e=r*p.current/100,c=r*d.current/100,n=[{cssPropertyName:"min-height",cssPropertyValue:`calc(${p.current}px - ${e}px)`},{cssPropertyName:"height",cssPropertyValue:`calc(${p.current}px - ${e}px)`},{cssPropertyName:"min-width",cssPropertyValue:`calc(${d.current}px - ${c}px)`},{cssPropertyName:"width",cssPropertyValue:`calc(${d.current}px - ${c}px)`}];t(a.current,n)}i.current&&(r>u?i.current.classList.add(...l.split(" ")):i.current.classList.remove(...l.split(" ")))},[n,l,u]),h=e(r=>{r?(o.current=r,m(),o.current?.addEventListener("scroll",r=>{m(),s?.(r)})):(o.current?.removeEventListener("scroll",r=>{m(),s?.(r)}),o.current=null)},[m,s]);return{resizeRef:e(r=>{const e=()=>{a.current&&(p.current=a.current.clientHeight,d.current=a.current.clientWidth)};r?(a.current=r,a.current?.addEventListener("load",e)):(a.current?.removeEventListener("load",e),a.current=null)},[]),scrollableRef:h,shadowRef:e(r=>{i.current=r||null},[])}};export{n as useScrollEffect};
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
- import{isString as i}from"../../is/isString.js";const o=o=>o?i(o)?{icon:o}:o:{};export{o as processIcon};
1
+ const o=o=>o?"string"==typeof o?{icon:o}:o:{};export{o as processIcon};
@@ -1 +1 @@
1
- import{isReactNode as t}from"../../is/isReactNode.js";import{isString as e}from"../../is/isString.js";const i=(i,n)=>{if(!i)return{children:null};let r;return e(i)||t(i)?r=e(i)?i:void 0:"object"==typeof i&&"content"in i&&(r=i.content),n&&r&&(r=r.substring(0,n)),t(i)?{children:i}:"object"==typeof i?{children:r,...i}:{children:r}};export{i as processText};
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.4",
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};