@bbl-digital/snorre 2.3.19 → 2.3.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/bundle.js +53 -49
- package/esm/core/Editor/index.js +1 -0
- package/esm/core/Input/index.js +1 -1
- package/esm/core/Modal/index.js +47 -44
- package/lib/core/Editor/index.d.ts.map +1 -1
- package/lib/core/Editor/index.js +1 -0
- package/lib/core/Input/index.js +1 -1
- package/lib/core/Modal/index.d.ts.map +1 -1
- package/lib/core/Modal/index.js +47 -44
- package/package.json +2 -1
package/dist/bundle.js
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
(function (global, factory) {
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@emotion/styled/base'), require('react'), require('@emotion/react'), require('react/jsx-runtime'), require('@emotion/react/jsx-runtime'), require('react-transition-group'), require('body-scroll-lock'), require('recharts'), require('react-day-picker/DayPickerInput'), require('react-day-picker'), require('react-draft-wysiwyg'), require('draft-js'), require('draft-js-import-html'), require('react-draft-wysiwyg/dist/react-draft-wysiwyg.css'), require('draft-convert'), require('draftjs-to-html'), require('@tinymce/tinymce-react')) :
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@emotion/styled/base', 'react', '@emotion/react', 'react/jsx-runtime', '@emotion/react/jsx-runtime', 'react-transition-group', 'body-scroll-lock', 'recharts', 'react-day-picker/DayPickerInput', 'react-day-picker', 'react-draft-wysiwyg', 'draft-js', 'draft-js-import-html', 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css', 'draft-convert', 'draftjs-to-html', '@tinymce/tinymce-react'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Snorre = {}, global._styled, global.React, global.react, global.jsxRuntime, global.jsxRuntime$1, global.reactTransitionGroup, global.bodyScrollLock, global.recharts, global.DayPickerInput, global.DayPicker, global.reactDraftWysiwyg, global.draftJs, global.draftJsImportHtml, null, global.draftConvert, global.draftToHtml, global.tinymceReact));
|
5
|
-
}(this, (function (exports, _styled, React, react, jsxRuntime, jsxRuntime$1, reactTransitionGroup, bodyScrollLock, recharts, DayPickerInput, DayPicker, reactDraftWysiwyg, draftJs, draftJsImportHtml, reactDraftWysiwyg_css, draftConvert, draftToHtml, tinymceReact) { 'use strict';
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@emotion/styled/base'), require('react'), require('@emotion/react'), require('react/jsx-runtime'), require('@emotion/react/jsx-runtime'), require('react-transition-group'), require('body-scroll-lock'), require('focus-trap-react'), require('recharts'), require('react-day-picker/DayPickerInput'), require('react-day-picker'), require('react-draft-wysiwyg'), require('draft-js'), require('draft-js-import-html'), require('react-draft-wysiwyg/dist/react-draft-wysiwyg.css'), require('draft-convert'), require('draftjs-to-html'), require('@tinymce/tinymce-react')) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@emotion/styled/base', 'react', '@emotion/react', 'react/jsx-runtime', '@emotion/react/jsx-runtime', 'react-transition-group', 'body-scroll-lock', 'focus-trap-react', 'recharts', 'react-day-picker/DayPickerInput', 'react-day-picker', 'react-draft-wysiwyg', 'draft-js', 'draft-js-import-html', 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css', 'draft-convert', 'draftjs-to-html', '@tinymce/tinymce-react'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Snorre = {}, global._styled, global.React, global.react, global.jsxRuntime, global.jsxRuntime$1, global.reactTransitionGroup, global.bodyScrollLock, global.FocusTrap, global.recharts, global.DayPickerInput, global.DayPicker, global.reactDraftWysiwyg, global.draftJs, global.draftJsImportHtml, null, global.draftConvert, global.draftToHtml, global.tinymceReact));
|
5
|
+
}(this, (function (exports, _styled, React, react, jsxRuntime, jsxRuntime$1, reactTransitionGroup, bodyScrollLock, FocusTrap, recharts, DayPickerInput, DayPicker, reactDraftWysiwyg, draftJs, draftJsImportHtml, reactDraftWysiwyg_css, draftConvert, draftToHtml, tinymceReact) { 'use strict';
|
6
6
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
8
8
|
|
9
9
|
var _styled__default = /*#__PURE__*/_interopDefaultLegacy(_styled);
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
11
|
+
var FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
|
11
12
|
var DayPickerInput__default = /*#__PURE__*/_interopDefaultLegacy(DayPickerInput);
|
12
13
|
var DayPicker__default = /*#__PURE__*/_interopDefaultLegacy(DayPicker);
|
13
14
|
var draftToHtml__default = /*#__PURE__*/_interopDefaultLegacy(draftToHtml);
|
@@ -984,7 +985,7 @@
|
|
984
985
|
setValueChanged(e.target.value);
|
985
986
|
}
|
986
987
|
|
987
|
-
if (props.onChange) {
|
988
|
+
if (props.onChange && !props.disabled) {
|
988
989
|
props.onChange(e);
|
989
990
|
}
|
990
991
|
};
|
@@ -24442,52 +24443,54 @@
|
|
24442
24443
|
classNames: "overlay",
|
24443
24444
|
children: jsxRuntime$1.jsx(Overlay, {
|
24444
24445
|
onClick: onOutsideClick,
|
24445
|
-
children: jsxRuntime$1.
|
24446
|
-
|
24447
|
-
|
24448
|
-
|
24449
|
-
|
24450
|
-
|
24451
|
-
children: [hasCollapse && jsxRuntime$1.
|
24452
|
-
|
24453
|
-
|
24454
|
-
|
24455
|
-
|
24456
|
-
|
24457
|
-
|
24458
|
-
|
24459
|
-
|
24460
|
-
|
24461
|
-
|
24462
|
-
|
24463
|
-
|
24446
|
+
children: jsxRuntime$1.jsx(FocusTrap__default['default'], {
|
24447
|
+
children: jsxRuntime$1.jsxs(Content$3, {
|
24448
|
+
width: width,
|
24449
|
+
isFullscreen: isFullscreen,
|
24450
|
+
canToggleFullscreen: !!toggleFullscreen,
|
24451
|
+
onClick: e => e.stopPropagation(),
|
24452
|
+
children: [(!hideCloseButton || hasCollapse || toggleFullscreen) && jsxRuntime$1.jsxs(CloseWrapper, {
|
24453
|
+
children: [hasCollapse && jsxRuntime$1.jsx(Button, {
|
24454
|
+
nostyle: true,
|
24455
|
+
onClick: onCollapse,
|
24456
|
+
focusable: true,
|
24457
|
+
children: jsxRuntime$1.jsx(IconMinus$1, {})
|
24458
|
+
}), toggleFullscreen && jsxRuntime$1.jsx(Button, {
|
24459
|
+
nostyle: true,
|
24460
|
+
onClick: () => setIsFullscreen(!isFullscreen),
|
24461
|
+
focusable: true,
|
24462
|
+
children: isFullscreen ? jsxRuntime$1.jsx(IconFullscreenClose$1, {
|
24463
|
+
size: "20px"
|
24464
|
+
}) : jsxRuntime$1.jsx(IconFullscreenOpen$1, {
|
24465
|
+
size: "20px"
|
24466
|
+
})
|
24467
|
+
}), !hideCloseButton && jsxRuntime$1.jsx(Button, {
|
24468
|
+
nostyle: true,
|
24469
|
+
onClick: setClose,
|
24470
|
+
focusable: true,
|
24471
|
+
children: jsxRuntime$1.jsx(IconClose$1, {})
|
24472
|
+
})]
|
24473
|
+
}), jsxRuntime$1.jsx(HeaderWrapper$2, {
|
24474
|
+
css: headerCss,
|
24475
|
+
withCollapse: hasCollapse,
|
24476
|
+
ref: handleHeaderRef,
|
24477
|
+
children: header && header
|
24478
|
+
}), jsxRuntime$1.jsx(ModalContent, {
|
24479
|
+
css: contentCss,
|
24480
|
+
scrollable: !disableScrollableContent,
|
24481
|
+
ref: disableScrollableContent ? modalRef : undefined,
|
24482
|
+
children: disableScrollableContent ? children : jsxRuntime$1.jsx(ScrollableDiv, {
|
24483
|
+
ref: modalRef,
|
24484
|
+
hasActionButton: !!actionButton,
|
24485
|
+
isFullscreen: isFullscreen,
|
24486
|
+
windowHeight: window.innerHeight,
|
24487
|
+
headerHeight: headerHeight,
|
24488
|
+
children: children
|
24464
24489
|
})
|
24465
|
-
}),
|
24466
|
-
|
24467
|
-
onClick: setClose,
|
24468
|
-
focusable: true,
|
24469
|
-
children: jsxRuntime$1.jsx(IconClose$1, {})
|
24490
|
+
}), actionButton && jsxRuntime$1.jsx(ActionButtonWrapper, {
|
24491
|
+
children: actionButton
|
24470
24492
|
})]
|
24471
|
-
})
|
24472
|
-
css: headerCss,
|
24473
|
-
withCollapse: hasCollapse,
|
24474
|
-
ref: handleHeaderRef,
|
24475
|
-
children: header && header
|
24476
|
-
}), jsxRuntime$1.jsx(ModalContent, {
|
24477
|
-
css: contentCss,
|
24478
|
-
scrollable: !disableScrollableContent,
|
24479
|
-
ref: disableScrollableContent ? modalRef : undefined,
|
24480
|
-
children: disableScrollableContent ? children : jsxRuntime$1.jsx(ScrollableDiv, {
|
24481
|
-
ref: modalRef,
|
24482
|
-
hasActionButton: !!actionButton,
|
24483
|
-
isFullscreen: isFullscreen,
|
24484
|
-
windowHeight: window.innerHeight,
|
24485
|
-
headerHeight: headerHeight,
|
24486
|
-
children: children
|
24487
|
-
})
|
24488
|
-
}), actionButton && jsxRuntime$1.jsx(ActionButtonWrapper, {
|
24489
|
-
children: actionButton
|
24490
|
-
})]
|
24493
|
+
})
|
24491
24494
|
})
|
24492
24495
|
})
|
24493
24496
|
});
|
@@ -31708,6 +31711,7 @@
|
|
31708
31711
|
onEditorChange: handleChange,
|
31709
31712
|
disabled: disabled,
|
31710
31713
|
init: {
|
31714
|
+
browser_spellcheck: true,
|
31711
31715
|
height,
|
31712
31716
|
min_height: 100,
|
31713
31717
|
max_height: maxHeight,
|
package/esm/core/Editor/index.js
CHANGED
package/esm/core/Input/index.js
CHANGED
package/esm/core/Modal/index.js
CHANGED
@@ -7,6 +7,7 @@ import IconClose from '../../icons/General/IconClose';
|
|
7
7
|
import { Button, IconFullscreenClose } from '../..';
|
8
8
|
import IconMinus from '../../icons/General/IconMinus';
|
9
9
|
import IconFullscreenOpen from '../../icons/General/IconFullscreenOpen';
|
10
|
+
import FocusTrap from 'focus-trap-react';
|
10
11
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
11
12
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
12
13
|
|
@@ -82,52 +83,54 @@ const Modal = ({
|
|
82
83
|
classNames: "overlay",
|
83
84
|
children: _jsx(Overlay, {
|
84
85
|
onClick: onOutsideClick,
|
85
|
-
children:
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
children: [hasCollapse &&
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
86
|
+
children: _jsx(FocusTrap, {
|
87
|
+
children: _jsxs(Content, {
|
88
|
+
width: width,
|
89
|
+
isFullscreen: isFullscreen,
|
90
|
+
canToggleFullscreen: !!toggleFullscreen,
|
91
|
+
onClick: e => e.stopPropagation(),
|
92
|
+
children: [(!hideCloseButton || hasCollapse || toggleFullscreen) && _jsxs(CloseWrapper, {
|
93
|
+
children: [hasCollapse && _jsx(Button, {
|
94
|
+
nostyle: true,
|
95
|
+
onClick: onCollapse,
|
96
|
+
focusable: true,
|
97
|
+
children: _jsx(IconMinus, {})
|
98
|
+
}), toggleFullscreen && _jsx(Button, {
|
99
|
+
nostyle: true,
|
100
|
+
onClick: () => setIsFullscreen(!isFullscreen),
|
101
|
+
focusable: true,
|
102
|
+
children: isFullscreen ? _jsx(IconFullscreenClose, {
|
103
|
+
size: "20px"
|
104
|
+
}) : _jsx(IconFullscreenOpen, {
|
105
|
+
size: "20px"
|
106
|
+
})
|
107
|
+
}), !hideCloseButton && _jsx(Button, {
|
108
|
+
nostyle: true,
|
109
|
+
onClick: setClose,
|
110
|
+
focusable: true,
|
111
|
+
children: _jsx(IconClose, {})
|
112
|
+
})]
|
113
|
+
}), _jsx(HeaderWrapper, {
|
114
|
+
css: headerCss,
|
115
|
+
withCollapse: hasCollapse,
|
116
|
+
ref: handleHeaderRef,
|
117
|
+
children: header && header
|
118
|
+
}), _jsx(ModalContent, {
|
119
|
+
css: contentCss,
|
120
|
+
scrollable: !disableScrollableContent,
|
121
|
+
ref: disableScrollableContent ? modalRef : undefined,
|
122
|
+
children: disableScrollableContent ? children : _jsx(ScrollableDiv, {
|
123
|
+
ref: modalRef,
|
124
|
+
hasActionButton: !!actionButton,
|
125
|
+
isFullscreen: isFullscreen,
|
126
|
+
windowHeight: window.innerHeight,
|
127
|
+
headerHeight: headerHeight,
|
128
|
+
children: children
|
104
129
|
})
|
105
|
-
}),
|
106
|
-
|
107
|
-
onClick: setClose,
|
108
|
-
focusable: true,
|
109
|
-
children: _jsx(IconClose, {})
|
130
|
+
}), actionButton && _jsx(ActionButtonWrapper, {
|
131
|
+
children: actionButton
|
110
132
|
})]
|
111
|
-
})
|
112
|
-
css: headerCss,
|
113
|
-
withCollapse: hasCollapse,
|
114
|
-
ref: handleHeaderRef,
|
115
|
-
children: header && header
|
116
|
-
}), _jsx(ModalContent, {
|
117
|
-
css: contentCss,
|
118
|
-
scrollable: !disableScrollableContent,
|
119
|
-
ref: disableScrollableContent ? modalRef : undefined,
|
120
|
-
children: disableScrollableContent ? children : _jsx(ScrollableDiv, {
|
121
|
-
ref: modalRef,
|
122
|
-
hasActionButton: !!actionButton,
|
123
|
-
isFullscreen: isFullscreen,
|
124
|
-
windowHeight: window.innerHeight,
|
125
|
-
headerHeight: headerHeight,
|
126
|
-
children: children
|
127
|
-
})
|
128
|
-
}), actionButton && _jsx(ActionButtonWrapper, {
|
129
|
-
children: actionButton
|
130
|
-
})]
|
133
|
+
})
|
131
134
|
})
|
132
135
|
})
|
133
136
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAgBpC,UAAU,MAAM;IACd,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3D;AAID,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Editor/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAgBpC,UAAU,MAAM;IACd,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAA;IAClC,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,oBAAoB;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,iBAAiB;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,mBAAmB;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3D;AAID,QAAA,MAAM,MAAM,EAAE,EAAE,CAAC,MAAM,CAuGtB,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/lib/core/Editor/index.js
CHANGED
package/lib/core/Input/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Modal/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAsD,MAAM,OAAO,CAAA;AAkB1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/Modal/index.tsx"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,KAAsD,MAAM,OAAO,CAAA;AAkB1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAKjD,UAAU,MAAM;IACd,8BAA8B;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,sCAAsC;IACtC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,oCAAoC;IACpC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qCAAqC;IACrC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,wBAAwB;IACxB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,kCAAkC;IAClC,UAAU,CAAC,EAAE,GAAG,EAAE,CAAA;IAClB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,8HAA8H;IAC9H,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,2BAA2B;IAC3B,UAAU,CAAC,EAAE,gBAAgB,CAAA;IAC7B,0BAA0B;IAC1B,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,wCAAwC;IACxC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,+CAA+C;IAC/C,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,0CAA0C;IAC1C,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;CACxB;AAED,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA+I3B,CAAA;AAED,eAAe,KAAK,CAAA"}
|
package/lib/core/Modal/index.js
CHANGED
@@ -7,6 +7,7 @@ import IconClose from '../../icons/General/IconClose';
|
|
7
7
|
import { Button, IconFullscreenClose } from '../..';
|
8
8
|
import IconMinus from '../../icons/General/IconMinus';
|
9
9
|
import IconFullscreenOpen from '../../icons/General/IconFullscreenOpen';
|
10
|
+
import FocusTrap from 'focus-trap-react';
|
10
11
|
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
11
12
|
import { jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
12
13
|
|
@@ -82,52 +83,54 @@ const Modal = ({
|
|
82
83
|
classNames: "overlay",
|
83
84
|
children: _jsx(Overlay, {
|
84
85
|
onClick: onOutsideClick,
|
85
|
-
children:
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
children: [hasCollapse &&
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
86
|
+
children: _jsx(FocusTrap, {
|
87
|
+
children: _jsxs(Content, {
|
88
|
+
width: width,
|
89
|
+
isFullscreen: isFullscreen,
|
90
|
+
canToggleFullscreen: !!toggleFullscreen,
|
91
|
+
onClick: e => e.stopPropagation(),
|
92
|
+
children: [(!hideCloseButton || hasCollapse || toggleFullscreen) && _jsxs(CloseWrapper, {
|
93
|
+
children: [hasCollapse && _jsx(Button, {
|
94
|
+
nostyle: true,
|
95
|
+
onClick: onCollapse,
|
96
|
+
focusable: true,
|
97
|
+
children: _jsx(IconMinus, {})
|
98
|
+
}), toggleFullscreen && _jsx(Button, {
|
99
|
+
nostyle: true,
|
100
|
+
onClick: () => setIsFullscreen(!isFullscreen),
|
101
|
+
focusable: true,
|
102
|
+
children: isFullscreen ? _jsx(IconFullscreenClose, {
|
103
|
+
size: "20px"
|
104
|
+
}) : _jsx(IconFullscreenOpen, {
|
105
|
+
size: "20px"
|
106
|
+
})
|
107
|
+
}), !hideCloseButton && _jsx(Button, {
|
108
|
+
nostyle: true,
|
109
|
+
onClick: setClose,
|
110
|
+
focusable: true,
|
111
|
+
children: _jsx(IconClose, {})
|
112
|
+
})]
|
113
|
+
}), _jsx(HeaderWrapper, {
|
114
|
+
css: headerCss,
|
115
|
+
withCollapse: hasCollapse,
|
116
|
+
ref: handleHeaderRef,
|
117
|
+
children: header && header
|
118
|
+
}), _jsx(ModalContent, {
|
119
|
+
css: contentCss,
|
120
|
+
scrollable: !disableScrollableContent,
|
121
|
+
ref: disableScrollableContent ? modalRef : undefined,
|
122
|
+
children: disableScrollableContent ? children : _jsx(ScrollableDiv, {
|
123
|
+
ref: modalRef,
|
124
|
+
hasActionButton: !!actionButton,
|
125
|
+
isFullscreen: isFullscreen,
|
126
|
+
windowHeight: window.innerHeight,
|
127
|
+
headerHeight: headerHeight,
|
128
|
+
children: children
|
104
129
|
})
|
105
|
-
}),
|
106
|
-
|
107
|
-
onClick: setClose,
|
108
|
-
focusable: true,
|
109
|
-
children: _jsx(IconClose, {})
|
130
|
+
}), actionButton && _jsx(ActionButtonWrapper, {
|
131
|
+
children: actionButton
|
110
132
|
})]
|
111
|
-
})
|
112
|
-
css: headerCss,
|
113
|
-
withCollapse: hasCollapse,
|
114
|
-
ref: handleHeaderRef,
|
115
|
-
children: header && header
|
116
|
-
}), _jsx(ModalContent, {
|
117
|
-
css: contentCss,
|
118
|
-
scrollable: !disableScrollableContent,
|
119
|
-
ref: disableScrollableContent ? modalRef : undefined,
|
120
|
-
children: disableScrollableContent ? children : _jsx(ScrollableDiv, {
|
121
|
-
ref: modalRef,
|
122
|
-
hasActionButton: !!actionButton,
|
123
|
-
isFullscreen: isFullscreen,
|
124
|
-
windowHeight: window.innerHeight,
|
125
|
-
headerHeight: headerHeight,
|
126
|
-
children: children
|
127
|
-
})
|
128
|
-
}), actionButton && _jsx(ActionButtonWrapper, {
|
129
|
-
children: actionButton
|
130
|
-
})]
|
133
|
+
})
|
131
134
|
})
|
132
135
|
})
|
133
136
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@bbl-digital/snorre",
|
3
|
-
"version": "2.3.
|
3
|
+
"version": "2.3.22",
|
4
4
|
"description": "Design library for BBL Digital",
|
5
5
|
"license": "MIT",
|
6
6
|
"main": "./lib/index.js",
|
@@ -24,6 +24,7 @@
|
|
24
24
|
"draft-js": "^0.11.7",
|
25
25
|
"draft-js-import-html": "^1.4.1",
|
26
26
|
"draftjs-to-html": "^0.9.1",
|
27
|
+
"focus-trap-react": "^9.0.0",
|
27
28
|
"react-day-picker": "^7.4.8",
|
28
29
|
"react-draft-wysiwyg": "^1.14.7",
|
29
30
|
"recharts": "^2.1.5"
|