@kubit-ui-web/react-components 2.0.0-beta.2 → 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/carousel/hooks/useCarousel.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarouselKeyNavigation.js +1 -1
- package/dist/cjs/components/carousel/hooks/useCarouselSwipe.js +1 -1
- package/dist/cjs/components/carousel/hooks/utils/calc.utils.js +1 -1
- package/dist/cjs/components/carousel/hooks/utils/dom.utils.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/popover/hooks/positioning/middlewareUtils.js +1 -1
- package/dist/cjs/components/popover/hooks/usePopoverLifecycle.js +1 -1
- package/dist/cjs/components/popover/hooks/usePopoverPositioning.js +1 -1
- package/dist/cjs/components/popover/popover.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/text/textStandAlone.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/hooks/useTooltip.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/cjs/lib/provider/stylesProvider/stylesProvider.js +1 -1
- 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/carousel/hooks/useCarousel.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarouselKeyNavigation.js +1 -1
- package/dist/esm/components/carousel/hooks/useCarouselSwipe.js +1 -1
- package/dist/esm/components/carousel/hooks/utils/calc.utils.js +1 -1
- package/dist/esm/components/carousel/hooks/utils/dom.utils.js +1 -1
- 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/popover/hooks/positioning/middlewareUtils.js +1 -1
- package/dist/esm/components/popover/hooks/usePopoverLifecycle.js +1 -1
- package/dist/esm/components/popover/hooks/usePopoverPositioning.js +1 -1
- package/dist/esm/components/popover/popover.js +1 -1
- 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/text/textStandAlone.js +1 -1
- 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/hooks/useTooltip.js +1 -1
- 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/esm/lib/provider/stylesProvider/stylesProvider.js +2 -2
- package/dist/types/index.d.ts +10 -2
- package/package.json +8 -9
- 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 +1 @@
|
|
|
1
|
-
import{useRef as e,useCallback as t,useEffect as r}from"react";import{useScrollBlock as n}from"../../../lib/hooks/useScrollBlock/useScrollBlock.js";import c from"./utils/calc.utils.js";import u from"./utils/constants.js";const s=({
|
|
1
|
+
import{useRef as e,useCallback as t,useEffect as r}from"react";import{useScrollBlock as n}from"../../../lib/hooks/useScrollBlock/useScrollBlock.js";import c from"./utils/calc.utils.js";import u from"./utils/constants.js";const s=({allowShiftRef:s,centerExtremesWhenExtraPadding:o,changePage:l,circular:i,contentContainerRef:a,currentPageRef:m,disabled:v=!1,elements:E,extraPadding:d,numElementsPerPageRef:h,numPagesRef:f,viewerContainerRef:L})=>{const p=e(!1),_=e(!1),D=e(!1),R=e(),g=e(0),X=e(0),P=e(0),S=e(0),y=t(()=>{s.current&&(i||m.current!==f.current-1)&&l({newPage:m.current+1})},[i,l]),I=t(()=>{s.current&&(i||0!==m.current)&&l({newPage:m.current-1})},[i,l]),{allowScroll:O,blockScroll:w}=n(),x=t(e=>{const t=a.current;!t||f.current<=1||(R.current=parseFloat(t.style.left||"0"),"touchstart"===e.type?(g.current=e.touches[0].clientX,P.current=e.touches[0].clientX,S.current=e.touches[0].clientY):(g.current=e.clientX,P.current=e.clientX,S.current=e.clientY),p.current=!0)},[]),G=t(e=>{const t=a.current;if(!t||!p.current||!h?.current||f.current<=1)return;let r,n;"touchmove"===e.type?(X.current=g.current-e.touches[0].clientX,g.current=e.touches[0].clientX,r=e.touches[0].clientX-P.current,n=e.touches[0].clientY-S.current):(X.current=g.current-e.clientX,g.current=e.clientX,r=e.clientX-P.current,n=e.clientY-S.current);const s=parseFloat(t.style.left||"0")-X.current;if(_.current||D.current||(Math.abs(r)>u.THRESHOLD_TO_DECIDE_IF_ALLOW_DRAGGING?(_.current=!0,w()):Math.abs(n)>u.THRESHOLD_TO_DECIDE_IF_ALLOW_DRAGGING&&(D.current=!0)),_.current)if(i&&E.length>h.current)t.style.left=`${s}px`;else{const e=c.calcXDistanceBetween2Elements(t.firstChild,t.children[t.children.length-h.current]);if(o)s-d<0&&-s<e-d&&(t.style.left=`${s}px`);else{let r=i?d:0;!i&&d&&m.current===f.current-1&&(r=2*d),s-r<0&&-s<e-r&&(t.style.left=`${s}px`)}}},[w,o,i,E,d]),C=t(()=>{const e=a.current;if(D.current=!1,_.current&&O(),_.current=!1,!e||!p.current||void 0===R.current||f.current<=1)return;p.current=!1;const t=parseFloat(e.style.left||"0");t-R.current<-0?y():t-R.current>u.THRESHOLD_TO_DECIDE_IF_SWIPE_ON_DRAG_ENDS?I():e.style.left=`${R.current}px`},[O,y,I]);r(()=>{if(v)return;const e=L.current,t={passive:!0};return e?.addEventListener("touchstart",x,t),e?.addEventListener("touchend",C,t),e?.addEventListener("touchmove",G,t),e?.addEventListener("mousedown",x,t),e?.addEventListener("mouseup",C,t),e?.addEventListener("mousemove",G,t),e?.addEventListener("mouseleave",C,t),()=>{e?.removeEventListener("touchstart",x,t),e?.removeEventListener("touchend",C,t),e?.removeEventListener("touchmove",G,t),e?.removeEventListener("mousedown",x,t),e?.removeEventListener("mouseup",C,t),e?.removeEventListener("mousemove",G,t),e?.removeEventListener("mouseleave",C,t)}},[x,C,G,v])};export{s as useCarouselSwipe};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=({element:e})=>{const t=window.getComputedStyle(e);return parseFloat(t.getPropertyValue("padding-left")||"0")+parseFloat(t.getPropertyValue("padding-right")||"0")},t=(e,t)=>{if(!e||!t)return 0;const n=e.offsetLeft,r=t.offsetLeft;return Math.abs(r-n)},n=({numElementsPerPage:e,numElementsToSlide:t})=>t?Math.max(1,Math.min(t,e)):e,r=({elementsLength:e,numElementsPerPage:t,numElementsToSlide:r})=>{if(e<=t)return 1;const i=n({numElementsToSlide:r
|
|
1
|
+
const e=({element:e})=>{const t=window.getComputedStyle(e);return parseFloat(t.getPropertyValue("padding-left")||"0")+parseFloat(t.getPropertyValue("padding-right")||"0")},t=(e,t)=>{if(!e||!t)return 0;const n=e.offsetLeft,r=t.offsetLeft;return Math.abs(r-n)},n=({numElementsPerPage:e,numElementsToSlide:t})=>t?Math.max(1,Math.min(t,e)):e,r=({elementsLength:e,numElementsPerPage:t,numElementsToSlide:r})=>{if(e<=t)return 1;const i=n({numElementsPerPage:t,numElementsToSlide:r});return Math.ceil((e-t+i)/i)},i=({currentPage:e,elementsLength:t,isCircular:i,numElementsPerPage:l,numElementsToSlide:s})=>{if(t<=l)return{firstIndexInView:0,lastIndexInView:t-1};const o=n({numElementsPerPage:l,numElementsToSlide:s});let a=e*o+l-1;let d=0;i&&t>l&&(d=l+1,a+=d),e===r({elementsLength:t,numElementsPerPage:l,numElementsToSlide:o})?a=d+t+l-1:e<0?a=d-1:a-d>t-1&&(a=d+t-1);return{firstIndexInView:a-l+1,lastIndexInView:a}},l=({contentContainer:t,elementsLength:n,extraPadding:r,rootContainer:i,viewerContainer:l})=>{const s=t.firstElementChild;if(!s)return;let o=i.offsetWidth;o-=2*r;o-=e({element:l});let a=0;const d=s.offsetLeft;for(let e=0;e<t.children.length;e++){const n=t.children[e];if(d+n.offsetLeft+n.offsetWidth>o)break;a++}return Math.max(Math.min(n,a),1)},s=({centerMode:e,contentContainer:t})=>{let n=0;if(t.childNodes.length<2)return n;const r=t.childNodes[0],i=t.childNodes[1];e&&r.style&&i.style&&(r.style.transition="none",i.style.transition="none",r.style.transform="scale(1)",i.style.transform="scale(1)");const l=r?.getBoundingClientRect()?.right,s=i?.getBoundingClientRect()?.left;return e&&r.style&&i.style&&(r.style.removeProperty("transform"),i.style.removeProperty("transform"),r.offsetHeight,i.offsetHeight,r.style.removeProperty("transition"),i.style.removeProperty("transition")),void 0!==l&&void 0!==s&&(n=Math.abs(l-s)),n},o=({centerMode:t,contentContainer:n,extraPadding:r,numElementsPerPage:i,viewerContainer:l})=>{const o=(i-1)*s({centerMode:t,contentContainer:n}),a=e({element:l});return(l.getBoundingClientRect().width-o-2*r-a)/i},a=({contentContainer:n,extraPadding:r,firstIndexInView:i,lastIndexInView:l,viewerContainer:s})=>{const o=n.children[i],a=n.children[l],d=t(o,a),c=e({element:s});return`${d+a.offsetWidth+2*r+c}px`},d=({centerExtremesWhenExtraPadding:e,circular:n,contentContainer:r,currentPage:i,extraPadding:l,firstIndexInView:s,numPages:o})=>{let a=t(r.firstChild,r.children[s]);return l&&(e||n||0!==i&&i!==o-1?a-=l:n||i!==o-1||(a-=2*l)),-a+"px"},c={calcAdjustedNumElementsToSlide:n,calcContentContainerLeftPosition:d,calcFirstAndLastIndexInCarouselView:i,calcGapBetweenContentContainerElements:s,calcNumElementsPerPage:l,calcNumPages:r,calcSliceWidth:o,calcViewerWidth:a,calcXDistanceBetween2Elements:t};export{n as calcAdjustedNumElementsToSlide,d as calcContentContainerLeftPosition,i as calcFirstAndLastIndexInCarouselView,s as calcGapBetweenContentContainerElements,e as calcHorizontalElementPadding,l as calcNumElementsPerPage,r as calcNumPages,o as calcSliceWidth,a as calcViewerWidth,t as calcXDistanceBetween2Elements,c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./calc.utils.js";const t=({
|
|
1
|
+
import e from"./calc.utils.js";const t=({centerMode:t,contentContainer:n,extraPadding:i,numElementsPerPage:r,viewerContainer:l})=>{const o=e.calcSliceWidth({centerMode:t,contentContainer:n,extraPadding:i,numElementsPerPage:r,viewerContainer:l});for(let e=0;e<n.childNodes.length;e++){const t=n.childNodes[e];t instanceof HTMLElement&&(t.style.width=`${o}px`)}},n=({contentContainer:e,firstIndexInView:t,lastIndexInView:n})=>{for(let i=0;i<e.children.length;i++)i<t||i>n?e.children[i].setAttribute("inert",""):e.children[i].removeAttribute("inert")},i=({contentContainer:t,extraPadding:n,firstIndexInView:i,lastIndexInView:r,viewerContainer:l})=>{const o=e.calcViewerWidth({contentContainer:t,extraPadding:n,firstIndexInView:i,lastIndexInView:r,viewerContainer:l});l.style.width=o},r=({contentContainer:e,firstIndexInView:t,lastIndexInView:n,numElementsPerPage:i})=>{if(i%2!=0){const i=t+(n-t)/2;e.children[i].setAttribute("data-highlighted","true")}},l=({contentContainer:e})=>{for(let t=0;t<e.children.length;t++)e.children[t].removeAttribute("data-highlighted")},o=({circular:e,contentContainer:t,elementsLength:n,numElementsPerPage:i})=>{if(t.children.length>n){const e=(t.children.length-n)/2;for(let n=0;n<e;n++)t.firstElementChild&&t.removeChild(t.firstElementChild),t.lastElementChild&&t.removeChild(t.lastElementChild)}if(e&&n>i){const e=[],n=[],r=t.children.length,l=i+1;for(let i=0;i<l;i++){const l=t.children[i];l&&e.push(l.cloneNode(!0));const o=t.children[r-1-i];o&&n.push(o.cloneNode(!0))}e.forEach(e=>t.appendChild(e)),n.forEach(e=>t.insertBefore(e,t.firstChild))}},a={center:"center",left:"flex-start",right:"flex-end"},d=({allowModifySliceWidth:e,contentContainer:t,onePageAlign:n,rootContainer:i})=>{e?t.style.justifyContent=a[n]:i.style.justifyContent=a[n]},s=({contentContainer:t,currentPage:n,elementsLength:i,extraPadding:r,numElementsPerPage:l,numPages:o})=>{const a=n===o;if(a||-1===n){const n=a?l+1:i+1;let d=e.calcXDistanceBetween2Elements(t.firstChild,t.children[n]);return d-=r,t.style.left=-d+"px",{newPage:a?0:o-1}}return{newPage:n}},c={alignOnePageCarousel:d,applyCenterMode:r,deleteCenterMode:l,manageCircularClones:o,udpateCarouselPositionOnEdge:s,updateContentElementsAriaVisibility:n,updateSlicesWidth:t,updateViewerWidth:i};export{d as alignOnePageCarousel,r as applyCenterMode,c as default,l as deleteCenterMode,o as manageCircularClones,s as udpateCarouselPositionOnEdge,n as updateContentElementsAriaVisibility,t as updateSlicesWidth,i as updateViewerWidth};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as r}from"react";import{RenderIf as s}from"
|
|
2
|
-
return e.jsxs("div",{ref:
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as r}from"react";import{RenderIf as s}from"../../lib/components/renderIf/renderIf.js";import{useId as a}from"../../lib/hooks/useId/useId.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CheckboxBaseControlled as o}from"../checkboxBase/checkboxBaseControlled.js";import{ErrorMessage as d}from"./components/errorMessage.js";import{Label as t}from"./components/label.js";import{buildAriaDescribedBy as l}from"./utils/aria.utils.js";const c=r(({checkboxBase:r,cssClasses:c,errorMessage:n,id:b,label:m,screenReaderText:j,...h},p)=>{const x=i(h),{"aria-describedby":u,"aria-hidden":f,"aria-label":k,"aria-labelledby":y,...I}=x,v=a("checkbox"),C=b??v,g=`${C}-label`,B=`${C}-error`,$=`${C}-screen-reader`,M=r?.variant,R=l({ariaDescribedBy:h["aria-describedby"],error:h.error&&!!n?.message,errorMessageId:B,screenReader:!!j,screenReaderId:$});/* @__PURE__ */
|
|
2
|
+
return e.jsxs("div",{ref:p,...I,className:c?.checkbox,children:[
|
|
3
3
|
/* @__PURE__ */e.jsxs("div",{className:c?.checkboxwithlabelcontainer,children:[
|
|
4
4
|
/* @__PURE__ */e.jsx(s,{condition:!!M,children:/* @__PURE__ */e.jsx(o,{...h,"aria-describedby":R,"aria-hidden":h["aria-hidden"],"aria-label":h["aria-label"],"aria-labelledby":h["aria-labelledby"],id:C,variant:M})}),
|
|
5
5
|
/* @__PURE__ */e.jsx("screen-reader-only",{id:$,children:j}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{
|
|
2
|
-
return s.jsxs("div",{ref:
|
|
3
|
-
/* @__PURE__ */s.jsx("input",{ref:o,className:c?.input,type:"checkbox",...
|
|
4
|
-
/* @__PURE__ */s.jsx("span",{className:c?.iconcontainer,"data-state":
|
|
1
|
+
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{ElementOrIcon as e}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{processIcon as a}from"../../lib/utils/process/processIcon/processIcon.js";const c=t(({checkedIcon:t,cssClasses:c,inputRef:o,...n},r)=>{const i=n["data-testid"]??"checkbox-base";/* @__PURE__ */
|
|
2
|
+
return s.jsxs("div",{ref:r,className:c?.checkbox_base,"data-testid":i,children:[
|
|
3
|
+
/* @__PURE__ */s.jsx("input",{ref:o,className:c?.input,type:"checkbox",...n,"data-testid":`${i}-input`}),
|
|
4
|
+
/* @__PURE__ */s.jsx("span",{className:c?.iconcontainer,"data-state":n["data-state"],children:/* @__PURE__ */s.jsx(e,{className:c?.icon,complex:!0,"data-state":n["data-state"],...a(t)})})]})});export{c as CheckboxBaseStandAlone};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{
|
|
1
|
+
import{j as s}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{Text as e}from"../text/text.js";import{ElementOrIcon as r}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as o}from"../../lib/components/renderIf/renderIf.js";import{STATES as a}from"../../lib/types/states/states.js";import{isReactNode as i}from"../../lib/utils/is/isReactNode.js";import{isString as n}from"../../lib/utils/is/isString.js";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processIcon as c}from"../../lib/utils/process/processIcon/processIcon.js";import{processText as m}from"../../lib/utils/process/processText/processText.js";const p=t(({closeIcon:t,cssClasses:p,deleteText:d="Delete",errorIcon:x,errorMessage:j={content:"Error message"},label:u,leftIcon:b,range:f,rangeIcon:g,rangeSeparator:I={content:"to"},state:h,...A},N)=>{const C={"data-state":h},D=l(A);/* @__PURE__ */
|
|
2
2
|
return s.jsxs(s.Fragment,{children:[
|
|
3
|
-
/* @__PURE__ */s.jsxs("span",{ref:N,"aria-disabled":h===
|
|
3
|
+
/* @__PURE__ */s.jsxs("span",{ref:N,"aria-disabled":h===a.DISABLED,"aria-hidden":h===a.DISABLED,className:p?.chip,"data-testid":"chip",...D,...C,children:[!f&&b&&/* @__PURE__ */s.jsx(r,{className:p?.lefticon,...c(b)}),f?/* @__PURE__ */s.jsx("span",{children:f.map((t,o)=>{const a=o!==f.length-1;/* @__PURE__ */
|
|
4
4
|
return s.jsxs("span",{className:p?.rangeitemwrapper,children:[
|
|
5
|
-
/* @__PURE__ */s.jsx(
|
|
6
|
-
/* @__PURE__ */s.jsx(
|
|
7
|
-
/* @__PURE__ */s.jsx(
|
|
8
|
-
/* @__PURE__ */s.jsx(
|
|
9
|
-
/* @__PURE__ */s.jsx(
|
|
5
|
+
/* @__PURE__ */s.jsx(e,{additionalClasses:{text:p?.rangeitemtext},component:"span",customAttributes:C,children:t.label}),a&&(g?.icon?/* @__PURE__ */s.jsx(r,{altText:(n(u)||i(u),m(I).children||""),className:p?.rangeicon,...c(g),customAttributes:C}):/* @__PURE__ */s.jsx(e,{additionalClasses:{text:p?.rangeitemseparator},component:"span",customAttributes:C,...m(I)}))]},`option-${t.key??t.label}`)})}):/* @__PURE__ */s.jsx(e,{additionalClasses:{text:p?.label},component:"span",...m(u),customAttributes:C}),
|
|
6
|
+
/* @__PURE__ */s.jsx(r,{className:p?.closeicon,disabled:h===a.DISABLED,...c(t),altText:!n(t)&&t?.altText?t.altText:d,customAttributes:C})]}),
|
|
7
|
+
/* @__PURE__ */s.jsx(o,{condition:h===a.ERROR,children:/* @__PURE__ */s.jsxs("span",{"aria-live":"polite",className:p?.errorcontainer,children:[
|
|
8
|
+
/* @__PURE__ */s.jsx(r,{className:p?.erroricon,...c(x)}),
|
|
9
|
+
/* @__PURE__ */s.jsx(e,{additionalClasses:{text:p?.errormessage},component:"span",customAttributes:C,...m(j)})]})})]})});export{p as ChipStandAlone};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{j as a}from"../../_virtual/jsx-runtime.js";import{forwardRef as o,Fragment as s}from"react";import{
|
|
1
|
+
import{j as a}from"../../_virtual/jsx-runtime.js";import{forwardRef as o,Fragment as s}from"react";import{TableBody as e}from"../tableBody/tableBody.js";import{RenderIf as t}from"../../lib/components/renderIf/renderIf.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{Table as l}from"../table/table.js";import{TableCaption as n}from"../tableCaption/tableCaption.js";import{TableDivider as r}from"../tableDivider/tableDivider.js";import{DataTableHead as d}from"./components/dataTableHead.js";import{DataTableRows as c}from"./components/dataTableRows.js";import{HiddenDataTableHead as b}from"./components/hiddenDataTableHead.js";import{applyZIndexToWrapper as m,applyPositionToWrapper as p}from"./utils/tableConfig.js";const h=o(({activeRows:o,caption:h,columns:j,config:f,cssClasses:v,hasScroll:w,hoverable:u,hoverableRows:x,nonHoverableRows:C,rowGroups:g,rows:R,stickyHead:y,styles:_,...H},S)=>{const k=g&&g.length>0,D=i(H);/* @__PURE__ */
|
|
2
2
|
return a.jsxs("div",{ref:S,className:v?.data_table,"data-testid":"data-table",...D,children:[
|
|
3
3
|
/* @__PURE__ */a.jsxs("div",{"aria-label":w?H["aria-label"]:void 0,"aria-labelledby":w?H["aria-labelledby"]:void 0,className:v?.scrollablecontainer,"data-datatable-scrollable-container":!0,role:w?"region":void 0,...w?{tabIndex:0}:{},children:[
|
|
4
|
-
/* @__PURE__ */a.jsxs(
|
|
5
|
-
/* @__PURE__ */a.jsx(
|
|
4
|
+
/* @__PURE__ */a.jsxs(l,{additionalClasses:v?.table,"aria-hidden":!!k||void 0,autoLeftStickyCalc:!1,autoRightStickyCalc:!1,component:k?"div":void 0,disableShadowEffects:!0,hasScrollDisabled:!0,sticky:y,...m({tableConfig:f?.table}),children:[
|
|
5
|
+
/* @__PURE__ */a.jsx(t,{condition:!!h?.content,children:/* @__PURE__ */a.jsx(n,{additionalClasses:v?.table_caption,component:k?"div":void 0,...h,children:h?.content})}),
|
|
6
6
|
/* @__PURE__ */a.jsx(d,{columns:j,cssClasses:v,sticky:y,tableHeadConfig:f?.tableHead,tableHeadRowConfig:f?.tableHeadRow,usingRowGroups:k}),
|
|
7
|
-
/* @__PURE__ */a.jsx(
|
|
8
|
-
/* @__PURE__ */a.jsx(
|
|
9
|
-
/* @__PURE__ */a.jsxs(
|
|
10
|
-
/* @__PURE__ */a.jsx(
|
|
7
|
+
/* @__PURE__ */a.jsx(t,{condition:!k&&R&&R.length>0,children:/* @__PURE__ */a.jsx(e,{additionalClasses:v?.table_body,...f?.tableBody,children:/* @__PURE__ */a.jsx(c,{activeRows:o,columns:j,cssClasses:v,hoverable:u,hoverableRows:x,nonHoverableRows:C,rows:R,usingRowGroups:k})})})]}),g?.map((i,d)=>/* @__PURE__ */a.jsxs(s,{children:[
|
|
8
|
+
/* @__PURE__ */a.jsx(t,{condition:!!i.divider,children:/* @__PURE__ */a.jsx(r,{variant:"DEFAULT",...i.divider,children:i.divider?.content})}),
|
|
9
|
+
/* @__PURE__ */a.jsxs(l,{additionalClasses:v?.row_group_table,autoLeftStickyCalc:!1,autoRightStickyCalc:!1,disableShadowEffects:!0,hasScrollDisabled:!0,...p({tableConfig:i.config?.table}),children:[
|
|
10
|
+
/* @__PURE__ */a.jsx(t,{condition:!!i.caption?.content,children:/* @__PURE__ */a.jsx(n,{additionalClasses:v?.row_group_table_caption,...i.caption,children:i.caption?.content})}),
|
|
11
11
|
/* @__PURE__ */a.jsx(b,{columns:j,cssClasses:v}),
|
|
12
|
-
/* @__PURE__ */a.jsx(
|
|
12
|
+
/* @__PURE__ */a.jsx(e,{additionalClasses:v?.row_group_table_body,...i.config?.tableBody,children:/* @__PURE__ */a.jsx(c,{activeRows:o,columns:j,cssClasses:v,hoverable:u,hoverableRows:x,isRowGroup:!0,nonHoverableRows:C,rows:i.rows,usingRowGroups:k})})]})]},`${i.caption?.["data-testid"]}-${d.toString()}`))]}),
|
|
13
13
|
/* @__PURE__ */a.jsx("div",{className:v?.leftboxshadowcontainer,"data-datatable-left-shadow":!0}),
|
|
14
14
|
/* @__PURE__ */a.jsx("div",{className:v?.rightboxshadowcontainer,"data-datatable-right-shadow":!0})]})});export{h as DataTableStandAlone};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{j as o}from"../../_virtual/jsx-runtime.js";import{forwardRef as e,useMemo as t}from"react";import{
|
|
2
|
-
return o.jsxs("div",{ref:B,className:
|
|
3
|
-
/* @__PURE__ */o.jsxs(
|
|
4
|
-
/* @__PURE__ */o.jsx(
|
|
5
|
-
/* @__PURE__ */o.jsx(
|
|
6
|
-
/* @__PURE__ */o.jsx(
|
|
1
|
+
import{j as o}from"../../_virtual/jsx-runtime.js";import{forwardRef as e,useMemo as t}from"react";import{Text as s}from"../text/text.js";import{ElementOrIcon as n}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as i}from"../../lib/components/renderIf/renderIf.js";import{useId as r}from"../../lib/hooks/useId/useId.js";import{pickCustomAttributes as l}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as a}from"../../lib/utils/process/processText/processText.js";import{CustomComponent as c}from"../../lib/components/customComponent/customComponent.js";import{ListOptions as p}from"../listOptions/listOptions.js";import{keyUpMove as d,keyDownMove as m}from"../listOptions/utils/listOptions.utils.js";import{Popover as u}from"../popover/popover.js";const b=e(({buttonOrLinkRef:e,component:b,cssClasses:f,icon:v,label:x,listOptions:j,listOptionsRef:C,onBlur:h,onButtonClick:k,onButtonKeyDown:y,onClosePopover:O,onFocus:D,onKeyDown:g,onOptionClick:w,open:F,optionSelected:M,popover:I,url:A,urlTarget:K,...T},B)=>{const N=r("DropdownSelected"),E=F?`${N}-list`:void 0,R=T["data-testid"]||"dropdown-selected",S=l(T),L=t(()=>{return{currentFocusSelected:-1,keyDownMove:m(j.options),keyLeftMove:0,keyRightMove:0,keyTabMove:(o=j.options,(e,t)=>{if(t?.shiftKey){const o=Math.max(e,0)-1;return o>=0&&t?.preventDefault(),Math.max(o,0)}const s=Math.max(e,0)+1;return s<=o.length-1&&t?.preventDefault(),Math.min(s,o.length-1)}),keyUpMove:d,size:j.options.length};var o},[j.options]);/* @__PURE__ */
|
|
2
|
+
return o.jsxs("div",{ref:B,className:f?.dropdown_selected,"data-testid":R,role:"combobox",onBlur:h,onFocus:D,onKeyDown:g,...S,"aria-controls":"dropdown-selected-list","aria-expanded":F,tabIndex:0,children:[
|
|
3
|
+
/* @__PURE__ */o.jsxs(c,{ref:e,"aria-controls":E,"aria-expanded":F,"aria-haspopup":"listbox",className:f?.buttonorlinkcontainer,component:b,target:A?K:void 0,type:A?void 0:"button",url:A,onClick:k,onKeyDown:y,children:[
|
|
4
|
+
/* @__PURE__ */o.jsx(s,{additionalClasses:{text:F?f?.labelopened:f?.labelclosed},component:"span",...a(x)}),
|
|
5
|
+
/* @__PURE__ */o.jsx(n,{className:F?f?.iconopened:f?.iconclosed,rotate:F?"180deg":"0deg",transitionDuration:"0.2s",...v})]}),
|
|
6
|
+
/* @__PURE__ */o.jsx(i,{condition:!!I,children:/* @__PURE__ */o.jsx(u,{anchorElement:e?.current,component:"div",disableAutoFocusFirstDescendant:!0,disableAutoFocusFirstDescendantAfterClose:!0,disableClickOverlayClose:!1,disableEscapeClose:!1,disableTrapFocus:!0,id:E,open:F,placement:"bottom",preventCloseOnClickElements:[e?.current],strategy:"absolute",...I,onClose:()=>{O(),I?.onClose?.()},children:/* @__PURE__ */o.jsx("div",{className:f?.listoptionscontainer,"data-testid":`${R}-list`,children:/* @__PURE__ */o.jsx(i,{condition:!!j.variant&&!!j.optionVariant,children:/* @__PURE__ */o.jsx(p,{ref:C,roveFocus:"selection"===j.type?L:void 0,selectedValue:M,...j,onOptionClick:o=>{w(o),O()}})})})})})]})});export{b as DropdownSelectedStandAlone};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{j as i}from"../../_virtual/jsx-runtime.js";import{forwardRef as r}from"react";import{RenderIf as t}from"
|
|
1
|
+
import{j as i}from"../../_virtual/jsx-runtime.js";import{forwardRef as r}from"react";import{RenderIf as t}from"../../lib/components/renderIf/renderIf.js";import{pickCustomAttributes as e}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{InputBase as a}from"../inputBase/inputBase.js";import{InputDecoration as o}from"../inputDecoration/inputDecoration.js";const s=r(({cssClasses:r,disabled:s,error:n,filled:d,focused:l,inputBaseId:c,label:u,labelId:p,leftDecoration:f,required:m,rightDecoration:j,...v},b)=>{const x=e(v);/* @__PURE__ */
|
|
2
2
|
return i.jsxs("div",{ref:b,className:r?.input,...x,children:[
|
|
3
|
-
/* @__PURE__ */i.jsx(t,{condition:!(!
|
|
3
|
+
/* @__PURE__ */i.jsx(t,{condition:!(!f||!f?.variant&&!r?.left_decoration),children:/* @__PURE__ */i.jsx(o,{disabled:s,error:n,...f,additionalClasses:f?.variant?void 0:r?.left_decoration,variant:f?.variant})}),
|
|
4
4
|
/* @__PURE__ */i.jsx("div",{...x,className:r?.inputandlabelcontainer,children:/* @__PURE__ */i.jsx(t,{condition:!!r?.input,children:/* @__PURE__ */i.jsx(a,{disabled:s,error:n,filled:d,focused:l,required:m,...v,additionalClasses:r?.input_base})})}),
|
|
5
5
|
/* @__PURE__ */i.jsx(t,{condition:!(!j||!j?.variant&&!r?.right_decoration),children:/* @__PURE__ */i.jsx(o,{disabled:s,error:n,filled:d,focused:l,...j,additionalClasses:j?.variant?void 0:r?.right_decoration,variant:j?.variant})})]})});export{s as InputStandAlone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as o}from"react";import{
|
|
2
|
-
return t.jsx("div",{ref:c,className:o?.input_decoration,style:{pointerEvents:
|
|
1
|
+
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as o}from"react";import{ElementOrIcon as e}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{pickCustomAttributes as s}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";const i=o(({cssClasses:o,decoration:i,disabled:r,...n},c)=>{if(!i?.icon)return null;const l=s(n);/* @__PURE__ */
|
|
2
|
+
return t.jsx("div",{ref:c,className:o?.input_decoration,style:{pointerEvents:i.onClick?"auto":"none"},...l,children:/* @__PURE__ */t.jsx(e,{className:o?.decoration,...i,onClick:i.onClick})})});export{i as InputDecorationStandAlone};
|
|
@@ -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:x,className:n?.input_signature,"data-testid":C,role:"button",tabIndex:-1,onBlur:l,onClick:
|
|
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{RenderIf as r}from"../../lib/components/renderIf/renderIf.js";import{STATES as o}from"../../lib/types/states/states.js";import{pickCustomAttributes as a}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as i}from"../../lib/utils/process/processText/processText.js";const n=s(({canvasRef:s,cssClasses:n,errorText:c,onBlurContainer:l,onClickContainer:m,placeholder:d,state:p,...u},x)=>{const j=p===o.DEFAULT||p===o.ERROR||p===o.DISABLED,f=p===o.ERROR&&c?c:d,b={"data-state":p},C=u["data-testid"]||"input-signature",v=a(u),R=a(b);/* @__PURE__ */
|
|
2
|
+
return t.jsxs("div",{ref:x,className:n?.input_signature,"data-testid":C,role:"button",tabIndex:-1,onBlur:l,onClick:m,onKeyDown:m,...R,...v,children:[
|
|
3
3
|
/* @__PURE__ */t.jsx("canvas",{ref:s,className:n?.canvas,"data-testid":`${C}-canvas`,...R}),
|
|
4
|
-
/* @__PURE__ */t.jsx(
|
|
4
|
+
/* @__PURE__ */t.jsx(r,{condition:j,children:/* @__PURE__ */t.jsx("div",{className:n?.placeholdercontainer,...R,children:/* @__PURE__ */t.jsx(e,{additionalClasses:{text:n?.placeholdertext},customAttributes:b,...i(f)})})})]})});export{n as InputSignatureStandAlone};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as e}from"react";import{
|
|
2
|
-
return t.jsxs(
|
|
3
|
-
/* @__PURE__ */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{RenderIf as r}from"../../lib/components/renderIf/renderIf.js";import{useId as i}from"../../lib/hooks/useId/useId.js";const o=e(({asteriskColor:e,asteriskCssClasses:o,asteriskWeight:a,children:d,color:l,cursor:n,customAttributes:c,id:m,inputId:u,required:h,requiredSymbol:p,textCssClasses:x,weight:b,...j},f)=>{const C=i("label"),I=m??C,g=j["data-testid"]||"label";/* @__PURE__ */
|
|
2
|
+
return t.jsxs(s,{ref:f,additionalClasses:{text:x},color:l,component:"label",cursor:n,customAttributes:c,"data-testid":g,htmlFor:u,id:I,weight:b,children:[d,
|
|
3
|
+
/* @__PURE__ */t.jsx(r,{condition:h,children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:o},"aria-hidden":!0,color:e,component:"span","data-testid":`${g}Required`,weight:a,children:p})})]})});export{o as Label,o as LabelStandAlone};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as e}from"react";import{Text as o}from"../text/text.js";import{
|
|
2
|
-
return t.jsx(
|
|
3
|
-
/* @__PURE__ */t.jsx(
|
|
1
|
+
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as e}from"react";import{Text as o}from"../text/text.js";import{ElementOrIcon as s}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{classNames as r}from"../../lib/utils/classNames/classNames.js";import{pickCustomAttributes as i}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{CustomComponent as l}from"../../lib/components/customComponent/customComponent.js";const n=e(({children:e,color:n,component:c=o,cssClasses:a,cssTextClasses:m,decoration:d,disabled:p,draggable:u,icon:j,iconPosition:x,id:b,onClick:f,rel:g,role:C,target:h,url:k,weight:N,...v},w)=>{const y=p?void 0:f,A=p?void 0:k,D=r(a?.link,m?.text),I={flexDirection:"left"===x?"row":"row-reverse"},O={color:n,fontWeight:N,textDecoration:d},P=i(v);/* @__PURE__ */
|
|
2
|
+
return t.jsx(l,{ref:w,className:D,component:c,"data-testid":"link",disabled:p,draggable:u,id:b,rel:g,role:C,style:O,target:h,url:A,onClick:y,...P,children:j?/* @__PURE__ */t.jsxs("span",{className:a?.labelandiconcontainer,style:I,children:[
|
|
3
|
+
/* @__PURE__ */t.jsx(s,{className:a?.icon,...j},"icon"),e]}):/* @__PURE__ */t.jsx("span",{style:I,children:e})})});export{n as LinkStandAlone};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as o,useMemo as e,useImperativeHandle as i}from"react";import{
|
|
1
|
+
import{j as t}from"../../_virtual/jsx-runtime.js";import{forwardRef as o,useMemo as e,useImperativeHandle as i}from"react";import{Text as s}from"../text/text.js";import{RenderIf as n}from"../../lib/components/renderIf/renderIf.js";import{useId as r}from"../../lib/hooks/useId/useId.js";import{useRoveFocus as l}from"../../lib/hooks/useRoveFocus/useRoveFocus.js";import{pickCustomAttributes as c}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as a}from"../../lib/utils/process/processText/processText.js";import{CustomComponent as d}from"../../lib/components/customComponent/customComponent.js";import{Option as p}from"../option/option.js";import{keyUpMove as m,keyDownMove as u,isSelected as h,getOptionVariant as j}from"./utils/listOptions.utils.js";const v=o(({caseSensitive:o,charsHighlighted:v,checkedIcon:b,content:x,cssClasses:g,highlightedOptionVariant:f,id:k,index:C=0,listComponent:$,multiSelect:y,onOptionClick:S,options:I,optionsContainerArias:F,roveFocus:M,selectedValue:O,title:A,type:N="selection",...R},T)=>{const V=R["data-testid"]??"list-options",H=c(R),L=e(()=>({currentFocusSelected:-1,keyDownMove:u(I),keyLeftMove:0,keyRightMove:0,keyTabMove:null,keyUpMove:m,size:I.length}),[I]),[_,w,z]=l(M??L),D=r();i(T,()=>z.current,[z]);const U=k??D,q="selection"===N,B="navigation"===N,E=I&&I.length>0;/* @__PURE__ */
|
|
2
2
|
return t.jsxs("div",{className:g?.list_options,"data-testid":V,...H,children:[
|
|
3
|
-
/* @__PURE__ */t.jsx(
|
|
4
|
-
/* @__PURE__ */t.jsx(
|
|
3
|
+
/* @__PURE__ */t.jsx(n,{condition:!!A&&I.length>0,children:/* @__PURE__ */t.jsx("div",{className:g?.titlecontainer,children:/* @__PURE__ */t.jsx(s,{additionalClasses:{text:g?.title},...a(A)})})}),x,
|
|
4
|
+
/* @__PURE__ */t.jsx(n,{condition:E,children:/* @__PURE__ */t.jsx(d,{ref:z,"aria-label":F?.["aria-label"],"aria-labelledby":F?.["aria-labelledby"],className:g?.optionscontainer,component:$??"ul",id:U,role:q?"listbox":void 0,children:I.map((e,i)=>{const s=h(e,O,y,o),n=`${V}-section-${C}-option-${i}`,r=/* @__PURE__ */t.jsx(p,{"aria-current":B?s:void 0,"aria-selected":q?s:void 0,checkedIcon:b,component:B?"div":"li","data-testid":n,focus:_===i,labelCharsHighlighted:v,multiSelect:y,role:q?"option":void 0,selected:s,tabIndex:B?0:-1,variant:j(e.highlighted,f,R?.optionVariant),...e,onClick:t=>{w(i),S?.(e.value,t),e.onClick?.(t)},onFocus:t=>{i!==_&&w(i),e.onFocus?.(t)}},`${U}Option-${C.toString()}-${i.toString()}`);return"selection"===N?/* @__PURE__ */t.jsx("li",{children:r},`${U}LiOption-${C.toString()}-${i.toString()}`):r})})})]})});export{v as ListOptionsStandAlone};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{j as n}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{Button as e}from"../button/button.js";import{
|
|
2
|
-
return n.jsx("div",{...z,"aria-live":x,className:g?.message,children:/* @__PURE__ */n.jsx(
|
|
3
|
-
/* @__PURE__ */n.jsxs(
|
|
4
|
-
/* @__PURE__ */n.jsx(
|
|
5
|
-
/* @__PURE__ */n.jsx(
|
|
6
|
-
/* @__PURE__ */n.jsxs("div",{className:
|
|
7
|
-
/* @__PURE__ */n.jsx(
|
|
8
|
-
/* @__PURE__ */n.jsx(
|
|
9
|
-
/* @__PURE__ */n.jsx(
|
|
10
|
-
/* @__PURE__ */n.jsx(
|
|
1
|
+
import{j as n}from"../../_virtual/jsx-runtime.js";import{forwardRef as t}from"react";import{Button as e}from"../button/button.js";import{Tag as i}from"../tag/tag.js";import{Text as o}from"../text/text.js";import{ElementOrIcon as s}from"../../lib/components/elementOrIcon/elementOrIcon.js";import{RenderIf as r}from"../../lib/components/renderIf/renderIf.js";import{classNames as c}from"../../lib/utils/classNames/classNames.js";import{isString as l}from"../../lib/utils/is/isString.js";import{pickCustomAttributes as a}from"../../lib/utils/pickCustomAttributes/pickCustomAttributes.js";import{processText as d}from"../../lib/utils/process/processText/processText.js";import{CustomComponent as m}from"../../lib/components/customComponent/customComponent.js";import{Link as j}from"../link/link.js";const x=t(({actionButton:t,ariaLive:x="off",ariaMessageId:p,closeIcon:h,content:u,cssClasses:g,extraActionButton:f,id:v,infoIcon:C,inlineLink:b,linkComponent:N,links:k,maxContentLength:I=246,messageContainerProps:A,open:L,role:S,tag:y,title:B,titleAndContentContainerProps:O,titleAndContentRole:P,...T},$)=>{const _=T["data-testid"]||"message",z=a(T),M=d(u),R=d(B),q="string"==typeof M.children&&M.children?.toString().length>=I;/* @__PURE__ */
|
|
2
|
+
return n.jsx("div",{...z,"aria-live":x,className:g?.message,children:/* @__PURE__ */n.jsx(r,{condition:L,children:/* @__PURE__ */n.jsxs(m,{ref:$,className:g?.container,component:A?.url?N:"div","data-testid":_,id:v,role:S,target:A?.target,url:A?.url||void 0,onClick:A?.onClick,children:[C?.icon?/* @__PURE__ */n.jsx(s,{className:g?.infoicon,...C}):null,
|
|
3
|
+
/* @__PURE__ */n.jsxs(m,{className:c(g?.headercontainer,{[`${g?.headercontainerlargemessage}`]:q}),component:O?.url?N:"div",role:P,target:O?.target,url:O?.url||void 0,onClick:O?.onClick,children:[
|
|
4
|
+
/* @__PURE__ */n.jsx(r,{condition:!!B,children:l(R.children)?/* @__PURE__ */n.jsx("div",{"aria-errormessage":p,className:g?.titlecontainer,children:/* @__PURE__ */n.jsx(o,{additionalClasses:{text:g?.title},component:"p",...R})}):R.children}),
|
|
5
|
+
/* @__PURE__ */n.jsx(r,{condition:!!y?.content,children:/* @__PURE__ */n.jsx(r,{condition:!!y?.content,children:/* @__PURE__ */n.jsx(i,{variant:"",...y,label:{content:y?.content}})})}),
|
|
6
|
+
/* @__PURE__ */n.jsxs("div",{className:c(g?.contentcontainer,{[`${g?.contentcontainerlargemessage}`]:q}),children:["string"==typeof u?/* @__PURE__ */n.jsx(o,{additionalClasses:{text:g?.description},component:"p",...M}):M.children,
|
|
7
|
+
/* @__PURE__ */n.jsx(r,{condition:!!b?.content,children:/* @__PURE__ */n.jsx(j,{decoration:"underline",...b,url:b?.url||"",children:b?.content||""})})]}),
|
|
8
|
+
/* @__PURE__ */n.jsx(r,{condition:!(!f&&!t),children:/* @__PURE__ */n.jsxs("div",{className:g?.buttonsectioncontainer,children:[/* @__PURE__ */n.jsx(r,{condition:!!f?.content,children:/* @__PURE__ */n.jsx("div",{className:g?.extraactionbuttoncontainer,children:/* @__PURE__ */n.jsx(e,{...f,children:f?.content})})}),/* @__PURE__ */n.jsx(r,{condition:!!t?.content,children:/* @__PURE__ */n.jsx("div",{className:g?.actionbuttoncontainer,children:/* @__PURE__ */n.jsx(e,{additionalSizeClasses:t?.variant?void 0:g?.action_button,...t,children:t?.content})})})]})}),
|
|
9
|
+
/* @__PURE__ */n.jsx(r,{condition:!!(k&&k.length>0),children:/* @__PURE__ */n.jsx("div",{className:g?.linkscontainer,children:k?.map(t=>t.content?/* @__PURE__ */n.jsx("div",{className:g?.linkcontainer,children:/* @__PURE__ */n.jsx(j,{decoration:"underline",...t,children:t.content})},t.content):null)})})]}),
|
|
10
|
+
/* @__PURE__ */n.jsx(s,{className:g?.closeicon,...h})]})})})});export{x as MessageStandAlone};
|
|
@@ -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 +1 @@
|
|
|
1
|
-
import{shift as e,offset as t,flip as i,hide as s,arrow as n}from"@floating-ui/dom";import{getPlacementDirection as a}from"../../utils/placement.utils.js";const r=({arrowElement:r,customMiddlewares:d,edgePadding:o,hideWhenDetached:h,isBodyAnchor:m,mainAxisOffset:c,offsetDistance:p,placement:l})=>{let u=[];return u=d?.length?[...d]:m?((i,s)=>{const n=a(i),r=[];return"center"===n?r.push(e({crossAxis:!0,mainAxis:!0,padding:s})):n.startsWith("right")||n.startsWith("left")?r.push(t({alignmentAxis:0,mainAxis:0})):(n.startsWith("bottom")||n.startsWith("top"))&&r.push(t({mainAxis:0})),r})(l,o):((s,n,a)=>{const r=[];return r.push(t({crossAxis:n?.[1]||0,mainAxis:s})),r.push(i({fallbackAxisSideDirection:"start",padding:a})),r.push(e({padding:a})),r})(c,p,o),(({
|
|
1
|
+
import{shift as e,offset as t,flip as i,hide as s,arrow as n}from"@floating-ui/dom";import{getPlacementDirection as a}from"../../utils/placement.utils.js";const r=({arrowElement:r,customMiddlewares:d,edgePadding:o,hideWhenDetached:h,isBodyAnchor:m,mainAxisOffset:c,offsetDistance:p,placement:l})=>{let u=[];return u=d?.length?[...d]:m?((i,s)=>{const n=a(i),r=[];return"center"===n?r.push(e({crossAxis:!0,mainAxis:!0,padding:s})):n.startsWith("right")||n.startsWith("left")?r.push(t({alignmentAxis:0,mainAxis:0})):(n.startsWith("bottom")||n.startsWith("top"))&&r.push(t({mainAxis:0})),r})(l,o):((s,n,a)=>{const r=[];return r.push(t({crossAxis:n?.[1]||0,mainAxis:s})),r.push(i({fallbackAxisSideDirection:"start",padding:a})),r.push(e({padding:a})),r})(c,p,o),(({arrowElement:e,edgePadding:t,hideWhenDetached:i,isBodyAnchor:a,middlewareStack:r})=>{!a&&i&&r.push(s()),e&&r.push(n({element:e,padding:t}))})({arrowElement:r,edgePadding:o,hideWhenDetached:h,isBodyAnchor:m,middlewareStack:u}),u},d=({arrowSize:e,hasArrow:t,offsetDistance:i})=>"number"==typeof i?.[0]?i[0]:t?e:0;export{d as calculateMainAxisOffset,r as getMiddlewareStack};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useRef as e,useState as r,useCallback as o,useEffect as n}from"react";import{syncInnerAndForwardedRef as l}from"../../../lib/hooks/syncRefs/syncRefs.js";import{useScrollBlock as t}from"../../../lib/hooks/useScrollBlock/useScrollBlock.js";import{convertDurationToNumber as s}from"../../../lib/hooks/useSwipeDown/utils/convertDurationToNumber.js";import{focusFirstDescendant as c}from"../../../lib/utils/focusHandlers/focusHandlers.js";const u=({animationExitDuration:u=200,disableAnimations:i,
|
|
1
|
+
import{useRef as e,useState as r,useCallback as o,useEffect as n}from"react";import{syncInnerAndForwardedRef as l}from"../../../lib/hooks/syncRefs/syncRefs.js";import{useScrollBlock as t}from"../../../lib/hooks/useScrollBlock/useScrollBlock.js";import{convertDurationToNumber as s}from"../../../lib/hooks/useSwipeDown/utils/convertDurationToNumber.js";import{focusFirstDescendant as c}from"../../../lib/utils/focusHandlers/focusHandlers.js";const u=({animationExitDuration:u=200,disableAnimations:i,disableAutoFocusFirstDescendant:a=!1,disableAutoFocusFirstDescendantAfterClose:m=!0,disableRestoreFocusAfterClose:d=!1,disableScrollBackground:f=!1,open:p=!1,popoverContainerRef:b,preventScrollOnCloseFocus:S=!1})=>{const w=e(null),R=e(!1),k=e(null),v=e(null),[F,A]=r(p),[C,D]=r(!1),h=s(u),{allowScroll:j,blockScroll:T}=t(),y=o(()=>{!a&&w.current&&c({element:w.current,preventScroll:!0})},[a]),B=o(()=>{d?m||c({element:document.body}):v.current?.focus({preventScroll:S})},[d,S,m]);n(()=>{p&&(v.current=document.activeElement,A(!0),D(!1))},[p]),n(()=>(!p&&F&&(i?(B(),A(!1),D(!1)):(D(!0),k.current=window.setTimeout(()=>{B(),A(!1),D(!1)},h))),()=>{null!==k.current&&(window.clearTimeout(k.current),k.current=null)}),[p,F,i,h,B]);const g=o(e=>{w.current=e,y(),f&&!R.current&&(R.current=!0,T({elementsToOmit:[w.current]}))},[T,y,f]),x=o(()=>{R.current&&j(),w.current=null},[j]);return{handleInnerRef:o(e=>{e?g(e):x(),l({forwardedRef:b,innerRef:w})},[b,x,g]),isClosing:C,isVisible:F,popoverRef:w}};export{u as usePopoverLifecycle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{computePosition as e,autoUpdate as t}from"@floating-ui/dom";import{useRef as r,useEffect as n,useCallback as i}from"react";import{positionArrow as a}from"./positioning/arrowPositionStyles.js";import{calculateMainAxisOffset as o,getMiddlewareStack as s}from"./positioning/middlewareUtils.js";import{determinePositioningConfig as c}from"./positioning/positionCalculation.js";import{applyPositionStyles as d}from"./positioning/positionStyles.js";const l=({anchorElement:l,arrowStyles:m,isVisible:u,middlewareOptions:p={},middlewares:f=[],placement:w,ref:h,strategy:g})=>{const{edgePadding:y=0,hideWhenDetached:S,offsetDistance:D}=p,b=r(document.body),P=r(null),E=r({anchorElement:l,arrowStyles:m,isVisible:u,middlewareOptions:{edgePadding:y,hideWhenDetached:S,offsetDistance:D},middlewares:f,placement:w,ref:h,strategy:g});n(()=>{E.current={anchorElement:l,arrowStyles:m,isVisible:u,middlewareOptions:{edgePadding:y,hideWhenDetached:S,offsetDistance:D},middlewares:f,placement:w,ref:h,strategy:g}},[l,w,D,y,S,f,g,u,h,m]);const A=i(()=>h?.current&&u&&m?(P.current=h.current.querySelector('[data-kbt-id="popover-arrow"]'),P.current):null,[h,u,m]);n(()=>{const e=()=>{!A()&&u&&m&&h?.current&&requestAnimationFrame(e)};e()},[A,u,m]);const k=i((e,t)=>e&&t?.current&&document.body.contains(t.current),[]),O=i((e,t,r,n,i,o,s,c,l,u,p,f,w,h=[],g=[])=>{e?.current&&(d({edgePadding:s,hasCustomMiddlewares:h.length>0,isBodyAnchor:t,middlewareStack:g,placement:r,ref:e,strategy:o,x:n,y:i}),t||e.current.setAttribute("data-kbt-placement",u),a(!!m,c,l,u,p,f),w?.())},[m]),W=i((e,t,r,n,i,a,c)=>{const d=o({arrowSize:t,hasArrow:!!m,offsetDistance:e}),l=P.current;return{arrowElement:l,middlewareStack:s({arrowElement:l,customMiddlewares:a,edgePadding:n,hideWhenDetached:c?.hideWhenDetached,isBodyAnchor:r,mainAxisOffset:d,offsetDistance:e,placement:i})}},[m]),j=i((e,t,r,n,i,a,o,s,c,d,l,m,u,p=[],f=[])=>{const w=t.hide?.referenceHidden||t.hide?.escaped;e.current&&(e.current.style.opacity=w?"0":"",e.current.style.pointerEvents=w?"none":""),w||O(e,r,n,i,a,o,s,c,t,d,l,m,u,p,f)},[O]),x=i(async()=>{const{anchorElement:t,arrowStyles:r,middlewareOptions:n,middlewares:i,onPositioned:a,placement:o,ref:s,strategy:d}=E.current,l=n?.offsetDistance,m=n?.edgePadding??8,u=r?.size||0,p=t||b.current;if(!s?.current||!k(p,s))return;const f=p===document.body,{arrowElement:w,middlewareStack:h}=W(l,u,f,m,o,i,n||{}),{actualPlacement:g,autoStrategy:y}=c(f,d,o),S="center"===g?"top":g,D=await e(p,s.current,{middleware:h,placement:S,strategy:y}),{middlewareData:P,placement:A,x:O,y:x}=D;j(s,P,f,g,O,x,d,m,w,A,l,u,a,i,h)},[]);n(()=>{if(!u||!h?.current)return;h.current.offsetHeight,x();const e=l??b.current;let r=()=>{};return r=t(e,h.current,x,{ancestorResize:!0,ancestorScroll:!0,animationFrame:!1,elementResize:!0}),()=>{r()}},[u,l,x])};export{l as usePopoverPositioning};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{useClassName as o}from"../../lib/hooks/useClassName/useClassName.js";import{useTrapFocus as i}from"../../lib/hooks/useTrapFocus/useTrapFocus.js";import{usePopoverInteractions as r}from"./hooks/usePopoverInteractions.js";import{usePopoverLifecycle as l}from"./hooks/usePopoverLifecycle.js";import{usePopoverPositioning as a}from"./hooks/usePopoverPositioning.js";import{PopoverStandAlone as t}from"./popoverStandAlone.js";const n=s(({additionalClasses:s,anchorElement:n,animationExitDuration:p=200,disableAnimations:c=!1,disableAutoFocusFirstDescendant:d=!1,disableAutoFocusFirstDescendantAfterClose:m=!0,disableClickOverlayClose:u=!1,disableEscapeClose:C=!1,disableRestoreFocusAfterClose:b=!1,disableScrollBackground:f=!1,disableTrapFocus:v=!1,middlewareOptions:F,middlewares:A,onClose:k,open:O=!1,preventCloseOnClickElements:
|
|
1
|
+
import{j as e}from"../../_virtual/jsx-runtime.js";import{forwardRef as s}from"react";import{useClassName as o}from"../../lib/hooks/useClassName/useClassName.js";import{useTrapFocus as i}from"../../lib/hooks/useTrapFocus/useTrapFocus.js";import{usePopoverInteractions as r}from"./hooks/usePopoverInteractions.js";import{usePopoverLifecycle as l}from"./hooks/usePopoverLifecycle.js";import{usePopoverPositioning as a}from"./hooks/usePopoverPositioning.js";import{PopoverStandAlone as t}from"./popoverStandAlone.js";const n=s(({additionalClasses:s,anchorElement:n,animationExitDuration:p=200,disableAnimations:c=!1,disableAutoFocusFirstDescendant:d=!1,disableAutoFocusFirstDescendantAfterClose:m=!0,disableClickOverlayClose:u=!1,disableEscapeClose:C=!1,disableRestoreFocusAfterClose:b=!1,disableScrollBackground:f=!1,disableTrapFocus:v=!1,middlewareOptions:F,middlewares:A,onClose:k,open:O=!1,popoverContainerRef:j,preventCloseOnClickElements:E=[],preventScrollOnCloseFocus:h=!1,strategy:R="absolute",...g},y)=>{const w=c||!!n,S=o({additionalClassNames:s,component:"POPOVER"}),{handleInnerRef:D,isClosing:P,isVisible:x,popoverRef:V}=l({animationExitDuration:p,disableAnimations:w,disableAutoFocusFirstDescendant:d,disableAutoFocusFirstDescendantAfterClose:m,disableRestoreFocusAfterClose:b,disableScrollBackground:f,open:O,popoverContainerRef:j,preventScrollOnCloseFocus:h});return i({ref:V,trapFocus:!v&&x}),r({disableClickOverlayClose:u,disableEscapeClose:C,isVisible:x,onClose:k,popoverRef:V,preventCloseOnClickElements:E}),a({anchorElement:n,arrowStyles:g.arrowStyles,isVisible:x,middlewareOptions:F,middlewares:A,placement:g.placement,ref:V,strategy:R}),/* @__PURE__ */e.jsx(t,{ref:y,...g,anchorElement:!!n,cssClasses:S,disableAnimations:w,isClosing:P,isVisible:x,middlewareOptions:F,popoverContainerRef:D,strategy:R})});export{n as Popover};
|
|
@@ -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};
|