brd-ui-kit 0.1.67 → 0.1.69

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.
Files changed (63) hide show
  1. package/dist/brd-ui-kit.css +1 -1
  2. package/dist/components/input-contact/index.d.ts +2 -0
  3. package/dist/components/{contact-input/contact-input.d.ts → input-contact/input-contact.d.ts} +6 -5
  4. package/dist/components/input-contact.d.ts +2 -0
  5. package/dist/components/input-phone/index.d.ts +2 -0
  6. package/dist/components/input-phone/input-phone.d.ts +9 -0
  7. package/dist/components/input-phone.d.ts +2 -0
  8. package/dist/components-avatar-uploader-avatar-uploader.cjs +1 -1
  9. package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
  10. package/dist/components-avatar-uploader-avatar-uploader.js +4 -3
  11. package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
  12. package/dist/components-basic-avatar-basic-avatar.cjs +1 -1
  13. package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
  14. package/dist/components-basic-avatar-basic-avatar.js +3 -2
  15. package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
  16. package/dist/components-files-uploader-files-uploader.cjs +1 -1
  17. package/dist/components-files-uploader-files-uploader.js +1 -1
  18. package/dist/components-input-contact-input-contact.cjs +9 -0
  19. package/dist/components-input-contact-input-contact.cjs.map +1 -0
  20. package/dist/{components-contact-input-contact-input.js → components-input-contact-input-contact.js} +94 -55
  21. package/dist/components-input-contact-input-contact.js.map +1 -0
  22. package/dist/components-input-contact.cjs +2 -0
  23. package/dist/components-input-contact.cjs.map +1 -0
  24. package/dist/components-input-contact.js +5 -0
  25. package/dist/components-input-contact.js.map +1 -0
  26. package/dist/components-input-password-input-password.cjs +1 -1
  27. package/dist/components-input-password-input-password.cjs.map +1 -1
  28. package/dist/components-input-password-input-password.js +3 -2
  29. package/dist/components-input-password-input-password.js.map +1 -1
  30. package/dist/components-input-phone-input-phone.cjs +30 -0
  31. package/dist/components-input-phone-input-phone.cjs.map +1 -0
  32. package/dist/components-input-phone-input-phone.js +2853 -0
  33. package/dist/components-input-phone-input-phone.js.map +1 -0
  34. package/dist/components-input-phone.cjs +2 -0
  35. package/dist/components-input-phone.cjs.map +1 -0
  36. package/dist/components-input-phone.js +5 -0
  37. package/dist/components-input-phone.js.map +1 -0
  38. package/dist/constants/contact-input.d.ts +1 -1
  39. package/dist/{index-B5Id-jNC.js → index-CVlBIwtP.js} +486 -1127
  40. package/dist/index-CVlBIwtP.js.map +1 -0
  41. package/dist/index-DJD-8LQA.cjs +6 -0
  42. package/dist/index-DJD-8LQA.cjs.map +1 -0
  43. package/dist/index-DgusNo6W.cjs +3 -0
  44. package/dist/index-DgusNo6W.cjs.map +1 -0
  45. package/dist/index-Mf4QF1FW.js +647 -0
  46. package/dist/index-Mf4QF1FW.js.map +1 -0
  47. package/dist/index.cjs +1 -1
  48. package/dist/index.d.ts +4 -2
  49. package/dist/index.js +30 -28
  50. package/dist/index.js.map +1 -1
  51. package/package.json +20 -10
  52. package/dist/components/contact-input/index.d.ts +0 -2
  53. package/dist/components/contact-input.d.ts +0 -2
  54. package/dist/components-contact-input-contact-input.cjs +0 -7
  55. package/dist/components-contact-input-contact-input.cjs.map +0 -1
  56. package/dist/components-contact-input-contact-input.js.map +0 -1
  57. package/dist/components-contact-input.cjs +0 -2
  58. package/dist/components-contact-input.cjs.map +0 -1
  59. package/dist/components-contact-input.js +0 -5
  60. package/dist/components-contact-input.js.map +0 -1
  61. package/dist/index-B5Id-jNC.js.map +0 -1
  62. package/dist/index-D8y9Cogu.cjs +0 -7
  63. package/dist/index-D8y9Cogu.cjs.map +0 -1
@@ -37,7 +37,8 @@ import "./lodash-FemA_LCk.js";
37
37
  import "./chart-D15EtNmb.js";
38
38
  import "./index-C4iHL8Gs.js";
39
39
  import "./index-C6N9aMq_.js";
40
- const or = ({
40
+ import "./components-input-phone-input-phone.js";
41
+ const ir = ({
41
42
  initials: o,
42
43
  avatar: i,
43
44
  fallback: a,
@@ -94,6 +95,6 @@ const or = ({
94
95
  ] }) : p;
95
96
  };
96
97
  export {
97
- or as BasicAvatar
98
+ ir as BasicAvatar
98
99
  };
99
100
  //# sourceMappingURL=components-basic-avatar-basic-avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-basic-avatar-basic-avatar.js","sources":["../src/components/basic-avatar/basic-avatar.tsx"],"sourcesContent":["import { Icon, Typography, cn } from \"@/index\";\nimport { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport { Avatar, AvatarFallback, AvatarImage } from \"../ui/avatar\";\nimport type { IconProps } from \"../ui/icon\";\n\ntype AvatarProps = React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: \"default\" | \"sm\" | \"lg\";\n};\ntype AvatarFallbackProps = React.ComponentProps<typeof AvatarPrimitive.Fallback>;\ntype AvatarImageProps = React.ComponentProps<typeof AvatarPrimitive.Image>;\n\ntype Props = {\n initials?: {\n text?: string;\n className?: string;\n };\n hasBadge?: boolean;\n avatar?: AvatarProps;\n fallback?: AvatarFallbackProps;\n image?: AvatarImageProps;\n showDeleteOnHover?: boolean;\n icon?: IconProps;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n};\n\nexport const BasicAvatar = ({\n initials,\n avatar,\n fallback,\n image,\n icon,\n showDeleteOnHover = true,\n onClick = () => {},\n}: Props) => {\n const content = (\n <Avatar\n {...avatar}\n className={cn(\"h-18 w-18\", avatar?.className)}\n >\n <AvatarImage\n {...image}\n alt=\"avatar\"\n className={cn(\"h-full w-full border-0\", image?.className)}\n />\n <AvatarFallback {...fallback}>\n <Typography\n variant=\"body-xxl-medium\"\n className={cn(\"text-info-new-text\", initials?.className)}\n >\n {initials?.text}\n </Typography>\n </AvatarFallback>\n </Avatar>\n );\n\n if (!showDeleteOnHover) {\n return content;\n }\n\n return (\n <div className=\"relative inline-block\">\n {content}\n <div\n className=\"text-primary-bg bg-primary-inverse-bg/50 absolute inset-0 flex\n cursor-pointer items-center justify-center rounded-full opacity-0\n transition-opacity hover:opacity-100\"\n onClick={(e) => e.stopPropagation()}\n >\n <Icon\n {...icon}\n type=\"close\"\n onClick={onClick}\n />\n </div>\n </div>\n );\n};\n\nexport type {\n AvatarFallbackProps,\n AvatarImageProps,\n AvatarProps,\n Props as BasicAvatarProps,\n};\n"],"names":["BasicAvatar","initials","avatar","fallback","image","icon","showDeleteOnHover","onClick","content","jsxs","Avatar","cn","jsx","AvatarImage","AvatarFallback","Typography","e","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAMA,KAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,mBAAAC,IAAoB;AAAA,EACpB,SAAAC,IAAU,MAAM;AAAA,EAAC;AACnB,MAAa;AACX,QAAMC,IACJ,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGR;AAAA,MACJ,WAAWS,EAAG,aAAaT,GAAQ,SAAS;AAAA,MAE5C,UAAA;AAAA,QAAA,gBAAAU;AAAA,UAACC;AAAA,UAAA;AAAA,YACE,GAAGT;AAAA,YACJ,KAAI;AAAA,YACJ,WAAWO,EAAG,0BAA0BP,GAAO,SAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAE1D,gBAAAQ,EAACE,GAAA,EAAgB,GAAGX,GAClB,UAAA,gBAAAS;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,WAAWJ,EAAG,sBAAsBV,GAAU,SAAS;AAAA,YAEtD,UAAAA,GAAU;AAAA,UAAA;AAAA,QAAA,EACb,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIJ,SAAKK,IAKH,gBAAAG,EAAC,OAAA,EAAI,WAAU,yBACZ,UAAA;AAAA,IAAAD;AAAA,IACD,gBAAAI;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA;AAAA;AAAA,QAGV,SAAS,CAACI,MAAMA,EAAE,gBAAA;AAAA,QAElB,UAAA,gBAAAJ;AAAA,UAACK;AAAA,UAAA;AAAA,YACE,GAAGZ;AAAA,YACJ,MAAK;AAAA,YACL,SAAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF,IAlBOC;AAoBX;"}
1
+ {"version":3,"file":"components-basic-avatar-basic-avatar.js","sources":["../src/components/basic-avatar/basic-avatar.tsx"],"sourcesContent":["import { Icon, Typography, cn } from \"@/index\";\nimport { Avatar as AvatarPrimitive } from \"radix-ui\";\nimport { Avatar, AvatarFallback, AvatarImage } from \"../ui/avatar\";\nimport type { IconProps } from \"../ui/icon\";\n\ntype AvatarProps = React.ComponentProps<typeof AvatarPrimitive.Root> & {\n size?: \"default\" | \"sm\" | \"lg\";\n};\ntype AvatarFallbackProps = React.ComponentProps<typeof AvatarPrimitive.Fallback>;\ntype AvatarImageProps = React.ComponentProps<typeof AvatarPrimitive.Image>;\n\ntype Props = {\n initials?: {\n text?: string;\n className?: string;\n };\n hasBadge?: boolean;\n avatar?: AvatarProps;\n fallback?: AvatarFallbackProps;\n image?: AvatarImageProps;\n showDeleteOnHover?: boolean;\n icon?: IconProps;\n onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;\n};\n\nexport const BasicAvatar = ({\n initials,\n avatar,\n fallback,\n image,\n icon,\n showDeleteOnHover = true,\n onClick = () => {},\n}: Props) => {\n const content = (\n <Avatar\n {...avatar}\n className={cn(\"h-18 w-18\", avatar?.className)}\n >\n <AvatarImage\n {...image}\n alt=\"avatar\"\n className={cn(\"h-full w-full border-0\", image?.className)}\n />\n <AvatarFallback {...fallback}>\n <Typography\n variant=\"body-xxl-medium\"\n className={cn(\"text-info-new-text\", initials?.className)}\n >\n {initials?.text}\n </Typography>\n </AvatarFallback>\n </Avatar>\n );\n\n if (!showDeleteOnHover) {\n return content;\n }\n\n return (\n <div className=\"relative inline-block\">\n {content}\n <div\n className=\"text-primary-bg bg-primary-inverse-bg/50 absolute inset-0 flex\n cursor-pointer items-center justify-center rounded-full opacity-0\n transition-opacity hover:opacity-100\"\n onClick={(e) => e.stopPropagation()}\n >\n <Icon\n {...icon}\n type=\"close\"\n onClick={onClick}\n />\n </div>\n </div>\n );\n};\n\nexport type {\n AvatarFallbackProps,\n AvatarImageProps,\n AvatarProps,\n Props as BasicAvatarProps,\n};\n"],"names":["BasicAvatar","initials","avatar","fallback","image","icon","showDeleteOnHover","onClick","content","jsxs","Avatar","cn","jsx","AvatarImage","AvatarFallback","Typography","e","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBO,MAAMA,KAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,mBAAAC,IAAoB;AAAA,EACpB,SAAAC,IAAU,MAAM;AAAA,EAAC;AACnB,MAAa;AACX,QAAMC,IACJ,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGR;AAAA,MACJ,WAAWS,EAAG,aAAaT,GAAQ,SAAS;AAAA,MAE5C,UAAA;AAAA,QAAA,gBAAAU;AAAA,UAACC;AAAA,UAAA;AAAA,YACE,GAAGT;AAAA,YACJ,KAAI;AAAA,YACJ,WAAWO,EAAG,0BAA0BP,GAAO,SAAS;AAAA,UAAA;AAAA,QAAA;AAAA,QAE1D,gBAAAQ,EAACE,GAAA,EAAgB,GAAGX,GAClB,UAAA,gBAAAS;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,WAAWJ,EAAG,sBAAsBV,GAAU,SAAS;AAAA,YAEtD,UAAAA,GAAU;AAAA,UAAA;AAAA,QAAA,EACb,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIJ,SAAKK,IAKH,gBAAAG,EAAC,OAAA,EAAI,WAAU,yBACZ,UAAA;AAAA,IAAAD;AAAA,IACD,gBAAAI;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA;AAAA;AAAA,QAGV,SAAS,CAACI,MAAMA,EAAE,gBAAA;AAAA,QAElB,UAAA,gBAAAJ;AAAA,UAACK;AAAA,UAAA;AAAA,YACE,GAAGZ;AAAA,YACJ,MAAK;AAAA,YACL,SAAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF,IAlBOC;AAoBX;"}
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("./lib-utils.cjs"),b=require("react"),D=require("./index-D8y9Cogu.cjs"),h=require("./components-ui-icon-icon.cjs"),L=require("./components-ui-typography-typography.cjs");require("./components-ui-typography-typography.styles.cjs");const $=["B","KB","MB","GB","TB"],u=1024,B=5*u*u,P=5,C=["all"],F=800,k={image:{"image/*":[".jpg",".jpeg",".png",".webp"]},pdf:{"application/pdf":[".pdf"]},doc:{"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"]},excel:{"application/vnd.ms-excel":[".xls"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"]},text:{"text/plain":[".txt"]},all:{}},O=r=>{if(r===0)return"0 B";const e=Math.floor(Math.log(r)/Math.log(u));return`${(r/Math.pow(u,e)).toFixed(2)} ${$[e]}`},Z=r=>r.reduce((e,l)=>({...e,...k[l]}),{}),z=r=>{const e=r.name.split(".").pop()?.toLowerCase();return e?["jpg","jpeg","png","webp"].includes(e)?"image":e==="pdf"?"pdf":["doc","docx"].includes(e)?"doc":["xls","xlsx"].includes(e)?"excel":e==="txt"?"text":"other":"other"},K=({value:r=null,onChange:e,multiple:l=!1,maxFiles:i=P,disabled:y=!1,className:p,maxSize:g=B,variant:m="grid",accepts:T=C,icon:U,title:j,text:v,showFiles:_=!0})=>{const[f,w]=b.useState(!1),[A,x]=b.useState(null),s=Array.isArray(r)?r:r?[r]:[],E=b.useCallback((o,n)=>{if(x(null),s.length+o.length>i){x(`Максимальное количество файлов: ${i}`);return}if(n.length>0){const c=n[0].errors[0]?.code==="file-too-large"?`Файл слишком большой. Максимальный размер: ${g/1024/1024}MB`:"Неподдерживаемый формат файла";x(c);return}w(!0),setTimeout(()=>{const a=o.map(c=>({url:URL.createObjectURL(c),name:c.name,size:O(c.size),addedAt:new Date().toISOString()}));l?e?.([...s,...a]):(s[0]?.url?.startsWith("blob:")&&URL.revokeObjectURL(s[0].url),e?.(a[0]??null)),w(!1)},F)},[s,i,g,l,e]),{getRootProps:I,getInputProps:M,isDragActive:N}=D.useDropzone({onDrop:E,accept:Z(T),maxSize:g,multiple:l&&i>1,disabled:y||f,maxFiles:i-s.length}),R=o=>()=>{s[o]?.url?.startsWith("blob:")&&URL.revokeObjectURL(s[o].url);const n=s.filter((a,c)=>c!==o);e?.(l?n:n[0]||null)},S=s.length>=i,q={grid:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4",list:"grid-cols-1",compact:"grid-cols-2 sm:grid-cols-3"};return t.jsxs("div",{className:d.cn("w-full space-y-4",p?.container),children:[t.jsxs("div",{className:d.cn("grid h-full w-full gap-4",m==="list"?"grid-cols-1":q[m]),children:[_&&s.map((o,n)=>{const a=z(o);return t.jsxs("div",{className:`group bg-primary-bg relative aspect-square h-full w-full
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),d=require("./lib-utils.cjs"),b=require("react"),D=require("./index-DJD-8LQA.cjs"),h=require("./components-ui-icon-icon.cjs"),L=require("./components-ui-typography-typography.cjs");require("./components-ui-typography-typography.styles.cjs");const $=["B","KB","MB","GB","TB"],u=1024,B=5*u*u,P=5,C=["all"],F=800,k={image:{"image/*":[".jpg",".jpeg",".png",".webp"]},pdf:{"application/pdf":[".pdf"]},doc:{"application/msword":[".doc"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":[".docx"]},excel:{"application/vnd.ms-excel":[".xls"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":[".xlsx"]},text:{"text/plain":[".txt"]},all:{}},O=r=>{if(r===0)return"0 B";const e=Math.floor(Math.log(r)/Math.log(u));return`${(r/Math.pow(u,e)).toFixed(2)} ${$[e]}`},Z=r=>r.reduce((e,l)=>({...e,...k[l]}),{}),z=r=>{const e=r.name.split(".").pop()?.toLowerCase();return e?["jpg","jpeg","png","webp"].includes(e)?"image":e==="pdf"?"pdf":["doc","docx"].includes(e)?"doc":["xls","xlsx"].includes(e)?"excel":e==="txt"?"text":"other":"other"},K=({value:r=null,onChange:e,multiple:l=!1,maxFiles:i=P,disabled:y=!1,className:p,maxSize:g=B,variant:m="grid",accepts:T=C,icon:U,title:j,text:v,showFiles:_=!0})=>{const[f,w]=b.useState(!1),[A,x]=b.useState(null),s=Array.isArray(r)?r:r?[r]:[],E=b.useCallback((o,n)=>{if(x(null),s.length+o.length>i){x(`Максимальное количество файлов: ${i}`);return}if(n.length>0){const c=n[0].errors[0]?.code==="file-too-large"?`Файл слишком большой. Максимальный размер: ${g/1024/1024}MB`:"Неподдерживаемый формат файла";x(c);return}w(!0),setTimeout(()=>{const a=o.map(c=>({url:URL.createObjectURL(c),name:c.name,size:O(c.size),addedAt:new Date().toISOString()}));l?e?.([...s,...a]):(s[0]?.url?.startsWith("blob:")&&URL.revokeObjectURL(s[0].url),e?.(a[0]??null)),w(!1)},F)},[s,i,g,l,e]),{getRootProps:I,getInputProps:M,isDragActive:N}=D.useDropzone({onDrop:E,accept:Z(T),maxSize:g,multiple:l&&i>1,disabled:y||f,maxFiles:i-s.length}),R=o=>()=>{s[o]?.url?.startsWith("blob:")&&URL.revokeObjectURL(s[o].url);const n=s.filter((a,c)=>c!==o);e?.(l?n:n[0]||null)},S=s.length>=i,q={grid:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4",list:"grid-cols-1",compact:"grid-cols-2 sm:grid-cols-3"};return t.jsxs("div",{className:d.cn("w-full space-y-4",p?.container),children:[t.jsxs("div",{className:d.cn("grid h-full w-full gap-4",m==="list"?"grid-cols-1":q[m]),children:[_&&s.map((o,n)=>{const a=z(o);return t.jsxs("div",{className:`group bg-primary-bg relative aspect-square h-full w-full
2
2
  overflow-hidden rounded-lg`,children:[a==="image"?t.jsx("img",{src:o.url,alt:`Preview ${n+1}`,className:"h-full w-full object-cover"}):t.jsx("div",{className:`flex h-full w-full items-center justify-center bg-gray-100
3
3
  text-sm font-semibold`,children:o.name.split(".").pop()?.toUpperCase()}),t.jsx("div",{className:`text-primary-bg bg-primary-inverse-bg/50 absolute inset-0 flex
4
4
  cursor-pointer items-center justify-center rounded-lg opacity-0
@@ -1,7 +1,7 @@
1
1
  import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
2
  import { cn as d } from "./lib-utils.js";
3
3
  import { useState as E, useCallback as C } from "react";
4
- import { u as P } from "./index-B5Id-jNC.js";
4
+ import { u as P } from "./index-CVlBIwtP.js";
5
5
  import { Icon as x } from "./components-ui-icon-icon.js";
6
6
  import { Typography as U } from "./components-ui-typography-typography.js";
7
7
  import "./components-ui-typography-typography.styles.js";
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const t=require("react/jsx-runtime");;/* empty css */const c=require("./lib-utils.cjs");require("class-variance-authority");const p=require("react");require("./components-ui-badge-badge.styles.cjs");const C=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const u=require("./components-ui-icon-icon.cjs");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");const y=require("./hooks-usePopupControls.cjs");require("lucide-react");require("./components-app-pagination-app-pagination.styles.cjs");require("./components-app-sidebar-app-sidebar.styles.cjs");const f=require("./components-input-field-input-field.cjs");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-CgVfpT_X.cjs");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");const j=require("./components-input-phone-input-phone.cjs"),_=[{label:"Мобильный",icon:"phone"},{label:"Telegram",icon:"telegram"},{label:"WhatsApp",icon:"whats-app"},{label:"Max",icon:"max"},{label:"E-mail",icon:"mail"}],n=o=>{switch(o){case"max":return{viewBox:"0 0 16 16",bgColor:"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]"};case"telegram":return{viewBox:"0 0 17 17",bgColor:"bg-[#289AD2]"};case"whats-app":return{viewBox:"0 0 18 18",bgColor:"bg-[#00C202]",textColor:"text-[#00C202]"};default:return{viewBox:"0 0 24 24"}}},P=o=>{const{inputProps:d,inputPhoneProps:q}=o,[e,h]=p.useState("phone"),{isOpened:i,openPopup:m,closePopup:a}=y.usePopupControls(),l=p.useRef(null);p.useEffect(()=>{const r=s=>{l.current&&!l.current.contains(s.target)&&a()};return i&&document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[i,a]);const x=r=>{switch(r){case"phone":return"+7 (999) 999-99-99";case"telegram":return"@username";case"whats-app":return"+7 (999) 999-99-99";case"max":return"ID пользователя Max";case"mail":return"example@mail.com";default:return"Введите значение"}},v=r=>()=>{h(r),o.onTypeChange?.(r),a()};return t.jsxs("div",{className:c.cn("relative",o.classes?.container),children:[["telegram","max","mail"].includes(e)?t.jsx(f.InputField,{...d,date:[{id:"0",position:"inline-start",component:t.jsx(u.Icon,{type:e,classes:{wrapper:c.cn(`flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]
2
+ ${n(e).bgColor??"bg-primary-inverse-hover-bg"}
3
+ ${n(e).textColor??"text-primary-inverse-text"}`)},viewBox:n(e).viewBox})},{id:"1",position:"inline-end",component:t.jsx(u.Icon,{type:i?"chevron-up":"chevron",className:"cursor-pointer",onClick:m})}],placeholder:x(e)}):t.jsx(j.InputPhone,{...q,date:[{id:"0",position:"inline-start",component:t.jsx(u.Icon,{type:e,classes:{wrapper:c.cn(`flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]
4
+ ${n(e).bgColor??"bg-primary-inverse-hover-bg"}
5
+ ${n(e).textColor??"text-primary-inverse-text"}`)},viewBox:n(e).viewBox})},{id:"1",position:"inline-end",component:t.jsx(u.Icon,{type:i?"chevron-up":"chevron",className:"cursor-pointer",onClick:m})}],placeholder:x(e)}),i&&t.jsx("div",{className:`border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
6
+ flex-col rounded-xl border`,ref:l,children:_.map(({label:r,icon:s})=>{const{bgColor:b,textColor:g,viewBox:w}=n(s);return t.jsxs(C.Button,{variant:"ghost",className:"flex w-full justify-start",type:"button",onClick:v(s),children:[t.jsx(u.Icon,{type:s,className:"text-primary-inverse-text",classes:{wrapper:c.cn(`flex h-5.5 w-5.5 items-center justify-center rounded-sm
7
+ ${b??"bg-primary-inverse-hover-bg"}
8
+ ${g??"text-primary-inverse-text"}`)},viewBox:w}),r]},r)})})]})};exports.InputContact=P;
9
+ //# sourceMappingURL=components-input-contact-input-contact.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app\",\n },\n {\n label: \"Max\",\n icon: \"max\",\n },\n {\n label: \"E-mail\",\n icon: \"mail\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type IconTypes,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange = Extract<\n IconTypes,\n \"telegram\" | \"whats-app\" | \"max\" | \"phone\" | \"mail\"\n>;\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: IconTypes) => {\n switch (icon) {\n case \"max\":\n return {\n viewBox: \"0 0 16 16\",\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram\":\n return {\n viewBox: \"0 0 17 17\",\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app\":\n return {\n viewBox: \"0 0 18 18\",\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {\n viewBox: \"0 0 24 24\",\n };\n }\n};\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram\":\n return \"@username\";\n case \"whats-app\":\n return \"+7 (999) 999-99-99\";\n case \"max\":\n return \"ID пользователя Max\";\n case \"mail\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n props.onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram\", \"max\", \"mail\"].includes(type) ? (\n <InputField\n {...inputProps}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n classes={{\n wrapper: cn(\n `flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]\n ${iconStyles(type).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(type).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n }}\n viewBox={iconStyles(type).viewBox}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"chevron-up\" : \"chevron\"}\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n classes={{\n wrapper: cn(\n `flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]\n ${iconStyles(type).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(type).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n }}\n viewBox={iconStyles(type).viewBox}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"chevron-up\" : \"chevron\"}\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n const { bgColor, textColor, viewBox } = iconStyles(icon);\n\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n className=\"text-primary-inverse-text\"\n classes={{\n wrapper: cn(\n `flex h-5.5 w-5.5 items-center justify-center rounded-sm\n ${bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${textColor ?? \"text-primary-inverse-text\"}`,\n ),\n }}\n viewBox={viewBox}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","InputContact","props","inputProps","inputPhoneProps","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","cn","jsx","InputField","Icon","InputPhone","label","bgColor","textColor","viewBox","Button"],"mappings":"o7DAEaA,EAAqB,CAChC,CACE,MAAO,YACP,KAAM,OAAA,EAER,CACE,MAAO,WACP,KAAM,UAAA,EAER,CACE,MAAO,WACP,KAAM,WAAA,EAER,CACE,MAAO,MACP,KAAM,KAAA,EAER,CACE,MAAO,SACP,KAAM,MAAA,CAEV,ECgBMC,EAAcC,GAAoB,CACtC,OAAQA,EAAA,CACN,IAAK,MACH,MAAO,CACL,QAAS,YACT,QAAS,kEAAA,EAGb,IAAK,WACH,MAAO,CACL,QAAS,YACT,QAAS,cAAA,EAGb,IAAK,YACH,MAAO,CACL,QAAS,YACT,QAAS,eACT,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AA,wBACxCC,GAAa,2BAA2B,EAAA,CAC5C,EAEF,QAAAC,CAAA,CAAA,EAGDH,CAAA,CAAA,EAnBIA,CAAA,CAsBX,CAAC,CAAA,CAAA,CACH,EAEJ,CAEJ"}
@@ -1,14 +1,14 @@
1
- import { jsxs as c, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
2
  import './brd-ui-kit.css';/* empty css */
3
- import { cn as s } from "./lib-utils.js";
3
+ import { cn as m } from "./lib-utils.js";
4
4
  import "class-variance-authority";
5
- import { useState as b, useRef as w, useEffect as C } from "react";
5
+ import { useState as C, useRef as y, useEffect as B } from "react";
6
6
  import "./components-ui-badge-badge.styles.js";
7
- import { Button as y } from "./components-ui-button-button.js";
7
+ import { Button as P } from "./components-ui-button-button.js";
8
8
  import "./components-ui-button-button.styles.js";
9
9
  import "./components-ui-card-card.js";
10
10
  import "./components-ui-checkbox-checkbox.js";
11
- import { Icon as l } from "./components-ui-icon-icon.js";
11
+ import { Icon as s } from "./components-ui-icon-icon.js";
12
12
  import "./components-ui-combobox-combobox.js";
13
13
  import "./components-ui-dialog-dialog.js";
14
14
  import "./components-ui-label-label.js";
@@ -27,17 +27,18 @@ import "./components-ui-table-table.js";
27
27
  import "./components-ui-tabs-tabs.js";
28
28
  import "./components-ui-tooltip-tooltip.js";
29
29
  import "./components-ui-typography-typography.styles.js";
30
- import { usePopupControls as B } from "./hooks-usePopupControls.js";
30
+ import { usePopupControls as N } from "./hooks-usePopupControls.js";
31
31
  import "lucide-react";
32
32
  import "./components-app-pagination-app-pagination.styles.js";
33
33
  import "./components-app-sidebar-app-sidebar.styles.js";
34
- import { InputField as N } from "./components-input-field-input-field.js";
34
+ import { InputField as j } from "./components-input-field-input-field.js";
35
35
  import "./components-select-field-select-field.js";
36
36
  import "./lodash-FemA_LCk.js";
37
37
  import "./chart-D15EtNmb.js";
38
38
  import "./index-C4iHL8Gs.js";
39
39
  import "./index-C6N9aMq_.js";
40
- const j = [
40
+ import { InputPhone as I } from "./components-input-phone-input-phone.js";
41
+ const $ = [
41
42
  {
42
43
  label: "Мобильный",
43
44
  icon: "phone"
@@ -58,8 +59,8 @@ const j = [
58
59
  label: "E-mail",
59
60
  icon: "mail"
60
61
  }
61
- ], p = (r) => {
62
- switch (r) {
62
+ ], o = (i) => {
63
+ switch (i) {
63
64
  case "max":
64
65
  return {
65
66
  viewBox: "0 0 16 16",
@@ -81,18 +82,18 @@ const j = [
81
82
  viewBox: "0 0 24 24"
82
83
  };
83
84
  }
84
- }, ce = (r) => {
85
- const [t, u] = b("phone"), { isOpened: n, openPopup: d, closePopup: m } = B(), a = w(null);
86
- C(() => {
87
- const e = (o) => {
88
- a.current && !a.current.contains(o.target) && m();
85
+ }, he = (i) => {
86
+ const { inputProps: x, inputPhoneProps: h } = i, [e, v] = C("phone"), { isOpened: n, openPopup: c, closePopup: a } = N(), l = y(null);
87
+ B(() => {
88
+ const r = (p) => {
89
+ l.current && !l.current.contains(p.target) && a();
89
90
  };
90
- return n && document.addEventListener("mousedown", e), () => {
91
- document.removeEventListener("mousedown", e);
91
+ return n && document.addEventListener("mousedown", r), () => {
92
+ document.removeEventListener("mousedown", r);
92
93
  };
93
- }, [n, m]);
94
- const x = (e) => {
95
- switch (e) {
94
+ }, [n, a]);
95
+ const u = (r) => {
96
+ switch (r) {
96
97
  case "phone":
97
98
  return "+7 (999) 999-99-99";
98
99
  case "telegram":
@@ -106,84 +107,122 @@ const j = [
106
107
  default:
107
108
  return "Введите значение";
108
109
  }
109
- }, f = (e) => () => {
110
- u(e), r.onTypeChange?.(e), m();
110
+ }, f = (r) => () => {
111
+ v(r), i.onTypeChange?.(r), a();
111
112
  };
112
- return /* @__PURE__ */ c("div", { className: s("relative", r.classes?.container), children: [
113
- /* @__PURE__ */ i(
114
- N,
113
+ return /* @__PURE__ */ d("div", { className: m("relative", i.classes?.container), children: [
114
+ ["telegram", "max", "mail"].includes(e) ? /* @__PURE__ */ t(
115
+ j,
115
116
  {
116
- ...r,
117
+ ...x,
117
118
  date: [
118
119
  {
119
120
  id: "0",
120
121
  position: "inline-start",
121
- component: /* @__PURE__ */ i(
122
- l,
122
+ component: /* @__PURE__ */ t(
123
+ s,
123
124
  {
124
- type: t,
125
+ type: e,
125
126
  classes: {
126
- wrapper: s(
127
+ wrapper: m(
127
128
  `flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]
128
- ${p(t).bgColor ?? "bg-primary-inverse-hover-bg"}
129
- ${p(t).textColor ?? "text-primary-inverse-text"}`
129
+ ${o(e).bgColor ?? "bg-primary-inverse-hover-bg"}
130
+ ${o(e).textColor ?? "text-primary-inverse-text"}`
130
131
  )
131
132
  },
132
- viewBox: p(t).viewBox
133
+ viewBox: o(e).viewBox
133
134
  }
134
135
  )
135
136
  },
136
137
  {
137
138
  id: "1",
138
139
  position: "inline-end",
139
- component: /* @__PURE__ */ i(
140
- l,
140
+ component: /* @__PURE__ */ t(
141
+ s,
141
142
  {
142
143
  type: n ? "chevron-up" : "chevron",
143
144
  className: "cursor-pointer",
144
- onClick: d
145
+ onClick: c
145
146
  }
146
147
  )
147
148
  }
148
149
  ],
149
- placeholder: x(t)
150
+ placeholder: u(e)
151
+ }
152
+ ) : /* @__PURE__ */ t(
153
+ I,
154
+ {
155
+ ...h,
156
+ date: [
157
+ {
158
+ id: "0",
159
+ position: "inline-start",
160
+ component: /* @__PURE__ */ t(
161
+ s,
162
+ {
163
+ type: e,
164
+ classes: {
165
+ wrapper: m(
166
+ `flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]
167
+ ${o(e).bgColor ?? "bg-primary-inverse-hover-bg"}
168
+ ${o(e).textColor ?? "text-primary-inverse-text"}`
169
+ )
170
+ },
171
+ viewBox: o(e).viewBox
172
+ }
173
+ )
174
+ },
175
+ {
176
+ id: "1",
177
+ position: "inline-end",
178
+ component: /* @__PURE__ */ t(
179
+ s,
180
+ {
181
+ type: n ? "chevron-up" : "chevron",
182
+ className: "cursor-pointer",
183
+ onClick: c
184
+ }
185
+ )
186
+ }
187
+ ],
188
+ placeholder: u(e)
150
189
  }
151
190
  ),
152
- n && /* @__PURE__ */ i(
191
+ n && /* @__PURE__ */ t(
153
192
  "div",
154
193
  {
155
194
  className: `border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
156
195
  flex-col rounded-xl border`,
157
- ref: a,
158
- children: j.map(({ label: e, icon: o }) => {
159
- const { bgColor: h, textColor: g, viewBox: v } = p(o);
160
- return /* @__PURE__ */ c(
161
- y,
196
+ ref: l,
197
+ children: $.map(({ label: r, icon: p }) => {
198
+ const { bgColor: g, textColor: b, viewBox: w } = o(p);
199
+ return /* @__PURE__ */ d(
200
+ P,
162
201
  {
163
202
  variant: "ghost",
164
203
  className: "flex w-full justify-start",
165
204
  type: "button",
166
- onClick: f(o),
205
+ onClick: f(p),
167
206
  children: [
168
- /* @__PURE__ */ i(
169
- l,
207
+ /* @__PURE__ */ t(
208
+ s,
170
209
  {
171
- type: o,
210
+ type: p,
172
211
  className: "text-primary-inverse-text",
173
212
  classes: {
174
- wrapper: s(
213
+ wrapper: m(
175
214
  `flex h-5.5 w-5.5 items-center justify-center rounded-sm
176
- ${h ?? "bg-primary-inverse-hover-bg"}
177
- ${g ?? "text-primary-inverse-text"}`
215
+ ${g ?? "bg-primary-inverse-hover-bg"}
216
+ ${b ?? "text-primary-inverse-text"}`
178
217
  )
179
218
  },
180
- viewBox: v
219
+ viewBox: w
181
220
  }
182
221
  ),
183
- e
222
+ r
184
223
  ]
185
224
  },
186
- e
225
+ r
187
226
  );
188
227
  })
189
228
  }
@@ -191,6 +230,6 @@ const j = [
191
230
  ] });
192
231
  };
193
232
  export {
194
- ce as ContactInput
233
+ he as InputContact
195
234
  };
196
- //# sourceMappingURL=components-contact-input-contact-input.js.map
235
+ //# sourceMappingURL=components-input-contact-input-contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-input-contact-input-contact.js","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app\",\n },\n {\n label: \"Max\",\n icon: \"max\",\n },\n {\n label: \"E-mail\",\n icon: \"mail\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type IconTypes,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange = Extract<\n IconTypes,\n \"telegram\" | \"whats-app\" | \"max\" | \"phone\" | \"mail\"\n>;\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: IconTypes) => {\n switch (icon) {\n case \"max\":\n return {\n viewBox: \"0 0 16 16\",\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram\":\n return {\n viewBox: \"0 0 17 17\",\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app\":\n return {\n viewBox: \"0 0 18 18\",\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {\n viewBox: \"0 0 24 24\",\n };\n }\n};\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram\":\n return \"@username\";\n case \"whats-app\":\n return \"+7 (999) 999-99-99\";\n case \"max\":\n return \"ID пользователя Max\";\n case \"mail\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n props.onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram\", \"max\", \"mail\"].includes(type) ? (\n <InputField\n {...inputProps}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n classes={{\n wrapper: cn(\n `flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]\n ${iconStyles(type).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(type).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n }}\n viewBox={iconStyles(type).viewBox}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"chevron-up\" : \"chevron\"}\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n classes={{\n wrapper: cn(\n `flex h-5.5 w-5.5 items-center justify-center rounded-sm p-[3.5px]\n ${iconStyles(type).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(type).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n }}\n viewBox={iconStyles(type).viewBox}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"chevron-up\" : \"chevron\"}\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n const { bgColor, textColor, viewBox } = iconStyles(icon);\n\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n className=\"text-primary-inverse-text\"\n classes={{\n wrapper: cn(\n `flex h-5.5 w-5.5 items-center justify-center rounded-sm\n ${bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${textColor ?? \"text-primary-inverse-text\"}`,\n ),\n }}\n viewBox={viewBox}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","InputContact","props","inputProps","inputPhoneProps","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","cn","jsx","InputField","Icon","InputPhone","label","bgColor","textColor","viewBox","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,IAAqB;AAAA,EAChC;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER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Tag,{value:"Module"});const t=require("./components-input-contact-input-contact.cjs");exports.InputContact=t.InputContact;
2
+ //# sourceMappingURL=components-input-contact.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-input-contact.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { InputContact as n } from "./components-input-contact-input-contact.js";
2
+ export {
3
+ n as InputContact
4
+ };
5
+ //# sourceMappingURL=components-input-contact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-input-contact.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */require("./lib-utils.cjs");require("class-variance-authority");require("react");require("./components-ui-badge-badge.styles.cjs");require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const q=require("./components-ui-icon-icon.cjs");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");const o=require("./hooks-usePopupControls.cjs");require("lucide-react");require("./components-app-pagination-app-pagination.styles.cjs");require("./components-app-sidebar-app-sidebar.styles.cjs");const n=require("./components-input-field-input-field.cjs");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-CgVfpT_X.cjs");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");const t=({...i})=>{const{isOpened:e,togglePopup:u}=o.usePopupControls();return r.jsx(n.InputField,{...i,type:e?"text":"password",date:[{id:"0",position:"inline-end",component:r.jsx(q.Icon,{type:e?"eye-off":"eye",onClick:u,className:"cursor-pointer"})}]})};exports.InputPassword=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */require("./lib-utils.cjs");require("class-variance-authority");require("react");require("./components-ui-badge-badge.styles.cjs");require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const q=require("./components-ui-icon-icon.cjs");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");const o=require("./hooks-usePopupControls.cjs");require("lucide-react");require("./components-app-pagination-app-pagination.styles.cjs");require("./components-app-sidebar-app-sidebar.styles.cjs");const n=require("./components-input-field-input-field.cjs");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-CgVfpT_X.cjs");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");require("./components-input-phone-input-phone.cjs");const t=({...i})=>{const{isOpened:e,togglePopup:u}=o.usePopupControls();return r.jsx(n.InputField,{...i,type:e?"text":"password",date:[{id:"0",position:"inline-end",component:r.jsx(q.Icon,{type:e?"eye-off":"eye",onClick:u,className:"cursor-pointer"})}]})};exports.InputPassword=t;
2
2
  //# sourceMappingURL=components-input-password-input-password.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-input-password-input-password.cjs","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-off\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":"g2DAIO,MAAMA,EAA8C,CAAC,CAAE,GAAGC,KAAW,CAC1E,KAAM,CAAE,SAAAC,EAAU,YAAAC,CAAA,EAAgBC,mBAAA,EAElC,OACEC,EAAAA,IAACC,EAAAA,WAAA,CACE,GAAGL,EACJ,KAAMC,EAAW,OAAS,WAC1B,KAAM,CACJ,CACE,GAAI,IACJ,SAAU,aACV,UACEG,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAML,EAAW,UAAY,MAC7B,QAASC,EACT,UAAU,gBAAA,CAAA,CACZ,CAEJ,CACF,CAAA,CAGN"}
1
+ {"version":3,"file":"components-input-password-input-password.cjs","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-off\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":"o5DAIO,MAAMA,EAA8C,CAAC,CAAE,GAAGC,KAAW,CAC1E,KAAM,CAAE,SAAAC,EAAU,YAAAC,CAAA,EAAgBC,mBAAA,EAElC,OACEC,EAAAA,IAACC,EAAAA,WAAA,CACE,GAAGL,EACJ,KAAMC,EAAW,OAAS,WAC1B,KAAM,CACJ,CACE,GAAI,IACJ,SAAU,aACV,UACEG,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAML,EAAW,UAAY,MAC7B,QAASC,EACT,UAAU,gBAAA,CAAA,CACZ,CAEJ,CACF,CAAA,CAGN"}
@@ -37,7 +37,8 @@ import "./lodash-FemA_LCk.js";
37
37
  import "./chart-D15EtNmb.js";
38
38
  import "./index-C4iHL8Gs.js";
39
39
  import "./index-C6N9aMq_.js";
40
- const U = ({ ...p }) => {
40
+ import "./components-input-phone-input-phone.js";
41
+ const V = ({ ...p }) => {
41
42
  const { isOpened: o, togglePopup: r } = m();
42
43
  return /* @__PURE__ */ t(
43
44
  e,
@@ -62,6 +63,6 @@ const U = ({ ...p }) => {
62
63
  );
63
64
  };
64
65
  export {
65
- U as InputPassword
66
+ V as InputPassword
66
67
  };
67
68
  //# sourceMappingURL=components-input-password-input-password.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-input-password-input-password.js","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-off\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAMA,IAA8C,CAAC,EAAE,GAAGC,QAAW;AAC1E,QAAM,EAAE,UAAAC,GAAU,aAAAC,EAAA,IAAgBC,EAAA;AAElC,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGL;AAAA,MACJ,MAAMC,IAAW,SAAS;AAAA,MAC1B,MAAM;AAAA,QACJ;AAAA,UACE,IAAI;AAAA,UACJ,UAAU;AAAA,UACV,WACE,gBAAAG;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAML,IAAW,YAAY;AAAA,cAC7B,SAASC;AAAA,cACT,WAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ;AAAA,MAEJ;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"components-input-password-input-password.js","sources":["../src/components/input-password/input-password.tsx"],"sourcesContent":["import { Icon, InputField, usePopupControls, type InputProps } from \"@/index\";\n\ntype InputPasswordProps = InputProps;\n\nexport const InputPassword: React.FC<InputPasswordProps> = ({ ...rest }) => {\n const { isOpened, togglePopup } = usePopupControls();\n\n return (\n <InputField\n {...rest}\n type={isOpened ? \"text\" : \"password\"}\n date={[\n {\n id: \"0\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"eye-off\" : \"eye\"}\n onClick={togglePopup}\n className=\"cursor-pointer\"\n />\n ),\n },\n ]}\n />\n );\n};\n\nexport type { InputPasswordProps };\n"],"names":["InputPassword","rest","isOpened","togglePopup","usePopupControls","jsx","InputField","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,MAAMA,IAA8C,CAAC,EAAE,GAAGC,QAAW;AAC1E,QAAM,EAAE,UAAAC,GAAU,aAAAC,EAAA,IAAgBC,EAAA;AAElC,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGL;AAAA,MACJ,MAAMC,IAAW,SAAS;AAAA,MAC1B,MAAM;AAAA,QACJ;AAAA,UACE,IAAI;AAAA,UACJ,UAAU;AAAA,UACV,WACE,gBAAAG;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAML,IAAW,YAAY;AAAA,cAC7B,SAASC;AAAA,cACT,WAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ;AAAA,MAEJ;AAAA,IACF;AAAA,EAAA;AAGN;"}