@spothero/ui 15.10.9 → 16.0.0-beta.0
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/.eslintignore +2 -1
- package/dex.config.js +1 -1
- package/jest.config.json +1 -2
- package/package.json +8 -24
- package/styles/{v2/components → components}/Accordion/Accordion.stories.js +2 -2
- package/styles/{v2/components → components}/Accordion/styles/button.js +1 -1
- package/styles/{v2/components → components}/Alert/Alert.jsx +2 -2
- package/styles/{v2/components → components}/AutoSuggestSelect/AutoSuggestSelect.jsx +7 -0
- package/styles/{v2/components → components}/Button/stories/button.js +1 -1
- package/styles/{v2/components → components}/Button/stories/overview.js +1 -1
- package/styles/{v2/components → components}/FormControl/FormControl.jsx +2 -0
- package/styles/{v2/components → components}/Grid/Grid.stories.js +1 -1
- package/styles/{v2/components → components}/Heading/Heading.styles.js +1 -1
- package/styles/{v2/components → components}/Image/Image.jsx +23 -2
- package/styles/{v2/components → components}/Link/Link.stories.js +2 -2
- package/styles/{v2/components → components}/List/List.stories.js +2 -2
- package/styles/{v2/components → components}/Modal/Modal.jsx +0 -1
- package/styles/{v2/components → components}/Modal/Modal.stories.js +4 -4
- package/styles/{v2/components → components}/Popover/Popover.stories.js +1 -1
- package/styles/{v2/components → components}/Skeleton/index.js +1 -1
- package/styles/{v2/components → components}/Spinner/Spinner.stories.js +1 -1
- package/styles/{v2/components → components}/Table/Table.styles.js +1 -1
- package/styles/{v2/components → components}/Tabs/Tabs.jsx +2 -3
- package/styles/{v2/components → components}/Tabs/combineSizeWithVariant.js +5 -3
- package/styles/{v2/components → components}/Text/Text.styles.js +1 -1
- package/styles/{v2/components → components}/Text/combineAsWithVariant.js +1 -1
- package/styles/{v2/components → components}/ThemeProvider/ThemeProvider.jsx +2 -2
- package/styles/{v2/components → components}/ThemeProvider/ThemeProvider.stories.js +2 -2
- package/v2/index.js +1 -1
- package/v2/index.js.map +1 -1
- package/backlog/Alert/Alert.js +0 -37
- package/backlog/AutoSuggestInput/AutoSuggestInput.js +0 -474
- package/backlog/AutoSuggestInput/AutoSuggestItem.js +0 -99
- package/backlog/AutoSuggestInput/AutoSuggestList.js +0 -126
- package/backlog/Badge/Badge.js +0 -28
- package/backlog/Chart/Chart.js +0 -211
- package/backlog/Checkbox/Checkbox.js +0 -167
- package/backlog/DateTime/DatePicker.js +0 -279
- package/backlog/DateTime/DatePickerCalendar.js +0 -199
- package/backlog/DateTime/DatePickerCalendarNavigation.js +0 -102
- package/backlog/DateTime/DatePickerCalendarWithRange.js +0 -241
- package/backlog/DateTime/DateTimePicker.js +0 -216
- package/backlog/DateTime/DateTimeRangePicker.js +0 -530
- package/backlog/DateTime/TimePicker.js +0 -180
- package/backlog/DateTime/date-time-assertions.js +0 -66
- package/backlog/DateTime/index.js +0 -55
- package/backlog/ErrorBoundary/ErrorBoundary.js +0 -125
- package/backlog/Flyout/Flyout.js +0 -198
- package/backlog/Form/Form.js +0 -193
- package/backlog/Form/FormElementError.js +0 -24
- package/backlog/Form/FormGroup.js +0 -30
- package/backlog/Form/FormGroupError.js +0 -28
- package/backlog/Form/index.js +0 -39
- package/backlog/GooglePlacesSearchInput/GooglePlacesSearchInput.js +0 -253
- package/backlog/GooglePlacesSearchInput/PoweredByGoogle.js +0 -38
- package/backlog/GooglePlacesSearchInput/index.js +0 -23
- package/backlog/HorizontalRule/HorizontalRule.js +0 -30
- package/backlog/Label/Label.js +0 -31
- package/backlog/Notification/Notification.js +0 -178
- package/backlog/Notification/NotificationContainer.js +0 -131
- package/backlog/Notification/NotificationPropTypes.js +0 -37
- package/backlog/Notification/index.js +0 -23
- package/backlog/PasswordControl/PasswordControl.js +0 -201
- package/backlog/Portal/Portal.js +0 -110
- package/backlog/PulseLoader/PulseLoader.js +0 -62
- package/backlog/Radio/Radio.js +0 -135
- package/backlog/Radio/RadioGroup.js +0 -123
- package/backlog/Radio/index.js +0 -23
- package/backlog/RenderInBody/RenderInBody.js +0 -103
- package/backlog/Select/Select.js +0 -275
- package/backlog/Select/SelectItemPropTypes.js +0 -32
- package/backlog/Select/index.js +0 -23
- package/backlog/SelectControlled/SelectControlled.js +0 -270
- package/backlog/SelectControlled/index.js +0 -15
- package/backlog/Sprite/Sprite.js +0 -24
- package/backlog/Tabs/Tab.js +0 -94
- package/backlog/Tabs/TabContent.js +0 -56
- package/backlog/Tabs/TabNavigation.js +0 -108
- package/backlog/Tabs/TabPanel.js +0 -29
- package/backlog/Tabs/Tabs.js +0 -126
- package/backlog/Tabs/index.js +0 -47
- package/backlog/TextArea/TextArea.js +0 -155
- package/backlog/TextInput/TextInput.js +0 -230
- package/backlog/TextInput/TextInputPropTypes.js +0 -114
- package/backlog/TextInput/index.js +0 -23
- package/backlog/Tooltip/Tooltip.js +0 -249
- package/backlog/index.js +0 -393
- package/backlog/v1/components/Button/Button.js +0 -64
- package/backlog/v1/components/Button/button-props.js +0 -48
- package/backlog/v1/components/Image/Image.js +0 -193
- package/backlog/v1/components/Loader/Loader.js +0 -51
- package/backlog/v1/components/Modal/Modal.js +0 -325
- package/backlog/v1/components/Modal/ModalContent.js +0 -154
- package/backlog/v1/components/Modal/ModalFooter.js +0 -89
- package/backlog/v1/components/Modal/index.js +0 -31
- package/backlog/v1/components/Panel/Panel.js +0 -209
- package/backlog/v1/components/Table/Table.js +0 -336
- package/backlog/v1/components/Table/TableCell.js +0 -28
- package/backlog/v1/components/Table/TableCellPropTypes.js +0 -22
- package/backlog/v1/components/Table/TableControls.js +0 -56
- package/backlog/v1/components/Table/TableFooter.js +0 -63
- package/backlog/v1/components/Table/TableHeading.js +0 -126
- package/backlog/v1/components/Table/TableHeadingPropTypes.js +0 -35
- package/backlog/v1/components/Table/TableSortSelector.js +0 -125
- package/backlog/v1/components/Table/TableSortType.js +0 -11
- package/backlog/v1/components/Table/index.js +0 -47
- package/backlog/v1/components/TextButton/TextButton.js +0 -74
- package/backlog/v1/components/index.js +0 -75
- package/backlog/v1/utils/deprecate.js +0 -61
- package/styles/Alert/_Alert.scss +0 -51
- package/styles/AutoSuggestInput/_AutoSuggestInput.scss +0 -116
- package/styles/Badge/_Badge.scss +0 -33
- package/styles/Chart/_Chart.scss +0 -105
- package/styles/Chart/_chartist-settings.scss +0 -131
- package/styles/Chart/_chartist.scss +0 -295
- package/styles/Checkbox/_Checkbox.scss +0 -173
- package/styles/DateTime/_DatePicker.scss +0 -61
- package/styles/DateTime/_DatePickerCalendar.scss +0 -159
- package/styles/DateTime/_DateTime.scss +0 -4
- package/styles/DateTime/_DateTimePicker.scss +0 -46
- package/styles/DateTime/_TimePicker.scss +0 -30
- package/styles/ErrorBoundary/_ErrorBoundary.scss +0 -18
- package/styles/Flyout/_Flyout.scss +0 -73
- package/styles/Form/_Form.scss +0 -53
- package/styles/GooglePlacesSearchInput/_GooglePlacesSearchInput.scss +0 -3
- package/styles/GooglePlacesSearchInput/_PoweredByGoogle.scss +0 -21
- package/styles/HorizontalRule/_HorizontalRule.scss +0 -48
- package/styles/Label/_Label.scss +0 -6
- package/styles/Notification/_Notification.scss +0 -113
- package/styles/PasswordControl/_PasswordControl.scss +0 -86
- package/styles/PulseLoader/_PulseLoader.scss +0 -60
- package/styles/Radio/_Radio.scss +0 -93
- package/styles/Select/_Select.scss +0 -94
- package/styles/Tabs/_Tabs.scss +0 -57
- package/styles/TextArea/_TextArea.scss +0 -26
- package/styles/TextInput/_TextInput.scss +0 -43
- package/styles/Tooltip/_Tooltip.scss +0 -108
- package/styles/_index.scss +0 -34
- package/styles/common/sass/_control-sizing.scss +0 -5
- package/styles/common/sass/_disable-scrolling.scss +0 -7
- package/styles/common/sass/_forms.scss +0 -72
- package/styles/index.js +0 -50
- package/styles/v1/components/Button/Button.jsx +0 -48
- package/styles/v1/components/Button/Button.spec.js +0 -76
- package/styles/v1/components/Button/_Button.scss +0 -178
- package/styles/v1/components/Button/button-props.js +0 -30
- package/styles/v1/components/Button/stories/button.js +0 -20
- package/styles/v1/components/Button/stories/index.stories.js +0 -92
- package/styles/v1/components/Button/stories/overview.js +0 -87
- package/styles/v1/components/Button/stories/types.js +0 -31
- package/styles/v1/components/Image/Image.jsx +0 -175
- package/styles/v1/components/Image/Image.spec.js +0 -113
- package/styles/v1/components/Image/_Image.scss +0 -24
- package/styles/v1/components/Image/stories/Cloudinary.stories.js +0 -39
- package/styles/v1/components/Image/stories/Display.stories.js +0 -92
- package/styles/v1/components/Loader/Loader.jsx +0 -54
- package/styles/v1/components/Loader/Loader.spec.js +0 -67
- package/styles/v1/components/Loader/_Loader.scss +0 -18
- package/styles/v1/components/Loader/stories/Display.stories.js +0 -55
- package/styles/v1/components/Modal/Modal.jsx +0 -315
- package/styles/v1/components/Modal/Modal.spec.js +0 -293
- package/styles/v1/components/Modal/ModalContent.jsx +0 -126
- package/styles/v1/components/Modal/ModalFooter.jsx +0 -53
- package/styles/v1/components/Modal/_Modal.scss +0 -262
- package/styles/v1/components/Modal/index.js +0 -3
- package/styles/v1/components/Modal/stories/Content.stories.js +0 -314
- package/styles/v1/components/Modal/stories/Display.stories.js +0 -208
- package/styles/v1/components/Modal/stories/Methods.stories.js +0 -44
- package/styles/v1/components/Modal/stories/Width.stories.js +0 -82
- package/styles/v1/components/Modal/stories/helpers/ReduxConsumer.jsx +0 -21
- package/styles/v1/components/Panel/Panel.jsx +0 -202
- package/styles/v1/components/Panel/Panel.spec.js +0 -196
- package/styles/v1/components/Panel/_Panel.scss +0 -55
- package/styles/v1/components/Panel/stories/Display.stories.js +0 -82
- package/styles/v1/components/Panel/stories/Methods.stories.js +0 -76
- package/styles/v1/components/Table/Table.jsx +0 -367
- package/styles/v1/components/Table/Table.spec.js +0 -526
- package/styles/v1/components/Table/TableCell.jsx +0 -17
- package/styles/v1/components/Table/TableCellPropTypes.js +0 -10
- package/styles/v1/components/Table/TableControls.jsx +0 -61
- package/styles/v1/components/Table/TableFooter.jsx +0 -72
- package/styles/v1/components/Table/TableHeading.jsx +0 -58
- package/styles/v1/components/Table/TableHeadingPropTypes.js +0 -20
- package/styles/v1/components/Table/TableSortSelector.jsx +0 -63
- package/styles/v1/components/Table/TableSortType.js +0 -4
- package/styles/v1/components/Table/_Table.scss +0 -263
- package/styles/v1/components/Table/index.js +0 -5
- package/styles/v1/components/Table/stories/Display.stories.js +0 -194
- package/styles/v1/components/Table/stories/Methods.stories.js +0 -141
- package/styles/v1/components/Table/stories/helpers/TableCellEmail.jsx +0 -25
- package/styles/v1/components/Table/stories/helpers/TableCustomRow.jsx +0 -35
- package/styles/v1/components/Table/stories/helpers/TableHeadingEmail.jsx +0 -20
- package/styles/v1/components/Table/stories/helpers/table-data.js +0 -26
- package/styles/v1/components/Table/stories/helpers/table-headers.js +0 -14
- package/styles/v1/components/TextButton/TextButton.jsx +0 -78
- package/styles/v1/components/TextButton/TextButton.spec.js +0 -95
- package/styles/v1/components/TextButton/_TextButton.scss +0 -114
- package/styles/v1/components/TextButton/stories/Display.stories.js +0 -46
- package/styles/v1/components/index.js +0 -7
- package/styles/v1/utils/deprecate.js +0 -45
- package/styles/v2/components/index.js +0 -70
- package/styles/v2/components/styles.js +0 -21
- package/styles/v2/theme/global.js +0 -118
- package/styles/v2/theme/index.js +0 -27
- package/styles/v2/utils/Spaces.js +0 -16
- package/v1/assets-manifest.json +0 -5
- package/v1/index.html +0 -1
- package/v1/index.js +0 -3
- package/v1/index.js.LICENSE.txt +0 -23
- package/v1/index.js.map +0 -1
- /package/styles/{v2/components → components}/Accordion/Accordion.jsx +0 -0
- /package/styles/{v2/components → components}/Accordion/index.js +0 -0
- /package/styles/{v2/components → components}/Accordion/styles/container.js +0 -0
- /package/styles/{v2/components → components}/Accordion/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Accordion/styles/panel.js +0 -0
- /package/styles/{v2/components → components}/Alert/Alert.stories.js +0 -0
- /package/styles/{v2/components → components}/Alert/index.js +0 -0
- /package/styles/{v2/components → components}/Alert/styles/index.js +0 -0
- /package/styles/{v2/components → components}/AutoSuggestSelect/index.js +0 -0
- /package/styles/{v2/components → components}/Badge/Badge.jsx +0 -0
- /package/styles/{v2/components → components}/Badge/Badge.stories.js +0 -0
- /package/styles/{v2/components → components}/Badge/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Button/Button.jsx +0 -0
- /package/styles/{v2/components → components}/Button/Button.spec.js +0 -0
- /package/styles/{v2/components → components}/Button/Button.styles.js +0 -0
- /package/styles/{v2/components → components}/Button/button-props.js +0 -0
- /package/styles/{v2/components → components}/Button/index.js +0 -0
- /package/styles/{v2/components → components}/Button/stories/index.stories.js +0 -0
- /package/styles/{v2/components → components}/Card/Card.jsx +0 -0
- /package/styles/{v2/components → components}/Card/Card.stories.js +0 -0
- /package/styles/{v2/components → components}/Checkbox/Checkbox.jsx +0 -0
- /package/styles/{v2/components → components}/Checkbox/Checkbox.stories.js +0 -0
- /package/styles/{v2/components → components}/Checkbox/index.js +0 -0
- /package/styles/{v2/components → components}/Checkbox/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Container/Container.jsx +0 -0
- /package/styles/{v2/components → components}/Container/Container.stories.js +0 -0
- /package/styles/{v2/components → components}/Container/Container.styles.js +0 -0
- /package/styles/{v2/components → components}/Divider/Divider.jsx +0 -0
- /package/styles/{v2/components → components}/Divider/Divider.stories.js +0 -0
- /package/styles/{v2/components → components}/Divider/Divider.styles.js +0 -0
- /package/styles/{v2/components → components}/Grid/Grid.jsx +0 -0
- /package/styles/{v2/components → components}/Grid/Grid.styles.js +0 -0
- /package/styles/{v2/components → components}/Grid/GridItem.jsx +0 -0
- /package/styles/{v2/components → components}/Grid/GridItem.styles.js +0 -0
- /package/styles/{v2/components → components}/Grid/index.js +0 -0
- /package/styles/{v2/components → components}/Heading/Heading.jsx +0 -0
- /package/styles/{v2/components → components}/Heading/Heading.stories.js +0 -0
- /package/styles/{v2/components → components}/Icon/Icon.jsx +0 -0
- /package/styles/{v2/components → components}/Icon/Icon.stories.js +0 -0
- /package/styles/{v2/components → components}/Image/Image.spec.js +0 -0
- /package/styles/{v2/components → components}/Image/Image.stories.js +0 -0
- /package/styles/{v2/components → components}/Input/Input.jsx +0 -0
- /package/styles/{v2/components → components}/Input/Input.stories.js +0 -0
- /package/styles/{v2/components → components}/Input/index.js +0 -0
- /package/styles/{v2/components → components}/Input/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Link/Link.jsx +0 -0
- /package/styles/{v2/components → components}/Link/Link.styles.js +0 -0
- /package/styles/{v2/components → components}/List/List.jsx +0 -0
- /package/styles/{v2/components → components}/List/index.js +0 -0
- /package/styles/{v2/components → components}/List/styles/index.js +0 -0
- /package/styles/{v2/components → components}/List/styles/item.styles.js +0 -0
- /package/styles/{v2/components → components}/Loader/Loader.jsx +0 -0
- /package/styles/{v2/components → components}/Loader/Loader.stories.js +0 -0
- /package/styles/{v2/components → components}/Modal/index.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/body.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/closeButton.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/dialog.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/dialogContainer.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/footer.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/header.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Modal/styles/overlay.js +0 -0
- /package/styles/{v2/components → components}/Popover/Popover.jsx +0 -0
- /package/styles/{v2/components → components}/Popover/PopoverArrow.jsx +0 -0
- /package/styles/{v2/components → components}/Popover/PopoverCloseButton.jsx +0 -0
- /package/styles/{v2/components → components}/Popover/PopoverContent.jsx +0 -0
- /package/styles/{v2/components → components}/Popover/index.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/popover-arrow.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/popover-body.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/popover-close-button.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/popover-content.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/popover-header.js +0 -0
- /package/styles/{v2/components → components}/Popover/styles/popper.js +0 -0
- /package/styles/{v2/components → components}/Radio/Radio.jsx +0 -0
- /package/styles/{v2/components → components}/Radio/Radio.stories.js +0 -0
- /package/styles/{v2/components → components}/Radio/RadioGroup.jsx +0 -0
- /package/styles/{v2/components → components}/Radio/index.js +0 -0
- /package/styles/{v2/components → components}/Radio/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Select/Select.jsx +0 -0
- /package/styles/{v2/components → components}/Select/Select.stories.js +0 -0
- /package/styles/{v2/components → components}/Select/index.js +0 -0
- /package/styles/{v2/components → components}/Select/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Skeleton/Skeleton.stories.jsx +0 -0
- /package/styles/{v2/components → components}/Skeleton/Skeleton.styles.js +0 -0
- /package/styles/{v2/components → components}/Spinner/Spinner.jsx +0 -0
- /package/styles/{v2/components → components}/Spinner/Spinner.styles.js +0 -0
- /package/styles/{v2/components → components}/Switch/Switch.jsx +0 -0
- /package/styles/{v2/components → components}/Switch/Switch.stories.js +0 -0
- /package/styles/{v2/components → components}/Switch/index.js +0 -0
- /package/styles/{v2/components → components}/Switch/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Table/Table.jsx +0 -0
- /package/styles/{v2/components → components}/Table/Table.stories.js +0 -0
- /package/styles/{v2/components → components}/Table/index.js +0 -0
- /package/styles/{v2/components → components}/Tabs/Tabs.stories.js +0 -0
- /package/styles/{v2/components → components}/Tabs/index.js +0 -0
- /package/styles/{v2/components → components}/Tabs/styles/index.js +0 -0
- /package/styles/{v2/components → components}/Text/Text.jsx +0 -0
- /package/styles/{v2/components → components}/Text/Text.stories.js +0 -0
- /package/styles/{v2/components → components}/Text/options.js +0 -0
- /package/styles/{v2/theme → theme}/base/breakpoints.js +0 -0
- /package/styles/{v2/theme → theme}/base/colors.js +0 -0
- /package/styles/{v2/theme → theme}/base/index.js +0 -0
- /package/styles/{v2/theme → theme}/base/sizes.js +0 -0
- /package/styles/{v2/theme → theme}/base/typography.js +0 -0
- /package/styles/{v2/theme → theme}/base/zindices.js +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _react = _interopRequireDefault(require("react"));
|
|
15
|
-
|
|
16
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
|
-
|
|
18
|
-
var _deprecate = _interopRequireDefault(require("../../utils/deprecate"));
|
|
19
|
-
|
|
20
|
-
var _excluded = ["className", "size", "borderWidth", "additionalMarkup"];
|
|
21
|
-
(0, _deprecate.default)({
|
|
22
|
-
name: 'Loader',
|
|
23
|
-
newName: 'Loader',
|
|
24
|
-
changes: ['---- Changes in v2 component ----', '`borderWidth` is now `thickness`', '`additionalMarkup` is no longer supported within this component', '`className` is no longer explicitly supported, but a custom class could still be passed in if needed, but with the move to ChakraUI custom classes are generally not needed', '---- Additional Information ----', 'new props are documented at: https://chakra-ui.com/docs/feedback/circular-progress']
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var Loader = function Loader(_ref) {
|
|
28
|
-
var className = _ref.className,
|
|
29
|
-
size = _ref.size,
|
|
30
|
-
borderWidth = _ref.borderWidth,
|
|
31
|
-
additionalMarkup = _ref.additionalMarkup,
|
|
32
|
-
attrs = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
33
|
-
var classes = (0, _classnames.default)('Loader', className);
|
|
34
|
-
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({
|
|
35
|
-
className: classes
|
|
36
|
-
}, attrs), /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className: "Loader-spinner",
|
|
38
|
-
style: {
|
|
39
|
-
width: size,
|
|
40
|
-
height: size,
|
|
41
|
-
borderWidth: borderWidth
|
|
42
|
-
}
|
|
43
|
-
}), additionalMarkup);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
Loader.defaultProps = {
|
|
47
|
-
size: 80,
|
|
48
|
-
borderWidth: 4
|
|
49
|
-
};
|
|
50
|
-
var _default = Loader;
|
|
51
|
-
exports.default = _default;
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
6
|
-
|
|
7
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
8
|
-
|
|
9
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
10
|
-
|
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(exports, "__esModule", {
|
|
14
|
-
value: true
|
|
15
|
-
});
|
|
16
|
-
exports.default = void 0;
|
|
17
|
-
|
|
18
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
19
|
-
|
|
20
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
21
|
-
|
|
22
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
23
|
-
|
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
25
|
-
|
|
26
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
27
|
-
|
|
28
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
29
|
-
|
|
30
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
31
|
-
|
|
32
|
-
var _isNumber = _interopRequireDefault(require("lodash/isNumber"));
|
|
33
|
-
|
|
34
|
-
var _isString = _interopRequireDefault(require("lodash/isString"));
|
|
35
|
-
|
|
36
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
37
|
-
|
|
38
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
39
|
-
|
|
40
|
-
var _chevronLeft = _interopRequireDefault(require("@spothero/icons/chevron-left"));
|
|
41
|
-
|
|
42
|
-
var _times = _interopRequireDefault(require("@spothero/icons/times"));
|
|
43
|
-
|
|
44
|
-
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
45
|
-
|
|
46
|
-
var _Button = _interopRequireDefault(require("../Button/Button"));
|
|
47
|
-
|
|
48
|
-
var _Portal = _interopRequireDefault(require("../../../Portal/Portal"));
|
|
49
|
-
|
|
50
|
-
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); }
|
|
51
|
-
|
|
52
|
-
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; }
|
|
53
|
-
|
|
54
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
55
|
-
|
|
56
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
57
|
-
|
|
58
|
-
var Modal = /*#__PURE__*/function (_PureComponent) {
|
|
59
|
-
(0, _inherits2.default)(Modal, _PureComponent);
|
|
60
|
-
|
|
61
|
-
var _super = _createSuper(Modal);
|
|
62
|
-
|
|
63
|
-
function Modal(props) {
|
|
64
|
-
var _this;
|
|
65
|
-
|
|
66
|
-
(0, _classCallCheck2.default)(this, Modal);
|
|
67
|
-
_this = _super.call(this, props);
|
|
68
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onCloseClick", function (evt) {
|
|
69
|
-
if (_this._isAnimating) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
var onCloseClick = _this.props.onCloseClick;
|
|
74
|
-
|
|
75
|
-
_this.hide();
|
|
76
|
-
|
|
77
|
-
if (onCloseClick) {
|
|
78
|
-
onCloseClick();
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onShimClick", function (evt) {
|
|
82
|
-
var _this$props = _this.props,
|
|
83
|
-
useShim = _this$props.useShim,
|
|
84
|
-
closeOnShimClick = _this$props.closeOnShimClick;
|
|
85
|
-
|
|
86
|
-
if (useShim && closeOnShimClick && _dom.default.hasClass(evt.target, 'Modal-wrapper')) {
|
|
87
|
-
_this._onCloseClick();
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onBackClick", function (evt) {
|
|
91
|
-
_this.props.onRemoveIndex();
|
|
92
|
-
});
|
|
93
|
-
var _this$props2 = _this.props,
|
|
94
|
-
width = _this$props2.width,
|
|
95
|
-
title = _this$props2.title,
|
|
96
|
-
onBeforeFirstRender = _this$props2.onBeforeFirstRender;
|
|
97
|
-
_this._isDynamicWidth = (0, _isNumber.default)(width) || width.indexOf('%') > 0;
|
|
98
|
-
_this._isAnimating = false;
|
|
99
|
-
_this._isTitleString = title ? (0, _isString.default)(title) : false;
|
|
100
|
-
_this._childHistory = [];
|
|
101
|
-
|
|
102
|
-
if (onBeforeFirstRender) {
|
|
103
|
-
onBeforeFirstRender();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
return _this;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
(0, _createClass2.default)(Modal, [{
|
|
110
|
-
key: "componentDidMount",
|
|
111
|
-
value: function componentDidMount() {
|
|
112
|
-
var _this2 = this;
|
|
113
|
-
|
|
114
|
-
var width = this.props.width;
|
|
115
|
-
setTimeout(function () {
|
|
116
|
-
// if ModalContent throws an error then the container will not be defined
|
|
117
|
-
if (!_this2._container) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
if (_this2._isDynamicWidth) {
|
|
122
|
-
var newWidth = (0, _isNumber.default)(width) ? "".concat(width, "px") // numerical width, set accordingly
|
|
123
|
-
: width; // percentage width, retain and set
|
|
124
|
-
|
|
125
|
-
_dom.default.addClass(_this2._container, 'Modal-container-custom');
|
|
126
|
-
|
|
127
|
-
_this2._container.style.width = newWidth;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
_this2._show();
|
|
131
|
-
}, 0);
|
|
132
|
-
}
|
|
133
|
-
}, {
|
|
134
|
-
key: "componentWillUnmount",
|
|
135
|
-
value: function componentWillUnmount() {
|
|
136
|
-
_dom.default.removeClass('html', 'Modal-open');
|
|
137
|
-
}
|
|
138
|
-
}, {
|
|
139
|
-
key: "_show",
|
|
140
|
-
value: function _show() {
|
|
141
|
-
var _this3 = this;
|
|
142
|
-
|
|
143
|
-
var _this$props3 = this.props,
|
|
144
|
-
useShim = _this$props3.useShim,
|
|
145
|
-
renderInBody = _this$props3.renderInBody,
|
|
146
|
-
onShown = _this$props3.onShown,
|
|
147
|
-
animateOnShow = _this$props3.animateOnShow;
|
|
148
|
-
var node = useShim ? this._modal : this._container;
|
|
149
|
-
var showClass = useShim ? 'Modal-showing' : 'Modal-container-showing';
|
|
150
|
-
|
|
151
|
-
_dom.default.addClass(node, showClass);
|
|
152
|
-
|
|
153
|
-
if (renderInBody) {
|
|
154
|
-
_dom.default.addClass('html', 'Modal-open');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
if (!useShim) {
|
|
158
|
-
_dom.default.addClass(this._modal, 'Modal-no-shim');
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
if (animateOnShow) {
|
|
162
|
-
var _window$transitionEnd, _window;
|
|
163
|
-
|
|
164
|
-
this._isAnimating = true;
|
|
165
|
-
(_window$transitionEnd = (_window = window).transitionEnd) === null || _window$transitionEnd === void 0 ? void 0 : _window$transitionEnd.call(_window, node).bind(function () {
|
|
166
|
-
window.transitionEnd(node).unbind();
|
|
167
|
-
|
|
168
|
-
if (onShown) {
|
|
169
|
-
onShown();
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
_this3._isAnimating = false;
|
|
173
|
-
});
|
|
174
|
-
} else {
|
|
175
|
-
if (onShown) {
|
|
176
|
-
onShown();
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}, {
|
|
181
|
-
key: "_renderModal",
|
|
182
|
-
value: function _renderModal() {
|
|
183
|
-
var _this4 = this;
|
|
184
|
-
|
|
185
|
-
var _this$props4 = this.props,
|
|
186
|
-
className = _this$props4.className,
|
|
187
|
-
renderInBody = _this$props4.renderInBody,
|
|
188
|
-
useShim = _this$props4.useShim,
|
|
189
|
-
title = _this$props4.title,
|
|
190
|
-
showClose = _this$props4.showClose,
|
|
191
|
-
children = _this$props4.children,
|
|
192
|
-
width = _this$props4.width,
|
|
193
|
-
animateOnShow = _this$props4.animateOnShow,
|
|
194
|
-
activeContentIndex = _this$props4.activeContentIndex,
|
|
195
|
-
fullScreenOnMobile = _this$props4.fullScreenOnMobile,
|
|
196
|
-
dataTestId = _this$props4['data-testid'];
|
|
197
|
-
var classes = (0, _classnames.default)('Modal', {
|
|
198
|
-
'Modal-inline': !renderInBody
|
|
199
|
-
}, {
|
|
200
|
-
'Modal-animated': animateOnShow
|
|
201
|
-
}, {
|
|
202
|
-
'Modal-showing': useShim && !animateOnShow
|
|
203
|
-
}, className);
|
|
204
|
-
var containerClasses = (0, _classnames.default)('Modal-container', (0, _defineProperty2.default)({}, "Modal-container-".concat(width), !this._isDynamicWidth), {
|
|
205
|
-
'Modal-container-animated': animateOnShow
|
|
206
|
-
}, {
|
|
207
|
-
'Modal-container-showing': !useShim && !animateOnShow
|
|
208
|
-
});
|
|
209
|
-
var wrapperClasses = (0, _classnames.default)('Modal-wrapper', {
|
|
210
|
-
'Modal-wrapper-full': fullScreenOnMobile
|
|
211
|
-
});
|
|
212
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
213
|
-
ref: function ref(node) {
|
|
214
|
-
_this4._modal = node;
|
|
215
|
-
},
|
|
216
|
-
className: classes,
|
|
217
|
-
"data-testid": dataTestId
|
|
218
|
-
}, useShim && /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
-
className: "Modal-shim"
|
|
220
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
-
className: wrapperClasses,
|
|
222
|
-
onClick: this._onShimClick
|
|
223
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
224
|
-
ref: function ref(node) {
|
|
225
|
-
_this4._container = node;
|
|
226
|
-
},
|
|
227
|
-
className: containerClasses
|
|
228
|
-
}, title && /*#__PURE__*/_react.default.createElement("div", {
|
|
229
|
-
className: "Modal-title"
|
|
230
|
-
}, this._isTitleString ? /*#__PURE__*/_react.default.createElement("h1", null, title) : title), /*#__PURE__*/_react.default.createElement("div", {
|
|
231
|
-
className: "Modal-ctas"
|
|
232
|
-
}, showClose && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
233
|
-
className: "Modal-close",
|
|
234
|
-
"aria-label": "Close Modal",
|
|
235
|
-
onClick: this._onCloseClick
|
|
236
|
-
}, /*#__PURE__*/_react.default.createElement(_times.default, null)), activeContentIndex > 0 && /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
237
|
-
className: "Modal-back",
|
|
238
|
-
"aria-label": "Go Back",
|
|
239
|
-
onClick: this._onBackClick
|
|
240
|
-
}, /*#__PURE__*/_react.default.createElement(_chevronLeft.default, null))), children)));
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Hides the Modal programmatically.
|
|
244
|
-
*
|
|
245
|
-
* @public
|
|
246
|
-
* @param {*} args - The arguments to pass to the onHidden callback in cases where you may need access to something not available in Modal itself.
|
|
247
|
-
* @returns {void}
|
|
248
|
-
*/
|
|
249
|
-
|
|
250
|
-
}, {
|
|
251
|
-
key: "hide",
|
|
252
|
-
value: function hide() {
|
|
253
|
-
var _window$transitionEnd2,
|
|
254
|
-
_window2,
|
|
255
|
-
_this5 = this;
|
|
256
|
-
|
|
257
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
258
|
-
args[_key] = arguments[_key];
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
this._isAnimating = true;
|
|
262
|
-
var _this$props5 = this.props,
|
|
263
|
-
useShim = _this$props5.useShim,
|
|
264
|
-
renderInBody = _this$props5.renderInBody,
|
|
265
|
-
onHidden = _this$props5.onHidden,
|
|
266
|
-
animateOnShow = _this$props5.animateOnShow;
|
|
267
|
-
var node = useShim ? this._modal : this._container;
|
|
268
|
-
var showClass = useShim ? 'Modal-showing' : 'Modal-container-showing';
|
|
269
|
-
|
|
270
|
-
if (!animateOnShow) {
|
|
271
|
-
_dom.default.addClass(node, showClass.replace('showing', 'animated'));
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (!useShim) {
|
|
275
|
-
_dom.default.removeClass(this._modal, 'Modal-no-shim');
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
_dom.default.removeClass(node, showClass);
|
|
279
|
-
|
|
280
|
-
if (renderInBody) {
|
|
281
|
-
_dom.default.removeClass('html', 'Modal-open');
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
(_window$transitionEnd2 = (_window2 = window).transitionEnd) === null || _window$transitionEnd2 === void 0 ? void 0 : _window$transitionEnd2.call(_window2, node).bind(function () {
|
|
285
|
-
window.transitionEnd(node).unbind();
|
|
286
|
-
_this5._isAnimating = false;
|
|
287
|
-
|
|
288
|
-
if (!animateOnShow) {
|
|
289
|
-
_dom.default.removeClass(node, "".concat(showClass, "-animated"));
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
if (onHidden) {
|
|
293
|
-
onHidden.apply(void 0, args);
|
|
294
|
-
}
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
}, {
|
|
298
|
-
key: "render",
|
|
299
|
-
value: function render() {
|
|
300
|
-
var _this$props6 = this.props,
|
|
301
|
-
renderInBody = _this$props6.renderInBody,
|
|
302
|
-
store = _this$props6.store;
|
|
303
|
-
|
|
304
|
-
if (renderInBody) {
|
|
305
|
-
return /*#__PURE__*/_react.default.createElement(_Portal.default, {
|
|
306
|
-
store: store
|
|
307
|
-
}, this._renderModal());
|
|
308
|
-
} else {
|
|
309
|
-
return this._renderModal();
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}]);
|
|
313
|
-
return Modal;
|
|
314
|
-
}(_react.PureComponent);
|
|
315
|
-
|
|
316
|
-
exports.default = Modal;
|
|
317
|
-
(0, _defineProperty2.default)(Modal, "defaultProps", {
|
|
318
|
-
renderInBody: true,
|
|
319
|
-
useShim: true,
|
|
320
|
-
showClose: true,
|
|
321
|
-
width: 'normal',
|
|
322
|
-
activeContentIndex: 0,
|
|
323
|
-
closeOnShimClick: true,
|
|
324
|
-
animateOnShow: true
|
|
325
|
-
});
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
6
|
-
|
|
7
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
8
|
-
|
|
9
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
10
|
-
|
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(exports, "__esModule", {
|
|
14
|
-
value: true
|
|
15
|
-
});
|
|
16
|
-
exports.default = void 0;
|
|
17
|
-
|
|
18
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
19
|
-
|
|
20
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
21
|
-
|
|
22
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
23
|
-
|
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
25
|
-
|
|
26
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
27
|
-
|
|
28
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
29
|
-
|
|
30
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
31
|
-
|
|
32
|
-
var _isFunction = _interopRequireDefault(require("lodash/isFunction"));
|
|
33
|
-
|
|
34
|
-
var _isString = _interopRequireDefault(require("lodash/isString"));
|
|
35
|
-
|
|
36
|
-
var _isUndefined = _interopRequireDefault(require("lodash/isUndefined"));
|
|
37
|
-
|
|
38
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
39
|
-
|
|
40
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
41
|
-
|
|
42
|
-
var _ssrWindow = require("ssr-window");
|
|
43
|
-
|
|
44
|
-
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
45
|
-
|
|
46
|
-
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); }
|
|
47
|
-
|
|
48
|
-
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; }
|
|
49
|
-
|
|
50
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
51
|
-
|
|
52
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
53
|
-
|
|
54
|
-
var ModalContent = /*#__PURE__*/function (_Component) {
|
|
55
|
-
(0, _inherits2.default)(ModalContent, _Component);
|
|
56
|
-
|
|
57
|
-
var _super = _createSuper(ModalContent);
|
|
58
|
-
|
|
59
|
-
function ModalContent(props) {
|
|
60
|
-
var _this;
|
|
61
|
-
|
|
62
|
-
(0, _classCallCheck2.default)(this, ModalContent);
|
|
63
|
-
_this = _super.call(this, props);
|
|
64
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onWindowResize", function (evt) {
|
|
65
|
-
var _this$props = _this.props,
|
|
66
|
-
maxHeight = _this$props.maxHeight,
|
|
67
|
-
contentAreaHeight = _this$props.contentAreaHeight,
|
|
68
|
-
verticalModalPadding = _this$props.verticalModalPadding;
|
|
69
|
-
var windowWidth = _ssrWindow.window.innerWidth || _ssrWindow.document.body.clientWidth;
|
|
70
|
-
var calculatedMax = maxHeight;
|
|
71
|
-
|
|
72
|
-
if ((0, _isString.default)(calculatedMax) && calculatedMax === 'auto') {
|
|
73
|
-
var modalWrapperEl = _dom.default.parent(_this._container, '.Modal-wrapper');
|
|
74
|
-
|
|
75
|
-
var titleEl = modalWrapperEl.querySelector('.Modal-title');
|
|
76
|
-
var finalContentAreaHeight = (0, _isUndefined.default)(contentAreaHeight) ? _dom.default.height(modalWrapperEl, true, false) - _dom.default.height(titleEl) : (0, _isFunction.default)(contentAreaHeight) ? contentAreaHeight() : contentAreaHeight;
|
|
77
|
-
calculatedMax = windowWidth < 768 ? finalContentAreaHeight : finalContentAreaHeight - verticalModalPadding - 24; // 24 is margin-bottom
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
_this._container.style.maxHeight = "".concat(calculatedMax, "px");
|
|
81
|
-
});
|
|
82
|
-
var children = props.children,
|
|
83
|
-
html = props.html;
|
|
84
|
-
|
|
85
|
-
if (children && html) {
|
|
86
|
-
// eslint-disable-next-line no-console
|
|
87
|
-
console.error('Passing children or html props is exclusive. You may only use one at a time.');
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
return _this;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
(0, _createClass2.default)(ModalContent, [{
|
|
94
|
-
key: "componentDidMount",
|
|
95
|
-
value: function componentDidMount() {
|
|
96
|
-
var _this2 = this;
|
|
97
|
-
|
|
98
|
-
_ssrWindow.window.addEventListener('resize', this._onWindowResize);
|
|
99
|
-
|
|
100
|
-
this._resizeTimeout = _ssrWindow.window.setTimeout(function () {
|
|
101
|
-
_this2._onWindowResize();
|
|
102
|
-
}, 0);
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
key: "componentWillUnmount",
|
|
106
|
-
value: function componentWillUnmount() {
|
|
107
|
-
_ssrWindow.window.clearTimeout(this._resizeTimeout);
|
|
108
|
-
|
|
109
|
-
_ssrWindow.window.removeEventListener('resize', this._onWindowResize);
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "render",
|
|
113
|
-
value: function render() {
|
|
114
|
-
var _this3 = this;
|
|
115
|
-
|
|
116
|
-
var _this$props2 = this.props,
|
|
117
|
-
className = _this$props2.className,
|
|
118
|
-
noPadding = _this$props2.noPadding,
|
|
119
|
-
contentAreaHeight = _this$props2.contentAreaHeight,
|
|
120
|
-
children = _this$props2.children,
|
|
121
|
-
html = _this$props2.html;
|
|
122
|
-
var content = html ? /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
-
dangerouslySetInnerHTML: {
|
|
124
|
-
__html: html
|
|
125
|
-
}
|
|
126
|
-
}) : children;
|
|
127
|
-
var classes = (0, _classnames.default)('Modal-content', {
|
|
128
|
-
'Modal-content-flush': noPadding
|
|
129
|
-
}, {
|
|
130
|
-
'Modal-content-with-height': !(0, _isUndefined.default)(contentAreaHeight)
|
|
131
|
-
}, className);
|
|
132
|
-
|
|
133
|
-
if (html && children) {
|
|
134
|
-
return null;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
ref: function ref(node) {
|
|
139
|
-
_this3._container = node;
|
|
140
|
-
},
|
|
141
|
-
className: classes
|
|
142
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className: "Modal-content-wrapper"
|
|
144
|
-
}, content));
|
|
145
|
-
}
|
|
146
|
-
}]);
|
|
147
|
-
return ModalContent;
|
|
148
|
-
}(_react.Component);
|
|
149
|
-
|
|
150
|
-
exports.default = ModalContent;
|
|
151
|
-
(0, _defineProperty2.default)(ModalContent, "defaultProps", {
|
|
152
|
-
maxHeight: 'auto',
|
|
153
|
-
verticalModalPadding: 32
|
|
154
|
-
});
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
|
4
|
-
|
|
5
|
-
var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
|
|
6
|
-
|
|
7
|
-
var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
|
|
8
|
-
|
|
9
|
-
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
|
10
|
-
|
|
11
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(exports, "__esModule", {
|
|
14
|
-
value: true
|
|
15
|
-
});
|
|
16
|
-
exports.default = void 0;
|
|
17
|
-
|
|
18
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
19
|
-
|
|
20
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
21
|
-
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
23
|
-
|
|
24
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
25
|
-
|
|
26
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
27
|
-
|
|
28
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
29
|
-
|
|
30
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
-
|
|
32
|
-
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); }
|
|
33
|
-
|
|
34
|
-
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; }
|
|
35
|
-
|
|
36
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
37
|
-
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
|
-
var ModalFooter = /*#__PURE__*/function (_Component) {
|
|
41
|
-
(0, _inherits2.default)(ModalFooter, _Component);
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(ModalFooter);
|
|
44
|
-
|
|
45
|
-
function ModalFooter(props) {
|
|
46
|
-
var _this;
|
|
47
|
-
|
|
48
|
-
(0, _classCallCheck2.default)(this, ModalFooter);
|
|
49
|
-
_this = _super.call(this, props);
|
|
50
|
-
var children = props.children,
|
|
51
|
-
html = props.html;
|
|
52
|
-
|
|
53
|
-
if (children && html) {
|
|
54
|
-
throw new Error('Passing children or html props is exclusive. You may only use one at a time.');
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return _this;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
(0, _createClass2.default)(ModalFooter, [{
|
|
61
|
-
key: "render",
|
|
62
|
-
value: function render() {
|
|
63
|
-
var _this2 = this;
|
|
64
|
-
|
|
65
|
-
var _this$props = this.props,
|
|
66
|
-
className = _this$props.className,
|
|
67
|
-
noPadding = _this$props.noPadding,
|
|
68
|
-
children = _this$props.children,
|
|
69
|
-
html = _this$props.html;
|
|
70
|
-
var content = html ? /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
-
dangerouslySetInnerHTML: {
|
|
72
|
-
__html: html
|
|
73
|
-
}
|
|
74
|
-
}) : children;
|
|
75
|
-
var classes = (0, _classnames.default)('Modal-footer', {
|
|
76
|
-
'Modal-footer-flush': noPadding
|
|
77
|
-
}, className);
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
79
|
-
ref: function ref(node) {
|
|
80
|
-
_this2._container = node;
|
|
81
|
-
},
|
|
82
|
-
className: classes
|
|
83
|
-
}, content);
|
|
84
|
-
}
|
|
85
|
-
}]);
|
|
86
|
-
return ModalFooter;
|
|
87
|
-
}(_react.Component);
|
|
88
|
-
|
|
89
|
-
exports.default = ModalFooter;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "Modal", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _Modal2.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "ModalContent", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _ModalContent2.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "ModalFooter", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _ModalFooter2.default;
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
var _Modal2 = _interopRequireDefault(require("./Modal"));
|
|
28
|
-
|
|
29
|
-
var _ModalContent2 = _interopRequireDefault(require("./ModalContent"));
|
|
30
|
-
|
|
31
|
-
var _ModalFooter2 = _interopRequireDefault(require("./ModalFooter"));
|