@vuu-ui/vuu-popups 0.8.58 → 0.8.60

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,30 +1,57 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
+ var core = require('@salt-ds/core');
4
5
  var React = require('react');
5
- var Dialog = require('./Dialog.js');
6
6
 
7
7
  const useDialog = () => {
8
8
  const [dialogState, setDialogState] = React.useState();
9
- const handleClose = React.useCallback(() => {
9
+ const closeDialog = React.useCallback(() => {
10
10
  setDialogState(void 0);
11
11
  }, []);
12
- const dialog = dialogState ? /* @__PURE__ */ jsxRuntime.jsx(
13
- Dialog.Dialog,
14
- {
15
- className: "vuDialog",
16
- isOpen: true,
17
- onClose: handleClose,
18
- title: dialogState.title,
19
- hideCloseButton: dialogState.hideCloseButton,
20
- children: dialogState.content
21
- }
22
- ) : null;
12
+ const handleOpenChange = React.useCallback(
13
+ (open) => {
14
+ if (open !== true) {
15
+ closeDialog();
16
+ }
17
+ },
18
+ [closeDialog]
19
+ );
20
+ const dialog = dialogState ? /* @__PURE__ */ jsxRuntime.jsxs(core.Dialog, { className: "vuuDialog", open: true, onOpenChange: handleOpenChange, children: [
21
+ /* @__PURE__ */ jsxRuntime.jsx(core.DialogHeader, { header: dialogState.title }),
22
+ /* @__PURE__ */ jsxRuntime.jsx(core.DialogContent, { children: dialogState.content }),
23
+ dialogState.hideCloseButton !== true ? /* @__PURE__ */ jsxRuntime.jsx(core.DialogCloseButton, { onClick: closeDialog }) : null
24
+ ] }) : null;
23
25
  return {
24
26
  dialog,
25
27
  setDialogState
26
28
  };
27
29
  };
30
+ const defaultShowDialog = () => {
31
+ console.warn("No DialogProvider in place");
32
+ };
33
+ const DialogContext = React.createContext({
34
+ showDialog: defaultShowDialog
35
+ });
36
+ const DialogProvider = ({ children }) => {
37
+ const { dialog, setDialogState } = useDialog();
38
+ const showDialog = (dialogContent, title) => {
39
+ setDialogState({
40
+ content: dialogContent,
41
+ title
42
+ });
43
+ };
44
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogContext.Provider, { value: { showDialog }, children: [
45
+ children,
46
+ dialog
47
+ ] });
48
+ };
49
+ const useShowDialog = () => {
50
+ const { showDialog } = React.useContext(DialogContext);
51
+ return showDialog;
52
+ };
28
53
 
54
+ exports.DialogProvider = DialogProvider;
29
55
  exports.useDialog = useDialog;
56
+ exports.useShowDialog = useShowDialog;
30
57
  //# sourceMappingURL=useDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDialog.js","sources":["../../src/dialog/useDialog.tsx"],"sourcesContent":["import { ReactElement, useCallback, useState } from \"react\";\nimport { Dialog } from \"./Dialog\";\n\nexport type DialogState = {\n content: ReactElement;\n title: string;\n hideCloseButton?: boolean;\n};\n\nexport type SetDialog = (dialogState?: DialogState) => void;\n\nexport const useDialog = () => {\n const [dialogState, setDialogState] = useState<DialogState>();\n\n const handleClose = useCallback(() => {\n setDialogState(undefined);\n }, []);\n\n const dialog = dialogState ? (\n <Dialog\n className=\"vuDialog\"\n isOpen={true}\n onClose={handleClose}\n title={dialogState.title}\n hideCloseButton={dialogState.hideCloseButton}\n >\n {dialogState.content}\n </Dialog>\n ) : null;\n\n return {\n dialog,\n setDialogState,\n };\n};\n"],"names":["useState","useCallback","jsx","Dialog"],"mappings":";;;;;;AAWO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAIA,cAAsB,EAAA,CAAA;AAE5D,EAAM,MAAA,WAAA,GAAcC,kBAAY,MAAM;AACpC,IAAA,cAAA,CAAe,KAAS,CAAA,CAAA,CAAA;AAAA,GAC1B,EAAG,EAAE,CAAA,CAAA;AAEL,EAAA,MAAM,SAAS,WACb,mBAAAC,cAAA;AAAA,IAACC,aAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,UAAA;AAAA,MACV,MAAQ,EAAA,IAAA;AAAA,MACR,OAAS,EAAA,WAAA;AAAA,MACT,OAAO,WAAY,CAAA,KAAA;AAAA,MACnB,iBAAiB,WAAY,CAAA,eAAA;AAAA,MAE5B,QAAY,EAAA,WAAA,CAAA,OAAA;AAAA,KAAA;AAAA,GAEb,GAAA,IAAA,CAAA;AAEJ,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA;AACF;;;;"}
1
+ {"version":3,"file":"useDialog.js","sources":["../../src/dialog/useDialog.tsx"],"sourcesContent":["import {\n Dialog,\n DialogCloseButton,\n DialogContent,\n DialogHeader,\n} from \"@salt-ds/core\";\nimport {\n createContext,\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nexport type DialogState = {\n content: ReactElement;\n title: string;\n hideCloseButton?: boolean;\n};\n\nexport type SetDialog = (dialogState?: DialogState) => void;\n\nexport interface DialogContextProps {\n showDialog: (dialogContent: ReactElement, title: string) => void;\n}\n\nexport const useDialog = () => {\n const [dialogState, setDialogState] = useState<DialogState>();\n\n const closeDialog = useCallback(() => {\n setDialogState(undefined);\n }, []);\n\n const handleOpenChange = useCallback(\n (open?: boolean) => {\n if (open !== true) {\n closeDialog();\n }\n },\n [closeDialog]\n );\n\n const dialog = dialogState ? (\n <Dialog className=\"vuuDialog\" open={true} onOpenChange={handleOpenChange}>\n <DialogHeader header={dialogState.title} />\n <DialogContent>{dialogState.content}</DialogContent>\n {dialogState.hideCloseButton !== true ? (\n <DialogCloseButton onClick={closeDialog} />\n ) : null}\n </Dialog>\n ) : null;\n\n return {\n dialog,\n setDialogState,\n };\n};\n\nconst defaultShowDialog = () => {\n console.warn(\"No DialogProvider in place\");\n};\n\nconst DialogContext = createContext<DialogContextProps>({\n showDialog: defaultShowDialog,\n});\n\nexport const DialogProvider = ({ children }: { children: ReactNode }) => {\n const { dialog, setDialogState } = useDialog();\n const showDialog = (dialogContent: ReactElement, title: string) => {\n setDialogState({\n content: dialogContent,\n title,\n });\n };\n return (\n <DialogContext.Provider value={{ showDialog }}>\n {children}\n {dialog}\n </DialogContext.Provider>\n );\n};\n\nexport const useShowDialog = () => {\n const { showDialog } = useContext(DialogContext);\n return showDialog;\n};\n"],"names":["useState","useCallback","jsxs","Dialog","jsx","DialogHeader","DialogContent","DialogCloseButton","createContext","useContext"],"mappings":";;;;;;AA2BO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAIA,cAAsB,EAAA,CAAA;AAE5D,EAAM,MAAA,WAAA,GAAcC,kBAAY,MAAM;AACpC,IAAA,cAAA,CAAe,KAAS,CAAA,CAAA,CAAA;AAAA,GAC1B,EAAG,EAAE,CAAA,CAAA;AAEL,EAAA,MAAM,gBAAmB,GAAAA,iBAAA;AAAA,IACvB,CAAC,IAAmB,KAAA;AAClB,MAAA,IAAI,SAAS,IAAM,EAAA;AACjB,QAAY,WAAA,EAAA,CAAA;AAAA,OACd;AAAA,KACF;AAAA,IACA,CAAC,WAAW,CAAA;AAAA,GACd,CAAA;AAEA,EAAM,MAAA,MAAA,GAAS,8BACZC,eAAA,CAAAC,WAAA,EAAA,EAAO,WAAU,WAAY,EAAA,IAAA,EAAM,IAAM,EAAA,YAAA,EAAc,gBACtD,EAAA,QAAA,EAAA;AAAA,oBAACC,cAAA,CAAAC,iBAAA,EAAA,EAAa,MAAQ,EAAA,WAAA,CAAY,KAAO,EAAA,CAAA;AAAA,oBACzCD,cAAA,CAACE,kBAAe,EAAA,EAAA,QAAA,EAAA,WAAA,CAAY,OAAQ,EAAA,CAAA;AAAA,IACnC,YAAY,eAAoB,KAAA,IAAA,kCAC9BC,sBAAkB,EAAA,EAAA,OAAA,EAAS,aAAa,CACvC,GAAA,IAAA;AAAA,GAAA,EACN,CACE,GAAA,IAAA,CAAA;AAEJ,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA;AACF,EAAA;AAEA,MAAM,oBAAoB,MAAM;AAC9B,EAAA,OAAA,CAAQ,KAAK,4BAA4B,CAAA,CAAA;AAC3C,CAAA,CAAA;AAEA,MAAM,gBAAgBC,mBAAkC,CAAA;AAAA,EACtD,UAAY,EAAA,iBAAA;AACd,CAAC,CAAA,CAAA;AAEM,MAAM,cAAiB,GAAA,CAAC,EAAE,QAAA,EAAwC,KAAA;AACvE,EAAA,MAAM,EAAE,MAAA,EAAQ,cAAe,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7C,EAAM,MAAA,UAAA,GAAa,CAAC,aAAA,EAA6B,KAAkB,KAAA;AACjE,IAAe,cAAA,CAAA;AAAA,MACb,OAAS,EAAA,aAAA;AAAA,MACT,KAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH,CAAA;AACA,EAAA,uCACG,aAAc,CAAA,QAAA,EAAd,EAAuB,KAAO,EAAA,EAAE,YAC9B,EAAA,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,MAAA;AAAA,GACH,EAAA,CAAA,CAAA;AAEJ,EAAA;AAEO,MAAM,gBAAgB,MAAM;AACjC,EAAA,MAAM,EAAE,UAAA,EAAe,GAAAC,gBAAA,CAAW,aAAa,CAAA,CAAA;AAC/C,EAAO,OAAA,UAAA,CAAA;AACT;;;;;;"}
package/cjs/index.js CHANGED
@@ -22,7 +22,9 @@ var ToastNotification = require('./notifications/ToastNotification.js');
22
22
 
23
23
 
24
24
  exports.Dialog = Dialog.Dialog;
25
+ exports.DialogProvider = useDialog.DialogProvider;
25
26
  exports.useDialog = useDialog.useDialog;
27
+ exports.useShowDialog = useDialog.useShowDialog;
26
28
  exports.DialogHeader = DialogHeader.DialogHeader;
27
29
  exports.ContextMenu = ContextMenu.ContextMenu;
28
30
  exports.MenuItem = MenuList.MenuItem;
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,28 +1,53 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { useState, useCallback } from 'react';
3
- import { Dialog } from './Dialog.js';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Dialog, DialogHeader, DialogContent, DialogCloseButton } from '@salt-ds/core';
3
+ import { createContext, useState, useCallback, useContext } from 'react';
4
4
 
5
5
  const useDialog = () => {
6
6
  const [dialogState, setDialogState] = useState();
7
- const handleClose = useCallback(() => {
7
+ const closeDialog = useCallback(() => {
8
8
  setDialogState(void 0);
9
9
  }, []);
10
- const dialog = dialogState ? /* @__PURE__ */ jsx(
11
- Dialog,
12
- {
13
- className: "vuDialog",
14
- isOpen: true,
15
- onClose: handleClose,
16
- title: dialogState.title,
17
- hideCloseButton: dialogState.hideCloseButton,
18
- children: dialogState.content
19
- }
20
- ) : null;
10
+ const handleOpenChange = useCallback(
11
+ (open) => {
12
+ if (open !== true) {
13
+ closeDialog();
14
+ }
15
+ },
16
+ [closeDialog]
17
+ );
18
+ const dialog = dialogState ? /* @__PURE__ */ jsxs(Dialog, { className: "vuuDialog", open: true, onOpenChange: handleOpenChange, children: [
19
+ /* @__PURE__ */ jsx(DialogHeader, { header: dialogState.title }),
20
+ /* @__PURE__ */ jsx(DialogContent, { children: dialogState.content }),
21
+ dialogState.hideCloseButton !== true ? /* @__PURE__ */ jsx(DialogCloseButton, { onClick: closeDialog }) : null
22
+ ] }) : null;
21
23
  return {
22
24
  dialog,
23
25
  setDialogState
24
26
  };
25
27
  };
28
+ const defaultShowDialog = () => {
29
+ console.warn("No DialogProvider in place");
30
+ };
31
+ const DialogContext = createContext({
32
+ showDialog: defaultShowDialog
33
+ });
34
+ const DialogProvider = ({ children }) => {
35
+ const { dialog, setDialogState } = useDialog();
36
+ const showDialog = (dialogContent, title) => {
37
+ setDialogState({
38
+ content: dialogContent,
39
+ title
40
+ });
41
+ };
42
+ return /* @__PURE__ */ jsxs(DialogContext.Provider, { value: { showDialog }, children: [
43
+ children,
44
+ dialog
45
+ ] });
46
+ };
47
+ const useShowDialog = () => {
48
+ const { showDialog } = useContext(DialogContext);
49
+ return showDialog;
50
+ };
26
51
 
27
- export { useDialog };
52
+ export { DialogProvider, useDialog, useShowDialog };
28
53
  //# sourceMappingURL=useDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useDialog.js","sources":["../../src/dialog/useDialog.tsx"],"sourcesContent":["import { ReactElement, useCallback, useState } from \"react\";\nimport { Dialog } from \"./Dialog\";\n\nexport type DialogState = {\n content: ReactElement;\n title: string;\n hideCloseButton?: boolean;\n};\n\nexport type SetDialog = (dialogState?: DialogState) => void;\n\nexport const useDialog = () => {\n const [dialogState, setDialogState] = useState<DialogState>();\n\n const handleClose = useCallback(() => {\n setDialogState(undefined);\n }, []);\n\n const dialog = dialogState ? (\n <Dialog\n className=\"vuDialog\"\n isOpen={true}\n onClose={handleClose}\n title={dialogState.title}\n hideCloseButton={dialogState.hideCloseButton}\n >\n {dialogState.content}\n </Dialog>\n ) : null;\n\n return {\n dialog,\n setDialogState,\n };\n};\n"],"names":[],"mappings":";;;;AAWO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,QAAsB,EAAA,CAAA;AAE5D,EAAM,MAAA,WAAA,GAAc,YAAY,MAAM;AACpC,IAAA,cAAA,CAAe,KAAS,CAAA,CAAA,CAAA;AAAA,GAC1B,EAAG,EAAE,CAAA,CAAA;AAEL,EAAA,MAAM,SAAS,WACb,mBAAA,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,SAAU,EAAA,UAAA;AAAA,MACV,MAAQ,EAAA,IAAA;AAAA,MACR,OAAS,EAAA,WAAA;AAAA,MACT,OAAO,WAAY,CAAA,KAAA;AAAA,MACnB,iBAAiB,WAAY,CAAA,eAAA;AAAA,MAE5B,QAAY,EAAA,WAAA,CAAA,OAAA;AAAA,KAAA;AAAA,GAEb,GAAA,IAAA,CAAA;AAEJ,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA;AACF;;;;"}
1
+ {"version":3,"file":"useDialog.js","sources":["../../src/dialog/useDialog.tsx"],"sourcesContent":["import {\n Dialog,\n DialogCloseButton,\n DialogContent,\n DialogHeader,\n} from \"@salt-ds/core\";\nimport {\n createContext,\n ReactElement,\n ReactNode,\n useCallback,\n useContext,\n useState,\n} from \"react\";\n\nexport type DialogState = {\n content: ReactElement;\n title: string;\n hideCloseButton?: boolean;\n};\n\nexport type SetDialog = (dialogState?: DialogState) => void;\n\nexport interface DialogContextProps {\n showDialog: (dialogContent: ReactElement, title: string) => void;\n}\n\nexport const useDialog = () => {\n const [dialogState, setDialogState] = useState<DialogState>();\n\n const closeDialog = useCallback(() => {\n setDialogState(undefined);\n }, []);\n\n const handleOpenChange = useCallback(\n (open?: boolean) => {\n if (open !== true) {\n closeDialog();\n }\n },\n [closeDialog]\n );\n\n const dialog = dialogState ? (\n <Dialog className=\"vuuDialog\" open={true} onOpenChange={handleOpenChange}>\n <DialogHeader header={dialogState.title} />\n <DialogContent>{dialogState.content}</DialogContent>\n {dialogState.hideCloseButton !== true ? (\n <DialogCloseButton onClick={closeDialog} />\n ) : null}\n </Dialog>\n ) : null;\n\n return {\n dialog,\n setDialogState,\n };\n};\n\nconst defaultShowDialog = () => {\n console.warn(\"No DialogProvider in place\");\n};\n\nconst DialogContext = createContext<DialogContextProps>({\n showDialog: defaultShowDialog,\n});\n\nexport const DialogProvider = ({ children }: { children: ReactNode }) => {\n const { dialog, setDialogState } = useDialog();\n const showDialog = (dialogContent: ReactElement, title: string) => {\n setDialogState({\n content: dialogContent,\n title,\n });\n };\n return (\n <DialogContext.Provider value={{ showDialog }}>\n {children}\n {dialog}\n </DialogContext.Provider>\n );\n};\n\nexport const useShowDialog = () => {\n const { showDialog } = useContext(DialogContext);\n return showDialog;\n};\n"],"names":[],"mappings":";;;;AA2BO,MAAM,YAAY,MAAM;AAC7B,EAAA,MAAM,CAAC,WAAA,EAAa,cAAc,CAAA,GAAI,QAAsB,EAAA,CAAA;AAE5D,EAAM,MAAA,WAAA,GAAc,YAAY,MAAM;AACpC,IAAA,cAAA,CAAe,KAAS,CAAA,CAAA,CAAA;AAAA,GAC1B,EAAG,EAAE,CAAA,CAAA;AAEL,EAAA,MAAM,gBAAmB,GAAA,WAAA;AAAA,IACvB,CAAC,IAAmB,KAAA;AAClB,MAAA,IAAI,SAAS,IAAM,EAAA;AACjB,QAAY,WAAA,EAAA,CAAA;AAAA,OACd;AAAA,KACF;AAAA,IACA,CAAC,WAAW,CAAA;AAAA,GACd,CAAA;AAEA,EAAM,MAAA,MAAA,GAAS,8BACZ,IAAA,CAAA,MAAA,EAAA,EAAO,WAAU,WAAY,EAAA,IAAA,EAAM,IAAM,EAAA,YAAA,EAAc,gBACtD,EAAA,QAAA,EAAA;AAAA,oBAAC,GAAA,CAAA,YAAA,EAAA,EAAa,MAAQ,EAAA,WAAA,CAAY,KAAO,EAAA,CAAA;AAAA,oBACzC,GAAA,CAAC,aAAe,EAAA,EAAA,QAAA,EAAA,WAAA,CAAY,OAAQ,EAAA,CAAA;AAAA,IACnC,YAAY,eAAoB,KAAA,IAAA,uBAC9B,iBAAkB,EAAA,EAAA,OAAA,EAAS,aAAa,CACvC,GAAA,IAAA;AAAA,GAAA,EACN,CACE,GAAA,IAAA,CAAA;AAEJ,EAAO,OAAA;AAAA,IACL,MAAA;AAAA,IACA,cAAA;AAAA,GACF,CAAA;AACF,EAAA;AAEA,MAAM,oBAAoB,MAAM;AAC9B,EAAA,OAAA,CAAQ,KAAK,4BAA4B,CAAA,CAAA;AAC3C,CAAA,CAAA;AAEA,MAAM,gBAAgB,aAAkC,CAAA;AAAA,EACtD,UAAY,EAAA,iBAAA;AACd,CAAC,CAAA,CAAA;AAEM,MAAM,cAAiB,GAAA,CAAC,EAAE,QAAA,EAAwC,KAAA;AACvE,EAAA,MAAM,EAAE,MAAA,EAAQ,cAAe,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7C,EAAM,MAAA,UAAA,GAAa,CAAC,aAAA,EAA6B,KAAkB,KAAA;AACjE,IAAe,cAAA,CAAA;AAAA,MACb,OAAS,EAAA,aAAA;AAAA,MACT,KAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH,CAAA;AACA,EAAA,4BACG,aAAc,CAAA,QAAA,EAAd,EAAuB,KAAO,EAAA,EAAE,YAC9B,EAAA,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,MAAA;AAAA,GACH,EAAA,CAAA,CAAA;AAEJ,EAAA;AAEO,MAAM,gBAAgB,MAAM;AACjC,EAAA,MAAM,EAAE,UAAA,EAAe,GAAA,UAAA,CAAW,aAAa,CAAA,CAAA;AAC/C,EAAO,OAAA,UAAA,CAAA;AACT;;;;"}
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Dialog } from './dialog/Dialog.js';
2
- export { useDialog } from './dialog/useDialog.js';
2
+ export { DialogProvider, useDialog, useShowDialog } from './dialog/useDialog.js';
3
3
  export { DialogHeader } from './dialog-header/DialogHeader.js';
4
4
  export { ContextMenu } from './menu/ContextMenu.js';
5
5
  export { MenuItem, MenuItemGroup, MenuList, Separator, isMenuItemGroup, isMenuItemLabel } from './menu/MenuList.js';
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
- "version": "0.8.58",
2
+ "version": "0.8.60",
3
3
  "description": "VUU popup components - Context Menu, Dialog etc",
4
4
  "author": "heswell",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
7
- "@salt-ds/core": "1.22.0",
7
+ "@salt-ds/core": "1.27.1",
8
8
  "@salt-ds/styles": "0.2.1",
9
9
  "@salt-ds/window": "0.1.1",
10
- "@vuu-ui/vuu-data-types": "0.8.58",
11
- "@vuu-ui/vuu-layout": "0.8.58",
12
- "@vuu-ui/vuu-utils": "0.8.58",
13
- "@vuu-ui/vuu-ui-controls": "0.8.58"
10
+ "@vuu-ui/vuu-data-types": "0.8.60",
11
+ "@vuu-ui/vuu-layout": "0.8.60",
12
+ "@vuu-ui/vuu-utils": "0.8.60",
13
+ "@vuu-ui/vuu-ui-controls": "0.8.60"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "clsx": "^2.0.0",
@@ -1,11 +1,18 @@
1
- import { ReactElement } from "react";
1
+ import { ReactElement, ReactNode } from "react";
2
2
  export type DialogState = {
3
3
  content: ReactElement;
4
4
  title: string;
5
5
  hideCloseButton?: boolean;
6
6
  };
7
7
  export type SetDialog = (dialogState?: DialogState) => void;
8
+ export interface DialogContextProps {
9
+ showDialog: (dialogContent: ReactElement, title: string) => void;
10
+ }
8
11
  export declare const useDialog: () => {
9
12
  dialog: JSX.Element | null;
10
13
  setDialogState: import("react").Dispatch<import("react").SetStateAction<DialogState | undefined>>;
11
14
  };
15
+ export declare const DialogProvider: ({ children }: {
16
+ children: ReactNode;
17
+ }) => JSX.Element;
18
+ export declare const useShowDialog: () => (dialogContent: ReactElement, title: string) => void;