brd-ui-kit 0.1.86 → 0.1.88

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.
@@ -13,6 +13,7 @@ type Props = {
13
13
  body?: string;
14
14
  footer?: string;
15
15
  title?: string;
16
+ overlay?: string;
16
17
  };
17
18
  children: React.ReactNode;
18
19
  footer?: React.ReactNode;
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
2
  import { cardInfoHeaderVariants } from './card-info.styles';
3
3
  export interface CardInfoProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title" | "className">, VariantProps<typeof cardInfoHeaderVariants> {
4
- title: string;
4
+ title?: string;
5
5
  headerComponent?: React.ReactNode;
6
6
  children: React.ReactNode;
7
7
  className?: {
@@ -5,6 +5,7 @@ import * as DialogPrimitive from "@radix-ui/react-dialog";
5
5
  type DialogOverlayProps = ComponentPropsWithRef<typeof DialogPrimitive.Overlay>;
6
6
  type DialogContentProps = ComponentPropsWithRef<typeof DialogPrimitive.Content> & {
7
7
  showCloseButton?: boolean;
8
+ overlayClassName?: string;
8
9
  } & VariantProps<typeof dialogContentPositionVariants>;
9
10
  type DialogTitleProps = ComponentPropsWithRef<typeof DialogPrimitive.Title>;
10
11
  type DialogDescriptionProps = ComponentPropsWithRef<typeof DialogPrimitive.Description>;
@@ -17,7 +18,7 @@ declare const DialogOverlay: {
17
18
  displayName: string | undefined;
18
19
  };
19
20
  declare const DialogContent: {
20
- ({ className, children, showCloseButton, positionX, positionY, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
21
+ ({ className, overlayClassName, children, showCloseButton, positionX, positionY, ...props }: DialogContentProps): import("react/jsx-runtime").JSX.Element;
21
22
  displayName: string | undefined;
22
23
  };
23
24
  declare const DialogHeader: {
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("class-variance-authority");const n=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");const i=require("./components-ui-dialog-dialog.cjs"),_=({open:a,onOpenChange:r,title:t,cancelLabel:c="Отмена",confirmLabel:s="Ок",onConfirm:d,children:u,classes:o,footer:l,showCloseButton:j=!1,ariaDescribedby:m=void 0,positionX:x,positionY:h})=>{const b=()=>{r(!1)},g=()=>{d?.(),r(!1)},v=l===void 0?e.jsxs(i.DialogFooter,{className:o?.footer,children:[e.jsx(n.Button,{variant:"secondary",onClick:b,children:c}),e.jsx(n.Button,{onClick:g,children:s})]}):l;return e.jsx(i.Dialog,{open:a,onOpenChange:r,children:e.jsxs(i.DialogContent,{"aria-describedby":m,showCloseButton:j,positionX:x,positionY:h,className:o?.content,children:[t&&e.jsx(i.DialogHeader,{className:o?.header,children:e.jsx(i.DialogTitle,{className:o?.title,children:t})}),e.jsx("div",{className:o?.body,children:u}),v]})})};exports.BasicModal=_;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("class-variance-authority");const t=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");const i=require("./components-ui-dialog-dialog.cjs"),y=({open:n,onOpenChange:r,title:l,cancelLabel:c="Отмена",confirmLabel:s="Ок",onConfirm:d,children:u,classes:o,footer:a,showCloseButton:m=!1,ariaDescribedby:j=void 0,positionX:x,positionY:h})=>{const v=()=>{r(!1)},b=()=>{d?.(),r(!1)},g=a===void 0?e.jsxs(i.DialogFooter,{className:o?.footer,children:[e.jsx(t.Button,{variant:"secondary",onClick:v,children:c}),e.jsx(t.Button,{onClick:b,children:s})]}):a;return e.jsx(i.Dialog,{open:n,onOpenChange:r,children:e.jsxs(i.DialogContent,{"aria-describedby":j,showCloseButton:m,positionX:x,positionY:h,className:o?.content,overlayClassName:o?.overlay,children:[l&&e.jsx(i.DialogHeader,{className:o?.header,children:e.jsx(i.DialogTitle,{className:o?.title,children:l})}),e.jsx("div",{className:o?.body,children:u}),g]})})};exports.BasicModal=y;
2
2
  //# sourceMappingURL=components-basic-modal-basic-modal.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-basic-modal-basic-modal.cjs","sources":["../src/components/basic-modal/basic-modal.tsx"],"sourcesContent":["import { type VariantProps } from \"class-variance-authority\";\nimport { Button } from \"../ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../ui/dialog\";\nimport type { dialogContentPositionVariants } from \"../ui/dialog/dialog.styles\";\n\ntype Props = {\n open: boolean;\n onOpenChange: (value: boolean) => void;\n title?: React.ReactNode | string;\n cancelLabel?: string;\n confirmLabel?: string;\n onConfirm?: () => void;\n classes?: {\n content?: string;\n header?: string;\n body?: string;\n footer?: string;\n title?: string;\n };\n children: React.ReactNode;\n footer?: React.ReactNode;\n showCloseButton?: boolean;\n ariaDescribedby?: string;\n} & VariantProps<typeof dialogContentPositionVariants>;\n\nexport const BasicModal = ({\n open,\n onOpenChange,\n title,\n cancelLabel = \"Отмена\",\n confirmLabel = \"Ок\",\n onConfirm,\n children,\n classes,\n footer,\n showCloseButton = false,\n ariaDescribedby = undefined,\n positionX,\n positionY,\n}: Props) => {\n const handleCancelClick = () => {\n onOpenChange(false);\n };\n\n const handleConfirmClick = () => {\n onConfirm?.();\n onOpenChange(false);\n };\n\n const resolvedFooter =\n footer === undefined ? (\n <DialogFooter className={classes?.footer}>\n <Button\n variant=\"secondary\"\n onClick={handleCancelClick}\n >\n {cancelLabel}\n </Button>\n <Button onClick={handleConfirmClick}>{confirmLabel}</Button>\n </DialogFooter>\n ) : (\n footer\n );\n\n return (\n <Dialog\n open={open}\n onOpenChange={onOpenChange}\n >\n <DialogContent\n aria-describedby={ariaDescribedby}\n showCloseButton={showCloseButton}\n positionX={positionX}\n positionY={positionY}\n className={classes?.content}\n >\n {title && (\n <DialogHeader className={classes?.header}>\n <DialogTitle className={classes?.title}>{title}</DialogTitle>\n </DialogHeader>\n )}\n <div className={classes?.body}>{children}</div>\n {resolvedFooter}\n </DialogContent>\n </Dialog>\n );\n};\n"],"names":["BasicModal","open","onOpenChange","title","cancelLabel","confirmLabel","onConfirm","children","classes","footer","showCloseButton","ariaDescribedby","positionX","positionY","handleCancelClick","handleConfirmClick","resolvedFooter","DialogFooter","jsx","Button","Dialog","jsxs","DialogContent","DialogHeader","DialogTitle"],"mappings":"uTA+BaA,EAAa,CAAC,CACzB,KAAAC,EACA,aAAAC,EACA,MAAAC,EACA,YAAAC,EAAc,SACd,aAAAC,EAAe,KACf,UAAAC,EACA,SAAAC,EACA,QAAAC,EACA,OAAAC,EACA,gBAAAC,EAAkB,GAClB,gBAAAC,EAAkB,OAClB,UAAAC,EACA,UAAAC,CACF,IAAa,CACX,MAAMC,EAAoB,IAAM,CAC9BZ,EAAa,EAAK,CACpB,EAEMa,EAAqB,IAAM,CAC/BT,IAAA,EACAJ,EAAa,EAAK,CACpB,EAEMc,EACJP,IAAW,cACRQ,eAAA,CAAa,UAAWT,GAAS,OAChC,SAAA,CAAAU,EAAAA,IAACC,EAAAA,OAAA,CACC,QAAQ,YACR,QAASL,EAER,SAAAV,CAAA,CAAA,EAEHc,EAAAA,IAACC,EAAAA,OAAA,CAAO,QAASJ,EAAqB,SAAAV,CAAA,CAAa,CAAA,CAAA,CACrD,EAEAI,EAGJ,OACES,EAAAA,IAACE,EAAAA,OAAA,CACC,KAAAnB,EACA,aAAAC,EAEA,SAAAmB,EAAAA,KAACC,EAAAA,cAAA,CACC,mBAAkBX,EAClB,gBAAAD,EACA,UAAAE,EACA,UAAAC,EACA,UAAWL,GAAS,QAEnB,SAAA,CAAAL,GACCe,EAAAA,IAACK,eAAA,CAAa,UAAWf,GAAS,OAChC,SAAAU,EAAAA,IAACM,EAAAA,YAAA,CAAY,UAAWhB,GAAS,MAAQ,SAAAL,CAAA,CAAM,EACjD,EAEFe,EAAAA,IAAC,MAAA,CAAI,UAAWV,GAAS,KAAO,SAAAD,EAAS,EACxCS,CAAA,CAAA,CAAA,CACH,CAAA,CAGN"}
1
+ {"version":3,"file":"components-basic-modal-basic-modal.cjs","sources":["../src/components/basic-modal/basic-modal.tsx"],"sourcesContent":["import { type VariantProps } from \"class-variance-authority\";\nimport { Button } from \"../ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../ui/dialog\";\nimport type { dialogContentPositionVariants } from \"../ui/dialog/dialog.styles\";\n\ntype Props = {\n open: boolean;\n onOpenChange: (value: boolean) => void;\n title?: React.ReactNode | string;\n cancelLabel?: string;\n confirmLabel?: string;\n onConfirm?: () => void;\n classes?: {\n content?: string;\n header?: string;\n body?: string;\n footer?: string;\n title?: string;\n overlay?: string;\n };\n children: React.ReactNode;\n footer?: React.ReactNode;\n showCloseButton?: boolean;\n ariaDescribedby?: string;\n} & VariantProps<typeof dialogContentPositionVariants>;\n\nexport const BasicModal = ({\n open,\n onOpenChange,\n title,\n cancelLabel = \"Отмена\",\n confirmLabel = \"Ок\",\n onConfirm,\n children,\n classes,\n footer,\n showCloseButton = false,\n ariaDescribedby = undefined,\n positionX,\n positionY,\n}: Props) => {\n const handleCancelClick = () => {\n onOpenChange(false);\n };\n\n const handleConfirmClick = () => {\n onConfirm?.();\n onOpenChange(false);\n };\n\n const resolvedFooter =\n footer === undefined ? (\n <DialogFooter className={classes?.footer}>\n <Button\n variant=\"secondary\"\n onClick={handleCancelClick}\n >\n {cancelLabel}\n </Button>\n <Button onClick={handleConfirmClick}>{confirmLabel}</Button>\n </DialogFooter>\n ) : (\n footer\n );\n\n return (\n <Dialog\n open={open}\n onOpenChange={onOpenChange}\n >\n <DialogContent\n aria-describedby={ariaDescribedby}\n showCloseButton={showCloseButton}\n positionX={positionX}\n positionY={positionY}\n className={classes?.content}\n overlayClassName={classes?.overlay}\n >\n {title && (\n <DialogHeader className={classes?.header}>\n <DialogTitle className={classes?.title}>{title}</DialogTitle>\n </DialogHeader>\n )}\n <div className={classes?.body}>{children}</div>\n {resolvedFooter}\n </DialogContent>\n </Dialog>\n );\n};\n"],"names":["BasicModal","open","onOpenChange","title","cancelLabel","confirmLabel","onConfirm","children","classes","footer","showCloseButton","ariaDescribedby","positionX","positionY","handleCancelClick","handleConfirmClick","resolvedFooter","DialogFooter","jsx","Button","Dialog","jsxs","DialogContent","DialogHeader","DialogTitle"],"mappings":"uTAgCaA,EAAa,CAAC,CACzB,KAAAC,EACA,aAAAC,EACA,MAAAC,EACA,YAAAC,EAAc,SACd,aAAAC,EAAe,KACf,UAAAC,EACA,SAAAC,EACA,QAAAC,EACA,OAAAC,EACA,gBAAAC,EAAkB,GAClB,gBAAAC,EAAkB,OAClB,UAAAC,EACA,UAAAC,CACF,IAAa,CACX,MAAMC,EAAoB,IAAM,CAC9BZ,EAAa,EAAK,CACpB,EAEMa,EAAqB,IAAM,CAC/BT,IAAA,EACAJ,EAAa,EAAK,CACpB,EAEMc,EACJP,IAAW,cACRQ,eAAA,CAAa,UAAWT,GAAS,OAChC,SAAA,CAAAU,EAAAA,IAACC,EAAAA,OAAA,CACC,QAAQ,YACR,QAASL,EAER,SAAAV,CAAA,CAAA,EAEHc,EAAAA,IAACC,EAAAA,OAAA,CAAO,QAASJ,EAAqB,SAAAV,CAAA,CAAa,CAAA,CAAA,CACrD,EAEAI,EAGJ,OACES,EAAAA,IAACE,EAAAA,OAAA,CACC,KAAAnB,EACA,aAAAC,EAEA,SAAAmB,EAAAA,KAACC,EAAAA,cAAA,CACC,mBAAkBX,EAClB,gBAAAD,EACA,UAAAE,EACA,UAAAC,EACA,UAAWL,GAAS,QACpB,iBAAkBA,GAAS,QAE1B,SAAA,CAAAL,GACCe,EAAAA,IAACK,eAAA,CAAa,UAAWf,GAAS,OAChC,SAAAU,EAAAA,IAACM,EAAAA,YAAA,CAAY,UAAWhB,GAAS,MAAQ,SAAAL,CAAA,CAAM,EACjD,EAEFe,EAAAA,IAAC,MAAA,CAAI,UAAWV,GAAS,KAAO,SAAAD,EAAS,EACxCS,CAAA,CAAA,CAAA,CACH,CAAA,CAGN"}
@@ -1,55 +1,56 @@
1
- import { jsxs as a, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as i } from "react/jsx-runtime";
2
2
  import "class-variance-authority";
3
- import { Button as c } from "./components-ui-button-button.js";
3
+ import { Button as t } from "./components-ui-button-button.js";
4
4
  import "./components-ui-button-button.styles.js";
5
- import { DialogFooter as p, Dialog as b, DialogContent as g, DialogHeader as x, DialogTitle as y } from "./components-ui-dialog-dialog.js";
5
+ import { DialogFooter as k, Dialog as p, DialogContent as b, DialogHeader as g, DialogTitle as x } from "./components-ui-dialog-dialog.js";
6
6
  const M = ({
7
- open: t,
7
+ open: c,
8
8
  onOpenChange: r,
9
9
  title: e,
10
10
  cancelLabel: d = "Отмена",
11
11
  confirmLabel: n = "Ок",
12
12
  onConfirm: m,
13
13
  children: s,
14
- classes: i,
14
+ classes: o,
15
15
  footer: l,
16
16
  showCloseButton: h = !1,
17
17
  ariaDescribedby: f = void 0,
18
18
  positionX: v,
19
19
  positionY: C
20
20
  }) => {
21
- const D = () => {
21
+ const N = () => {
22
22
  r(!1);
23
- }, N = () => {
23
+ }, y = () => {
24
24
  m?.(), r(!1);
25
- }, k = l === void 0 ? /* @__PURE__ */ a(p, { className: i?.footer, children: [
26
- /* @__PURE__ */ o(
27
- c,
25
+ }, D = l === void 0 ? /* @__PURE__ */ a(k, { className: o?.footer, children: [
26
+ /* @__PURE__ */ i(
27
+ t,
28
28
  {
29
29
  variant: "secondary",
30
- onClick: D,
30
+ onClick: N,
31
31
  children: d
32
32
  }
33
33
  ),
34
- /* @__PURE__ */ o(c, { onClick: N, children: n })
34
+ /* @__PURE__ */ i(t, { onClick: y, children: n })
35
35
  ] }) : l;
36
- return /* @__PURE__ */ o(
37
- b,
36
+ return /* @__PURE__ */ i(
37
+ p,
38
38
  {
39
- open: t,
39
+ open: c,
40
40
  onOpenChange: r,
41
41
  children: /* @__PURE__ */ a(
42
- g,
42
+ b,
43
43
  {
44
44
  "aria-describedby": f,
45
45
  showCloseButton: h,
46
46
  positionX: v,
47
47
  positionY: C,
48
- className: i?.content,
48
+ className: o?.content,
49
+ overlayClassName: o?.overlay,
49
50
  children: [
50
- e && /* @__PURE__ */ o(x, { className: i?.header, children: /* @__PURE__ */ o(y, { className: i?.title, children: e }) }),
51
- /* @__PURE__ */ o("div", { className: i?.body, children: s }),
52
- k
51
+ e && /* @__PURE__ */ i(g, { className: o?.header, children: /* @__PURE__ */ i(x, { className: o?.title, children: e }) }),
52
+ /* @__PURE__ */ i("div", { className: o?.body, children: s }),
53
+ D
53
54
  ]
54
55
  }
55
56
  )
@@ -1 +1 @@
1
- {"version":3,"file":"components-basic-modal-basic-modal.js","sources":["../src/components/basic-modal/basic-modal.tsx"],"sourcesContent":["import { type VariantProps } from \"class-variance-authority\";\nimport { Button } from \"../ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../ui/dialog\";\nimport type { dialogContentPositionVariants } from \"../ui/dialog/dialog.styles\";\n\ntype Props = {\n open: boolean;\n onOpenChange: (value: boolean) => void;\n title?: React.ReactNode | string;\n cancelLabel?: string;\n confirmLabel?: string;\n onConfirm?: () => void;\n classes?: {\n content?: string;\n header?: string;\n body?: string;\n footer?: string;\n title?: string;\n };\n children: React.ReactNode;\n footer?: React.ReactNode;\n showCloseButton?: boolean;\n ariaDescribedby?: string;\n} & VariantProps<typeof dialogContentPositionVariants>;\n\nexport const BasicModal = ({\n open,\n onOpenChange,\n title,\n cancelLabel = \"Отмена\",\n confirmLabel = \"Ок\",\n onConfirm,\n children,\n classes,\n footer,\n showCloseButton = false,\n ariaDescribedby = undefined,\n positionX,\n positionY,\n}: Props) => {\n const handleCancelClick = () => {\n onOpenChange(false);\n };\n\n const handleConfirmClick = () => {\n onConfirm?.();\n onOpenChange(false);\n };\n\n const resolvedFooter =\n footer === undefined ? (\n <DialogFooter className={classes?.footer}>\n <Button\n variant=\"secondary\"\n onClick={handleCancelClick}\n >\n {cancelLabel}\n </Button>\n <Button onClick={handleConfirmClick}>{confirmLabel}</Button>\n </DialogFooter>\n ) : (\n footer\n );\n\n return (\n <Dialog\n open={open}\n onOpenChange={onOpenChange}\n >\n <DialogContent\n aria-describedby={ariaDescribedby}\n showCloseButton={showCloseButton}\n positionX={positionX}\n positionY={positionY}\n className={classes?.content}\n >\n {title && (\n <DialogHeader className={classes?.header}>\n <DialogTitle className={classes?.title}>{title}</DialogTitle>\n </DialogHeader>\n )}\n <div className={classes?.body}>{children}</div>\n {resolvedFooter}\n </DialogContent>\n </Dialog>\n );\n};\n"],"names":["BasicModal","open","onOpenChange","title","cancelLabel","confirmLabel","onConfirm","children","classes","footer","showCloseButton","ariaDescribedby","positionX","positionY","handleCancelClick","handleConfirmClick","resolvedFooter","DialogFooter","jsx","Button","Dialog","jsxs","DialogContent","DialogHeader","DialogTitle"],"mappings":";;;;;AA+BO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,cAAAC,IAAe;AAAA,EACf,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,iBAAAC,IAAkB;AAAA,EAClB,WAAAC;AAAA,EACA,WAAAC;AACF,MAAa;AACX,QAAMC,IAAoB,MAAM;AAC9B,IAAAZ,EAAa,EAAK;AAAA,EACpB,GAEMa,IAAqB,MAAM;AAC/B,IAAAT,IAAA,GACAJ,EAAa,EAAK;AAAA,EACpB,GAEMc,IACJP,MAAW,2BACRQ,GAAA,EAAa,WAAWT,GAAS,QAChC,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,SAASL;AAAA,QAER,UAAAV;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAc,EAACC,GAAA,EAAO,SAASJ,GAAqB,UAAAV,EAAA,CAAa;AAAA,EAAA,EAAA,CACrD,IAEAI;AAGJ,SACE,gBAAAS;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,MAAAnB;AAAA,MACA,cAAAC;AAAA,MAEA,UAAA,gBAAAmB;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,oBAAkBX;AAAA,UAClB,iBAAAD;AAAA,UACA,WAAAE;AAAA,UACA,WAAAC;AAAA,UACA,WAAWL,GAAS;AAAA,UAEnB,UAAA;AAAA,YAAAL,KACC,gBAAAe,EAACK,GAAA,EAAa,WAAWf,GAAS,QAChC,UAAA,gBAAAU,EAACM,GAAA,EAAY,WAAWhB,GAAS,OAAQ,UAAAL,EAAA,CAAM,GACjD;AAAA,YAEF,gBAAAe,EAAC,OAAA,EAAI,WAAWV,GAAS,MAAO,UAAAD,GAAS;AAAA,YACxCS;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"components-basic-modal-basic-modal.js","sources":["../src/components/basic-modal/basic-modal.tsx"],"sourcesContent":["import { type VariantProps } from \"class-variance-authority\";\nimport { Button } from \"../ui/button\";\nimport {\n Dialog,\n DialogContent,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"../ui/dialog\";\nimport type { dialogContentPositionVariants } from \"../ui/dialog/dialog.styles\";\n\ntype Props = {\n open: boolean;\n onOpenChange: (value: boolean) => void;\n title?: React.ReactNode | string;\n cancelLabel?: string;\n confirmLabel?: string;\n onConfirm?: () => void;\n classes?: {\n content?: string;\n header?: string;\n body?: string;\n footer?: string;\n title?: string;\n overlay?: string;\n };\n children: React.ReactNode;\n footer?: React.ReactNode;\n showCloseButton?: boolean;\n ariaDescribedby?: string;\n} & VariantProps<typeof dialogContentPositionVariants>;\n\nexport const BasicModal = ({\n open,\n onOpenChange,\n title,\n cancelLabel = \"Отмена\",\n confirmLabel = \"Ок\",\n onConfirm,\n children,\n classes,\n footer,\n showCloseButton = false,\n ariaDescribedby = undefined,\n positionX,\n positionY,\n}: Props) => {\n const handleCancelClick = () => {\n onOpenChange(false);\n };\n\n const handleConfirmClick = () => {\n onConfirm?.();\n onOpenChange(false);\n };\n\n const resolvedFooter =\n footer === undefined ? (\n <DialogFooter className={classes?.footer}>\n <Button\n variant=\"secondary\"\n onClick={handleCancelClick}\n >\n {cancelLabel}\n </Button>\n <Button onClick={handleConfirmClick}>{confirmLabel}</Button>\n </DialogFooter>\n ) : (\n footer\n );\n\n return (\n <Dialog\n open={open}\n onOpenChange={onOpenChange}\n >\n <DialogContent\n aria-describedby={ariaDescribedby}\n showCloseButton={showCloseButton}\n positionX={positionX}\n positionY={positionY}\n className={classes?.content}\n overlayClassName={classes?.overlay}\n >\n {title && (\n <DialogHeader className={classes?.header}>\n <DialogTitle className={classes?.title}>{title}</DialogTitle>\n </DialogHeader>\n )}\n <div className={classes?.body}>{children}</div>\n {resolvedFooter}\n </DialogContent>\n </Dialog>\n );\n};\n"],"names":["BasicModal","open","onOpenChange","title","cancelLabel","confirmLabel","onConfirm","children","classes","footer","showCloseButton","ariaDescribedby","positionX","positionY","handleCancelClick","handleConfirmClick","resolvedFooter","DialogFooter","jsx","Button","Dialog","jsxs","DialogContent","DialogHeader","DialogTitle"],"mappings":";;;;;AAgCO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,cAAAC,IAAe;AAAA,EACf,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,iBAAAC,IAAkB;AAAA,EAClB,WAAAC;AAAA,EACA,WAAAC;AACF,MAAa;AACX,QAAMC,IAAoB,MAAM;AAC9B,IAAAZ,EAAa,EAAK;AAAA,EACpB,GAEMa,IAAqB,MAAM;AAC/B,IAAAT,IAAA,GACAJ,EAAa,EAAK;AAAA,EACpB,GAEMc,IACJP,MAAW,2BACRQ,GAAA,EAAa,WAAWT,GAAS,QAChC,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,SAAQ;AAAA,QACR,SAASL;AAAA,QAER,UAAAV;AAAA,MAAA;AAAA,IAAA;AAAA,IAEH,gBAAAc,EAACC,GAAA,EAAO,SAASJ,GAAqB,UAAAV,EAAA,CAAa;AAAA,EAAA,EAAA,CACrD,IAEAI;AAGJ,SACE,gBAAAS;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,MAAAnB;AAAA,MACA,cAAAC;AAAA,MAEA,UAAA,gBAAAmB;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,oBAAkBX;AAAA,UAClB,iBAAAD;AAAA,UACA,WAAAE;AAAA,UACA,WAAAC;AAAA,UACA,WAAWL,GAAS;AAAA,UACpB,kBAAkBA,GAAS;AAAA,UAE1B,UAAA;AAAA,YAAAL,KACC,gBAAAe,EAACK,GAAA,EAAa,WAAWf,GAAS,QAChC,UAAA,gBAAAU,EAACM,GAAA,EAAY,WAAWhB,GAAS,OAAQ,UAAAL,EAAA,CAAM,GACjD;AAAA,YAEF,gBAAAe,EAAC,OAAA,EAAI,WAAWV,GAAS,MAAO,UAAAD,GAAS;AAAA,YACxCS;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;"}
@@ -1 +1 @@
1
- {"version":3,"file":"components-card-info-card-info.cjs","sources":["../src/components/card-info/card-info.tsx"],"sourcesContent":["import type { VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { Card } from \"../ui/card\";\nimport { Typography } from \"../ui/typography\";\nimport {\n cardInfoContentVariants,\n cardInfoHeaderVariants,\n cardInfoLeftBorderVariants,\n cardInfoVariants,\n} from \"./card-info.styles\";\n\nexport interface CardInfoProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"className\">,\n VariantProps<typeof cardInfoHeaderVariants> {\n title: string;\n headerComponent?: React.ReactNode;\n children: React.ReactNode;\n className?: {\n borderLeft?: string;\n headerBackground?: string;\n card?: string;\n content?: string;\n };\n}\n\nexport const CardInfo = ({\n className,\n title,\n headerComponent,\n children,\n accent,\n size,\n ...props\n}: CardInfoProps) => {\n return (\n <Card\n className={cn(cardInfoVariants(), className?.card)}\n {...props}\n >\n <div\n className={cn(cardInfoLeftBorderVariants({ accent }), className?.borderLeft)}\n />\n\n <div\n className={cn(\n cardInfoHeaderVariants({ accent, size }),\n className?.headerBackground,\n )}\n >\n {headerComponent ? (\n headerComponent\n ) : (\n <Typography variant=\"body-lg-semibold\">{title}</Typography>\n )}\n </div>\n\n <div className={cn(cardInfoContentVariants(), className?.content)}>{children}</div>\n </Card>\n );\n};\n"],"names":["CardInfo","className","title","headerComponent","children","accent","size","props","jsxs","Card","cn","cardInfoVariants","jsx","cardInfoLeftBorderVariants","cardInfoHeaderVariants","Typography","cardInfoContentVariants"],"mappings":"+WA0BaA,EAAW,CAAC,CACvB,UAAAC,EACA,MAAAC,EACA,gBAAAC,EACA,SAAAC,EACA,OAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAEIC,EAAAA,KAACC,EAAAA,KAAA,CACC,UAAWC,EAAAA,GAAGC,EAAAA,mBAAoBV,GAAW,IAAI,EAChD,GAAGM,EAEJ,SAAA,CAAAK,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,GAAGG,EAAAA,2BAA2B,CAAE,OAAAR,EAAQ,EAAGJ,GAAW,UAAU,CAAA,CAAA,EAG7EW,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,GACTI,yBAAuB,CAAE,OAAAT,EAAQ,KAAAC,EAAM,EACvCL,GAAW,gBAAA,EAGZ,YAGCW,MAACG,EAAAA,WAAA,CAAW,QAAQ,mBAAoB,SAAAb,CAAA,CAAM,CAAA,CAAA,EAIlDU,MAAC,OAAI,UAAWF,EAAAA,GAAGM,EAAAA,0BAA2Bf,GAAW,OAAO,EAAI,SAAAG,CAAA,CAAS,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"components-card-info-card-info.cjs","sources":["../src/components/card-info/card-info.tsx"],"sourcesContent":["import type { VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { Card } from \"../ui/card\";\nimport { Typography } from \"../ui/typography\";\nimport {\n cardInfoContentVariants,\n cardInfoHeaderVariants,\n cardInfoLeftBorderVariants,\n cardInfoVariants,\n} from \"./card-info.styles\";\n\nexport interface CardInfoProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"className\">,\n VariantProps<typeof cardInfoHeaderVariants> {\n title?: string;\n headerComponent?: React.ReactNode;\n children: React.ReactNode;\n className?: {\n borderLeft?: string;\n headerBackground?: string;\n card?: string;\n content?: string;\n };\n}\n\nexport const CardInfo = ({\n className,\n title,\n headerComponent,\n children,\n accent,\n size,\n ...props\n}: CardInfoProps) => {\n return (\n <Card\n className={cn(cardInfoVariants(), className?.card)}\n {...props}\n >\n <div\n className={cn(cardInfoLeftBorderVariants({ accent }), className?.borderLeft)}\n />\n\n <div\n className={cn(\n cardInfoHeaderVariants({ accent, size }),\n className?.headerBackground,\n )}\n >\n {headerComponent ? (\n headerComponent\n ) : (\n <Typography variant=\"body-lg-semibold\">{title}</Typography>\n )}\n </div>\n\n <div className={cn(cardInfoContentVariants(), className?.content)}>{children}</div>\n </Card>\n );\n};\n"],"names":["CardInfo","className","title","headerComponent","children","accent","size","props","jsxs","Card","cn","cardInfoVariants","jsx","cardInfoLeftBorderVariants","cardInfoHeaderVariants","Typography","cardInfoContentVariants"],"mappings":"+WA0BaA,EAAW,CAAC,CACvB,UAAAC,EACA,MAAAC,EACA,gBAAAC,EACA,SAAAC,EACA,OAAAC,EACA,KAAAC,EACA,GAAGC,CACL,IAEIC,EAAAA,KAACC,EAAAA,KAAA,CACC,UAAWC,EAAAA,GAAGC,EAAAA,mBAAoBV,GAAW,IAAI,EAChD,GAAGM,EAEJ,SAAA,CAAAK,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,GAAGG,EAAAA,2BAA2B,CAAE,OAAAR,EAAQ,EAAGJ,GAAW,UAAU,CAAA,CAAA,EAG7EW,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,GACTI,yBAAuB,CAAE,OAAAT,EAAQ,KAAAC,EAAM,EACvCL,GAAW,gBAAA,EAGZ,YAGCW,MAACG,EAAAA,WAAA,CAAW,QAAQ,mBAAoB,SAAAb,CAAA,CAAM,CAAA,CAAA,EAIlDU,MAAC,OAAI,UAAWF,EAAAA,GAAGM,EAAAA,0BAA2Bf,GAAW,OAAO,EAAI,SAAAG,CAAA,CAAS,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"components-card-info-card-info.js","sources":["../src/components/card-info/card-info.tsx"],"sourcesContent":["import type { VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { Card } from \"../ui/card\";\nimport { Typography } from \"../ui/typography\";\nimport {\n cardInfoContentVariants,\n cardInfoHeaderVariants,\n cardInfoLeftBorderVariants,\n cardInfoVariants,\n} from \"./card-info.styles\";\n\nexport interface CardInfoProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"className\">,\n VariantProps<typeof cardInfoHeaderVariants> {\n title: string;\n headerComponent?: React.ReactNode;\n children: React.ReactNode;\n className?: {\n borderLeft?: string;\n headerBackground?: string;\n card?: string;\n content?: string;\n };\n}\n\nexport const CardInfo = ({\n className,\n title,\n headerComponent,\n children,\n accent,\n size,\n ...props\n}: CardInfoProps) => {\n return (\n <Card\n className={cn(cardInfoVariants(), className?.card)}\n {...props}\n >\n <div\n className={cn(cardInfoLeftBorderVariants({ accent }), className?.borderLeft)}\n />\n\n <div\n className={cn(\n cardInfoHeaderVariants({ accent, size }),\n className?.headerBackground,\n )}\n >\n {headerComponent ? (\n headerComponent\n ) : (\n <Typography variant=\"body-lg-semibold\">{title}</Typography>\n )}\n </div>\n\n <div className={cn(cardInfoContentVariants(), className?.content)}>{children}</div>\n </Card>\n );\n};\n"],"names":["CardInfo","className","title","headerComponent","children","accent","size","props","jsxs","Card","cn","cardInfoVariants","jsx","cardInfoLeftBorderVariants","cardInfoHeaderVariants","Typography","cardInfoContentVariants"],"mappings":";;;;;;AA0BO,MAAMA,IAAW,CAAC;AAAA,EACvB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAGC,KAAoBV,GAAW,IAAI;AAAA,IAChD,GAAGM;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAK;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWF,EAAGG,EAA2B,EAAE,QAAAR,GAAQ,GAAGJ,GAAW,UAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAG7E,gBAAAW;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWF;AAAA,YACTI,EAAuB,EAAE,QAAAT,GAAQ,MAAAC,GAAM;AAAA,YACvCL,GAAW;AAAA,UAAA;AAAA,UAGZ,eAGC,gBAAAW,EAACG,GAAA,EAAW,SAAQ,oBAAoB,UAAAb,EAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAIlD,gBAAAU,EAAC,SAAI,WAAWF,EAAGM,KAA2Bf,GAAW,OAAO,GAAI,UAAAG,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"components-card-info-card-info.js","sources":["../src/components/card-info/card-info.tsx"],"sourcesContent":["import type { VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\nimport { Card } from \"../ui/card\";\nimport { Typography } from \"../ui/typography\";\nimport {\n cardInfoContentVariants,\n cardInfoHeaderVariants,\n cardInfoLeftBorderVariants,\n cardInfoVariants,\n} from \"./card-info.styles\";\n\nexport interface CardInfoProps\n extends\n Omit<React.HTMLAttributes<HTMLDivElement>, \"title\" | \"className\">,\n VariantProps<typeof cardInfoHeaderVariants> {\n title?: string;\n headerComponent?: React.ReactNode;\n children: React.ReactNode;\n className?: {\n borderLeft?: string;\n headerBackground?: string;\n card?: string;\n content?: string;\n };\n}\n\nexport const CardInfo = ({\n className,\n title,\n headerComponent,\n children,\n accent,\n size,\n ...props\n}: CardInfoProps) => {\n return (\n <Card\n className={cn(cardInfoVariants(), className?.card)}\n {...props}\n >\n <div\n className={cn(cardInfoLeftBorderVariants({ accent }), className?.borderLeft)}\n />\n\n <div\n className={cn(\n cardInfoHeaderVariants({ accent, size }),\n className?.headerBackground,\n )}\n >\n {headerComponent ? (\n headerComponent\n ) : (\n <Typography variant=\"body-lg-semibold\">{title}</Typography>\n )}\n </div>\n\n <div className={cn(cardInfoContentVariants(), className?.content)}>{children}</div>\n </Card>\n );\n};\n"],"names":["CardInfo","className","title","headerComponent","children","accent","size","props","jsxs","Card","cn","cardInfoVariants","jsx","cardInfoLeftBorderVariants","cardInfoHeaderVariants","Typography","cardInfoContentVariants"],"mappings":";;;;;;AA0BO,MAAMA,IAAW,CAAC;AAAA,EACvB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAGC,KAAoBV,GAAW,IAAI;AAAA,IAChD,GAAGM;AAAA,IAEJ,UAAA;AAAA,MAAA,gBAAAK;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWF,EAAGG,EAA2B,EAAE,QAAAR,GAAQ,GAAGJ,GAAW,UAAU;AAAA,QAAA;AAAA,MAAA;AAAA,MAG7E,gBAAAW;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAWF;AAAA,YACTI,EAAuB,EAAE,QAAAT,GAAQ,MAAAC,GAAM;AAAA,YACvCL,GAAW;AAAA,UAAA;AAAA,UAGZ,eAGC,gBAAAW,EAACG,GAAA,EAAW,SAAQ,oBAAoB,UAAAb,EAAA,CAAM;AAAA,QAAA;AAAA,MAAA;AAAA,MAIlD,gBAAAU,EAAC,SAAI,WAAWF,EAAGM,KAA2Bf,GAAW,OAAO,GAAI,UAAAG,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA;AAAA;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("./utils-get-validation-state.cjs"),M=require("react"),d=require("./index.esm-ZdO9UZ3G.cjs"),T=require("./components-input-contact-input-contact.cjs"),V="+7 (000) 000-00-00",j=({name:e,rules:g,...s})=>{const[S,u]=M.useState(!1),{control:m,formState:{errors:c,touchedFields:f,isSubmitted:F},setValue:i,clearErrors:y}=d.useFormContext(),a=t=>t.replace(/\D/g,"").length>1,P=t=>{i(`${e}.type`,t),i(`${e}.value`,""),y()};return p.jsx(d.Controller,{name:`${e}.value`,rules:g,control:m,render:({field:{onChange:t,onBlur:h,value:n="",ref:l}})=>{const C=c[e].value?.message,r=typeof n=="string"?n:String(n??""),[_,q]=E.getValidationState(e,r,c,f,F,C),x=S||a(r);return p.jsx(T.InputContact,{...s,inputProps:{ref:l,onChange:t},inputPhoneProps:{mask:V,unmask:!1,lazy:!x,type:"tel",inputRef:l,onAccept:t,onFocus:o=>{u(!0),s.onFocus?.(o)},onBlur:o=>{a(o.currentTarget.value)||t(""),u(!1),h(),s.onBlur?.(o)}},onTypeChange:P,isValid:_,description:q,name:e,value:r})}})};exports.FormContactInput=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("react/jsx-runtime"),E=require("./utils-get-validation-state.cjs"),M=require("react"),d=require("./index.esm-ZdO9UZ3G.cjs"),T=require("./components-input-contact-input-contact.cjs"),V="+7 (000) 000-00-00",j=({name:e,rules:g,...s})=>{const[S,u]=M.useState(!1),{control:m,formState:{errors:c,touchedFields:f,isSubmitted:F},setValue:i,clearErrors:y}=d.useFormContext(),a=t=>t.replace(/\D/g,"").length>1,P=t=>{i(`${e}.type`,t),i(`${e}.value`,""),y()};return p.jsx(d.Controller,{name:`${e}.value`,rules:g,control:m,render:({field:{onChange:t,onBlur:h,value:n="",ref:l}})=>{const C=c[e]?.value?.message,r=typeof n=="string"?n:String(n??""),[_,q]=E.getValidationState(e,r,c,f,F,C),x=S||a(r);return p.jsx(T.InputContact,{...s,inputProps:{ref:l,onChange:t},inputPhoneProps:{mask:V,unmask:!1,lazy:!x,type:"tel",inputRef:l,onAccept:t,onFocus:o=>{u(!0),s.onFocus?.(o)},onBlur:o=>{a(o.currentTarget.value)||t(""),u(!1),h(),s.onBlur?.(o)}},onTypeChange:P,isValid:_,description:q,name:e,value:r})}})};exports.FormContactInput=j;
2
2
  //# sourceMappingURL=components-forms-form-contact-input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-forms-form-contact-input.cjs","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError }).value?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":"sRAkBMA,EAAqB,qBAEdC,EAAmB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAGC,KAAkB,CACnE,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAC1C,CACJ,QAAAC,EACA,UAAW,CAAE,OAAAC,EAAQ,cAAAC,EAAe,YAAAC,CAAA,EACpC,SAAAC,EACA,YAAAC,CAAA,EACEC,iBAAA,EAEEC,EAAyBC,GAAkBA,EAAM,QAAQ,MAAO,EAAE,EAAE,OAAS,EAE7EC,EAAgBC,GAAyB,CAC7CN,EAAS,GAAGV,CAAI,QAASgB,CAAO,EAChCN,EAAS,GAAGV,CAAI,SAAU,EAAE,EAC5BW,EAAA,CACF,EAEA,OACEM,EAAAA,IAACC,EAAAA,WAAA,CACC,KAAM,GAAGlB,CAAI,SACb,MAAAC,EACA,QAAAK,EACA,OAAQ,CAAC,CAAE,MAAO,CAAE,SAAAa,EAAU,OAAAC,EAAQ,MAAAN,EAAQ,GAAI,IAAAO,CAAA,KAAY,CAC5D,MAAMC,EAAgBf,EAAOP,CAAI,EAA6B,OAAO,QAE/DuB,EAAa,OAAOT,GAAU,SAAWA,EAAQ,OAAOA,GAAS,EAAE,EACnE,CAACU,EAASC,CAAQ,EAAIC,EAAAA,mBAC1B1B,EACAuB,EACAhB,EACAC,EACAC,EACAa,CAAA,EAEIK,EAAiBxB,GAAaU,EAAsBU,CAAU,EAEpE,OACEN,EAAAA,IAACW,EAAAA,aAAA,CACE,GAAG1B,EACJ,WAAY,CACV,IAAAmB,EACA,SAAAF,CAAA,EAEF,gBAAiB,CACf,KAAMrB,EACN,OAAQ,GACR,KAAM,CAAC6B,EACP,KAAM,MACN,SAAUN,EACV,SAAUF,EACV,QAAUU,GAA8C,CACtDzB,EAAa,EAAI,EACjBF,EAAK,UAAU2B,CAAK,CACtB,EACA,OAASA,GAA8C,CAChDhB,EAAsBgB,EAAM,cAAc,KAAK,GAClDV,EAAS,EAAE,EAEbf,EAAa,EAAK,EAClBgB,EAAA,EACAlB,EAAK,SAAS2B,CAAK,CACrB,CAAA,EAEF,aAAAd,EACA,QAAAS,EACA,YAAaC,EACb,KAAAzB,EACA,MAAOuB,CAAA,CAAA,CAGb,CAAA,CAAA,CAGN"}
1
+ {"version":3,"file":"components-forms-form-contact-input.cjs","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError } | undefined)?.value\n ?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":"sRAkBMA,EAAqB,qBAEdC,EAAmB,CAAC,CAAE,KAAAC,EAAM,MAAAC,EAAO,GAAGC,KAAkB,CACnE,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAK,EAC1C,CACJ,QAAAC,EACA,UAAW,CAAE,OAAAC,EAAQ,cAAAC,EAAe,YAAAC,CAAA,EACpC,SAAAC,EACA,YAAAC,CAAA,EACEC,iBAAA,EAEEC,EAAyBC,GAAkBA,EAAM,QAAQ,MAAO,EAAE,EAAE,OAAS,EAE7EC,EAAgBC,GAAyB,CAC7CN,EAAS,GAAGV,CAAI,QAASgB,CAAO,EAChCN,EAAS,GAAGV,CAAI,SAAU,EAAE,EAC5BW,EAAA,CACF,EAEA,OACEM,EAAAA,IAACC,EAAAA,WAAA,CACC,KAAM,GAAGlB,CAAI,SACb,MAAAC,EACA,QAAAK,EACA,OAAQ,CAAC,CAAE,MAAO,CAAE,SAAAa,EAAU,OAAAC,EAAQ,MAAAN,EAAQ,GAAI,IAAAO,CAAA,KAAY,CAC5D,MAAMC,EAAgBf,EAAOP,CAAI,GAA0C,OACvE,QAEEuB,EAAa,OAAOT,GAAU,SAAWA,EAAQ,OAAOA,GAAS,EAAE,EACnE,CAACU,EAASC,CAAQ,EAAIC,EAAAA,mBAC1B1B,EACAuB,EACAhB,EACAC,EACAC,EACAa,CAAA,EAEIK,EAAiBxB,GAAaU,EAAsBU,CAAU,EAEpE,OACEN,EAAAA,IAACW,EAAAA,aAAA,CACE,GAAG1B,EACJ,WAAY,CACV,IAAAmB,EACA,SAAAF,CAAA,EAEF,gBAAiB,CACf,KAAMrB,EACN,OAAQ,GACR,KAAM,CAAC6B,EACP,KAAM,MACN,SAAUN,EACV,SAAUF,EACV,QAAUU,GAA8C,CACtDzB,EAAa,EAAI,EACjBF,EAAK,UAAU2B,CAAK,CACtB,EACA,OAASA,GAA8C,CAChDhB,EAAsBgB,EAAM,cAAc,KAAK,GAClDV,EAAS,EAAE,EAEbf,EAAa,EAAK,EAClBgB,EAAA,EACAlB,EAAK,SAAS2B,CAAK,CACrB,CAAA,EAEF,aAAAd,EACA,QAAAS,EACA,YAAaC,EACb,KAAAzB,EACA,MAAOuB,CAAA,CAAA,CAGb,CAAA,CAAA,CAGN"}
@@ -19,7 +19,7 @@ const I = "+7 (000) 000-00-00", R = ({ name: o, rules: m, ...s }) => {
19
19
  rules: m,
20
20
  control: f,
21
21
  render: ({ field: { onChange: t, onBlur: P, value: e = "", ref: l } }) => {
22
- const y = c[o].value?.message, n = typeof e == "string" ? e : String(e ?? ""), [E, C] = T(
22
+ const y = c[o]?.value?.message, n = typeof e == "string" ? e : String(e ?? ""), [E, C] = T(
23
23
  o,
24
24
  n,
25
25
  c,
@@ -1 +1 @@
1
- {"version":3,"file":"components-forms-form-contact-input.js","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError }).value?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":";;;;;AAkBA,MAAMA,IAAqB,sBAEdC,IAAmB,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,GAAGC,QAAkB;AACnE,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C;AAAA,IACJ,SAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,eAAAC,GAAe,aAAAC,EAAA;AAAA,IACpC,UAAAC;AAAA,IACA,aAAAC;AAAA,EAAA,IACEC,EAAA,GAEEC,IAAwB,CAACC,MAAkBA,EAAM,QAAQ,OAAO,EAAE,EAAE,SAAS,GAE7EC,IAAe,CAACC,MAAyB;AAC7C,IAAAN,EAAS,GAAGV,CAAI,SAASgB,CAAO,GAChCN,EAAS,GAAGV,CAAI,UAAU,EAAE,GAC5BW,EAAA;AAAA,EACF;AAEA,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAM,GAAGlB,CAAI;AAAA,MACb,OAAAC;AAAA,MACA,SAAAK;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAAa,GAAU,QAAAC,GAAQ,OAAAN,IAAQ,IAAI,KAAAO,EAAA,QAAY;AAC5D,cAAMC,IAAgBf,EAAOP,CAAI,EAA6B,OAAO,SAE/DuB,IAAa,OAAOT,KAAU,WAAWA,IAAQ,OAAOA,KAAS,EAAE,GACnE,CAACU,GAASC,CAAQ,IAAIC;AAAA,UAC1B1B;AAAA,UACAuB;AAAA,UACAhB;AAAA,UACAC;AAAA,UACAC;AAAA,UACAa;AAAA,QAAA,GAEIK,IAAiBxB,KAAaU,EAAsBU,CAAU;AAEpE,eACE,gBAAAN;AAAA,UAACW;AAAA,UAAA;AAAA,YACE,GAAG1B;AAAA,YACJ,YAAY;AAAA,cACV,KAAAmB;AAAA,cACA,UAAAF;AAAA,YAAA;AAAA,YAEF,iBAAiB;AAAA,cACf,MAAMrB;AAAA,cACN,QAAQ;AAAA,cACR,MAAM,CAAC6B;AAAA,cACP,MAAM;AAAA,cACN,UAAUN;AAAA,cACV,UAAUF;AAAA,cACV,SAAS,CAACU,MAA8C;AACtD,gBAAAzB,EAAa,EAAI,GACjBF,EAAK,UAAU2B,CAAK;AAAA,cACtB;AAAA,cACA,QAAQ,CAACA,MAA8C;AACrD,gBAAKhB,EAAsBgB,EAAM,cAAc,KAAK,KAClDV,EAAS,EAAE,GAEbf,EAAa,EAAK,GAClBgB,EAAA,GACAlB,EAAK,SAAS2B,CAAK;AAAA,cACrB;AAAA,YAAA;AAAA,YAEF,cAAAd;AAAA,YACA,SAAAS;AAAA,YACA,aAAaC;AAAA,YACb,MAAAzB;AAAA,YACA,OAAOuB;AAAA,UAAA;AAAA,QAAA;AAAA,MAGb;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"components-forms-form-contact-input.js","sources":["../src/components/forms/form-contact-input.tsx"],"sourcesContent":["import { getValidationState } from \"@/utils/get-validation-state\";\nimport { useState } from \"react\";\n\nimport {\n Controller,\n useFormContext,\n type FieldError,\n type RegisterOptions,\n} from \"react-hook-form\";\nimport { InputContact, type TypesChange } from \"../input-contact\";\nimport type { InputProps } from \"../input-field\";\n\ntype Props = Omit<InputProps, \"value\" | \"onChange\" | \"ref\"> & {\n name: string;\n rules?: RegisterOptions;\n disabled?: boolean;\n};\n\nconst PHONE_MASK_PATTERN = \"+7 (000) 000-00-00\";\n\nexport const FormContactInput = ({ name, rules, ...rest }: Props) => {\n const [isFocused, setIsFocused] = useState(false);\n const {\n control,\n formState: { errors, touchedFields, isSubmitted },\n setValue,\n clearErrors,\n } = useFormContext();\n\n const hasEnteredPhoneDigits = (value: string) => value.replace(/\\D/g, \"\").length > 1;\n\n const onTypeChange = (newType: TypesChange) => {\n setValue(`${name}.type`, newType);\n setValue(`${name}.value`, \"\");\n clearErrors();\n };\n\n return (\n <Controller\n name={`${name}.value`}\n rules={rules}\n control={control}\n render={({ field: { onChange, onBlur, value = \"\", ref } }) => {\n const customErrMsg = (errors[name] as { value?: FieldError } | undefined)?.value\n ?.message;\n\n const inputValue = typeof value === \"string\" ? value : String(value ?? \"\");\n const [isValid, errorMsg] = getValidationState(\n name,\n inputValue,\n errors,\n touchedFields,\n isSubmitted,\n customErrMsg,\n );\n const shouldShowMask = isFocused || hasEnteredPhoneDigits(inputValue);\n\n return (\n <InputContact\n {...rest}\n inputProps={{\n ref,\n onChange,\n }}\n inputPhoneProps={{\n mask: PHONE_MASK_PATTERN,\n unmask: false,\n lazy: !shouldShowMask,\n type: \"tel\",\n inputRef: ref,\n onAccept: onChange,\n onFocus: (event: React.FocusEvent<HTMLInputElement>) => {\n setIsFocused(true);\n rest.onFocus?.(event);\n },\n onBlur: (event: React.FocusEvent<HTMLInputElement>) => {\n if (!hasEnteredPhoneDigits(event.currentTarget.value)) {\n onChange(\"\");\n }\n setIsFocused(false);\n onBlur();\n rest.onBlur?.(event);\n },\n }}\n onTypeChange={onTypeChange}\n isValid={isValid}\n description={errorMsg}\n name={name}\n value={inputValue}\n />\n );\n }}\n />\n );\n};\n"],"names":["PHONE_MASK_PATTERN","FormContactInput","name","rules","rest","isFocused","setIsFocused","useState","control","errors","touchedFields","isSubmitted","setValue","clearErrors","useFormContext","hasEnteredPhoneDigits","value","onTypeChange","newType","jsx","Controller","onChange","onBlur","ref","customErrMsg","inputValue","isValid","errorMsg","getValidationState","shouldShowMask","InputContact","event"],"mappings":";;;;;AAkBA,MAAMA,IAAqB,sBAEdC,IAAmB,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,GAAGC,QAAkB;AACnE,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1C;AAAA,IACJ,SAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,GAAQ,eAAAC,GAAe,aAAAC,EAAA;AAAA,IACpC,UAAAC;AAAA,IACA,aAAAC;AAAA,EAAA,IACEC,EAAA,GAEEC,IAAwB,CAACC,MAAkBA,EAAM,QAAQ,OAAO,EAAE,EAAE,SAAS,GAE7EC,IAAe,CAACC,MAAyB;AAC7C,IAAAN,EAAS,GAAGV,CAAI,SAASgB,CAAO,GAChCN,EAAS,GAAGV,CAAI,UAAU,EAAE,GAC5BW,EAAA;AAAA,EACF;AAEA,SACE,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAM,GAAGlB,CAAI;AAAA,MACb,OAAAC;AAAA,MACA,SAAAK;AAAA,MACA,QAAQ,CAAC,EAAE,OAAO,EAAE,UAAAa,GAAU,QAAAC,GAAQ,OAAAN,IAAQ,IAAI,KAAAO,EAAA,QAAY;AAC5D,cAAMC,IAAgBf,EAAOP,CAAI,GAA0C,OACvE,SAEEuB,IAAa,OAAOT,KAAU,WAAWA,IAAQ,OAAOA,KAAS,EAAE,GACnE,CAACU,GAASC,CAAQ,IAAIC;AAAA,UAC1B1B;AAAA,UACAuB;AAAA,UACAhB;AAAA,UACAC;AAAA,UACAC;AAAA,UACAa;AAAA,QAAA,GAEIK,IAAiBxB,KAAaU,EAAsBU,CAAU;AAEpE,eACE,gBAAAN;AAAA,UAACW;AAAA,UAAA;AAAA,YACE,GAAG1B;AAAA,YACJ,YAAY;AAAA,cACV,KAAAmB;AAAA,cACA,UAAAF;AAAA,YAAA;AAAA,YAEF,iBAAiB;AAAA,cACf,MAAMrB;AAAA,cACN,QAAQ;AAAA,cACR,MAAM,CAAC6B;AAAA,cACP,MAAM;AAAA,cACN,UAAUN;AAAA,cACV,UAAUF;AAAA,cACV,SAAS,CAACU,MAA8C;AACtD,gBAAAzB,EAAa,EAAI,GACjBF,EAAK,UAAU2B,CAAK;AAAA,cACtB;AAAA,cACA,QAAQ,CAACA,MAA8C;AACrD,gBAAKhB,EAAsBgB,EAAM,cAAc,KAAK,KAClDV,EAAS,EAAE,GAEbf,EAAa,EAAK,GAClBgB,EAAA,GACAlB,EAAK,SAAS2B,CAAK;AAAA,cACrB;AAAA,YAAA;AAAA,YAEF,cAAAd;AAAA,YACA,SAAAS;AAAA,YACA,aAAaC;AAAA,YACb,MAAAzB;AAAA,YACA,OAAOuB;AAAA,UAAA;AAAA,QAAA;AAAA,MAGb;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),y=require("@radix-ui/react-dialog");require("class-variance-authority");const l=require("./lib-utils.cjs"),C=require("./components-icons-stroke-icon.cjs"),j=require("brd-phosphor-strokes-icons/icons/X"),i=require("./components-ui-dialog-dialog.styles.cjs");function x(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const o=x(y),v=o.Root,O=o.Trigger,c=o.Portal,f=o.Close,r=({className:e,...a})=>s.jsx(o.Overlay,{className:l.cn(...i.dialogOverlayClassNames,e),...a});r.displayName=o.Overlay.displayName;const g=({className:e,children:a,showCloseButton:t=!0,positionX:n,positionY:p,...u})=>s.jsxs(c,{children:[s.jsx(r,{}),s.jsxs(o.Content,{className:l.cn(...i.dialogContentClassNames,i.dialogContentPositionVariants({positionX:n,positionY:p}),e),...u,children:[a,t&&s.jsxs(o.Close,{className:l.cn(...i.dialogCloseClassNames),children:[s.jsx(C.StrokeIcon,{icon:j.X}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]});g.displayName=o.Content.displayName;const d=({className:e,...a})=>s.jsx("div",{className:l.cn(...i.dialogHeaderClassNames,e),...a});d.displayName="DialogHeader";const m=({className:e,...a})=>s.jsx("div",{className:l.cn(...i.dialogFooterClassNames,e),...a});m.displayName="DialogFooter";const D=({className:e,...a})=>s.jsx(o.Title,{className:l.cn(...i.dialogTitleClassNames,e),...a});D.displayName=o.Title.displayName;const N=({className:e,...a})=>s.jsx(o.Description,{className:l.cn(...i.dialogDescriptionClassNames,e),...a});N.displayName=o.Description.displayName;exports.Dialog=v;exports.DialogClose=f;exports.DialogContent=g;exports.DialogDescription=N;exports.DialogFooter=m;exports.DialogHeader=d;exports.DialogOverlay=r;exports.DialogPortal=c;exports.DialogTitle=D;exports.DialogTrigger=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),C=require("@radix-ui/react-dialog");require("class-variance-authority");const l=require("./lib-utils.cjs"),j=require("./components-icons-stroke-icon.cjs"),x=require("brd-phosphor-strokes-icons/icons/X"),i=require("./components-ui-dialog-dialog.styles.cjs");function v(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const s=v(C),O=s.Root,f=s.Trigger,c=s.Portal,T=s.Close,r=({className:e,...a})=>o.jsx(s.Overlay,{className:l.cn(...i.dialogOverlayClassNames,e),...a});r.displayName=s.Overlay.displayName;const g=({className:e,overlayClassName:a,children:t,showCloseButton:n=!0,positionX:p,positionY:u,...y})=>o.jsxs(c,{children:[o.jsx(r,{className:a}),o.jsxs(s.Content,{className:l.cn(...i.dialogContentClassNames,i.dialogContentPositionVariants({positionX:p,positionY:u}),e),...y,children:[t,n&&o.jsxs(s.Close,{className:l.cn(...i.dialogCloseClassNames),children:[o.jsx(j.StrokeIcon,{icon:x.X}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]});g.displayName=s.Content.displayName;const d=({className:e,...a})=>o.jsx("div",{className:l.cn(...i.dialogHeaderClassNames,e),...a});d.displayName="DialogHeader";const m=({className:e,...a})=>o.jsx("div",{className:l.cn(...i.dialogFooterClassNames,e),...a});m.displayName="DialogFooter";const D=({className:e,...a})=>o.jsx(s.Title,{className:l.cn(...i.dialogTitleClassNames,e),...a});D.displayName=s.Title.displayName;const N=({className:e,...a})=>o.jsx(s.Description,{className:l.cn(...i.dialogDescriptionClassNames,e),...a});N.displayName=s.Description.displayName;exports.Dialog=O;exports.DialogClose=T;exports.DialogContent=g;exports.DialogDescription=N;exports.DialogFooter=m;exports.DialogHeader=d;exports.DialogOverlay=r;exports.DialogPortal=c;exports.DialogTitle=D;exports.DialogTrigger=f;
2
2
  //# sourceMappingURL=components-ui-dialog-dialog.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-ui-dialog-dialog.cjs","sources":["../src/components/ui/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport type { ComponentPropsWithRef, HTMLAttributes } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { StrokeIcon } from \"@/components/icons/stroke-icon\";\nimport { X } from \"@/components/icons/X\";\nimport {\n dialogCloseClassNames,\n dialogContentClassNames,\n dialogContentPositionVariants,\n dialogDescriptionClassNames,\n dialogFooterClassNames,\n dialogHeaderClassNames,\n dialogOverlayClassNames,\n dialogTitleClassNames,\n} from \"./dialog.styles\";\n\ntype DialogOverlayProps = ComponentPropsWithRef<typeof DialogPrimitive.Overlay>;\ntype DialogContentProps = ComponentPropsWithRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n} & VariantProps<typeof dialogContentPositionVariants>;\ntype DialogTitleProps = ComponentPropsWithRef<typeof DialogPrimitive.Title>;\ntype DialogDescriptionProps = ComponentPropsWithRef<typeof DialogPrimitive.Description>;\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = ({ className, ...props }: DialogOverlayProps) => (\n <DialogPrimitive.Overlay\n className={cn(...dialogOverlayClassNames, className)}\n {...props}\n />\n);\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = ({\n className,\n children,\n showCloseButton = true,\n positionX,\n positionY,\n ...props\n}: DialogContentProps) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n className={cn(\n ...dialogContentClassNames,\n dialogContentPositionVariants({ positionX, positionY }),\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className={cn(...dialogCloseClassNames)}>\n <StrokeIcon icon={X} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogHeaderClassNames, className)}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogFooterClassNames, className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = ({ className, ...props }: DialogTitleProps) => (\n <DialogPrimitive.Title\n className={cn(...dialogTitleClassNames, className)}\n {...props}\n />\n);\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = ({ className, ...props }: DialogDescriptionProps) => (\n <DialogPrimitive.Description\n className={cn(...dialogDescriptionClassNames, className)}\n {...props}\n />\n);\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","jsx","cn","dialogOverlayClassNames","DialogContent","children","showCloseButton","positionX","positionY","jsxs","dialogContentClassNames","dialogContentPositionVariants","dialogCloseClassNames","StrokeIcon","X","DialogHeader","dialogHeaderClassNames","DialogFooter","dialogFooterClassNames","DialogTitle","dialogTitleClassNames","DialogDescription","dialogDescriptionClassNames"],"mappings":"gpBAyBMA,EAASC,EAAgB,KACzBC,EAAgBD,EAAgB,QAChCE,EAAeF,EAAgB,OAC/BG,EAAcH,EAAgB,MAE9BI,EAAgB,CAAC,CAAE,UAAAC,EAAW,GAAGC,KACrCC,EAAAA,IAACP,EAAgB,QAAhB,CACC,UAAWQ,EAAAA,GAAG,GAAGC,EAAAA,wBAAyBJ,CAAS,EAClD,GAAGC,CAAA,CACN,EAEFF,EAAc,YAAcJ,EAAgB,QAAQ,YAEpD,MAAMU,EAAgB,CAAC,CACrB,UAAAL,EACA,SAAAM,EACA,gBAAAC,EAAkB,GAClB,UAAAC,EACA,UAAAC,EACA,GAAGR,CACL,WACGJ,EAAA,CACC,SAAA,CAAAK,EAAAA,IAACH,EAAA,EAAc,EACfW,EAAAA,KAACf,EAAgB,QAAhB,CACC,UAAWQ,EAAAA,GACT,GAAGQ,EAAAA,wBACHC,gCAA8B,CAAE,UAAAJ,EAAW,UAAAC,EAAW,EACtDT,CAAA,EAED,GAAGC,EAEH,SAAA,CAAAK,EACAC,UACEZ,EAAgB,MAAhB,CAAsB,UAAWQ,KAAG,GAAGU,uBAAqB,EAC3D,SAAA,CAAAX,EAAAA,IAACY,EAAAA,WAAA,CAAW,KAAMC,EAAAA,CAAA,CAAG,EACrBb,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,OAAA,CAAK,CAAA,CAAA,CACjC,CAAA,CAAA,CAAA,CAEJ,CAAA,CACF,EAEFG,EAAc,YAAcV,EAAgB,QAAQ,YAEpD,MAAMqB,EAAe,CAAC,CAAE,UAAAhB,EAAW,GAAGC,KACpCC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,GAAGc,EAAAA,uBAAwBjB,CAAS,EACjD,GAAGC,CAAA,CACN,EAEFe,EAAa,YAAc,eAE3B,MAAME,EAAe,CAAC,CAAE,UAAAlB,EAAW,GAAGC,KACpCC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,GAAGgB,EAAAA,uBAAwBnB,CAAS,EACjD,GAAGC,CAAA,CACN,EAEFiB,EAAa,YAAc,eAE3B,MAAME,EAAc,CAAC,CAAE,UAAApB,EAAW,GAAGC,KACnCC,EAAAA,IAACP,EAAgB,MAAhB,CACC,UAAWQ,EAAAA,GAAG,GAAGkB,EAAAA,sBAAuBrB,CAAS,EAChD,GAAGC,CAAA,CACN,EAEFmB,EAAY,YAAczB,EAAgB,MAAM,YAEhD,MAAM2B,EAAoB,CAAC,CAAE,UAAAtB,EAAW,GAAGC,KACzCC,EAAAA,IAACP,EAAgB,YAAhB,CACC,UAAWQ,EAAAA,GAAG,GAAGoB,EAAAA,4BAA6BvB,CAAS,EACtD,GAAGC,CAAA,CACN,EAEFqB,EAAkB,YAAc3B,EAAgB,YAAY"}
1
+ {"version":3,"file":"components-ui-dialog-dialog.cjs","sources":["../src/components/ui/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport type { ComponentPropsWithRef, HTMLAttributes } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { StrokeIcon } from \"@/components/icons/stroke-icon\";\nimport { X } from \"@/components/icons/X\";\nimport {\n dialogCloseClassNames,\n dialogContentClassNames,\n dialogContentPositionVariants,\n dialogDescriptionClassNames,\n dialogFooterClassNames,\n dialogHeaderClassNames,\n dialogOverlayClassNames,\n dialogTitleClassNames,\n} from \"./dialog.styles\";\n\ntype DialogOverlayProps = ComponentPropsWithRef<typeof DialogPrimitive.Overlay>;\ntype DialogContentProps = ComponentPropsWithRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n overlayClassName?: string;\n} & VariantProps<typeof dialogContentPositionVariants>;\ntype DialogTitleProps = ComponentPropsWithRef<typeof DialogPrimitive.Title>;\ntype DialogDescriptionProps = ComponentPropsWithRef<typeof DialogPrimitive.Description>;\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = ({ className, ...props }: DialogOverlayProps) => (\n <DialogPrimitive.Overlay\n className={cn(...dialogOverlayClassNames, className)}\n {...props}\n />\n);\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = ({\n className,\n overlayClassName,\n children,\n showCloseButton = true,\n positionX,\n positionY,\n ...props\n}: DialogContentProps) => (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n className={cn(\n ...dialogContentClassNames,\n dialogContentPositionVariants({ positionX, positionY }),\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className={cn(...dialogCloseClassNames)}>\n <StrokeIcon icon={X} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogHeaderClassNames, className)}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogFooterClassNames, className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = ({ className, ...props }: DialogTitleProps) => (\n <DialogPrimitive.Title\n className={cn(...dialogTitleClassNames, className)}\n {...props}\n />\n);\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = ({ className, ...props }: DialogDescriptionProps) => (\n <DialogPrimitive.Description\n className={cn(...dialogDescriptionClassNames, className)}\n {...props}\n />\n);\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","jsx","cn","dialogOverlayClassNames","DialogContent","overlayClassName","children","showCloseButton","positionX","positionY","jsxs","dialogContentClassNames","dialogContentPositionVariants","dialogCloseClassNames","StrokeIcon","X","DialogHeader","dialogHeaderClassNames","DialogFooter","dialogFooterClassNames","DialogTitle","dialogTitleClassNames","DialogDescription","dialogDescriptionClassNames"],"mappings":"gpBA0BMA,EAASC,EAAgB,KACzBC,EAAgBD,EAAgB,QAChCE,EAAeF,EAAgB,OAC/BG,EAAcH,EAAgB,MAE9BI,EAAgB,CAAC,CAAE,UAAAC,EAAW,GAAGC,KACrCC,EAAAA,IAACP,EAAgB,QAAhB,CACC,UAAWQ,EAAAA,GAAG,GAAGC,EAAAA,wBAAyBJ,CAAS,EAClD,GAAGC,CAAA,CACN,EAEFF,EAAc,YAAcJ,EAAgB,QAAQ,YAEpD,MAAMU,EAAgB,CAAC,CACrB,UAAAL,EACA,iBAAAM,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,UAAAC,EACA,UAAAC,EACA,GAAGT,CACL,WACGJ,EAAA,CACC,SAAA,CAAAK,EAAAA,IAACH,EAAA,CAAc,UAAWO,CAAA,CAAkB,EAC5CK,EAAAA,KAAChB,EAAgB,QAAhB,CACC,UAAWQ,EAAAA,GACT,GAAGS,EAAAA,wBACHC,gCAA8B,CAAE,UAAAJ,EAAW,UAAAC,EAAW,EACtDV,CAAA,EAED,GAAGC,EAEH,SAAA,CAAAM,EACAC,UACEb,EAAgB,MAAhB,CAAsB,UAAWQ,KAAG,GAAGW,uBAAqB,EAC3D,SAAA,CAAAZ,EAAAA,IAACa,EAAAA,WAAA,CAAW,KAAMC,EAAAA,CAAA,CAAG,EACrBd,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,OAAA,CAAK,CAAA,CAAA,CACjC,CAAA,CAAA,CAAA,CAEJ,CAAA,CACF,EAEFG,EAAc,YAAcV,EAAgB,QAAQ,YAEpD,MAAMsB,EAAe,CAAC,CAAE,UAAAjB,EAAW,GAAGC,KACpCC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,GAAGe,EAAAA,uBAAwBlB,CAAS,EACjD,GAAGC,CAAA,CACN,EAEFgB,EAAa,YAAc,eAE3B,MAAME,EAAe,CAAC,CAAE,UAAAnB,EAAW,GAAGC,KACpCC,EAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GAAG,GAAGiB,EAAAA,uBAAwBpB,CAAS,EACjD,GAAGC,CAAA,CACN,EAEFkB,EAAa,YAAc,eAE3B,MAAME,EAAc,CAAC,CAAE,UAAArB,EAAW,GAAGC,KACnCC,EAAAA,IAACP,EAAgB,MAAhB,CACC,UAAWQ,EAAAA,GAAG,GAAGmB,EAAAA,sBAAuBtB,CAAS,EAChD,GAAGC,CAAA,CACN,EAEFoB,EAAY,YAAc1B,EAAgB,MAAM,YAEhD,MAAM4B,EAAoB,CAAC,CAAE,UAAAvB,EAAW,GAAGC,KACzCC,EAAAA,IAACP,EAAgB,YAAhB,CACC,UAAWQ,EAAAA,GAAG,GAAGqB,EAAAA,4BAA6BxB,CAAS,EACtD,GAAGC,CAAA,CACN,EAEFsB,EAAkB,YAAc5B,EAAgB,YAAY"}
@@ -2,88 +2,89 @@ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import * as a from "@radix-ui/react-dialog";
3
3
  import "class-variance-authority";
4
4
  import { cn as l } from "./lib-utils.js";
5
- import { StrokeIcon as d } from "./components-icons-stroke-icon.js";
5
+ import { StrokeIcon as N } from "./components-icons-stroke-icon.js";
6
6
  import { X as g } from "brd-phosphor-strokes-icons/icons/X";
7
- import { dialogCloseClassNames as N, dialogContentClassNames as p, dialogContentPositionVariants as C, dialogDescriptionClassNames as D, dialogFooterClassNames as y, dialogHeaderClassNames as v, dialogOverlayClassNames as f, dialogTitleClassNames as T } from "./components-ui-dialog-dialog.styles.js";
8
- const V = a.Root, X = a.Trigger, h = a.Portal, b = a.Close, t = ({ className: o, ...s }) => /* @__PURE__ */ e(
7
+ import { dialogCloseClassNames as p, dialogContentClassNames as C, dialogContentPositionVariants as D, dialogDescriptionClassNames as y, dialogFooterClassNames as v, dialogHeaderClassNames as f, dialogOverlayClassNames as T, dialogTitleClassNames as h } from "./components-ui-dialog-dialog.styles.js";
8
+ const X = a.Root, b = a.Trigger, O = a.Portal, q = a.Close, t = ({ className: s, ...o }) => /* @__PURE__ */ e(
9
9
  a.Overlay,
10
10
  {
11
- className: l(...f, o),
12
- ...s
11
+ className: l(...T, s),
12
+ ...o
13
13
  }
14
14
  );
15
15
  t.displayName = a.Overlay.displayName;
16
- const O = ({
17
- className: o,
18
- children: s,
19
- showCloseButton: r = !0,
20
- positionX: m,
21
- positionY: n,
22
- ...c
23
- }) => /* @__PURE__ */ i(h, { children: [
24
- /* @__PURE__ */ e(t, {}),
16
+ const P = ({
17
+ className: s,
18
+ overlayClassName: o,
19
+ children: r,
20
+ showCloseButton: m = !0,
21
+ positionX: n,
22
+ positionY: c,
23
+ ...d
24
+ }) => /* @__PURE__ */ i(O, { children: [
25
+ /* @__PURE__ */ e(t, { className: o }),
25
26
  /* @__PURE__ */ i(
26
27
  a.Content,
27
28
  {
28
29
  className: l(
29
- ...p,
30
- C({ positionX: m, positionY: n }),
31
- o
30
+ ...C,
31
+ D({ positionX: n, positionY: c }),
32
+ s
32
33
  ),
33
- ...c,
34
+ ...d,
34
35
  children: [
35
- s,
36
- r && /* @__PURE__ */ i(a.Close, { className: l(...N), children: [
37
- /* @__PURE__ */ e(d, { icon: g }),
36
+ r,
37
+ m && /* @__PURE__ */ i(a.Close, { className: l(...p), children: [
38
+ /* @__PURE__ */ e(N, { icon: g }),
38
39
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
39
40
  ] })
40
41
  ]
41
42
  }
42
43
  )
43
44
  ] });
44
- O.displayName = a.Content.displayName;
45
- const P = ({ className: o, ...s }) => /* @__PURE__ */ e(
45
+ P.displayName = a.Content.displayName;
46
+ const x = ({ className: s, ...o }) => /* @__PURE__ */ e(
46
47
  "div",
47
48
  {
48
- className: l(...v, o),
49
- ...s
49
+ className: l(...f, s),
50
+ ...o
50
51
  }
51
52
  );
52
- P.displayName = "DialogHeader";
53
- const x = ({ className: o, ...s }) => /* @__PURE__ */ e(
53
+ x.displayName = "DialogHeader";
54
+ const F = ({ className: s, ...o }) => /* @__PURE__ */ e(
54
55
  "div",
55
56
  {
56
- className: l(...y, o),
57
- ...s
57
+ className: l(...v, s),
58
+ ...o
58
59
  }
59
60
  );
60
- x.displayName = "DialogFooter";
61
- const F = ({ className: o, ...s }) => /* @__PURE__ */ e(
61
+ F.displayName = "DialogFooter";
62
+ const H = ({ className: s, ...o }) => /* @__PURE__ */ e(
62
63
  a.Title,
63
64
  {
64
- className: l(...T, o),
65
- ...s
65
+ className: l(...h, s),
66
+ ...o
66
67
  }
67
68
  );
68
- F.displayName = a.Title.displayName;
69
- const H = ({ className: o, ...s }) => /* @__PURE__ */ e(
69
+ H.displayName = a.Title.displayName;
70
+ const j = ({ className: s, ...o }) => /* @__PURE__ */ e(
70
71
  a.Description,
71
72
  {
72
- className: l(...D, o),
73
- ...s
73
+ className: l(...y, s),
74
+ ...o
74
75
  }
75
76
  );
76
- H.displayName = a.Description.displayName;
77
+ j.displayName = a.Description.displayName;
77
78
  export {
78
- V as Dialog,
79
- b as DialogClose,
80
- O as DialogContent,
81
- H as DialogDescription,
82
- x as DialogFooter,
83
- P as DialogHeader,
79
+ X as Dialog,
80
+ q as DialogClose,
81
+ P as DialogContent,
82
+ j as DialogDescription,
83
+ F as DialogFooter,
84
+ x as DialogHeader,
84
85
  t as DialogOverlay,
85
- h as DialogPortal,
86
- F as DialogTitle,
87
- X as DialogTrigger
86
+ O as DialogPortal,
87
+ H as DialogTitle,
88
+ b as DialogTrigger
88
89
  };
89
90
  //# sourceMappingURL=components-ui-dialog-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-ui-dialog-dialog.js","sources":["../src/components/ui/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport type { ComponentPropsWithRef, HTMLAttributes } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { StrokeIcon } from \"@/components/icons/stroke-icon\";\nimport { X } from \"@/components/icons/X\";\nimport {\n dialogCloseClassNames,\n dialogContentClassNames,\n dialogContentPositionVariants,\n dialogDescriptionClassNames,\n dialogFooterClassNames,\n dialogHeaderClassNames,\n dialogOverlayClassNames,\n dialogTitleClassNames,\n} from \"./dialog.styles\";\n\ntype DialogOverlayProps = ComponentPropsWithRef<typeof DialogPrimitive.Overlay>;\ntype DialogContentProps = ComponentPropsWithRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n} & VariantProps<typeof dialogContentPositionVariants>;\ntype DialogTitleProps = ComponentPropsWithRef<typeof DialogPrimitive.Title>;\ntype DialogDescriptionProps = ComponentPropsWithRef<typeof DialogPrimitive.Description>;\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = ({ className, ...props }: DialogOverlayProps) => (\n <DialogPrimitive.Overlay\n className={cn(...dialogOverlayClassNames, className)}\n {...props}\n />\n);\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = ({\n className,\n children,\n showCloseButton = true,\n positionX,\n positionY,\n ...props\n}: DialogContentProps) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n className={cn(\n ...dialogContentClassNames,\n dialogContentPositionVariants({ positionX, positionY }),\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className={cn(...dialogCloseClassNames)}>\n <StrokeIcon icon={X} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogHeaderClassNames, className)}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogFooterClassNames, className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = ({ className, ...props }: DialogTitleProps) => (\n <DialogPrimitive.Title\n className={cn(...dialogTitleClassNames, className)}\n {...props}\n />\n);\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = ({ className, ...props }: DialogDescriptionProps) => (\n <DialogPrimitive.Description\n className={cn(...dialogDescriptionClassNames, className)}\n {...props}\n />\n);\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","jsx","cn","dialogOverlayClassNames","DialogContent","children","showCloseButton","positionX","positionY","jsxs","dialogContentClassNames","dialogContentPositionVariants","dialogCloseClassNames","StrokeIcon","X","DialogHeader","dialogHeaderClassNames","DialogFooter","dialogFooterClassNames","DialogTitle","dialogTitleClassNames","DialogDescription","dialogDescriptionClassNames"],"mappings":";;;;;;;AAyBA,MAAMA,IAASC,EAAgB,MACzBC,IAAgBD,EAAgB,SAChCE,IAAeF,EAAgB,QAC/BG,IAAcH,EAAgB,OAE9BI,IAAgB,CAAC,EAAE,WAAAC,GAAW,GAAGC,QACrC,gBAAAC;AAAA,EAACP,EAAgB;AAAA,EAAhB;AAAA,IACC,WAAWQ,EAAG,GAAGC,GAAyBJ,CAAS;AAAA,IAClD,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMU,IAAgB,CAAC;AAAA,EACrB,WAAAL;AAAA,EACA,UAAAM;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGR;AACL,wBACGJ,GAAA,EACC,UAAA;AAAA,EAAA,gBAAAK,EAACH,GAAA,EAAc;AAAA,EACf,gBAAAW;AAAA,IAACf,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWQ;AAAA,QACT,GAAGQ;AAAA,QACHC,EAA8B,EAAE,WAAAJ,GAAW,WAAAC,GAAW;AAAA,QACtDT;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAK;AAAA,QACAC,uBACEZ,EAAgB,OAAhB,EAAsB,WAAWQ,EAAG,GAAGU,CAAqB,GAC3D,UAAA;AAAA,UAAA,gBAAAX,EAACY,GAAA,EAAW,MAAMC,EAAA,CAAG;AAAA,UACrB,gBAAAb,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,QAAA,EAAA,CACjC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAEJ,EAAA,CACF;AAEFG,EAAc,cAAcV,EAAgB,QAAQ;AAEpD,MAAMqB,IAAe,CAAC,EAAE,WAAAhB,GAAW,GAAGC,QACpC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,GAAGc,GAAwBjB,CAAS;AAAA,IACjD,GAAGC;AAAA,EAAA;AACN;AAEFe,EAAa,cAAc;AAE3B,MAAME,IAAe,CAAC,EAAE,WAAAlB,GAAW,GAAGC,QACpC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,GAAGgB,GAAwBnB,CAAS;AAAA,IACjD,GAAGC;AAAA,EAAA;AACN;AAEFiB,EAAa,cAAc;AAE3B,MAAME,IAAc,CAAC,EAAE,WAAApB,GAAW,GAAGC,QACnC,gBAAAC;AAAA,EAACP,EAAgB;AAAA,EAAhB;AAAA,IACC,WAAWQ,EAAG,GAAGkB,GAAuBrB,CAAS;AAAA,IAChD,GAAGC;AAAA,EAAA;AACN;AAEFmB,EAAY,cAAczB,EAAgB,MAAM;AAEhD,MAAM2B,IAAoB,CAAC,EAAE,WAAAtB,GAAW,GAAGC,QACzC,gBAAAC;AAAA,EAACP,EAAgB;AAAA,EAAhB;AAAA,IACC,WAAWQ,EAAG,GAAGoB,GAA6BvB,CAAS;AAAA,IACtD,GAAGC;AAAA,EAAA;AACN;AAEFqB,EAAkB,cAAc3B,EAAgB,YAAY;"}
1
+ {"version":3,"file":"components-ui-dialog-dialog.js","sources":["../src/components/ui/dialog/dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { type VariantProps } from \"class-variance-authority\";\nimport type { ComponentPropsWithRef, HTMLAttributes } from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { StrokeIcon } from \"@/components/icons/stroke-icon\";\nimport { X } from \"@/components/icons/X\";\nimport {\n dialogCloseClassNames,\n dialogContentClassNames,\n dialogContentPositionVariants,\n dialogDescriptionClassNames,\n dialogFooterClassNames,\n dialogHeaderClassNames,\n dialogOverlayClassNames,\n dialogTitleClassNames,\n} from \"./dialog.styles\";\n\ntype DialogOverlayProps = ComponentPropsWithRef<typeof DialogPrimitive.Overlay>;\ntype DialogContentProps = ComponentPropsWithRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean;\n overlayClassName?: string;\n} & VariantProps<typeof dialogContentPositionVariants>;\ntype DialogTitleProps = ComponentPropsWithRef<typeof DialogPrimitive.Title>;\ntype DialogDescriptionProps = ComponentPropsWithRef<typeof DialogPrimitive.Description>;\n\nconst Dialog = DialogPrimitive.Root;\nconst DialogTrigger = DialogPrimitive.Trigger;\nconst DialogPortal = DialogPrimitive.Portal;\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = ({ className, ...props }: DialogOverlayProps) => (\n <DialogPrimitive.Overlay\n className={cn(...dialogOverlayClassNames, className)}\n {...props}\n />\n);\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = ({\n className,\n overlayClassName,\n children,\n showCloseButton = true,\n positionX,\n positionY,\n ...props\n}: DialogContentProps) => (\n <DialogPortal>\n <DialogOverlay className={overlayClassName} />\n <DialogPrimitive.Content\n className={cn(\n ...dialogContentClassNames,\n dialogContentPositionVariants({ positionX, positionY }),\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className={cn(...dialogCloseClassNames)}>\n <StrokeIcon icon={X} />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogHeaderClassNames, className)}\n {...props}\n />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(...dialogFooterClassNames, className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = ({ className, ...props }: DialogTitleProps) => (\n <DialogPrimitive.Title\n className={cn(...dialogTitleClassNames, className)}\n {...props}\n />\n);\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = ({ className, ...props }: DialogDescriptionProps) => (\n <DialogPrimitive.Description\n className={cn(...dialogDescriptionClassNames, className)}\n {...props}\n />\n);\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"],"names":["Dialog","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","props","jsx","cn","dialogOverlayClassNames","DialogContent","overlayClassName","children","showCloseButton","positionX","positionY","jsxs","dialogContentClassNames","dialogContentPositionVariants","dialogCloseClassNames","StrokeIcon","X","DialogHeader","dialogHeaderClassNames","DialogFooter","dialogFooterClassNames","DialogTitle","dialogTitleClassNames","DialogDescription","dialogDescriptionClassNames"],"mappings":";;;;;;;AA0BA,MAAMA,IAASC,EAAgB,MACzBC,IAAgBD,EAAgB,SAChCE,IAAeF,EAAgB,QAC/BG,IAAcH,EAAgB,OAE9BI,IAAgB,CAAC,EAAE,WAAAC,GAAW,GAAGC,QACrC,gBAAAC;AAAA,EAACP,EAAgB;AAAA,EAAhB;AAAA,IACC,WAAWQ,EAAG,GAAGC,GAAyBJ,CAAS;AAAA,IAClD,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMU,IAAgB,CAAC;AAAA,EACrB,WAAAL;AAAA,EACA,kBAAAM;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGT;AACL,wBACGJ,GAAA,EACC,UAAA;AAAA,EAAA,gBAAAK,EAACH,GAAA,EAAc,WAAWO,EAAA,CAAkB;AAAA,EAC5C,gBAAAK;AAAA,IAAChB,EAAgB;AAAA,IAAhB;AAAA,MACC,WAAWQ;AAAA,QACT,GAAGS;AAAA,QACHC,EAA8B,EAAE,WAAAJ,GAAW,WAAAC,GAAW;AAAA,QACtDV;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAA;AAAA,QAAAM;AAAA,QACAC,uBACEb,EAAgB,OAAhB,EAAsB,WAAWQ,EAAG,GAAGW,CAAqB,GAC3D,UAAA;AAAA,UAAA,gBAAAZ,EAACa,GAAA,EAAW,MAAMC,EAAA,CAAG;AAAA,UACrB,gBAAAd,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,QAAA,EAAA,CACjC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAEJ,EAAA,CACF;AAEFG,EAAc,cAAcV,EAAgB,QAAQ;AAEpD,MAAMsB,IAAe,CAAC,EAAE,WAAAjB,GAAW,GAAGC,QACpC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,GAAGe,GAAwBlB,CAAS;AAAA,IACjD,GAAGC;AAAA,EAAA;AACN;AAEFgB,EAAa,cAAc;AAE3B,MAAME,IAAe,CAAC,EAAE,WAAAnB,GAAW,GAAGC,QACpC,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAG,GAAGiB,GAAwBpB,CAAS;AAAA,IACjD,GAAGC;AAAA,EAAA;AACN;AAEFkB,EAAa,cAAc;AAE3B,MAAME,IAAc,CAAC,EAAE,WAAArB,GAAW,GAAGC,QACnC,gBAAAC;AAAA,EAACP,EAAgB;AAAA,EAAhB;AAAA,IACC,WAAWQ,EAAG,GAAGmB,GAAuBtB,CAAS;AAAA,IAChD,GAAGC;AAAA,EAAA;AACN;AAEFoB,EAAY,cAAc1B,EAAgB,MAAM;AAEhD,MAAM4B,IAAoB,CAAC,EAAE,WAAAvB,GAAW,GAAGC,QACzC,gBAAAC;AAAA,EAACP,EAAgB;AAAA,EAAhB;AAAA,IACC,WAAWQ,EAAG,GAAGqB,GAA6BxB,CAAS;AAAA,IACtD,GAAGC;AAAA,EAAA;AACN;AAEFsB,EAAkB,cAAc5B,EAAgB,YAAY;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brd-ui-kit",
3
- "version": "0.1.86",
3
+ "version": "0.1.88",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.cjs",