@epam/statgpt-ui-components 0.2.0-rc.14 → 0.2.0-rc.16

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