@epam/statgpt-ui-components 0.2.0-rc.13 → 0.2.0-rc.15

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.
@@ -9,6 +9,7 @@ interface Props {
9
9
  calendarResolution?: CalendarResolution;
10
10
  id?: string;
11
11
  icon?: ReactNode;
12
+ isEndDate?: boolean;
12
13
  }
13
14
  export declare const Calendar: FC<Props>;
14
15
  export {};
package/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),m=require("react"),h=require("classnames"),L=require("@tabler/icons-react"),A=require("react-flatpickr"),C=require("@epam/statgpt-shared-toolkit"),f=require("@floating-ui/react"),O=()=>n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"loader"})}),I=({title:e,btnClassNames:r,iconWidth:c,iconHeight:t,onClick:o})=>n.jsx("button",{type:"button","aria-label":"button",className:r,title:e,onClick:o,children:n.jsx(L.IconX,{height:t||20,width:c||20})});var v=(e=>(e.ERROR="error",e.SUCCESS="success",e.IN_PROGRESS="in_progress",e))(v||{});const B=({alertDetails:e,successIcon:r,errorIcon:c,onClose:t,closeButtonTitle:o})=>{const s=()=>(e==null?void 0:e.type)===v.IN_PROGRESS?"alert-in-progress":(e==null?void 0:e.type)===v.SUCCESS?"alert-success":"alert-error";return m.useEffect(()=>{(e==null?void 0:e.type)!==v.IN_PROGRESS&&setTimeout(()=>{t==null||t()},5e3)},[e==null?void 0:e.type,t]),n.jsx("div",{className:h("alert alert-shadow fixed bottom-3 right-3 z-10",s()),children:n.jsxs("div",{className:"alert-content flex items-start",children:[n.jsx("div",{className:"alert-icon",children:(e==null?void 0:e.type)===v.IN_PROGRESS?n.jsx(O,{}):(e==null?void 0:e.type)===v.SUCCESS?r:c}),n.jsxs("div",{className:"flex flex-col gap-2 max-w-[300px]",children:[n.jsx("h3",{className:"truncate",children:e==null?void 0:e.title}),(e==null?void 0:e.text)&&n.jsx("div",{className:"alert-text truncate",title:e==null?void 0:e.text,children:e==null?void 0:e.text})]}),n.jsx(I,{title:o,onClick:t})]})})},W=({buttonClassName:e,isLoading:r=!1,title:c,disabled:t,iconAfter:o,iconBefore:s,onClick:l,isSmallButton:a})=>{const u=h(a?"font-semibold":"",o?"mr-2":"",s?"ml-2":"");return n.jsxs("button",{type:"button",className:h("base-button",e,a?"small-button":""),disabled:t||r,"aria-label":"button",onClick:i=>l==null?void 0:l(i),title:c,children:[s,r&&n.jsx(O,{}),c?a?n.jsx("h4",{className:u,children:c}):n.jsx("h3",{className:u,children:c}):null,o]})},U=({label:e,onChange:r,value:c,options:t,calendarResolution:o=C.CalendarResolution.DAY,id:s,icon:l})=>{var y;const a=m.useRef(null);m.useEffect(()=>{var w;const b=a==null?void 0:a.current;b&&((w=b.querySelector("input"))==null||w.setAttribute("aria-label",e))},[e]);const u={...t,disableMobile:!0,defaultDate:o===C.CalendarResolution.MONTH?new Date(c.getFullYear(),c.getMonth()):c},i=(b,w,N)=>{const p=`calendar__${o===C.CalendarResolution.MONTH?"month":"day"}`;N.calendarContainer&&N.calendarContainer.classList.add(p)},j=(b,w,N)=>{if(o===C.CalendarResolution.MONTH&&b.length>0){const p=t.minDate,d=t.maxDate,x=b[0].getFullYear(),S=N.calendarContainer,F="flatpickr-disabled",T=S.querySelectorAll(".flatpickr-monthSelect-month"),q=S.querySelectorAll(".flatpickr-next-month")[0],G=S.querySelectorAll(".flatpickr-prev-month")[0];x===d.getFullYear()&&q.classList.add(F),x===p.getFullYear()&&G.classList.add(F),(x===p.getFullYear()||x===d.getFullYear())&&T.forEach(_=>{_.classList.remove(F);const E=new Date(_.getAttribute("aria-label")),H=E.getFullYear()===p.getFullYear()&&E.getMonth()===p.getMonth(),$=E.getFullYear()===d.getFullYear()&&E.getMonth()===d.getMonth();H||$||(E<p||E>d)&&_.classList.add(F)})}setTimeout(()=>{var x;const p=N.calendarContainer,d=(x=N._input)==null?void 0:x.getBoundingClientRect();p&&(p.style.left=`${d.left}px`,p.style.top=`${d.top-p.offsetHeight-8}px`,p.style.width=`${d.width}px`)},0)};return n.jsxs("div",{className:"relative calendar",ref:a,children:[n.jsx("div",{className:"mb-1 calendar-title",children:e}),n.jsx("label",{htmlFor:s,className:"absolute cursor-pointer right-[11px] top-[29px]",children:l||n.jsx(L.IconCalendarEvent,{})}),n.jsx(A,{defaultValue:(y=o===C.CalendarResolution.MONTH?new Date(c.getFullYear(),c.getMonth()):c)==null?void 0:y.toDateString(),options:u,onChange:b=>{r(b[0])},onOpen:[j],onReady:[i],id:s})]})},z=({label:e,id:r,checked:c,checkboxIcon:t,onChange:o})=>{const s=m.useCallback(l=>{l.stopPropagation(),o==null||o(r,l.target.checked)},[o,r]);return n.jsxs("label",{className:"flex items-center cursor-pointer min-w-0 py-1",htmlFor:r,children:[n.jsx("span",{className:h("flex justify-center items-center w-4 h-4 mr-2 relative","checkbox-button"),children:c&&t}),e&&n.jsx("p",{className:h("text-neutrals-1000 flex-1 min-w-0 truncate pr-2","checkbox-button-text"),title:e,children:e}),n.jsx("input",{type:"checkbox",onChange:s,id:r,checked:c,className:"hidden"})]})},K=({title:e,icon:r,children:c,value:t})=>{const[o,s]=m.useState(!1);return n.jsxs("div",{className:`collapsible-block flex flex-col border-t-2 border-neutrals-600 ${o?"collapsible-block-open":""}`,children:[n.jsxs("div",{className:"collapsible-block-title flex cursor-pointer items-center py-4",onClick:()=>s(!o),children:[n.jsx("div",{className:`${o?"rotate-180":""} transition-transform`,children:r||n.jsx(L.IconChevronDown,{className:"w-5 h-5 mr-3"})}),n.jsxs("div",{className:"flex flex-1 items-center justify-between",children:[n.jsx("span",{children:e}),t&&n.jsx("p",{className:"body-1 text-neutrals-800",children:t})]})]}),o&&n.jsx("div",{className:"collapsible-block-content pb-4",children:c})]})},Q=({text:e,highlightText:r})=>{const c=m.useMemo(()=>{var l;const t=[];if(!r)return[{id:0,text:e,highlight:!1}];const o=(r==null?void 0:r.toLowerCase())||"",s=((l=e==null?void 0:e.toLowerCase())==null?void 0:l.split(o))||"";for(let a=0,u=0;a<(s==null?void 0:s.length);a++){const i=s==null?void 0:s[a],j=i.length;i!==""&&t.push({id:t.length,highlight:!1,text:e==null?void 0:e.substring(u,u+j)}),u+=j,a!==(s==null?void 0:s.length)-1&&(t.push({id:t.length,highlight:!0,text:e==null?void 0:e.substring(u,u+r.length)}),u+=r.length)}return t},[r,e]);return n.jsx(n.Fragment,{children:c.map(t=>n.jsx("span",{className:h((t==null?void 0:t.highlight)&&"bg-highlight"),children:t==null?void 0:t.text},t==null?void 0:t.id))})},Z=({icon:e,onClick:r,buttonClassName:c,disabled:t,title:o,isBaseIconStyles:s=!0})=>n.jsx("button",{type:"button",className:h(s&&"base-icon-button",c),onClick:l=>r==null?void 0:r(l),disabled:t,title:o,"aria-label":"button",children:e}),P=({value:e,inputId:r,placeholder:c="",cssClass:t="",type:o="text",disabled:s,readonly:l,onChange:a,onKeyDown:u})=>{const i=h("truncate outline-none shadow-none body-1",t,l?"pointer-events-none":"");return n.jsx("input",{type:o,autoComplete:"off",id:r,placeholder:c,value:e||"",title:e?String(e):"",disabled:s,className:i,onKeyDown:u,onChange:j=>a==null?void 0:a(j.currentTarget.value)})},X=({iconBeforeInput:e,iconAfterInput:r,containerClasses:c,cssClass:t,...o})=>n.jsxs("div",{className:h("input w-full flex flex-row",c),children:[e,n.jsx(P,{cssClass:h("border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",t),...o}),r]}),J=({url:e,title:r,linkClassName:c="",iconBefore:t,iconAfter:o})=>{const s=h(o?"mr-2":"",t?"ml-2":"");return n.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:h("base-link",c),title:r,children:[t,n.jsx("span",{className:s,children:r}),o]})},V=({title:e,text:r,onClick:c})=>n.jsx("button",{type:"button",className:"tag flex items-center justify-center",onClick:()=>c==null?void 0:c(r||e),"aria-label":"button",children:n.jsx("h4",{children:e})}),D=({label:e,id:r,checked:c,radioIcon:t,description:o,onChange:s})=>{const l=m.useCallback(a=>{a.stopPropagation(),s==null||s(r,a.target.checked)},[s,r]);return n.jsxs("label",{className:"flex flex-col cursor-pointer min-w-0 py-[6px]",htmlFor:r,children:[n.jsxs("p",{className:"radio-label flex items-center min-w-0",children:[n.jsx("span",{className:h("flex justify-center items-center w-4 h-4 mr-2 relative","radio-button",c?"radio-button-active":""),children:c&&t}),e&&n.jsx("span",{className:"radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",title:e,children:e})]}),o&&n.jsx("span",{className:"radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",title:o,children:o}),n.jsx("input",{type:"radio",onChange:l,id:r,checked:c,className:"hidden"})]})};var R=(e=>(e.Closed="Closed",e.Opened="Opened",e))(R||{}),g=(e=>(e.LG="Large",e.SM="Small",e))(g||{});const M=({portalId:e,state:r=R.Opened,heading:c,size:t,onClose:o,children:s,overlayClassName:l,containerClassName:a,dividers:u=!0,closeButtonTitle:i})=>{const{refs:j,context:y}=f.useFloating({open:r!==R.Closed&&!!r,onOpenChange:o}),b=f.useRole(y,{role:"dialog"}),w=f.useDismiss(y,{outsidePress:!0}),{getFloatingProps:N}=f.useInteractions([b,w]),p=m.useCallback(d=>{d==null||d.preventDefault(),d==null||d.stopPropagation(),o()},[o]);return n.jsx(f.FloatingPortal,{id:e,children:r!==R.Closed&&n.jsx(f.FloatingOverlay,{className:h("z-modal flex items-center justify-center bg-blackout p-4",l),children:n.jsx(f.FloatingFocusManager,{context:y,children:n.jsxs("div",{className:h("relative max-h-full modal rounded bg-white flex flex-col shadow w-full",t===g.LG&&"max-w-[65%]",t===g.SM&&"max-w-[30%]",u&&"divide-neutrals-400 divide-y",a,"sm:w-full sm:max-w-full sm:px-4 sm:py-6"),ref:j.setFloating,...N({onClick(d){d.stopPropagation()}}),children:[n.jsxs("div",{className:"flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2",children:[c&&(typeof c=="string"?n.jsx("h2",{className:"flex-1 min-w-0 mr-3 modal-heading-title sm:h3",children:c}):c),n.jsx(I,{title:i,onClick:p,btnClassNames:"sm:h-[24px] sm:w-[24px] sm:top-4"})]}),s.map(d=>d)]})})})})},ee=e=>e.state===R.Closed?null:n.jsx(M,{...e}),ne=({triggerButton:e,options:r,content:c,selectedOption:t,disabled:o,containerClassName:s,openedClassName:l,onOptionSelect:a})=>{const[u,i]=m.useState(!1),{refs:j,floatingStyles:y,context:b}=f.useFloating({open:u,onOpenChange:o?void 0:i,placement:"bottom-end",middleware:[f.offset(8),f.flip(),f.shift()],whileElementsMounted:f.autoUpdate}),w=f.useClick(b),N=f.useDismiss(b,{outsidePress:!0}),{getReferenceProps:p,getFloatingProps:d}=f.useInteractions([w,N]);return n.jsxs(n.Fragment,{children:[n.jsx("div",{ref:j.setReference,...p({onClick(x){x.stopPropagation()}}),className:h(s,u&&l),children:e}),u&&n.jsxs("div",{ref:j.setFloating,style:y,className:"flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",...d(),children:[c&&c,r&&r.map(x=>n.jsx("div",{onClick:S=>{S.stopPropagation(),a==null||a(x.key),i(!1)},className:h("text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",t===x.key&&"bg-hues-100"),children:n.jsxs("div",{className:"p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",title:x.title,children:[x.icon?x.icon:null,n.jsx("p",{children:x==null?void 0:x.title})]})},x.key))]})]})},re=({limitMessages:e,query:r})=>n.jsxs("div",{className:"bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center",children:[n.jsx("div",{className:"flex gap-x-[4px]",children:n.jsx("div",{className:"flex flex-col",children:n.jsxs("div",{className:"flex gap-x-[4px]",children:[n.jsxs("span",{className:"text-primary h5",children:[e==null?void 0:e.excelFormatTitle," "]}),n.jsx("span",{className:"text-neutrals-800 body-3",children:e==null?void 0:e.excelFormatText})]})})}),n.jsx("a",{href:r,target:"_blank",children:n.jsxs("span",{className:"flex gap-x-[4px] body-3 cursor-pointer items-center",children:[e==null?void 0:e.dataExplorerIcon,e==null?void 0:e.dataExplorer]})})]}),k=1e3,te=({limitMessages:e,isDownload:r,showAdvancedViewButton:c,onAdvancedViewClick:t,query:o})=>{var s,l;return n.jsxs("div",{className:"bg-accent-300 px-2 py-1 flex justify-between flex-wrap items-center",children:[n.jsxs("div",{className:"flex gap-x-[4px]",children:[n.jsx("span",{children:e==null?void 0:e.warningIcon}),n.jsxs("div",{className:"flex flex-col",children:[n.jsxs("div",{className:"flex gap-x-[4px]",children:[n.jsxs("span",{className:"text-primary h5",children:[e==null?void 0:e.largeQuery,":"," "]}),n.jsx("span",{className:"text-neutrals-800 body-3",children:r?(s=e==null?void 0:e.downloadMessage)==null?void 0:s.call(e,k):(l=e==null?void 0:e.showingLimit)==null?void 0:l.call(e,k)})]}),r&&n.jsx("span",{className:"text-neutrals-800 body-3",children:e==null?void 0:e.fullLimitMessage})]})]}),c&&n.jsxs("span",{onClick:()=>t==null?void 0:t(),className:"flex gap-x-[4px] body-3 cursor-pointer items-center",children:[e==null?void 0:e.editIcon,e==null?void 0:e.refineInAdvancedView]}),r&&n.jsx("a",{href:o||"",target:"_blank",children:n.jsxs("span",{className:"flex gap-x-[4px] body-3 cursor-pointer items-center",children:[e==null?void 0:e.dataExplorerIcon,e==null?void 0:e.dataExplorer]})})]})},ce=24,oe=24;function se(e=719){const[r,c]=m.useState(()=>typeof window<"u"?window.innerWidth<e:!1);return m.useEffect(()=>{const t=window.matchMedia(`(max-width: ${e}px)`),o=s=>{c(s.matches)};return c(t.matches),t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[e]),r}function ae(e,r){const c=m.useRef(null);return m.useCallback((...o)=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{e(...o)},r)},[e,r])}var Y=(e=>(e.Enter="Enter",e))(Y||{});exports.Alert=B;exports.AlertType=v;exports.Button=W;exports.Calendar=U;exports.Checkbox=z;exports.CloseButton=I;exports.CollapsibleBlock=K;exports.DownloadFormatMessage=re;exports.Dropdown=ne;exports.HighlightText=Q;exports.IconButton=Z;exports.Input=P;exports.InputWithIcon=X;exports.KeyboardKey=Y;exports.Link=J;exports.Loader=O;exports.PopUpSize=g;exports.PopUpState=R;exports.Popup=ee;exports.Radio=D;exports.RequestLimitMessage=te;exports.SERIES_LIMIT=k;exports.TREE_NODE_ARROW_SIZE=ce;exports.TREE_NODE_PADDING=oe;exports.Tag=V;exports.useDebounce=ae;exports.useIsMobile=se;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("react"),p=require("classnames"),O=require("@tabler/icons-react"),W=require("react-flatpickr"),C=require("@epam/statgpt-shared-toolkit"),h=require("@floating-ui/react"),I=()=>n.jsx("div",{className:"flex items-center justify-center h-full",children:n.jsx("div",{className:"loader"})}),P=({title:e,btnClassNames:r,iconWidth:c,iconHeight:t,onClick:o})=>n.jsx("button",{type:"button","aria-label":"button",className:r,title:e,onClick:o,children:n.jsx(O.IconX,{height:t||20,width:c||20})});var E=(e=>(e.ERROR="error",e.SUCCESS="success",e.IN_PROGRESS="in_progress",e))(E||{});const B=({alertDetails:e,successIcon:r,errorIcon:c,onClose:t,closeButtonTitle:o})=>{const s=()=>(e==null?void 0:e.type)===E.IN_PROGRESS?"alert-in-progress":(e==null?void 0:e.type)===E.SUCCESS?"alert-success":"alert-error";return i.useEffect(()=>{(e==null?void 0:e.type)!==E.IN_PROGRESS&&setTimeout(()=>{t==null||t()},5e3)},[e==null?void 0:e.type,t]),n.jsx("div",{className:p("alert alert-shadow fixed bottom-3 right-3 z-10",s()),children:n.jsxs("div",{className:"alert-content flex items-start",children:[n.jsx("div",{className:"alert-icon",children:(e==null?void 0:e.type)===E.IN_PROGRESS?n.jsx(I,{}):(e==null?void 0:e.type)===E.SUCCESS?r:c}),n.jsxs("div",{className:"flex flex-col gap-2 max-w-[300px]",children:[n.jsx("h3",{className:"truncate",children:e==null?void 0:e.title}),(e==null?void 0:e.text)&&n.jsx("div",{className:"alert-text truncate",title:e==null?void 0:e.text,children:e==null?void 0:e.text})]}),n.jsx(P,{title:o,onClick:t})]})})},U=({buttonClassName:e,isLoading:r=!1,title:c,disabled:t,iconAfter:o,iconBefore:s,onClick:l,isSmallButton:d})=>{const u=p(d?"font-semibold":"",o?"mr-2":"",s?"ml-2":"");return n.jsxs("button",{type:"button",className:p("base-button",e,d?"small-button":""),disabled:t||r,"aria-label":"button",onClick:f=>l==null?void 0:l(f),title:c,children:[s,r&&n.jsx(I,{}),c?d?n.jsx("h4",{className:u,children:c}):n.jsx("h3",{className:u,children:c}):null,o]})},z=({label:e,onChange:r,value:c,options:t,calendarResolution:o=C.CalendarResolution.DAY,id:s,icon:l,isEndDate:d})=>{var v;const u=i.useRef(null);i.useEffect(()=>{var y;const b=u==null?void 0:u.current;b&&((y=b.querySelector("input"))==null||y.setAttribute("aria-label",e))},[e]);const f={...t,disableMobile:!0,defaultDate:o===C.CalendarResolution.MONTH?new Date(c.getFullYear(),c.getMonth()):c},m=(b,y,j)=>{const a=`calendar__${o===C.CalendarResolution.MONTH?"month":"day"}`;j.calendarContainer&&j.calendarContainer.classList.add(a)},w=(b,y,j)=>{if(o===C.CalendarResolution.MONTH&&b.length>0){const a=t.minDate,x=t.maxDate,N=b[0].getFullYear(),_=j.calendarContainer,g="flatpickr-disabled",q=_.querySelectorAll(".flatpickr-monthSelect-month"),$=_.querySelectorAll(".flatpickr-next-month")[0],G=_.querySelectorAll(".flatpickr-prev-month")[0];N===x.getFullYear()&&$.classList.add(g),N===a.getFullYear()&&G.classList.add(g),(N===a.getFullYear()||N===x.getFullYear())&&q.forEach(k=>{k.classList.remove(g);const R=new Date(k.getAttribute("aria-label")),H=R.getFullYear()===a.getFullYear()&&R.getMonth()===a.getMonth(),A=R.getFullYear()===x.getFullYear()&&R.getMonth()===x.getMonth();H||A||(R<a||R>x)&&k.classList.add(g)})}setTimeout(()=>{var N;const a=j.calendarContainer,x=(N=j._input)==null?void 0:N.getBoundingClientRect();a&&(a.style.top=`${x.top-a.offsetHeight-8}px`,a.style.width=`${a.style.width}px`,d?(a.style.right=`${window.innerWidth-x.right}px`,a.style.left="auto"):a.style.left=`${x.left}px`)},0)};return n.jsxs("div",{className:"relative calendar",ref:u,children:[n.jsx("div",{className:"mb-1 calendar-title",children:e}),n.jsx("label",{htmlFor:s,className:"absolute cursor-pointer right-[11px] top-[29px]",children:l||n.jsx(O.IconCalendarEvent,{})}),n.jsx(W,{defaultValue:(v=o===C.CalendarResolution.MONTH?new Date(c.getFullYear(),c.getMonth()):c)==null?void 0:v.toDateString(),options:f,onChange:b=>{r(b[0])},onOpen:[w],onReady:[m],id:s})]})},K=({label:e,id:r,checked:c,checkboxIcon:t,onChange:o})=>{const s=i.useCallback(l=>{l.stopPropagation(),o==null||o(r,l.target.checked)},[o,r]);return n.jsxs("label",{className:"flex items-center cursor-pointer min-w-0 py-1",htmlFor:r,children:[n.jsx("span",{className:p("flex justify-center items-center w-4 h-4 mr-2 relative","checkbox-button"),children:c&&t}),e&&n.jsx("p",{className:p("text-neutrals-1000 flex-1 min-w-0 truncate pr-2","checkbox-button-text"),title:e,children:e}),n.jsx("input",{type:"checkbox",onChange:s,id:r,checked:c,className:"hidden"})]})},Q=({title:e,icon:r,children:c,value:t})=>{const[o,s]=i.useState(!1);return n.jsxs("div",{className:`collapsible-block flex flex-col border-t-2 border-neutrals-600 ${o?"collapsible-block-open":""}`,children:[n.jsxs("div",{className:"collapsible-block-title flex cursor-pointer items-center py-4",onClick:()=>s(!o),children:[n.jsx("div",{className:`${o?"rotate-180":""} transition-transform`,children:r||n.jsx(O.IconChevronDown,{className:"w-5 h-5 mr-3"})}),n.jsxs("div",{className:"flex flex-1 items-center justify-between",children:[n.jsx("span",{children:e}),t&&n.jsx("p",{className:"body-1 text-neutrals-800",children:t})]})]}),o&&n.jsx("div",{className:"collapsible-block-content pb-4",children:c})]})},Z=({text:e,highlightText:r})=>{const c=i.useMemo(()=>{var l;const t=[];if(!r)return[{id:0,text:e,highlight:!1}];const o=(r==null?void 0:r.toLowerCase())||"",s=((l=e==null?void 0:e.toLowerCase())==null?void 0:l.split(o))||"";for(let d=0,u=0;d<(s==null?void 0:s.length);d++){const f=s==null?void 0:s[d],m=f.length;f!==""&&t.push({id:t.length,highlight:!1,text:e==null?void 0:e.substring(u,u+m)}),u+=m,d!==(s==null?void 0:s.length)-1&&(t.push({id:t.length,highlight:!0,text:e==null?void 0:e.substring(u,u+r.length)}),u+=r.length)}return t},[r,e]);return n.jsx(n.Fragment,{children:c.map(t=>n.jsx("span",{className:p((t==null?void 0:t.highlight)&&"bg-highlight"),children:t==null?void 0:t.text},t==null?void 0:t.id))})},X=({icon:e,onClick:r,buttonClassName:c,disabled:t,title:o,isBaseIconStyles:s=!0})=>n.jsx("button",{type:"button",className:p(s&&"base-icon-button",c),onClick:l=>r==null?void 0:r(l),disabled:t,title:o,"aria-label":"button",children:e}),Y=({value:e,inputId:r,placeholder:c="",cssClass:t="",type:o="text",disabled:s,readonly:l,onChange:d,onKeyDown:u})=>{const f=p("truncate outline-none shadow-none body-1",t,l?"pointer-events-none":"");return n.jsx("input",{type:o,autoComplete:"off",id:r,placeholder:c,value:e||"",title:e?String(e):"",disabled:s,className:f,onKeyDown:u,onChange:m=>d==null?void 0:d(m.currentTarget.value)})},J=({iconBeforeInput:e,iconAfterInput:r,containerClasses:c,cssClass:t,...o})=>n.jsxs("div",{className:p("input w-full flex flex-row",c),children:[e,n.jsx(Y,{cssClass:p("border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",t),...o}),r]}),V=({url:e,title:r,linkClassName:c="",iconBefore:t,iconAfter:o})=>{const s=p(o?"mr-2":"",t?"ml-2":"");return n.jsxs("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:p("base-link",c),title:r,children:[t,n.jsx("span",{className:s,children:r}),o]})},D=({title:e,text:r,onClick:c})=>n.jsx("button",{type:"button",className:"tag flex items-center justify-center",onClick:()=>c==null?void 0:c(r||e),"aria-label":"button",children:n.jsx("h4",{children:e})}),M=({label:e,id:r,checked:c,radioIcon:t,description:o,onChange:s})=>{const l=i.useCallback(d=>{d.stopPropagation(),s==null||s(r,d.target.checked)},[s,r]);return n.jsxs("label",{className:"flex flex-col cursor-pointer min-w-0 py-[6px]",htmlFor:r,children:[n.jsxs("p",{className:"radio-label flex items-center min-w-0",children:[n.jsx("span",{className:p("flex justify-center items-center w-4 h-4 mr-2 relative","radio-button",c?"radio-button-active":""),children:c&&t}),e&&n.jsx("span",{className:"radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",title:e,children:e})]}),o&&n.jsx("span",{className:"radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",title:o,children:o}),n.jsx("input",{type:"radio",onChange:l,id:r,checked:c,className:"hidden"})]})};var S=(e=>(e.Closed="Closed",e.Opened="Opened",e))(S||{}),F=(e=>(e.LG="Large",e.SM="Small",e))(F||{});const ee=({portalId:e,state:r=S.Opened,heading:c,size:t,onClose:o,children:s,overlayClassName:l,containerClassName:d,dividers:u=!0,closeButtonTitle:f})=>{const{refs:m,context:w}=h.useFloating({open:r!==S.Closed&&!!r,onOpenChange:o}),v=h.useRole(w,{role:"dialog"}),b=h.useDismiss(w,{outsidePress:!0}),{getFloatingProps:y}=h.useInteractions([v,b]),j=i.useCallback(a=>{a==null||a.preventDefault(),a==null||a.stopPropagation(),o()},[o]);return n.jsx(h.FloatingPortal,{id:e,children:r!==S.Closed&&n.jsx(h.FloatingOverlay,{className:p("z-modal flex items-center justify-center bg-blackout p-4",l),children:n.jsx(h.FloatingFocusManager,{context:w,children:n.jsxs("div",{className:p("relative max-h-full modal rounded bg-white flex flex-col shadow w-full",t===F.LG&&"max-w-[65%]",t===F.SM&&"max-w-[30%]",u&&"divide-neutrals-400 divide-y",d,"sm:w-full sm:max-w-full sm:px-4 sm:py-6"),ref:m.setFloating,...y({onClick(a){a.stopPropagation()}}),children:[n.jsxs("div",{className:"flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2",children:[c&&(typeof c=="string"?n.jsx("h2",{className:"flex-1 min-w-0 mr-3 modal-heading-title sm:h3",children:c}):c),n.jsx(P,{title:f,onClick:j,btnClassNames:"sm:h-[24px] sm:w-[24px] sm:top-4"})]}),s.map(a=>a)]})})})})},ne=e=>e.state===S.Closed?null:n.jsx(ee,{...e}),re=({triggerButton:e,options:r,content:c,selectedOption:t,disabled:o,containerClassName:s,openedClassName:l,onOptionSelect:d})=>{const[u,f]=i.useState(!1),{refs:m,floatingStyles:w,context:v}=h.useFloating({open:u,onOpenChange:o?void 0:f,placement:"bottom-end",middleware:[h.offset(8),h.flip(),h.shift()],whileElementsMounted:h.autoUpdate}),b=h.useClick(v),y=h.useDismiss(v,{outsidePress:!0}),{getReferenceProps:j,getFloatingProps:a}=h.useInteractions([b,y]);return n.jsxs(n.Fragment,{children:[n.jsx("div",{ref:m.setReference,...j({onClick(x){x.stopPropagation()}}),className:p(s,u&&l),children:e}),u&&n.jsxs("div",{ref:m.setFloating,style:w,className:"flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",...a(),children:[c&&c,r&&r.map(x=>n.jsx("div",{onClick:N=>{N.stopPropagation(),d==null||d(x.key),f(!1)},className:p("text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",t===x.key&&"bg-hues-100"),children:n.jsxs("div",{className:"p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",title:x.title,children:[x.icon?x.icon:null,n.jsx("p",{children:x==null?void 0:x.title})]})},x.key))]})]})},te=({limitMessages:e,query:r})=>n.jsxs("div",{className:"bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center",children:[n.jsx("div",{className:"flex gap-x-[4px]",children:n.jsx("div",{className:"flex flex-col",children:n.jsxs("div",{className:"flex gap-x-[4px]",children:[n.jsxs("span",{className:"text-primary h5",children:[e==null?void 0:e.excelFormatTitle," "]}),n.jsx("span",{className:"text-neutrals-800 body-3",children:e==null?void 0:e.excelFormatText})]})})}),n.jsx("a",{href:r,target:"_blank",children:n.jsxs("span",{className:"flex gap-x-[4px] body-3 cursor-pointer items-center",children:[e==null?void 0:e.dataExplorerIcon,e==null?void 0:e.dataExplorer]})})]}),L=1e3,ce=({limitMessages:e,isDownload:r,showAdvancedViewButton:c,onAdvancedViewClick:t,query:o})=>{var s,l;return n.jsxs("div",{className:"bg-accent-300 px-2 py-1 flex justify-between flex-wrap items-center",children:[n.jsxs("div",{className:"flex gap-x-[4px]",children:[n.jsx("span",{children:e==null?void 0:e.warningIcon}),n.jsxs("div",{className:"flex flex-col",children:[n.jsxs("div",{className:"flex gap-x-[4px]",children:[n.jsxs("span",{className:"text-primary h5",children:[e==null?void 0:e.largeQuery,":"," "]}),n.jsx("span",{className:"text-neutrals-800 body-3",children:r?(s=e==null?void 0:e.downloadMessage)==null?void 0:s.call(e,L):(l=e==null?void 0:e.showingLimit)==null?void 0:l.call(e,L)})]}),r&&n.jsx("span",{className:"text-neutrals-800 body-3",children:e==null?void 0:e.fullLimitMessage})]})]}),c&&n.jsxs("span",{onClick:()=>t==null?void 0:t(),className:"flex gap-x-[4px] body-3 cursor-pointer items-center",children:[e==null?void 0:e.editIcon,e==null?void 0:e.refineInAdvancedView]}),r&&n.jsx("a",{href:o||"",target:"_blank",children:n.jsxs("span",{className:"flex gap-x-[4px] body-3 cursor-pointer items-center",children:[e==null?void 0:e.dataExplorerIcon,e==null?void 0:e.dataExplorer]})})]})},oe=24,se=24;function ae(e=719){const[r,c]=i.useState(()=>typeof window<"u"?window.innerWidth<e:!1);return i.useEffect(()=>{const t=window.matchMedia(`(max-width: ${e}px)`),o=s=>{c(s.matches)};return c(t.matches),t.addEventListener("change",o),()=>t.removeEventListener("change",o)},[e]),r}function le(e,r){const c=i.useRef(null);return i.useCallback((...o)=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{e(...o)},r)},[e,r])}var T=(e=>(e.Enter="Enter",e))(T||{});exports.Alert=B;exports.AlertType=E;exports.Button=U;exports.Calendar=z;exports.Checkbox=K;exports.CloseButton=P;exports.CollapsibleBlock=Q;exports.DownloadFormatMessage=te;exports.Dropdown=re;exports.HighlightText=Z;exports.IconButton=X;exports.Input=Y;exports.InputWithIcon=J;exports.KeyboardKey=T;exports.Link=V;exports.Loader=I;exports.PopUpSize=F;exports.PopUpState=S;exports.Popup=ne;exports.Radio=M;exports.RequestLimitMessage=ce;exports.SERIES_LIMIT=L;exports.TREE_NODE_ARROW_SIZE=oe;exports.TREE_NODE_PADDING=se;exports.Tag=D;exports.useDebounce=le;exports.useIsMobile=ae;
package/index.mjs CHANGED
@@ -1,17 +1,17 @@
1
- import { jsx as t, jsxs as l, Fragment as Y } from "react/jsx-runtime";
2
- import { useEffect as O, useRef as j, useCallback as _, useState as k, useMemo as z } from "react";
3
- import m from "classnames";
4
- import { IconX as B, IconCalendarEvent as X, IconChevronDown as Z } from "@tabler/icons-react";
5
- import J from "react-flatpickr";
1
+ import { jsx as c, jsxs as d, Fragment as j } from "react/jsx-runtime";
2
+ import { useEffect as k, useRef as I, useCallback as _, useState as P, useMemo as B } from "react";
3
+ import f from "classnames";
4
+ import { IconX as X, IconCalendarEvent as Z, IconChevronDown as J } from "@tabler/icons-react";
5
+ import K from "react-flatpickr";
6
6
  import { CalendarResolution as R } from "@epam/statgpt-shared-toolkit";
7
- import { useFloating as I, useRole as K, useDismiss as G, useInteractions as H, FloatingPortal as V, FloatingOverlay as D, FloatingFocusManager as M, autoUpdate as nn, offset as en, flip as rn, shift as cn, useClick as tn } from "@floating-ui/react";
8
- const $ = () => /* @__PURE__ */ t("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ t("div", { className: "loader" }) }), T = ({
7
+ import { useFloating as $, useRole as V, useDismiss as G, useInteractions as H, FloatingPortal as D, FloatingOverlay as M, FloatingFocusManager as nn, autoUpdate as en, offset as rn, flip as tn, shift as cn, useClick as on } from "@floating-ui/react";
8
+ const T = () => /* @__PURE__ */ c("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ c("div", { className: "loader" }) }), q = ({
9
9
  title: n,
10
10
  btnClassNames: e,
11
- iconWidth: c,
11
+ iconWidth: t,
12
12
  iconHeight: r,
13
13
  onClick: o
14
- }) => /* @__PURE__ */ t(
14
+ }) => /* @__PURE__ */ c(
15
15
  "button",
16
16
  {
17
17
  type: "button",
@@ -19,139 +19,140 @@ const $ = () => /* @__PURE__ */ t("div", { className: "flex items-center justify
19
19
  className: e,
20
20
  title: n,
21
21
  onClick: o,
22
- children: /* @__PURE__ */ t(B, { height: r || 20, width: c || 20 })
22
+ children: /* @__PURE__ */ c(X, { height: r || 20, width: t || 20 })
23
23
  }
24
24
  );
25
- var E = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.SUCCESS = "success", n.IN_PROGRESS = "in_progress", n))(E || {});
26
- const bn = ({
25
+ var F = /* @__PURE__ */ ((n) => (n.ERROR = "error", n.SUCCESS = "success", n.IN_PROGRESS = "in_progress", n))(F || {});
26
+ const xn = ({
27
27
  alertDetails: n,
28
28
  successIcon: e,
29
- errorIcon: c,
29
+ errorIcon: t,
30
30
  onClose: r,
31
31
  closeButtonTitle: o
32
32
  }) => {
33
- const a = () => (n == null ? void 0 : n.type) === E.IN_PROGRESS ? "alert-in-progress" : (n == null ? void 0 : n.type) === E.SUCCESS ? "alert-success" : "alert-error";
34
- return O(() => {
35
- (n == null ? void 0 : n.type) !== E.IN_PROGRESS && setTimeout(() => {
33
+ const a = () => (n == null ? void 0 : n.type) === F.IN_PROGRESS ? "alert-in-progress" : (n == null ? void 0 : n.type) === F.SUCCESS ? "alert-success" : "alert-error";
34
+ return k(() => {
35
+ (n == null ? void 0 : n.type) !== F.IN_PROGRESS && setTimeout(() => {
36
36
  r == null || r();
37
37
  }, 5e3);
38
- }, [n == null ? void 0 : n.type, r]), /* @__PURE__ */ t(
38
+ }, [n == null ? void 0 : n.type, r]), /* @__PURE__ */ c(
39
39
  "div",
40
40
  {
41
- className: m(
41
+ className: f(
42
42
  "alert alert-shadow fixed bottom-3 right-3 z-10",
43
43
  a()
44
44
  ),
45
- children: /* @__PURE__ */ l("div", { className: "alert-content flex items-start", children: [
46
- /* @__PURE__ */ t("div", { className: "alert-icon", children: (n == null ? void 0 : n.type) === E.IN_PROGRESS ? /* @__PURE__ */ t($, {}) : (n == null ? void 0 : n.type) === E.SUCCESS ? e : c }),
47
- /* @__PURE__ */ l("div", { className: "flex flex-col gap-2 max-w-[300px]", children: [
48
- /* @__PURE__ */ t("h3", { className: "truncate", children: n == null ? void 0 : n.title }),
49
- (n == null ? void 0 : n.text) && /* @__PURE__ */ t("div", { className: "alert-text truncate", title: n == null ? void 0 : n.text, children: n == null ? void 0 : n.text })
45
+ children: /* @__PURE__ */ d("div", { className: "alert-content flex items-start", children: [
46
+ /* @__PURE__ */ c("div", { className: "alert-icon", children: (n == null ? void 0 : n.type) === F.IN_PROGRESS ? /* @__PURE__ */ c(T, {}) : (n == null ? void 0 : n.type) === F.SUCCESS ? e : t }),
47
+ /* @__PURE__ */ d("div", { className: "flex flex-col gap-2 max-w-[300px]", children: [
48
+ /* @__PURE__ */ c("h3", { className: "truncate", children: n == null ? void 0 : n.title }),
49
+ (n == null ? void 0 : n.text) && /* @__PURE__ */ c("div", { className: "alert-text truncate", title: n == null ? void 0 : n.text, children: n == null ? void 0 : n.text })
50
50
  ] }),
51
- /* @__PURE__ */ t(T, { title: o, onClick: r })
51
+ /* @__PURE__ */ c(q, { title: o, onClick: r })
52
52
  ] })
53
53
  }
54
54
  );
55
- }, xn = ({
55
+ }, Nn = ({
56
56
  buttonClassName: n,
57
57
  isLoading: e = !1,
58
- title: c,
58
+ title: t,
59
59
  disabled: r,
60
60
  iconAfter: o,
61
61
  iconBefore: a,
62
62
  onClick: u,
63
- isSmallButton: d
63
+ isSmallButton: s
64
64
  }) => {
65
- const p = m(
66
- d ? "font-semibold" : "",
65
+ const p = f(
66
+ s ? "font-semibold" : "",
67
67
  o ? "mr-2" : "",
68
68
  a ? "ml-2" : ""
69
69
  );
70
- return /* @__PURE__ */ l(
70
+ return /* @__PURE__ */ d(
71
71
  "button",
72
72
  {
73
73
  type: "button",
74
- className: m(
74
+ className: f(
75
75
  "base-button",
76
76
  n,
77
- d ? "small-button" : ""
77
+ s ? "small-button" : ""
78
78
  ),
79
79
  disabled: r || e,
80
80
  "aria-label": "button",
81
81
  onClick: (i) => u == null ? void 0 : u(i),
82
- title: c,
82
+ title: t,
83
83
  children: [
84
84
  a,
85
- e && /* @__PURE__ */ t($, {}),
86
- c ? d ? /* @__PURE__ */ t("h4", { className: p, children: c }) : /* @__PURE__ */ t("h3", { className: p, children: c }) : null,
85
+ e && /* @__PURE__ */ c(T, {}),
86
+ t ? s ? /* @__PURE__ */ c("h4", { className: p, children: t }) : /* @__PURE__ */ c("h3", { className: p, children: t }) : null,
87
87
  o
88
88
  ]
89
89
  }
90
90
  );
91
- }, Nn = ({
91
+ }, yn = ({
92
92
  label: n,
93
93
  onChange: e,
94
- value: c,
94
+ value: t,
95
95
  options: r,
96
96
  calendarResolution: o = R.DAY,
97
97
  id: a,
98
- icon: u
98
+ icon: u,
99
+ isEndDate: s
99
100
  }) => {
100
- var w;
101
- const d = j(null);
102
- O(() => {
101
+ var v;
102
+ const p = I(null);
103
+ k(() => {
103
104
  var y;
104
- const b = d == null ? void 0 : d.current;
105
- b && ((y = b.querySelector("input")) == null || y.setAttribute("aria-label", n));
105
+ const m = p == null ? void 0 : p.current;
106
+ m && ((y = m.querySelector("input")) == null || y.setAttribute("aria-label", n));
106
107
  }, [n]);
107
- const p = {
108
+ const i = {
108
109
  ...r,
109
110
  disableMobile: !0,
110
- defaultDate: o === R.MONTH ? new Date(c.getFullYear(), c.getMonth()) : c
111
- }, i = (b, y, N) => {
112
- const f = `calendar__${o === R.MONTH ? "month" : "day"}`;
113
- N.calendarContainer && N.calendarContainer.classList.add(f);
114
- }, x = (b, y, N) => {
115
- if (o === R.MONTH && b.length > 0) {
116
- const f = r.minDate, s = r.maxDate, h = b[0].getFullYear(), F = N.calendarContainer, C = "flatpickr-disabled", q = F.querySelectorAll(
111
+ defaultDate: o === R.MONTH ? new Date(t.getFullYear(), t.getMonth()) : t
112
+ }, b = (m, y, x) => {
113
+ const l = `calendar__${o === R.MONTH ? "month" : "day"}`;
114
+ x.calendarContainer && x.calendarContainer.classList.add(l);
115
+ }, w = (m, y, x) => {
116
+ if (o === R.MONTH && m.length > 0) {
117
+ const l = r.minDate, h = r.maxDate, N = m[0].getFullYear(), g = x.calendarContainer, C = "flatpickr-disabled", W = g.querySelectorAll(
117
118
  ".flatpickr-monthSelect-month"
118
- ), A = F.querySelectorAll(
119
+ ), A = g.querySelectorAll(
119
120
  ".flatpickr-next-month"
120
- )[0], W = F.querySelectorAll(
121
+ )[0], Q = g.querySelectorAll(
121
122
  ".flatpickr-prev-month"
122
123
  )[0];
123
- h === s.getFullYear() && A.classList.add(C), h === f.getFullYear() && W.classList.add(C), (h === f.getFullYear() || h === s.getFullYear()) && q.forEach((g) => {
124
- g.classList.remove(C);
125
- const v = new Date(g.getAttribute("aria-label")), Q = v.getFullYear() === f.getFullYear() && v.getMonth() === f.getMonth(), U = v.getFullYear() === s.getFullYear() && v.getMonth() === s.getMonth();
126
- Q || U || (v < f || v > s) && g.classList.add(C);
124
+ N === h.getFullYear() && A.classList.add(C), N === l.getFullYear() && Q.classList.add(C), (N === l.getFullYear() || N === h.getFullYear()) && W.forEach((L) => {
125
+ L.classList.remove(C);
126
+ const E = new Date(L.getAttribute("aria-label")), U = E.getFullYear() === l.getFullYear() && E.getMonth() === l.getMonth(), z = E.getFullYear() === h.getFullYear() && E.getMonth() === h.getMonth();
127
+ U || z || (E < l || E > h) && L.classList.add(C);
127
128
  });
128
129
  }
129
130
  setTimeout(() => {
130
- var h;
131
- const f = N.calendarContainer, s = (h = N._input) == null ? void 0 : h.getBoundingClientRect();
132
- f && (f.style.left = `${s.left}px`, f.style.top = `${s.top - f.offsetHeight - 8}px`, f.style.width = `${s.width}px`);
131
+ var N;
132
+ const l = x.calendarContainer, h = (N = x._input) == null ? void 0 : N.getBoundingClientRect();
133
+ l && (l.style.top = `${h.top - l.offsetHeight - 8}px`, l.style.width = `${l.style.width}px`, s ? (l.style.right = `${window.innerWidth - h.right}px`, l.style.left = "auto") : l.style.left = `${h.left}px`);
133
134
  }, 0);
134
135
  };
135
- return /* @__PURE__ */ l("div", { className: "relative calendar", ref: d, children: [
136
- /* @__PURE__ */ t("div", { className: "mb-1 calendar-title", children: n }),
137
- /* @__PURE__ */ t(
136
+ return /* @__PURE__ */ d("div", { className: "relative calendar", ref: p, children: [
137
+ /* @__PURE__ */ c("div", { className: "mb-1 calendar-title", children: n }),
138
+ /* @__PURE__ */ c(
138
139
  "label",
139
140
  {
140
141
  htmlFor: a,
141
142
  className: "absolute cursor-pointer right-[11px] top-[29px]",
142
- children: u || /* @__PURE__ */ t(X, {})
143
+ children: u || /* @__PURE__ */ c(Z, {})
143
144
  }
144
145
  ),
145
- /* @__PURE__ */ t(
146
- J,
146
+ /* @__PURE__ */ c(
147
+ K,
147
148
  {
148
- defaultValue: (w = o === R.MONTH ? new Date(c.getFullYear(), c.getMonth()) : c) == null ? void 0 : w.toDateString(),
149
- options: p,
150
- onChange: (b) => {
151
- e(b[0]);
149
+ defaultValue: (v = o === R.MONTH ? new Date(t.getFullYear(), t.getMonth()) : t) == null ? void 0 : v.toDateString(),
150
+ options: i,
151
+ onChange: (m) => {
152
+ e(m[0]);
152
153
  },
153
- onOpen: [x],
154
- onReady: [i],
154
+ onOpen: [w],
155
+ onReady: [b],
155
156
  id: a
156
157
  }
157
158
  )
@@ -159,7 +160,7 @@ const bn = ({
159
160
  }, wn = ({
160
161
  label: n,
161
162
  id: e,
162
- checked: c,
163
+ checked: t,
163
164
  checkboxIcon: r,
164
165
  onChange: o
165
166
  }) => {
@@ -169,26 +170,26 @@ const bn = ({
169
170
  },
170
171
  [o, e]
171
172
  );
172
- return /* @__PURE__ */ l(
173
+ return /* @__PURE__ */ d(
173
174
  "label",
174
175
  {
175
176
  className: "flex items-center cursor-pointer min-w-0 py-1",
176
177
  htmlFor: e,
177
178
  children: [
178
- /* @__PURE__ */ t(
179
+ /* @__PURE__ */ c(
179
180
  "span",
180
181
  {
181
- className: m(
182
+ className: f(
182
183
  "flex justify-center items-center w-4 h-4 mr-2 relative",
183
184
  "checkbox-button"
184
185
  ),
185
- children: c && r
186
+ children: t && r
186
187
  }
187
188
  ),
188
- n && /* @__PURE__ */ t(
189
+ n && /* @__PURE__ */ c(
189
190
  "p",
190
191
  {
191
- className: m(
192
+ className: f(
192
193
  "text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
193
194
  "checkbox-button-text"
194
195
  ),
@@ -196,66 +197,66 @@ const bn = ({
196
197
  children: n
197
198
  }
198
199
  ),
199
- /* @__PURE__ */ t(
200
+ /* @__PURE__ */ c(
200
201
  "input",
201
202
  {
202
203
  type: "checkbox",
203
204
  onChange: a,
204
205
  id: e,
205
- checked: c,
206
+ checked: t,
206
207
  className: "hidden"
207
208
  }
208
209
  )
209
210
  ]
210
211
  }
211
212
  );
212
- }, yn = ({
213
+ }, vn = ({
213
214
  title: n,
214
215
  icon: e,
215
- children: c,
216
+ children: t,
216
217
  value: r
217
218
  }) => {
218
- const [o, a] = k(!1);
219
- return /* @__PURE__ */ l(
219
+ const [o, a] = P(!1);
220
+ return /* @__PURE__ */ d(
220
221
  "div",
221
222
  {
222
223
  className: `collapsible-block flex flex-col border-t-2 border-neutrals-600 ${o ? "collapsible-block-open" : ""}`,
223
224
  children: [
224
- /* @__PURE__ */ l(
225
+ /* @__PURE__ */ d(
225
226
  "div",
226
227
  {
227
228
  className: "collapsible-block-title flex cursor-pointer items-center py-4",
228
229
  onClick: () => a(!o),
229
230
  children: [
230
- /* @__PURE__ */ t("div", { className: `${o ? "rotate-180" : ""} transition-transform`, children: e || /* @__PURE__ */ t(Z, { className: "w-5 h-5 mr-3" }) }),
231
- /* @__PURE__ */ l("div", { className: "flex flex-1 items-center justify-between", children: [
232
- /* @__PURE__ */ t("span", { children: n }),
233
- r && /* @__PURE__ */ t("p", { className: "body-1 text-neutrals-800", children: r })
231
+ /* @__PURE__ */ c("div", { className: `${o ? "rotate-180" : ""} transition-transform`, children: e || /* @__PURE__ */ c(J, { className: "w-5 h-5 mr-3" }) }),
232
+ /* @__PURE__ */ d("div", { className: "flex flex-1 items-center justify-between", children: [
233
+ /* @__PURE__ */ c("span", { children: n }),
234
+ r && /* @__PURE__ */ c("p", { className: "body-1 text-neutrals-800", children: r })
234
235
  ] })
235
236
  ]
236
237
  }
237
238
  ),
238
- o && /* @__PURE__ */ t("div", { className: "collapsible-block-content pb-4", children: c })
239
+ o && /* @__PURE__ */ c("div", { className: "collapsible-block-content pb-4", children: t })
239
240
  ]
240
241
  }
241
242
  );
242
- }, vn = ({ text: n, highlightText: e }) => {
243
- const c = z(() => {
243
+ }, En = ({ text: n, highlightText: e }) => {
244
+ const t = B(() => {
244
245
  var u;
245
246
  const r = [];
246
247
  if (!e)
247
248
  return [{ id: 0, text: n, highlight: !1 }];
248
249
  const o = (e == null ? void 0 : e.toLowerCase()) || "", a = ((u = n == null ? void 0 : n.toLowerCase()) == null ? void 0 : u.split(o)) || "";
249
- for (let d = 0, p = 0; d < (a == null ? void 0 : a.length); d++) {
250
- const i = a == null ? void 0 : a[d], x = i.length;
250
+ for (let s = 0, p = 0; s < (a == null ? void 0 : a.length); s++) {
251
+ const i = a == null ? void 0 : a[s], b = i.length;
251
252
  i !== "" && r.push({
252
253
  id: r.length,
253
254
  highlight: !1,
254
255
  text: n == null ? void 0 : n.substring(
255
256
  p,
256
- p + x
257
+ p + b
257
258
  )
258
- }), p += x, d !== (a == null ? void 0 : a.length) - 1 && (r.push({
259
+ }), p += b, s !== (a == null ? void 0 : a.length) - 1 && (r.push({
259
260
  id: r.length,
260
261
  highlight: !0,
261
262
  text: n == null ? void 0 : n.substring(
@@ -266,28 +267,28 @@ const bn = ({
266
267
  }
267
268
  return r;
268
269
  }, [e, n]);
269
- return /* @__PURE__ */ t(Y, { children: c.map((r) => /* @__PURE__ */ t(
270
+ return /* @__PURE__ */ c(j, { children: t.map((r) => /* @__PURE__ */ c(
270
271
  "span",
271
272
  {
272
- className: m((r == null ? void 0 : r.highlight) && "bg-highlight"),
273
+ className: f((r == null ? void 0 : r.highlight) && "bg-highlight"),
273
274
  children: r == null ? void 0 : r.text
274
275
  },
275
276
  r == null ? void 0 : r.id
276
277
  )) });
277
- }, En = ({
278
+ }, Fn = ({
278
279
  icon: n,
279
280
  onClick: e,
280
- buttonClassName: c,
281
+ buttonClassName: t,
281
282
  disabled: r,
282
283
  title: o,
283
284
  isBaseIconStyles: a = !0
284
- }) => /* @__PURE__ */ t(
285
+ }) => /* @__PURE__ */ c(
285
286
  "button",
286
287
  {
287
288
  type: "button",
288
- className: m(
289
+ className: f(
289
290
  a && "base-icon-button",
290
- c
291
+ t
291
292
  ),
292
293
  onClick: (u) => e == null ? void 0 : e(u),
293
294
  disabled: r,
@@ -295,49 +296,49 @@ const bn = ({
295
296
  "aria-label": "button",
296
297
  children: n
297
298
  }
298
- ), on = ({
299
+ ), an = ({
299
300
  value: n,
300
301
  inputId: e,
301
- placeholder: c = "",
302
+ placeholder: t = "",
302
303
  cssClass: r = "",
303
304
  type: o = "text",
304
305
  disabled: a,
305
306
  readonly: u,
306
- onChange: d,
307
+ onChange: s,
307
308
  onKeyDown: p
308
309
  }) => {
309
- const i = m(
310
+ const i = f(
310
311
  "truncate outline-none shadow-none body-1",
311
312
  r,
312
313
  u ? "pointer-events-none" : ""
313
314
  );
314
- return /* @__PURE__ */ t(
315
+ return /* @__PURE__ */ c(
315
316
  "input",
316
317
  {
317
318
  type: o,
318
319
  autoComplete: "off",
319
320
  id: e,
320
- placeholder: c,
321
+ placeholder: t,
321
322
  value: n || "",
322
323
  title: n ? String(n) : "",
323
324
  disabled: a,
324
325
  className: i,
325
326
  onKeyDown: p,
326
- onChange: (x) => d == null ? void 0 : d(x.currentTarget.value)
327
+ onChange: (b) => s == null ? void 0 : s(b.currentTarget.value)
327
328
  }
328
329
  );
329
- }, Fn = ({
330
+ }, Rn = ({
330
331
  iconBeforeInput: n,
331
332
  iconAfterInput: e,
332
- containerClasses: c,
333
+ containerClasses: t,
333
334
  cssClass: r,
334
335
  ...o
335
- }) => /* @__PURE__ */ l("div", { className: m("input w-full flex flex-row", c), children: [
336
+ }) => /* @__PURE__ */ d("div", { className: f("input w-full flex flex-row", t), children: [
336
337
  n,
337
- /* @__PURE__ */ t(
338
- on,
338
+ /* @__PURE__ */ c(
339
+ an,
339
340
  {
340
- cssClass: m(
341
+ cssClass: f(
341
342
  "border-0 bg-transparent p-0 h-full shadow-none flex-1 min-w-0 rounded-none",
342
343
  r
343
344
  ),
@@ -345,74 +346,74 @@ const bn = ({
345
346
  }
346
347
  ),
347
348
  e
348
- ] }), Rn = ({
349
+ ] }), Sn = ({
349
350
  url: n,
350
351
  title: e,
351
- linkClassName: c = "",
352
+ linkClassName: t = "",
352
353
  iconBefore: r,
353
354
  iconAfter: o
354
355
  }) => {
355
- const a = m(
356
+ const a = f(
356
357
  o ? "mr-2" : "",
357
358
  r ? "ml-2" : ""
358
359
  );
359
- return /* @__PURE__ */ l(
360
+ return /* @__PURE__ */ d(
360
361
  "a",
361
362
  {
362
363
  href: n,
363
364
  target: "_blank",
364
365
  rel: "noopener noreferrer",
365
- className: m("base-link", c),
366
+ className: f("base-link", t),
366
367
  title: e,
367
368
  children: [
368
369
  r,
369
- /* @__PURE__ */ t("span", { className: a, children: e }),
370
+ /* @__PURE__ */ c("span", { className: a, children: e }),
370
371
  o
371
372
  ]
372
373
  }
373
374
  );
374
- }, Sn = ({ title: n, text: e, onClick: c }) => /* @__PURE__ */ t(
375
+ }, Cn = ({ title: n, text: e, onClick: t }) => /* @__PURE__ */ c(
375
376
  "button",
376
377
  {
377
378
  type: "button",
378
379
  className: "tag flex items-center justify-center",
379
- onClick: () => c == null ? void 0 : c(e || n),
380
+ onClick: () => t == null ? void 0 : t(e || n),
380
381
  "aria-label": "button",
381
- children: /* @__PURE__ */ t("h4", { children: n })
382
+ children: /* @__PURE__ */ c("h4", { children: n })
382
383
  }
383
- ), Cn = ({
384
+ ), _n = ({
384
385
  label: n,
385
386
  id: e,
386
- checked: c,
387
+ checked: t,
387
388
  radioIcon: r,
388
389
  description: o,
389
390
  onChange: a
390
391
  }) => {
391
392
  const u = _(
392
- (d) => {
393
- d.stopPropagation(), a == null || a(e, d.target.checked);
393
+ (s) => {
394
+ s.stopPropagation(), a == null || a(e, s.target.checked);
394
395
  },
395
396
  [a, e]
396
397
  );
397
- return /* @__PURE__ */ l(
398
+ return /* @__PURE__ */ d(
398
399
  "label",
399
400
  {
400
401
  className: "flex flex-col cursor-pointer min-w-0 py-[6px]",
401
402
  htmlFor: e,
402
403
  children: [
403
- /* @__PURE__ */ l("p", { className: "radio-label flex items-center min-w-0", children: [
404
- /* @__PURE__ */ t(
404
+ /* @__PURE__ */ d("p", { className: "radio-label flex items-center min-w-0", children: [
405
+ /* @__PURE__ */ c(
405
406
  "span",
406
407
  {
407
- className: m(
408
+ className: f(
408
409
  "flex justify-center items-center w-4 h-4 mr-2 relative",
409
410
  "radio-button",
410
- c ? "radio-button-active" : ""
411
+ t ? "radio-button-active" : ""
411
412
  ),
412
- children: c && r
413
+ children: t && r
413
414
  }
414
415
  ),
415
- n && /* @__PURE__ */ t(
416
+ n && /* @__PURE__ */ c(
416
417
  "span",
417
418
  {
418
419
  className: "radio-title body-1 text-neutrals-1000 flex-1 min-w-0 truncate pr-2",
@@ -421,7 +422,7 @@ const bn = ({
421
422
  }
422
423
  )
423
424
  ] }),
424
- o && /* @__PURE__ */ t(
425
+ o && /* @__PURE__ */ c(
425
426
  "span",
426
427
  {
427
428
  className: "radio-description ml-6 text-neutrals-800 body-2 w-auto flex items-center",
@@ -429,13 +430,13 @@ const bn = ({
429
430
  children: o
430
431
  }
431
432
  ),
432
- /* @__PURE__ */ t(
433
+ /* @__PURE__ */ c(
433
434
  "input",
434
435
  {
435
436
  type: "radio",
436
437
  onChange: u,
437
438
  id: e,
438
- checked: c,
439
+ checked: t,
439
440
  className: "hidden"
440
441
  }
441
442
  )
@@ -443,131 +444,131 @@ const bn = ({
443
444
  }
444
445
  );
445
446
  };
446
- var S = /* @__PURE__ */ ((n) => (n.Closed = "Closed", n.Opened = "Opened", n))(S || {}), L = /* @__PURE__ */ ((n) => (n.LG = "Large", n.SM = "Small", n))(L || {});
447
- const an = ({
447
+ var S = /* @__PURE__ */ ((n) => (n.Closed = "Closed", n.Opened = "Opened", n))(S || {}), O = /* @__PURE__ */ ((n) => (n.LG = "Large", n.SM = "Small", n))(O || {});
448
+ const ln = ({
448
449
  portalId: n,
449
450
  state: e = S.Opened,
450
- heading: c,
451
+ heading: t,
451
452
  size: r,
452
453
  onClose: o,
453
454
  children: a,
454
455
  overlayClassName: u,
455
- containerClassName: d,
456
+ containerClassName: s,
456
457
  dividers: p = !0,
457
458
  closeButtonTitle: i
458
459
  }) => {
459
- const { refs: x, context: w } = I({
460
+ const { refs: b, context: w } = $({
460
461
  open: e !== S.Closed && !!e,
461
462
  onOpenChange: o
462
- }), b = K(w, { role: "dialog" }), y = G(w, { outsidePress: !0 }), { getFloatingProps: N } = H([b, y]), f = _(
463
- (s) => {
464
- s == null || s.preventDefault(), s == null || s.stopPropagation(), o();
463
+ }), v = V(w, { role: "dialog" }), m = G(w, { outsidePress: !0 }), { getFloatingProps: y } = H([v, m]), x = _(
464
+ (l) => {
465
+ l == null || l.preventDefault(), l == null || l.stopPropagation(), o();
465
466
  },
466
467
  [o]
467
468
  );
468
- return /* @__PURE__ */ t(V, { id: n, children: e !== S.Closed && /* @__PURE__ */ t(
469
- D,
469
+ return /* @__PURE__ */ c(D, { id: n, children: e !== S.Closed && /* @__PURE__ */ c(
470
+ M,
470
471
  {
471
- className: m(
472
+ className: f(
472
473
  "z-modal flex items-center justify-center bg-blackout p-4",
473
474
  u
474
475
  ),
475
- children: /* @__PURE__ */ t(M, { context: w, children: /* @__PURE__ */ l(
476
+ children: /* @__PURE__ */ c(nn, { context: w, children: /* @__PURE__ */ d(
476
477
  "div",
477
478
  {
478
- className: m(
479
+ className: f(
479
480
  "relative max-h-full modal rounded bg-white flex flex-col shadow w-full",
480
- r === L.LG && "max-w-[65%]",
481
- r === L.SM && "max-w-[30%]",
481
+ r === O.LG && "max-w-[65%]",
482
+ r === O.SM && "max-w-[30%]",
482
483
  p && "divide-neutrals-400 divide-y",
483
- d,
484
+ s,
484
485
  "sm:w-full sm:max-w-full sm:px-4 sm:py-6"
485
486
  ),
486
- ref: x.setFloating,
487
- ...N({
488
- onClick(s) {
489
- s.stopPropagation();
487
+ ref: b.setFloating,
488
+ ...y({
489
+ onClick(l) {
490
+ l.stopPropagation();
490
491
  }
491
492
  }),
492
493
  children: [
493
- /* @__PURE__ */ l("div", { className: "flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2", children: [
494
- c && (typeof c == "string" ? /* @__PURE__ */ t("h2", { className: "flex-1 min-w-0 mr-3 modal-heading-title sm:h3", children: c }) : c),
495
- /* @__PURE__ */ t(
496
- T,
494
+ /* @__PURE__ */ d("div", { className: "flex flex-row justify-between py-3 px-6 items-center mb-2 modal-heading sm:p-0 sm:pb-2", children: [
495
+ t && (typeof t == "string" ? /* @__PURE__ */ c("h2", { className: "flex-1 min-w-0 mr-3 modal-heading-title sm:h3", children: t }) : t),
496
+ /* @__PURE__ */ c(
497
+ q,
497
498
  {
498
499
  title: i,
499
- onClick: f,
500
+ onClick: x,
500
501
  btnClassNames: "sm:h-[24px] sm:w-[24px] sm:top-4"
501
502
  }
502
503
  )
503
504
  ] }),
504
- a.map((s) => s)
505
+ a.map((l) => l)
505
506
  ]
506
507
  }
507
508
  ) })
508
509
  }
509
510
  ) });
510
- }, _n = (n) => n.state === S.Closed ? null : /* @__PURE__ */ t(an, { ...n }), gn = ({
511
+ }, gn = (n) => n.state === S.Closed ? null : /* @__PURE__ */ c(ln, { ...n }), Ln = ({
511
512
  triggerButton: n,
512
513
  options: e,
513
- content: c,
514
+ content: t,
514
515
  selectedOption: r,
515
516
  disabled: o,
516
517
  containerClassName: a,
517
518
  openedClassName: u,
518
- onOptionSelect: d
519
+ onOptionSelect: s
519
520
  }) => {
520
- const [p, i] = k(!1), { refs: x, floatingStyles: w, context: b } = I({
521
+ const [p, i] = P(!1), { refs: b, floatingStyles: w, context: v } = $({
521
522
  open: p,
522
523
  onOpenChange: o ? void 0 : i,
523
524
  placement: "bottom-end",
524
- middleware: [en(8), rn(), cn()],
525
- whileElementsMounted: nn
526
- }), y = tn(b), N = G(b, { outsidePress: !0 }), { getReferenceProps: f, getFloatingProps: s } = H([
527
- y,
528
- N
525
+ middleware: [rn(8), tn(), cn()],
526
+ whileElementsMounted: en
527
+ }), m = on(v), y = G(v, { outsidePress: !0 }), { getReferenceProps: x, getFloatingProps: l } = H([
528
+ m,
529
+ y
529
530
  ]);
530
- return /* @__PURE__ */ l(Y, { children: [
531
- /* @__PURE__ */ t(
531
+ return /* @__PURE__ */ d(j, { children: [
532
+ /* @__PURE__ */ c(
532
533
  "div",
533
534
  {
534
- ref: x.setReference,
535
- ...f({
535
+ ref: b.setReference,
536
+ ...x({
536
537
  onClick(h) {
537
538
  h.stopPropagation();
538
539
  }
539
540
  }),
540
- className: m(a, p && u),
541
+ className: f(a, p && u),
541
542
  children: n
542
543
  }
543
544
  ),
544
- p && /* @__PURE__ */ l(
545
+ p && /* @__PURE__ */ d(
545
546
  "div",
546
547
  {
547
- ref: x.setFloating,
548
+ ref: b.setFloating,
548
549
  style: w,
549
550
  className: "flex flex-col z-10 dropdown-menu-shadow bg-white dropdown-container rounded",
550
- ...s(),
551
+ ...l(),
551
552
  children: [
552
- c && c,
553
- e && e.map((h) => /* @__PURE__ */ t(
553
+ t && t,
554
+ e && e.map((h) => /* @__PURE__ */ c(
554
555
  "div",
555
556
  {
556
- onClick: (F) => {
557
- F.stopPropagation(), d == null || d(h.key), i(!1);
557
+ onClick: (N) => {
558
+ N.stopPropagation(), s == null || s(h.key), i(!1);
558
559
  },
559
- className: m(
560
+ className: f(
560
561
  "text-neutrals-900 body-3 cursor-pointer dropdown-item min-w-[200px]",
561
562
  r === h.key && "bg-hues-100"
562
563
  ),
563
- children: /* @__PURE__ */ l(
564
+ children: /* @__PURE__ */ d(
564
565
  "div",
565
566
  {
566
567
  className: "p-2 hover:bg-hues-100 h-full dropdown-item-text flex items-center gap-x-2",
567
568
  title: h.title,
568
569
  children: [
569
570
  h.icon ? h.icon : null,
570
- /* @__PURE__ */ t("p", { children: h == null ? void 0 : h.title })
571
+ /* @__PURE__ */ c("p", { children: h == null ? void 0 : h.title })
571
572
  ]
572
573
  }
573
574
  )
@@ -578,42 +579,42 @@ const an = ({
578
579
  }
579
580
  )
580
581
  ] });
581
- }, Ln = ({ limitMessages: n, query: e }) => /* @__PURE__ */ l("div", { className: "bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center", children: [
582
- /* @__PURE__ */ t("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ t("div", { className: "flex flex-col", children: /* @__PURE__ */ l("div", { className: "flex gap-x-[4px]", children: [
583
- /* @__PURE__ */ l("span", { className: "text-primary h5", children: [
582
+ }, On = ({ limitMessages: n, query: e }) => /* @__PURE__ */ d("div", { className: "bg-hues-100 px-2 py-1 flex justify-between flex-wrap items-center", children: [
583
+ /* @__PURE__ */ c("div", { className: "flex gap-x-[4px]", children: /* @__PURE__ */ c("div", { className: "flex flex-col", children: /* @__PURE__ */ d("div", { className: "flex gap-x-[4px]", children: [
584
+ /* @__PURE__ */ d("span", { className: "text-primary h5", children: [
584
585
  n == null ? void 0 : n.excelFormatTitle,
585
586
  " "
586
587
  ] }),
587
- /* @__PURE__ */ t("span", { className: "text-neutrals-800 body-3", children: n == null ? void 0 : n.excelFormatText })
588
+ /* @__PURE__ */ c("span", { className: "text-neutrals-800 body-3", children: n == null ? void 0 : n.excelFormatText })
588
589
  ] }) }) }),
589
- /* @__PURE__ */ t("a", { href: e, target: "_blank", children: /* @__PURE__ */ l("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
590
+ /* @__PURE__ */ c("a", { href: e, target: "_blank", children: /* @__PURE__ */ d("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
590
591
  n == null ? void 0 : n.dataExplorerIcon,
591
592
  n == null ? void 0 : n.dataExplorer
592
593
  ] }) })
593
- ] }), P = 1e3, On = ({
594
+ ] }), Y = 1e3, kn = ({
594
595
  limitMessages: n,
595
596
  isDownload: e,
596
- showAdvancedViewButton: c,
597
+ showAdvancedViewButton: t,
597
598
  onAdvancedViewClick: r,
598
599
  query: o
599
600
  }) => {
600
601
  var a, u;
601
- return /* @__PURE__ */ l("div", { className: "bg-accent-300 px-2 py-1 flex justify-between flex-wrap items-center", children: [
602
- /* @__PURE__ */ l("div", { className: "flex gap-x-[4px]", children: [
603
- /* @__PURE__ */ t("span", { children: n == null ? void 0 : n.warningIcon }),
604
- /* @__PURE__ */ l("div", { className: "flex flex-col", children: [
605
- /* @__PURE__ */ l("div", { className: "flex gap-x-[4px]", children: [
606
- /* @__PURE__ */ l("span", { className: "text-primary h5", children: [
602
+ return /* @__PURE__ */ d("div", { className: "bg-accent-300 px-2 py-1 flex justify-between flex-wrap items-center", children: [
603
+ /* @__PURE__ */ d("div", { className: "flex gap-x-[4px]", children: [
604
+ /* @__PURE__ */ c("span", { children: n == null ? void 0 : n.warningIcon }),
605
+ /* @__PURE__ */ d("div", { className: "flex flex-col", children: [
606
+ /* @__PURE__ */ d("div", { className: "flex gap-x-[4px]", children: [
607
+ /* @__PURE__ */ d("span", { className: "text-primary h5", children: [
607
608
  n == null ? void 0 : n.largeQuery,
608
609
  ":",
609
610
  " "
610
611
  ] }),
611
- /* @__PURE__ */ t("span", { className: "text-neutrals-800 body-3", children: e ? (a = n == null ? void 0 : n.downloadMessage) == null ? void 0 : a.call(n, P) : (u = n == null ? void 0 : n.showingLimit) == null ? void 0 : u.call(n, P) })
612
+ /* @__PURE__ */ c("span", { className: "text-neutrals-800 body-3", children: e ? (a = n == null ? void 0 : n.downloadMessage) == null ? void 0 : a.call(n, Y) : (u = n == null ? void 0 : n.showingLimit) == null ? void 0 : u.call(n, Y) })
612
613
  ] }),
613
- e && /* @__PURE__ */ t("span", { className: "text-neutrals-800 body-3", children: n == null ? void 0 : n.fullLimitMessage })
614
+ e && /* @__PURE__ */ c("span", { className: "text-neutrals-800 body-3", children: n == null ? void 0 : n.fullLimitMessage })
614
615
  ] })
615
616
  ] }),
616
- c && /* @__PURE__ */ l(
617
+ t && /* @__PURE__ */ d(
617
618
  "span",
618
619
  {
619
620
  onClick: () => r == null ? void 0 : r(),
@@ -624,61 +625,61 @@ const an = ({
624
625
  ]
625
626
  }
626
627
  ),
627
- e && /* @__PURE__ */ t("a", { href: o || "", target: "_blank", children: /* @__PURE__ */ l("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
628
+ e && /* @__PURE__ */ c("a", { href: o || "", target: "_blank", children: /* @__PURE__ */ d("span", { className: "flex gap-x-[4px] body-3 cursor-pointer items-center", children: [
628
629
  n == null ? void 0 : n.dataExplorerIcon,
629
630
  n == null ? void 0 : n.dataExplorer
630
631
  ] }) })
631
632
  ] });
632
- }, kn = 24, Pn = 24;
633
- function Yn(n = 719) {
634
- const [e, c] = k(
633
+ }, Pn = 24, Yn = 24;
634
+ function jn(n = 719) {
635
+ const [e, t] = P(
635
636
  () => typeof window < "u" ? window.innerWidth < n : !1
636
637
  );
637
- return O(() => {
638
+ return k(() => {
638
639
  const r = window.matchMedia(`(max-width: ${n}px)`), o = (a) => {
639
- c(a.matches);
640
+ t(a.matches);
640
641
  };
641
- return c(r.matches), r.addEventListener("change", o), () => r.removeEventListener("change", o);
642
+ return t(r.matches), r.addEventListener("change", o), () => r.removeEventListener("change", o);
642
643
  }, [n]), e;
643
644
  }
644
- function jn(n, e) {
645
- const c = j(null);
645
+ function In(n, e) {
646
+ const t = I(null);
646
647
  return _(
647
648
  (...o) => {
648
- c.current && clearTimeout(c.current), c.current = setTimeout(() => {
649
+ t.current && clearTimeout(t.current), t.current = setTimeout(() => {
649
650
  n(...o);
650
651
  }, e);
651
652
  },
652
653
  [n, e]
653
654
  );
654
655
  }
655
- var ln = /* @__PURE__ */ ((n) => (n.Enter = "Enter", n))(ln || {});
656
+ var dn = /* @__PURE__ */ ((n) => (n.Enter = "Enter", n))(dn || {});
656
657
  export {
657
- bn as Alert,
658
- E as AlertType,
659
- xn as Button,
660
- Nn as Calendar,
658
+ xn as Alert,
659
+ F as AlertType,
660
+ Nn as Button,
661
+ yn as Calendar,
661
662
  wn as Checkbox,
662
- T as CloseButton,
663
- yn as CollapsibleBlock,
664
- Ln as DownloadFormatMessage,
665
- gn as Dropdown,
666
- vn as HighlightText,
667
- En as IconButton,
668
- on as Input,
669
- Fn as InputWithIcon,
670
- ln as KeyboardKey,
671
- Rn as Link,
672
- $ as Loader,
673
- L as PopUpSize,
663
+ q as CloseButton,
664
+ vn as CollapsibleBlock,
665
+ On as DownloadFormatMessage,
666
+ Ln as Dropdown,
667
+ En as HighlightText,
668
+ Fn as IconButton,
669
+ an as Input,
670
+ Rn as InputWithIcon,
671
+ dn as KeyboardKey,
672
+ Sn as Link,
673
+ T as Loader,
674
+ O as PopUpSize,
674
675
  S as PopUpState,
675
- _n as Popup,
676
- Cn as Radio,
677
- On as RequestLimitMessage,
678
- P as SERIES_LIMIT,
679
- kn as TREE_NODE_ARROW_SIZE,
680
- Pn as TREE_NODE_PADDING,
681
- Sn as Tag,
682
- jn as useDebounce,
683
- Yn as useIsMobile
676
+ gn as Popup,
677
+ _n as Radio,
678
+ kn as RequestLimitMessage,
679
+ Y as SERIES_LIMIT,
680
+ Pn as TREE_NODE_ARROW_SIZE,
681
+ Yn as TREE_NODE_PADDING,
682
+ Cn as Tag,
683
+ In as useDebounce,
684
+ jn as useIsMobile
684
685
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@epam/statgpt-ui-components",
3
- "version": "0.2.0-rc.13",
3
+ "version": "0.2.0-rc.15",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "react-flatpickr": "^4.0.11",
7
7
  "react": "^19.2.1",
8
8
  "classnames": "^2.5.1",
9
- "@epam/statgpt-shared-toolkit": "0.2.0-rc.13",
9
+ "@epam/statgpt-shared-toolkit": "0.2.0-rc.15",
10
10
  "@tabler/icons-react": "^3.34.1",
11
11
  "@floating-ui/react": "^0.27.14"
12
12
  },