@lerx/promise-modal 0.2.3 → 0.2.5

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.
package/dist/index.cjs CHANGED
@@ -11,7 +11,7 @@ const styleManager = require('@winglet/style-utils/styleManager');
11
11
  const reactDom = require('react-dom');
12
12
  const array = require('@winglet/common-utils/array');
13
13
  const hoc = require('@winglet/react-utils/hoc');
14
- const styleUtils = require('@winglet/style-utils');
14
+ const classNames = require('@winglet/style-utils/classNames');
15
15
  const filter = require('@winglet/common-utils/filter');
16
16
  const render = require('@winglet/react-utils/render');
17
17
  const console = require('@winglet/common-utils/console');
@@ -678,7 +678,7 @@ const BackgroundFrame = ({ modalId, onChangeOrder, }) => {
678
678
  const Background = react.useMemo(() => modal?.BackgroundComponent || BackgroundComponent, [BackgroundComponent, modal]);
679
679
  if (!modal)
680
680
  return null;
681
- return (jsxRuntime.jsx("div", { className: styleUtils.cx(background, {
681
+ return (jsxRuntime.jsx("div", { className: classNames.cx(background, {
682
682
  [active$1]: modal.closeOnBackdropClick && modal.visible,
683
683
  [visible$1]: modal.manualDestroy ? modal.alive : modal.visible,
684
684
  }), onClick: handleClose, children: Background && (jsxRuntime.jsx(Background, { id: modal.id, type: modal.type, alive: modal.alive, visible: modal.visible, initiator: modal.initiator, manualDestroy: modal.manualDestroy, closeOnBackdropClick: modal.closeOnBackdropClick, background: modal.background, onChange: onChange, onConfirm: onConfirm, onClose: onClose, onDestroy: onDestroy, onChangeOrder: onChangeOrder, context: userDefinedContext })) }));
@@ -792,7 +792,7 @@ const ForegroundFrame = ({ modalId, onChangeOrder, }) => {
792
792
  const Foreground = react.useMemo(() => modal?.ForegroundComponent || ForegroundComponent, [ForegroundComponent, modal]);
793
793
  if (!modal)
794
794
  return null;
795
- return (jsxRuntime.jsx("div", { className: styleUtils.cx(foreground, {
795
+ return (jsxRuntime.jsx("div", { className: classNames.cx(foreground, {
796
796
  [active]: modal.visible,
797
797
  [visible]: modal.manualDestroy ? modal.alive : modal.visible,
798
798
  }), children: jsxRuntime.jsxs(Foreground, { id: modal.id, type: modal.type, alive: modal.alive, visible: modal.visible, initiator: modal.initiator, manualDestroy: modal.manualDestroy, closeOnBackdropClick: modal.closeOnBackdropClick, background: modal.background, onChange: onChange, onConfirm: onConfirm, onClose: onClose, onDestroy: onDestroy, onChangeOrder: onChangeOrder, context: userDefinedContext, children: [modal.type === 'alert' && (jsxRuntime.jsx(AlertInner, { modal: modal, handlers: { onConfirm } })), modal.type === 'confirm' && (jsxRuntime.jsx(ConfirmInner, { modal: modal, handlers: { onConfirm, onClose } })), modal.type === 'prompt' && (jsxRuntime.jsx(PromptInner, { modal: modal, handlers: { onChange, onConfirm, onClose } }))] }) }));
package/dist/index.mjs CHANGED
@@ -9,7 +9,7 @@ import { styleManagerFactory, destroyScope } from '@winglet/style-utils/styleMan
9
9
  import { createPortal } from 'react-dom';
10
10
  import { map } from '@winglet/common-utils/array';
11
11
  import { withErrorBoundary } from '@winglet/react-utils/hoc';
12
- import { cx } from '@winglet/style-utils';
12
+ import { cx } from '@winglet/style-utils/classNames';
13
13
  import { isString, isFunction } from '@winglet/common-utils/filter';
14
14
  import { renderComponent } from '@winglet/react-utils/render';
15
15
  import { printError } from '@winglet/common-utils/console';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lerx/promise-modal",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Universal React modal utility that can be used outside React components with promise-based results for alert, confirm, and prompt modals",
5
5
  "keywords": [
6
6
  "react",
@@ -66,8 +66,8 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "@winglet/common-utils": "^0.2.2",
69
- "@winglet/react-utils": "^0.2.3",
70
- "@winglet/style-utils": "^0.2.0"
69
+ "@winglet/react-utils": "^0.2.4",
70
+ "@winglet/style-utils": "^0.2.1"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@chromatic-com/storybook": "^3.2.6",