@activecollab/components 1.0.211 → 1.0.213

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cjs/components/Dialog/Dialog.js +34 -14
  2. package/dist/cjs/components/Dialog/Dialog.js.map +1 -1
  3. package/dist/cjs/components/Dialog/DialogActions.js +4 -0
  4. package/dist/cjs/components/Dialog/DialogActions.js.map +1 -1
  5. package/dist/cjs/components/Dialog/DialogContent.js +4 -0
  6. package/dist/cjs/components/Dialog/DialogContent.js.map +1 -1
  7. package/dist/cjs/components/Dialog/DialogContentDivider.js +4 -0
  8. package/dist/cjs/components/Dialog/DialogContentDivider.js.map +1 -1
  9. package/dist/cjs/components/Dialog/DialogContext.js +18 -0
  10. package/dist/cjs/components/Dialog/DialogContext.js.map +1 -0
  11. package/dist/cjs/components/Dialog/DialogTitle.js +2 -0
  12. package/dist/cjs/components/Dialog/DialogTitle.js.map +1 -1
  13. package/dist/cjs/components/Dialog/index.js.map +1 -1
  14. package/dist/esm/components/Dialog/Dialog.d.ts +25 -4
  15. package/dist/esm/components/Dialog/Dialog.d.ts.map +1 -1
  16. package/dist/esm/components/Dialog/Dialog.js +34 -13
  17. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  18. package/dist/esm/components/Dialog/DialogActions.d.ts +5 -2
  19. package/dist/esm/components/Dialog/DialogActions.d.ts.map +1 -1
  20. package/dist/esm/components/Dialog/DialogActions.js +4 -0
  21. package/dist/esm/components/Dialog/DialogActions.js.map +1 -1
  22. package/dist/esm/components/Dialog/DialogContent.d.ts +5 -2
  23. package/dist/esm/components/Dialog/DialogContent.d.ts.map +1 -1
  24. package/dist/esm/components/Dialog/DialogContent.js +4 -0
  25. package/dist/esm/components/Dialog/DialogContent.js.map +1 -1
  26. package/dist/esm/components/Dialog/DialogContentDivider.d.ts +5 -2
  27. package/dist/esm/components/Dialog/DialogContentDivider.d.ts.map +1 -1
  28. package/dist/esm/components/Dialog/DialogContentDivider.js +4 -0
  29. package/dist/esm/components/Dialog/DialogContentDivider.js.map +1 -1
  30. package/dist/esm/components/Dialog/DialogContext.d.ts +6 -0
  31. package/dist/esm/components/Dialog/DialogContext.d.ts.map +1 -0
  32. package/dist/esm/components/Dialog/DialogContext.js +13 -0
  33. package/dist/esm/components/Dialog/DialogContext.js.map +1 -0
  34. package/dist/esm/components/Dialog/DialogTitle.d.ts +6 -5
  35. package/dist/esm/components/Dialog/DialogTitle.d.ts.map +1 -1
  36. package/dist/esm/components/Dialog/DialogTitle.js +4 -0
  37. package/dist/esm/components/Dialog/DialogTitle.js.map +1 -1
  38. package/dist/esm/components/Dialog/index.d.ts.map +1 -1
  39. package/dist/esm/components/Dialog/index.js +9 -0
  40. package/dist/esm/components/Dialog/index.js.map +1 -1
  41. package/dist/index.js +67 -36
  42. package/dist/index.js.map +1 -1
  43. package/dist/index.min.js +1 -1
  44. package/dist/index.min.js.map +1 -1
  45. package/package.json +1 -1
@@ -4,16 +4,22 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.Dialog = void 0;
7
+ exports._Dialog = exports.Dialog = void 0;
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _classnames = _interopRequireDefault(require("classnames"));
10
10
  var _Modal = require("../Modal");
11
11
  var _SlideFromTop = require("../Transitions/SlideFromTop");
12
12
  var _Styles = require("./Styles");
13
+ var _DialogTitle = require("./DialogTitle");
14
+ var _DialogContent = require("./DialogContent");
15
+ var _DialogContentDivider = require("./DialogContentDivider");
16
+ var _DialogActions = require("./DialogActions");
13
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
19
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
- var Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
20
+ // import { DialogContext } from "./DialogContext";
21
+
22
+ var _Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
17
23
  var children = _ref.children,
18
24
  _ref$open = _ref.open,
19
25
  open = _ref$open === void 0 ? false : _ref$open,
@@ -23,18 +29,32 @@ var Dialog = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
23
29
  enableBackgroundClick = _ref$enableBackground === void 0 ? false : _ref$enableBackground,
24
30
  _ref$disableCloseOnEs = _ref.disableCloseOnEsc,
25
31
  disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs;
26
- return /*#__PURE__*/_react.default.createElement(_Modal.Modal, {
27
- ref: ref,
28
- open: open,
29
- onClose: onClose,
30
- disableBackgroundClick: !enableBackgroundClick,
31
- disableCloseOnEsc: disableCloseOnEsc
32
- }, /*#__PURE__*/_react.default.createElement(_SlideFromTop.SlideFromTop, {
33
- in: open
34
- }, /*#__PURE__*/_react.default.createElement(_Styles.StyledDialog, {
35
- className: (0, _classnames.default)("c-dialog", className)
36
- }, children)));
32
+ return (
33
+ /*#__PURE__*/
34
+ // <DialogContext.Provider value={{}}>
35
+ _react.default.createElement(_Modal.Modal, {
36
+ ref: ref,
37
+ open: open,
38
+ onClose: onClose,
39
+ disableBackgroundClick: !enableBackgroundClick,
40
+ disableCloseOnEsc: disableCloseOnEsc
41
+ }, /*#__PURE__*/_react.default.createElement(_SlideFromTop.SlideFromTop, {
42
+ in: open
43
+ }, /*#__PURE__*/_react.default.createElement(_Styles.StyledDialog, {
44
+ className: (0, _classnames.default)("c-dialog", className)
45
+ }, children)))
46
+ // </DialogContext.Provider>
47
+ );
48
+ });
49
+ exports._Dialog = _Dialog;
50
+ _Dialog.displayName = "Dialog";
51
+
52
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757
53
+ var Dialog = Object.assign({}, _Dialog, {
54
+ Title: _DialogTitle.DialogTitle,
55
+ Content: _DialogContent.DialogContent,
56
+ ContentDivider: _DialogContentDivider.DialogContentDivider,
57
+ Actions: _DialogActions.DialogActions
37
58
  });
38
59
  exports.Dialog = Dialog;
39
- Dialog.displayName = "Dialog";
40
60
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":["Dialog","forwardRef","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","classnames","displayName"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from \"react\";\nimport classnames from \"classnames\";\nimport { Modal } from \"../Modal\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\nimport { StyledDialog } from \"./Styles\";\n\nexport interface IDialog {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n children?: ReactNode;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n}\n\nexport const Dialog = forwardRef<HTMLDivElement, IDialog>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n },\n ref\n ) => {\n return (\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n >\n <SlideFromTop in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </SlideFromTop>\n </Modal>\n );\n }\n);\n\nDialog.displayName = \"Dialog\";\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAAwC;AAAA;AAAA;AAWjC,IAAMA,MAAM,gBAAG,IAAAC,iBAAU,EAC9B,gBASEC,GAAG,EACA;EAAA,IARDC,QAAQ,QAARA,QAAQ;IAAA,iBACRC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAAA,6BAC7BC,iBAAiB;IAAjBA,iBAAiB,sCAAG,KAAK;EAI3B,oBACE,6BAAC,YAAK;IACJ,GAAG,EAAEN,GAAI;IACT,IAAI,EAAEE,IAAK;IACX,OAAO,EAAEC,OAAQ;IACjB,sBAAsB,EAAE,CAACE,qBAAsB;IAC/C,iBAAiB,EAAEC;EAAkB,gBAErC,6BAAC,0BAAY;IAAC,EAAE,EAAEJ;EAAK,gBACrB,6BAAC,oBAAY;IAAC,SAAS,EAAE,IAAAK,mBAAU,EAAC,UAAU,EAAEH,SAAS;EAAE,GACxDH,QAAQ,CACI,CACF,CACT;AAEZ,CAAC,CACF;AAAC;AAEFH,MAAM,CAACU,WAAW,GAAG,QAAQ"}
1
+ {"version":3,"file":"Dialog.js","names":["_Dialog","forwardRef","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","classnames","displayName","Dialog","Object","assign","Title","DialogTitle","Content","DialogContent","ContentDivider","DialogContentDivider","Actions","DialogActions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, PropsWithChildren } from \"react\";\nimport classnames from \"classnames\";\nimport { Modal } from \"../Modal\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\nimport { StyledDialog } from \"./Styles\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogTitle } from \"./DialogTitle\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogActions } from \"./DialogActions\";\n\nexport interface DialogProps {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n },\n ref\n ) => {\n return (\n // <DialogContext.Provider value={{}}>\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n >\n <SlideFromTop in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </SlideFromTop>\n </Modal>\n // </DialogContext.Provider>\n );\n }\n);\n\n_Dialog.displayName = \"Dialog\";\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757\nexport const Dialog = Object.assign({}, _Dialog, {\n Title: DialogTitle,\n Content: DialogContent,\n ContentDivider: DialogContentDivider,\n Actions: DialogActions,\n});\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAAgD;AAAA;AAAA;AALhD;;AAeO,IAAMA,OAAO,gBAAG,IAAAC,iBAAU,EAI/B,gBASEC,GAAG,EACA;EAAA,IARDC,QAAQ,QAARA,QAAQ;IAAA,iBACRC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAAA,6BAC7BC,iBAAiB;IAAjBA,iBAAiB,sCAAG,KAAK;EAI3B;IAAA;IACE;IACA,6BAAC,YAAK;MACJ,GAAG,EAAEN,GAAI;MACT,IAAI,EAAEE,IAAK;MACX,OAAO,EAAEC,OAAQ;MACjB,sBAAsB,EAAE,CAACE,qBAAsB;MAC/C,iBAAiB,EAAEC;IAAkB,gBAErC,6BAAC,0BAAY;MAAC,EAAE,EAAEJ;IAAK,gBACrB,6BAAC,oBAAY;MAAC,SAAS,EAAE,IAAAK,mBAAU,EAAC,UAAU,EAAEH,SAAS;IAAE,GACxDH,QAAQ,CACI,CACF;IAEjB;EAAA;AAEJ,CAAC,CACF;AAAC;AAEFH,OAAO,CAACU,WAAW,GAAG,QAAQ;;AAE9B;AACO,IAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEb,OAAO,EAAE;EAC/Cc,KAAK,EAAEC,wBAAW;EAClBC,OAAO,EAAEC,4BAAa;EACtBC,cAAc,EAAEC,0CAAoB;EACpCC,OAAO,EAAEC;AACX,CAAC,CAAC;AAAC"}
@@ -12,10 +12,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
12
12
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
+ // import { useDialogContext } from "./DialogContext";
16
+
15
17
  var DialogActions = function DialogActions(_ref) {
16
18
  var className = _ref.className,
17
19
  children = _ref.children,
18
20
  rest = _objectWithoutProperties(_ref, _excluded);
21
+ // useDialogContext();
22
+
19
23
  return /*#__PURE__*/_react.default.createElement(_Styles.StyledDialogActions, _extends({
20
24
  className: (0, _classnames.default)("c-dialog-actions", className)
21
25
  }, rest), children);
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.js","names":["DialogActions","className","children","rest","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogActions.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogActions } from \"./Styles\";\n\nexport const DialogActions: FC<HTMLAttributes<HTMLDivElement>> = ({\n className,\n children,\n ...rest\n}) => {\n return (\n <StyledDialogActions\n className={classnames(\"c-dialog-actions\", className)}\n {...rest}\n >\n {children}\n </StyledDialogActions>\n );\n};\n\nDialogActions.displayName = \"DialogActions\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAA+C;AAAA;AAAA;AAAA;AAAA;AAExC,IAAMA,aAAiD,GAAG,SAApDA,aAAiD,OAIxD;EAAA,IAHJC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP,oBACE,6BAAC,2BAAmB;IAClB,SAAS,EAAE,IAAAC,mBAAU,EAAC,kBAAkB,EAAEH,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAAC;AAEFF,aAAa,CAACK,WAAW,GAAG,eAAe"}
1
+ {"version":3,"file":"DialogActions.js","names":["DialogActions","className","children","rest","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogActions.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogActions } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport const DialogActions = ({\n className,\n children,\n ...rest\n}: HTMLAttributes<HTMLDivElement>) => {\n // useDialogContext();\n\n return (\n <StyledDialogActions\n className={classnames(\"c-dialog-actions\", className)}\n {...rest}\n >\n {children}\n </StyledDialogActions>\n );\n};\n\nDialogActions.displayName = \"DialogActions\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAA+C;AAAA;AAAA;AAAA;AAAA;AAC/C;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAa,OAIY;EAAA,IAHpCC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP;;EAEA,oBACE,6BAAC,2BAAmB;IAClB,SAAS,EAAE,IAAAC,mBAAU,EAAC,kBAAkB,EAAEH,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAAC;AAEFF,aAAa,CAACK,WAAW,GAAG,eAAe"}
@@ -12,10 +12,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
12
12
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
13
13
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
14
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
+ // import { useDialogContext } from "./DialogContext";
16
+
15
17
  var DialogContent = function DialogContent(_ref) {
16
18
  var className = _ref.className,
17
19
  children = _ref.children,
18
20
  rest = _objectWithoutProperties(_ref, _excluded);
21
+ // useDialogContext();
22
+
19
23
  return /*#__PURE__*/_react.default.createElement(_Styles.StyledDialogContent, _extends({
20
24
  className: (0, _classnames.default)("c-dialog-content", className)
21
25
  }, rest), children);
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.js","names":["DialogContent","className","children","rest","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogContent.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContent } from \"./Styles\";\n\nexport const DialogContent: FC<HTMLAttributes<HTMLDivElement>> = ({\n className,\n children,\n ...rest\n}) => {\n return (\n <StyledDialogContent\n className={classnames(\"c-dialog-content\", className)}\n {...rest}\n >\n {children}\n </StyledDialogContent>\n );\n};\n\nDialogContent.displayName = \"DialogContent\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAA+C;AAAA;AAAA;AAAA;AAAA;AAExC,IAAMA,aAAiD,GAAG,SAApDA,aAAiD,OAIxD;EAAA,IAHJC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP,oBACE,6BAAC,2BAAmB;IAClB,SAAS,EAAE,IAAAC,mBAAU,EAAC,kBAAkB,EAAEH,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAAC;AAEFF,aAAa,CAACK,WAAW,GAAG,eAAe"}
1
+ {"version":3,"file":"DialogContent.js","names":["DialogContent","className","children","rest","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogContent.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContent } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport const DialogContent = ({\n className,\n children,\n ...rest\n}: HTMLAttributes<HTMLDivElement>) => {\n // useDialogContext();\n\n return (\n <StyledDialogContent\n className={classnames(\"c-dialog-content\", className)}\n {...rest}\n >\n {children}\n </StyledDialogContent>\n );\n};\n\nDialogContent.displayName = \"DialogContent\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAA+C;AAAA;AAAA;AAAA;AAAA;AAC/C;;AAEO,IAAMA,aAAa,GAAG,SAAhBA,aAAa,OAIY;EAAA,IAHpCC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP;;EAEA,oBACE,6BAAC,2BAAmB;IAClB,SAAS,EAAE,IAAAC,mBAAU,EAAC,kBAAkB,EAAEH,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAAC;AAEFF,aAAa,CAACK,WAAW,GAAG,eAAe"}
@@ -8,8 +8,12 @@ var _react = _interopRequireDefault(require("react"));
8
8
  var _classnames = _interopRequireDefault(require("classnames"));
9
9
  var _Styles = require("./Styles");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ // import { useDialogContext } from "./DialogContext";
12
+
11
13
  var DialogContentDivider = function DialogContentDivider(_ref) {
12
14
  var className = _ref.className;
15
+ // useDialogContext();
16
+
13
17
  return /*#__PURE__*/_react.default.createElement(_Styles.StyledDialogContentDivider, {
14
18
  className: (0, _classnames.default)("c-dialog-content-divider", className)
15
19
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContentDivider.js","names":["DialogContentDivider","className","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogContentDivider.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContentDivider } from \"./Styles\";\n\nexport const DialogContentDivider: FC<HTMLAttributes<HTMLDivElement>> = ({\n className,\n}) => {\n return (\n <StyledDialogContentDivider\n className={classnames(\"c-dialog-content-divider\", className)}\n />\n );\n};\n\nDialogContentDivider.displayName = \"DialogContentDivider\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAsD;AAE/C,IAAMA,oBAAwD,GAAG,SAA3DA,oBAAwD,OAE/D;EAAA,IADJC,SAAS,QAATA,SAAS;EAET,oBACE,6BAAC,kCAA0B;IACzB,SAAS,EAAE,IAAAC,mBAAU,EAAC,0BAA0B,EAAED,SAAS;EAAE,EAC7D;AAEN,CAAC;AAAC;AAEFD,oBAAoB,CAACG,WAAW,GAAG,sBAAsB"}
1
+ {"version":3,"file":"DialogContentDivider.js","names":["DialogContentDivider","className","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogContentDivider.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContentDivider } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport const DialogContentDivider = ({\n className,\n}: HTMLAttributes<HTMLDivElement>) => {\n // useDialogContext();\n\n return (\n <StyledDialogContentDivider\n className={classnames(\"c-dialog-content-divider\", className)}\n />\n );\n};\n\nDialogContentDivider.displayName = \"DialogContentDivider\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAAsD;AACtD;;AAEO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAoB,OAEK;EAAA,IADpCC,SAAS,QAATA,SAAS;EAET;;EAEA,oBACE,6BAAC,kCAA0B;IACzB,SAAS,EAAE,IAAAC,mBAAU,EAAC,0BAA0B,EAAED,SAAS;EAAE,EAC7D;AAEN,CAAC;AAAC;AAEFD,oBAAoB,CAACG,WAAW,GAAG,sBAAsB"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useDialogContext = exports.DialogContext = void 0;
7
+ var _react = require("react");
8
+ var DialogContext = /*#__PURE__*/(0, _react.createContext)(null);
9
+ exports.DialogContext = DialogContext;
10
+ var useDialogContext = function useDialogContext() {
11
+ var context = (0, _react.useContext)(DialogContext);
12
+ if (!context) {
13
+ throw new Error("Child components of Dialog can not be rendered outside the Dialog component!");
14
+ }
15
+ return context;
16
+ };
17
+ exports.useDialogContext = useDialogContext;
18
+ //# sourceMappingURL=DialogContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContext.js","names":["DialogContext","createContext","useDialogContext","context","useContext","Error"],"sources":["../../../../src/components/Dialog/DialogContext.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface DialogContextProps {}\n\nexport const DialogContext = createContext<DialogContextProps | null>(null);\n\nexport const useDialogContext = () => {\n const context = useContext(DialogContext);\n\n if (!context) {\n throw new Error(\n \"Child components of Dialog can not be rendered outside the Dialog component!\"\n );\n }\n\n return context;\n};\n"],"mappings":";;;;;;AAAA;AAKO,IAAMA,aAAa,gBAAG,IAAAC,oBAAa,EAA4B,IAAI,CAAC;AAAC;AAErE,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAgB,GAAS;EACpC,IAAMC,OAAO,GAAG,IAAAC,iBAAU,EAACJ,aAAa,CAAC;EAEzC,IAAI,CAACG,OAAO,EAAE;IACZ,MAAM,IAAIE,KAAK,CACb,8EAA8E,CAC/E;EACH;EAEA,OAAOF,OAAO;AAChB,CAAC;AAAC"}
@@ -19,6 +19,8 @@ var DialogTitle = function DialogTitle(_ref) {
19
19
  _ref$disableDefaultHe = _ref.disableDefaultHeading,
20
20
  disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
21
21
  rest = _objectWithoutProperties(_ref, _excluded);
22
+ // useDialogContext();
23
+
22
24
  return /*#__PURE__*/_react.default.createElement(_Styles.StyledDialogTitle, _extends({
23
25
  className: (0, _classnames.default)("c-dialog-title-wrapper", className)
24
26
  }, rest), disableDefaultHeading ? children : /*#__PURE__*/_react.default.createElement(_Header.Header3, null, children));
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTitle.js","names":["DialogTitle","children","className","disableDefaultHeading","rest","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport classnames from \"classnames\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\nimport { StyledDialogTitle } from \"./Styles\";\n\ninterface IDialogTitle {\n children: ReactNode;\n className?: string;\n disableDefaultHeading?: boolean;\n}\n\nexport const DialogTitle: FC<IDialogTitle> = ({\n children,\n className,\n disableDefaultHeading = false,\n ...rest\n}) => {\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {disableDefaultHeading ? children : <Header3>{children}</Header3>}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAA6C;AAAA;AAAA;AAAA;AAAA;AAQtC,IAAMA,WAA6B,GAAG,SAAhCA,WAA6B,OAKpC;EAAA,IAJJC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAC1BC,IAAI;EAEP,oBACE,6BAAC,yBAAiB;IAChB,SAAS,EAAE,IAAAC,mBAAU,EAAC,wBAAwB,EAAEH,SAAS;EAAE,GACvDE,IAAI,GAEPD,qBAAqB,GAAGF,QAAQ,gBAAG,6BAAC,eAAO,QAAEA,QAAQ,CAAW,CAC/C;AAExB,CAAC;AAAC;AAEFD,WAAW,CAACM,WAAW,GAAG,aAAa"}
1
+ {"version":3,"file":"DialogTitle.js","names":["DialogTitle","children","className","disableDefaultHeading","rest","classnames","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\nimport classnames from \"classnames\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\nimport { StyledDialogTitle } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n // useDialogContext();\n\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {disableDefaultHeading ? children : <Header3>{children}</Header3>}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AAA6C;AAAA;AAAA;AAAA;AAAA;AAQtC,IAAMA,WAAW,GAAG,SAAdA,WAAW,OAKmB;EAAA,IAJzCC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAC1BC,IAAI;EAEP;;EAEA,oBACE,6BAAC,yBAAiB;IAChB,SAAS,EAAE,IAAAC,mBAAU,EAAC,wBAAwB,EAAEH,SAAS;EAAE,GACvDE,IAAI,GAEPD,qBAAqB,GAAGF,QAAQ,gBAAG,6BAAC,eAAO,QAAEA,QAAQ,CAAW,CAC/C;AAExB,CAAC;AAAC;AAEFD,WAAW,CAACM,WAAW,GAAG,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\nexport * from \"./DialogContent\";\nexport * from \"./DialogContentDivider\";\nexport * from \"./DialogTitle\";\nexport * from \"./DialogActions\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n// @TODO:\n// Nakon refaktora Dialog komponente na legacy AC-u i Next-u, obrisati individualne exporte.\n// Korisčenje će se svesti samo na `import { Dialog } from @activecollab/components`.\n\n// <Dialog>\n// <Dialog.Title>Hello</Dialog.Title>\n// itd...\n// </Dialog>\n\nexport * from \"./DialogContent\";\nexport * from \"./DialogContentDivider\";\nexport * from \"./DialogTitle\";\nexport * from \"./DialogActions\";\n"],"mappings":";;;;;AAAA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AAUA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,11 +1,32 @@
1
- import React, { ReactNode } from "react";
2
- export interface IDialog {
1
+ import React from "react";
2
+ export interface DialogProps {
3
3
  open?: boolean;
4
4
  onClose?: () => void;
5
5
  className?: string;
6
- children?: ReactNode;
7
6
  enableBackgroundClick?: boolean;
8
7
  disableCloseOnEsc?: boolean;
9
8
  }
10
- export declare const Dialog: React.ForwardRefExoticComponent<IDialog & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const _Dialog: React.ForwardRefExoticComponent<DialogProps & {
10
+ children?: React.ReactNode;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ export declare const Dialog: React.ForwardRefExoticComponent<DialogProps & {
13
+ children?: React.ReactNode;
14
+ } & React.RefAttributes<HTMLDivElement>> & {
15
+ Title: {
16
+ ({ children, className, disableDefaultHeading, ...rest }: React.PropsWithChildren<import("./DialogTitle").DialogTitleProps>): JSX.Element;
17
+ displayName: string;
18
+ };
19
+ Content: {
20
+ ({ className, children, ...rest }: React.HTMLAttributes<HTMLDivElement>): JSX.Element;
21
+ displayName: string;
22
+ };
23
+ ContentDivider: {
24
+ ({ className, }: React.HTMLAttributes<HTMLDivElement>): JSX.Element;
25
+ displayName: string;
26
+ };
27
+ Actions: {
28
+ ({ className, children, ...rest }: React.HTMLAttributes<HTMLDivElement>): JSX.Element;
29
+ displayName: string;
30
+ };
31
+ };
11
32
  //# sourceMappingURL=Dialog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAc,SAAS,EAAE,MAAM,OAAO,CAAC;AAMrD,MAAM,WAAW,OAAO;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,MAAM,gFA4BlB,CAAC"}
1
+ {"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAa7D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,OAAO;;wCAiCnB,CAAC;AAKF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;CAKjB,CAAC"}
@@ -3,7 +3,14 @@ import classnames from "classnames";
3
3
  import { Modal } from "../Modal";
4
4
  import { SlideFromTop } from "../Transitions/SlideFromTop";
5
5
  import { StyledDialog } from "./Styles";
6
- export var Dialog = /*#__PURE__*/forwardRef(function (_ref, ref) {
6
+
7
+ // import { DialogContext } from "./DialogContext";
8
+
9
+ import { DialogTitle } from "./DialogTitle";
10
+ import { DialogContent } from "./DialogContent";
11
+ import { DialogContentDivider } from "./DialogContentDivider";
12
+ import { DialogActions } from "./DialogActions";
13
+ export var _Dialog = /*#__PURE__*/forwardRef(function (_ref, ref) {
7
14
  var children = _ref.children,
8
15
  _ref$open = _ref.open,
9
16
  open = _ref$open === void 0 ? false : _ref$open,
@@ -13,17 +20,31 @@ export var Dialog = /*#__PURE__*/forwardRef(function (_ref, ref) {
13
20
  enableBackgroundClick = _ref$enableBackground === void 0 ? false : _ref$enableBackground,
14
21
  _ref$disableCloseOnEs = _ref.disableCloseOnEsc,
15
22
  disableCloseOnEsc = _ref$disableCloseOnEs === void 0 ? false : _ref$disableCloseOnEs;
16
- return /*#__PURE__*/React.createElement(Modal, {
17
- ref: ref,
18
- open: open,
19
- onClose: onClose,
20
- disableBackgroundClick: !enableBackgroundClick,
21
- disableCloseOnEsc: disableCloseOnEsc
22
- }, /*#__PURE__*/React.createElement(SlideFromTop, {
23
- in: open
24
- }, /*#__PURE__*/React.createElement(StyledDialog, {
25
- className: classnames("c-dialog", className)
26
- }, children)));
23
+ return (
24
+ /*#__PURE__*/
25
+ // <DialogContext.Provider value={{}}>
26
+ React.createElement(Modal, {
27
+ ref: ref,
28
+ open: open,
29
+ onClose: onClose,
30
+ disableBackgroundClick: !enableBackgroundClick,
31
+ disableCloseOnEsc: disableCloseOnEsc
32
+ }, /*#__PURE__*/React.createElement(SlideFromTop, {
33
+ in: open
34
+ }, /*#__PURE__*/React.createElement(StyledDialog, {
35
+ className: classnames("c-dialog", className)
36
+ }, children)))
37
+ // </DialogContext.Provider>
38
+ );
39
+ });
40
+
41
+ _Dialog.displayName = "Dialog";
42
+
43
+ // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757
44
+ export var Dialog = Object.assign({}, _Dialog, {
45
+ Title: DialogTitle,
46
+ Content: DialogContent,
47
+ ContentDivider: DialogContentDivider,
48
+ Actions: DialogActions
27
49
  });
28
- Dialog.displayName = "Dialog";
29
50
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":["React","forwardRef","classnames","Modal","SlideFromTop","StyledDialog","Dialog","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","displayName"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, ReactNode } from \"react\";\nimport classnames from \"classnames\";\nimport { Modal } from \"../Modal\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\nimport { StyledDialog } from \"./Styles\";\n\nexport interface IDialog {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n children?: ReactNode;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n}\n\nexport const Dialog = forwardRef<HTMLDivElement, IDialog>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n },\n ref\n ) => {\n return (\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n >\n <SlideFromTop in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </SlideFromTop>\n </Modal>\n );\n }\n);\n\nDialog.displayName = \"Dialog\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAmB,OAAO;AACpD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,UAAU;AAWvC,OAAO,IAAMC,MAAM,gBAAGL,UAAU,CAC9B,gBASEM,GAAG,EACA;EAAA,IARDC,QAAQ,QAARA,QAAQ;IAAA,iBACRC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAAA,6BAC7BC,iBAAiB;IAAjBA,iBAAiB,sCAAG,KAAK;EAI3B,oBACE,oBAAC,KAAK;IACJ,GAAG,EAAEN,GAAI;IACT,IAAI,EAAEE,IAAK;IACX,OAAO,EAAEC,OAAQ;IACjB,sBAAsB,EAAE,CAACE,qBAAsB;IAC/C,iBAAiB,EAAEC;EAAkB,gBAErC,oBAAC,YAAY;IAAC,EAAE,EAAEJ;EAAK,gBACrB,oBAAC,YAAY;IAAC,SAAS,EAAEP,UAAU,CAAC,UAAU,EAAES,SAAS;EAAE,GACxDH,QAAQ,CACI,CACF,CACT;AAEZ,CAAC,CACF;AAEDF,MAAM,CAACQ,WAAW,GAAG,QAAQ"}
1
+ {"version":3,"file":"Dialog.js","names":["React","forwardRef","classnames","Modal","SlideFromTop","StyledDialog","DialogTitle","DialogContent","DialogContentDivider","DialogActions","_Dialog","ref","children","open","onClose","className","enableBackgroundClick","disableCloseOnEsc","displayName","Dialog","Object","assign","Title","Content","ContentDivider","Actions"],"sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import React, { forwardRef, PropsWithChildren } from \"react\";\nimport classnames from \"classnames\";\nimport { Modal } from \"../Modal\";\nimport { SlideFromTop } from \"../Transitions/SlideFromTop\";\nimport { StyledDialog } from \"./Styles\";\n\n// import { DialogContext } from \"./DialogContext\";\n\nimport { DialogTitle } from \"./DialogTitle\";\nimport { DialogContent } from \"./DialogContent\";\nimport { DialogContentDivider } from \"./DialogContentDivider\";\nimport { DialogActions } from \"./DialogActions\";\n\nexport interface DialogProps {\n open?: boolean;\n onClose?: () => void;\n className?: string;\n enableBackgroundClick?: boolean;\n disableCloseOnEsc?: boolean;\n}\n\nexport const _Dialog = forwardRef<\n HTMLDivElement,\n PropsWithChildren<DialogProps>\n>(\n (\n {\n children,\n open = false,\n onClose,\n className,\n enableBackgroundClick = false,\n disableCloseOnEsc = false,\n },\n ref\n ) => {\n return (\n // <DialogContext.Provider value={{}}>\n <Modal\n ref={ref}\n open={open}\n onClose={onClose}\n disableBackgroundClick={!enableBackgroundClick}\n disableCloseOnEsc={disableCloseOnEsc}\n >\n <SlideFromTop in={open}>\n <StyledDialog className={classnames(\"c-dialog\", className)}>\n {children}\n </StyledDialog>\n </SlideFromTop>\n </Modal>\n // </DialogContext.Provider>\n );\n }\n);\n\n_Dialog.displayName = \"Dialog\";\n\n// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/34757\nexport const Dialog = Object.assign({}, _Dialog, {\n Title: DialogTitle,\n Content: DialogContent,\n ContentDivider: DialogContentDivider,\n Actions: DialogActions,\n});\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,QAA2B,OAAO;AAC5D,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,YAAY,QAAQ,6BAA6B;AAC1D,SAASC,YAAY,QAAQ,UAAU;;AAEvC;;AAEA,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,aAAa,QAAQ,iBAAiB;AAU/C,OAAO,IAAMC,OAAO,gBAAGT,UAAU,CAI/B,gBASEU,GAAG,EACA;EAAA,IARDC,QAAQ,QAARA,QAAQ;IAAA,iBACRC,IAAI;IAAJA,IAAI,0BAAG,KAAK;IACZC,OAAO,QAAPA,OAAO;IACPC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAAA,6BAC7BC,iBAAiB;IAAjBA,iBAAiB,sCAAG,KAAK;EAI3B;IAAA;IACE;IACA,oBAAC,KAAK;MACJ,GAAG,EAAEN,GAAI;MACT,IAAI,EAAEE,IAAK;MACX,OAAO,EAAEC,OAAQ;MACjB,sBAAsB,EAAE,CAACE,qBAAsB;MAC/C,iBAAiB,EAAEC;IAAkB,gBAErC,oBAAC,YAAY;MAAC,EAAE,EAAEJ;IAAK,gBACrB,oBAAC,YAAY;MAAC,SAAS,EAAEX,UAAU,CAAC,UAAU,EAAEa,SAAS;IAAE,GACxDH,QAAQ,CACI,CACF;IAEjB;EAAA;AAEJ,CAAC,CACF;;AAEDF,OAAO,CAACQ,WAAW,GAAG,QAAQ;;AAE9B;AACA,OAAO,IAAMC,MAAM,GAAGC,MAAM,CAACC,MAAM,CAAC,CAAC,CAAC,EAAEX,OAAO,EAAE;EAC/CY,KAAK,EAAEhB,WAAW;EAClBiB,OAAO,EAAEhB,aAAa;EACtBiB,cAAc,EAAEhB,oBAAoB;EACpCiB,OAAO,EAAEhB;AACX,CAAC,CAAC"}
@@ -1,3 +1,6 @@
1
- import { FC, HTMLAttributes } from "react";
2
- export declare const DialogActions: FC<HTMLAttributes<HTMLDivElement>>;
1
+ import { HTMLAttributes } from "react";
2
+ export declare const DialogActions: {
3
+ ({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): JSX.Element;
4
+ displayName: string;
5
+ };
3
6
  //# sourceMappingURL=DialogActions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogActions.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIlD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,CAa5D,CAAC"}
1
+ {"version":3,"file":"DialogActions.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogActions.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK9C,eAAO,MAAM,aAAa;uCAIvB,eAAe,cAAc,CAAC;;CAWhC,CAAC"}
@@ -4,10 +4,14 @@ var _excluded = ["className", "children"];
4
4
  import React from "react";
5
5
  import classnames from "classnames";
6
6
  import { StyledDialogActions } from "./Styles";
7
+ // import { useDialogContext } from "./DialogContext";
8
+
7
9
  export var DialogActions = function DialogActions(_ref) {
8
10
  var className = _ref.className,
9
11
  children = _ref.children,
10
12
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
13
+ // useDialogContext();
14
+
11
15
  return /*#__PURE__*/React.createElement(StyledDialogActions, _extends({
12
16
  className: classnames("c-dialog-actions", className)
13
17
  }, rest), children);
@@ -1 +1 @@
1
- {"version":3,"file":"DialogActions.js","names":["React","classnames","StyledDialogActions","DialogActions","className","children","rest","displayName"],"sources":["../../../../src/components/Dialog/DialogActions.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogActions } from \"./Styles\";\n\nexport const DialogActions: FC<HTMLAttributes<HTMLDivElement>> = ({\n className,\n children,\n ...rest\n}) => {\n return (\n <StyledDialogActions\n className={classnames(\"c-dialog-actions\", className)}\n {...rest}\n >\n {children}\n </StyledDialogActions>\n );\n};\n\nDialogActions.displayName = \"DialogActions\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA8B,OAAO;AACjD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,UAAU;AAE9C,OAAO,IAAMC,aAAiD,GAAG,SAApDA,aAAiD,OAIxD;EAAA,IAHJC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP,oBACE,oBAAC,mBAAmB;IAClB,SAAS,EAAEL,UAAU,CAAC,kBAAkB,EAAEG,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAEDF,aAAa,CAACI,WAAW,GAAG,eAAe"}
1
+ {"version":3,"file":"DialogActions.js","names":["React","classnames","StyledDialogActions","DialogActions","className","children","rest","displayName"],"sources":["../../../../src/components/Dialog/DialogActions.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogActions } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport const DialogActions = ({\n className,\n children,\n ...rest\n}: HTMLAttributes<HTMLDivElement>) => {\n // useDialogContext();\n\n return (\n <StyledDialogActions\n className={classnames(\"c-dialog-actions\", className)}\n {...rest}\n >\n {children}\n </StyledDialogActions>\n );\n};\n\nDialogActions.displayName = \"DialogActions\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA0B,OAAO;AAC7C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,UAAU;AAC9C;;AAEA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAa,OAIY;EAAA,IAHpCC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP;;EAEA,oBACE,oBAAC,mBAAmB;IAClB,SAAS,EAAEL,UAAU,CAAC,kBAAkB,EAAEG,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAEDF,aAAa,CAACI,WAAW,GAAG,eAAe"}
@@ -1,3 +1,6 @@
1
- import { FC, HTMLAttributes } from "react";
2
- export declare const DialogContent: FC<HTMLAttributes<HTMLDivElement>>;
1
+ import { HTMLAttributes } from "react";
2
+ export declare const DialogContent: {
3
+ ({ className, children, ...rest }: HTMLAttributes<HTMLDivElement>): JSX.Element;
4
+ displayName: string;
5
+ };
3
6
  //# sourceMappingURL=DialogContent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogContent.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIlD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,CAa5D,CAAC"}
1
+ {"version":3,"file":"DialogContent.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogContent.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK9C,eAAO,MAAM,aAAa;uCAIvB,eAAe,cAAc,CAAC;;CAWhC,CAAC"}
@@ -4,10 +4,14 @@ var _excluded = ["className", "children"];
4
4
  import React from "react";
5
5
  import classnames from "classnames";
6
6
  import { StyledDialogContent } from "./Styles";
7
+ // import { useDialogContext } from "./DialogContext";
8
+
7
9
  export var DialogContent = function DialogContent(_ref) {
8
10
  var className = _ref.className,
9
11
  children = _ref.children,
10
12
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
13
+ // useDialogContext();
14
+
11
15
  return /*#__PURE__*/React.createElement(StyledDialogContent, _extends({
12
16
  className: classnames("c-dialog-content", className)
13
17
  }, rest), children);
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.js","names":["React","classnames","StyledDialogContent","DialogContent","className","children","rest","displayName"],"sources":["../../../../src/components/Dialog/DialogContent.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContent } from \"./Styles\";\n\nexport const DialogContent: FC<HTMLAttributes<HTMLDivElement>> = ({\n className,\n children,\n ...rest\n}) => {\n return (\n <StyledDialogContent\n className={classnames(\"c-dialog-content\", className)}\n {...rest}\n >\n {children}\n </StyledDialogContent>\n );\n};\n\nDialogContent.displayName = \"DialogContent\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA8B,OAAO;AACjD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,UAAU;AAE9C,OAAO,IAAMC,aAAiD,GAAG,SAApDA,aAAiD,OAIxD;EAAA,IAHJC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP,oBACE,oBAAC,mBAAmB;IAClB,SAAS,EAAEL,UAAU,CAAC,kBAAkB,EAAEG,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAEDF,aAAa,CAACI,WAAW,GAAG,eAAe"}
1
+ {"version":3,"file":"DialogContent.js","names":["React","classnames","StyledDialogContent","DialogContent","className","children","rest","displayName"],"sources":["../../../../src/components/Dialog/DialogContent.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContent } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport const DialogContent = ({\n className,\n children,\n ...rest\n}: HTMLAttributes<HTMLDivElement>) => {\n // useDialogContext();\n\n return (\n <StyledDialogContent\n className={classnames(\"c-dialog-content\", className)}\n {...rest}\n >\n {children}\n </StyledDialogContent>\n );\n};\n\nDialogContent.displayName = \"DialogContent\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA0B,OAAO;AAC7C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,mBAAmB,QAAQ,UAAU;AAC9C;;AAEA,OAAO,IAAMC,aAAa,GAAG,SAAhBA,aAAa,OAIY;EAAA,IAHpCC,SAAS,QAATA,SAAS;IACTC,QAAQ,QAARA,QAAQ;IACLC,IAAI;EAEP;;EAEA,oBACE,oBAAC,mBAAmB;IAClB,SAAS,EAAEL,UAAU,CAAC,kBAAkB,EAAEG,SAAS;EAAE,GACjDE,IAAI,GAEPD,QAAQ,CACW;AAE1B,CAAC;AAEDF,aAAa,CAACI,WAAW,GAAG,eAAe"}
@@ -1,3 +1,6 @@
1
- import { FC, HTMLAttributes } from "react";
2
- export declare const DialogContentDivider: FC<HTMLAttributes<HTMLDivElement>>;
1
+ import { HTMLAttributes } from "react";
2
+ export declare const DialogContentDivider: {
3
+ ({ className, }: HTMLAttributes<HTMLDivElement>): JSX.Element;
4
+ displayName: string;
5
+ };
3
6
  //# sourceMappingURL=DialogContentDivider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContentDivider.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogContentDivider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAIlD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,CAQnE,CAAC"}
1
+ {"version":3,"file":"DialogContentDivider.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogContentDivider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK9C,eAAO,MAAM,oBAAoB;qBAE9B,eAAe,cAAc,CAAC;;CAQhC,CAAC"}
@@ -1,8 +1,12 @@
1
1
  import React from "react";
2
2
  import classnames from "classnames";
3
3
  import { StyledDialogContentDivider } from "./Styles";
4
+ // import { useDialogContext } from "./DialogContext";
5
+
4
6
  export var DialogContentDivider = function DialogContentDivider(_ref) {
5
7
  var className = _ref.className;
8
+ // useDialogContext();
9
+
6
10
  return /*#__PURE__*/React.createElement(StyledDialogContentDivider, {
7
11
  className: classnames("c-dialog-content-divider", className)
8
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContentDivider.js","names":["React","classnames","StyledDialogContentDivider","DialogContentDivider","className","displayName"],"sources":["../../../../src/components/Dialog/DialogContentDivider.tsx"],"sourcesContent":["import React, { FC, HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContentDivider } from \"./Styles\";\n\nexport const DialogContentDivider: FC<HTMLAttributes<HTMLDivElement>> = ({\n className,\n}) => {\n return (\n <StyledDialogContentDivider\n className={classnames(\"c-dialog-content-divider\", className)}\n />\n );\n};\n\nDialogContentDivider.displayName = \"DialogContentDivider\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAA8B,OAAO;AACjD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,0BAA0B,QAAQ,UAAU;AAErD,OAAO,IAAMC,oBAAwD,GAAG,SAA3DA,oBAAwD,OAE/D;EAAA,IADJC,SAAS,QAATA,SAAS;EAET,oBACE,oBAAC,0BAA0B;IACzB,SAAS,EAAEH,UAAU,CAAC,0BAA0B,EAAEG,SAAS;EAAE,EAC7D;AAEN,CAAC;AAEDD,oBAAoB,CAACE,WAAW,GAAG,sBAAsB"}
1
+ {"version":3,"file":"DialogContentDivider.js","names":["React","classnames","StyledDialogContentDivider","DialogContentDivider","className","displayName"],"sources":["../../../../src/components/Dialog/DialogContentDivider.tsx"],"sourcesContent":["import React, { HTMLAttributes } from \"react\";\nimport classnames from \"classnames\";\nimport { StyledDialogContentDivider } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport const DialogContentDivider = ({\n className,\n}: HTMLAttributes<HTMLDivElement>) => {\n // useDialogContext();\n\n return (\n <StyledDialogContentDivider\n className={classnames(\"c-dialog-content-divider\", className)}\n />\n );\n};\n\nDialogContentDivider.displayName = \"DialogContentDivider\";\n"],"mappings":"AAAA,OAAOA,KAAK,MAA0B,OAAO;AAC7C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,0BAA0B,QAAQ,UAAU;AACrD;;AAEA,OAAO,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoB,OAEK;EAAA,IADpCC,SAAS,QAATA,SAAS;EAET;;EAEA,oBACE,oBAAC,0BAA0B;IACzB,SAAS,EAAEH,UAAU,CAAC,0BAA0B,EAAEG,SAAS;EAAE,EAC7D;AAEN,CAAC;AAEDD,oBAAoB,CAACE,WAAW,GAAG,sBAAsB"}
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface DialogContextProps {
3
+ }
4
+ export declare const DialogContext: import("react").Context<DialogContextProps | null>;
5
+ export declare const useDialogContext: () => DialogContextProps;
6
+ //# sourceMappingURL=DialogContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogContext.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,kBAAkB;CAAG;AAEtC,eAAO,MAAM,aAAa,oDAAiD,CAAC;AAE5E,eAAO,MAAM,gBAAgB,0BAU5B,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { createContext, useContext } from "react";
2
+
3
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
4
+
5
+ export var DialogContext = /*#__PURE__*/createContext(null);
6
+ export var useDialogContext = function useDialogContext() {
7
+ var context = useContext(DialogContext);
8
+ if (!context) {
9
+ throw new Error("Child components of Dialog can not be rendered outside the Dialog component!");
10
+ }
11
+ return context;
12
+ };
13
+ //# sourceMappingURL=DialogContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogContext.js","names":["createContext","useContext","DialogContext","useDialogContext","context","Error"],"sources":["../../../../src/components/Dialog/DialogContext.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface DialogContextProps {}\n\nexport const DialogContext = createContext<DialogContextProps | null>(null);\n\nexport const useDialogContext = () => {\n const context = useContext(DialogContext);\n\n if (!context) {\n throw new Error(\n \"Child components of Dialog can not be rendered outside the Dialog component!\"\n );\n }\n\n return context;\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;;AAEjD;;AAGA,OAAO,IAAMC,aAAa,gBAAGF,aAAa,CAA4B,IAAI,CAAC;AAE3E,OAAO,IAAMG,gBAAgB,GAAG,SAAnBA,gBAAgB,GAAS;EACpC,IAAMC,OAAO,GAAGH,UAAU,CAACC,aAAa,CAAC;EAEzC,IAAI,CAACE,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CACb,8EAA8E,CAC/E;EACH;EAEA,OAAOD,OAAO;AAChB,CAAC"}
@@ -1,9 +1,10 @@
1
- import { FC, ReactNode } from "react";
2
- interface IDialogTitle {
3
- children: ReactNode;
1
+ import { PropsWithChildren } from "react";
2
+ export interface DialogTitleProps {
4
3
  className?: string;
5
4
  disableDefaultHeading?: boolean;
6
5
  }
7
- export declare const DialogTitle: FC<IDialogTitle>;
8
- export {};
6
+ export declare const DialogTitle: {
7
+ ({ children, className, disableDefaultHeading, ...rest }: PropsWithChildren<DialogTitleProps>): JSX.Element;
8
+ displayName: string;
9
+ };
9
10
  //# sourceMappingURL=DialogTitle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK7C,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,YAAY,CAcxC,CAAC"}
1
+ {"version":3,"file":"DialogTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAMjD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED,eAAO,MAAM,WAAW;8DAKrB,kBAAkB,gBAAgB,CAAC;;CAWrC,CAAC"}
@@ -5,12 +5,16 @@ import React from "react";
5
5
  import classnames from "classnames";
6
6
  import { Header3 } from "../Typography/Variants/Header3";
7
7
  import { StyledDialogTitle } from "./Styles";
8
+ // import { useDialogContext } from "./DialogContext";
9
+
8
10
  export var DialogTitle = function DialogTitle(_ref) {
9
11
  var children = _ref.children,
10
12
  className = _ref.className,
11
13
  _ref$disableDefaultHe = _ref.disableDefaultHeading,
12
14
  disableDefaultHeading = _ref$disableDefaultHe === void 0 ? false : _ref$disableDefaultHe,
13
15
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
16
+ // useDialogContext();
17
+
14
18
  return /*#__PURE__*/React.createElement(StyledDialogTitle, _extends({
15
19
  className: classnames("c-dialog-title-wrapper", className)
16
20
  }, rest), disableDefaultHeading ? children : /*#__PURE__*/React.createElement(Header3, null, children));
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTitle.js","names":["React","classnames","Header3","StyledDialogTitle","DialogTitle","children","className","disableDefaultHeading","rest","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { FC, ReactNode } from \"react\";\nimport classnames from \"classnames\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\nimport { StyledDialogTitle } from \"./Styles\";\n\ninterface IDialogTitle {\n children: ReactNode;\n className?: string;\n disableDefaultHeading?: boolean;\n}\n\nexport const DialogTitle: FC<IDialogTitle> = ({\n children,\n className,\n disableDefaultHeading = false,\n ...rest\n}) => {\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {disableDefaultHeading ? children : <Header3>{children}</Header3>}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,OAAO,QAAQ,gCAAgC;AACxD,SAASC,iBAAiB,QAAQ,UAAU;AAQ5C,OAAO,IAAMC,WAA6B,GAAG,SAAhCA,WAA6B,OAKpC;EAAA,IAJJC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAC1BC,IAAI;EAEP,oBACE,oBAAC,iBAAiB;IAChB,SAAS,EAAEP,UAAU,CAAC,wBAAwB,EAAEK,SAAS;EAAE,GACvDE,IAAI,GAEPD,qBAAqB,GAAGF,QAAQ,gBAAG,oBAAC,OAAO,QAAEA,QAAQ,CAAW,CAC/C;AAExB,CAAC;AAEDD,WAAW,CAACK,WAAW,GAAG,aAAa"}
1
+ {"version":3,"file":"DialogTitle.js","names":["React","classnames","Header3","StyledDialogTitle","DialogTitle","children","className","disableDefaultHeading","rest","displayName"],"sources":["../../../../src/components/Dialog/DialogTitle.tsx"],"sourcesContent":["import React, { PropsWithChildren } from \"react\";\nimport classnames from \"classnames\";\nimport { Header3 } from \"../Typography/Variants/Header3\";\nimport { StyledDialogTitle } from \"./Styles\";\n// import { useDialogContext } from \"./DialogContext\";\n\nexport interface DialogTitleProps {\n className?: string;\n disableDefaultHeading?: boolean;\n}\n\nexport const DialogTitle = ({\n children,\n className,\n disableDefaultHeading = false,\n ...rest\n}: PropsWithChildren<DialogTitleProps>) => {\n // useDialogContext();\n\n return (\n <StyledDialogTitle\n className={classnames(\"c-dialog-title-wrapper\", className)}\n {...rest}\n >\n {disableDefaultHeading ? children : <Header3>{children}</Header3>}\n </StyledDialogTitle>\n );\n};\n\nDialogTitle.displayName = \"DialogTitle\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAA6B,OAAO;AAChD,OAAOC,UAAU,MAAM,YAAY;AACnC,SAASC,OAAO,QAAQ,gCAAgC;AACxD,SAASC,iBAAiB,QAAQ,UAAU;AAC5C;;AAOA,OAAO,IAAMC,WAAW,GAAG,SAAdA,WAAW,OAKmB;EAAA,IAJzCC,QAAQ,QAARA,QAAQ;IACRC,SAAS,QAATA,SAAS;IAAA,6BACTC,qBAAqB;IAArBA,qBAAqB,sCAAG,KAAK;IAC1BC,IAAI;EAEP;;EAEA,oBACE,oBAAC,iBAAiB;IAChB,SAAS,EAAEP,UAAU,CAAC,wBAAwB,EAAEK,SAAS;EAAE,GACvDE,IAAI,GAEPD,qBAAqB,GAAGF,QAAQ,gBAAG,oBAAC,OAAO,QAAEA,QAAQ,CAAW,CAC/C;AAExB,CAAC;AAEDD,WAAW,CAACK,WAAW,GAAG,aAAa"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAUzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
@@ -1,4 +1,13 @@
1
1
  export * from "./Dialog";
2
+ // @TODO:
3
+ // Nakon refaktora Dialog komponente na legacy AC-u i Next-u, obrisati individualne exporte.
4
+ // Korisčenje će se svesti samo na `import { Dialog } from @activecollab/components`.
5
+
6
+ // <Dialog>
7
+ // <Dialog.Title>Hello</Dialog.Title>
8
+ // itd...
9
+ // </Dialog>
10
+
2
11
  export * from "./DialogContent";
3
12
  export * from "./DialogContentDivider";
4
13
  export * from "./DialogTitle";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\nexport * from \"./DialogContent\";\nexport * from \"./DialogContentDivider\";\nexport * from \"./DialogTitle\";\nexport * from \"./DialogActions\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,iBAAiB"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Dialog/index.ts"],"sourcesContent":["export * from \"./Dialog\";\n// @TODO:\n// Nakon refaktora Dialog komponente na legacy AC-u i Next-u, obrisati individualne exporte.\n// Korisčenje će se svesti samo na `import { Dialog } from @activecollab/components`.\n\n// <Dialog>\n// <Dialog.Title>Hello</Dialog.Title>\n// itd...\n// </Dialog>\n\nexport * from \"./DialogContent\";\nexport * from \"./DialogContentDivider\";\nexport * from \"./DialogTitle\";\nexport * from \"./DialogActions\";\n"],"mappings":"AAAA,cAAc,UAAU;AACxB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,cAAc,iBAAiB;AAC/B,cAAc,wBAAwB;AACtC,cAAc,eAAe;AAC7B,cAAc,iBAAiB"}