@neo4j-ndl/react 4.0.13 → 4.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/dialog/Dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,kDAA0B;AAO1B,4DAAuD;AACvD,oDAAgD;AAChD,oCAKkB;AAClB,oCAAmD;AACnD,wDAAoD;AACpD,gDAA4C;AAC5C,8CAA2C;AAC3C,qDAAmE;AACnE,iDAUwB;AAExB,MAAM,kBAAkB,GAAG,CAAC,MAAwB,EAAqB,EAAE;IACzE,MAAM,YAAY,GAAG,MAAsC,CAAC;IAC5D,IAAI,MAAM,CAAC,MAAM,CAAC,gCAAiB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC5D,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,uBAAuB,CAAC,CAAC;AACpE,CAAC,CAAC;AACF,4CAA4C;AAC5C,MAAM,SAAS,GAA2C;IACxD,MAAM,EAAE,uBAAC,oCAA4B,IAAC,cAAc,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,GAAI;IAC5E,IAAI,EAAE,uBAAC,oCAA4B,IAAC,cAAc,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,GAAI;IAC1E,OAAO,EAAE,CACP,uBAAC,sCAA8B,IAAC,cAAc,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,GAAI,CACvE;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,EAcS,EAAE,EAAE;QAdb,EACvB,MAAM,EACN,OAAO,EACP,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,SAAS,EACT,SAAS,EACT,sBAAsB,GAAG,KAAK,EAC9B,cAAc,EACd,SA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AClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5C,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM;IACN,KAAK;IACL,QAAQ;CACT,CAAC,CAAC;AAEM,wBAAM","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { type ButtonBase } from '../button';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { FilledButton } from '../filled-button';\nimport {\n ExclamationCircleIconOutline,\n ExclamationTriangleIconOutline,\n InformationCircleIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Modal, ModalCloseReason } from '../modal';\nimport { OutlinedButton } from '../outlined-button';\nimport { TextButton } from '../text-button';\nimport { Typography } from '../typography';\nimport { DialogContext, useDialogContext } from './dialog-context';\nimport {\n type DialogActionsProps,\n DialogCloseReason,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogHeaderProps,\n type DialogImageProps,\n type DialogProps,\n type DialogSubtitleProps,\n type DialogVariant,\n} from './dialog-types';\n\nconst convertCloseReason = (reason: ModalCloseReason): DialogCloseReason => {\n const dialogReason = reason as unknown as DialogCloseReason;\n if (Object.values(DialogCloseReason).includes(dialogReason)) {\n return dialogReason;\n }\n\n throw new Error(`Unknown reason '${reason}' received from popup`);\n};\n/* Stroke width on regular icons is 1.5px */\nconst typeIcons: Record<DialogVariant, React.ReactNode> = {\n danger: <ExclamationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n info: <InformationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n warning: (\n <ExclamationTriangleIconOutline htmlAttributes={{ strokeWidth: 3 }} />\n ),\n};\n\nconst DialogComponent = ({\n isOpen,\n onClose,\n children,\n variant,\n size,\n container,\n rootProps,\n hasDisabledCloseButton = false,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', DialogProps>) => {\n const handleCloseClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n onClose?.(e, DialogCloseReason.CLOSE_BUTTON_CLICK);\n };\n\n const handleClose = (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: ModalCloseReason,\n ) => {\n // Dialog should not be closed when backdrop is clicked\n if (reason === ModalCloseReason.BACKDROP_CLICK) {\n return;\n }\n\n onClose?.(e, reason ? convertCloseReason(reason) : undefined);\n };\n\n if (!isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-dialog', className, {\n 'ndl-with-close-button': !hasDisabledCloseButton,\n 'ndl-with-icon': !!variant,\n });\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={handleClose}\n container={container}\n rootProps={rootProps}\n size={size}\n htmlAttributes={htmlAttributes}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n >\n <DialogContext.Provider value={{ variant }}>\n {!hasDisabledCloseButton && (\n <CleanIconButton\n size=\"medium\"\n className=\"ndl-dialog-close\"\n onClick={handleCloseClick}\n description=\"Close\"\n htmlAttributes={{\n 'data-testid': 'ndl-dialog-close',\n role: 'button',\n }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n )}\n <div className=\"ndl-dialog-content-wrapper\">\n {variant && (\n <div\n className={`ndl-dialog-type-icon ndl-${variant}`}\n data-testid=\"ndl-dialog-type-icon\"\n >\n {typeIcons[variant]}\n </div>\n )}\n <div className=\"n-flex n-flex-col n-flex-1 n-w-full\">{children}</div>\n </div>\n </DialogContext.Provider>\n </Modal>\n );\n};\n\nconst Actions = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogActionsProps>) => {\n const { variant } = useDialogContext();\n const classes = classNames('ndl-dialog-actions', className);\n const Component: React.ElementType = as ?? 'div';\n\n let childrenToRender = children;\n\n // For danger dialogs, we want to convert primary buttons to danger buttons by default\n if (variant === 'danger') {\n childrenToRender = React.Children.map(children, (element) => {\n if (!React.isValidElement(element)) return;\n if (\n element.type === OutlinedButton ||\n element.type === FilledButton ||\n element.type === TextButton\n ) {\n const buttonElement = element as React.ReactElement<\n React.ComponentProps<typeof ButtonBase>\n >;\n\n if (\n buttonElement.props.variant === 'primary' ||\n buttonElement.props.variant === undefined\n ) {\n return React.cloneElement(buttonElement, {\n ...buttonElement.props,\n variant: 'danger',\n });\n }\n }\n return element;\n });\n }\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {childrenToRender}\n </Component>\n );\n};\n\nconst Header = <T extends React.ElementType = 'span'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogHeaderProps>) => {\n const classes = classNames('ndl-dialog-header', className);\n const Component: React.ElementType = as ?? 'span';\n\n return (\n <Typography\n as={Component}\n variant=\"title-2\"\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst Subtitle = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogSubtitleProps>) => {\n const classes = classNames('ndl-dialog-subtitle', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Description = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogDescriptionProps>) => {\n const classes = classNames('ndl-dialog-description', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Content = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogContentProps>) => {\n const classes = classNames('ndl-dialog-content', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Image = ({\n src,\n alt,\n className,\n style,\n htmlAttributes,\n ref,\n}: CommonProps<'img', DialogImageProps>) => {\n const classes = classNames('ndl-dialog-image', className);\n\n return (\n <img\n src={src}\n alt={alt}\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n />\n );\n};\n\nconst Dialog = Object.assign(DialogComponent, {\n Actions,\n Content,\n Description,\n Header,\n Image,\n Subtitle,\n});\n\nexport { Dialog };\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/dialog/Dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AACpC,kDAA0B;AAO1B,4DAAuD;AACvD,oDAAgD;AAChD,oCAKkB;AAClB,oCAAmD;AACnD,wDAAoD;AACpD,gDAA4C;AAC5C,8CAA2C;AAC3C,qDAAmE;AACnE,iDASwB;AAExB,MAAM,kBAAkB,GAAG,CAAC,MAAwB,EAAqB,EAAE;IACzE,MAAM,YAAY,GAAG,MAAsC,CAAC;IAC5D,IAAI,MAAM,CAAC,MAAM,CAAC,gCAAiB,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EA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EACL,cAAc,EACd,GAAG,GAC2C,EAAE,EAAE;IAClD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IAEjD,OAAO,CACL,uBAAC,SAAS,kBAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAM,cAAc,cACtE,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,EACb,GAAG,EACH,GAAG,EACH,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,GACkC,EAAE,EAAE;IACzC,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAE1D,OAAO,CACL,8CACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5C,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM;IACN,KAAK;IACL,QAAQ;CACT,CAAC,CAAC;AAEM,wBAAM","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { type ButtonBase } from '../button';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { FilledButton } from '../filled-button';\nimport {\n ExclamationCircleIconOutline,\n ExclamationTriangleIconOutline,\n InformationCircleIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Modal, ModalCloseReason } from '../modal';\nimport { OutlinedButton } from '../outlined-button';\nimport { TextButton } from '../text-button';\nimport { Typography } from '../typography';\nimport { DialogContext, useDialogContext } from './dialog-context';\nimport {\n type DialogActionsProps,\n DialogCloseReason,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogHeaderProps,\n type DialogImageProps,\n type DialogProps,\n type DialogSubtitleProps,\n} from './dialog-types';\n\nconst convertCloseReason = (reason: ModalCloseReason): DialogCloseReason => {\n const dialogReason = reason as unknown as DialogCloseReason;\n if (Object.values(DialogCloseReason).includes(dialogReason)) {\n return dialogReason;\n }\n\n throw new Error(`Unknown reason '${reason}' received from popup`);\n};\n/* Stroke width on regular icons is 1.5px */\nconst typeIcons: Record<\n NonNullable<React.ComponentProps<typeof Dialog>['variant']>,\n React.ReactNode\n> = {\n danger: <ExclamationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n info: <InformationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n warning: (\n <ExclamationTriangleIconOutline htmlAttributes={{ strokeWidth: 3 }} />\n ),\n};\n\nconst DialogComponent = ({\n isOpen,\n onClose,\n children,\n variant,\n size,\n container,\n rootProps,\n hasDisabledCloseButton = false,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', DialogProps>) => {\n const handleCloseClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n onClose?.(e, DialogCloseReason.CLOSE_BUTTON_CLICK);\n };\n\n const handleClose = (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: ModalCloseReason,\n ) => {\n // Dialog should not be closed when backdrop is clicked\n if (reason === ModalCloseReason.BACKDROP_CLICK) {\n return;\n }\n\n onClose?.(e, reason ? convertCloseReason(reason) : undefined);\n };\n\n if (!isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-dialog', className, {\n 'ndl-with-close-button': !hasDisabledCloseButton,\n 'ndl-with-icon': !!variant,\n });\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={handleClose}\n container={container}\n rootProps={rootProps}\n size={size}\n htmlAttributes={htmlAttributes}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n >\n <DialogContext.Provider value={{ variant }}>\n {!hasDisabledCloseButton && (\n <CleanIconButton\n size=\"medium\"\n className=\"ndl-dialog-close\"\n onClick={handleCloseClick}\n description=\"Close\"\n htmlAttributes={{\n 'data-testid': 'ndl-dialog-close',\n role: 'button',\n }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n )}\n <div className=\"ndl-dialog-content-wrapper\">\n {variant && (\n <div\n className={`ndl-dialog-type-icon ndl-${variant}`}\n data-testid=\"ndl-dialog-type-icon\"\n >\n {typeIcons[variant]}\n </div>\n )}\n <div className=\"n-flex n-flex-col n-flex-1 n-w-full\">{children}</div>\n </div>\n </DialogContext.Provider>\n </Modal>\n );\n};\n\nconst Actions = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogActionsProps>) => {\n const { variant } = useDialogContext();\n const classes = classNames('ndl-dialog-actions', className);\n const Component: React.ElementType = as ?? 'div';\n\n let childrenToRender = children;\n\n // For danger dialogs, we want to convert primary buttons to danger buttons by default\n if (variant === 'danger') {\n childrenToRender = React.Children.map(children, (element) => {\n if (!React.isValidElement(element)) return;\n if (\n element.type === OutlinedButton ||\n element.type === FilledButton ||\n element.type === TextButton\n ) {\n const buttonElement = element as React.ReactElement<\n React.ComponentProps<typeof ButtonBase>\n >;\n\n if (\n buttonElement.props.variant === 'primary' ||\n buttonElement.props.variant === undefined\n ) {\n return React.cloneElement(buttonElement, {\n ...buttonElement.props,\n variant: 'danger',\n });\n }\n }\n return element;\n });\n }\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {childrenToRender}\n </Component>\n );\n};\n\nconst Header = <T extends React.ElementType = 'span'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogHeaderProps>) => {\n const classes = classNames('ndl-dialog-header', className);\n const Component: React.ElementType = as ?? 'span';\n\n return (\n <Typography\n as={Component}\n variant=\"title-2\"\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst Subtitle = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogSubtitleProps>) => {\n const classes = classNames('ndl-dialog-subtitle', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Description = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogDescriptionProps>) => {\n const classes = classNames('ndl-dialog-description', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Content = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogContentProps>) => {\n const classes = classNames('ndl-dialog-content', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Image = ({\n src,\n alt,\n className,\n style,\n htmlAttributes,\n ref,\n}: CommonProps<'img', DialogImageProps>) => {\n const classes = classNames('ndl-dialog-image', className);\n\n return (\n <img\n src={src}\n alt={alt}\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n />\n );\n};\n\nconst Dialog = Object.assign(DialogComponent, {\n Actions,\n Content,\n Description,\n Header,\n Image,\n Subtitle,\n});\n\nexport { Dialog };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-context.js","sourceRoot":"","sources":["../../../src/dialog/dialog-context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,iCAAmC;AACnC,kDAA0B;AAQb,QAAA,aAAa,GAAG,eAAK,CAAC,aAAa,CAC9C,IAAI,CACL,CAAC;AAEK,MAAM,gBAAgB,GAAG,GAAsB,EAAE;IACtD,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,qBAAa,CAAC,CAAC;IAExC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,qBAAa,CAAC,CAAC;IAExC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAJW,QAAA,iBAAiB,qBAI5B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useContext } from 'react';\nimport React from 'react';\n\nimport type { DialogVariant } from './dialog-types';\n\ninterface DialogContextType {\n variant?: DialogVariant;\n}\n\nexport const DialogContext = React.createContext<DialogContextType | null>(\n null,\n);\n\nexport const useDialogContext = (): DialogContextType => {\n const value = useContext(DialogContext);\n\n if (!value) {\n throw new Error(\n 'Accessing `useDialogContext` outside of the context provider',\n );\n }\n\n return value;\n};\n\nexport const useIsInsideDialog = () => {\n const value = useContext(DialogContext);\n\n return Boolean(value);\n};\n"]}
1
+ {"version":3,"file":"dialog-context.js","sourceRoot":"","sources":["../../../src/dialog/dialog-context.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,iCAAmC;AACnC,kDAA0B;AAIb,QAAA,aAAa,GAAG,eAAK,CAAC,aAAa,CAC9C,IAAI,CACL,CAAC;AAEK,MAAM,gBAAgB,GAAG,GAAsB,EAAE;IACtD,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,qBAAa,CAAC,CAAC;IAExC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,IAAA,kBAAU,EAAC,qBAAa,CAAC,CAAC;IAExC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAJW,QAAA,iBAAiB,qBAI5B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useContext } from 'react';\nimport React from 'react';\n\nimport { type DialogContextType } from './dialog-types';\n\nexport const DialogContext = React.createContext<DialogContextType | null>(\n null,\n);\n\nexport const useDialogContext = (): DialogContextType => {\n const value = useContext(DialogContext);\n\n if (!value) {\n throw new Error(\n 'Accessing `useDialogContext` outside of the context provider',\n );\n }\n\n return value;\n};\n\nexport const useIsInsideDialog = () => {\n const value = useContext(DialogContext);\n\n return Boolean(value);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-types.js","sourceRoot":"","sources":["../../../src/dialog/dialog-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AASH,iCAAiC;AACjC,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,4DAAuC,CAAA;AACzC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { ModalProps } from '../modal';\n\nexport interface DialogBaseProps {\n /** The content to display within the dialog component. */\n children?: React.ReactNode;\n}\n\n// Should extend ModalCloseReason\nexport enum DialogCloseReason {\n ESCAPE_KEY_DOWN = 'escapeKeyDown',\n CLOSE_BUTTON_CLICK = 'closeButtonClick',\n}\n\nexport type DialogVariant = 'info' | 'warning' | 'danger';\nexport interface DialogProps extends Omit<ModalProps, 'onClose'> {\n /** Controls whether the dialog is open or closed. */\n isOpen: boolean;\n /** Type of dialog, which determines the icon and styling. */\n variant?: DialogVariant;\n /** Whether to disable the close button in the top-right corner. */\n hasDisabledCloseButton?: boolean;\n /** Callback function called when the dialog is closed. */\n onClose?: (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: DialogCloseReason,\n ) => void;\n}\n\nexport interface DialogContextType {\n type?: DialogVariant;\n}\n\nexport type DialogActionsProps = DialogBaseProps;\n\nexport type DialogHeaderProps = DialogBaseProps;\n\nexport type DialogSubtitleProps = DialogBaseProps;\n\nexport type DialogDescriptionProps = DialogBaseProps;\n\nexport type DialogContentProps = DialogBaseProps;\n\nexport type DialogImageProps = {\n /** Source URL of the image */\n src: string;\n /** Alternative text for the image */\n alt: string;\n};\n"]}
1
+ {"version":3,"file":"dialog-types.js","sourceRoot":"","sources":["../../../src/dialog/dialog-types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AASH,iCAAiC;AACjC,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,4DAAuC,CAAA;AACzC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { ModalProps } from '../modal';\n\nexport interface DialogBaseProps {\n /** The content to display within the dialog component. */\n children?: React.ReactNode;\n}\n\n// Should extend ModalCloseReason\nexport enum DialogCloseReason {\n ESCAPE_KEY_DOWN = 'escapeKeyDown',\n CLOSE_BUTTON_CLICK = 'closeButtonClick',\n}\n\nexport interface DialogProps extends Omit<ModalProps, 'onClose'> {\n /** Controls whether the dialog is open or closed. */\n isOpen: boolean;\n /** Type of dialog, which determines the icon and styling. */\n variant?: 'info' | 'warning' | 'danger';\n /** Whether to disable the close button in the top-right corner. */\n hasDisabledCloseButton?: boolean;\n /** Callback function called when the dialog is closed. */\n onClose?: (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: DialogCloseReason,\n ) => void;\n}\n\nexport interface DialogContextType {\n variant?: DialogProps['variant'];\n}\n\nexport type DialogActionsProps = DialogBaseProps;\n\nexport type DialogHeaderProps = DialogBaseProps;\n\nexport type DialogSubtitleProps = DialogBaseProps;\n\nexport type DialogDescriptionProps = DialogBaseProps;\n\nexport type DialogContentProps = DialogBaseProps;\n\nexport type DialogImageProps = {\n /** Source URL of the image */\n src: string;\n /** Alternative text for the image */\n alt: string;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,mCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Dialog } from './Dialog';\nexport { type DialogVariant } from './dialog-types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,mCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Dialog } from './Dialog';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/dialog/Dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAo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","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { type ButtonBase } from '../button';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { FilledButton } from '../filled-button';\nimport {\n ExclamationCircleIconOutline,\n ExclamationTriangleIconOutline,\n InformationCircleIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Modal, ModalCloseReason } from '../modal';\nimport { OutlinedButton } from '../outlined-button';\nimport { TextButton } from '../text-button';\nimport { Typography } from '../typography';\nimport { DialogContext, useDialogContext } from './dialog-context';\nimport {\n type DialogActionsProps,\n DialogCloseReason,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogHeaderProps,\n type DialogImageProps,\n type DialogProps,\n type DialogSubtitleProps,\n type DialogVariant,\n} from './dialog-types';\n\nconst convertCloseReason = (reason: ModalCloseReason): DialogCloseReason => {\n const dialogReason = reason as unknown as DialogCloseReason;\n if (Object.values(DialogCloseReason).includes(dialogReason)) {\n return dialogReason;\n }\n\n throw new Error(`Unknown reason '${reason}' received from popup`);\n};\n/* Stroke width on regular icons is 1.5px */\nconst typeIcons: Record<DialogVariant, React.ReactNode> = {\n danger: <ExclamationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n info: <InformationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n warning: (\n <ExclamationTriangleIconOutline htmlAttributes={{ strokeWidth: 3 }} />\n ),\n};\n\nconst DialogComponent = ({\n isOpen,\n onClose,\n children,\n variant,\n size,\n container,\n rootProps,\n hasDisabledCloseButton = false,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', DialogProps>) => {\n const handleCloseClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n onClose?.(e, DialogCloseReason.CLOSE_BUTTON_CLICK);\n };\n\n const handleClose = (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: ModalCloseReason,\n ) => {\n // Dialog should not be closed when backdrop is clicked\n if (reason === ModalCloseReason.BACKDROP_CLICK) {\n return;\n }\n\n onClose?.(e, reason ? convertCloseReason(reason) : undefined);\n };\n\n if (!isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-dialog', className, {\n 'ndl-with-close-button': !hasDisabledCloseButton,\n 'ndl-with-icon': !!variant,\n });\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={handleClose}\n container={container}\n rootProps={rootProps}\n size={size}\n htmlAttributes={htmlAttributes}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n >\n <DialogContext.Provider value={{ variant }}>\n {!hasDisabledCloseButton && (\n <CleanIconButton\n size=\"medium\"\n className=\"ndl-dialog-close\"\n onClick={handleCloseClick}\n description=\"Close\"\n htmlAttributes={{\n 'data-testid': 'ndl-dialog-close',\n role: 'button',\n }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n )}\n <div className=\"ndl-dialog-content-wrapper\">\n {variant && (\n <div\n className={`ndl-dialog-type-icon ndl-${variant}`}\n data-testid=\"ndl-dialog-type-icon\"\n >\n {typeIcons[variant]}\n </div>\n )}\n <div className=\"n-flex n-flex-col n-flex-1 n-w-full\">{children}</div>\n </div>\n </DialogContext.Provider>\n </Modal>\n );\n};\n\nconst Actions = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogActionsProps>) => {\n const { variant } = useDialogContext();\n const classes = classNames('ndl-dialog-actions', className);\n const Component: React.ElementType = as ?? 'div';\n\n let childrenToRender = children;\n\n // For danger dialogs, we want to convert primary buttons to danger buttons by default\n if (variant === 'danger') {\n childrenToRender = React.Children.map(children, (element) => {\n if (!React.isValidElement(element)) return;\n if (\n element.type === OutlinedButton ||\n element.type === FilledButton ||\n element.type === TextButton\n ) {\n const buttonElement = element as React.ReactElement<\n React.ComponentProps<typeof ButtonBase>\n >;\n\n if (\n buttonElement.props.variant === 'primary' ||\n buttonElement.props.variant === undefined\n ) {\n return React.cloneElement(buttonElement, {\n ...buttonElement.props,\n variant: 'danger',\n });\n }\n }\n return element;\n });\n }\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {childrenToRender}\n </Component>\n );\n};\n\nconst Header = <T extends React.ElementType = 'span'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogHeaderProps>) => {\n const classes = classNames('ndl-dialog-header', className);\n const Component: React.ElementType = as ?? 'span';\n\n return (\n <Typography\n as={Component}\n variant=\"title-2\"\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst Subtitle = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogSubtitleProps>) => {\n const classes = classNames('ndl-dialog-subtitle', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Description = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogDescriptionProps>) => {\n const classes = classNames('ndl-dialog-description', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Content = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogContentProps>) => {\n const classes = classNames('ndl-dialog-content', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Image = ({\n src,\n alt,\n className,\n style,\n htmlAttributes,\n ref,\n}: CommonProps<'img', DialogImageProps>) => {\n const classes = classNames('ndl-dialog-image', className);\n\n return (\n <img\n src={src}\n alt={alt}\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n />\n );\n};\n\nconst Dialog = Object.assign(DialogComponent, {\n Actions,\n Content,\n Description,\n Header,\n Image,\n Subtitle,\n});\n\nexport { Dialog };\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../src/dialog/Dialog.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,4BAA4B,EAC5B,8BAA8B,EAC9B,4BAA4B,EAC5B,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAEL,iBAAiB,GAOlB,MAAM,gBAAg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QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,OAAO,GAAG,CAAsC,EACpD,EAAE,EACF,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,GAC2C,EAAE,EAAE;IAClD,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAC5D,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IAEjD,OAAO,CACL,KAAC,SAAS,kBAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAM,cAAc,cACtE,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,EACb,GAAG,EACH,GAAG,EACH,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,GACkC,EAAE,EAAE;IACzC,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC;IAE1D,OAAO,CACL,4BACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;IAC5C,OAAO;IACP,OAAO;IACP,WAAW;IACX,MAAM;IACN,KAAK;IACL,QAAQ;CACT,CAAC,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React from 'react';\n\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { type ButtonBase } from '../button';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { FilledButton } from '../filled-button';\nimport {\n ExclamationCircleIconOutline,\n ExclamationTriangleIconOutline,\n InformationCircleIconOutline,\n XMarkIconOutline,\n} from '../icons';\nimport { Modal, ModalCloseReason } from '../modal';\nimport { OutlinedButton } from '../outlined-button';\nimport { TextButton } from '../text-button';\nimport { Typography } from '../typography';\nimport { DialogContext, useDialogContext } from './dialog-context';\nimport {\n type DialogActionsProps,\n DialogCloseReason,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogHeaderProps,\n type DialogImageProps,\n type DialogProps,\n type DialogSubtitleProps,\n} from './dialog-types';\n\nconst convertCloseReason = (reason: ModalCloseReason): DialogCloseReason => {\n const dialogReason = reason as unknown as DialogCloseReason;\n if (Object.values(DialogCloseReason).includes(dialogReason)) {\n return dialogReason;\n }\n\n throw new Error(`Unknown reason '${reason}' received from popup`);\n};\n/* Stroke width on regular icons is 1.5px */\nconst typeIcons: Record<\n NonNullable<React.ComponentProps<typeof Dialog>['variant']>,\n React.ReactNode\n> = {\n danger: <ExclamationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n info: <InformationCircleIconOutline htmlAttributes={{ strokeWidth: 3 }} />,\n warning: (\n <ExclamationTriangleIconOutline htmlAttributes={{ strokeWidth: 3 }} />\n ),\n};\n\nconst DialogComponent = ({\n isOpen,\n onClose,\n children,\n variant,\n size,\n container,\n rootProps,\n hasDisabledCloseButton = false,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: CommonProps<'div', DialogProps>) => {\n const handleCloseClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n onClose?.(e, DialogCloseReason.CLOSE_BUTTON_CLICK);\n };\n\n const handleClose = (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: ModalCloseReason,\n ) => {\n // Dialog should not be closed when backdrop is clicked\n if (reason === ModalCloseReason.BACKDROP_CLICK) {\n return;\n }\n\n onClose?.(e, reason ? convertCloseReason(reason) : undefined);\n };\n\n if (!isOpen) {\n return null;\n }\n\n const classes = classNames('ndl-dialog', className, {\n 'ndl-with-close-button': !hasDisabledCloseButton,\n 'ndl-with-icon': !!variant,\n });\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={handleClose}\n container={container}\n rootProps={rootProps}\n size={size}\n htmlAttributes={htmlAttributes}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n >\n <DialogContext.Provider value={{ variant }}>\n {!hasDisabledCloseButton && (\n <CleanIconButton\n size=\"medium\"\n className=\"ndl-dialog-close\"\n onClick={handleCloseClick}\n description=\"Close\"\n htmlAttributes={{\n 'data-testid': 'ndl-dialog-close',\n role: 'button',\n }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n )}\n <div className=\"ndl-dialog-content-wrapper\">\n {variant && (\n <div\n className={`ndl-dialog-type-icon ndl-${variant}`}\n data-testid=\"ndl-dialog-type-icon\"\n >\n {typeIcons[variant]}\n </div>\n )}\n <div className=\"n-flex n-flex-col n-flex-1 n-w-full\">{children}</div>\n </div>\n </DialogContext.Provider>\n </Modal>\n );\n};\n\nconst Actions = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogActionsProps>) => {\n const { variant } = useDialogContext();\n const classes = classNames('ndl-dialog-actions', className);\n const Component: React.ElementType = as ?? 'div';\n\n let childrenToRender = children;\n\n // For danger dialogs, we want to convert primary buttons to danger buttons by default\n if (variant === 'danger') {\n childrenToRender = React.Children.map(children, (element) => {\n if (!React.isValidElement(element)) return;\n if (\n element.type === OutlinedButton ||\n element.type === FilledButton ||\n element.type === TextButton\n ) {\n const buttonElement = element as React.ReactElement<\n React.ComponentProps<typeof ButtonBase>\n >;\n\n if (\n buttonElement.props.variant === 'primary' ||\n buttonElement.props.variant === undefined\n ) {\n return React.cloneElement(buttonElement, {\n ...buttonElement.props,\n variant: 'danger',\n });\n }\n }\n return element;\n });\n }\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {childrenToRender}\n </Component>\n );\n};\n\nconst Header = <T extends React.ElementType = 'span'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogHeaderProps>) => {\n const classes = classNames('ndl-dialog-header', className);\n const Component: React.ElementType = as ?? 'span';\n\n return (\n <Typography\n as={Component}\n variant=\"title-2\"\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n >\n {children}\n </Typography>\n );\n};\n\nconst Subtitle = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogSubtitleProps>) => {\n const classes = classNames('ndl-dialog-subtitle', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Description = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogDescriptionProps>) => {\n const classes = classNames('ndl-dialog-description', className);\n const Component: React.ElementType = as ?? 'div';\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Content = <T extends React.ElementType = 'div'>({\n as,\n children,\n className,\n style,\n htmlAttributes,\n ref,\n}: PolymorphicCommonProps<T, DialogContentProps>) => {\n const classes = classNames('ndl-dialog-content', className);\n const Component: React.ElementType = as ?? 'div';\n\n return (\n <Component className={classes} style={style} ref={ref} {...htmlAttributes}>\n {children}\n </Component>\n );\n};\n\nconst Image = ({\n src,\n alt,\n className,\n style,\n htmlAttributes,\n ref,\n}: CommonProps<'img', DialogImageProps>) => {\n const classes = classNames('ndl-dialog-image', className);\n\n return (\n <img\n src={src}\n alt={alt}\n className={classes}\n style={style}\n ref={ref}\n {...htmlAttributes}\n />\n );\n};\n\nconst Dialog = Object.assign(DialogComponent, {\n Actions,\n Content,\n Description,\n Header,\n Image,\n Subtitle,\n});\n\nexport { Dialog };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-context.js","sourceRoot":"","sources":["../../../src/dialog/dialog-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAC9C,IAAI,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAsB,EAAE;IACtD,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAExC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAExC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useContext } from 'react';\nimport React from 'react';\n\nimport type { DialogVariant } from './dialog-types';\n\ninterface DialogContextType {\n variant?: DialogVariant;\n}\n\nexport const DialogContext = React.createContext<DialogContextType | null>(\n null,\n);\n\nexport const useDialogContext = (): DialogContextType => {\n const value = useContext(DialogContext);\n\n if (!value) {\n throw new Error(\n 'Accessing `useDialogContext` outside of the context provider',\n );\n }\n\n return value;\n};\n\nexport const useIsInsideDialog = () => {\n const value = useContext(DialogContext);\n\n return Boolean(value);\n};\n"]}
1
+ {"version":3,"file":"dialog-context.js","sourceRoot":"","sources":["../../../src/dialog/dialog-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAC9C,IAAI,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAsB,EAAE;IACtD,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAExC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,EAAE;IACpC,MAAM,KAAK,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAExC,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useContext } from 'react';\nimport React from 'react';\n\nimport { type DialogContextType } from './dialog-types';\n\nexport const DialogContext = React.createContext<DialogContextType | null>(\n null,\n);\n\nexport const useDialogContext = (): DialogContextType => {\n const value = useContext(DialogContext);\n\n if (!value) {\n throw new Error(\n 'Accessing `useDialogContext` outside of the context provider',\n );\n }\n\n return value;\n};\n\nexport const useIsInsideDialog = () => {\n const value = useContext(DialogContext);\n\n return Boolean(value);\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-types.js","sourceRoot":"","sources":["../../../src/dialog/dialog-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AASH,iCAAiC;AACjC,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,4DAAuC,CAAA;AACzC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { ModalProps } from '../modal';\n\nexport interface DialogBaseProps {\n /** The content to display within the dialog component. */\n children?: React.ReactNode;\n}\n\n// Should extend ModalCloseReason\nexport enum DialogCloseReason {\n ESCAPE_KEY_DOWN = 'escapeKeyDown',\n CLOSE_BUTTON_CLICK = 'closeButtonClick',\n}\n\nexport type DialogVariant = 'info' | 'warning' | 'danger';\nexport interface DialogProps extends Omit<ModalProps, 'onClose'> {\n /** Controls whether the dialog is open or closed. */\n isOpen: boolean;\n /** Type of dialog, which determines the icon and styling. */\n variant?: DialogVariant;\n /** Whether to disable the close button in the top-right corner. */\n hasDisabledCloseButton?: boolean;\n /** Callback function called when the dialog is closed. */\n onClose?: (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: DialogCloseReason,\n ) => void;\n}\n\nexport interface DialogContextType {\n type?: DialogVariant;\n}\n\nexport type DialogActionsProps = DialogBaseProps;\n\nexport type DialogHeaderProps = DialogBaseProps;\n\nexport type DialogSubtitleProps = DialogBaseProps;\n\nexport type DialogDescriptionProps = DialogBaseProps;\n\nexport type DialogContentProps = DialogBaseProps;\n\nexport type DialogImageProps = {\n /** Source URL of the image */\n src: string;\n /** Alternative text for the image */\n alt: string;\n};\n"]}
1
+ {"version":3,"file":"dialog-types.js","sourceRoot":"","sources":["../../../src/dialog/dialog-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AASH,iCAAiC;AACjC,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;IACjC,4DAAuC,CAAA;AACzC,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { ModalProps } from '../modal';\n\nexport interface DialogBaseProps {\n /** The content to display within the dialog component. */\n children?: React.ReactNode;\n}\n\n// Should extend ModalCloseReason\nexport enum DialogCloseReason {\n ESCAPE_KEY_DOWN = 'escapeKeyDown',\n CLOSE_BUTTON_CLICK = 'closeButtonClick',\n}\n\nexport interface DialogProps extends Omit<ModalProps, 'onClose'> {\n /** Controls whether the dialog is open or closed. */\n isOpen: boolean;\n /** Type of dialog, which determines the icon and styling. */\n variant?: 'info' | 'warning' | 'danger';\n /** Whether to disable the close button in the top-right corner. */\n hasDisabledCloseButton?: boolean;\n /** Callback function called when the dialog is closed. */\n onClose?: (\n e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n reason?: DialogCloseReason,\n ) => void;\n}\n\nexport interface DialogContextType {\n variant?: DialogProps['variant'];\n}\n\nexport type DialogActionsProps = DialogBaseProps;\n\nexport type DialogHeaderProps = DialogBaseProps;\n\nexport type DialogSubtitleProps = DialogBaseProps;\n\nexport type DialogDescriptionProps = DialogBaseProps;\n\nexport type DialogContentProps = DialogBaseProps;\n\nexport type DialogImageProps = {\n /** Source URL of the image */\n src: string;\n /** Alternative text for the image */\n alt: string;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Dialog } from './Dialog';\nexport { type DialogVariant } from './dialog-types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { Dialog } from './Dialog';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/dialog/Dialog.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAe1B,OAAO,EACL,KAAK,kBAAkB,EAEvB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAA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CAAC,WAAW,oEAOzC,sBAAsB,CAAC,CAAC,EAAE,kBAAkB,CAAC;kBAxB3B,CAAC,SAAS,KAAK,CAAC,WAAW,oEAO7C,sBAAsB,CAAC,CAAC,EAAE,sBAAsB,CAAC;aAlDpC,CAAC,SAAS,KAAK,CAAC,WAAW,qEAOxC,sBAAsB,CAAC,CAAC,EAAE,iBAAiB,CAAC;kEA8E5C,WAAW,CAAC,KAAK,EAAE,gBAAgB,CAAC;eA5DrB,CAAC,SAAS,KAAK,CAAC,WAAW,oEAO1C,sBAAsB,CAAC,CAAC,EAAE,mBAAmB,CAAC;CA2E/C,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -19,12 +19,8 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  import React from 'react';
22
- import type { DialogVariant } from './dialog-types';
23
- interface DialogContextType {
24
- variant?: DialogVariant;
25
- }
22
+ import { type DialogContextType } from './dialog-types';
26
23
  export declare const DialogContext: React.Context<DialogContextType | null>;
27
24
  export declare const useDialogContext: () => DialogContextType;
28
25
  export declare const useIsInsideDialog: () => boolean;
29
- export {};
30
26
  //# sourceMappingURL=dialog-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-context.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,UAAU,iBAAiB;IACzB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,eAAO,MAAM,aAAa,yCAEzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,iBAUnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAI7B,CAAC"}
1
+ {"version":3,"file":"dialog-context.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,eAAO,MAAM,aAAa,yCAEzB,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,iBAUnC,CAAC;AAEF,eAAO,MAAM,iBAAiB,eAI7B,CAAC"}
@@ -27,19 +27,18 @@ export declare enum DialogCloseReason {
27
27
  ESCAPE_KEY_DOWN = "escapeKeyDown",
28
28
  CLOSE_BUTTON_CLICK = "closeButtonClick"
29
29
  }
30
- export type DialogVariant = 'info' | 'warning' | 'danger';
31
30
  export interface DialogProps extends Omit<ModalProps, 'onClose'> {
32
31
  /** Controls whether the dialog is open or closed. */
33
32
  isOpen: boolean;
34
33
  /** Type of dialog, which determines the icon and styling. */
35
- variant?: DialogVariant;
34
+ variant?: 'info' | 'warning' | 'danger';
36
35
  /** Whether to disable the close button in the top-right corner. */
37
36
  hasDisabledCloseButton?: boolean;
38
37
  /** Callback function called when the dialog is closed. */
39
38
  onClose?: (e: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: DialogCloseReason) => void;
40
39
  }
41
40
  export interface DialogContextType {
42
- type?: DialogVariant;
41
+ variant?: DialogProps['variant'];
43
42
  }
44
43
  export type DialogActionsProps = DialogBaseProps;
45
44
  export type DialogHeaderProps = DialogBaseProps;
@@ -1 +1 @@
1
- {"version":3,"file":"dialog-types.d.ts","sourceRoot":"","sources":["../../../src/dialog/dialog-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,MAAM,WAAW,eAAe;IAC9B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAGD,oBAAY,iBAAiB;IAC3B,eAAe,kBAAkB;IACjC,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kBAAkB;IACjC,kBAAkB,qBAAqB;CACxC;AAED,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,UAAU,EAAE,SAAS,CAAC;IAC9D,qDAAqD;IACrD,MAAM,EAAE,OAAO,CAAC;IAChB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,mEAAmE;IACnE,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,0DAA0D;IAC1D,OAAO,CAAC,EAAE,CACR,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,EACnE,MAAM,CAAC,EAAE,iBAAiB,KACvB,IAAI,CAAC;CACX;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAAC;AAElD,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,eAAe,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAC;CACb,CAAC"}
@@ -19,5 +19,4 @@
19
19
  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
20
  */
21
21
  export { Dialog } from './Dialog';
22
- export { type DialogVariant } from './dialog-types';
23
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dialog/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "4.0.13",
3
+ "version": "4.0.15",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -86,7 +86,7 @@
86
86
  "@tanstack/react-table": "8.21.3",
87
87
  "react": ">=19.0.0",
88
88
  "react-dom": ">=19.0.0",
89
- "@neo4j-ndl/base": "^4.0.5"
89
+ "@neo4j-ndl/base": "^4.0.6"
90
90
  },
91
91
  "dependencies": {
92
92
  "@dnd-kit/core": "6.3.1",