hrm_ui_lib 2.0.0-alpha.31 → 2.0.0-alpha.32

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.
@@ -1,6 +1,5 @@
1
- import{jsx as e,jsxs as i}from"react/jsx-runtime";import{TYPE_MAPPING as s,ICONS_MAPPING as y}from"./consts.js";import h from"classnames";import{Text as a}from"../Text/Text.js";import{Button as n}from"../Button/Button.js";import u from"../SVGIcons/IconDismissFilled.js";import{IconDynamicComponent as f}from"../IconDynamicComponent/IconDynamicComponent.js";const C=t=>{const{buttonProps:l,type:o="information",position:r="inline",text:m,subtext:c,closeIcon:p,onClose:d,className:N=""}=t;/* @__PURE__ */
2
- return e("div",{className:h("alert",`alert--${o} alert--${r}`,N),children:/* @__PURE__ */i("div",{className:"alert__content",children:[
3
- /* @__PURE__ */e(f,{componentName:y[o],size:"small",type:s[o]}),
4
- /* @__PURE__ */i("div",{className:"alert__text pl-8",children:[
5
- /* @__PURE__ */i("div",{children:[
6
- /* @__PURE__ */e(a,{type:"primary",size:"standard",weight:"regular",lineHeight:"large",children:m}),c?/* @__PURE__ */e(a,{className:"mt-4",type:"secondary",size:"small",weight:"regular",lineHeight:"large",children:c}):null]}),l?/* @__PURE__ */i("div",{className:"alert__actions",children:[l.confirm&&/* @__PURE__ */e(n,{size:"medium",type:"secondary",...l.confirm}),l.cancel&&/* @__PURE__ */e(n,{size:"medium",type:"tertiary",className:"ml-12",...l.cancel})]}):null]}),p?/* @__PURE__ */e(u,{type:s[o],size:"xsmall",className:"ml-12 pointer",onClick:d}):null]})})};export{C as Alert};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{TYPE_MAPPING as h}from"./consts.js";import u from"classnames";import{Text as s}from"../Text/Text.js";import{Button as a}from"../Button/Button.js";import y from"../SVGIcons/IconDismissFilled.js";const z=l=>{const{buttonProps:r,type:i="information",position:n="inline",text:o,subtext:m,closeIcon:c,onClose:d,className:p=""}=l;/* @__PURE__ */
2
+ return e("div",{className:u("alert",`alert--${i} alert--${n}`,p),children:/* @__PURE__ */t("div",{className:"alert__content",children:[
3
+ /* @__PURE__ */t("div",{className:"alert__text pl-8",children:[
4
+ /* @__PURE__ */t("div",{children:[
5
+ /* @__PURE__ */e(s,{type:"primary",size:"standard",weight:"regular",lineHeight:"large",children:o}),m?/* @__PURE__ */e(s,{className:"mt-4",type:"secondary",size:"small",weight:"regular",lineHeight:"large",children:m}):null]}),r?/* @__PURE__ */t("div",{className:"alert__actions",children:[r.confirm&&/* @__PURE__ */e(a,{size:"medium",type:"secondary",...r.confirm}),r.cancel&&/* @__PURE__ */e(a,{size:"medium",type:"tertiary",className:"ml-12",...r.cancel})]}):null]}),c?/* @__PURE__ */e(y,{type:h[i],size:"xsmall",className:"ml-12 pointer",onClick:d}):null]})})};export{z as Alert};
@@ -1,6 +1,6 @@
1
- import{jsx as e,jsxs as o,Fragment as d}from"react/jsx-runtime";import{forwardRef as V,useRef as $,useMemo as F}from"react";import T from"classnames";import{Popover as q}from"../Popover/Popover.js";import{Link as w}from"../Link/Link.js";import{Text as m}from"../Text/Text.js";import A from"../SVGIcons/IconInfo.js";import{IconDynamicComponent as B}from"../IconDynamicComponent/IconDynamicComponent.js";const D=V((l,a)=>{const{label:r,disabled:n,required:s=!1,link:i,name:c,setFieldValue:t,selectedValue:p,value:h,className:b="",iconProps:k={name:"checkmark"},dataId:f="",onClick:u,beforeLink:x,afterLink:y,helperText:N="",popoverAddons:I,isInvalid:_,stopPropagation:v=!1}=l,g=$(null),j=a&&Object.keys(a).length?a:g,C=!!h||p,P=e=>{v&&e.stopPropagation(),c&&t&&t(c,!C,{shouldValidate:!C}),u&&u(!C)},D=I?/* @__PURE__ */e(q,{id:`${I.id}`,...I,children:/* @__PURE__ */e("div",{id:`${I.id}`,children:/* @__PURE__ */e(A,{dataId:`${f}-icon`,type:"information",size:"xsmall",className:"ml-4 pointer",onClick:P})})}):null,V=F(()=>r?"string"!=typeof r?r:/* @__PURE__ */e(m,i?{type:n?"disabled":"primary",className:"controller__label",children:/* @__PURE__ */o(d,{children:[x&&/* @__PURE__ */e("span",{className:"mr-4",children:x}),
2
- /* @__PURE__ */e(w,{dataId:f,url:i,target:"_blank",children:r}),y&&/* @__PURE__ */e("span",{className:"ml-4",children:y}),s&&/* @__PURE__ */e("sup",{children:"*"})]})}:{type:n?"disabled":"primary",className:"controller__label",children:/* @__PURE__ */o(d,{children:[r,s&&/* @__PURE__ */e("sup",{children:"*"})]})}):null,[r,i]);/* @__PURE__ */
3
- return e(d,{children:/* @__PURE__ */o("label",{className:T("controller",{"controller--checkbox":!0,"controller--disabled":n,"controller--error":_,[b]:!!b}),onClick:e=>v&&e.stopPropagation(),children:[
4
- /* @__PURE__ */e("input",{"data-id":f,type:"checkbox",ref:j,tabIndex:0,onChange:P,checked:!!C,disabled:n}),
5
- /* @__PURE__ */e("span",{className:"controller__icon",children:/* @__PURE__ */e(B,{componentName:k.name,size:"xxsmall",type:n?"disabled":"inverse",className:"controller__mark"})}),V?/* @__PURE__ */o("div",{className:"controller__right",children:[
6
- /* @__PURE__ */o("div",{className:"flexbox",children:[V,D]}),N?/* @__PURE__ */e(m,{size:"small",type:n?"disabled":"secondary",children:N}):null]}):null]})})});D.displayName="Checkbox";export{D as Checkbox};
1
+ import{jsx as e,jsxs as o,Fragment as d}from"react/jsx-runtime";import{forwardRef as V,useRef as $,useMemo as z}from"react";import F from"classnames";import{Popover as T}from"../Popover/Popover.js";import{Link as q}from"../Link/Link.js";import{Text as m}from"../Text/Text.js";import w from"../SVGIcons/IconInfo.js";const A=V((l,a)=>{const{label:r,disabled:s,required:n=!1,link:i,name:c,setFieldValue:t,selectedValue:p,value:h,className:b="",iconProps:k={name:"checkmark"},dataId:u="",onClick:f,beforeLink:x,afterLink:y,helperText:N="",popoverAddons:g,isInvalid:v,stopPropagation:_=!1}=l,j=$(null),I=a&&Object.keys(a).length?a:j,P=!!h||p,C=e=>{_&&e.stopPropagation(),c&&t&&t(c,!P,{shouldValidate:!P}),f&&f(!P)},V=g?/* @__PURE__ */e(T,{id:`${g.id}`,...g,children:/* @__PURE__ */e("div",{id:`${g.id}`,children:/* @__PURE__ */e(w,{dataId:`${u}-icon`,type:"information",size:"xsmall",className:"ml-4 pointer",onClick:C})})}):null,L=z(()=>r?"string"!=typeof r?r:/* @__PURE__ */e(m,i?{type:s?"disabled":"primary",className:"controller__label",children:/* @__PURE__ */o(d,{children:[x&&/* @__PURE__ */e("span",{className:"mr-4",children:x}),
2
+ /* @__PURE__ */e(q,{dataId:u,url:i,target:"_blank",children:r}),y&&/* @__PURE__ */e("span",{className:"ml-4",children:y}),n&&/* @__PURE__ */e("sup",{children:"*"})]})}:{type:s?"disabled":"primary",className:"controller__label",children:/* @__PURE__ */o(d,{children:[r,n&&/* @__PURE__ */e("sup",{children:"*"})]})}):null,[r,i]);/* @__PURE__ */
3
+ return e(d,{children:/* @__PURE__ */o("label",{className:F("controller",{"controller--checkbox":!0,"controller--disabled":s,"controller--error":v,[b]:!!b}),onClick:e=>_&&e.stopPropagation(),children:[
4
+ /* @__PURE__ */e("input",{"data-id":u,type:"checkbox",ref:I,tabIndex:0,onChange:C,checked:!!P,disabled:s}),
5
+ /* @__PURE__ */e("span",{className:"controller__icon"}),L?/* @__PURE__ */o("div",{className:"controller__right",children:[
6
+ /* @__PURE__ */o("div",{className:"flexbox",children:[L,V]}),N?/* @__PURE__ */e(m,{size:"small",type:s?"disabled":"secondary",children:N}):null]}):null]})})});A.displayName="Checkbox";export{A as Checkbox};
@@ -1,7 +1,7 @@
1
- import{jsxs as p,jsx as r}from"react/jsx-runtime";import"../../Select/Select/Select.js";import"../../Select/MultiSelect/MultiSelect.js";import"react";import"../../Input/Input.js";import"classnames";import{noop as d,getYearOptions as N}from"../../../utils/helpers.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"../../SVGIcons/icon-registry.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import{ButtonSelect as h}from"../../Select/ButtonSelect/ButtonSelect.js";import C from"../../SVGIcons/IconChevronLeft.js";import S from"../../SVGIcons/IconChevronRight.js";import{generateMonthOptions as Y}from"./helpers.js";const J=e=>{const{date:t,dataPrefix:o,changeYear:s,changeMonth:i,decreaseMonth:l,increaseMonth:a,startYear:n,endYear:c,prevMonthButtonDisabled:m,nextMonthButtonDisabled:u,locale:f,isMobile:j=!1}=e,I=Y(f),x=null==t?void 0:t.getMonth(),b=null==t?void 0:t.getFullYear();/* @__PURE__ */
1
+ import{jsxs as p,jsx as r}from"react/jsx-runtime";import"../../Select/Select/Select.js";import"../../Select/MultiSelect/MultiSelect.js";import"react";import"../../Input/Input.js";import"classnames";import{noop as d,getYearOptions as N}from"../../../utils/helpers.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import{ButtonSelect as h}from"../../Select/ButtonSelect/ButtonSelect.js";import C from"../../SVGIcons/IconChevronLeft.js";import S from"../../SVGIcons/IconChevronRight.js";import{generateMonthOptions as Y}from"./helpers.js";const G=e=>{const{date:t,dataPrefix:o,changeYear:s,changeMonth:l,decreaseMonth:a,increaseMonth:i,startYear:n,endYear:c,prevMonthButtonDisabled:m,nextMonthButtonDisabled:u,locale:f,isMobile:j=!1}=e,I=Y(f),x=null==t?void 0:t.getMonth(),b=null==t?void 0:t.getFullYear();/* @__PURE__ */
2
2
  return p("div",{className:"flexbox custom_header_container",children:[
3
- /* @__PURE__ */r(C,{size:"small",className:"cursor-pointer",dataId:o?`${o}-prev-month-button`:"",onClick:m?d:l,type:m?"disabled":"primary"}),
3
+ /* @__PURE__ */r(C,{size:"small",className:"cursor-pointer",dataId:o?`${o}-prev-month-button`:"",onClick:m?d:a,type:m?"disabled":"primary"}),
4
4
  /* @__PURE__ */p("div",{className:"selects_container",children:[
5
- /* @__PURE__ */r(h,{size:"small",type:"tertiary",className:"date_picker_select",offsets:j?{}:{top:42,left:48},placeHolder:(e=>{const t=I.find(t=>t.value===e);return null==t?void 0:t.label.toString()})(x),dataId:o?`${o}-month-select`:"",options:I,selectedItem:x,setSelectedItem:e=>i(e),dropdownWidth:150,isRequiredField:!0}),
5
+ /* @__PURE__ */r(h,{size:"small",type:"tertiary",className:"date_picker_select",offsets:j?{}:{top:42,left:48},placeHolder:(e=>{const t=I.find(t=>t.value===e);return null==t?void 0:t.label.toString()})(x),dataId:o?`${o}-month-select`:"",options:I,selectedItem:x,setSelectedItem:e=>l(e),dropdownWidth:150,isRequiredField:!0}),
6
6
  /* @__PURE__ */r(h,{type:"tertiary",className:"date_picker_select",offsets:j?{}:{top:42,left:138},placeHolder:b.toString(),dataId:o?`${o}-year-select`:"",size:"small",options:N(n,c),selectedItem:b,setSelectedItem:e=>s(e),dropdownWidth:100,isRequiredField:!0})]}),
7
- /* @__PURE__ */r(S,{size:"small",className:"cursor-pointer",dataId:o?`${o}-next-month-button`:"",onClick:u?d:a,type:u?"disabled":"primary"})]})};export{J as CustomHeader};
7
+ /* @__PURE__ */r(S,{size:"small",className:"cursor-pointer",dataId:o?`${o}-next-month-button`:"",onClick:u?d:i,type:u?"disabled":"primary"})]})};export{G as CustomHeader};
@@ -1,8 +1,8 @@
1
- import{jsxs as f,Fragment as q,jsx as a}from"react/jsx-runtime";import{forwardRef as z,useState as D,useEffect as B}from"react";import G from"react-datepicker";import{Input as y}from"../../Input/Input.js";import{DateFormat as J}from"../types.js";import{useImportFilesDynamically as K}from"../hooks.js";import{isSameDay as Q}from"../../../utils/helpers.js";import U from"../../SVGIcons/IconCalendarRight.js";import{Modal as W}from"../../Modal/Modal.js";import"classnames";import"motion/react";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import{CustomHeader as X}from"../CustomHeader/CustomHeader.js";import{formatDate as i}from"../../../helpers/format-date.js";import"react-toastify";import"../../SVGIcons/icon-registry.js";import"react-toastify/dist/ReactToastify.css";const Z=z((e,t)=>{const{value:r,currentDates:o=[],setFieldValue:s,name:n,changeHandler:l,dataId:m,format:c=J.LongDate,maxDate:d,minDate:p,locale:u="hy",disabled:x,placeholderText:j,dataIdPrefix:h,modalOptions:C,...b}=e;K(u);const g=p?p.getFullYear():1900,I=d?d.getFullYear():/* @__PURE__ */(new Date).getFullYear()+5,k=void 0!==r&&Array.isArray(r)?r:o,[v,F]=D(k),[A,M]=D(!1),[O,P]=D(!1),R=e=>{e&&Array.isArray(e)&&F(e)};if(B(()=>{F(k)},[k]),!Array.isArray(v))return null;const S=()=>{M(!0)},T=()=>{M(!1)},[H,Y]=v;/* @__PURE__ */
1
+ import{jsxs as f,Fragment as q,jsx as a}from"react/jsx-runtime";import{forwardRef as z,useState as D,useEffect as B}from"react";import G from"react-datepicker";import{Input as y}from"../../Input/Input.js";import{DateFormat as J}from"../types.js";import{useImportFilesDynamically as K}from"../hooks.js";import{isSameDay as Q}from"../../../utils/helpers.js";import U from"../../SVGIcons/IconCalendarRight.js";import{Modal as W}from"../../Modal/Modal.js";import"classnames";import"motion/react";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import{CustomHeader as X}from"../CustomHeader/CustomHeader.js";import{formatDate as i}from"../../../helpers/format-date.js";import"react-toastify";import"react-toastify/dist/ReactToastify.css";const Z=z((e,t)=>{const{value:r,currentDates:o=[],setFieldValue:s,name:n,changeHandler:l,dataId:m,format:c=J.LongDate,maxDate:d,minDate:p,locale:u="hy",disabled:x,placeholderText:h,dataIdPrefix:j,modalOptions:C,...b}=e;K(u);const g=p?p.getFullYear():1900,k=d?d.getFullYear():/* @__PURE__ */(new Date).getFullYear()+5,I=void 0!==r&&Array.isArray(r)?r:o,[v,F]=D(I),[A,M]=D(!1),[O,P]=D(!1),R=e=>{e&&Array.isArray(e)&&F(e)};if(B(()=>{F(I)},[I]),!Array.isArray(v))return null;const T=()=>{M(!0)},H=()=>{M(!1)},[S,Y]=v;/* @__PURE__ */
2
2
  return f(q,{children:[
3
- /* @__PURE__ */a(y,{readOnly:!0,onClick:S,dataId:m,disabled:x,placeholder:j,currentValue:(e=>{if(A&&!O)return;const[t,a]=e,r=i(t,c),o=i(a,c);return Q(t,a)||!a?r:`${r} - ${o}`})(v),rightIconProps:{Component:U,onClick:S}}),
4
- /* @__PURE__ */f(W,{isOpen:A,title:null==C?void 0:C.title,onClose:T,buttonProps:{confirm:{buttonText:null==C?void 0:C.btnConfirmText,onClick:()=>{l&&l(v),s&&n&&s(n,v),P(!0),T()}},cancel:{buttonText:null==C?void 0:C.btnCancelText,onClick:T}},closeIcon:!0,children:[
3
+ /* @__PURE__ */a(y,{readOnly:!0,onClick:T,dataId:m,disabled:x,placeholder:h,currentValue:(e=>{if(A&&!O)return;const[t,a]=e,r=i(t,c),o=i(a,c);return Q(t,a)||!a?r:`${r} - ${o}`})(v),rightIconProps:{Component:U,onClick:T}}),
4
+ /* @__PURE__ */f(W,{isOpen:A,title:null==C?void 0:C.title,onClose:H,buttonProps:{confirm:{buttonText:null==C?void 0:C.btnConfirmText,onClick:()=>{l&&l(v),s&&n&&s(n,v),P(!0),H()}},cancel:{buttonText:null==C?void 0:C.btnCancelText,onClick:H}},closeIcon:!0,children:[
5
5
  /* @__PURE__ */f("div",{className:"flexbox justify-content--between mb-16 gap-16",children:[
6
- /* @__PURE__ */a(y,{readOnly:!0,value:i(H,c)}),
6
+ /* @__PURE__ */a(y,{readOnly:!0,value:i(S,c)}),
7
7
  /* @__PURE__ */a(y,{readOnly:!0,value:i(Y,c)})]}),
8
- /* @__PURE__ */a(G,{...b,inline:!0,locale:u,minDate:p,maxDate:d,startDate:H,endDate:Y,selectsRange:!0,disabled:x,onChange:R,onClickOutside:()=>{const[e,t]=v;(!e||!t)&&R([null,null])},renderCustomHeader:e=>/* @__PURE__ */a(X,{...e,locale:u,startYear:g,endYear:I,dataPrefix:h,isMobile:!0})})]})]})});Z.displayName="RangeDatePickerMobile";export{Z as RangeDatePickerMobile};
8
+ /* @__PURE__ */a(G,{...b,inline:!0,locale:u,minDate:p,maxDate:d,startDate:S,endDate:Y,selectsRange:!0,disabled:x,onChange:R,onClickOutside:()=>{const[e,t]=v;(!e||!t)&&R([null,null])},renderCustomHeader:e=>/* @__PURE__ */a(X,{...e,locale:u,startYear:g,endYear:k,dataPrefix:j,isMobile:!0})})]})]})});Z.displayName="RangeDatePickerMobile";export{Z as RangeDatePickerMobile};
@@ -1,7 +1,7 @@
1
- import{jsxs as l,jsx as e}from"react/jsx-runtime";import{Text as n}from"../../Text/Text.js";import{Button as s}from"../../Button/Button.js";import f from"../../SVGIcons/IconDelete.js";import{useMemo as _}from"react";import{FileUploadMode as t}from"../types.js";import{FilePreview as w}from"./FilePreview.js";import{shortenFileName as v,formatFileSize as z}from"./helpers.js";import h from"../../SVGIcons/IconArrowDownloadFilled.js";import u from"classnames";import"../../../helpers/format-date.js";import{downloadFile as F}from"../../../helpers/download-file.js";import"react-toastify";import"../../SVGIcons/icon-registry.js";import"react-toastify/dist/ReactToastify.css";import"dayjs";import"../../../consts/index.js";const O=({file:i,onRemove:o,mode:r})=>{const a=i.type.split("/")[0],m=_(()=>URL.createObjectURL(i),[i.name]);/* @__PURE__ */
1
+ import{jsxs as l,jsx as e}from"react/jsx-runtime";import{Text as n}from"../../Text/Text.js";import{Button as s}from"../../Button/Button.js";import f from"../../SVGIcons/IconDelete.js";import{useMemo as _}from"react";import{FileUploadMode as t}from"../types.js";import{FilePreview as w}from"./FilePreview.js";import{shortenFileName as v,formatFileSize as z}from"./helpers.js";import h from"../../SVGIcons/IconArrowDownloadFilled.js";import u from"classnames";import"../../../helpers/format-date.js";import{downloadFile as F}from"../../../helpers/download-file.js";import"react-toastify";import"react-toastify/dist/ReactToastify.css";import"dayjs";import"../../../consts/index.js";const B=({file:i,onRemove:o,mode:r})=>{const a=i.type.split("/")[0],m=_(()=>URL.createObjectURL(i),[i.name]);/* @__PURE__ */
2
2
  return l("div",{className:u("dz-file-upload__files--item",{"dz-file-upload__files--item--view":r===t.view}),onClick:()=>{r===t.view&&window.open(m,"_blank")},children:[
3
3
  /* @__PURE__ */e("div",{className:"dz-file-upload__files--item__preview",children:/* @__PURE__ */e(w,{preview:m,type:a})}),
4
4
  /* @__PURE__ */l("div",{className:"dz-file-upload__files--item__info",children:[
5
5
  /* @__PURE__ */l("div",{className:"dz-file-upload__files--item__info-title",children:[
6
6
  /* @__PURE__ */e(n,{weight:"semibold",children:v(i.name,40)}),r===t.attach&&/* @__PURE__ */e(s,{size:"small",type:"tertiary",onClick:o,iconProps:{Component:f}}),r===t.view&&/* @__PURE__ */e(s,{size:"small",type:"tertiary",onClick:e=>{e.preventDefault(),e.stopPropagation(),F(m,i.name)},iconProps:{Component:h}})]}),
7
- /* @__PURE__ */e("div",{className:"dz-file-upload__files--item__info-size",children:/* @__PURE__ */e(n,{size:"small",children:z(i.size)})})]})]})};export{O as PreviewItem};
7
+ /* @__PURE__ */e("div",{className:"dz-file-upload__files--item__info-size",children:/* @__PURE__ */e(n,{size:"small",children:z(i.size)})})]})]})};export{B as PreviewItem};
@@ -1 +1 @@
1
- import{FILE_ACCEPT_TYPE as p}from"../../../consts/index.js";import"../../../helpers/format-date.js";import{getTranslationLocale as $}from"../../../helpers/locale.js";import"react/jsx-runtime";import"react-toastify";import"classnames";import"dayjs";import"react";import"../../SVGIcons/icon-registry.js";import"react-toastify/dist/ReactToastify.css";const C=(e,o)=>e.length>o?e.replace(/^(.{10}).*?(.{10}\.[^.]*)$/,"$1...$2"):e,s=(e,o=0)=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(o)} KB`:e<1073741824?`${(e/1048576).toFixed(o)} MB`:`${(e/1073741824).toFixed(o)} GB`,v=({allowedTypes:e,maxSize:o,locale:t})=>{const a=e.map(e=>p[e]).flat(),r=c(t),i=1===e.length?e[0]:e.reduce((e,o,t,a)=>t===a.length-1?`${e} ${r.or} ${o}`:e?`${e}, ${o}`:o,"");return{acceptTypes:a,maxSizeFormatted:s(o),acceptTypesMessage:i}},c=e=>{const o={en:{title:"Choose a file or drop it here",format:"format",formats:"formats",maxSize:"Maximum size up to $1.",fileInvalidType:"The file type should be $1",fileTooLarge:"The file is too large (Max $1)",tooManyFiles:"Too many files. Please select one file.",or:"or"},ru:{title:"Выберите файл или перетащите его сюда",format:"формат",formats:"форматы",maxSize:"Максимальный размер до $1",fileInvalidType:"Тип файла должен быть $1",fileTooLarge:"Файл слишком большой (Максимум $1)",tooManyFiles:"Слишком много файлов. Пожалуйста, выберите один файл.",or:"или"},hy:{title:"Ընտրեք ֆայլ կամ քաշեք այն այստեղ",format:"ֆորմատ",formats:"ֆորմատներ",maxSize:"Առավելագույն չափը՝ մինչև $1",fileInvalidType:"Ֆայլի տեսակը պետք է լինի $1",fileTooLarge:"Ֆայլը չափազանց մեծ է (Առավելագույնը $1)",tooManyFiles:"Չափազանց շատ ֆայլեր։ Խնդրում ենք ընտրել միայն մեկ ֆայլ։",or:"կամ"}};return o[e||$()]||o.en};export{s as formatFileSize,v as generateAreaContent,c as getDropzoneLocale,C as shortenFileName};
1
+ import{FILE_ACCEPT_TYPE as $}from"../../../consts/index.js";import"../../../helpers/format-date.js";import{getTranslationLocale as p}from"../../../helpers/locale.js";import"react/jsx-runtime";import"react-toastify";import"classnames";import"dayjs";import"react-toastify/dist/ReactToastify.css";const L=(e,o)=>e.length>o?e.replace(/^(.{10}).*?(.{10}\.[^.]*)$/,"$1...$2"):e,s=(e,o=0)=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(o)} KB`:e<1073741824?`${(e/1048576).toFixed(o)} MB`:`${(e/1073741824).toFixed(o)} GB`,S=({allowedTypes:e,maxSize:o,locale:t})=>{const a=e.map(e=>$[e]).flat(),r=c(t),i=1===e.length?e[0]:e.reduce((e,o,t,a)=>t===a.length-1?`${e} ${r.or} ${o}`:e?`${e}, ${o}`:o,"");return{acceptTypes:a,maxSizeFormatted:s(o),acceptTypesMessage:i}},c=e=>{const o={en:{title:"Choose a file or drop it here",format:"format",formats:"formats",maxSize:"Maximum size up to $1.",fileInvalidType:"The file type should be $1",fileTooLarge:"The file is too large (Max $1)",tooManyFiles:"Too many files. Please select one file.",or:"or"},ru:{title:"Выберите файл или перетащите его сюда",format:"формат",formats:"форматы",maxSize:"Максимальный размер до $1",fileInvalidType:"Тип файла должен быть $1",fileTooLarge:"Файл слишком большой (Максимум $1)",tooManyFiles:"Слишком много файлов. Пожалуйста, выберите один файл.",or:"или"},hy:{title:"Ընտրեք ֆայլ կամ քաշեք այն այստեղ",format:"ֆորմատ",formats:"ֆորմատներ",maxSize:"Առավելագույն չափը՝ մինչև $1",fileInvalidType:"Ֆայլի տեսակը պետք է լինի $1",fileTooLarge:"Ֆայլը չափազանց մեծ է (Առավելագույնը $1)",tooManyFiles:"Չափազանց շատ ֆայլեր։ Խնդրում ենք ընտրել միայն մեկ ֆայլ։",or:"կամ"}};return o[e||p()]||o.en};export{s as formatFileSize,S as generateAreaContent,c as getDropzoneLocale,L as shortenFileName};
@@ -1,4 +1,4 @@
1
- import{jsx as t,Fragment as y,jsxs as z}from"react/jsx-runtime";import{useState as c,useId as G,useCallback as h}from"react";import{createPortal as H}from"react-dom";import{useHideOnScroll as L}from"../../../hooks/useHideOnScroll.js";import"../../../context/types.js";import{useOnOutsideClick as A}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import{FilterDropdownContent as B}from"./FilterDropdown.js";import{FilterGroupDropdownContent as q}from"./FilterGroupDropdown.js";import{Footer as E}from"../SharedComponents/Footer.js";import"classnames";import"dayjs";import"../../../consts/index.js";import"../../SVGIcons/icon-registry.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as J}from"../SharedComponents/Loading.js";import{Input as K}from"../../Input/Input.js";import M from"../../SVGIcons/IconSearchFilled.js";import Q from"../../SVGIcons/IconDismissFilled.js";const Se=o=>{const{isLoading:e,isGrouped:s,options:r,isOpen:l,setFieldValue:n,name:i,footerButtonProps:a,selectedItems:p,setSelectedItems:m,closeHandler:d,parentRef:u,language:f="en",...j}=o,[C,S]=c(null),[I,F]=c(p),[g,k]=c("");A(C,d,l,G()),L(d);const v=h(o=>{F(e=>[...e,o])},[]),x=o=>{m&&m(o),i&&n&&n(i,o),d()},D=o=>void 0!==I.find(e=>e.value===o),_=h(()=>{x(I),d()},[I]),O=({value:o})=>{F(e=>e.filter(e=>e.value!==o))};return l?/* @__PURE__ */t(y,{children:H(
2
- /* @__PURE__ */t("div",{className:"select filter",children:/* @__PURE__ */z("div",{className:"select__options",ref:S,children:[
3
- /* @__PURE__ */t(K,{onChange:o=>{o.preventDefault(),o.stopPropagation(),k(o.target.value)},className:"filter__input",size:"small",currentValue:g,rightIconProps:{size:""===g?"small":"xsmall",Component:""===g?M:Q,onClick:()=>{k("")}}}),
4
- /* @__PURE__ */t("div",{className:"select__options__scroll scrollbar scrollbar--vertical ",children:e?/* @__PURE__ */t(J,{}):/* @__PURE__ */t(s?q:B,{checkIsSelected:D,onItemDeselect:O,filterValue:g,onItemSelect:v,options:r,...j})}),e?null:/* @__PURE__ */t(E,{buttonProps:a,onCancel:()=>{x(p),F(p),d()},onApply:_,language:f})]})}),u)}):null};export{Se as FilterSelect};
1
+ import{jsx as t,Fragment as y,jsxs as z}from"react/jsx-runtime";import{useState as c,useId as G,useCallback as h}from"react";import{createPortal as H}from"react-dom";import{useHideOnScroll as L}from"../../../hooks/useHideOnScroll.js";import"../../../context/types.js";import{useOnOutsideClick as A}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import{FilterDropdownContent as B}from"./FilterDropdown.js";import{FilterGroupDropdownContent as q}from"./FilterGroupDropdown.js";import{Footer as E}from"../SharedComponents/Footer.js";import"classnames";import"dayjs";import"../../../consts/index.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as J}from"../SharedComponents/Loading.js";import{Input as K}from"../../Input/Input.js";import M from"../../SVGIcons/IconSearchFilled.js";import Q from"../../SVGIcons/IconDismissFilled.js";const Fe=e=>{const{isLoading:o,isGrouped:s,options:r,isOpen:l,setFieldValue:n,name:a,footerButtonProps:i,selectedItems:p,setSelectedItems:m,closeHandler:d,parentRef:u,language:f="en",...j}=e,[C,F]=c(null),[S,I]=c(p),[g,k]=c("");A(C,d,l,G()),L(d);const v=h(e=>{I(o=>[...o,e])},[]),x=e=>{m&&m(e),a&&n&&n(a,e),d()},D=e=>void 0!==S.find(o=>o.value===e),_=h(()=>{x(S),d()},[S]),O=({value:e})=>{I(o=>o.filter(o=>o.value!==e))};return l?/* @__PURE__ */t(y,{children:H(
2
+ /* @__PURE__ */t("div",{className:"select filter",children:/* @__PURE__ */z("div",{className:"select__options",ref:F,children:[
3
+ /* @__PURE__ */t(K,{onChange:e=>{e.preventDefault(),e.stopPropagation(),k(e.target.value)},className:"filter__input",size:"small",currentValue:g,rightIconProps:{size:""===g?"small":"xsmall",Component:""===g?M:Q,onClick:()=>{k("")}}}),
4
+ /* @__PURE__ */t("div",{className:"select__options__scroll scrollbar scrollbar--vertical ",children:o?/* @__PURE__ */t(J,{}):/* @__PURE__ */t(s?q:B,{checkIsSelected:D,onItemDeselect:O,filterValue:g,onItemSelect:v,options:r,...j})}),o?null:/* @__PURE__ */t(E,{buttonProps:i,onCancel:()=>{x(p),I(p),d()},onApply:_,language:f})]})}),u)}):null};export{Fe as FilterSelect};
@@ -1,3 +1,3 @@
1
- import{jsx as f,jsxs as U,Fragment as V}from"react/jsx-runtime";import{forwardRef as X,useState as l,useMemo as Y,useEffect as C,useId as Z}from"react";import{OptionsWrapper as $}from"./OptionsWrapper.js";import{Footer as ee}from"../SharedComponents/Footer.js";import"classnames";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import{useOnOutsideClick as oe}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../../SVGIcons/icon-registry.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{InputSelectWrapper as te}from"../SharedComponents/InputSelectWrapper/InputSelectWrapper.js";import{ButtonSelectWrapper as re}from"../SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js";import{useIsMobile as ne}from"../../../hooks/useGetIsMobile.js";import{SELECT_TRANSLATIONS as se}from"../localization.js";const le=X((e,o)=>{const{isMobileFullScreen:s=!0,options:t,footerButtonProps:r,selectedItems:n,setSelectedItems:a,name:i,setFieldValue:p,value:d,label:c,placeHolder:m,isRequiredField:u,labelAddons:S,className:h="",disabled:j,dropdownWidth:I,align:b="left",size:x,isButtonSelect:O,checkboxInfo:g,translations:F,hasError:W,language:k="en",hideSelectedOptions:w=!1,...R}=e,[v,M]=l(null),y=d||n||[],[z,T]=l(!1),[A,B]=l(y),[E,N]=l(null),D=()=>T(!1),G=Y(()=>(null==A?void 0:A.length)!==(null==y?void 0:y.length)||-1!==(null==A?void 0:A.findIndex(e=>-1===(null==y?void 0:y.findIndex(o=>o.value===e.value)))),[A,y]);C(()=>{B(d||[])},[d]),C(()=>{n&&B(n||[])},[n]);const q=()=>{B(y),D()};oe(E,q,z,Z());const H=(e=!1)=>{((e,o)=>{a&&a(e,o),i&&p&&p(i,e),D()})(A,e)},L=O?re:te,P={...se[k],...F},X=ne();/* @__PURE__ */
2
- return f(L,{dropdownRef:v,isOpen:z,setIsOpen:T,containerRef:E,setContainerRef:N,dropdownWidth:I,setDropdownRef:M,size:x,label:c,align:b,disabled:j,className:h,labelAddons:S,placeHolder:m,selectedValues:A,isRequiredField:u,overflowText:P.overflowText,hasError:W,applySelectedItems:H,isMobile:X&&s,hideSelectedOptions:w,children:/* @__PURE__ */U(V,{children:[
3
- /* @__PURE__ */f($,{options:t,isOpen:z,translations:P,setIsOpen:T,dropdownRef:v,openDropdown:()=>T(!0),selectedValues:A,setSelectedValues:B,containerRef:E,dropdownWidth:I,isMobileFullScreen:s,...R}),!t.length||X&&s?null:/* @__PURE__ */f(ee,{checkboxInfo:g,hasChange:G,buttonProps:r,onCancel:q,onApply:H,language:k})]})})});le.displayName="MultiSelect";export{le as MultiSelect};
1
+ import{jsx as f,jsxs as U,Fragment as V}from"react/jsx-runtime";import{forwardRef as X,useState as l,useMemo as Y,useEffect as C,useId as Z}from"react";import{OptionsWrapper as $}from"./OptionsWrapper.js";import{Footer as ee}from"../SharedComponents/Footer.js";import"classnames";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import{useOnOutsideClick as oe}from"../../../hooks/useOnOutsideClick.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{InputSelectWrapper as te}from"../SharedComponents/InputSelectWrapper/InputSelectWrapper.js";import{ButtonSelectWrapper as re}from"../SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js";import{useIsMobile as ne}from"../../../hooks/useGetIsMobile.js";import{SELECT_TRANSLATIONS as se}from"../localization.js";const le=X((e,o)=>{const{isMobileFullScreen:t=!0,options:s,footerButtonProps:r,selectedItems:n,setSelectedItems:a,name:i,setFieldValue:p,value:d,label:c,placeHolder:m,isRequiredField:u,labelAddons:h,className:S="",disabled:j,dropdownWidth:b,align:I="left",size:x,isButtonSelect:O,checkboxInfo:g,translations:F,hasError:W,language:k="en",hideSelectedOptions:w=!1,...R}=e,[v,M]=l(null),z=d||n||[],[T,y]=l(!1),[A,B]=l(z),[E,N]=l(null),D=()=>y(!1),G=Y(()=>(null==A?void 0:A.length)!==(null==z?void 0:z.length)||-1!==(null==A?void 0:A.findIndex(e=>-1===(null==z?void 0:z.findIndex(o=>o.value===e.value)))),[A,z]);C(()=>{B(d||[])},[d]),C(()=>{n&&B(n||[])},[n]);const q=()=>{B(z),D()};oe(E,q,T,Z());const H=(e=!1)=>{((e,o)=>{a&&a(e,o),i&&p&&p(i,e),D()})(A,e)},L=O?re:te,P={...se[k],...F},X=ne();/* @__PURE__ */
2
+ return f(L,{dropdownRef:v,isOpen:T,setIsOpen:y,containerRef:E,setContainerRef:N,dropdownWidth:b,setDropdownRef:M,size:x,label:c,align:I,disabled:j,className:S,labelAddons:h,placeHolder:m,selectedValues:A,isRequiredField:u,overflowText:P.overflowText,hasError:W,applySelectedItems:H,isMobile:X&&t,hideSelectedOptions:w,children:/* @__PURE__ */U(V,{children:[
3
+ /* @__PURE__ */f($,{options:s,isOpen:T,translations:P,setIsOpen:y,dropdownRef:v,openDropdown:()=>y(!0),selectedValues:A,setSelectedValues:B,containerRef:E,dropdownWidth:b,isMobileFullScreen:t,...R}),!s.length||X&&t?null:/* @__PURE__ */f(ee,{checkboxInfo:g,hasChange:G,buttonProps:r,onCancel:q,onApply:H,language:k})]})})});le.displayName="MultiSelect";export{le as MultiSelect};
@@ -1 +1 @@
1
- import{jsx as u}from"react/jsx-runtime";import{useRef as v,useCallback as B,useMemo as L}from"react";import"classnames";import"../../Checkbox/Checkbox.js";import"react-dom";import{useGetElemSizes as R}from"../../../hooks/useGetElemSizes.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import{useGetHasBottomSpace as V,useGetHasTopSpace as x}from"../../../hooks/useGetHasBottomSpace.js";import"react-hook-form";import{getStringWidth as y}from"../../../utils/helpers.js";import"../../SVGIcons/icon-registry.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as D}from"../SharedComponents/Loading.js";import"../../Input/Input.js";import{useIsMobile as H}from"../../../hooks/useGetIsMobile.js";import{MultiSelectGrouped as k}from"./MultiSelectGrouped/MultiSelectGrouped.js";import{MultiBase as N}from"./MultiBase/MultiBase.js";import{MultiSelectWithTabs as j}from"./MultiSelectWithTabs/MultiSelectWithTabs.js";import{SELECTED_VISIBLE_MIN_COUNT as z}from"../constants.js";const ft=e=>{const{isLoading:t,withTabs:o,isGrouped:s,isOpen:r,containerRef:i,options:a,selectedValues:l,setSelectedValues:p,setIsOpen:m,dropdownRef:n,isMobileFullScreen:c,...S}=e,{width:d}=R(i),h=v(null),f=o?j:s?k:N,M=B(e=>y(e,14)>d-80,[d]),b=L(()=>s||o?a.reduce((e,t)=>{const{data:o}=t;return e+o.length},0):a.length,[a]),{hasBottomSpace:G,bottomSpace:C}=V({element:n,input:h.current}),I=x({element:n,input:h.current}),g=H()&&c;return t?/* @__PURE__ */u(D,{}):/* @__PURE__ */u(f,{options:a,isOpen:r,isMobile:g,hasBottomSpace:G,selectedValues:l,onItemSelect:e=>{p([...l,e])},onItemDeselect:e=>{p(l.filter(t=>t.value!==e.value))},setSelectedValues:p,closeDropdown:()=>m(!1),checkIsValueOverflowed:M,isSearchAvailable:b>z,scrollableContentStyle:{...G||I?{}:{maxHeight:C-65-56}},...S})};export{ft as OptionsWrapper};
1
+ import{jsx as u}from"react/jsx-runtime";import{useRef as v,useCallback as B,useMemo as L}from"react";import"classnames";import"../../Checkbox/Checkbox.js";import"react-dom";import{useGetElemSizes as R}from"../../../hooks/useGetElemSizes.js";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import{useGetHasBottomSpace as V,useGetHasTopSpace as x}from"../../../hooks/useGetHasBottomSpace.js";import"react-hook-form";import{getStringWidth as y}from"../../../utils/helpers.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"motion/react";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../SharedComponents/ContentTop.js";import{Loading as D}from"../SharedComponents/Loading.js";import"../../Input/Input.js";import{useIsMobile as H}from"../../../hooks/useGetIsMobile.js";import{MultiSelectGrouped as k}from"./MultiSelectGrouped/MultiSelectGrouped.js";import{MultiBase as N}from"./MultiBase/MultiBase.js";import{MultiSelectWithTabs as j}from"./MultiSelectWithTabs/MultiSelectWithTabs.js";import{SELECTED_VISIBLE_MIN_COUNT as z}from"../constants.js";const at=e=>{const{isLoading:t,withTabs:o,isGrouped:s,isOpen:r,containerRef:a,options:i,selectedValues:l,setSelectedValues:p,setIsOpen:m,dropdownRef:n,isMobileFullScreen:c,...S}=e,{width:d}=R(a),h=v(null),f=o?j:s?k:N,M=B(e=>y(e,14)>d-80,[d]),b=L(()=>s||o?i.reduce((e,t)=>{const{data:o}=t;return e+o.length},0):i.length,[i]),{hasBottomSpace:C,bottomSpace:G}=V({element:n,input:h.current}),I=x({element:n,input:h.current}),g=H()&&c;return t?/* @__PURE__ */u(D,{}):/* @__PURE__ */u(f,{options:i,isOpen:r,isMobile:g,hasBottomSpace:C,selectedValues:l,onItemSelect:e=>{p([...l,e])},onItemDeselect:e=>{p(l.filter(t=>t.value!==e.value))},setSelectedValues:p,closeDropdown:()=>m(!1),checkIsValueOverflowed:M,isSearchAvailable:b>z,scrollableContentStyle:{...C||I?{}:{maxHeight:G-65-56}},...S})};export{at as OptionsWrapper};
@@ -1,3 +1,3 @@
1
- import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{Button as u}from"../../Button/Button.js";import{Menu as f}from"../../Menu/Menu.js";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import{Text as b}from"../../Text/Text.js";import"dayjs";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../../SVGIcons/icon-registry.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import d from"../../SVGIcons/IconMore.js";const P=o=>{const{selectActions:e,innerLabel:r}=o,[n,a]=s(!1),[l,m]=s(null);return e.length?/* @__PURE__ */i("div",{className:"action-bar",children:[r?/* @__PURE__ */t(b,{size:"xsmall",type:"secondary",className:"action-bar__label",children:r}):null,
1
+ import{jsxs as i,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{Button as u}from"../../Button/Button.js";import{Menu as f}from"../../Menu/Menu.js";import"react-dom";import"../../../consts/index.js";import"../../../context/types.js";import"../../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import{Text as b}from"../../Text/Text.js";import"dayjs";import"../../Collapse/CollapseGroup/CollapseGroup.js";import"../../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../../Checkbox/Checkbox.js";import d from"../../SVGIcons/IconMore.js";const L=o=>{const{selectActions:e,innerLabel:r}=o,[n,a]=s(!1),[l,m]=s(null);return e.length?/* @__PURE__ */i("div",{className:"action-bar",children:[r?/* @__PURE__ */t(b,{size:"xsmall",type:"secondary",className:"action-bar__label",children:r}):null,
2
2
  /* @__PURE__ */i("div",{ref:m,className:"action-bar__right",children:[
3
- /* @__PURE__ */t(u,{type:"tertiary",onClick:()=>a(!0),iconProps:{Component:d},size:"small"}),l?/* @__PURE__ */t(f,{menuItems:e,parentRef:l,onClose:()=>a(!1),position:"bottom-left",isOpen:n}):null]})]}):null};export{P as Actions};
3
+ /* @__PURE__ */t(u,{type:"tertiary",onClick:()=>a(!0),iconProps:{Component:d},size:"small"}),l?/* @__PURE__ */t(f,{menuItems:e,parentRef:l,onClose:()=>a(!1),position:"bottom-left",isOpen:n}):null]})]}):null};export{L as Actions};
@@ -1,5 +1,3 @@
1
- import{jsx as a,jsxs as o}from"react/jsx-runtime";import{toast as m,ToastContainer as l,Slide as c}from"react-toastify";import{Text as d}from"../Text/Text.js";import{Button as u}from"../Button/Button.js";import{DEFAULT_DURATION as f,TYPE_MAPPING as N,ICONS_MAPPING as h}from"./consts.js";import{IconDynamicComponent as C}from"../IconDynamicComponent/IconDynamicComponent.js";import"react-toastify/dist/ReactToastify.css";const g=({actionProps:t,toastId:s,type:n="information",text:e})=>/* @__PURE__ */o("div",{"data-id":`${n}-toast-message`,className:"snackbar",children:[
2
- /* @__PURE__ */o("div",{className:"snackbar__content",children:[
3
- /* @__PURE__ */a(C,{componentName:h[n],type:N[n],size:"medium"}),
4
- /* @__PURE__ */a(d,{className:"snackbar__text pl-16 pr-8",type:"primary",size:"standard",weight:"regular",lineHeight:"large",children:e})]}),t?/* @__PURE__ */a(u,{size:"small",type:"tertiary",...t,onClick:a=>{var o;m.dismiss(s),null==(o=null==t?void 0:t.onClick)||o.call(t,a)}}):null]},s),y=t=>{const{toastId:a,closeSnackbar:o,actionProps:s,duration:n=f}=t;m(g(t),{className:"_container",toastId:a,autoClose:!s&&n}),m.onChange(t=>{"removed"===t.status&&(null==o||o(t.id))})},A=t=>{const{duration:o=1e3,position:s="bottom-center"}=t;/* @__PURE__ */
5
- return a(l,{className:"snackbar-wrapper",theme:"light",hideProgressBar:!0,transition:c,position:s,autoClose:o,closeButton:()=>null})};export{A as Snackbar,y as notify};
1
+ import{jsx as a,jsxs as o}from"react/jsx-runtime";import{toast as m,ToastContainer as l,Slide as d}from"react-toastify";import{Text as u}from"../Text/Text.js";import{Button as c}from"../Button/Button.js";import{DEFAULT_DURATION as f}from"./consts.js";import"react-toastify/dist/ReactToastify.css";const h=({actionProps:t,toastId:s,type:e="information",text:r})=>/* @__PURE__ */o("div",{"data-id":`${e}-toast-message`,className:"snackbar",children:[
2
+ /* @__PURE__ */a("div",{className:"snackbar__content",children:/* @__PURE__ */a(u,{className:"snackbar__text pl-16 pr-8",type:"primary",size:"standard",weight:"regular",lineHeight:"large",children:r})}),t?/* @__PURE__ */a(c,{size:"small",type:"tertiary",...t,onClick:a=>{var o;m.dismiss(s),null==(o=null==t?void 0:t.onClick)||o.call(t,a)}}):null]},s),x=t=>{const{toastId:a,closeSnackbar:s,actionProps:o,duration:e=f}=t;m(h(t),{className:"_container",toastId:a,autoClose:!o&&e}),m.onChange(t=>{"removed"===t.status&&(null==s||s(t.id))})},T=t=>{const{duration:s=1e3,position:o="bottom-center"}=t;/* @__PURE__ */
3
+ return a(l,{className:"snackbar-wrapper",theme:"light",hideProgressBar:!0,transition:d,position:o,autoClose:s,closeButton:()=>null})};export{T as Snackbar,x as notify};
@@ -1,4 +1,4 @@
1
- import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as v,useEffect as C}from"react";import{Input as x}from"../Input/Input.js";import{Button as N}from"../Button/Button.js";import{Select as _}from"../Select/Select/Select.js";import"../Select/MultiSelect/MultiSelect.js";import I from"classnames";import{Text as z}from"../Text/Text.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../SVGIcons/icon-registry.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../Checkbox/Checkbox.js";import"react-dom";import"motion/react";import S from"../SVGIcons/IconChevronRight.js";import"../Collapse/CollapseGroup/CollapseGroup.js";import m from"../SVGIcons/IconMore.js";import"../Select/SharedComponents/ContentTop.js";import{OPTIONS as k}from"./constants/index.js";import $ from"../SVGIcons/IconChevronLeft.js";import y from"../SVGIcons/IconChevronDoubleLeft.js";import T from"../SVGIcons/IconChevronDoubleRight.js";function oe({table:e,totalCount:t,buttonText:o}){const[a,n]=v("1"),s=e.getState().pagination.pageIndex,l=e.getState().pagination.pageSize;return C(()=>{e.getPageCount()<Number(a)&&n("1")},[e.getPageCount(),e.getState().pagination]),/* @__PURE__ */r("div",{className:"advanced-table__pagination",children:[
1
+ import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as v,useEffect as C}from"react";import{Input as x}from"../Input/Input.js";import{Button as N}from"../Button/Button.js";import{Select as _}from"../Select/Select/Select.js";import"../Select/MultiSelect/MultiSelect.js";import I from"classnames";import{Text as z}from"../Text/Text.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"dayjs";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import"../Checkbox/Checkbox.js";import"react-dom";import"motion/react";import S from"../SVGIcons/IconChevronRight.js";import"../Collapse/CollapseGroup/CollapseGroup.js";import m from"../SVGIcons/IconMore.js";import"../Select/SharedComponents/ContentTop.js";import{OPTIONS as k}from"./constants/index.js";import $ from"../SVGIcons/IconChevronLeft.js";import y from"../SVGIcons/IconChevronDoubleLeft.js";import T from"../SVGIcons/IconChevronDoubleRight.js";function te({table:e,totalCount:t,buttonText:o}){const[a,n]=v("1"),s=e.getState().pagination.pageIndex,l=e.getState().pagination.pageSize;return C(()=>{e.getPageCount()<Number(a)&&n("1")},[e.getPageCount(),e.getState().pagination]),/* @__PURE__ */r("div",{className:"advanced-table__pagination",children:[
2
2
  /* @__PURE__ */i(_,{setSelectedItem:t=>(t=>{t&&e.setPagination({pageIndex:0,pageSize:Number(t)})})(t),selectedItem:`${l}`,className:"no-border",options:k}),
3
3
  /* @__PURE__ */r("div",{className:"advanced-table__pagination__right",children:[
4
4
  /* @__PURE__ */r(z,{type:"tertiary",children:[s*l+1," - ",(s+1)*l," / ",t]}),
@@ -9,4 +9,4 @@ import{jsxs as r,jsx as i}from"react/jsx-runtime";import{useState as v,useEffect
9
9
  /* @__PURE__ */i("li",{className:"previous "+(e.getCanPreviousPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"prev",role:"button",onClick:()=>e.firstPage(),children:/* @__PURE__ */i(y,{size:"small"})})}),
10
10
  /* @__PURE__ */i("li",{className:"previous "+(e.getCanPreviousPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"prev",role:"button",onClick:()=>e.previousPage(),children:/* @__PURE__ */i($,{size:"small"})})}),(()=>{const t=s,i=e.getPageCount(),o=[];return i<=7?Array.from({length:i},(e,t)=>t+1):(o.push(1),t<=3?o.push(2,3,4,5,"+++",i):t>i-5?o.push("---",i-4,i-3,i-2,i-1,i):o.push("---",t,t+1,t+2,"+++",i),o)})().map((t,o)=>"---"===t?/* @__PURE__ */i("li",{className:"pagination__more",children:/* @__PURE__ */i("a",{role:"button",onClick:()=>e.setPageIndex(+s-3),children:/* @__PURE__ */i(m,{size:"small"})})},`ellipsis-${o}`):"+++"===t?/* @__PURE__ */i("li",{className:"pagination__more",children:/* @__PURE__ */i("a",{role:"button",onClick:()=>e.setPageIndex(+s+3),children:/* @__PURE__ */i(m,{size:"small"})})},`ellipsis-${o}`):/* @__PURE__ */i("li",{className:I({active:t===s+1}),children:/* @__PURE__ */i("a",{role:"button",onClick:()=>e.setPageIndex(+t-1),children:t})},t)),
11
11
  /* @__PURE__ */i("li",{className:"next "+(e.getCanNextPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"next",role:"button",onClick:()=>e.nextPage(),children:/* @__PURE__ */i(S,{size:"small"})})}),
12
- /* @__PURE__ */i("li",{className:"next "+(e.getCanNextPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"next",role:"button",onClick:()=>e.lastPage(),children:/* @__PURE__ */i(T,{size:"small"})})})]})]})]})}export{oe as AdvancedPagination};
12
+ /* @__PURE__ */i("li",{className:"next "+(e.getCanNextPage()?"":"disabled"),children:/* @__PURE__ */i("a",{rel:"next",role:"button",onClick:()=>e.lastPage(),children:/* @__PURE__ */i(T,{size:"small"})})})]})]})]})}export{te as AdvancedPagination};
@@ -1,8 +1,8 @@
1
- import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as d}from"react";import{Button as h}from"../Button/Button.js";import _ from"../SVGIcons/IconSettings.js";import{Switcher as a}from"../Switcher/Switcher.js";import{Menu as b}from"../Menu/Menu.js";import"react-dom";import{Positions as v}from"../Tooltip/types.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import"dayjs";import"../Collapse/CollapseGroup/CollapseGroup.js";import"../SVGIcons/icon-registry.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{Tooltip as y}from"../Tooltip/Tooltip.js";import"../Checkbox/Checkbox.js";const N=["select","actions","expand"];function q({table:e,tooltipText:o,hiddenColumns:t=[],allToggleText:s="All"}){const[l,r]=d(null),[c,m]=d(!1),p=N.concat(t);/* @__PURE__ */
1
+ import{jsxs as n,jsx as i}from"react/jsx-runtime";import{useState as d}from"react";import{Button as h}from"../Button/Button.js";import _ from"../SVGIcons/IconSettings.js";import{Switcher as a}from"../Switcher/Switcher.js";import{Menu as b}from"../Menu/Menu.js";import"react-dom";import{Positions as v}from"../Tooltip/types.js";import"../../consts/index.js";import"../../context/types.js";import"../../hooks/useScreenSize.js";import"react-hook-form";import"classnames";import"motion/react";import"dayjs";import"../Collapse/CollapseGroup/CollapseGroup.js";import"../FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{Tooltip as y}from"../Tooltip/Tooltip.js";import"../Checkbox/Checkbox.js";const N=["select","actions","expand"];function U({table:e,tooltipText:o,hiddenColumns:t=[],allToggleText:s="All"}){const[l,r]=d(null),[c,m]=d(!1),p=N.concat(t);/* @__PURE__ */
2
2
  return n("div",{ref:r,children:[
3
3
  /* @__PURE__ */i(h,{type:"secondary",iconProps:{Component:_},onClick:()=>m(e=>!e)}),
4
4
  /* @__PURE__ */i(b,{className:"settings-menu",position:"top-left",onClose:()=>{m(!1)},isOpen:c,parentRef:l,children:/* @__PURE__ */n("div",{className:"settings-menu__dropdown",children:[
5
5
  /* @__PURE__ */i("div",{className:"relative",children:/* @__PURE__ */i("div",{className:"settings-menu__dropdown__option sticky",children:/* @__PURE__ */i(a,{label:s,selectedValue:e.getIsAllColumnsVisible(),onClick:()=>e.toggleAllColumnsVisible(),inlineType:!0,size:"small"})})}),
6
6
  /* @__PURE__ */i("div",{className:"scrollbar--content scrollbar scrollbar--vertical",children:e.getAllLeafColumns().map(e=>{if(null==p||!p.includes(e.id)){const t="string"==typeof e.columnDef.header?e.columnDef.header:e.columnDef.id;/* @__PURE__ */
7
7
  return n("div",{className:"settings-menu__dropdown__option",children:[o&&!e.getCanHide()&&/* @__PURE__ */i(y,{position:v.TOP_CENTER,text:o,id:e.columnDef.id}),
8
- /* @__PURE__ */i(a,{label:t,id:e.columnDef.id,selectedValue:e.getIsVisible(),onClick:()=>(e=>{const o=e.getToggleVisibilityHandler();o&&o({target:{checked:!e.getIsVisible()}})})(e),disabled:!e.getCanHide(),inlineType:!0,size:"small"})]},e.id)}})})]})})]})}export{q as ColumnSettings};
8
+ /* @__PURE__ */i(a,{label:t,id:e.columnDef.id,selectedValue:e.getIsVisible(),onClick:()=>(e=>{const o=e.getToggleVisibilityHandler();o&&o({target:{checked:!e.getIsVisible()}})})(e),disabled:!e.getCanHide(),inlineType:!0,size:"small"})]},e.id)}})})]})})]})}export{U as ColumnSettings};
@@ -1,2 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Text as n}from"../../components/Text/Text.js";import{IconDynamicComponent as p}from"../../components/IconDynamicComponent/IconDynamicComponent.js";import{generateDataTestId as i}from"../../utils/helpers.js";import l from"classnames";const N=({message:s,icon:a,dataId:m,className:r})=>/* @__PURE__ */e(n,{className:l("error-message",r),size:"small",type:"danger",dataId:i("error-message",m),children:/* @__PURE__ */o(t,{children:[a&&/* @__PURE__ */e(p,{componentName:a,className:"mr-4",size:"xsmall",type:"danger"}),
2
- /* @__PURE__ */e("span",{children:s})]})});export{N as ErrorMessage};
1
+ import{jsx as r,Fragment as m}from"react/jsx-runtime";import{Text as o}from"../../components/Text/Text.js";import{generateDataTestId as t}from"../../utils/helpers.js";import n from"classnames";const g=({message:e,icon:s,dataId:a,className:i})=>/* @__PURE__ */r(o,{className:n("error-message",i),size:"small",type:"danger",dataId:t("error-message",a),children:/* @__PURE__ */r(m,{children:/* @__PURE__ */r("span",{children:e})})});export{g as ErrorMessage};
package/index.d.ts CHANGED
@@ -21,7 +21,6 @@ export * from './components/FileUpload';
21
21
  export * from './components/FormContainer';
22
22
  export * from './components/FormField';
23
23
  export * from './components/Heading';
24
- export * from './components/IconDynamicComponent';
25
24
  export * from './components/Image';
26
25
  export * from './components/Input';
27
26
  export * from './components/Link';
package/index.js CHANGED
@@ -1 +1 @@
1
- import{Alert as x}from"./components/Alert/Alert.js";import{Avatar as a}from"./components/Avatar/Avatar.js";import{AvatarGroup as n}from"./components/Avatar/AvatarGroup.js";import{Badge as d}from"./components/Badge/Badge.js";import{BadgeV2 as s}from"./components/BadgeV2/BadgeV2.js";import{Breadcrumb as c}from"./components/Breadcrumb/Breadcrumb.js";import{Button as g}from"./components/Button/Button.js";import{ButtonGroup as F}from"./components/ButtonGroup/ButtonGroup.js";import{Checkbox as T}from"./components/Checkbox/Checkbox.js";import{Chips as b}from"./components/Chips/Chips.js";import{Card as B}from"./components/Card/Card.js";import{CardGroup as D}from"./components/CardGroup/CardGroup.js";import{CollapseItem as y}from"./components/Collapse/CollapseItem/CollapseItem.js";import{Collapse as h}from"./components/Collapse/Collapse/Collapse.js";import{CollapseGroup as U}from"./components/Collapse/CollapseGroup/CollapseGroup.js";import{Container as R}from"./components/Container/Container.js";import{Copy as E}from"./components/Copy/Copy.js";import{Counter as V}from"./components/Counter/Counter.js";import{TimePicker as H}from"./components/DatePicker/TimePicker/TimePicker.js";import{SimpleDatePicker as j}from"./components/DatePicker/SimpleDatePicker/SimpleDatePicker.js";import{RangeDatePicker as J}from"./components/DatePicker/RangeDatePicker/RangeDatePicker.js";import{Divider as Q}from"./components/Divider/Divider.js";import{Empty as X}from"./components/Empty/Empty.js";import{FileUpload as Z}from"./components/FileUpload/FileUpload.js";import{DropzoneFileUpload as oo}from"./components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{FileUploadMode as eo}from"./components/FileUpload/types.js";import{FormContainer as po}from"./components/FormContainer/FormContainer.js";import{FormField as xo}from"./components/FormField/FormField.js";import{Heading as ao}from"./components/Heading/Heading.js";import{IconDynamicComponent as no}from"./components/IconDynamicComponent/IconDynamicComponent.js";import{Image as uo}from"./components/Image/Image.js";import{Input as Co}from"./components/Input/Input.js";import{Link as So}from"./components/Link/Link.js";import{Menu as Po}from"./components/Menu/Menu.js";import{NestedMenu as Mo}from"./components/Menu/NestedMenu.js";import{MOBILE_ANIMATION as Io,Modal as bo}from"./components/Modal/Modal.js";import{ModalConfirmation as Bo}from"./components/Modal/ModalConfirmation.js";import{More as Do}from"./components/More/More.js";import{Pagination as yo}from"./components/Pagination/Pagination.js";import{Popover as ho}from"./components/Popover/Popover.js";import{Progress as Uo}from"./components/Progress/Progress.js";import{ProgressStep as Ro}from"./components/ProgressStep/ProgressStep.js";import{Radio as Eo}from"./components/Radio/Radio.js";import{RadioGroup as Vo}from"./components/Radio/RadioGroup.js";import{Select as Ho}from"./components/Select/Select/Select.js";import{MultiSelect as jo}from"./components/Select/MultiSelect/MultiSelect.js";import{NestedSelect as Jo}from"./components/Select/NestedSelect/NestedSelect.js";import{ButtonSelect as Qo}from"./components/Select/ButtonSelect/ButtonSelect.js";import{ProfileDropdown as Xo}from"./components/Select/ProfileDropdown/index.js";import{SideSheet as Zo}from"./components/SideSheet/SideSheet.js";import{Snackbar as or,notify as rr}from"./components/Snackbar/Snackbar.js";import{Status as tr}from"./components/Status/Status.js";import{Stepper as mr}from"./components/Stepper/Stepper.js";import{Switcher as fr}from"./components/Switcher/Switcher.js";import{Tab as ir}from"./components/Tab/Tab.js";import{Table as lr}from"./components/Table/Table.js";import{Table as ur}from"./components/TableV2/Table.js";import{ColumnSettings as Cr}from"./components/TableV2/ColumnSettings.js";import{AdvancedPagination as Sr}from"./components/TableV2/AdvancedPagination.js";import{Text as Pr}from"./components/Text/Text.js";import{Textarea as Mr}from"./components/Textarea/Textarea.js";import{Tooltip as Ir}from"./components/Tooltip/Tooltip.js";import{UnderConstruction as Ar}from"./components/UnderConstruction/UnderConstruction.js";import{OptionItem as kr}from"./helperComponents/OptionItem/OptionItem.js";import{FormContext as vr}from"./context/types.js";import"react";import"./consts/index.js";import{useFormProps as Gr}from"./hooks/useFormProps.js";import"./hooks/useScreenSize.js";import{useFieldArray as Nr}from"react-hook-form";export{Sr as AdvancedPagination,x as Alert,a as Avatar,n as AvatarGroup,d as Badge,s as BadgeV2,c as Breadcrumb,g as Button,F as ButtonGroup,Qo as ButtonSelect,B as Card,D as CardGroup,T as Checkbox,b as Chips,h as Collapse,U as CollapseGroup,y as CollapseItem,Cr as ColumnSettings,R as Container,E as Copy,V as Counter,Q as Divider,oo as DropzoneFileUpload,X as Empty,Z as FileUpload,eo as FileUploadMode,po as FormContainer,vr as FormContext,xo as FormField,ao as Heading,no as IconDynamicComponent,uo as Image,Co as Input,So as Link,Io as MOBILE_ANIMATION,Po as Menu,bo as Modal,Bo as ModalConfirmation,Do as More,jo as MultiSelect,Mo as NestedMenu,Jo as NestedSelect,kr as OptionItem,yo as Pagination,ho as Popover,Xo as ProfileDropdown,Uo as Progress,Ro as ProgressStep,Eo as Radio,Vo as RadioGroup,J as RangeDatePicker,Ho as Select,Zo as SideSheet,j as SimpleDatePicker,or as Snackbar,tr as Status,mr as Stepper,fr as Switcher,ir as Tab,lr as Table,ur as TableV2,Pr as Text,Mr as Textarea,H as TimePicker,Ir as Tooltip,Ar as UnderConstruction,rr as notify,Nr as useFieldArray,Gr as useFormProps};
1
+ import{Alert as x}from"./components/Alert/Alert.js";import{Avatar as a}from"./components/Avatar/Avatar.js";import{AvatarGroup as n}from"./components/Avatar/AvatarGroup.js";import{Badge as d}from"./components/Badge/Badge.js";import{BadgeV2 as s}from"./components/BadgeV2/BadgeV2.js";import{Breadcrumb as c}from"./components/Breadcrumb/Breadcrumb.js";import{Button as g}from"./components/Button/Button.js";import{ButtonGroup as F}from"./components/ButtonGroup/ButtonGroup.js";import{Checkbox as T}from"./components/Checkbox/Checkbox.js";import{Chips as A}from"./components/Chips/Chips.js";import{Card as I}from"./components/Card/Card.js";import{CardGroup as v}from"./components/CardGroup/CardGroup.js";import{CollapseItem as G}from"./components/Collapse/CollapseItem/CollapseItem.js";import{Collapse as y}from"./components/Collapse/Collapse/Collapse.js";import{CollapseGroup as U}from"./components/Collapse/CollapseGroup/CollapseGroup.js";import{Container as R}from"./components/Container/Container.js";import{Copy as E}from"./components/Copy/Copy.js";import{Counter as V}from"./components/Counter/Counter.js";import{TimePicker as H}from"./components/DatePicker/TimePicker/TimePicker.js";import{SimpleDatePicker as j}from"./components/DatePicker/SimpleDatePicker/SimpleDatePicker.js";import{RangeDatePicker as J}from"./components/DatePicker/RangeDatePicker/RangeDatePicker.js";import{Divider as Q}from"./components/Divider/Divider.js";import{Empty as X}from"./components/Empty/Empty.js";import{FileUpload as Z}from"./components/FileUpload/FileUpload.js";import{DropzoneFileUpload as oo}from"./components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js";import{FileUploadMode as eo}from"./components/FileUpload/types.js";import{FormContainer as po}from"./components/FormContainer/FormContainer.js";import{FormField as xo}from"./components/FormField/FormField.js";import{Heading as ao}from"./components/Heading/Heading.js";import{Image as no}from"./components/Image/Image.js";import{Input as uo}from"./components/Input/Input.js";import{Link as Co}from"./components/Link/Link.js";import{Menu as So}from"./components/Menu/Menu.js";import{NestedMenu as Po}from"./components/Menu/NestedMenu.js";import{MOBILE_ANIMATION as Mo,Modal as To}from"./components/Modal/Modal.js";import{ModalConfirmation as Ao}from"./components/Modal/ModalConfirmation.js";import{More as Io}from"./components/More/More.js";import{Pagination as vo}from"./components/Pagination/Pagination.js";import{Popover as Go}from"./components/Popover/Popover.js";import{Progress as yo}from"./components/Progress/Progress.js";import{ProgressStep as Uo}from"./components/ProgressStep/ProgressStep.js";import{Radio as Ro}from"./components/Radio/Radio.js";import{RadioGroup as Eo}from"./components/Radio/RadioGroup.js";import{Select as Vo}from"./components/Select/Select/Select.js";import{MultiSelect as Ho}from"./components/Select/MultiSelect/MultiSelect.js";import{NestedSelect as jo}from"./components/Select/NestedSelect/NestedSelect.js";import{ButtonSelect as Jo}from"./components/Select/ButtonSelect/ButtonSelect.js";import{ProfileDropdown as Qo}from"./components/Select/ProfileDropdown/index.js";import{SideSheet as Xo}from"./components/SideSheet/SideSheet.js";import{Snackbar as Zo,notify as $o}from"./components/Snackbar/Snackbar.js";import{Status as rr}from"./components/Status/Status.js";import{Stepper as tr}from"./components/Stepper/Stepper.js";import{Switcher as mr}from"./components/Switcher/Switcher.js";import{Tab as fr}from"./components/Tab/Tab.js";import{Table as ir}from"./components/Table/Table.js";import{Table as lr}from"./components/TableV2/Table.js";import{ColumnSettings as ur}from"./components/TableV2/ColumnSettings.js";import{AdvancedPagination as Cr}from"./components/TableV2/AdvancedPagination.js";import{Text as Sr}from"./components/Text/Text.js";import{Textarea as Pr}from"./components/Textarea/Textarea.js";import{Tooltip as Mr}from"./components/Tooltip/Tooltip.js";import{UnderConstruction as br}from"./components/UnderConstruction/UnderConstruction.js";import{OptionItem as Br}from"./helperComponents/OptionItem/OptionItem.js";import{FormContext as kr}from"./context/types.js";import"react";import"./consts/index.js";import{useFormProps as Dr}from"./hooks/useFormProps.js";import"./hooks/useScreenSize.js";import{useFieldArray as hr}from"react-hook-form";export{Cr as AdvancedPagination,x as Alert,a as Avatar,n as AvatarGroup,d as Badge,s as BadgeV2,c as Breadcrumb,g as Button,F as ButtonGroup,Jo as ButtonSelect,I as Card,v as CardGroup,T as Checkbox,A as Chips,y as Collapse,U as CollapseGroup,G as CollapseItem,ur as ColumnSettings,R as Container,E as Copy,V as Counter,Q as Divider,oo as DropzoneFileUpload,X as Empty,Z as FileUpload,eo as FileUploadMode,po as FormContainer,kr as FormContext,xo as FormField,ao as Heading,no as Image,uo as Input,Co as Link,Mo as MOBILE_ANIMATION,So as Menu,To as Modal,Ao as ModalConfirmation,Io as More,Ho as MultiSelect,Po as NestedMenu,jo as NestedSelect,Br as OptionItem,vo as Pagination,Go as Popover,Qo as ProfileDropdown,yo as Progress,Uo as ProgressStep,Ro as Radio,Eo as RadioGroup,J as RangeDatePicker,Vo as Select,Xo as SideSheet,j as SimpleDatePicker,Zo as Snackbar,rr as Status,tr as Stepper,mr as Switcher,fr as Tab,ir as Table,lr as TableV2,Sr as Text,Pr as Textarea,H as TimePicker,Mr as Tooltip,br as UnderConstruction,$o as notify,hr as useFieldArray,Dr as useFormProps};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrm_ui_lib",
3
- "version": "2.0.0-alpha.31",
3
+ "version": " 2.0.0-alpha.32",
4
4
  "description": "UI library for Dino",
5
5
  "main": "./index.cjs",
6
6
  "module": "./index.js",
@@ -1,7 +0,0 @@
1
- import { ReactElement } from 'react';
2
- import { ISVGIconProps } from '../SVGIcons/types';
3
- interface IconDynamicComponentProps extends ISVGIconProps {
4
- componentName: string;
5
- }
6
- export declare const IconDynamicComponent: ({ componentName, ...rest }: IconDynamicComponentProps) => ReactElement | null;
7
- export {};
@@ -1 +0,0 @@
1
- import{jsx as o}from"react/jsx-runtime";import{useMemo as e,Suspense as s}from"react";import{getIcon as i}from"../SVGIcons/icon-registry.js";const t=/* @__PURE__ */new Map,C=({componentName:n,...r})=>{const a=e(()=>{if(!n)return null;if(t.has(n))return t.get(n);const e=i(n);return e?(t.set(n,e),e):null},[n]);return a?/* @__PURE__ */o(s,{fallback:null,children:/* @__PURE__ */o(a,{...r})}):null};export{C as IconDynamicComponent};
@@ -1 +0,0 @@
1
- export * from './IconDynamicComponent';
@@ -1 +0,0 @@
1
- import{IconDynamicComponent as m}from"./IconDynamicComponent.js";export{m as IconDynamicComponent};