@kubit-ui-web/react-components 2.0.0-beta.3 → 2.0.0-beta.4
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/avatar/fragments/drawContent.js +1 -1
- package/dist/cjs/components/badge/badgeStandAlone.js +1 -1
- package/dist/cjs/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +1 -1
- package/dist/cjs/components/button/buttonStandAlone.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/checkboxBase/checkboxBaseStandAlone.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/inputStandAlone.js +1 -1
- package/dist/cjs/components/inputDecoration/inputDecorationStandAlone.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/link/linkStandAlone.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/arrowControlStandAlone.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/pagination/fragments/paginationButtonControl.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/selectorBoxFileErrorMessage.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileHeader.js +1 -1
- package/dist/cjs/components/selectorBoxFile/components/selectorBoxFileTooltip.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/sliderThumbStandAlone.js +1 -1
- package/dist/cjs/components/slider/sliderStandAlone.js +1 -1
- package/dist/cjs/components/stepperNumber/stepperNumberStandAlone.js +1 -1
- package/dist/cjs/components/tabs/tabsStandAlone.js +1 -1
- package/dist/cjs/components/tag/tagStandAlone.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/toggle/toggleStandAlone.js +1 -1
- package/dist/cjs/components/tooltip/tooltipStandAlone.js +1 -1
- package/dist/cjs/components/virtualKeyboard/virtualKeyboardStandAlone.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/components/elementOrIcon/elementOrIcon.js +1 -0
- package/dist/cjs/lib/components/errorMessage/errorMessageStandAlone.js +1 -1
- package/dist/cjs/lib/components/itemRove/itemRove.js +1 -0
- package/dist/cjs/lib/components/overlay/overlay.js +1 -0
- package/dist/cjs/lib/components/overlay/overlayStandAlone.js +1 -0
- package/dist/esm/components/avatar/fragments/drawContent.js +4 -4
- package/dist/esm/components/badge/badgeStandAlone.js +7 -9
- package/dist/esm/components/breadcrumbs/components/crumbStandAlone/crumbStandAlone.js +6 -6
- package/dist/esm/components/button/buttonStandAlone.js +3 -5
- package/dist/esm/components/calendar/selector/selector.js +7 -7
- package/dist/esm/components/checkbox/checkboxStandAlone.js +2 -2
- package/dist/esm/components/checkboxBase/checkboxBaseStandAlone.js +4 -4
- package/dist/esm/components/chip/chipStandAlone.js +7 -7
- package/dist/esm/components/dataTable/dataTableStandAlone.js +8 -8
- package/dist/esm/components/dropdownSelected/dropdownSelectedStandAlone.js +6 -6
- package/dist/esm/components/input/inputStandAlone.js +2 -2
- package/dist/esm/components/inputDecoration/inputDecorationStandAlone.js +2 -2
- package/dist/esm/components/inputSignature/inputSignatureStandAlone.js +3 -3
- package/dist/esm/components/label/labelStandAlone.js +3 -3
- package/dist/esm/components/link/linkStandAlone.js +3 -3
- package/dist/esm/components/listOptions/listOptionsStandAlone.js +3 -3
- package/dist/esm/components/message/messageStandAlone.js +10 -10
- package/dist/esm/components/modal/fragments/modalHeader.js +7 -7
- package/dist/esm/components/modal/modalStandAlone.js +5 -5
- package/dist/esm/components/option/optionStandAlone.js +9 -9
- package/dist/esm/components/pageControl/components/arrowControlStandAlone.js +2 -2
- package/dist/esm/components/pageControl/components/controls.js +1 -1
- package/dist/esm/components/pageControl/pageControlStandAlone.js +1 -1
- package/dist/esm/components/pagination/fragments/paginationButtonControl.js +2 -2
- package/dist/esm/components/radioButton/radioButtonStandAlone.js +6 -6
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileAnimation.js +6 -6
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileContainerBox.js +9 -9
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileErrorMessage.js +3 -3
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileHeader.js +7 -7
- package/dist/esm/components/selectorBoxFile/components/selectorBoxFileTooltip.js +1 -1
- package/dist/esm/components/selectorBoxFile/selectorBoxFileStandAlone.js +7 -7
- package/dist/esm/components/slider/components/sliderHelperTextStandAlone.js +3 -3
- package/dist/esm/components/slider/components/sliderThumbStandAlone.js +1 -1
- package/dist/esm/components/slider/sliderStandAlone.js +4 -4
- package/dist/esm/components/stepperNumber/stepperNumberStandAlone.js +8 -8
- package/dist/esm/components/tabs/tabsStandAlone.js +4 -4
- package/dist/esm/components/tag/tagStandAlone.js +4 -4
- package/dist/esm/components/textArea/components/errorStandAlone.js +3 -3
- package/dist/esm/components/textArea/textAreaStandAlone.js +1 -1
- package/dist/esm/components/toggle/toggleStandAlone.js +4 -4
- package/dist/esm/components/tooltip/tooltipStandAlone.js +7 -7
- package/dist/esm/components/virtualKeyboard/virtualKeyboardStandAlone.js +4 -4
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/components/elementOrIcon/elementOrIcon.js +1 -0
- package/dist/esm/lib/components/errorMessage/errorMessageStandAlone.js +3 -3
- package/dist/esm/lib/components/itemRove/itemRove.js +2 -0
- package/dist/esm/lib/components/overlay/overlay.js +2 -0
- package/dist/esm/lib/components/overlay/overlayStandAlone.js +2 -0
- package/dist/types/index.d.ts +10 -2
- package/package.json +1 -1
- package/dist/cjs/components/elementOrIcon/elementOrIcon.js +0 -1
- package/dist/cjs/components/elementOrIcon/index.js +0 -2
- package/dist/cjs/components/itemRove/index.js +0 -2
- package/dist/cjs/components/itemRove/itemRove.js +0 -1
- package/dist/cjs/components/overlay/index.js +0 -1
- package/dist/cjs/components/overlay/overlay.js +0 -1
- package/dist/cjs/components/overlay/overlayStandAlone.js +0 -1
- package/dist/esm/components/elementOrIcon/elementOrIcon.js +0 -1
- package/dist/esm/components/elementOrIcon/index.js +0 -1
- package/dist/esm/components/itemRove/index.js +0 -1
- package/dist/esm/components/itemRove/itemRove.js +0 -2
- package/dist/esm/components/overlay/index.js +0 -1
- package/dist/esm/components/overlay/overlay.js +0 -2
- package/dist/esm/components/overlay/overlayStandAlone.js +0 -2
- /package/dist/cjs/{components → lib/components}/renderIf/renderIf.js +0 -0
- /package/dist/esm/{components → lib/components}/renderIf/renderIf.js +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{j as e}from"../../../_virtual/jsx-runtime.js";import{Text as i}from"../../text/text.js";import{
|
|
1
|
+
import{j as e}from"../../../_virtual/jsx-runtime.js";import{Text as i}from"../../text/text.js";import{ElementOrIcon as n}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as s}from"../../../lib/components/renderIf/renderIf.js";import{useActiveBreakpoints as o}from"../../../lib/hooks/useMediaDevice/useActiveBreakpoints.js";import{processText as t}from"../../../lib/utils/process/processText/processText.js";import{Button as c}from"../../button/button.js";const r=({blocked:r,closeButton:a,closeIcon:l,cssClasses:d,dragIcon:m,title:j,titleIdFinal:x})=>{const{isMobileOrTablet:h}=o();/* @__PURE__ */
|
|
2
2
|
return e.jsxs("div",{className:d?.headercontainer,"data-modal-header":!0,children:[
|
|
3
|
-
/* @__PURE__ */e.jsx(
|
|
3
|
+
/* @__PURE__ */e.jsx(s,{condition:h&&!r&&!!m,children:/* @__PURE__ */e.jsx("div",{className:d?.dragiconcontainer,"data-modal-draggable-icon":!0,children:/* @__PURE__ */e.jsx(n,{className:d?.dragicon,...m})})}),
|
|
4
4
|
/* @__PURE__ */e.jsxs("div",{className:d?.headercontentcontainer,children:[
|
|
5
|
-
/* @__PURE__ */e.jsx(
|
|
6
|
-
/* @__PURE__ */e.jsx(
|
|
7
|
-
/* @__PURE__ */e.jsx(
|
|
8
|
-
/* @__PURE__ */e.jsx(
|
|
9
|
-
/* @__PURE__ */e.jsx(
|
|
5
|
+
/* @__PURE__ */e.jsx(s,{condition:!r&&!!l?.icon,children:/* @__PURE__ */e.jsx("div",{className:d?.closebuttoncontainer,children:/* @__PURE__ */e.jsx(n,{className:d?.closebuttonicon,...l})})}),
|
|
6
|
+
/* @__PURE__ */e.jsx(s,{condition:!r&&!!a?.content&&!!a?.variant,children:/* @__PURE__ */e.jsx(c,{...a,variant:a?.variant,children:a?.content})}),
|
|
7
|
+
/* @__PURE__ */e.jsx(s,{condition:void 0===j?.visible||j.visible,children:/* @__PURE__ */e.jsx("div",{className:d?.titlecontainer,children:/* @__PURE__ */e.jsx(i,{additionalClasses:{text:d?.title},component:"h1",id:x,...t(j)})})}),
|
|
8
|
+
/* @__PURE__ */e.jsx(s,{condition:!1===j?.visible,children:/* @__PURE__ */e.jsx("span",{className:d?.titlehiddencontainer,id:x,children:t(j).children})}),
|
|
9
|
+
/* @__PURE__ */e.jsx(s,{condition:!r&&!!l?.icon,children:/* @__PURE__ */e.jsx("div",{className:d?.closebuttoncontainer,children:/* @__PURE__ */e.jsx("span",{className:d?.closebuttonicon})})})]})]})};export{r as ModalHeader};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as o}from"react";import{
|
|
2
|
-
return e.jsx(r,{"aria-labelledby":O,"aria-modal":N,component:"div",disableClickOverlayClose:o,disableEscapeClose:o,disableTrapFocus:!1,id:E,open:N,overlay:/* @__PURE__ */e.jsx(
|
|
3
|
-
/* @__PURE__ */e.jsx(n,{blocked:o,closeButton:m,closeIcon:c,cssClasses:
|
|
4
|
-
/* @__PURE__ */e.jsx("div",{"aria-label":h?j?.["aria-label"]:void 0,"aria-labelledby":h?j?.["aria-labelledby"]:void 0,className:
|
|
5
|
-
/* @__PURE__ */e.jsx(
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as o}from"react";import{Overlay as t}from"../../lib/components/overlay/overlay.js";import{RenderIf as i}from"../../lib/components/renderIf/renderIf.js";import{useId as s}from"../../lib/hooks/useId/useId.js";import{processText as a}from"../../lib/utils/process/processText/processText.js";import{NabVar as l}from"../navBar/navBar.js";import{Popover as r}from"../popover/popover.js";import{ModalHeader as n}from"./fragments/modalHeader.js";import{onlyDesktopSize as d}from"./utils/onlyDesktopSize.js";const m=o(({blocked:o,closeButton:m,closeIcon:c,content:p,contentContainer:v,contentHasScroll:h,contentScrollArias:j,cssClasses:b,customHeightAllDevices:x=!1,customWidthAllDevices:f=!1,device:g,dragIcon:y,footer:u,id:I,maxHeight:C,maxWidth:H,minContentHeight:k,minHeight:B,minWidth:W,onKeyDown:D,onPopoverCloseInternally:A,open:N,popover:S,title:T,...F},w)=>{const z=s("modal"),E=I??z,K=s("modal-title"),O=a(T).id??K,P=u?.variant,$=F["data-testid"]||"modal";/* @__PURE__ */
|
|
2
|
+
return e.jsx(r,{"aria-labelledby":O,"aria-modal":N,component:"div",disableClickOverlayClose:o,disableEscapeClose:o,disableTrapFocus:!1,id:E,open:N,overlay:/* @__PURE__ */e.jsx(t,{}),role:"dialog",strategy:"fixed",onClose:A,...S,children:/* @__PURE__ */e.jsxs("div",{ref:w,className:b?.modal,"data-testid":$,style:{maxHeight:C,maxWidth:H,minHeight:x?B:d(g,B),minWidth:f?W:d(g,W),paddingBottom:u?.rightItems?"0":void 0},children:[
|
|
3
|
+
/* @__PURE__ */e.jsx(n,{blocked:o,closeButton:m,closeIcon:c,cssClasses:b,device:g,dragIcon:y,title:T,titleIdFinal:O}),
|
|
4
|
+
/* @__PURE__ */e.jsx("div",{"aria-label":h?j?.["aria-label"]:void 0,"aria-labelledby":h?j?.["aria-labelledby"]:void 0,className:b?.content,"data-modal-content":!0,"data-testid":`${$}-content`,role:h?"region":void 0,style:{minHeight:k},...h?{tabIndex:0}:{},...v,children:p}),
|
|
5
|
+
/* @__PURE__ */e.jsx(i,{condition:!!P&&!!u,children:/* @__PURE__ */e.jsx("div",{className:b?.footer,children:/* @__PURE__ */e.jsx(l,{variant:P,...u})})})]})})});export{m as ModalStandAlone};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{
|
|
2
|
-
return t.jsxs(
|
|
1
|
+
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{Text as e}from"../text/text.js";import{ElementOrIcon as o}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as i}from"../../lib/components/renderIf/renderIf.js";import{STATES as n}from"../../lib/types/states/states.js";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as r}from"../../lib/utils/process/processText/processText.js";import{CustomComponent as c}from"../../lib/components/customComponent/customComponent.js";import{isKeyEnterPressed as a,isKeySpacePressed as m}from"../../lib/utils/keyboard/keyboard.js";import{OptionLabelSlice as d}from"./components.ts/optionLabelSlice.js";import{getState as u,getHighlightedIndexes as b}from"./utils/option.utils.js";const p=s(({checkedIcon:s,component:p,componentLink:h,cssClasses:j,disabled:x,extraContent:g,focus:f,hover:C,icon:E,label:I,labelCharsHighlighted:L,multiSelect:k,onBlur:A,onClick:v,onFocus:y,onMouseEnter:$,onMouseLeave:T,role:D,selected:M,sublabel:N,tabIndex:S,url:H,..._})=>{const B=u(x,f,M,k,C,!!L&&L?.length>0),F={"data-state":B},O=B===n.DISABLED,w=l({..._,customAttributes:F}),P=l(F),U=w["data-testid"]||"option",K=[n.MULTIPLE_SELECTED,n.MULTIPLE_SELECTED_HOVER,n.SELECTED].includes(B);let R,V,q;if("string"==typeof I){const{firstHighlightedIndex:t,lastHighlightedIndex:s}=b(I,L);R=I.substring(0,t),V=I.substring(t,s),q=I.substring(s)}/* @__PURE__ */
|
|
2
|
+
return t.jsxs(c,{"aria-disabled":O,className:j?.option,...w,component:H?h:p??"div","data-testid":U,role:D,tabIndex:S,url:H,onBlur:A,onClick:t=>{O||v?.(t)},onFocus:y,onKeyDown:t=>{O||!a(t.key)&&!m(t.key)||v?.(t)},onMouseEnter:$,onMouseLeave:T,...P,children:[
|
|
3
3
|
/* @__PURE__ */t.jsxs("div",{className:j?.firstrowcontainer,children:[
|
|
4
4
|
/* @__PURE__ */t.jsxs("div",{className:j?.labeliconcontainer,...P,children:[
|
|
5
|
-
/* @__PURE__ */t.jsx(
|
|
6
|
-
/* @__PURE__ */t.jsx(
|
|
5
|
+
/* @__PURE__ */t.jsx(o,{className:j?.icon,customAttributes:F,...E}),
|
|
6
|
+
/* @__PURE__ */t.jsx(i,{condition:!!r(N).children,children:/* @__PURE__ */t.jsx("div",{className:j?.sublabelcontainer,...P,children:/* @__PURE__ */t.jsx(e,{additionalClasses:{text:j?.sublabel},component:"span",customAttributes:F,...r(N)})})}),
|
|
7
7
|
/* @__PURE__ */t.jsx("p",{children:"string"==typeof I?/* @__PURE__ */t.jsxs(t.Fragment,{children:[" ",
|
|
8
|
-
/* @__PURE__ */t.jsx(
|
|
9
|
-
/* @__PURE__ */t.jsx(
|
|
10
|
-
/* @__PURE__ */t.jsx(
|
|
11
|
-
/* @__PURE__ */t.jsx(
|
|
12
|
-
/* @__PURE__ */t.jsx(
|
|
8
|
+
/* @__PURE__ */t.jsx(d,{component:"span",cssClasses:j?.label,customAttributes:F,"data-testid":`${U}-first-no-hightlighted-label`,children:R}),
|
|
9
|
+
/* @__PURE__ */t.jsx(d,{component:"span",cssClasses:`${j?.label} ${j?.labelhighlighted}`,customAttributes:F,"data-testid":`${U}-highlighted-label`,children:V}),
|
|
10
|
+
/* @__PURE__ */t.jsx(d,{component:"span",cssClasses:`${j?.label} ${j?.labelhighlighted}`,customAttributes:F,"data-testid":`${U}-last-no-hightlighted-label`,children:q})]}):/* @__PURE__ */t.jsx(d,{component:"span",cssClasses:j?.label,customAttributes:F,"data-testid":`${U}-label`,children:I})})]}),
|
|
11
|
+
/* @__PURE__ */t.jsx(i,{condition:K,children:/* @__PURE__ */t.jsx(o,{className:j?.checkedicon,customAttributes:F,...s})})]}),
|
|
12
|
+
/* @__PURE__ */t.jsx(i,{condition:!!g,children:g})]})});export{p as OptionStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{ElementOrIcon as s}from"
|
|
2
|
-
return t.jsx(s,{className:e?.icon,customAttributes:
|
|
1
|
+
import{j as t}from"../../../_virtual/jsx-runtime.js";import{ElementOrIcon as s}from"../../../lib/components/elementOrIcon/elementOrIcon.js";const e=({cssArrowControlClasses:e,disabled:o=!1,...r})=>{const n={"data-state":o?"inactive":"active"};/* @__PURE__ */
|
|
2
|
+
return t.jsx(s,{className:e?.icon,customAttributes:n,disabled:o,...r})};export{e as ArrowControlStandAlone};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"../../../_virtual/jsx-runtime.js";import{RenderIf as r}from"
|
|
1
|
+
import{j as o}from"../../../_virtual/jsx-runtime.js";import{RenderIf as r}from"../../../lib/components/renderIf/renderIf.js";import{pickCustomAttributes as t}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{isElementOrIconProps as s}from"../helper/controlType.js";import{ArrowControlStandAlone as n}from"./arrowControlStandAlone.js";import{ButtonControlStandAlone as e}from"./buttonControlStandAlone.js";const i=({control:i,cssArrowControlClasses:l,cssPageControlClasses:c,position:a,...m})=>{const j=t(m),p="left"===a?l?.leftbuttoncontrol:l?.rightbuttoncontrol,f="left"===a?l?.leftarrowcontrolcontainer:l?.rightarrowcontrolcontainer;/* @__PURE__ */
|
|
2
2
|
return o.jsxs(o.Fragment,{children:[
|
|
3
3
|
/* @__PURE__ */o.jsx(r,{condition:i&&!s(i),children:/* @__PURE__ */o.jsx(e,{...i,cssPageControlClasses:p,position:a,...j})}),
|
|
4
4
|
/* @__PURE__ */o.jsx(r,{condition:s(i),children:/* @__PURE__ */o.jsx("div",{className:f,children:/* @__PURE__ */o.jsx(n,{cssArrowControlClasses:l,...i})})})]})};export{i as Controls};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{RenderIf as o}from"
|
|
1
|
+
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{RenderIf as o}from"../../lib/components/renderIf/renderIf.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{Controls as r}from"./components/controls.js";const e=t(({cssArrowControlClasses:t,cssPageControlClasses:e,currentPosition:a,dots:n,firstVisiblePosition:l,isBullet:c,lastVisiblePosition:d,leftControl:m,pages:p,rightControl:j,...C},f)=>{const g=C["data-testid"]||"page-control";/* @__PURE__ */
|
|
2
2
|
return s.jsx("div",{ref:f,className:e?.page_control,"data-testid":g,children:/* @__PURE__ */s.jsx(o,{condition:n>0,children:/* @__PURE__ */s.jsxs(s.Fragment,{children:[
|
|
3
3
|
/* @__PURE__ */s.jsx(r,{control:m,cssArrowControlClasses:t,cssPageControlClasses:e,currentPosition:a,"data-testid":`${g}-left-control`,dots:n,firstVisiblePosition:l,lastVisiblePosition:d,pages:p,position:"left"}),
|
|
4
4
|
/* @__PURE__ */s.jsxs("div",{className:e?.dotscontainer,children:[
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as a}from"../../../_virtual/jsx-runtime.js";import{
|
|
2
|
-
return a.jsx(
|
|
1
|
+
import{j as a}from"../../../_virtual/jsx-runtime.js";import{ElementOrIcon as t}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{classNames as o}from"../../../lib/utils/classNames/classNames.js";const i=({cssClasses:i,disabled:s,paginationButtonControl:r,position:n="left"})=>{const e={"data-state":s?"disabled":""};/* @__PURE__ */
|
|
2
|
+
return a.jsx(t,{altText:r?.ariaLabel,"aria-controls":r?.ariaControls,"aria-label":r?.ariaLabel,className:o({[`${i?.paginationleftarrowicon}`]:"left"===n},{[`${i?.paginationrightarrowicon}`]:"right"===n}),customAttributes:e,disabled:s,icon:r?.icon,onClick:a=>{s||r?.onClick?.(a)}})};export{i as PaginationButtonControl};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{LabelStandAlone as s}from"../label/labelStandAlone.js";import{
|
|
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
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:
|
|
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
4
|
/* @__PURE__ */e.jsxs("div",{className:b?.infocontainer,children:[
|
|
5
|
-
/* @__PURE__ */e.jsx(
|
|
6
|
-
/* @__PURE__ */e.jsx(
|
|
7
|
-
/* @__PURE__ */e.jsx(
|
|
8
|
-
/* @__PURE__ */e.jsx(
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Children as i,isValidElement as
|
|
2
|
-
/* @__PURE__ */t.jsx(o,{condition:!!N,children:/* @__PURE__ */t.jsx("div",{...
|
|
3
|
-
/* @__PURE__ */t.jsx(o,{condition:!!g,children:/* @__PURE__ */t.jsx("div",{...
|
|
4
|
-
/* @__PURE__ */t.jsx(o,{condition:!!A,children:/* @__PURE__ */t.jsx("div",{...
|
|
5
|
-
/* @__PURE__ */t.jsx(o,{condition:!!C,children:/* @__PURE__ */t.jsx("div",{...
|
|
6
|
-
/* @__PURE__ */t.jsx("div",{...
|
|
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
7
|
/* @__PURE__ */t.jsx(t.Fragment,{children:R})};export{r as SelectorBoxFileAnimation};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{
|
|
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
2
|
return t.jsxs("label",{className:r?.containerboxcontainer,"data-focus":m,htmlFor:x,...i(u),children:[
|
|
3
3
|
/* @__PURE__ */t.jsxs("span",{children:[d,
|
|
4
|
-
/* @__PURE__ */t.jsx(
|
|
5
|
-
/* @__PURE__ */t.jsx(
|
|
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
6
|
/* @__PURE__ */t.jsxs("span",{className:r?.containerboxtextscontainer,...i(u),children:[
|
|
7
|
-
/* @__PURE__ */t.jsx(
|
|
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
8
|
/* @__PURE__ */t.jsxs("span",{className:r?.actiondescriptioncontainer,children:[
|
|
9
|
-
/* @__PURE__ */t.jsx(
|
|
10
|
-
/* @__PURE__ */t.jsx(
|
|
11
|
-
/* @__PURE__ */t.jsx(
|
|
12
|
-
/* @__PURE__ */t.jsx(
|
|
13
|
-
/* @__PURE__ */t.jsx(
|
|
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,3 +1,3 @@
|
|
|
1
|
-
import{j as s}from"../../../_virtual/jsx-runtime.js";import{Text as e}from"../../text/text.js";import{
|
|
2
|
-
/* @__PURE__ */s.jsx(
|
|
3
|
-
/* @__PURE__ */s.jsx(e,{additionalClasses:{text:
|
|
1
|
+
import{j as s}from"../../../_virtual/jsx-runtime.js";import{Text as e}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,errorMessage:a,errorMessageIcon:m,errorMessageId:l,state:n})=>/* @__PURE__ */s.jsx("div",{"aria-live":"polite",children:o(a)&&n===t.ERROR?/* @__PURE__ */s.jsxs("div",{className:i?.errormessagecontainer,id:l,children:[
|
|
2
|
+
/* @__PURE__ */s.jsx(r,{className:i?.errormessageicon,...m}),
|
|
3
|
+
/* @__PURE__ */s.jsx(e,{additionalClasses:{text:i?.errormessage},...o(a)})]}):null});export{i as SelectorBoxFileErrorMessage};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{j as t}from"../../../_virtual/jsx-runtime.js";import{Button as i}from"../../button/button.js";import{
|
|
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
2
|
/* @__PURE__ */t.jsxs("div",{className:a?.titlesubtitlecontainer,id:d,children:[
|
|
3
|
-
/* @__PURE__ */t.jsx(
|
|
4
|
-
/* @__PURE__ */t.jsx(
|
|
5
|
-
/* @__PURE__ */t.jsx(
|
|
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
6
|
/* @__PURE__ */t.jsx(n,{cssClasses:a,tooltip:j,tooltipIcon:p})]})})]}),
|
|
7
|
-
/* @__PURE__ */t.jsx(
|
|
8
|
-
/* @__PURE__ */t.jsx(
|
|
9
|
-
/* @__PURE__ */t.jsx(
|
|
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 +1 @@
|
|
|
1
|
-
import{j as o}from"../../../_virtual/jsx-runtime.js";import{TooltipUnControlled as t}from"../../tooltip/tooltipUnControlled.js";import{ElementOrIcon as i}from"
|
|
1
|
+
import{j as o}from"../../../_virtual/jsx-runtime.js";import{TooltipUnControlled as t}from"../../tooltip/tooltipUnControlled.js";import{ElementOrIcon as i}from"../../../lib/components/elementOrIcon/elementOrIcon.js";const n=({cssClasses:n,tooltip:s,tooltipIcon:l})=>{if(!l?.icon)return null;const e=/* @__PURE__ */o.jsx(i,{className:n?.tooltipicon,...l});return s?/* @__PURE__ */o.jsx("div",{className:n?.tooltipiconcontainer,children:/* @__PURE__ */o.jsx(t,{additionalClasses:n?.tooltip,...s,children:e})}):/* @__PURE__ */o.jsx("div",{className:n?.tooltipiconcontainer,children:e})};export{n as SelectorBoxFileTooltip};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{RenderIf as o}from"
|
|
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
2
|
return e.jsxs("div",{ref:R,children:[
|
|
3
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
4
|
-
/* @__PURE__ */e.jsxs("div",{className:
|
|
5
|
-
/* @__PURE__ */e.jsx(o,{condition:!(!A&&!y),children:/* @__PURE__ */e.jsx(l,{button:c,cssClasses:
|
|
6
|
-
/* @__PURE__ */e.jsx(i,{cssClasses:
|
|
7
|
-
/* @__PURE__ */e.jsx(a,{cssClasses:
|
|
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:
|
|
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,3 +1,3 @@
|
|
|
1
|
-
import{j as e}from"../../../_virtual/jsx-runtime.js";import{
|
|
2
|
-
/* @__PURE__ */e.jsx(
|
|
3
|
-
/* @__PURE__ */e.jsx(
|
|
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 +1 @@
|
|
|
1
|
-
import{j as o}from"../../../_virtual/jsx-runtime.js";import{TooltipUnControlled as e}from"../../tooltip/tooltipUnControlled.js";import{
|
|
1
|
+
import{j as o}from"../../../_virtual/jsx-runtime.js";import{TooltipUnControlled as e}from"../../tooltip/tooltipUnControlled.js";import{ElementOrIcon as a}from"../../../lib/components/elementOrIcon/elementOrIcon.js";import{useMediaDevice as t}from"../../../lib/hooks/useMediaDevice/useMediaDevice.js";import{pickCustomAttributes as i}from"../../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{isTooltipVisible as s}from"../utils/ui.utils.js";const l=({ariaDescribedBy:l,ariaLabel:r,ariaLabelBy:n,cssClasses:d,customAttributes:c,disabled:u,hover:m,icon:b,max:p,min:h,onFocus:v,onKeyDown:j,onMouseOut:x,onMouseOver:y,onTouchStart:I,pressed:M,rightThumb:O,style:A,tooltip:f,tooltipAlign:C="top",value:D,...g})=>{const w=t(),B=i({...g,...c}),N=i(c);return s(f,M,w)&&d?.tooltip?/* @__PURE__ */o.jsx("div",{"data-disabled":u,"data-hover":m,"data-pressed":M,role:"presentation",style:A,...B,className:d?.thumb,children:/* @__PURE__ */o.jsx(e,{additionalClasses:d?.tooltip,align:C,childrenAsButton:!1,closeIcon:f?.closeIcon?{"aria-label":f.closeIconAriaLabel,color:f.closeIconColor,icon:f.closeIcon}:void 0,content:{content:f?.content},title:{content:f?.title},tooltipAsModal:!1,children:/* @__PURE__ */o.jsx("div",{"aria-describedby":l,"aria-disabled":u,"aria-label":r,"aria-labelledby":n,"aria-valuemax":p,"aria-valuemin":h,"aria-valuenow":D,className:d.innerthumbtooltip,"data-disabled":u,"data-hover":m,"data-pressed":M,role:"slider",tabIndex:0,onBlur:x,onFocus:v,onKeyDown:j,onMouseOut:x,onMouseOver:y,onTouchStart:I,...N,children:/* @__PURE__ */o.jsx(a,{className:O?d?.rightthumbicon:d?.thumbicon,...b})})})}):/* @__PURE__ */o.jsx("div",{"aria-describedby":l,"aria-disabled":u,"aria-label":r,"aria-labelledby":n,"aria-valuemax":p,"aria-valuemin":h,"aria-valuenow":D,className:d?.thumb,"data-disabled":u,"data-hover":m,"data-position":O?"right":void 0,"data-pressed":M,role:"slider",style:A,tabIndex:0,onBlur:x,onFocus:v,onKeyDown:j,onMouseOut:x,onMouseOver:y,onTouchStart:I,...B,children:/* @__PURE__ */o.jsx(a,{className:d?.thumbicon,...b})})};export{l as SliderThumbStandAlone};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{RenderIf as s}from"
|
|
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
2
|
return e.jsxs("div",{ref:V,className:f?.slider,"data-disabled":T,"data-hover":$,"data-pressed":M,...ee,children:[
|
|
3
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
4
|
/* @__PURE__ */e.jsx(n,{cssClasses:f,customAttributes:Y,scaleOffsets:_,showScale:z}),
|
|
5
5
|
/* @__PURE__ */e.jsxs("div",{className:f?.buttonstrackscontainer,children:[
|
|
6
|
-
/* @__PURE__ */e.jsx(
|
|
6
|
+
/* @__PURE__ */e.jsx(c,{...j,cssClasses:f,customAttributes:Y}),
|
|
7
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
8
|
/* @__PURE__ */e.jsx(s,{condition:D,children:/* @__PURE__ */e.jsxs(e.Fragment,{children:[
|
|
9
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}%`}}),
|
|
@@ -15,5 +15,5 @@ return e.jsxs("div",{ref:V,className:f?.slider,"data-disabled":T,"data-hover":$,
|
|
|
15
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
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
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(
|
|
19
|
-
/* @__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,10 +1,10 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{Text as s}from"../text/text.js";import{
|
|
2
|
-
return e.jsxs("div",{ref:$,"aria-hidden":!O,"data-testid":k,children:[f?.content&&/* @__PURE__ */e.jsx(
|
|
3
|
-
/* @__PURE__ */e.jsx("ol",{className:
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{Text as s}from"../text/text.js";import{ElementOrIcon as n}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{STATES as a}from"../../lib/types/states/states.js";import{classNames as r}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as o}from"../../lib/components/customComponent/customComponent.js";import{buildAriaCurrent as c}from"./helpers/aria.js";import{buildScreenReaderText as l}from"./helpers/screnReader.js";import{mapToStepState as p}from"./helpers/stepState.js";const m=t(({completedStepIcon:t,cssOrientationClasses:m,cssVariantClasses:d,currentStep:x=0,horizontalOrientationWidth:j,orientation:u,screenReaderCompletedStep:h,screenReaderTextBuilder:b,screenReaderTitle:f,stepMaxTruncatedLines:C,steps:N,...y},$)=>{const v=p(N,x),O="vertical"===u,T=Boolean(f),k=y["data-testid"]||"stepper-number";/* @__PURE__ */
|
|
2
|
+
return e.jsxs("div",{ref:$,"aria-hidden":!O,"data-testid":k,children:[f?.content&&/* @__PURE__ */e.jsx(o,{className:"kbt-sr-only",component:f.component,children:f?.content}),
|
|
3
|
+
/* @__PURE__ */e.jsx("ol",{className:r(m?.stepper_number,d?.stepper_number),"data-testid":`${k}-steps-container`,children:v.map((p,f)=>{const N=f===v.length-1,y={"data-state":p.state},$=i(y);/* @__PURE__ */
|
|
4
4
|
return e.jsxs("li",{"aria-current":c(x,f,u),"data-testid":`${k}-li-${f}`,style:{display:O?"flex":"block",width:!O&&N?"auto":j},children:[T&&/* @__PURE__ */e.jsx("screen-reader-only",{children:l(f,x,v.length,b,p.name,O)}),
|
|
5
|
-
/* @__PURE__ */e.jsxs("span",{"aria-hidden":!(O&&!T)||void 0,className:
|
|
5
|
+
/* @__PURE__ */e.jsxs("span",{"aria-hidden":!(O&&!T)||void 0,className:r(m?.stepcontainer,d?.stepcontainer),...$,children:[
|
|
6
6
|
/* @__PURE__ */e.jsxs("span",{className:d?.stepcirclecontainer,"data-testid":`${k}-step-${f}`,style:{flexDirection:"vertical"===u?"column":"row"},children:[
|
|
7
|
-
/* @__PURE__ */e.jsx("span",{className:
|
|
8
|
-
/* @__PURE__ */e.jsx(
|
|
9
|
-
/* @__PURE__ */e.jsx("screen-reader-only",{children:f+1})]}):/* @__PURE__ */e.jsx(s,{additionalClasses:{text:
|
|
10
|
-
/* @__PURE__ */e.jsx(s,{additionalClasses:{text:
|
|
7
|
+
/* @__PURE__ */e.jsx("span",{className:r(m?.stepcircle,d?.stepcircle),...$,children:p.state===a.COMPLETED?/* @__PURE__ */e.jsxs(e.Fragment,{children:[
|
|
8
|
+
/* @__PURE__ */e.jsx(n,{className:r(m?.iconselected,d?.iconselected),customAttributes:y,...t}),
|
|
9
|
+
/* @__PURE__ */e.jsx("screen-reader-only",{children:f+1})]}):/* @__PURE__ */e.jsx(s,{additionalClasses:{text:r(m?.stepindex,d?.stepindex)},component:"span",customAttributes:y,children:f+1})}),!N&&/* @__PURE__ */e.jsx("span",{className:r(m?.stepbar,d?.stepbar),...i({"data-state":v[f+1].state})})]}),O&&/* @__PURE__ */e.jsxs("span",{"aria-hidden":!!T||void 0,className:r(m?.stepnamecontainer,d?.stepnamecontainer),"data-islast":N,"data-testid":`${k}-step-description-${f}`,...$,children:[
|
|
10
|
+
/* @__PURE__ */e.jsx(s,{additionalClasses:{text:r(m?.stepname,d?.stepname)},component:"span",customAttributes:y,maxTruncatedLines:C,children:p.name}),!T&&p.state===a.COMPLETED&&h?.content&&/* @__PURE__ */e.jsxs(o,{className:"kbt-sr-only",component:h.component,"data-testid":h["data-testid"],children:[" ",h.content]})]})]})]},`stepContainer-${f.toString()}`)})})]})});export{m as StepperNumberStandAlone};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as e}from"react";import{
|
|
2
|
-
return t.jsx(
|
|
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
3
|
return t.jsxs("div",{ref:y,className:h?.tabs,"data-testid":U,..._,children:[
|
|
4
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,
|
|
6
|
-
return t.jsx("div",{className:h?.tabcontainer,"data-testid":`${U}-tab-${
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{
|
|
2
|
-
return s.jsx(
|
|
3
|
-
/* @__PURE__ */s.jsx(
|
|
4
|
-
/* @__PURE__ */s.jsx(
|
|
1
|
+
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{Text as o}from"../text/text.js";import{CustomComponent as e}from"../../lib/components/customComponent/customComponent.js";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{pickCustomAttributes as m}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processIcon as n}from"../../lib/utils/process/processIcon/processIcon.js";import{processText as i}from"../../lib/utils/process/processText/processText.js";const c=t(({component:t="div",cssClasses:c,icon:p,label:l,...a},j)=>{const u=m(a);/* @__PURE__ */
|
|
2
|
+
return s.jsx(e,{ref:j,className:c?.tag,component:t,"data-testid":"tag",...u,children:/* @__PURE__ */s.jsxs(s.Fragment,{children:[
|
|
3
|
+
/* @__PURE__ */s.jsx(r,{className:c?.icon,...n(p)}),
|
|
4
|
+
/* @__PURE__ */s.jsx(o,{additionalClasses:{text:c?.label},component:"span",...i(l)})]})})});export{c as TagStandAlone};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as
|
|
2
|
-
/* @__PURE__ */
|
|
3
|
-
/* @__PURE__ */
|
|
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,4 +1,4 @@
|
|
|
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"
|
|
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
2
|
return e.jsxs("div",{ref:q,className:p?.text_area,"data-testid":"text-area",...K,...i(_),children:[
|
|
3
3
|
/* @__PURE__ */e.jsx(m,{cssClasses:p,customAttributtes:K,title:N}),
|
|
4
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:[
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as o,useRef as t,useImperativeHandle as
|
|
2
|
-
return e.jsx(
|
|
3
|
-
/* @__PURE__ */e.jsx("div",{className:m?.iconwrapper,"data-testid":`${u}-right-icon`,style:{opacity:A?1:0},children:/* @__PURE__ */e.jsx(
|
|
4
|
-
/* @__PURE__ */e.jsx("div",{className:m?.iconwrapper,"data-testid":`${u}-left-icon`,style:{opacity:T?1:0},children:/* @__PURE__ */e.jsx(
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as o,useRef as t,useImperativeHandle as s}from"react";import{CustomComponent as a}from"../../lib/components/customComponent/customComponent.js";import{ElementOrIcon as n}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processIcon as r}from"../../lib/utils/process/processIcon/processIcon.js";import{buildComponentProps as c}from"./utils/buildComponentProps.js";import{useToggleTransform as l}from"./utils/thumbTransformCalculations.js";const d=({checked:o=!1,component:d="button",cssClasses:m,dataTestId:u="toggle",disabled:b=!1,id:p,leftIcon:f,name:j,onBlur:h,onClick:v,onFocus:y,onKeyDown:k,onMouseEnter:x,onMouseLeave:C,rightIcon:I,tabIndex:N,value:g,...w},M)=>{const A=o&&!!I,T=!o&&!!f,B="button"!==d,D=t(null),E=t(null),{transform:F}=l({checked:o,thumbRef:E,trackRef:D});s(M,()=>D.current,[]);const K=i(w),L=c({"aria-describedby":w["aria-describedby"],"aria-label":w["aria-label"],"aria-labelledby":w["aria-labelledby"],checked:o,decorative:B,disabled:b,id:p,name:j,onBlur:h,onClick:v,onFocus:y,onKeyDown:k,onMouseEnter:x,onMouseLeave:C,tabIndex:N,value:g});/* @__PURE__ */
|
|
2
|
+
return e.jsx(a,{...K,...L,ref:D,className:m?.track,component:d,"data-checked":!!o||void 0,"data-disabled":!!b||void 0,"data-testid":u,children:/* @__PURE__ */e.jsxs("span",{ref:E,className:m?.thumb,"data-checked":!!o||void 0,"data-disabled":!!b||void 0,style:{transform:F},children:[
|
|
3
|
+
/* @__PURE__ */e.jsx("div",{className:m?.iconwrapper,"data-testid":`${u}-right-icon`,style:{opacity:A?1:0},children:/* @__PURE__ */e.jsx(n,{className:m?.icon,"data-disabled":!!b||void 0,...r(I)})}),
|
|
4
|
+
/* @__PURE__ */e.jsx("div",{className:m?.iconwrapper,"data-testid":`${u}-left-icon`,style:{opacity:T?1:0},children:/* @__PURE__ */e.jsx(n,{className:m?.icon,"data-disabled":!!b||void 0,...r(f)})})]})})};d.displayName="ToggleStandAlone";const m=o(d);export{m as ToggleStandalone};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as o}from"../../_virtual/jsx-runtime.js";/* empty css */import{
|
|
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||
|
|
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
3
|
/* @__PURE__ */o.jsxs("div",{className:I?.tooltipinternalcontainer,children:[
|
|
4
|
-
/* @__PURE__ */o.jsx(
|
|
5
|
-
/* @__PURE__ */o.jsxs("div",{className:
|
|
6
|
-
/* @__PURE__ */o.jsx(
|
|
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(
|
|
8
|
-
/* @__PURE__ */o.jsx("div",{...lo,className:
|
|
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
9
|
return o.jsxs("div",{ref:w,className:"kbt-tooltip","data-testid":G,children:[
|
|
10
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,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{
|
|
2
|
-
return t.jsxs("div",{ref:C,className:s?.virtual_keyboard,"data-testid":v,id:k,role:"presentation",onBlur:d,onFocus:p,...
|
|
3
|
-
/* @__PURE__ */t.jsx("div",{className:s?.digitwrapper,...
|
|
4
|
-
/* @__PURE__ */t.jsx("button",{className:s?.removebutton,type:"button",onClick:
|
|
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};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AccordionControlled as o}from"./components/accordion/accordionControlled.js";import{Accordion as t}from"./components/accordion/accordionUnControlled.js";import{Avatar as r}from"./components/avatar/avatar.js";import{Badge as e}from"./components/badge/badge.js";import{BreadCrumbs as n}from"./components/breadcrumbs/breadcrumbs.js";import{Button as m}from"./components/button/button.js";import{Calendar as s}from"./components/calendar/calendar.js";import{CardImage as p}from"./components/cardImage/cardImage.js";import{Carousel as i}from"./components/carousel/carousel.js";import{CAROUSEL_BUILD_SCREEN_READER_CURRENT_PAGE_KEY as a,CAROUSEL_BUILD_SCREEN_READER_NUM_PAGES_KEY as c}from"./components/carousel/types/carousel.js";import{CheckboxControlled as l}from"./components/checkbox/checkboxControlled.js";import{CheckboxUnControlled as d}from"./components/checkbox/checkboxUnControlled.js";import{CheckboxBaseControlled as f}from"./components/checkboxBase/checkboxBaseControlled.js";import{CheckboxBaseUnControlled as j}from"./components/checkboxBase/checkboxBaseUncontrolled.js";import{Chip as b}from"./components/chip/chip.js";import{Container as u}from"./components/container/container.js";import{DataTable as g}from"./components/dataTable/dataTable.js";import{Dot as v}from"./components/dot/dot.js";import{DropdownSelectedControlled as C}from"./components/dropdownSelected/dropdownSelectedControlled.js";import{DropdownSelectedUnControlled as k}from"./components/dropdownSelected/dropdownSelectedUncontrolled.js";import{IconBasic as B}from"./components/icon/icon.js";import{IconHost as x}from"./components/icon/iconHost.js";import{Image as S}from"./components/image/image.js";import{Input as h}from"./components/input/input.js";import{InputBase as U}from"./components/inputBase/inputBase.js";import{InputDecoration as A}from"./components/inputDecoration/inputDecoration.js";import{InputSignatureControlled as M}from"./components/inputSignature/inputSignatureControlled.js";import{InputSignatureUnControlled as P}from"./components/inputSignature/inputSignatureUncontrolled.js";import{LabelStandAlone as w}from"./components/label/labelStandAlone.js";import{Link as
|
|
1
|
+
import{AccordionControlled as o}from"./components/accordion/accordionControlled.js";import{Accordion as t}from"./components/accordion/accordionUnControlled.js";import{Avatar as r}from"./components/avatar/avatar.js";import{Badge as e}from"./components/badge/badge.js";import{BreadCrumbs as n}from"./components/breadcrumbs/breadcrumbs.js";import{Button as m}from"./components/button/button.js";import{Calendar as s}from"./components/calendar/calendar.js";import{CardImage as p}from"./components/cardImage/cardImage.js";import{Carousel as i}from"./components/carousel/carousel.js";import{CAROUSEL_BUILD_SCREEN_READER_CURRENT_PAGE_KEY as a,CAROUSEL_BUILD_SCREEN_READER_NUM_PAGES_KEY as c}from"./components/carousel/types/carousel.js";import{CheckboxControlled as l}from"./components/checkbox/checkboxControlled.js";import{CheckboxUnControlled as d}from"./components/checkbox/checkboxUnControlled.js";import{CheckboxBaseControlled as f}from"./components/checkboxBase/checkboxBaseControlled.js";import{CheckboxBaseUnControlled as j}from"./components/checkboxBase/checkboxBaseUncontrolled.js";import{Chip as b}from"./components/chip/chip.js";import{Container as u}from"./components/container/container.js";import{DataTable as g}from"./components/dataTable/dataTable.js";import{Dot as v}from"./components/dot/dot.js";import{DropdownSelectedControlled as C}from"./components/dropdownSelected/dropdownSelectedControlled.js";import{DropdownSelectedUnControlled as k}from"./components/dropdownSelected/dropdownSelectedUncontrolled.js";import{IconBasic as B}from"./components/icon/icon.js";import{IconHost as x}from"./components/icon/iconHost.js";import{Image as S}from"./components/image/image.js";import{Input as h}from"./components/input/input.js";import{InputBase as U}from"./components/inputBase/inputBase.js";import{InputDecoration as A}from"./components/inputDecoration/inputDecoration.js";import{InputSignatureControlled as M}from"./components/inputSignature/inputSignatureControlled.js";import{InputSignatureUnControlled as P}from"./components/inputSignature/inputSignatureUncontrolled.js";import{LabelStandAlone as w}from"./components/label/labelStandAlone.js";import{Link as y}from"./components/link/link.js";import{LinkAsButton as W}from"./components/link/linkAsButton/linkAsButton.js";import{ListOptions as D}from"./components/listOptions/listOptions.js";import{MessageControlled as F}from"./components/message/messageControlled.js";import{MessageUnControlled as H}from"./components/message/messageUnControlled.js";import{ModalControlled as I}from"./components/modal/modalControlled.js";import{ModalUnControlled as T}from"./components/modal/modalUnControlled.js";import{NabVar as O}from"./components/navBar/navBar.js";import{Option as K}from"./components/option/option.js";import{PageControl as N}from"./components/pageControl/pageControl.js";import{Pagination as R}from"./components/pagination/pagination.js";import{Popover as z}from"./components/popover/popover.js";import{arrow as L,autoPlacement as q,flip as E,hide as G,offset as J,shift as Q,size as V}from"@floating-ui/dom";import{ProgressBar as X}from"./components/progressBar/progressBar.js";import{RadioButton as Y}from"./components/radioButton/radioButton.js";import{RadioButtonStandAlone as Z}from"./components/radioButton/radioButtonStandAlone.js";import{SelectorBoxFile as $}from"./components/selectorBoxFile/selectorBoxFile.js";import{Skeleton as _}from"./components/skeleton/skeleton.js";import{Slider as oo}from"./components/slider/slider.js";import{Snackbar as to}from"./components/snackbar/snackbar.js";import{StepperNumber as ro}from"./components/stepperNumber/stepperNumber.js";import{Table as eo}from"./components/table/table.js";import{TableBody as no}from"./components/tableBody/tableBody.js";import{TableCaption as mo}from"./components/tableCaption/tableCaption.js";import{TableCell as so}from"./components/tableCell/tableCell.js";import{TableDivider as po}from"./components/tableDivider/tableDivider.js";import{TableFoot as io}from"./components/tableFoot/tableFoot.js";import{TableHead as ao}from"./components/tableHead/tableHead.js";import{TableRow as co}from"./components/tableRow/tableRow.js";import{TabsControlled as lo}from"./components/tabs/tabsControlled.js";import{TabsUnControlled as fo}from"./components/tabs/tabsUnControlled.js";import{Tag as jo}from"./components/tag/tag.js";import{Text as bo}from"./components/text/text.js";import{TextArea as uo}from"./components/textArea/textArea.js";import{ToggleControlled as go}from"./components/toggle/toggleControlled.js";import{ToggleStandalone as vo}from"./components/toggle/toggleStandAlone.js";import{ToggleUncontrolled as Co}from"./components/toggle/toggleUnControlled.js";import{TooltipControlled as ko}from"./components/tooltip/tooltipControlled.js";import{TooltipUnControlled as Bo}from"./components/tooltip/tooltipUnControlled.js";import{VirtualKeyboard as xo}from"./components/virtualKeyboard/virtualKeyboard.js";import{GenericComponentContext as So,GenericComponentsProvider as ho,useGenericComponents as Uo}from"./lib/provider/genericComponentsProvider/genericComponentsProvider.js";import{KubitProvider as Ao}from"./lib/provider/kubitProvider/kubitProvider.js";import{StylesContext as Mo,StylesProvider as Po,useStylesContext as wo}from"./lib/provider/stylesProvider/stylesProvider.js";import{UtilsContext as yo,UtilsProvider as Wo,useUtilsProvider as Do}from"./lib/provider/utilsProvider/utilsProvider.js";export{t as Accordion,o as AccordionControlled,r as Avatar,e as Badge,n as BreadCrumbs,m as Button,a as CAROUSEL_BUILD_SCREEN_READER_CURRENT_PAGE_KEY,c as CAROUSEL_BUILD_SCREEN_READER_NUM_PAGES_KEY,s as Calendar,p as CardImage,i as Carousel,d as Checkbox,j as CheckboxBase,f as CheckboxBaseControlled,l as CheckboxControlled,b as Chip,u as Container,g as DataTable,v as Dot,k as DropdownSelected,C as DropdownSelectedControlled,So as GenericComponentContext,ho as GenericComponentsProvider,x as Icon,B as IconBasic,S as Image,h as Input,U as InputBase,A as InputDecoration,P as InputSignature,M as InputSignatureControlled,Ao as KubitProvider,w as Label,y as Link,W as LinkAsButton,D as ListOptions,H as Message,F as MessageControlled,T as Modal,I as ModalControlled,O as NabVar,K as Option,N as PageControl,R as Pagination,z as Popover,X as ProgressBar,Y as RadioButton,Z as RadioButtonStandAlone,$ as SelectorBoxFile,_ as Skeleton,oo as Slider,to as Snackbar,ro as StepperNumber,Mo as StylesContext,Po as StylesProvider,eo as Table,no as TableBody,mo as TableCaption,so as TableCell,po as TableDivider,io as TableFoot,ao as TableHead,co as TableRow,fo as Tabs,lo as TabsControlled,jo as Tag,bo as Text,uo as TextArea,go as ToggleControlled,vo as ToggleStandalone,Co as ToggleUncontrolled,Bo as Tooltip,ko as TooltipControlled,yo as UtilsContext,Wo as UtilsProvider,xo as VirtualKeyboard,L as popoverMWArrow,q as popoverMWAutoPlacement,E as popoverMWFlip,G as popoverMWHide,J as popoverMWOffset,Q as popoverMWShift,V as popoverMWSize,Uo as useGenericComponents,wo as useStylesContext,Do as useUtilsProvider};
|