@televet/kibble-ui 5.0.10-steve.0 → 5.0.10

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.
@@ -0,0 +1,124 @@
1
+ import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
+ import { useRef as y, useState as P } from "react";
3
+ import { B as l } from "./button.component-BO6oee_V.js";
4
+ import { F as k } from "./flex-CX-8gE9T.js";
5
+ import { D as R, a as $, b as S, c as F, d as w, e as E, f as z, g as H, h as V, i as W, j as A } from "./dialog-B9jifvV4.js";
6
+ import { W as O } from "./heading.component-PFNpLFT7.js";
7
+ import { u as q, P as G } from "./usePortalContentRef-DO_jc4W9.js";
8
+ import { u as J } from "./use-breakpoint-MQ7agQJe.js";
9
+ import { P as K } from "./index-C9UYIjEB.js";
10
+ const L = ({
11
+ children: s,
12
+ destructive: n,
13
+ disabled: r,
14
+ hideCancel: e = !1,
15
+ loading: d,
16
+ loadingText: c,
17
+ onCancel: m,
18
+ onSubmit: u,
19
+ submitText: x = "Submit",
20
+ cancelText: p = "Cancel",
21
+ buttonPosition: f = "space-between",
22
+ ["data-testid"]: o = "kibble-modal-footer",
23
+ ...i
24
+ }) => /* @__PURE__ */ t.jsx(R, { className: "Modal__Footer", "data-testid": o, ...i, children: s || /* @__PURE__ */ t.jsxs(k, { alignItems: "center", justifyContent: f, w: "100%", children: [
25
+ !e && /* @__PURE__ */ t.jsx($, { asChild: !0, className: "Modal__CancelButton", "data-testid": `${o}-cancel-button`, children: /* @__PURE__ */ t.jsx(l, { variant: "tertiary", onClick: m, children: p }) }),
26
+ /* @__PURE__ */ t.jsx(
27
+ l,
28
+ {
29
+ className: "Modal__SubmitButton",
30
+ "data-testid": `${o}-submit-button`,
31
+ onClick: u,
32
+ loading: d,
33
+ loadingText: c,
34
+ disabled: r,
35
+ type: "submit",
36
+ variant: n ? "primaryDestructive" : "primary",
37
+ children: x
38
+ }
39
+ )
40
+ ] }) }), ot = ({
41
+ children: s,
42
+ footerProps: n,
43
+ fullScreenMobile: r = !0,
44
+ header: e,
45
+ headerProps: d,
46
+ hideCloseButton: c = !1,
47
+ closeButtonProps: m,
48
+ hideFooter: u = !1,
49
+ motionPreset: x = "slide-in-bottom",
50
+ placement: p = "center",
51
+ showExpandButton: f = !1,
52
+ size: o = "md",
53
+ trigger: i,
54
+ ["data-testid"]: a = "kibble-modal",
55
+ portalled: j = !0,
56
+ contentProps: h,
57
+ positionerProps: C,
58
+ ..._
59
+ }) => {
60
+ const { contentRef: D } = q(), b = y(null), M = { contentRef: b }, [g, N] = P(!1), B = J({
61
+ base: r ? "full" : o,
62
+ md: o
63
+ });
64
+ return /* @__PURE__ */ t.jsxs(
65
+ S,
66
+ {
67
+ motionPreset: x,
68
+ placement: p,
69
+ size: B,
70
+ expanded: g,
71
+ "data-testid": `${a}-root`,
72
+ ..._,
73
+ children: [
74
+ i && /* @__PURE__ */ t.jsx(F, { asChild: !0, children: i }),
75
+ /* @__PURE__ */ t.jsxs(K, { disabled: !j, container: D || void 0, children: [
76
+ /* @__PURE__ */ t.jsx(w, {}),
77
+ /* @__PURE__ */ t.jsx(E, { ...C, children: /* @__PURE__ */ t.jsx(
78
+ z,
79
+ {
80
+ className: "Modal",
81
+ "data-testid": `${a}-content`,
82
+ ...h,
83
+ ref: b,
84
+ children: /* @__PURE__ */ t.jsxs(G.Provider, { value: M, children: [
85
+ !c && /* @__PURE__ */ t.jsx(H, { asChild: !0, className: "Modal__CloseButton", "data-testid": "kibble-modal-close-button", children: /* @__PURE__ */ t.jsx(l, { iconName: "close", variant: "ghostNeutral", ...m }) }),
86
+ f && /* @__PURE__ */ t.jsx(
87
+ l,
88
+ {
89
+ className: "Modal__ExpandButton",
90
+ "data-testid": `${a}-expand-button`,
91
+ variant: "ghostNeutral",
92
+ iconName: g ? "arrowsIn" : "arrowsOut",
93
+ position: "absolute",
94
+ top: 2,
95
+ right: 12,
96
+ onClick: () => N((v) => !v)
97
+ }
98
+ ),
99
+ /* @__PURE__ */ t.jsx(V, { className: "Modal__Header", "data-testid": `${a}-header`, children: e && /* @__PURE__ */ t.jsx(W, { fontSize: "2xl", className: "Modal__Title", "data-testid": `${a}-title`, asChild: !0, children: typeof e == "string" ? /* @__PURE__ */ t.jsx(O, { p: 0, ...d, children: e }) : e }) }),
100
+ /* @__PURE__ */ t.jsx(A, { className: "Modal__Body", "data-testid": `${a}-body`, children: s }),
101
+ !u && /* @__PURE__ */ t.jsx(L, { ...n })
102
+ ] })
103
+ }
104
+ ) })
105
+ ] })
106
+ ]
107
+ }
108
+ );
109
+ }, at = ["xs", "sm", "md", "lg", "cover", "full"], st = ["center", "top", "bottom"], it = ["inside", "outside"], lt = [
110
+ "scale",
111
+ "slide-in-bottom",
112
+ "slide-in-top",
113
+ "slide-in-left",
114
+ "slide-in-right",
115
+ "none"
116
+ ];
117
+ export {
118
+ ot as M,
119
+ st as a,
120
+ it as b,
121
+ lt as c,
122
+ at as m
123
+ };
124
+ //# sourceMappingURL=modal.types-CVy-QT6f.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.types-CVy-QT6f.js","sources":["../../src/components/Modal/components/ModalFooter/modalFooter.component.tsx","../../src/components/Modal/modal.component.tsx","../../src/components/Modal/modal.types.ts"],"sourcesContent":["import React from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { Button } from 'components/Button/button.component';\n\nexport interface ModalFooterProps extends Dialog.FooterProps {\n /** Content to be rendered in the footer. */\n children?: React.ReactNode;\n /** If true, the submit button will be displayed as a destructive button.\n * @default false\n */\n destructive?: boolean;\n /** If true, the footer will be disabled. */\n disabled?: boolean;\n /** If true, the cancel button will not be displayed.\n * @default false\n */\n hideCancel?: boolean;\n /** If true, the submit button will be displayed with a loading state. */\n loading?: boolean;\n /** Text to display in the loading state. */\n loadingText?: string;\n /** Text to display in the cancel button. */\n cancelText?: string;\n /** Callback function to be called when the cancel button is clicked. */\n onCancel?: () => void;\n /** Callback function to be called when the submit button is clicked. */\n onSubmit?: () => void | Promise<void>;\n /** Text to display in the submit button. */\n submitText?: string;\n /** Position of the buttons.\n * @default space-between\n */\n buttonPosition?: 'start' | 'end' | 'space-between';\n /** Data test id for the footer.\n * @default kibble-modal-footer\n */\n 'data-testid'?: string;\n}\n\nexport const ModalFooter = ({\n children,\n destructive,\n disabled,\n hideCancel = false,\n loading,\n loadingText,\n onCancel,\n onSubmit,\n submitText = 'Submit',\n cancelText = 'Cancel',\n buttonPosition = 'space-between',\n ['data-testid']: dataTestId = 'kibble-modal-footer',\n ...rest\n}: ModalFooterProps): React.JSX.Element => {\n return (\n <Dialog.Footer className=\"Modal__Footer\" data-testid={dataTestId} {...rest}>\n {children ? (\n children\n ) : (\n <Flex alignItems=\"center\" justifyContent={buttonPosition} w=\"100%\">\n {!hideCancel && (\n <Dialog.ActionTrigger asChild className=\"Modal__CancelButton\" data-testid={`${dataTestId}-cancel-button`}>\n <Button variant=\"tertiary\" onClick={onCancel}>\n {cancelText}\n </Button>\n </Dialog.ActionTrigger>\n )}\n <Button\n className=\"Modal__SubmitButton\"\n data-testid={`${dataTestId}-submit-button`}\n onClick={onSubmit}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n type=\"submit\"\n variant={destructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n )}\n </Dialog.Footer>\n );\n};\n","import React, { useRef, useState } from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\nimport { ModalFooter, ModalFooterProps } from './components/ModalFooter/modalFooter.component';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { ModalMotionPreset, ModalPlacement, ModalSize } from './modal.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { useBreakpointValue } from '@chakra-ui/react';\nimport { PortalContext, usePortalContentRef } from 'hooks/usePortalContentRef';\n\nexport interface ModalProps extends Dialog.RootProps {\n /** Props to customize the default footer. If a custom footer is needed, you can use the `children` prop to build your own. */\n footerProps?: ModalFooterProps;\n /**\n * Whether to use full screen on mobile devices.\n * @default true\n */\n fullScreenMobile?: boolean;\n /** The header of the modal. */\n header?: React.ReactNode;\n /** Props to customize the header when passed as a string. */\n headerProps?: HeadingProps;\n /**\n * Whether to hide the close button.\n * @default false\n */\n hideCloseButton?: boolean;\n /** Props to customize the close button. */\n closeButtonProps?: Omit<ButtonProps, 'iconName' | 'onClick'>;\n /**\n * Whether to hide the modal footer.\n * @default false\n */\n hideFooter?: boolean;\n /** The animation preset for the modal.\n * @default slide-in-bottom\n */\n motionPreset?: ModalMotionPreset;\n /** The placement of the modal.\n * @default center\n */\n placement?: ModalPlacement;\n /**\n * Whether to show the expand button.\n * @default false\n */\n showExpandButton?: boolean;\n /** The size of the modal.\n * @default md\n */\n size?: ConditionalValue<ModalSize>;\n /** The element used to open the modal. If no trigger is provided, the modal will need to be controlled with the `open` and `onOpenChange` props. */\n trigger?: React.ReactNode;\n /**\n * Whether to render the modal in a portal. Set to false if this modal is nested inside another modal.\n * @default true\n */\n portalled?: boolean;\n /** Props to customize the content of the modal. */\n contentProps?: Dialog.ContentProps;\n /** Props to customize the positioner of the modal. */\n positionerProps?: Dialog.PositionerProps;\n /** Data test id for the modal.\n * @default kibble-modal\n */\n 'data-testid'?: string;\n}\n\nexport const Modal = ({\n children,\n footerProps,\n fullScreenMobile = true,\n header,\n headerProps,\n hideCloseButton = false,\n closeButtonProps,\n hideFooter = false,\n motionPreset = 'slide-in-bottom',\n placement = 'center',\n showExpandButton = false,\n size = 'md',\n trigger,\n ['data-testid']: dataTestId = 'kibble-modal',\n portalled = true,\n contentProps,\n positionerProps,\n ...rest\n}: ModalProps): React.JSX.Element => {\n const { contentRef: parentContentRef } = usePortalContentRef();\n const modalContentRef = useRef<HTMLDivElement>(null!);\n const contextValue = { contentRef: modalContentRef };\n const [isExpanded, setIsExpanded] = useState(false);\n const computedSize = useBreakpointValue({\n base: fullScreenMobile ? 'full' : size,\n md: size,\n });\n\n return (\n <Dialog.Root\n motionPreset={motionPreset}\n placement={placement}\n size={computedSize}\n expanded={isExpanded}\n data-testid={`${dataTestId}-root`}\n {...rest}\n >\n {trigger && <Dialog.Trigger asChild>{trigger}</Dialog.Trigger>}\n <Portal disabled={!portalled} container={parentContentRef || undefined}>\n <Dialog.Backdrop />\n <Dialog.Positioner {...positionerProps}>\n <Dialog.Content\n className=\"Modal\"\n data-testid={`${dataTestId}-content`}\n {...contentProps}\n ref={modalContentRef}\n >\n <PortalContext.Provider value={contextValue}>\n {!hideCloseButton && (\n <Dialog.CloseTrigger asChild className=\"Modal__CloseButton\" data-testid=\"kibble-modal-close-button\">\n <Button iconName=\"close\" variant=\"ghostNeutral\" {...closeButtonProps} />\n </Dialog.CloseTrigger>\n )}\n {showExpandButton && (\n <Button\n className=\"Modal__ExpandButton\"\n data-testid={`${dataTestId}-expand-button`}\n variant=\"ghostNeutral\"\n iconName={isExpanded ? 'arrowsIn' : 'arrowsOut'}\n position=\"absolute\"\n top={2}\n right={12}\n onClick={() => setIsExpanded((prev) => !prev)}\n />\n )}\n <Dialog.Header className=\"Modal__Header\" data-testid={`${dataTestId}-header`}>\n {header && (\n <Dialog.Title fontSize=\"2xl\" className=\"Modal__Title\" data-testid={`${dataTestId}-title`} asChild>\n {typeof header === 'string' ? (\n <Heading p={0} {...headerProps}>\n {header}\n </Heading>\n ) : (\n header\n )}\n </Dialog.Title>\n )}\n </Dialog.Header>\n <Dialog.Body className=\"Modal__Body\" data-testid={`${dataTestId}-body`}>\n {children}\n </Dialog.Body>\n {!hideFooter && <ModalFooter {...footerProps} />}\n </PortalContext.Provider>\n </Dialog.Content>\n </Dialog.Positioner>\n </Portal>\n </Dialog.Root>\n );\n};\n","export const modalSizes = ['xs', 'sm', 'md', 'lg', 'cover', 'full'] as const;\nexport type ModalSize = (typeof modalSizes)[number];\n\nexport const modalPlacements = ['center', 'top', 'bottom'] as const;\nexport type ModalPlacement = (typeof modalPlacements)[number];\n\nexport const modalScrollBehaviors = ['inside', 'outside'] as const;\nexport type ModalScrollBehavior = (typeof modalScrollBehaviors)[number];\n\nexport const modalMotionPresets = [\n 'scale',\n 'slide-in-bottom',\n 'slide-in-top',\n 'slide-in-left',\n 'slide-in-right',\n 'none',\n] as const;\nexport type ModalMotionPreset = (typeof modalMotionPresets)[number];\n"],"names":["ModalFooter","children","destructive","disabled","hideCancel","loading","loadingText","onCancel","onSubmit","submitText","cancelText","buttonPosition","dataTestId","rest","Dialog.Footer","Flex","Dialog.ActionTrigger","Button","jsx","Modal","footerProps","fullScreenMobile","header","headerProps","hideCloseButton","closeButtonProps","hideFooter","motionPreset","placement","showExpandButton","size","trigger","portalled","contentProps","positionerProps","parentContentRef","usePortalContentRef","modalContentRef","useRef","contextValue","isExpanded","setIsExpanded","useState","computedSize","useBreakpointValue","jsxs","Dialog.Root","Dialog.Trigger","Portal","Dialog.Backdrop","Dialog.Positioner","Dialog.Content","PortalContext","Dialog.CloseTrigger","prev","Dialog.Header","Dialog.Title","Heading","Dialog.Body","modalSizes","modalPlacements","modalScrollBehaviors","modalMotionPresets"],"mappings":";;;;;;;;;AAwCO,MAAMA,IAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,gBAAAC,IAAiB;AAAA,EACjB,CAAC,gBAAgBC,IAAa;AAAA,EAC9B,GAAGC;AACL,4BAEKC,GAAA,EAAc,WAAU,iBAAgB,eAAaF,GAAa,GAAGC,GACnE,UACCZ,4BAECc,GAAK,EAAA,YAAW,UAAS,gBAAgBJ,GAAgB,GAAE,QACzD,UAAA;AAAA,EAAC,CAAAP,2BACCY,GAAA,EAAqB,SAA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,GAAA,EAAQ,GAAG,GAAI,GAAGlC,GAChB,UACHD,GAAA,IAEAA,EAEJ,CAAA,GAEJ;AAAA,gBACAJ,gBAAAA,EAAAA,IAACwC,GAAA,EAAY,WAAU,eAAc,eAAa,GAAG9C,CAAU,SAC5D,UAAAX,GACH;AAAA,gBACC,CAACyB,KAAeR,gBAAAA,EAAA,IAAAlB,GAAA,EAAa,GAAGoB,EAAa,CAAA;AAAA,cAAA,EAChD,CAAA;AAAA,YAAA;AAAA,UAAA,EAEJ,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ,GC9JauC,KAAa,CAAC,MAAM,MAAM,MAAM,MAAM,SAAS,MAAM,GAGrDC,KAAkB,CAAC,UAAU,OAAO,QAAQ,GAG5CC,KAAuB,CAAC,UAAU,SAAS,GAG3CC,KAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const t=require("./jsx-runtime-BjDatQAs.js"),h=require("react"),l=require("./button.component-DjdgBXDC.js"),k=require("./flex-BOU6tYUd.js"),e=require("./dialog-CZFwddWp.js"),q=require("./heading.component-DnoZOXdz.js"),E=require("./usePortalContentRef-CTrvBQ7I.js"),y=require("./use-breakpoint-uBg4-8yY.js"),S=require("./index-Ts8g8jZd.js"),$=({children:i,destructive:r,disabled:d,hideCancel:o=!1,loading:c,loadingText:u,onCancel:x,onSubmit:m,submitText:p="Submit",cancelText:j="Cancel",buttonPosition:R="space-between",["data-testid"]:s="kibble-modal-footer",...a})=>t.jsxRuntimeExports.jsx(e.DialogFooter,{className:"Modal__Footer","data-testid":s,...a,children:i||t.jsxRuntimeExports.jsxs(k.Flex,{alignItems:"center",justifyContent:R,w:"100%",children:[!o&&t.jsxRuntimeExports.jsx(e.DialogActionTrigger,{asChild:!0,className:"Modal__CancelButton","data-testid":`${s}-cancel-button`,children:t.jsxRuntimeExports.jsx(l.Button,{variant:"tertiary",onClick:x,children:j})}),t.jsxRuntimeExports.jsx(l.Button,{className:"Modal__SubmitButton","data-testid":`${s}-submit-button`,onClick:m,loading:c,loadingText:u,disabled:d,type:"submit",variant:r?"primaryDestructive":"primary",children:p})]})}),w=({children:i,footerProps:r,fullScreenMobile:d=!0,header:o,headerProps:c,hideCloseButton:u=!1,closeButtonProps:x,hideFooter:m=!1,motionPreset:p="slide-in-bottom",placement:j="center",showExpandButton:R=!1,size:s="md",trigger:a,["data-testid"]:n="kibble-modal",portalled:f=!0,contentProps:C,positionerProps:_,...B})=>{const{contentRef:M}=E.usePortalContentRef(),g=h.useRef(null),N={contentRef:g},[b,D]=h.useState(!1),v=y.useBreakpointValue({base:d?"full":s,md:s});return t.jsxRuntimeExports.jsxs(e.DialogRoot,{motionPreset:p,placement:j,size:v,expanded:b,"data-testid":`${n}-root`,...B,children:[a&&t.jsxRuntimeExports.jsx(e.DialogTrigger,{asChild:!0,children:a}),t.jsxRuntimeExports.jsxs(S.Portal,{disabled:!f,container:M||void 0,children:[t.jsxRuntimeExports.jsx(e.DialogBackdrop,{}),t.jsxRuntimeExports.jsx(e.DialogPositioner,{..._,children:t.jsxRuntimeExports.jsx(e.DialogContent,{className:"Modal","data-testid":`${n}-content`,...C,ref:g,children:t.jsxRuntimeExports.jsxs(E.PortalContext.Provider,{value:N,children:[!u&&t.jsxRuntimeExports.jsx(e.DialogCloseTrigger,{asChild:!0,className:"Modal__CloseButton","data-testid":"kibble-modal-close-button",children:t.jsxRuntimeExports.jsx(l.Button,{iconName:"close",variant:"ghostNeutral",...x})}),R&&t.jsxRuntimeExports.jsx(l.Button,{className:"Modal__ExpandButton","data-testid":`${n}-expand-button`,variant:"ghostNeutral",iconName:b?"arrowsIn":"arrowsOut",position:"absolute",top:2,right:12,onClick:()=>D(P=>!P)}),t.jsxRuntimeExports.jsx(e.DialogHeader,{className:"Modal__Header","data-testid":`${n}-header`,children:o&&t.jsxRuntimeExports.jsx(e.DialogTitle,{fontSize:"2xl",className:"Modal__Title","data-testid":`${n}-title`,asChild:!0,children:typeof o=="string"?t.jsxRuntimeExports.jsx(q.WrappedHeading,{p:0,...c,children:o}):o})}),t.jsxRuntimeExports.jsx(e.DialogBody,{className:"Modal__Body","data-testid":`${n}-body`,children:i}),!m&&t.jsxRuntimeExports.jsx($,{...r})]})})})]})]})},z=["xs","sm","md","lg","cover","full"],F=["center","top","bottom"],H=["inside","outside"],V=["scale","slide-in-bottom","slide-in-top","slide-in-left","slide-in-right","none"];exports.Modal=w;exports.modalMotionPresets=V;exports.modalPlacements=F;exports.modalScrollBehaviors=H;exports.modalSizes=z;
2
+ //# sourceMappingURL=modal.types-D_t0UdS6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.types-D_t0UdS6.js","sources":["../../src/components/Modal/components/ModalFooter/modalFooter.component.tsx","../../src/components/Modal/modal.component.tsx","../../src/components/Modal/modal.types.ts"],"sourcesContent":["import React from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { Button } from 'components/Button/button.component';\n\nexport interface ModalFooterProps extends Dialog.FooterProps {\n /** Content to be rendered in the footer. */\n children?: React.ReactNode;\n /** If true, the submit button will be displayed as a destructive button.\n * @default false\n */\n destructive?: boolean;\n /** If true, the footer will be disabled. */\n disabled?: boolean;\n /** If true, the cancel button will not be displayed.\n * @default false\n */\n hideCancel?: boolean;\n /** If true, the submit button will be displayed with a loading state. */\n loading?: boolean;\n /** Text to display in the loading state. */\n loadingText?: string;\n /** Text to display in the cancel button. */\n cancelText?: string;\n /** Callback function to be called when the cancel button is clicked. */\n onCancel?: () => void;\n /** Callback function to be called when the submit button is clicked. */\n onSubmit?: () => void | Promise<void>;\n /** Text to display in the submit button. */\n submitText?: string;\n /** Position of the buttons.\n * @default space-between\n */\n buttonPosition?: 'start' | 'end' | 'space-between';\n /** Data test id for the footer.\n * @default kibble-modal-footer\n */\n 'data-testid'?: string;\n}\n\nexport const ModalFooter = ({\n children,\n destructive,\n disabled,\n hideCancel = false,\n loading,\n loadingText,\n onCancel,\n onSubmit,\n submitText = 'Submit',\n cancelText = 'Cancel',\n buttonPosition = 'space-between',\n ['data-testid']: dataTestId = 'kibble-modal-footer',\n ...rest\n}: ModalFooterProps): React.JSX.Element => {\n return (\n <Dialog.Footer className=\"Modal__Footer\" data-testid={dataTestId} {...rest}>\n {children ? (\n children\n ) : (\n <Flex alignItems=\"center\" justifyContent={buttonPosition} w=\"100%\">\n {!hideCancel && (\n <Dialog.ActionTrigger asChild className=\"Modal__CancelButton\" data-testid={`${dataTestId}-cancel-button`}>\n <Button variant=\"tertiary\" onClick={onCancel}>\n {cancelText}\n </Button>\n </Dialog.ActionTrigger>\n )}\n <Button\n className=\"Modal__SubmitButton\"\n data-testid={`${dataTestId}-submit-button`}\n onClick={onSubmit}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n type=\"submit\"\n variant={destructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n )}\n </Dialog.Footer>\n );\n};\n","import React, { useRef, useState } from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\nimport { ModalFooter, ModalFooterProps } from './components/ModalFooter/modalFooter.component';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { ModalMotionPreset, ModalPlacement, ModalSize } from './modal.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { useBreakpointValue } from '@chakra-ui/react';\nimport { PortalContext, usePortalContentRef } from 'hooks/usePortalContentRef';\n\nexport interface ModalProps extends Dialog.RootProps {\n /** Props to customize the default footer. If a custom footer is needed, you can use the `children` prop to build your own. */\n footerProps?: ModalFooterProps;\n /**\n * Whether to use full screen on mobile devices.\n * @default true\n */\n fullScreenMobile?: boolean;\n /** The header of the modal. */\n header?: React.ReactNode;\n /** Props to customize the header when passed as a string. */\n headerProps?: HeadingProps;\n /**\n * Whether to hide the close button.\n * @default false\n */\n hideCloseButton?: boolean;\n /** Props to customize the close button. */\n closeButtonProps?: Omit<ButtonProps, 'iconName' | 'onClick'>;\n /**\n * Whether to hide the modal footer.\n * @default false\n */\n hideFooter?: boolean;\n /** The animation preset for the modal.\n * @default slide-in-bottom\n */\n motionPreset?: ModalMotionPreset;\n /** The placement of the modal.\n * @default center\n */\n placement?: ModalPlacement;\n /**\n * Whether to show the expand button.\n * @default false\n */\n showExpandButton?: boolean;\n /** The size of the modal.\n * @default md\n */\n size?: ConditionalValue<ModalSize>;\n /** The element used to open the modal. If no trigger is provided, the modal will need to be controlled with the `open` and `onOpenChange` props. */\n trigger?: React.ReactNode;\n /**\n * Whether to render the modal in a portal. Set to false if this modal is nested inside another modal.\n * @default true\n */\n portalled?: boolean;\n /** Props to customize the content of the modal. */\n contentProps?: Dialog.ContentProps;\n /** Props to customize the positioner of the modal. */\n positionerProps?: Dialog.PositionerProps;\n /** Data test id for the modal.\n * @default kibble-modal\n */\n 'data-testid'?: string;\n}\n\nexport const Modal = ({\n children,\n footerProps,\n fullScreenMobile = true,\n header,\n headerProps,\n hideCloseButton = false,\n closeButtonProps,\n hideFooter = false,\n motionPreset = 'slide-in-bottom',\n placement = 'center',\n showExpandButton = false,\n size = 'md',\n trigger,\n ['data-testid']: dataTestId = 'kibble-modal',\n portalled = true,\n contentProps,\n positionerProps,\n ...rest\n}: ModalProps): React.JSX.Element => {\n const { contentRef: parentContentRef } = usePortalContentRef();\n const modalContentRef = useRef<HTMLDivElement>(null!);\n const contextValue = { contentRef: modalContentRef };\n const [isExpanded, setIsExpanded] = useState(false);\n const computedSize = useBreakpointValue({\n base: fullScreenMobile ? 'full' : size,\n md: size,\n });\n\n return (\n <Dialog.Root\n motionPreset={motionPreset}\n placement={placement}\n size={computedSize}\n expanded={isExpanded}\n data-testid={`${dataTestId}-root`}\n {...rest}\n >\n {trigger && <Dialog.Trigger asChild>{trigger}</Dialog.Trigger>}\n <Portal disabled={!portalled} container={parentContentRef || undefined}>\n <Dialog.Backdrop />\n <Dialog.Positioner {...positionerProps}>\n <Dialog.Content\n className=\"Modal\"\n data-testid={`${dataTestId}-content`}\n {...contentProps}\n ref={modalContentRef}\n >\n <PortalContext.Provider value={contextValue}>\n {!hideCloseButton && (\n <Dialog.CloseTrigger asChild className=\"Modal__CloseButton\" data-testid=\"kibble-modal-close-button\">\n <Button iconName=\"close\" variant=\"ghostNeutral\" {...closeButtonProps} />\n </Dialog.CloseTrigger>\n )}\n {showExpandButton && (\n <Button\n className=\"Modal__ExpandButton\"\n data-testid={`${dataTestId}-expand-button`}\n variant=\"ghostNeutral\"\n iconName={isExpanded ? 'arrowsIn' : 'arrowsOut'}\n position=\"absolute\"\n top={2}\n right={12}\n onClick={() => setIsExpanded((prev) => !prev)}\n />\n )}\n <Dialog.Header className=\"Modal__Header\" data-testid={`${dataTestId}-header`}>\n {header && (\n <Dialog.Title fontSize=\"2xl\" className=\"Modal__Title\" data-testid={`${dataTestId}-title`} asChild>\n {typeof header === 'string' ? (\n <Heading p={0} {...headerProps}>\n {header}\n </Heading>\n ) : (\n header\n )}\n </Dialog.Title>\n )}\n </Dialog.Header>\n <Dialog.Body className=\"Modal__Body\" data-testid={`${dataTestId}-body`}>\n {children}\n </Dialog.Body>\n {!hideFooter && <ModalFooter {...footerProps} />}\n </PortalContext.Provider>\n </Dialog.Content>\n </Dialog.Positioner>\n </Portal>\n </Dialog.Root>\n );\n};\n","export const modalSizes = ['xs', 'sm', 'md', 'lg', 'cover', 'full'] as const;\nexport type ModalSize = (typeof modalSizes)[number];\n\nexport const modalPlacements = ['center', 'top', 'bottom'] as const;\nexport type ModalPlacement = (typeof modalPlacements)[number];\n\nexport const modalScrollBehaviors = ['inside', 'outside'] as const;\nexport type ModalScrollBehavior = (typeof modalScrollBehaviors)[number];\n\nexport const modalMotionPresets = [\n 'scale',\n 'slide-in-bottom',\n 'slide-in-top',\n 'slide-in-left',\n 'slide-in-right',\n 'none',\n] as const;\nexport type ModalMotionPreset = (typeof modalMotionPresets)[number];\n"],"names":["ModalFooter","children","destructive","disabled","hideCancel","loading","loadingText","onCancel","onSubmit","submitText","cancelText","buttonPosition","dataTestId","rest","Dialog.Footer","Flex","Dialog.ActionTrigger","Button","jsx","Modal","footerProps","fullScreenMobile","header","headerProps","hideCloseButton","closeButtonProps","hideFooter","motionPreset","placement","showExpandButton","size","trigger","portalled","contentProps","positionerProps","parentContentRef","usePortalContentRef","modalContentRef","useRef","contextValue","isExpanded","setIsExpanded","useState","computedSize","useBreakpointValue","jsxs","Dialog.Root","Dialog.Trigger","Portal","Dialog.Backdrop","Dialog.Positioner","Dialog.Content","PortalContext","Dialog.CloseTrigger","prev","Dialog.Header","Dialog.Title","Heading","Dialog.Body","modalSizes","modalPlacements","modalScrollBehaviors","modalMotionPresets"],"mappings":"kWAwCaA,EAAc,CAAC,CAC1B,SAAAC,EACA,YAAAC,EACA,SAAAC,EACA,WAAAC,EAAa,GACb,QAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EACA,WAAAC,EAAa,SACb,WAAAC,EAAa,SACb,eAAAC,EAAiB,gBACjB,CAAC,eAAgBC,EAAa,sBAC9B,GAAGC,CACL,4BAEKC,eAAA,CAAc,UAAU,gBAAgB,cAAaF,EAAa,GAAGC,EACnE,SACCZ,4BAECc,OAAK,CAAA,WAAW,SAAS,eAAgBJ,EAAgB,EAAE,OACzD,SAAA,CAAC,CAAAP,2BACCY,EAAO,oBAAP,CAAqB,QAAO,GAAC,UAAU,sBAAsB,cAAa,GAAGJ,CAAU,iBACtF,iCAACK,SAAO,CAAA,QAAQ,WAAW,QAASV,EACjC,WACH,CACF,CAAA,EAEFW,EAAA,kBAAA,IAACD,EAAA,OAAA,CACC,UAAU,sBACV,cAAa,GAAGL,CAAU,iBAC1B,QAASJ,EACT,QAAAH,EACA,YAAAC,EACA,SAAAH,EACA,KAAK,SACL,QAASD,EAAc,qBAAuB,UAE7C,SAA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AA,mBAAA,CAAoB,QAAO,GAAC,UAAU,qBAAqB,cAAY,4BACtE,SAAAnC,wBAACD,EAAAA,QAAO,SAAS,QAAQ,QAAQ,eAAgB,GAAGQ,CAAkB,CAAA,EACxE,EAEDI,GACCX,EAAA,kBAAA,IAACD,EAAA,OAAA,CACC,UAAU,sBACV,cAAa,GAAGL,CAAU,iBAC1B,QAAQ,eACR,SAAU4B,EAAa,WAAa,YACpC,SAAS,WACT,IAAK,EACL,MAAO,GACP,QAAS,IAAMC,EAAea,GAAS,CAACA,CAAI,CAAA,CAC9C,0BAEDC,EAAAA,aAAA,CAAc,UAAU,gBAAgB,cAAa,GAAG3C,CAAU,UAChE,YACEM,EAAAA,kBAAAA,IAAAsC,EAAAA,YAAA,CAAa,SAAS,MAAM,UAAU,eAAe,cAAa,GAAG5C,CAAU,SAAU,QAAO,GAC9F,gBAAOU,GAAW,SAChBJ,wBAAAuC,EAAAA,eAAA,CAAQ,EAAG,EAAI,GAAGlC,EAChB,SACHD,EAAA,EAEAA,CAEJ,CAAA,EAEJ,EACAJ,EAAAA,kBAAAA,IAACwC,EAAO,WAAP,CAAY,UAAU,cAAc,cAAa,GAAG9C,CAAU,QAC5D,SAAAX,EACH,EACC,CAACyB,GAAeR,EAAA,kBAAA,IAAAlB,EAAA,CAAa,GAAGoB,CAAa,CAAA,CAAA,CAChD,CAAA,CAAA,CAAA,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,CAEJ,EC9JauC,EAAa,CAAC,KAAM,KAAM,KAAM,KAAM,QAAS,MAAM,EAGrDC,EAAkB,CAAC,SAAU,MAAO,QAAQ,EAG5CC,EAAuB,CAAC,SAAU,SAAS,EAG3CC,EAAqB,CAChC,QACA,kBACA,eACA,gBACA,iBACA,MACF"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/modal.types-y3cRa0HL.js");exports.Modal=o.Modal;exports.modalMotionPresets=o.modalMotionPresets;exports.modalPlacements=o.modalPlacements;exports.modalScrollBehaviors=o.modalScrollBehaviors;exports.modalSizes=o.modalSizes;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../../chunks/modal.types-D_t0UdS6.js");exports.Modal=o.Modal;exports.modalMotionPresets=o.modalMotionPresets;exports.modalPlacements=o.modalPlacements;exports.modalScrollBehaviors=o.modalScrollBehaviors;exports.modalSizes=o.modalSizes;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../chunks/alert.types-Ch8hn5HY.js"),v=require("../../chunks/avatar.component-BGgZoVJS.js"),c=require("../../chunks/avatar.types-Bmt5Uhfb.js"),T=require("../../chunks/avatarGroup.component-N2vYrtiD.js"),g=require("../../chunks/button.component-DjdgBXDC.js"),e=require("../../chunks/button.types-DXP4uRV8.js"),b=require("../../chunks/buttonGroup.component-D1h4aH2G.js"),y=require("../../chunks/calendar.component-DtDSHf9e.js"),P=require("../../chunks/card.component-BmBiYbMV.js"),C=require("../../chunks/card.types-MvkQTTZF.js"),k=require("../../chunks/characterCounter.component-BRHLt929.js"),z=require("../../chunks/checkbox.component-DkpiUlzn.js"),h=require("../../chunks/checkboxGroup.component-CtCezYeT.js"),D=require("../../chunks/conversationCard.component-CXKQyfAl.js"),I=require("../../chunks/datePicker.component-B-99fArB.js"),x=require("../../chunks/datePicker.provider-u-5-DbM1.js"),o=require("../../chunks/dateTimePicker.component-BYVUKa8U.js"),V=require("../../chunks/divider.component-BX3zyB7O.js"),n=require("../../chunks/divider.types-DBNcs0IR.js"),f=require("../../chunks/heading.component-DnoZOXdz.js"),A=require("../../chunks/icon.component-B1hr5lLa.js"),B=require("../../chunks/icon.types-2obj_NKG.js"),W=require("../../chunks/link.component-_YXG8MDq.js"),p=require("../../chunks/logo.types-88a31xCx.js"),G=require("../../chunks/menu.component-D79Ce44I.js"),t=require("../../chunks/modal.types-y3cRa0HL.js"),R=require("../../chunks/notificationCounter.component-CBwi5vXa.js"),u=require("../../chunks/notificationCounter.types-B_-siNfi.js"),w=require("../../chunks/picture.component-BA2hgdZy.js"),d=require("../../chunks/pinInput.types-CM5wUaXi.js"),M=require("../../chunks/popover.component-C0nG3J1J.js"),r=require("../../chunks/popover.types-ChA9ccQ2.js"),i=require("../../chunks/radioGroup.types-ClfoT_Sw.js"),L=require("../../chunks/radiomark.component-YJNr68s7.js"),O=require("../../chunks/rating.component-DEVRcfgE.js"),N=require("../../chunks/ratingDots.component-dfb3E9CK.js"),F=require("../../chunks/select.component-D4XUEDi4.js"),H=require("../../chunks/sortableList.component-2yX2pXs7.js"),j=require("../../chunks/spinner.component-Dq6u4vVL.js"),E=require("../../chunks/spinner.types-BCLN5-H2.js"),m=require("../../chunks/styledAvatar.types-BG2G_U-W.js"),l=require("../../chunks/swatch.types-AZLB8OWG.js"),J=require("../../chunks/switch.component-gcLbjvkh.js"),a=require("../../chunks/tab.types-BWtosyjE.js"),K=require("../../chunks/tag.component-C98Wf07v.js"),_=require("../../chunks/tag.types-BnDFgTvb.js"),q=require("../../chunks/tagBlock.component-DExd13J1.js"),Q=require("../../chunks/text.component-BDDz5KQP.js"),U=require("../../chunks/textInput.component-CWbv8giH.js"),X=require("../../chunks/textarea.component-CMszSf5r.js"),S=require("../../chunks/timePicker.component-B750WQHA.js"),Y=require("../../chunks/timeRange.component-C0f7pM9p.js"),Z=require("../../chunks/timestamp.component-BfmZPfy5.js"),$=require("./Toast/index.cjs"),ee=require("../../chunks/tooltip.component-DBw-hAPU.js"),te=require("../../chunks/numberInput.component-DTvSbkyF.js");exports.Alert=s.Alert;exports.alertButtonPositions=s.alertButtonPositions;exports.Avatar=v.Avatar;exports.avatarSizes=c.avatarSizes;exports.avatarVariants=c.avatarVariants;exports.AvatarGroup=T.AvatarGroup;exports.Button=g.Button;exports.buttonConfigVariants=e.buttonConfigVariants;exports.buttonIconPositions=e.buttonIconPositions;exports.buttonSizes=e.buttonSizes;exports.buttonSpinnerPlacements=e.buttonSpinnerPlacements;exports.buttonVariants=e.buttonVariants;exports.ButtonGroup=b.ButtonGroup;exports.Calendar=y.Calendar;exports.Card=P.Card;exports.cardSizes=C.cardSizes;exports.CharacterCounter=k.CharacterCounter;exports.Checkbox=z.WrappedCheckbox;exports.CheckboxGroup=h.WrappedCheckboxGroup;exports.ConversationCard=D.ConversationCard;exports.DatePicker=I.DatePicker;exports.DateFormats=x.DateFormats;exports.DateTimePicker=o.DateTimePicker;exports.DateTimePickerDefaultOptionValue=o.DateTimePickerDefaultOptionValue;exports.calendarViews=o.calendarViews;exports.Divider=V.Divider;exports.dividerOrientations=n.dividerOrientations;exports.dividerSizes=n.dividerSizes;exports.dividerVariants=n.dividerVariants;exports.Heading=f.WrappedHeading;exports.Icon=A.Icon;exports.iconSizes=B.iconSizes;exports.Link=W.Link;exports.Logo=p.Logo;exports.logoTypes=p.logoTypes;exports.Menu=G.Menu;exports.Modal=t.Modal;exports.modalMotionPresets=t.modalMotionPresets;exports.modalPlacements=t.modalPlacements;exports.modalScrollBehaviors=t.modalScrollBehaviors;exports.modalSizes=t.modalSizes;exports.NotificationCounter=R.NotificationCounter;exports.notificationCounterSizes=u.notificationCounterSizes;exports.notificationCounterVariants=u.notificationCounterVariants;exports.Picture=w.Picture;exports.PinInput=d.WrappedPinInput;exports.pinInputTypes=d.pinInputTypes;exports.Popover=M.Popover;exports.popoverSizes=r.popoverSizes;exports.popoverTriggerTypes=r.popoverTriggerTypes;exports.popoverVariants=r.popoverVariants;exports.RadioGroup=i.WrappedRadioGroup;exports.radioAlignments=i.radioAlignments;exports.radioTypes=i.radioTypes;exports.Radiomark=L.Radiomark;exports.Rating=O.WrappedRating;exports.RatingDots=N.WrappedRatingDots;exports.Select=F.WrappedSelect;exports.SortableList=H.SortableList;exports.Spinner=j.Spinner;exports.spinnerSizes=E.spinnerSizes;exports.StyledAvatar=m.StyledAvatar;exports.styledAvatarTypes=m.styledAvatarTypes;exports.Swatch=l.Swatch;exports.swatchSizes=l.swatchSizes;exports.Switch=J.WrappedSwitch;exports.Tabs=a.Tabs;exports.tabIconPositions=a.tabIconPositions;exports.tabSizes=a.tabSizes;exports.Tag=K.Tag;exports.closeButtonDisplays=_.closeButtonDisplays;exports.tagSizes=_.tagSizes;exports.TagBlock=q.TagBlock;exports.TagDisabledState=q.TagDisabledState;exports.Text=Q.WrappedText;exports.TextInput=U.WrappedTextInput;exports.Textarea=X.WrappedTextarea;exports.Meridiem=S.Meridiem;exports.TimePicker=S.TimePicker;exports.TimeRange=Y.TimeRange;exports.Timestamp=Z.Timestamp;exports.useToast=$.useToast;exports.Tooltip=ee.Tooltip;exports.NumberInput=te.WrappedNumberInput;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("../../chunks/alert.types-Ch8hn5HY.js"),v=require("../../chunks/avatar.component-BGgZoVJS.js"),c=require("../../chunks/avatar.types-Bmt5Uhfb.js"),T=require("../../chunks/avatarGroup.component-N2vYrtiD.js"),g=require("../../chunks/button.component-DjdgBXDC.js"),e=require("../../chunks/button.types-DXP4uRV8.js"),b=require("../../chunks/buttonGroup.component-D1h4aH2G.js"),y=require("../../chunks/calendar.component-DtDSHf9e.js"),P=require("../../chunks/card.component-BmBiYbMV.js"),C=require("../../chunks/card.types-MvkQTTZF.js"),k=require("../../chunks/characterCounter.component-BRHLt929.js"),z=require("../../chunks/checkbox.component-DkpiUlzn.js"),h=require("../../chunks/checkboxGroup.component-CtCezYeT.js"),D=require("../../chunks/conversationCard.component-CXKQyfAl.js"),I=require("../../chunks/datePicker.component-B-99fArB.js"),x=require("../../chunks/datePicker.provider-u-5-DbM1.js"),o=require("../../chunks/dateTimePicker.component-BYVUKa8U.js"),V=require("../../chunks/divider.component-BX3zyB7O.js"),n=require("../../chunks/divider.types-DBNcs0IR.js"),f=require("../../chunks/heading.component-DnoZOXdz.js"),A=require("../../chunks/icon.component-B1hr5lLa.js"),B=require("../../chunks/icon.types-2obj_NKG.js"),W=require("../../chunks/link.component-_YXG8MDq.js"),p=require("../../chunks/logo.types-88a31xCx.js"),G=require("../../chunks/menu.component-D79Ce44I.js"),t=require("../../chunks/modal.types-D_t0UdS6.js"),R=require("../../chunks/notificationCounter.component-CBwi5vXa.js"),u=require("../../chunks/notificationCounter.types-B_-siNfi.js"),w=require("../../chunks/picture.component-BA2hgdZy.js"),d=require("../../chunks/pinInput.types-CM5wUaXi.js"),M=require("../../chunks/popover.component-C0nG3J1J.js"),r=require("../../chunks/popover.types-ChA9ccQ2.js"),i=require("../../chunks/radioGroup.types-ClfoT_Sw.js"),L=require("../../chunks/radiomark.component-YJNr68s7.js"),O=require("../../chunks/rating.component-DEVRcfgE.js"),N=require("../../chunks/ratingDots.component-dfb3E9CK.js"),F=require("../../chunks/select.component-D4XUEDi4.js"),H=require("../../chunks/sortableList.component-2yX2pXs7.js"),j=require("../../chunks/spinner.component-Dq6u4vVL.js"),E=require("../../chunks/spinner.types-BCLN5-H2.js"),m=require("../../chunks/styledAvatar.types-BG2G_U-W.js"),l=require("../../chunks/swatch.types-AZLB8OWG.js"),J=require("../../chunks/switch.component-gcLbjvkh.js"),a=require("../../chunks/tab.types-BWtosyjE.js"),K=require("../../chunks/tag.component-C98Wf07v.js"),_=require("../../chunks/tag.types-BnDFgTvb.js"),q=require("../../chunks/tagBlock.component-DExd13J1.js"),Q=require("../../chunks/text.component-BDDz5KQP.js"),U=require("../../chunks/textInput.component-CWbv8giH.js"),X=require("../../chunks/textarea.component-CMszSf5r.js"),S=require("../../chunks/timePicker.component-B750WQHA.js"),Y=require("../../chunks/timeRange.component-C0f7pM9p.js"),Z=require("../../chunks/timestamp.component-BfmZPfy5.js"),$=require("./Toast/index.cjs"),ee=require("../../chunks/tooltip.component-DBw-hAPU.js"),te=require("../../chunks/numberInput.component-DTvSbkyF.js");exports.Alert=s.Alert;exports.alertButtonPositions=s.alertButtonPositions;exports.Avatar=v.Avatar;exports.avatarSizes=c.avatarSizes;exports.avatarVariants=c.avatarVariants;exports.AvatarGroup=T.AvatarGroup;exports.Button=g.Button;exports.buttonConfigVariants=e.buttonConfigVariants;exports.buttonIconPositions=e.buttonIconPositions;exports.buttonSizes=e.buttonSizes;exports.buttonSpinnerPlacements=e.buttonSpinnerPlacements;exports.buttonVariants=e.buttonVariants;exports.ButtonGroup=b.ButtonGroup;exports.Calendar=y.Calendar;exports.Card=P.Card;exports.cardSizes=C.cardSizes;exports.CharacterCounter=k.CharacterCounter;exports.Checkbox=z.WrappedCheckbox;exports.CheckboxGroup=h.WrappedCheckboxGroup;exports.ConversationCard=D.ConversationCard;exports.DatePicker=I.DatePicker;exports.DateFormats=x.DateFormats;exports.DateTimePicker=o.DateTimePicker;exports.DateTimePickerDefaultOptionValue=o.DateTimePickerDefaultOptionValue;exports.calendarViews=o.calendarViews;exports.Divider=V.Divider;exports.dividerOrientations=n.dividerOrientations;exports.dividerSizes=n.dividerSizes;exports.dividerVariants=n.dividerVariants;exports.Heading=f.WrappedHeading;exports.Icon=A.Icon;exports.iconSizes=B.iconSizes;exports.Link=W.Link;exports.Logo=p.Logo;exports.logoTypes=p.logoTypes;exports.Menu=G.Menu;exports.Modal=t.Modal;exports.modalMotionPresets=t.modalMotionPresets;exports.modalPlacements=t.modalPlacements;exports.modalScrollBehaviors=t.modalScrollBehaviors;exports.modalSizes=t.modalSizes;exports.NotificationCounter=R.NotificationCounter;exports.notificationCounterSizes=u.notificationCounterSizes;exports.notificationCounterVariants=u.notificationCounterVariants;exports.Picture=w.Picture;exports.PinInput=d.WrappedPinInput;exports.pinInputTypes=d.pinInputTypes;exports.Popover=M.Popover;exports.popoverSizes=r.popoverSizes;exports.popoverTriggerTypes=r.popoverTriggerTypes;exports.popoverVariants=r.popoverVariants;exports.RadioGroup=i.WrappedRadioGroup;exports.radioAlignments=i.radioAlignments;exports.radioTypes=i.radioTypes;exports.Radiomark=L.Radiomark;exports.Rating=O.WrappedRating;exports.RatingDots=N.WrappedRatingDots;exports.Select=F.WrappedSelect;exports.SortableList=H.SortableList;exports.Spinner=j.Spinner;exports.spinnerSizes=E.spinnerSizes;exports.StyledAvatar=m.StyledAvatar;exports.styledAvatarTypes=m.styledAvatarTypes;exports.Swatch=l.Swatch;exports.swatchSizes=l.swatchSizes;exports.Switch=J.WrappedSwitch;exports.Tabs=a.Tabs;exports.tabIconPositions=a.tabIconPositions;exports.tabSizes=a.tabSizes;exports.Tag=K.Tag;exports.closeButtonDisplays=_.closeButtonDisplays;exports.tagSizes=_.tagSizes;exports.TagBlock=q.TagBlock;exports.TagDisabledState=q.TagDisabledState;exports.Text=Q.WrappedText;exports.TextInput=U.WrappedTextInput;exports.Textarea=X.WrappedTextarea;exports.Meridiem=S.Meridiem;exports.TimePicker=S.TimePicker;exports.TimeRange=Y.TimeRange;exports.Timestamp=Z.Timestamp;exports.useToast=$.useToast;exports.Tooltip=ee.Tooltip;exports.NumberInput=te.WrappedNumberInput;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../chunks/alert.types-Ch8hn5HY.js"),g=require("../chunks/avatar.component-BGgZoVJS.js"),u=require("../chunks/avatar.types-Bmt5Uhfb.js"),b=require("../chunks/avatarGroup.component-N2vYrtiD.js"),h=require("../chunks/button.component-DjdgBXDC.js"),e=require("../chunks/button.types-DXP4uRV8.js"),S=require("../chunks/buttonGroup.component-D1h4aH2G.js"),k=require("../chunks/calendar.component-DtDSHf9e.js"),C=require("../chunks/card.component-BmBiYbMV.js"),P=require("../chunks/card.types-MvkQTTZF.js"),D=require("../chunks/characterCounter.component-BRHLt929.js"),z=require("../chunks/checkbox.component-DkpiUlzn.js"),x=require("../chunks/checkboxGroup.component-CtCezYeT.js"),M=require("../chunks/conversationCard.component-CXKQyfAl.js"),V=require("../chunks/datePicker.component-B-99fArB.js"),f=require("../chunks/datePicker.provider-u-5-DbM1.js"),r=require("../chunks/dateTimePicker.component-BYVUKa8U.js"),I=require("../chunks/divider.component-BX3zyB7O.js"),n=require("../chunks/divider.types-DBNcs0IR.js"),w=require("../chunks/heading.component-DnoZOXdz.js"),B=require("../chunks/icon.component-B1hr5lLa.js"),A=require("../chunks/icon.types-2obj_NKG.js"),W=require("../chunks/link.component-_YXG8MDq.js"),d=require("../chunks/logo.types-88a31xCx.js"),G=require("../chunks/menu.component-D79Ce44I.js"),t=require("../chunks/modal.types-y3cRa0HL.js"),R=require("../chunks/notificationCounter.component-CBwi5vXa.js"),m=require("../chunks/notificationCounter.types-B_-siNfi.js"),L=require("../chunks/picture.component-BA2hgdZy.js"),l=require("../chunks/pinInput.types-CM5wUaXi.js"),O=require("../chunks/popover.component-C0nG3J1J.js"),i=require("../chunks/popover.types-ChA9ccQ2.js"),a=require("../chunks/radioGroup.types-ClfoT_Sw.js"),K=require("../chunks/radiomark.component-YJNr68s7.js"),N=require("../chunks/rating.component-DEVRcfgE.js"),F=require("../chunks/ratingDots.component-dfb3E9CK.js"),H=require("../chunks/select.component-D4XUEDi4.js"),j=require("../chunks/sortableList.component-2yX2pXs7.js"),E=require("../chunks/spinner.component-Dq6u4vVL.js"),J=require("../chunks/spinner.types-BCLN5-H2.js"),_=require("../chunks/styledAvatar.types-BG2G_U-W.js"),q=require("../chunks/swatch.types-AZLB8OWG.js"),Q=require("../chunks/switch.component-gcLbjvkh.js"),s=require("../chunks/tab.types-BWtosyjE.js"),U=require("../chunks/tag.component-C98Wf07v.js"),T=require("../chunks/tag.types-BnDFgTvb.js"),v=require("../chunks/tagBlock.component-DExd13J1.js"),X=require("../chunks/text.component-BDDz5KQP.js"),Y=require("../chunks/textInput.component-CWbv8giH.js"),Z=require("../chunks/textarea.component-CMszSf5r.js"),y=require("../chunks/timePicker.component-B750WQHA.js"),$=require("../chunks/timeRange.component-C0f7pM9p.js"),ee=require("../chunks/timestamp.component-BfmZPfy5.js"),te=require("./components/Toast/index.cjs"),oe=require("../chunks/tooltip.component-DBw-hAPU.js"),re=require("../chunks/numberInput.component-DTvSbkyF.js"),ne=require("../chunks/withDarkMode-R08khTA6.js"),ie=require("../chunks/withLightMode-Crw8xtkD.js"),ae=require("./hooks/useBreakpoint/index.cjs"),se=require("./hooks/useColorMode/index.cjs"),ce=require("./hooks/useColorModeValue/index.cjs"),pe=require("./hooks/useDeviceType/index.cjs"),o=require("./shared/types/index.cjs"),ue=require("../chunks/theme-BFbOz0Jj.js"),c=require("../chunks/theme.provider-CezsihF5.js");exports.Alert=p.Alert;exports.alertButtonPositions=p.alertButtonPositions;exports.Avatar=g.Avatar;exports.avatarSizes=u.avatarSizes;exports.avatarVariants=u.avatarVariants;exports.AvatarGroup=b.AvatarGroup;exports.Button=h.Button;exports.buttonConfigVariants=e.buttonConfigVariants;exports.buttonIconPositions=e.buttonIconPositions;exports.buttonSizes=e.buttonSizes;exports.buttonSpinnerPlacements=e.buttonSpinnerPlacements;exports.buttonVariants=e.buttonVariants;exports.ButtonGroup=S.ButtonGroup;exports.Calendar=k.Calendar;exports.Card=C.Card;exports.cardSizes=P.cardSizes;exports.CharacterCounter=D.CharacterCounter;exports.Checkbox=z.WrappedCheckbox;exports.CheckboxGroup=x.WrappedCheckboxGroup;exports.ConversationCard=M.ConversationCard;exports.DatePicker=V.DatePicker;exports.DateFormats=f.DateFormats;exports.DateTimePicker=r.DateTimePicker;exports.DateTimePickerDefaultOptionValue=r.DateTimePickerDefaultOptionValue;exports.calendarViews=r.calendarViews;exports.Divider=I.Divider;exports.dividerOrientations=n.dividerOrientations;exports.dividerSizes=n.dividerSizes;exports.dividerVariants=n.dividerVariants;exports.Heading=w.WrappedHeading;exports.Icon=B.Icon;exports.iconSizes=A.iconSizes;exports.Link=W.Link;exports.Logo=d.Logo;exports.logoTypes=d.logoTypes;exports.Menu=G.Menu;exports.Modal=t.Modal;exports.modalMotionPresets=t.modalMotionPresets;exports.modalPlacements=t.modalPlacements;exports.modalScrollBehaviors=t.modalScrollBehaviors;exports.modalSizes=t.modalSizes;exports.NotificationCounter=R.NotificationCounter;exports.notificationCounterSizes=m.notificationCounterSizes;exports.notificationCounterVariants=m.notificationCounterVariants;exports.Picture=L.Picture;exports.PinInput=l.WrappedPinInput;exports.pinInputTypes=l.pinInputTypes;exports.Popover=O.Popover;exports.popoverSizes=i.popoverSizes;exports.popoverTriggerTypes=i.popoverTriggerTypes;exports.popoverVariants=i.popoverVariants;exports.RadioGroup=a.WrappedRadioGroup;exports.radioAlignments=a.radioAlignments;exports.radioTypes=a.radioTypes;exports.Radiomark=K.Radiomark;exports.Rating=N.WrappedRating;exports.RatingDots=F.WrappedRatingDots;exports.Select=H.WrappedSelect;exports.SortableList=j.SortableList;exports.Spinner=E.Spinner;exports.spinnerSizes=J.spinnerSizes;exports.StyledAvatar=_.StyledAvatar;exports.styledAvatarTypes=_.styledAvatarTypes;exports.Swatch=q.Swatch;exports.swatchSizes=q.swatchSizes;exports.Switch=Q.WrappedSwitch;exports.Tabs=s.Tabs;exports.tabIconPositions=s.tabIconPositions;exports.tabSizes=s.tabSizes;exports.Tag=U.Tag;exports.closeButtonDisplays=T.closeButtonDisplays;exports.tagSizes=T.tagSizes;exports.TagBlock=v.TagBlock;exports.TagDisabledState=v.TagDisabledState;exports.Text=X.WrappedText;exports.TextInput=Y.WrappedTextInput;exports.Textarea=Z.WrappedTextarea;exports.Meridiem=y.Meridiem;exports.TimePicker=y.TimePicker;exports.TimeRange=$.TimeRange;exports.Timestamp=ee.Timestamp;exports.useToast=te.useToast;exports.Tooltip=oe.Tooltip;exports.NumberInput=re.WrappedNumberInput;exports.withDarkMode=ne.withDarkMode;exports.withLightMode=ie.withLightMode;exports.useBreakpoint=ae.useBreakpoint;exports.useColorMode=se.useColorMode;exports.useColorModeValue=ce.useColorModeValue;exports.useDeviceType=pe.useDeviceType;exports.alignments=o.alignments;exports.flexDirections=o.flexDirections;exports.placements=o.placements;exports.statuses=o.statuses;exports.typographyVariants=o.typographyVariants;exports.colorModeThemeKey=ue.colorModeThemeKey;exports.KibbleThemeProvider=c.KibbleThemeProvider;exports.kibbleThemeConfig=c.kibbleThemeConfig;exports.system=c.system;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../chunks/alert.types-Ch8hn5HY.js"),g=require("../chunks/avatar.component-BGgZoVJS.js"),u=require("../chunks/avatar.types-Bmt5Uhfb.js"),b=require("../chunks/avatarGroup.component-N2vYrtiD.js"),h=require("../chunks/button.component-DjdgBXDC.js"),e=require("../chunks/button.types-DXP4uRV8.js"),S=require("../chunks/buttonGroup.component-D1h4aH2G.js"),k=require("../chunks/calendar.component-DtDSHf9e.js"),C=require("../chunks/card.component-BmBiYbMV.js"),P=require("../chunks/card.types-MvkQTTZF.js"),D=require("../chunks/characterCounter.component-BRHLt929.js"),z=require("../chunks/checkbox.component-DkpiUlzn.js"),x=require("../chunks/checkboxGroup.component-CtCezYeT.js"),M=require("../chunks/conversationCard.component-CXKQyfAl.js"),V=require("../chunks/datePicker.component-B-99fArB.js"),f=require("../chunks/datePicker.provider-u-5-DbM1.js"),r=require("../chunks/dateTimePicker.component-BYVUKa8U.js"),I=require("../chunks/divider.component-BX3zyB7O.js"),n=require("../chunks/divider.types-DBNcs0IR.js"),w=require("../chunks/heading.component-DnoZOXdz.js"),B=require("../chunks/icon.component-B1hr5lLa.js"),A=require("../chunks/icon.types-2obj_NKG.js"),W=require("../chunks/link.component-_YXG8MDq.js"),d=require("../chunks/logo.types-88a31xCx.js"),G=require("../chunks/menu.component-D79Ce44I.js"),t=require("../chunks/modal.types-D_t0UdS6.js"),R=require("../chunks/notificationCounter.component-CBwi5vXa.js"),m=require("../chunks/notificationCounter.types-B_-siNfi.js"),L=require("../chunks/picture.component-BA2hgdZy.js"),l=require("../chunks/pinInput.types-CM5wUaXi.js"),O=require("../chunks/popover.component-C0nG3J1J.js"),i=require("../chunks/popover.types-ChA9ccQ2.js"),a=require("../chunks/radioGroup.types-ClfoT_Sw.js"),K=require("../chunks/radiomark.component-YJNr68s7.js"),N=require("../chunks/rating.component-DEVRcfgE.js"),F=require("../chunks/ratingDots.component-dfb3E9CK.js"),H=require("../chunks/select.component-D4XUEDi4.js"),j=require("../chunks/sortableList.component-2yX2pXs7.js"),E=require("../chunks/spinner.component-Dq6u4vVL.js"),J=require("../chunks/spinner.types-BCLN5-H2.js"),_=require("../chunks/styledAvatar.types-BG2G_U-W.js"),q=require("../chunks/swatch.types-AZLB8OWG.js"),Q=require("../chunks/switch.component-gcLbjvkh.js"),s=require("../chunks/tab.types-BWtosyjE.js"),U=require("../chunks/tag.component-C98Wf07v.js"),T=require("../chunks/tag.types-BnDFgTvb.js"),v=require("../chunks/tagBlock.component-DExd13J1.js"),X=require("../chunks/text.component-BDDz5KQP.js"),Y=require("../chunks/textInput.component-CWbv8giH.js"),Z=require("../chunks/textarea.component-CMszSf5r.js"),y=require("../chunks/timePicker.component-B750WQHA.js"),$=require("../chunks/timeRange.component-C0f7pM9p.js"),ee=require("../chunks/timestamp.component-BfmZPfy5.js"),te=require("./components/Toast/index.cjs"),oe=require("../chunks/tooltip.component-DBw-hAPU.js"),re=require("../chunks/numberInput.component-DTvSbkyF.js"),ne=require("../chunks/withDarkMode-R08khTA6.js"),ie=require("../chunks/withLightMode-Crw8xtkD.js"),ae=require("./hooks/useBreakpoint/index.cjs"),se=require("./hooks/useColorMode/index.cjs"),ce=require("./hooks/useColorModeValue/index.cjs"),pe=require("./hooks/useDeviceType/index.cjs"),o=require("./shared/types/index.cjs"),ue=require("../chunks/theme-BFbOz0Jj.js"),c=require("../chunks/theme.provider-CezsihF5.js");exports.Alert=p.Alert;exports.alertButtonPositions=p.alertButtonPositions;exports.Avatar=g.Avatar;exports.avatarSizes=u.avatarSizes;exports.avatarVariants=u.avatarVariants;exports.AvatarGroup=b.AvatarGroup;exports.Button=h.Button;exports.buttonConfigVariants=e.buttonConfigVariants;exports.buttonIconPositions=e.buttonIconPositions;exports.buttonSizes=e.buttonSizes;exports.buttonSpinnerPlacements=e.buttonSpinnerPlacements;exports.buttonVariants=e.buttonVariants;exports.ButtonGroup=S.ButtonGroup;exports.Calendar=k.Calendar;exports.Card=C.Card;exports.cardSizes=P.cardSizes;exports.CharacterCounter=D.CharacterCounter;exports.Checkbox=z.WrappedCheckbox;exports.CheckboxGroup=x.WrappedCheckboxGroup;exports.ConversationCard=M.ConversationCard;exports.DatePicker=V.DatePicker;exports.DateFormats=f.DateFormats;exports.DateTimePicker=r.DateTimePicker;exports.DateTimePickerDefaultOptionValue=r.DateTimePickerDefaultOptionValue;exports.calendarViews=r.calendarViews;exports.Divider=I.Divider;exports.dividerOrientations=n.dividerOrientations;exports.dividerSizes=n.dividerSizes;exports.dividerVariants=n.dividerVariants;exports.Heading=w.WrappedHeading;exports.Icon=B.Icon;exports.iconSizes=A.iconSizes;exports.Link=W.Link;exports.Logo=d.Logo;exports.logoTypes=d.logoTypes;exports.Menu=G.Menu;exports.Modal=t.Modal;exports.modalMotionPresets=t.modalMotionPresets;exports.modalPlacements=t.modalPlacements;exports.modalScrollBehaviors=t.modalScrollBehaviors;exports.modalSizes=t.modalSizes;exports.NotificationCounter=R.NotificationCounter;exports.notificationCounterSizes=m.notificationCounterSizes;exports.notificationCounterVariants=m.notificationCounterVariants;exports.Picture=L.Picture;exports.PinInput=l.WrappedPinInput;exports.pinInputTypes=l.pinInputTypes;exports.Popover=O.Popover;exports.popoverSizes=i.popoverSizes;exports.popoverTriggerTypes=i.popoverTriggerTypes;exports.popoverVariants=i.popoverVariants;exports.RadioGroup=a.WrappedRadioGroup;exports.radioAlignments=a.radioAlignments;exports.radioTypes=a.radioTypes;exports.Radiomark=K.Radiomark;exports.Rating=N.WrappedRating;exports.RatingDots=F.WrappedRatingDots;exports.Select=H.WrappedSelect;exports.SortableList=j.SortableList;exports.Spinner=E.Spinner;exports.spinnerSizes=J.spinnerSizes;exports.StyledAvatar=_.StyledAvatar;exports.styledAvatarTypes=_.styledAvatarTypes;exports.Swatch=q.Swatch;exports.swatchSizes=q.swatchSizes;exports.Switch=Q.WrappedSwitch;exports.Tabs=s.Tabs;exports.tabIconPositions=s.tabIconPositions;exports.tabSizes=s.tabSizes;exports.Tag=U.Tag;exports.closeButtonDisplays=T.closeButtonDisplays;exports.tagSizes=T.tagSizes;exports.TagBlock=v.TagBlock;exports.TagDisabledState=v.TagDisabledState;exports.Text=X.WrappedText;exports.TextInput=Y.WrappedTextInput;exports.Textarea=Z.WrappedTextarea;exports.Meridiem=y.Meridiem;exports.TimePicker=y.TimePicker;exports.TimeRange=$.TimeRange;exports.Timestamp=ee.Timestamp;exports.useToast=te.useToast;exports.Tooltip=oe.Tooltip;exports.NumberInput=re.WrappedNumberInput;exports.withDarkMode=ne.withDarkMode;exports.withLightMode=ie.withLightMode;exports.useBreakpoint=ae.useBreakpoint;exports.useColorMode=se.useColorMode;exports.useColorModeValue=ce.useColorModeValue;exports.useDeviceType=pe.useDeviceType;exports.alignments=o.alignments;exports.flexDirections=o.flexDirections;exports.placements=o.placements;exports.statuses=o.statuses;exports.typographyVariants=o.typographyVariants;exports.colorModeThemeKey=ue.colorModeThemeKey;exports.KibbleThemeProvider=c.KibbleThemeProvider;exports.kibbleThemeConfig=c.kibbleThemeConfig;exports.system=c.system;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- import { M as s, c as l, a as e, b as m, m as d } from "../../../chunks/modal.types-jE-vPShC.js";
1
+ import { M as s, c as l, a as e, b as m, m as d } from "../../../chunks/modal.types-CVy-QT6f.js";
2
2
  export {
3
3
  s as Modal,
4
4
  l as modalMotionPresets,
@@ -23,7 +23,7 @@ import { i as oo } from "../../chunks/icon.types-DLbVfMjG.js";
23
23
  import { L as ro } from "../../chunks/link.component--URNKuK2.js";
24
24
  import { L as eo, l as so } from "../../chunks/logo.types-C5GwpHjM.js";
25
25
  import { M as io } from "../../chunks/menu.component-BuTY_3mt.js";
26
- import { M as no, c as fo, a as xo, b as co, m as lo } from "../../chunks/modal.types-jE-vPShC.js";
26
+ import { M as no, c as fo, a as xo, b as co, m as lo } from "../../chunks/modal.types-CVy-QT6f.js";
27
27
  import { N as To } from "../../chunks/notificationCounter.component-BlGSd37B.js";
28
28
  import { n as bo, a as vo } from "../../chunks/notificationCounter.types-Dm4PSN2Y.js";
29
29
  import { P as Po } from "../../chunks/picture.component-DzdHIFN_.js";
package/dist/esm/index.js CHANGED
@@ -23,7 +23,7 @@ import { i as oo } from "../chunks/icon.types-DLbVfMjG.js";
23
23
  import { L as ao } from "../chunks/link.component--URNKuK2.js";
24
24
  import { L as to, l as so } from "../chunks/logo.types-C5GwpHjM.js";
25
25
  import { M as io } from "../chunks/menu.component-BuTY_3mt.js";
26
- import { M as fo, c as xo, a as no, b as co, m as lo } from "../chunks/modal.types-jE-vPShC.js";
26
+ import { M as fo, c as xo, a as no, b as co, m as lo } from "../chunks/modal.types-CVy-QT6f.js";
27
27
  import { N as To } from "../chunks/notificationCounter.component-BlGSd37B.js";
28
28
  import { n as bo, a as Co } from "../chunks/notificationCounter.types-Dm4PSN2Y.js";
29
29
  import { P as vo } from "../chunks/picture.component-DzdHIFN_.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@televet/kibble-ui",
3
3
  "description": "Kibble Design System by Otto",
4
- "version": "5.0.10-steve.0",
4
+ "version": "5.0.10",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.cjs",
7
7
  "module": "./dist/esm/index.js",
@@ -1,115 +0,0 @@
1
- import { j as t } from "./jsx-runtime-C5mzlN2N.js";
2
- import { useState as B } from "react";
3
- import { B as l } from "./button.component-BO6oee_V.js";
4
- import { F as y } from "./flex-CX-8gE9T.js";
5
- import { D as k, a as v, b as $, c as S, d as P, e as F, f as w, g as E, h as R, i as z, j as H } from "./dialog-B9jifvV4.js";
6
- import { W } from "./heading.component-PFNpLFT7.js";
7
- import { u as A } from "./usePortalContentRef-DO_jc4W9.js";
8
- import { u as O } from "./use-breakpoint-MQ7agQJe.js";
9
- import { P as V } from "./index-C9UYIjEB.js";
10
- const q = ({
11
- children: s,
12
- destructive: r,
13
- disabled: n,
14
- hideCancel: a = !1,
15
- loading: d,
16
- loadingText: c,
17
- onCancel: m,
18
- onSubmit: u,
19
- submitText: p = "Submit",
20
- cancelText: x = "Cancel",
21
- buttonPosition: f = "space-between",
22
- ["data-testid"]: o = "kibble-modal-footer",
23
- ...i
24
- }) => /* @__PURE__ */ t.jsx(k, { className: "Modal__Footer", "data-testid": o, ...i, children: s || /* @__PURE__ */ t.jsxs(y, { alignItems: "center", justifyContent: f, w: "100%", children: [
25
- !a && /* @__PURE__ */ t.jsx(v, { asChild: !0, className: "Modal__CancelButton", "data-testid": `${o}-cancel-button`, children: /* @__PURE__ */ t.jsx(l, { variant: "tertiary", onClick: m, children: x }) }),
26
- /* @__PURE__ */ t.jsx(
27
- l,
28
- {
29
- className: "Modal__SubmitButton",
30
- "data-testid": `${o}-submit-button`,
31
- onClick: u,
32
- loading: d,
33
- loadingText: c,
34
- disabled: n,
35
- type: "submit",
36
- variant: r ? "primaryDestructive" : "primary",
37
- children: p
38
- }
39
- )
40
- ] }) }), T = ({
41
- children: s,
42
- footerProps: r,
43
- fullScreenMobile: n = !0,
44
- header: a,
45
- headerProps: d,
46
- hideCloseButton: c = !1,
47
- closeButtonProps: m,
48
- hideFooter: u = !1,
49
- motionPreset: p = "slide-in-bottom",
50
- placement: x = "center",
51
- showExpandButton: f = !1,
52
- size: o = "md",
53
- trigger: i,
54
- ["data-testid"]: e = "kibble-modal",
55
- portalled: j = !0,
56
- contentProps: h,
57
- positionerProps: _,
58
- ...C
59
- }) => {
60
- const { contentRef: b } = A(), [g, D] = B(!1), M = O({
61
- base: n ? "full" : o,
62
- md: o
63
- });
64
- return /* @__PURE__ */ t.jsxs(
65
- $,
66
- {
67
- motionPreset: p,
68
- placement: x,
69
- size: M,
70
- expanded: g,
71
- "data-testid": `${e}-root`,
72
- ...C,
73
- children: [
74
- i && /* @__PURE__ */ t.jsx(S, { asChild: !0, children: i }),
75
- /* @__PURE__ */ t.jsxs(V, { disabled: !j, container: b || void 0, children: [
76
- /* @__PURE__ */ t.jsx(P, {}),
77
- /* @__PURE__ */ t.jsx(F, { ..._, children: /* @__PURE__ */ t.jsxs(w, { className: "Modal", "data-testid": `${e}-content`, ...h, ref: b, children: [
78
- !c && /* @__PURE__ */ t.jsx(E, { asChild: !0, className: "Modal__CloseButton", "data-testid": "kibble-modal-close-button", children: /* @__PURE__ */ t.jsx(l, { iconName: "close", variant: "ghostNeutral", ...m }) }),
79
- f && /* @__PURE__ */ t.jsx(
80
- l,
81
- {
82
- className: "Modal__ExpandButton",
83
- "data-testid": `${e}-expand-button`,
84
- variant: "ghostNeutral",
85
- iconName: g ? "arrowsIn" : "arrowsOut",
86
- position: "absolute",
87
- top: 2,
88
- right: 12,
89
- onClick: () => D((N) => !N)
90
- }
91
- ),
92
- /* @__PURE__ */ t.jsx(R, { className: "Modal__Header", "data-testid": `${e}-header`, children: a && /* @__PURE__ */ t.jsx(z, { fontSize: "2xl", className: "Modal__Title", "data-testid": `${e}-title`, asChild: !0, children: typeof a == "string" ? /* @__PURE__ */ t.jsx(W, { p: 0, ...d, children: a }) : a }) }),
93
- /* @__PURE__ */ t.jsx(H, { className: "Modal__Body", "data-testid": `${e}-body`, children: s }),
94
- !u && /* @__PURE__ */ t.jsx(q, { ...r })
95
- ] }) })
96
- ] })
97
- ]
98
- }
99
- );
100
- }, I = ["xs", "sm", "md", "lg", "cover", "full"], tt = ["center", "top", "bottom"], at = ["inside", "outside"], ot = [
101
- "scale",
102
- "slide-in-bottom",
103
- "slide-in-top",
104
- "slide-in-left",
105
- "slide-in-right",
106
- "none"
107
- ];
108
- export {
109
- T as M,
110
- tt as a,
111
- at as b,
112
- ot as c,
113
- I as m
114
- };
115
- //# sourceMappingURL=modal.types-jE-vPShC.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal.types-jE-vPShC.js","sources":["../../src/components/Modal/components/ModalFooter/modalFooter.component.tsx","../../src/components/Modal/modal.component.tsx","../../src/components/Modal/modal.types.ts"],"sourcesContent":["import React from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { Button } from 'components/Button/button.component';\n\nexport interface ModalFooterProps extends Dialog.FooterProps {\n /** Content to be rendered in the footer. */\n children?: React.ReactNode;\n /** If true, the submit button will be displayed as a destructive button.\n * @default false\n */\n destructive?: boolean;\n /** If true, the footer will be disabled. */\n disabled?: boolean;\n /** If true, the cancel button will not be displayed.\n * @default false\n */\n hideCancel?: boolean;\n /** If true, the submit button will be displayed with a loading state. */\n loading?: boolean;\n /** Text to display in the loading state. */\n loadingText?: string;\n /** Text to display in the cancel button. */\n cancelText?: string;\n /** Callback function to be called when the cancel button is clicked. */\n onCancel?: () => void;\n /** Callback function to be called when the submit button is clicked. */\n onSubmit?: () => void | Promise<void>;\n /** Text to display in the submit button. */\n submitText?: string;\n /** Position of the buttons.\n * @default space-between\n */\n buttonPosition?: 'start' | 'end' | 'space-between';\n /** Data test id for the footer.\n * @default kibble-modal-footer\n */\n 'data-testid'?: string;\n}\n\nexport const ModalFooter = ({\n children,\n destructive,\n disabled,\n hideCancel = false,\n loading,\n loadingText,\n onCancel,\n onSubmit,\n submitText = 'Submit',\n cancelText = 'Cancel',\n buttonPosition = 'space-between',\n ['data-testid']: dataTestId = 'kibble-modal-footer',\n ...rest\n}: ModalFooterProps): React.JSX.Element => {\n return (\n <Dialog.Footer className=\"Modal__Footer\" data-testid={dataTestId} {...rest}>\n {children ? (\n children\n ) : (\n <Flex alignItems=\"center\" justifyContent={buttonPosition} w=\"100%\">\n {!hideCancel && (\n <Dialog.ActionTrigger asChild className=\"Modal__CancelButton\" data-testid={`${dataTestId}-cancel-button`}>\n <Button variant=\"tertiary\" onClick={onCancel}>\n {cancelText}\n </Button>\n </Dialog.ActionTrigger>\n )}\n <Button\n className=\"Modal__SubmitButton\"\n data-testid={`${dataTestId}-submit-button`}\n onClick={onSubmit}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n type=\"submit\"\n variant={destructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n )}\n </Dialog.Footer>\n );\n};\n","import React, { useState } from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\nimport { ModalFooter, ModalFooterProps } from './components/ModalFooter/modalFooter.component';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { ModalMotionPreset, ModalPlacement, ModalSize } from './modal.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { useBreakpointValue } from '@chakra-ui/react';\nimport { usePortalContentRef } from 'hooks/usePortalContentRef';\n\nexport interface ModalProps extends Dialog.RootProps {\n /** Props to customize the default footer. If a custom footer is needed, you can use the `children` prop to build your own. */\n footerProps?: ModalFooterProps;\n /**\n * Whether to use full screen on mobile devices.\n * @default true\n */\n fullScreenMobile?: boolean;\n /** The header of the modal. */\n header?: React.ReactNode;\n /** Props to customize the header when passed as a string. */\n headerProps?: HeadingProps;\n /**\n * Whether to hide the close button.\n * @default false\n */\n hideCloseButton?: boolean;\n /** Props to customize the close button. */\n closeButtonProps?: Omit<ButtonProps, 'iconName' | 'onClick'>;\n /**\n * Whether to hide the modal footer.\n * @default false\n */\n hideFooter?: boolean;\n /** The animation preset for the modal.\n * @default slide-in-bottom\n */\n motionPreset?: ModalMotionPreset;\n /** The placement of the modal.\n * @default center\n */\n placement?: ModalPlacement;\n /**\n * Whether to show the expand button.\n * @default false\n */\n showExpandButton?: boolean;\n /** The size of the modal.\n * @default md\n */\n size?: ConditionalValue<ModalSize>;\n /** The element used to open the modal. If no trigger is provided, the modal will need to be controlled with the `open` and `onOpenChange` props. */\n trigger?: React.ReactNode;\n /**\n * Whether to render the modal in a portal. Set to false if this modal is nested inside another modal.\n * @default true\n */\n portalled?: boolean;\n /** Props to customize the content of the modal. */\n contentProps?: Dialog.ContentProps;\n /** Props to customize the positioner of the modal. */\n positionerProps?: Dialog.PositionerProps;\n /** Data test id for the modal.\n * @default kibble-modal\n */\n 'data-testid'?: string;\n}\n\nexport const Modal = ({\n children,\n footerProps,\n fullScreenMobile = true,\n header,\n headerProps,\n hideCloseButton = false,\n closeButtonProps,\n hideFooter = false,\n motionPreset = 'slide-in-bottom',\n placement = 'center',\n showExpandButton = false,\n size = 'md',\n trigger,\n ['data-testid']: dataTestId = 'kibble-modal',\n portalled = true,\n contentProps,\n positionerProps,\n ...rest\n}: ModalProps): React.JSX.Element => {\n const { contentRef } = usePortalContentRef();\n const [isExpanded, setIsExpanded] = useState(false);\n const computedSize = useBreakpointValue({\n base: fullScreenMobile ? 'full' : size,\n md: size,\n });\n\n return (\n <Dialog.Root\n motionPreset={motionPreset}\n placement={placement}\n size={computedSize}\n expanded={isExpanded}\n data-testid={`${dataTestId}-root`}\n {...rest}\n >\n {trigger && <Dialog.Trigger asChild>{trigger}</Dialog.Trigger>}\n <Portal disabled={!portalled} container={contentRef || undefined}>\n <Dialog.Backdrop />\n <Dialog.Positioner {...positionerProps}>\n <Dialog.Content className=\"Modal\" data-testid={`${dataTestId}-content`} {...contentProps} ref={contentRef}>\n {!hideCloseButton && (\n <Dialog.CloseTrigger asChild className=\"Modal__CloseButton\" data-testid=\"kibble-modal-close-button\">\n <Button iconName=\"close\" variant=\"ghostNeutral\" {...closeButtonProps} />\n </Dialog.CloseTrigger>\n )}\n {showExpandButton && (\n <Button\n className=\"Modal__ExpandButton\"\n data-testid={`${dataTestId}-expand-button`}\n variant=\"ghostNeutral\"\n iconName={isExpanded ? 'arrowsIn' : 'arrowsOut'}\n position=\"absolute\"\n top={2}\n right={12}\n onClick={() => setIsExpanded((prev) => !prev)}\n />\n )}\n <Dialog.Header className=\"Modal__Header\" data-testid={`${dataTestId}-header`}>\n {header && (\n <Dialog.Title fontSize=\"2xl\" className=\"Modal__Title\" data-testid={`${dataTestId}-title`} asChild>\n {typeof header === 'string' ? (\n <Heading p={0} {...headerProps}>\n {header}\n </Heading>\n ) : (\n header\n )}\n </Dialog.Title>\n )}\n </Dialog.Header>\n <Dialog.Body className=\"Modal__Body\" data-testid={`${dataTestId}-body`}>\n {children}\n </Dialog.Body>\n {!hideFooter && <ModalFooter {...footerProps} />}\n </Dialog.Content>\n </Dialog.Positioner>\n </Portal>\n </Dialog.Root>\n );\n};\n","export const modalSizes = ['xs', 'sm', 'md', 'lg', 'cover', 'full'] as const;\nexport type ModalSize = (typeof modalSizes)[number];\n\nexport const modalPlacements = ['center', 'top', 'bottom'] as const;\nexport type ModalPlacement = (typeof modalPlacements)[number];\n\nexport const modalScrollBehaviors = ['inside', 'outside'] as const;\nexport type ModalScrollBehavior = (typeof modalScrollBehaviors)[number];\n\nexport const modalMotionPresets = [\n 'scale',\n 'slide-in-bottom',\n 'slide-in-top',\n 'slide-in-left',\n 'slide-in-right',\n 'none',\n] as const;\nexport type ModalMotionPreset = (typeof modalMotionPresets)[number];\n"],"names":["ModalFooter","children","destructive","disabled","hideCancel","loading","loadingText","onCancel","onSubmit","submitText","cancelText","buttonPosition","dataTestId","rest","Dialog.Footer","Flex","Dialog.ActionTrigger","Button","jsx","Modal","footerProps","fullScreenMobile","header","headerProps","hideCloseButton","closeButtonProps","hideFooter","motionPreset","placement","showExpandButton","size","trigger","portalled","contentProps","positionerProps","contentRef","usePortalContentRef","isExpanded","setIsExpanded","useState","computedSize","useBreakpointValue","jsxs","Dialog.Root","Dialog.Trigger","Portal","Dialog.Backdrop","Dialog.Positioner","Dialog.Content","Dialog.CloseTrigger","prev","Dialog.Header","Dialog.Title","Heading","Dialog.Body","modalSizes","modalPlacements","modalScrollBehaviors","modalMotionPresets"],"mappings":";;;;;;;;;AAwCO,MAAMA,IAAc,CAAC;AAAA,EAC1B,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AA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AAe,eAAa,GAAGxC,CAAU,UAAU,SAAO,IAC9F,iBAAOU,KAAW,WAChBJ,gBAAAA,MAAAmC,GAAA,EAAQ,GAAG,GAAI,GAAG9B,GAChB,UACHD,GAAA,IAEAA,EAEJ,CAAA,GAEJ;AAAA,YACAJ,gBAAAA,EAAAA,IAACoC,GAAA,EAAY,WAAU,eAAc,eAAa,GAAG1C,CAAU,SAC5D,UAAAX,GACH;AAAA,YACC,CAACyB,KAAeR,gBAAAA,EAAA,IAAAlB,GAAA,EAAa,GAAGoB,EAAa,CAAA;AAAA,UAAA,EAAA,CAChD,EACF,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ,GCrJamC,IAAa,CAAC,MAAM,MAAM,MAAM,MAAM,SAAS,MAAM,GAGrDC,KAAkB,CAAC,UAAU,OAAO,QAAQ,GAG5CC,KAAuB,CAAC,UAAU,SAAS,GAG3CC,KAAqB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
@@ -1,2 +0,0 @@
1
- "use strict";const t=require("./jsx-runtime-BjDatQAs.js"),N=require("react"),l=require("./button.component-DjdgBXDC.js"),D=require("./flex-BOU6tYUd.js"),e=require("./dialog-CZFwddWp.js"),k=require("./heading.component-DnoZOXdz.js"),q=require("./usePortalContentRef-CTrvBQ7I.js"),v=require("./use-breakpoint-uBg4-8yY.js"),y=require("./index-Ts8g8jZd.js"),S=({children:n,destructive:r,disabled:d,hideCancel:s=!1,loading:c,loadingText:u,onCancel:x,onSubmit:m,submitText:p="Submit",cancelText:j="Cancel",buttonPosition:g="space-between",["data-testid"]:o="kibble-modal-footer",...a})=>t.jsxRuntimeExports.jsx(e.DialogFooter,{className:"Modal__Footer","data-testid":o,...a,children:n||t.jsxRuntimeExports.jsxs(D.Flex,{alignItems:"center",justifyContent:g,w:"100%",children:[!s&&t.jsxRuntimeExports.jsx(e.DialogActionTrigger,{asChild:!0,className:"Modal__CancelButton","data-testid":`${o}-cancel-button`,children:t.jsxRuntimeExports.jsx(l.Button,{variant:"tertiary",onClick:x,children:j})}),t.jsxRuntimeExports.jsx(l.Button,{className:"Modal__SubmitButton","data-testid":`${o}-submit-button`,onClick:m,loading:c,loadingText:u,disabled:d,type:"submit",variant:r?"primaryDestructive":"primary",children:p})]})}),P=({children:n,footerProps:r,fullScreenMobile:d=!0,header:s,headerProps:c,hideCloseButton:u=!1,closeButtonProps:x,hideFooter:m=!1,motionPreset:p="slide-in-bottom",placement:j="center",showExpandButton:g=!1,size:o="md",trigger:a,["data-testid"]:i="kibble-modal",portalled:h=!0,contentProps:E,positionerProps:_,...f})=>{const{contentRef:R}=q.usePortalContentRef(),[b,B]=N.useState(!1),C=v.useBreakpointValue({base:d?"full":o,md:o});return t.jsxRuntimeExports.jsxs(e.DialogRoot,{motionPreset:p,placement:j,size:C,expanded:b,"data-testid":`${i}-root`,...f,children:[a&&t.jsxRuntimeExports.jsx(e.DialogTrigger,{asChild:!0,children:a}),t.jsxRuntimeExports.jsxs(y.Portal,{disabled:!h,container:R||void 0,children:[t.jsxRuntimeExports.jsx(e.DialogBackdrop,{}),t.jsxRuntimeExports.jsx(e.DialogPositioner,{..._,children:t.jsxRuntimeExports.jsxs(e.DialogContent,{className:"Modal","data-testid":`${i}-content`,...E,ref:R,children:[!u&&t.jsxRuntimeExports.jsx(e.DialogCloseTrigger,{asChild:!0,className:"Modal__CloseButton","data-testid":"kibble-modal-close-button",children:t.jsxRuntimeExports.jsx(l.Button,{iconName:"close",variant:"ghostNeutral",...x})}),g&&t.jsxRuntimeExports.jsx(l.Button,{className:"Modal__ExpandButton","data-testid":`${i}-expand-button`,variant:"ghostNeutral",iconName:b?"arrowsIn":"arrowsOut",position:"absolute",top:2,right:12,onClick:()=>B(M=>!M)}),t.jsxRuntimeExports.jsx(e.DialogHeader,{className:"Modal__Header","data-testid":`${i}-header`,children:s&&t.jsxRuntimeExports.jsx(e.DialogTitle,{fontSize:"2xl",className:"Modal__Title","data-testid":`${i}-title`,asChild:!0,children:typeof s=="string"?t.jsxRuntimeExports.jsx(k.WrappedHeading,{p:0,...c,children:s}):s})}),t.jsxRuntimeExports.jsx(e.DialogBody,{className:"Modal__Body","data-testid":`${i}-body`,children:n}),!m&&t.jsxRuntimeExports.jsx(S,{...r})]})})]})]})},$=["xs","sm","md","lg","cover","full"],w=["center","top","bottom"],z=["inside","outside"],F=["scale","slide-in-bottom","slide-in-top","slide-in-left","slide-in-right","none"];exports.Modal=P;exports.modalMotionPresets=F;exports.modalPlacements=w;exports.modalScrollBehaviors=z;exports.modalSizes=$;
2
- //# sourceMappingURL=modal.types-y3cRa0HL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"modal.types-y3cRa0HL.js","sources":["../../src/components/Modal/components/ModalFooter/modalFooter.component.tsx","../../src/components/Modal/modal.component.tsx","../../src/components/Modal/modal.types.ts"],"sourcesContent":["import React from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Flex } from '@chakra-ui/react/flex';\nimport { Button } from 'components/Button/button.component';\n\nexport interface ModalFooterProps extends Dialog.FooterProps {\n /** Content to be rendered in the footer. */\n children?: React.ReactNode;\n /** If true, the submit button will be displayed as a destructive button.\n * @default false\n */\n destructive?: boolean;\n /** If true, the footer will be disabled. */\n disabled?: boolean;\n /** If true, the cancel button will not be displayed.\n * @default false\n */\n hideCancel?: boolean;\n /** If true, the submit button will be displayed with a loading state. */\n loading?: boolean;\n /** Text to display in the loading state. */\n loadingText?: string;\n /** Text to display in the cancel button. */\n cancelText?: string;\n /** Callback function to be called when the cancel button is clicked. */\n onCancel?: () => void;\n /** Callback function to be called when the submit button is clicked. */\n onSubmit?: () => void | Promise<void>;\n /** Text to display in the submit button. */\n submitText?: string;\n /** Position of the buttons.\n * @default space-between\n */\n buttonPosition?: 'start' | 'end' | 'space-between';\n /** Data test id for the footer.\n * @default kibble-modal-footer\n */\n 'data-testid'?: string;\n}\n\nexport const ModalFooter = ({\n children,\n destructive,\n disabled,\n hideCancel = false,\n loading,\n loadingText,\n onCancel,\n onSubmit,\n submitText = 'Submit',\n cancelText = 'Cancel',\n buttonPosition = 'space-between',\n ['data-testid']: dataTestId = 'kibble-modal-footer',\n ...rest\n}: ModalFooterProps): React.JSX.Element => {\n return (\n <Dialog.Footer className=\"Modal__Footer\" data-testid={dataTestId} {...rest}>\n {children ? (\n children\n ) : (\n <Flex alignItems=\"center\" justifyContent={buttonPosition} w=\"100%\">\n {!hideCancel && (\n <Dialog.ActionTrigger asChild className=\"Modal__CancelButton\" data-testid={`${dataTestId}-cancel-button`}>\n <Button variant=\"tertiary\" onClick={onCancel}>\n {cancelText}\n </Button>\n </Dialog.ActionTrigger>\n )}\n <Button\n className=\"Modal__SubmitButton\"\n data-testid={`${dataTestId}-submit-button`}\n onClick={onSubmit}\n loading={loading}\n loadingText={loadingText}\n disabled={disabled}\n type=\"submit\"\n variant={destructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n )}\n </Dialog.Footer>\n );\n};\n","import React, { useState } from 'react';\nimport { Dialog } from '@chakra-ui/react/dialog';\nimport { Portal } from '@chakra-ui/react/portal';\nimport { ConditionalValue } from '@chakra-ui/react/styled-system';\nimport { ModalFooter, ModalFooterProps } from './components/ModalFooter/modalFooter.component';\nimport { Heading, HeadingProps } from 'components/Heading/heading.component';\nimport { ModalMotionPreset, ModalPlacement, ModalSize } from './modal.types';\nimport { Button, ButtonProps } from 'components/Button/button.component';\nimport { useBreakpointValue } from '@chakra-ui/react';\nimport { usePortalContentRef } from 'hooks/usePortalContentRef';\n\nexport interface ModalProps extends Dialog.RootProps {\n /** Props to customize the default footer. If a custom footer is needed, you can use the `children` prop to build your own. */\n footerProps?: ModalFooterProps;\n /**\n * Whether to use full screen on mobile devices.\n * @default true\n */\n fullScreenMobile?: boolean;\n /** The header of the modal. */\n header?: React.ReactNode;\n /** Props to customize the header when passed as a string. */\n headerProps?: HeadingProps;\n /**\n * Whether to hide the close button.\n * @default false\n */\n hideCloseButton?: boolean;\n /** Props to customize the close button. */\n closeButtonProps?: Omit<ButtonProps, 'iconName' | 'onClick'>;\n /**\n * Whether to hide the modal footer.\n * @default false\n */\n hideFooter?: boolean;\n /** The animation preset for the modal.\n * @default slide-in-bottom\n */\n motionPreset?: ModalMotionPreset;\n /** The placement of the modal.\n * @default center\n */\n placement?: ModalPlacement;\n /**\n * Whether to show the expand button.\n * @default false\n */\n showExpandButton?: boolean;\n /** The size of the modal.\n * @default md\n */\n size?: ConditionalValue<ModalSize>;\n /** The element used to open the modal. If no trigger is provided, the modal will need to be controlled with the `open` and `onOpenChange` props. */\n trigger?: React.ReactNode;\n /**\n * Whether to render the modal in a portal. Set to false if this modal is nested inside another modal.\n * @default true\n */\n portalled?: boolean;\n /** Props to customize the content of the modal. */\n contentProps?: Dialog.ContentProps;\n /** Props to customize the positioner of the modal. */\n positionerProps?: Dialog.PositionerProps;\n /** Data test id for the modal.\n * @default kibble-modal\n */\n 'data-testid'?: string;\n}\n\nexport const Modal = ({\n children,\n footerProps,\n fullScreenMobile = true,\n header,\n headerProps,\n hideCloseButton = false,\n closeButtonProps,\n hideFooter = false,\n motionPreset = 'slide-in-bottom',\n placement = 'center',\n showExpandButton = false,\n size = 'md',\n trigger,\n ['data-testid']: dataTestId = 'kibble-modal',\n portalled = true,\n contentProps,\n positionerProps,\n ...rest\n}: ModalProps): React.JSX.Element => {\n const { contentRef } = usePortalContentRef();\n const [isExpanded, setIsExpanded] = useState(false);\n const computedSize = useBreakpointValue({\n base: fullScreenMobile ? 'full' : size,\n md: size,\n });\n\n return (\n <Dialog.Root\n motionPreset={motionPreset}\n placement={placement}\n size={computedSize}\n expanded={isExpanded}\n data-testid={`${dataTestId}-root`}\n {...rest}\n >\n {trigger && <Dialog.Trigger asChild>{trigger}</Dialog.Trigger>}\n <Portal disabled={!portalled} container={contentRef || undefined}>\n <Dialog.Backdrop />\n <Dialog.Positioner {...positionerProps}>\n <Dialog.Content className=\"Modal\" data-testid={`${dataTestId}-content`} {...contentProps} ref={contentRef}>\n {!hideCloseButton && (\n <Dialog.CloseTrigger asChild className=\"Modal__CloseButton\" data-testid=\"kibble-modal-close-button\">\n <Button iconName=\"close\" variant=\"ghostNeutral\" {...closeButtonProps} />\n </Dialog.CloseTrigger>\n )}\n {showExpandButton && (\n <Button\n className=\"Modal__ExpandButton\"\n data-testid={`${dataTestId}-expand-button`}\n variant=\"ghostNeutral\"\n iconName={isExpanded ? 'arrowsIn' : 'arrowsOut'}\n position=\"absolute\"\n top={2}\n right={12}\n onClick={() => setIsExpanded((prev) => !prev)}\n />\n )}\n <Dialog.Header className=\"Modal__Header\" data-testid={`${dataTestId}-header`}>\n {header && (\n <Dialog.Title fontSize=\"2xl\" className=\"Modal__Title\" data-testid={`${dataTestId}-title`} asChild>\n {typeof header === 'string' ? (\n <Heading p={0} {...headerProps}>\n {header}\n </Heading>\n ) : (\n header\n )}\n </Dialog.Title>\n )}\n </Dialog.Header>\n <Dialog.Body className=\"Modal__Body\" data-testid={`${dataTestId}-body`}>\n {children}\n </Dialog.Body>\n {!hideFooter && <ModalFooter {...footerProps} />}\n </Dialog.Content>\n </Dialog.Positioner>\n </Portal>\n </Dialog.Root>\n );\n};\n","export const modalSizes = ['xs', 'sm', 'md', 'lg', 'cover', 'full'] as const;\nexport type ModalSize = (typeof modalSizes)[number];\n\nexport const modalPlacements = ['center', 'top', 'bottom'] as const;\nexport type ModalPlacement = (typeof modalPlacements)[number];\n\nexport const modalScrollBehaviors = ['inside', 'outside'] as const;\nexport type ModalScrollBehavior = (typeof modalScrollBehaviors)[number];\n\nexport const modalMotionPresets = [\n 'scale',\n 'slide-in-bottom',\n 'slide-in-top',\n 'slide-in-left',\n 'slide-in-right',\n 'none',\n] as const;\nexport type ModalMotionPreset = (typeof modalMotionPresets)[number];\n"],"names":["ModalFooter","children","destructive","disabled","hideCancel","loading","loadingText","onCancel","onSubmit","submitText","cancelText","buttonPosition","dataTestId","rest","Dialog.Footer","Flex","Dialog.ActionTrigger","Button","jsx","Modal","footerProps","fullScreenMobile","header","headerProps","hideCloseButton","closeButtonProps","hideFooter","motionPreset","placement","showExpandButton","size","trigger","portalled","contentProps","positionerProps","contentRef","usePortalContentRef","isExpanded","setIsExpanded","useState","computedSize","useBreakpointValue","jsxs","Dialog.Root","Dialog.Trigger","Portal","Dialog.Backdrop","Dialog.Positioner","Dialog.Content","Dialog.CloseTrigger","prev","Dialog.Header","Dialog.Title","Heading","Dialog.Body","modalSizes","modalPlacements","modalScrollBehaviors","modalMotionPresets"],"mappings":"kWAwCaA,EAAc,CAAC,CAC1B,SAAAC,EACA,YAAAC,EACA,SAAAC,EACA,WAAAC,EAAa,GACb,QAAAC,EACA,YAAAC,EACA,SAAAC,EACA,SAAAC,EACA,WAAAC,EAAa,SACb,WAAAC,EAAa,SACb,eAAAC,EAAiB,gBACjB,CAAC,eAAgBC,EAAa,sBAC9B,GAAGC,CACL,4BAEKC,eAAA,CAAc,UAAU,gBAAgB,cAAaF,EAAa,GAAGC,EACnE,SACCZ,4BAECc,OAAK,CAAA,WAAW,SAAS,eAAgBJ,EAAgB,EAAE,OACzD,SAAA,CAAC,CAAAP,2BACCY,EAAO,oBAAP,CAAqB,QAAO,GAAC,UAAU,sBAAsB,cAAa,GAAGJ,CAAU,iBACtF,iCAACK,SAAO,CAAA,QAAQ,WAAW,QAASV,EACjC,WACH,CACF,CAAA,EAEFW,EAAA,kBAAA,IAACD,EAAA,OAAA,CACC,UAAU,sBACV,cAAa,GAAGL,CAAU,iBAC1B,QAASJ,EACT,QAAAH,EACA,YAAAC,EACA,SAAAH,EACA,KAAK,SACL,QAASD,EAAc,qBAAuB,UAE7C,SAAAO,CAAA,CAAA,CACH,CAAA,CACF,CAEJ,CAAA,ECbSU,EAAQ,CAAC,CACpB,SAAAlB,EACA,YAAAmB,EACA,iBAAAC,EAAmB,GACnB,OAAAC,EACA,YAAAC,EACA,gBAAAC,EAAkB,GAClB,iBAAAC,EACA,W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