@kne/react-modal 0.1.1

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.js ADDED
@@ -0,0 +1,595 @@
1
+ var react = require('react');
2
+ var antd = require('antd');
3
+ var icons = require('@ant-design/icons');
4
+ var classnames = require('classnames');
5
+ var responsiveUtils = require('@kne/responsive-utils');
6
+ var reactIntl = require('@kne/react-intl');
7
+ var ButtonGroup = require('@kne/button-group');
8
+ var jsxRuntime = require('react/jsx-runtime');
9
+ var SimpleBar = require('simplebar-react');
10
+ require('simplebar-react/dist/simplebar.min.css');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
15
+ var ButtonGroup__default = /*#__PURE__*/_interopDefaultLegacy(ButtonGroup);
16
+ var SimpleBar__default = /*#__PURE__*/_interopDefaultLegacy(SimpleBar);
17
+
18
+ var styles = {"modal-tabs-layout":"kne-react-modal_nfGH7","modal-columns-layout":"kne-react-modal_ZjINn","modal-columns-layout__col":"kne-react-modal_KJmX4","modal-scroll-region":"kne-react-modal_86VYa","modal-scroll-region-inner":"kne-react-modal_K9DGN","is-inset":"kne-react-modal_HTvLy"};
19
+
20
+ const locale$1 = {
21
+ Cancel: '取消',
22
+ Confirm: '确定'
23
+ };
24
+
25
+ const locale = {
26
+ Cancel: 'Cancel',
27
+ Confirm: 'Confirm'
28
+ };
29
+
30
+ const withLocale = reactIntl.createWithIntlProvider({
31
+ defaultLocale: 'zh-CN',
32
+ messages: {
33
+ 'zh-CN': locale$1,
34
+ 'en-US': locale
35
+ },
36
+ namespace: 'react-modal'
37
+ });
38
+
39
+ var style = {"kne-responsive-boundary":"kne-react-modal_gh14z","kne-responsive-scroll":"kne-react-modal_Kfn6L","modal":"kne-react-modal_Bk7-B","small":"kne-react-modal_DZGD6","large":"kne-react-modal_9sz-n","modal-body-inner":"kne-react-modal_fFnva","is-mobile":"kne-react-modal_LtgJz","modal-container":"kne-react-modal_aEoZq","modal-antd-header":"kne-react-modal_54n8W","modal-antd-footer":"kne-react-modal_AJ9pV","modal-antd-body":"kne-react-modal_u2IjN","modal-outer":"kne-react-modal_kkILR","no-title":"kne-react-modal_8Iysr","no-footer":"kne-react-modal_VMxik","no-padding":"kne-react-modal_Fof-N","modal-title":"kne-react-modal_tG9MF","modal-body":"kne-react-modal_W-QFz","modal-footer":"kne-react-modal_meVfy","body-scroll-off":"kne-react-modal_l627I","is-embedded-footer":"kne-react-modal_17Eih","modal-footer-extra":"kne-react-modal_Fx8Z-","modal-footer-actions":"kne-react-modal_V3ZrX","modal-close":"kne-react-modal_-EK8N","modal-host":"kne-react-modal_eNb-h","modal-wrap":"kne-react-modal_3Sju5","modal-wrap-centered":"kne-react-modal_-qCIk","modal-wrap-fullscreen":"kne-react-modal_8lS2G","modal-mask-fullscreen":"kne-react-modal_XfLOC"};
40
+
41
+ const Footer = ({
42
+ footer,
43
+ footerButtons,
44
+ onConfirm,
45
+ onCancel,
46
+ cancelText,
47
+ confirmText,
48
+ onClose,
49
+ targetProps,
50
+ isMobile
51
+ }) => {
52
+ const {
53
+ formatMessage
54
+ } = reactIntl.useIntl();
55
+ const defaultButtons = [{
56
+ children: cancelText || formatMessage({
57
+ id: 'Cancel'
58
+ }),
59
+ onClick: onCancel
60
+ }, {
61
+ type: 'primary',
62
+ children: confirmText || formatMessage({
63
+ id: 'Confirm'
64
+ }),
65
+ onClick: onConfirm
66
+ }];
67
+ const rawList = footerButtons === undefined ? defaultButtons : footerButtons;
68
+ const list = (Array.isArray(rawList) ? rawList : []).filter(item => {
69
+ if (typeof item?.display === 'function') {
70
+ return item.display();
71
+ }
72
+ return item?.display !== false;
73
+ }).map(({
74
+ ButtonComponent,
75
+ onClick,
76
+ autoClose = true,
77
+ display,
78
+ ...props
79
+ }) => ({
80
+ ...props,
81
+ buttonComponent: ButtonComponent,
82
+ onClick: function () {
83
+ try {
84
+ const _arguments = arguments;
85
+ return Promise.resolve(Promise.resolve(onClick && onClick(...[].slice.call(_arguments), targetProps))).then(function (res) {
86
+ autoClose && res !== false && onClose && onClose();
87
+ return res;
88
+ });
89
+ } catch (e) {
90
+ return Promise.reject(e);
91
+ }
92
+ }
93
+ }));
94
+ const showButtons = !(Array.isArray(footerButtons) && footerButtons.length === 0) && list.length > 0;
95
+ const embeddedFooterOnly = Array.isArray(footerButtons) && footerButtons.length === 0 && footer != null;
96
+ const showFooterSlot = !isMobile || footer;
97
+ if (!showFooterSlot && !showButtons) {
98
+ return null;
99
+ }
100
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
101
+ className: classnames__default["default"](style['modal-footer'], 'modal-footer', {
102
+ [style['is-mobile']]: isMobile,
103
+ [style['is-embedded-footer']]: embeddedFooterOnly
104
+ }),
105
+ children: [showFooterSlot ? /*#__PURE__*/jsxRuntime.jsx("div", {
106
+ className: style['modal-footer-extra'],
107
+ children: footer
108
+ }) : null, showButtons ? /*#__PURE__*/jsxRuntime.jsx("div", {
109
+ className: style['modal-footer-actions'],
110
+ children: /*#__PURE__*/jsxRuntime.jsx(ButtonGroup__default["default"], {
111
+ list: list,
112
+ showLength: list.length,
113
+ place: isMobile ? 'center' : 'end'
114
+ })
115
+ }) : null]
116
+ });
117
+ };
118
+
119
+ const ModalLocaleRoot = withLocale(({
120
+ children
121
+ }) => children);
122
+ const renderWithOptions = (value, options) => {
123
+ if (typeof value === 'function') {
124
+ return value(options);
125
+ }
126
+ return value;
127
+ };
128
+ const wrapCustomGetContainer = customGetContainer => {
129
+ if (!customGetContainer) {
130
+ return undefined;
131
+ }
132
+ if (typeof customGetContainer === 'function') {
133
+ return triggerNode => customGetContainer(triggerNode) || null;
134
+ }
135
+ return () => customGetContainer;
136
+ };
137
+ const VIEWPORT_EXAMPLE_SELECTORS = ['.example-driver-device-scroll'];
138
+ const viewportPopupMountOptions = {
139
+ cover: 'viewport',
140
+ exampleSelectors: VIEWPORT_EXAMPLE_SELECTORS
141
+ };
142
+ const findParentModalMountHost = node => {
143
+ if (!node || typeof node.closest !== 'function') {
144
+ return null;
145
+ }
146
+ const parentRoot = node.closest('.ant-modal-root');
147
+ if (!parentRoot) {
148
+ return null;
149
+ }
150
+ return parentRoot.parentElement || (typeof document !== 'undefined' ? document.body : null);
151
+ };
152
+ const resolveModalGetContainer = ({
153
+ customGetContainer,
154
+ getPopupContainer,
155
+ getHostNode
156
+ }) => {
157
+ const wrappedCustom = wrapCustomGetContainer(customGetContainer);
158
+ return triggerNode => {
159
+ if (wrappedCustom) {
160
+ const custom = wrappedCustom(triggerNode);
161
+ if (custom) {
162
+ return custom;
163
+ }
164
+ }
165
+ const from = triggerNode || (typeof getHostNode === 'function' ? getHostNode() : null);
166
+ const nestedHost = findParentModalMountHost(from);
167
+ if (nestedHost) {
168
+ return nestedHost;
169
+ }
170
+ return getPopupContainer(triggerNode);
171
+ };
172
+ };
173
+ let parentScrollLockCount = 0;
174
+ let parentScrollLocked = [];
175
+ const lockParentScroll = getScrollElement => {
176
+ parentScrollLockCount += 1;
177
+ if (parentScrollLockCount === 1) {
178
+ const targets = [document.body];
179
+ const scrollEl = typeof getScrollElement === 'function' ? getScrollElement() : null;
180
+ if (scrollEl && scrollEl !== document.body && !targets.includes(scrollEl)) {
181
+ targets.push(scrollEl);
182
+ }
183
+ parentScrollLocked = targets.map(el => {
184
+ const prev = {
185
+ overflow: el.style.overflow,
186
+ overscrollBehavior: el.style.overscrollBehavior
187
+ };
188
+ el.style.overflow = 'hidden';
189
+ el.style.overscrollBehavior = 'none';
190
+ return {
191
+ el,
192
+ prev
193
+ };
194
+ });
195
+ }
196
+ return () => {
197
+ parentScrollLockCount = Math.max(0, parentScrollLockCount - 1);
198
+ if (parentScrollLockCount === 0) {
199
+ parentScrollLocked.forEach(({
200
+ el,
201
+ prev
202
+ }) => {
203
+ el.style.overflow = prev.overflow;
204
+ el.style.overscrollBehavior = prev.overscrollBehavior;
205
+ });
206
+ parentScrollLocked = [];
207
+ }
208
+ };
209
+ };
210
+ const useLockParentScroll = (enabled, getScrollElement) => {
211
+ react.useEffect(() => {
212
+ if (!enabled) {
213
+ return undefined;
214
+ }
215
+ return lockParentScroll(getScrollElement);
216
+ }, [enabled, getScrollElement]);
217
+ };
218
+ const sizeStyleVars = (size, hasFooter) => {
219
+ const minBase = size === 'small' ? 300 : 500;
220
+ const chrome = 48 + (hasFooter ? 58 : 0);
221
+ const minHeight = `${Math.max(0, minBase - chrome)}px`;
222
+ if (size === 'large') {
223
+ return {
224
+ width: typeof window !== 'undefined' ? `${Math.min(window.innerWidth - 64, 1500)}px` : '1500px',
225
+ '--kne-modal-body-min-height': minHeight
226
+ };
227
+ }
228
+ if (size === 'small') {
229
+ return {
230
+ width: '600px',
231
+ '--kne-modal-body-min-height': minHeight
232
+ };
233
+ }
234
+ return {
235
+ width: '1000px',
236
+ '--kne-modal-body-min-height': minHeight
237
+ };
238
+ };
239
+ const ModalOuter = ({
240
+ title,
241
+ footer,
242
+ footerButtons,
243
+ noPadding,
244
+ onClose,
245
+ closable,
246
+ onConfirm,
247
+ onCancel,
248
+ children,
249
+ targetProps,
250
+ cancelText,
251
+ confirmText,
252
+ isMobile,
253
+ bodyScroll
254
+ }) => {
255
+ const effectiveNoPadding = noPadding ?? bodyScroll === false;
256
+ const bodyInner = /*#__PURE__*/jsxRuntime.jsx("div", {
257
+ className: classnames__default["default"](style['modal-body-inner'], 'modal-body-inner', {
258
+ [style['no-padding']]: effectiveNoPadding
259
+ }),
260
+ children: children
261
+ });
262
+ const bodyClassName = classnames__default["default"](style['modal-body'], 'modal-body');
263
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
264
+ className: classnames__default["default"](style['modal-outer'], 'modal-container', {
265
+ [style['is-mobile']]: isMobile,
266
+ [style['no-title']]: !title,
267
+ [style['no-footer']]: footer === null && footerButtons === undefined,
268
+ [style['no-padding']]: effectiveNoPadding
269
+ }),
270
+ "data-testid": "react-modal",
271
+ children: [closable === false ? null : /*#__PURE__*/jsxRuntime.jsx(antd.Button, {
272
+ "data-testid": "react-modal-close-btn",
273
+ className: classnames__default["default"](style['modal-close'], 'modal-close'),
274
+ type: "text",
275
+ icon: /*#__PURE__*/jsxRuntime.jsx(icons.CloseOutlined, {}),
276
+ onClick: e => {
277
+ e.stopPropagation();
278
+ onClose && onClose();
279
+ }
280
+ }), title ? /*#__PURE__*/jsxRuntime.jsx("div", {
281
+ className: classnames__default["default"](style['modal-title'], 'modal-title'),
282
+ children: title
283
+ }) : null, bodyScroll !== false ? /*#__PURE__*/jsxRuntime.jsx(SimpleBar__default["default"], {
284
+ className: bodyClassName,
285
+ style: {
286
+ height: 'var(--kne-modal-body-height)'
287
+ },
288
+ children: bodyInner
289
+ }) : /*#__PURE__*/jsxRuntime.jsx("div", {
290
+ className: classnames__default["default"](bodyClassName, style['body-scroll-off']),
291
+ children: bodyInner
292
+ }), footer === null && footerButtons === undefined ? null : /*#__PURE__*/jsxRuntime.jsx(Footer, {
293
+ footer: footer,
294
+ footerButtons: footerButtons,
295
+ onConfirm: onConfirm,
296
+ confirmText: confirmText,
297
+ onCancel: onCancel,
298
+ cancelText: cancelText,
299
+ onClose: onClose,
300
+ targetProps: targetProps,
301
+ isMobile: isMobile
302
+ })]
303
+ });
304
+ };
305
+ const computedCommonProps = ({
306
+ children,
307
+ footer,
308
+ footerButtons,
309
+ className,
310
+ size = 'default',
311
+ title,
312
+ onClose,
313
+ onConfirm,
314
+ confirmText,
315
+ onCancel,
316
+ cancelText,
317
+ closable,
318
+ noPadding,
319
+ bodyScroll = true,
320
+ isMobile,
321
+ mobileFullscreen = true,
322
+ fixedModeClass,
323
+ wrapClassName,
324
+ classNames: propsClassNames,
325
+ styles: propsStyles,
326
+ style: propsStyle,
327
+ ...props
328
+ }) => {
329
+ const useMobileLayout = isMobile && mobileFullscreen !== false;
330
+ const hasFooter = !(footer === null && footerButtons === undefined);
331
+ const sizeVars = sizeStyleVars(size, hasFooter);
332
+ const {
333
+ width,
334
+ ...cssVars
335
+ } = sizeVars;
336
+ const runChildren = options => {
337
+ const opts = Object.assign({}, options, {
338
+ close: onClose
339
+ });
340
+ return /*#__PURE__*/jsxRuntime.jsx(ModalOuter, {
341
+ title: renderWithOptions(title, opts),
342
+ closable: closable,
343
+ onClose: onClose,
344
+ onConfirm: onConfirm,
345
+ confirmText: confirmText,
346
+ onCancel: onCancel,
347
+ cancelText: cancelText,
348
+ footerButtons: renderWithOptions(footerButtons, opts),
349
+ noPadding: noPadding,
350
+ footer: renderWithOptions(footer, opts),
351
+ targetProps: opts,
352
+ isMobile: useMobileLayout,
353
+ bodyScroll: bodyScroll,
354
+ children: renderWithOptions(children, opts)
355
+ });
356
+ };
357
+ return {
358
+ ...props,
359
+ icon: null,
360
+ centered: !useMobileLayout,
361
+ width: props.width ?? (useMobileLayout ? 'var(--kne-modal-viewport-width, 100vw)' : width),
362
+ wrapClassName: classnames__default["default"](wrapClassName, style['modal-wrap'], useMobileLayout ? style['modal-wrap-fullscreen'] : style['modal-wrap-centered'], useMobileLayout && fixedModeClass),
363
+ classNames: Object.assign({}, propsClassNames, {
364
+ mask: classnames__default["default"](propsClassNames?.mask, useMobileLayout && style['modal-mask-fullscreen'], useMobileLayout && fixedModeClass),
365
+ container: classnames__default["default"](style['modal-container'], useMobileLayout && style['is-mobile'], propsClassNames?.container),
366
+ body: classnames__default["default"](style['modal-antd-body'], useMobileLayout && style['is-mobile'], propsClassNames?.body),
367
+ footer: classnames__default["default"](style['modal-antd-footer'], propsClassNames?.footer),
368
+ header: classnames__default["default"](style['modal-antd-header'], propsClassNames?.header),
369
+ content: classnames__default["default"](style['modal-container'], useMobileLayout && style['is-mobile'], propsClassNames?.content)
370
+ }),
371
+ title: null,
372
+ maskClosable: Object.prototype.hasOwnProperty.call(props, 'maskClosable') ? props.maskClosable : false,
373
+ destroyOnHidden: true,
374
+ footer: null,
375
+ closable: false,
376
+ onCancel: onClose,
377
+ className: classnames__default["default"](className, style['modal'], style[size], {
378
+ [style['is-mobile']]: useMobileLayout
379
+ }),
380
+ style: Object.assign({}, cssVars, propsStyle, useMobileLayout ? {
381
+ '--kne-modal-viewport-gutter': '0px',
382
+ maxWidth: '100%',
383
+ width: '100%',
384
+ height: 'var(--kne-modal-viewport-height, 100vh)',
385
+ maxHeight: 'var(--kne-modal-viewport-height, 100vh)',
386
+ top: 0,
387
+ margin: 0,
388
+ paddingBottom: 0
389
+ } : null),
390
+ styles: {
391
+ ...propsStyles,
392
+ container: {
393
+ padding: 0,
394
+ ...propsStyles?.container,
395
+ ...(useMobileLayout ? {
396
+ borderRadius: 0,
397
+ height: '100%',
398
+ maxHeight: '100%',
399
+ overflow: 'hidden'
400
+ } : null)
401
+ },
402
+ content: {
403
+ padding: 0,
404
+ ...propsStyles?.content
405
+ },
406
+ body: {
407
+ padding: 0,
408
+ ...propsStyles?.body,
409
+ ...(useMobileLayout ? {
410
+ height: '100%',
411
+ maxHeight: '100%',
412
+ overflow: 'hidden'
413
+ } : null)
414
+ }
415
+ },
416
+ children: /*#__PURE__*/jsxRuntime.jsx(ModalLocaleRoot, {
417
+ children: runChildren({})
418
+ })
419
+ };
420
+ };
421
+ const Modal = withLocale(({
422
+ size = 'default',
423
+ getContainer,
424
+ open,
425
+ mobileFullscreen = true,
426
+ bodyScroll = true,
427
+ ...props
428
+ }) => {
429
+ const hostRef = react.useRef(null);
430
+ const {
431
+ isMobile,
432
+ fixedModeClass,
433
+ getPopupContainer,
434
+ anchorRef
435
+ } = responsiveUtils.useMobilePopupMount({
436
+ ...viewportPopupMountOptions,
437
+ getPopupContainer: wrapCustomGetContainer(getContainer)
438
+ });
439
+ const getScrollElement = responsiveUtils.useScrollElement();
440
+ useLockParentScroll(!!open, getScrollElement);
441
+ const setAnchorRef = node => {
442
+ hostRef.current = node;
443
+ anchorRef(node);
444
+ };
445
+ const getModalContainer = resolveModalGetContainer({
446
+ customGetContainer: getContainer,
447
+ getPopupContainer,
448
+ getHostNode: () => hostRef.current
449
+ });
450
+ return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
451
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
452
+ ref: setAnchorRef,
453
+ className: style['modal-host'],
454
+ "aria-hidden": "true"
455
+ }), /*#__PURE__*/jsxRuntime.jsx(antd.Modal, {
456
+ ...computedCommonProps(Object.assign({}, props, {
457
+ size,
458
+ isMobile,
459
+ open,
460
+ fixedModeClass,
461
+ mobileFullscreen,
462
+ bodyScroll
463
+ })),
464
+ open: open,
465
+ getContainer: getModalContainer
466
+ })]
467
+ });
468
+ });
469
+ const useModal = () => {
470
+ const {
471
+ modal
472
+ } = antd.App.useApp();
473
+ const {
474
+ resolveMount,
475
+ getPopupContainer
476
+ } = responsiveUtils.useMobilePopupMount(viewportPopupMountOptions);
477
+ const getScrollElement = responsiveUtils.useScrollElement();
478
+ return props => {
479
+ const anchor = typeof document !== 'undefined' ? document.activeElement : null;
480
+ const {
481
+ isMobile,
482
+ fixedModeClass
483
+ } = resolveMount(anchor);
484
+ const unlock = lockParentScroll(getScrollElement);
485
+ const api = {};
486
+ const {
487
+ afterClose: userAfterClose,
488
+ getContainer: customGetContainer,
489
+ ...restProps
490
+ } = props;
491
+ const {
492
+ children,
493
+ getContainer,
494
+ afterClose,
495
+ ...otherProps
496
+ } = computedCommonProps({
497
+ onClose: () => api.close(),
498
+ isMobile,
499
+ fixedModeClass,
500
+ afterClose: function () {
501
+ unlock();
502
+ userAfterClose && userAfterClose(...[].slice.call(arguments));
503
+ },
504
+ ...restProps
505
+ });
506
+ const {
507
+ destroy
508
+ } = modal.info({
509
+ ...otherProps,
510
+ afterClose,
511
+ content: children,
512
+ getContainer: resolveModalGetContainer({
513
+ customGetContainer: customGetContainer ?? getContainer,
514
+ getPopupContainer,
515
+ getHostNode: () => anchor
516
+ })
517
+ });
518
+ api.close = destroy;
519
+ return api;
520
+ };
521
+ };
522
+
523
+ const ModalScrollRegion = ({
524
+ className,
525
+ inset = false,
526
+ children,
527
+ ...props
528
+ }) => /*#__PURE__*/jsxRuntime.jsx(SimpleBar__default["default"], {
529
+ className: classnames__default["default"](styles['modal-scroll-region'], 'modal-scroll-region', inset && styles['is-inset'], className),
530
+ ...props,
531
+ children: /*#__PURE__*/jsxRuntime.jsx("div", {
532
+ className: styles['modal-scroll-region-inner'],
533
+ children: children
534
+ })
535
+ });
536
+
537
+ const ModalTabsLayout = ({
538
+ className,
539
+ destroyOnHidden = true,
540
+ ...props
541
+ }) => /*#__PURE__*/jsxRuntime.jsx(antd.Tabs, {
542
+ className: classnames__default["default"](styles['modal-tabs-layout'], className),
543
+ destroyOnHidden: destroyOnHidden,
544
+ ...props
545
+ });
546
+
547
+ const resolveColStyle = width => {
548
+ if (width == null || width === '1fr') {
549
+ return {
550
+ flex: '1 1 0%',
551
+ minWidth: 0
552
+ };
553
+ }
554
+ return {
555
+ flex: 'none',
556
+ width,
557
+ minWidth: 0
558
+ };
559
+ };
560
+ const ModalColumnsLayout = ({
561
+ widths,
562
+ className,
563
+ children,
564
+ ...props
565
+ }) => {
566
+ const cols = react.Children.toArray(children);
567
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
568
+ className: classnames__default["default"](styles['modal-columns-layout'], className),
569
+ ...props,
570
+ children: cols.map((child, index) => /*#__PURE__*/jsxRuntime.jsx("div", {
571
+ className: styles['modal-columns-layout__col'],
572
+ style: widths ? resolveColStyle(widths[index]) : undefined,
573
+ children: child
574
+ }, index))
575
+ });
576
+ };
577
+
578
+ const createModalRender = modalDefaults => hostProps => /*#__PURE__*/jsxRuntime.jsx(Modal, {
579
+ ...modalDefaults,
580
+ ...hostProps
581
+ });
582
+
583
+ const modalClassNames = {
584
+ stepsForm: 'react-modal-steps-form',
585
+ splitter: 'react-modal-splitter'
586
+ };
587
+
588
+ exports.ModalColumnsLayout = ModalColumnsLayout;
589
+ exports.ModalScrollRegion = ModalScrollRegion;
590
+ exports.ModalTabsLayout = ModalTabsLayout;
591
+ exports.createModalRender = createModalRender;
592
+ exports["default"] = Modal;
593
+ exports.modalClassNames = modalClassNames;
594
+ exports.useModal = useModal;
595
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/locale/zh-CN.js","../src/locale/en-US.js","../src/withLocale.js","../src/Footer.js","../src/Modal.js","../src/ModalScrollRegion.js","../src/ModalTabsLayout.js","../src/ModalColumnsLayout.js","../src/createModalRender.js","../src/modalClassNames.js"],"sourcesContent":["const locale = {\n Cancel: '取消',\n Confirm: '确定'\n};\n\nexport default locale;\n","const locale = {\n Cancel: 'Cancel',\n Confirm: 'Confirm'\n};\n\nexport default locale;\n","import { createWithIntlProvider } from '@kne/react-intl';\nimport zhCN from './locale/zh-CN';\nimport enUS from './locale/en-US';\n\nconst withLocale = createWithIntlProvider({\n defaultLocale: 'zh-CN',\n messages: {\n 'zh-CN': zhCN,\n 'en-US': enUS\n },\n namespace: 'react-modal'\n});\n\nexport default withLocale;\n","import classnames from 'classnames';\nimport ButtonGroup from '@kne/button-group';\nimport { useIntl } from '@kne/react-intl';\nimport style from './style.module.scss';\n\nconst Footer = ({ footer, footerButtons, onConfirm, onCancel, cancelText, confirmText, onClose, targetProps, isMobile }) => {\n const { formatMessage } = useIntl();\n\n const defaultButtons = [\n {\n children: cancelText || formatMessage({ id: 'Cancel' }),\n onClick: onCancel\n },\n {\n type: 'primary',\n children: confirmText || formatMessage({ id: 'Confirm' }),\n onClick: onConfirm\n }\n ];\n\n const rawList = footerButtons === undefined ? defaultButtons : footerButtons;\n\n const list = (Array.isArray(rawList) ? rawList : [])\n .filter(item => {\n if (typeof item?.display === 'function') {\n return item.display();\n }\n return item?.display !== false;\n })\n .map(({ ButtonComponent, onClick, autoClose = true, display, ...props }) => ({\n ...props,\n buttonComponent: ButtonComponent,\n onClick: async (...args) => {\n const res = await Promise.resolve(onClick && onClick(...args, targetProps));\n autoClose && res !== false && onClose && onClose();\n return res;\n }\n }));\n\n const showButtons = !(Array.isArray(footerButtons) && footerButtons.length === 0) && list.length > 0;\n const embeddedFooterOnly = Array.isArray(footerButtons) && footerButtons.length === 0 && footer != null;\n const showFooterSlot = !isMobile || footer;\n\n if (!showFooterSlot && !showButtons) {\n return null;\n }\n\n return (\n <div\n className={classnames(style['modal-footer'], 'modal-footer', {\n [style['is-mobile']]: isMobile,\n [style['is-embedded-footer']]: embeddedFooterOnly\n })}\n >\n {showFooterSlot ? <div className={style['modal-footer-extra']}>{footer}</div> : null}\n {showButtons ? (\n <div className={style['modal-footer-actions']}>\n <ButtonGroup list={list} showLength={list.length} place={isMobile ? 'center' : 'end'} />\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default Footer;\n","import { useEffect, useRef } from 'react';\nimport { App, Button, Modal as AntdModal } from 'antd';\nimport { CloseOutlined } from '@ant-design/icons';\nimport classnames from 'classnames';\nimport { useMobilePopupMount, useScrollElement } from '@kne/responsive-utils';\nimport withLocale from './withLocale';\nimport Footer from './Footer';\nimport SimpleBar from './SimpleBar';\nimport style from './style.module.scss';\n\nconst ModalLocaleRoot = withLocale(({ children }) => children);\n\nconst renderWithOptions = (value, options) => {\n if (typeof value === 'function') {\n return value(options);\n }\n return value;\n};\n\nconst wrapCustomGetContainer = customGetContainer => {\n if (!customGetContainer) {\n return undefined;\n }\n if (typeof customGetContainer === 'function') {\n return triggerNode => customGetContainer(triggerNode) || null;\n }\n return () => customGetContainer;\n};\n\nconst VIEWPORT_EXAMPLE_SELECTORS = ['.example-driver-device-scroll'];\n\nconst viewportPopupMountOptions = {\n cover: 'viewport',\n exampleSelectors: VIEWPORT_EXAMPLE_SELECTORS\n};\n\nconst findParentModalMountHost = node => {\n if (!node || typeof node.closest !== 'function') {\n return null;\n }\n const parentRoot = node.closest('.ant-modal-root');\n if (!parentRoot) {\n return null;\n }\n return parentRoot.parentElement || (typeof document !== 'undefined' ? document.body : null);\n};\n\nconst resolveModalGetContainer = ({ customGetContainer, getPopupContainer, getHostNode }) => {\n const wrappedCustom = wrapCustomGetContainer(customGetContainer);\n return triggerNode => {\n if (wrappedCustom) {\n const custom = wrappedCustom(triggerNode);\n if (custom) {\n return custom;\n }\n }\n const from = triggerNode || (typeof getHostNode === 'function' ? getHostNode() : null);\n const nestedHost = findParentModalMountHost(from);\n if (nestedHost) {\n return nestedHost;\n }\n return getPopupContainer(triggerNode);\n };\n};\n\nlet parentScrollLockCount = 0;\nlet parentScrollLocked = [];\n\nconst lockParentScroll = getScrollElement => {\n parentScrollLockCount += 1;\n if (parentScrollLockCount === 1) {\n const targets = [document.body];\n const scrollEl = typeof getScrollElement === 'function' ? getScrollElement() : null;\n if (scrollEl && scrollEl !== document.body && !targets.includes(scrollEl)) {\n targets.push(scrollEl);\n }\n parentScrollLocked = targets.map(el => {\n const prev = {\n overflow: el.style.overflow,\n overscrollBehavior: el.style.overscrollBehavior\n };\n el.style.overflow = 'hidden';\n el.style.overscrollBehavior = 'none';\n return { el, prev };\n });\n }\n return () => {\n parentScrollLockCount = Math.max(0, parentScrollLockCount - 1);\n if (parentScrollLockCount === 0) {\n parentScrollLocked.forEach(({ el, prev }) => {\n el.style.overflow = prev.overflow;\n el.style.overscrollBehavior = prev.overscrollBehavior;\n });\n parentScrollLocked = [];\n }\n };\n};\n\nconst useLockParentScroll = (enabled, getScrollElement) => {\n useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n return lockParentScroll(getScrollElement);\n }, [enabled, getScrollElement]);\n};\n\nconst sizeStyleVars = (size, hasFooter) => {\n const minBase = size === 'small' ? 300 : 500;\n const chrome = 48 + (hasFooter ? 58 : 0);\n const minHeight = `${Math.max(0, minBase - chrome)}px`;\n if (size === 'large') {\n return {\n width: typeof window !== 'undefined' ? `${Math.min(window.innerWidth - 64, 1500)}px` : '1500px',\n '--kne-modal-body-min-height': minHeight\n };\n }\n if (size === 'small') {\n return {\n width: '600px',\n '--kne-modal-body-min-height': minHeight\n };\n }\n return {\n width: '1000px',\n '--kne-modal-body-min-height': minHeight\n };\n};\n\nconst ModalOuter = ({ title, footer, footerButtons, noPadding, onClose, closable, onConfirm, onCancel, children, targetProps, cancelText, confirmText, isMobile, bodyScroll }) => {\n const effectiveNoPadding = noPadding ?? bodyScroll === false;\n const bodyInner = (\n <div\n className={classnames(style['modal-body-inner'], 'modal-body-inner', {\n [style['no-padding']]: effectiveNoPadding\n })}\n >\n {children}\n </div>\n );\n\n const bodyClassName = classnames(style['modal-body'], 'modal-body');\n\n return (\n <div\n className={classnames(style['modal-outer'], 'modal-container', {\n [style['is-mobile']]: isMobile,\n [style['no-title']]: !title,\n [style['no-footer']]: footer === null && footerButtons === undefined,\n [style['no-padding']]: effectiveNoPadding\n })}\n data-testid=\"react-modal\"\n >\n {closable === false ? null : (\n <Button\n data-testid=\"react-modal-close-btn\"\n className={classnames(style['modal-close'], 'modal-close')}\n type=\"text\"\n icon={<CloseOutlined />}\n onClick={e => {\n e.stopPropagation();\n onClose && onClose();\n }}\n />\n )}\n {title ? <div className={classnames(style['modal-title'], 'modal-title')}>{title}</div> : null}\n {bodyScroll !== false ? (\n <SimpleBar className={bodyClassName} style={{ height: 'var(--kne-modal-body-height)' }}>\n {bodyInner}\n </SimpleBar>\n ) : (\n <div className={classnames(bodyClassName, style['body-scroll-off'])}>{bodyInner}</div>\n )}\n {footer === null && footerButtons === undefined ? null : (\n <Footer footer={footer} footerButtons={footerButtons} onConfirm={onConfirm} confirmText={confirmText} onCancel={onCancel} cancelText={cancelText} onClose={onClose} targetProps={targetProps} isMobile={isMobile} />\n )}\n </div>\n );\n};\n\nconst computedCommonProps = ({\n children,\n footer,\n footerButtons,\n className,\n size = 'default',\n title,\n onClose,\n onConfirm,\n confirmText,\n onCancel,\n cancelText,\n closable,\n noPadding,\n bodyScroll = true,\n isMobile,\n mobileFullscreen = true,\n fixedModeClass,\n wrapClassName,\n classNames: propsClassNames,\n styles: propsStyles,\n style: propsStyle,\n ...props\n}) => {\n const useMobileLayout = isMobile && mobileFullscreen !== false;\n const hasFooter = !(footer === null && footerButtons === undefined);\n const sizeVars = sizeStyleVars(size, hasFooter);\n const { width, ...cssVars } = sizeVars;\n\n const runChildren = options => {\n const opts = Object.assign({}, options, { close: onClose });\n return (\n <ModalOuter\n title={renderWithOptions(title, opts)}\n closable={closable}\n onClose={onClose}\n onConfirm={onConfirm}\n confirmText={confirmText}\n onCancel={onCancel}\n cancelText={cancelText}\n footerButtons={renderWithOptions(footerButtons, opts)}\n noPadding={noPadding}\n footer={renderWithOptions(footer, opts)}\n targetProps={opts}\n isMobile={useMobileLayout}\n bodyScroll={bodyScroll}\n >\n {renderWithOptions(children, opts)}\n </ModalOuter>\n );\n };\n\n return {\n ...props,\n icon: null,\n centered: !useMobileLayout,\n width: props.width ?? (useMobileLayout ? 'var(--kne-modal-viewport-width, 100vw)' : width),\n wrapClassName: classnames(wrapClassName, style['modal-wrap'], useMobileLayout ? style['modal-wrap-fullscreen'] : style['modal-wrap-centered'], useMobileLayout && fixedModeClass),\n classNames: Object.assign({}, propsClassNames, {\n mask: classnames(propsClassNames?.mask, useMobileLayout && style['modal-mask-fullscreen'], useMobileLayout && fixedModeClass),\n container: classnames(style['modal-container'], useMobileLayout && style['is-mobile'], propsClassNames?.container),\n body: classnames(style['modal-antd-body'], useMobileLayout && style['is-mobile'], propsClassNames?.body),\n footer: classnames(style['modal-antd-footer'], propsClassNames?.footer),\n header: classnames(style['modal-antd-header'], propsClassNames?.header),\n content: classnames(style['modal-container'], useMobileLayout && style['is-mobile'], propsClassNames?.content)\n }),\n title: null,\n maskClosable: Object.prototype.hasOwnProperty.call(props, 'maskClosable') ? props.maskClosable : false,\n destroyOnHidden: true,\n footer: null,\n closable: false,\n onCancel: onClose,\n className: classnames(className, style['modal'], style[size], {\n [style['is-mobile']]: useMobileLayout\n }),\n style: Object.assign(\n {},\n cssVars,\n propsStyle,\n useMobileLayout\n ? {\n '--kne-modal-viewport-gutter': '0px',\n maxWidth: '100%',\n width: '100%',\n height: 'var(--kne-modal-viewport-height, 100vh)',\n maxHeight: 'var(--kne-modal-viewport-height, 100vh)',\n top: 0,\n margin: 0,\n paddingBottom: 0\n }\n : null\n ),\n styles: {\n ...propsStyles,\n container: {\n padding: 0,\n ...propsStyles?.container,\n ...(useMobileLayout\n ? {\n borderRadius: 0,\n height: '100%',\n maxHeight: '100%',\n overflow: 'hidden'\n }\n : null)\n },\n content: {\n padding: 0,\n ...propsStyles?.content\n },\n body: {\n padding: 0,\n ...propsStyles?.body,\n ...(useMobileLayout\n ? {\n height: '100%',\n maxHeight: '100%',\n overflow: 'hidden'\n }\n : null)\n }\n },\n children: <ModalLocaleRoot>{runChildren({})}</ModalLocaleRoot>\n };\n};\n\nconst Modal = withLocale(({ size = 'default', getContainer, open, mobileFullscreen = true, bodyScroll = true, ...props }) => {\n const hostRef = useRef(null);\n const { isMobile, fixedModeClass, getPopupContainer, anchorRef } = useMobilePopupMount({\n ...viewportPopupMountOptions,\n getPopupContainer: wrapCustomGetContainer(getContainer)\n });\n const getScrollElement = useScrollElement();\n useLockParentScroll(!!open, getScrollElement);\n\n const setAnchorRef = node => {\n hostRef.current = node;\n anchorRef(node);\n };\n\n const getModalContainer = resolveModalGetContainer({\n customGetContainer: getContainer,\n getPopupContainer,\n getHostNode: () => hostRef.current\n });\n\n return (\n <>\n <span ref={setAnchorRef} className={style['modal-host']} aria-hidden=\"true\" />\n <AntdModal\n {...computedCommonProps(\n Object.assign({}, props, {\n size,\n isMobile,\n open,\n fixedModeClass,\n mobileFullscreen,\n bodyScroll\n })\n )}\n open={open}\n getContainer={getModalContainer}\n />\n </>\n );\n});\n\nexport const useModal = () => {\n const { modal } = App.useApp();\n const { resolveMount, getPopupContainer } = useMobilePopupMount(viewportPopupMountOptions);\n const getScrollElement = useScrollElement();\n\n return props => {\n const anchor = typeof document !== 'undefined' ? document.activeElement : null;\n const { isMobile, fixedModeClass } = resolveMount(anchor);\n const unlock = lockParentScroll(getScrollElement);\n const api = {};\n const { afterClose: userAfterClose, getContainer: customGetContainer, ...restProps } = props;\n const { children, getContainer, afterClose, ...otherProps } = computedCommonProps({\n onClose: () => api.close(),\n isMobile,\n fixedModeClass,\n afterClose: (...args) => {\n unlock();\n userAfterClose && userAfterClose(...args);\n },\n ...restProps\n });\n const { destroy } = modal.info({\n ...otherProps,\n afterClose,\n content: children,\n getContainer: resolveModalGetContainer({\n customGetContainer: customGetContainer ?? getContainer,\n getPopupContainer,\n getHostNode: () => anchor\n })\n });\n api.close = destroy;\n return api;\n };\n};\n\nexport default Modal;\n","import classnames from 'classnames';\nimport SimpleBar from './SimpleBar';\nimport styles from './layouts.module.scss';\n\nconst ModalScrollRegion = ({ className, inset = false, children, ...props }) => (\n <SimpleBar className={classnames(styles['modal-scroll-region'], 'modal-scroll-region', inset && styles['is-inset'], className)} {...props}>\n <div className={styles['modal-scroll-region-inner']}>{children}</div>\n </SimpleBar>\n);\n\nexport default ModalScrollRegion;\n","import { Tabs } from 'antd';\nimport classnames from 'classnames';\nimport styles from './layouts.module.scss';\n\nconst ModalTabsLayout = ({ className, destroyOnHidden = true, ...props }) => <Tabs className={classnames(styles['modal-tabs-layout'], className)} destroyOnHidden={destroyOnHidden} {...props} />;\n\nexport default ModalTabsLayout;\n","import { Children } from 'react';\nimport classnames from 'classnames';\nimport styles from './layouts.module.scss';\n\nconst resolveColStyle = width => {\n if (width == null || width === '1fr') {\n return { flex: '1 1 0%', minWidth: 0 };\n }\n return { flex: 'none', width, minWidth: 0 };\n};\n\nconst ModalColumnsLayout = ({ widths, className, children, ...props }) => {\n const cols = Children.toArray(children);\n\n return (\n <div className={classnames(styles['modal-columns-layout'], className)} {...props}>\n {cols.map((child, index) => (\n <div key={index} className={styles['modal-columns-layout__col']} style={widths ? resolveColStyle(widths[index]) : undefined}>\n {child}\n </div>\n ))}\n </div>\n );\n};\n\nexport default ModalColumnsLayout;\n","import Modal from './Modal';\n\nconst createModalRender = modalDefaults => hostProps => <Modal {...modalDefaults} {...hostProps} />;\n\nexport default createModalRender;\n","export const modalClassNames = {\n stepsForm: 'react-modal-steps-form',\n splitter: 'react-modal-splitter'\n};\n\nexport default modalClassNames;\n"],"names":["locale","Cancel","Confirm","withLocale","createWithIntlProvider","defaultLocale","messages","zhCN","enUS","namespace","Footer","footer","footerButtons","onConfirm","onCancel","cancelText","confirmText","onClose","targetProps","isMobile","formatMessage","useIntl","defaultButtons","children","id","onClick","type","rawList","undefined","list","Array","isArray","filter","item","display","map","ButtonComponent","autoClose","props","buttonComponent","_arguments","arguments","Promise","resolve","slice","call","then","res","e","reject","showButtons","length","embeddedFooterOnly","showFooterSlot","_jsxs","className","classnames","style","_jsx","ButtonGroup","showLength","place","ModalLocaleRoot","renderWithOptions","value","options","wrapCustomGetContainer","customGetContainer","triggerNode","VIEWPORT_EXAMPLE_SELECTORS","viewportPopupMountOptions","cover","exampleSelectors","findParentModalMountHost","node","closest","parentRoot","parentElement","document","body","resolveModalGetContainer","getPopupContainer","getHostNode","wrappedCustom","custom","from","nestedHost","parentScrollLockCount","parentScrollLocked","lockParentScroll","getScrollElement","targets","scrollEl","includes","push","el","prev","overflow","overscrollBehavior","Math","max","forEach","useLockParentScroll","enabled","useEffect","sizeStyleVars","size","hasFooter","minBase","chrome","minHeight","width","window","min","innerWidth","ModalOuter","title","noPadding","closable","bodyScroll","effectiveNoPadding","bodyInner","bodyClassName","Button","icon","CloseOutlined","stopPropagation","SimpleBar","height","computedCommonProps","mobileFullscreen","fixedModeClass","wrapClassName","classNames","propsClassNames","styles","propsStyles","propsStyle","useMobileLayout","sizeVars","cssVars","runChildren","opts","Object","assign","close","centered","mask","container","header","content","maskClosable","prototype","hasOwnProperty","destroyOnHidden","maxWidth","maxHeight","top","margin","paddingBottom","padding","borderRadius","Modal","getContainer","open","hostRef","useRef","anchorRef","useMobilePopupMount","useScrollElement","setAnchorRef","current","getModalContainer","_Fragment","ref","AntdModal","useModal","modal","App","useApp","resolveMount","anchor","activeElement","unlock","api","afterClose","userAfterClose","restProps","otherProps","destroy","info","ModalScrollRegion","inset","ModalTabsLayout","Tabs","resolveColStyle","flex","minWidth","ModalColumnsLayout","widths","cols","Children","toArray","child","index","createModalRender","modalDefaults","hostProps","modalClassNames","stepsForm","splitter"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,MAAMA,QAAM,GAAG;AACbC,EAAAA,MAAM,EAAE,IAAI;AACZC,EAAAA,OAAO,EAAE,IAAA;AACX,CAAC;;ACHD,MAAMF,MAAM,GAAG;AACbC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,OAAO,EAAE,SAAA;AACX,CAAC;;ACCD,MAAMC,UAAU,GAAGC,gCAAsB,CAAC;AACxCC,EAAAA,aAAa,EAAE,OAAO;AACtBC,EAAAA,QAAQ,EAAE;AACR,IAAA,OAAO,EAAEC,QAAI;AACb,IAAA,OAAO,EAAEC,MAAAA;GACV;AACDC,EAAAA,SAAS,EAAE,aAAA;AACb,CAAC,CAAC;;;;ACNF,MAAMC,MAAM,GAAGA,CAAC;EAAEC,MAAM;EAAEC,aAAa;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,UAAU;EAAEC,WAAW;EAAEC,OAAO;EAAEC,WAAW;AAAEC,EAAAA,QAAAA;AAAS,CAAC,KAAK;EAC1H,MAAM;AAAEC,IAAAA,aAAAA;GAAe,GAAGC,iBAAO,EAAE,CAAA;EAEnC,MAAMC,cAAc,GAAG,CACrB;AACEC,IAAAA,QAAQ,EAAER,UAAU,IAAIK,aAAa,CAAC;AAAEI,MAAAA,EAAE,EAAE,QAAA;AAAS,KAAC,CAAC;AACvDC,IAAAA,OAAO,EAAEX,QAAAA;AACX,GAAC,EACD;AACEY,IAAAA,IAAI,EAAE,SAAS;AACfH,IAAAA,QAAQ,EAAEP,WAAW,IAAII,aAAa,CAAC;AAAEI,MAAAA,EAAE,EAAE,SAAA;AAAU,KAAC,CAAC;AACzDC,IAAAA,OAAO,EAAEZ,SAAAA;AACX,GAAC,CACF,CAAA;EAED,MAAMc,OAAO,GAAGf,aAAa,KAAKgB,SAAS,GAAGN,cAAc,GAAGV,aAAa,CAAA;AAE5E,EAAA,MAAM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