@spothero/ui 15.10.8 → 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}/Popover/styles/index.js +1 -1
- package/styles/{v2/components/Popover/styles/popper.js → components/Popover/styles/popover-content.js} +8 -5
- package/styles/components/Popover/styles/popper.js +5 -0
- 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/Popover/styles/popover-content.js +0 -8
- 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/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-header.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
package/backlog/Portal/Portal.js
DELETED
|
@@ -1,110 +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 _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
29
|
-
|
|
30
|
-
var _isArrayLikeObject = _interopRequireDefault(require("lodash/isArrayLikeObject"));
|
|
31
|
-
|
|
32
|
-
var _isString = _interopRequireDefault(require("lodash/isString"));
|
|
33
|
-
|
|
34
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
35
|
-
|
|
36
|
-
var _reactDom = require("react-dom");
|
|
37
|
-
|
|
38
|
-
var _reactRedux = require("react-redux");
|
|
39
|
-
|
|
40
|
-
var _ssrWindow = require("ssr-window");
|
|
41
|
-
|
|
42
|
-
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
43
|
-
|
|
44
|
-
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); }
|
|
45
|
-
|
|
46
|
-
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; }
|
|
47
|
-
|
|
48
|
-
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); }; }
|
|
49
|
-
|
|
50
|
-
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; } }
|
|
51
|
-
|
|
52
|
-
var Portal = /*#__PURE__*/function (_PureComponent) {
|
|
53
|
-
(0, _inherits2.default)(Portal, _PureComponent);
|
|
54
|
-
|
|
55
|
-
var _super = _createSuper(Portal);
|
|
56
|
-
|
|
57
|
-
function Portal(props) {
|
|
58
|
-
var _this;
|
|
59
|
-
|
|
60
|
-
(0, _classCallCheck2.default)(this, Portal);
|
|
61
|
-
_this = _super.call(this, props);
|
|
62
|
-
var className = props.className,
|
|
63
|
-
appendTo = props.appendTo;
|
|
64
|
-
_this._EL = _ssrWindow.document.createElement('div');
|
|
65
|
-
_this._ROOT = (0, _isString.default)(appendTo) ? _dom.default.el(appendTo) : appendTo;
|
|
66
|
-
|
|
67
|
-
if ((0, _isArrayLikeObject.default)(_this._ROOT)) {
|
|
68
|
-
_this._ROOT = _this._ROOT[0];
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (className) {
|
|
72
|
-
_dom.default.addClass(_this._EL, className);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return _this;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
(0, _createClass2.default)(Portal, [{
|
|
79
|
-
key: "componentDidMount",
|
|
80
|
-
value: function componentDidMount() {
|
|
81
|
-
this._ROOT.appendChild(this._EL);
|
|
82
|
-
}
|
|
83
|
-
}, {
|
|
84
|
-
key: "componentWillUnmount",
|
|
85
|
-
value: function componentWillUnmount() {
|
|
86
|
-
this._ROOT.removeChild(this._EL);
|
|
87
|
-
}
|
|
88
|
-
}, {
|
|
89
|
-
key: "render",
|
|
90
|
-
value: function render() {
|
|
91
|
-
var _this$props = this.props,
|
|
92
|
-
store = _this$props.store,
|
|
93
|
-
children = _this$props.children;
|
|
94
|
-
|
|
95
|
-
if (store) {
|
|
96
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)( /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
|
|
97
|
-
store: store
|
|
98
|
-
}, children), this._EL);
|
|
99
|
-
} else {
|
|
100
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(children, this._EL);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}]);
|
|
104
|
-
return Portal;
|
|
105
|
-
}(_react.PureComponent);
|
|
106
|
-
|
|
107
|
-
exports.default = Portal;
|
|
108
|
-
(0, _defineProperty2.default)(Portal, "defaultProps", {
|
|
109
|
-
appendTo: _ssrWindow.document.body
|
|
110
|
-
});
|
|
@@ -1,62 +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 _times = _interopRequireDefault(require("lodash/times"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var PulseLoader = function PulseLoader(_ref) {
|
|
17
|
-
var className = _ref.className,
|
|
18
|
-
size = _ref.size,
|
|
19
|
-
borderWidth = _ref.borderWidth,
|
|
20
|
-
additionalMarkup = _ref.additionalMarkup;
|
|
21
|
-
var classes = (0, _classnames.default)('PulseLoader', className);
|
|
22
|
-
var borderWidthx4 = borderWidth * 4;
|
|
23
|
-
var numInnerRings = size / borderWidthx4 - 1;
|
|
24
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
-
className: classes
|
|
26
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
27
|
-
className: "PulseLoader-pulse",
|
|
28
|
-
style: {
|
|
29
|
-
width: size,
|
|
30
|
-
height: size
|
|
31
|
-
}
|
|
32
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
-
className: "PulseLoader-pulse-outer"
|
|
34
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
35
|
-
className: "PulseLoader-pulse-ring",
|
|
36
|
-
style: {
|
|
37
|
-
borderWidth: borderWidth
|
|
38
|
-
}
|
|
39
|
-
})), (0, _times.default)(numInnerRings, function (i) {
|
|
40
|
-
var newSize = size - borderWidthx4 * (i + 1);
|
|
41
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
-
key: i,
|
|
43
|
-
className: "PulseLoader-pulse-inner",
|
|
44
|
-
style: {
|
|
45
|
-
width: newSize,
|
|
46
|
-
height: newSize
|
|
47
|
-
}
|
|
48
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
49
|
-
className: "PulseLoader-pulse-ring",
|
|
50
|
-
style: {
|
|
51
|
-
borderWidth: borderWidth
|
|
52
|
-
}
|
|
53
|
-
}));
|
|
54
|
-
})), additionalMarkup);
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
PulseLoader.defaultProps = {
|
|
58
|
-
size: 120,
|
|
59
|
-
borderWidth: 7
|
|
60
|
-
};
|
|
61
|
-
var _default = PulseLoader;
|
|
62
|
-
exports.default = _default;
|
package/backlog/Radio/Radio.js
DELETED
|
@@ -1,135 +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 _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
19
|
-
|
|
20
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
21
|
-
|
|
22
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
23
|
-
|
|
24
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
25
|
-
|
|
26
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
27
|
-
|
|
28
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
29
|
-
|
|
30
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
31
|
-
|
|
32
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
33
|
-
|
|
34
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
35
|
-
|
|
36
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
37
|
-
|
|
38
|
-
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); }
|
|
39
|
-
|
|
40
|
-
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; }
|
|
41
|
-
|
|
42
|
-
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); }; }
|
|
43
|
-
|
|
44
|
-
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; } }
|
|
45
|
-
|
|
46
|
-
var Radio = /*#__PURE__*/function (_Component) {
|
|
47
|
-
(0, _inherits2.default)(Radio, _Component);
|
|
48
|
-
|
|
49
|
-
var _super = _createSuper(Radio);
|
|
50
|
-
|
|
51
|
-
function Radio() {
|
|
52
|
-
var _context;
|
|
53
|
-
|
|
54
|
-
var _this;
|
|
55
|
-
|
|
56
|
-
(0, _classCallCheck2.default)(this, Radio);
|
|
57
|
-
|
|
58
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
59
|
-
args[_key] = arguments[_key];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
_this = _super.call.apply(_super, (0, _concat.default)(_context = [this]).call(_context, args));
|
|
63
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onInvalid", function (evt) {
|
|
64
|
-
evt.preventDefault();
|
|
65
|
-
var onValidationChange = _this.props.onValidationChange;
|
|
66
|
-
|
|
67
|
-
if (onValidationChange) {
|
|
68
|
-
onValidationChange(evt.currentTarget.validity);
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onChange", function (evt) {
|
|
72
|
-
var _this$props = _this.props,
|
|
73
|
-
onValidationChange = _this$props.onValidationChange,
|
|
74
|
-
onChange = _this$props.onChange;
|
|
75
|
-
|
|
76
|
-
if (onValidationChange) {
|
|
77
|
-
onValidationChange();
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (onChange) {
|
|
81
|
-
onChange(evt);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
return _this;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
(0, _createClass2.default)(Radio, [{
|
|
88
|
-
key: "componentDidMount",
|
|
89
|
-
value: function componentDidMount() {
|
|
90
|
-
this._input.addEventListener('invalid', this._onInvalid);
|
|
91
|
-
}
|
|
92
|
-
}, {
|
|
93
|
-
key: "componentWillUnmount",
|
|
94
|
-
value: function componentWillUnmount() {
|
|
95
|
-
this._input.removeEventListener('invalid', this._onInvalid);
|
|
96
|
-
}
|
|
97
|
-
}, {
|
|
98
|
-
key: "render",
|
|
99
|
-
value: function render() {
|
|
100
|
-
var _this2 = this;
|
|
101
|
-
|
|
102
|
-
var _this$props2 = this.props,
|
|
103
|
-
label = _this$props2.label,
|
|
104
|
-
className = _this$props2.className,
|
|
105
|
-
name = _this$props2.name,
|
|
106
|
-
value = _this$props2.value,
|
|
107
|
-
defaultChecked = _this$props2.defaultChecked,
|
|
108
|
-
disabled = _this$props2.disabled,
|
|
109
|
-
required = _this$props2.required,
|
|
110
|
-
id = _this$props2.id;
|
|
111
|
-
var classes = (0, _classnames.default)('Radio', 'FormElement', className);
|
|
112
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
113
|
-
className: classes
|
|
114
|
-
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
115
|
-
ref: function ref(node) {
|
|
116
|
-
_this2._input = node;
|
|
117
|
-
},
|
|
118
|
-
className: "FormElement-item",
|
|
119
|
-
id: "Radio-".concat(id),
|
|
120
|
-
type: "radio",
|
|
121
|
-
name: name,
|
|
122
|
-
value: value,
|
|
123
|
-
defaultChecked: defaultChecked,
|
|
124
|
-
onChange: this._onChange,
|
|
125
|
-
disabled: disabled,
|
|
126
|
-
required: required
|
|
127
|
-
}), /*#__PURE__*/(0, _react.cloneElement)(label, {
|
|
128
|
-
htmlFor: "Radio-".concat(id)
|
|
129
|
-
}));
|
|
130
|
-
}
|
|
131
|
-
}]);
|
|
132
|
-
return Radio;
|
|
133
|
-
}(_react.Component);
|
|
134
|
-
|
|
135
|
-
exports.default = Radio;
|
|
@@ -1,123 +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 _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
19
|
-
|
|
20
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
21
|
-
|
|
22
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
|
|
23
|
-
|
|
24
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
25
|
-
|
|
26
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/assertThisInitialized"));
|
|
27
|
-
|
|
28
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
|
|
29
|
-
|
|
30
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
|
|
31
|
-
|
|
32
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
|
|
33
|
-
|
|
34
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
35
|
-
|
|
36
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
37
|
-
|
|
38
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
39
|
-
|
|
40
|
-
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); }
|
|
41
|
-
|
|
42
|
-
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; }
|
|
43
|
-
|
|
44
|
-
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); }; }
|
|
45
|
-
|
|
46
|
-
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; } }
|
|
47
|
-
|
|
48
|
-
var RadioGroup = /*#__PURE__*/function (_Component) {
|
|
49
|
-
(0, _inherits2.default)(RadioGroup, _Component);
|
|
50
|
-
|
|
51
|
-
var _super = _createSuper(RadioGroup);
|
|
52
|
-
|
|
53
|
-
function RadioGroup(props) {
|
|
54
|
-
var _this;
|
|
55
|
-
|
|
56
|
-
(0, _classCallCheck2.default)(this, RadioGroup);
|
|
57
|
-
_this = _super.call(this, props);
|
|
58
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
59
|
-
validationState: null
|
|
60
|
-
});
|
|
61
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_onValidationChange", function (validationState) {
|
|
62
|
-
var onInvalid = _this.props.onInvalid;
|
|
63
|
-
|
|
64
|
-
_this.setState({
|
|
65
|
-
validationState: validationState
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
if (onInvalid) {
|
|
69
|
-
onInvalid(validationState);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
if (!props.id) {
|
|
74
|
-
throw new Error("The prop 'id' is required to make RadioGroup accessible for users using assistive technologies such as screen readers. Check the render method of RadioGroup.");
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
return _this;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
(0, _createClass2.default)(RadioGroup, [{
|
|
81
|
-
key: "render",
|
|
82
|
-
value: function render() {
|
|
83
|
-
var _this2 = this;
|
|
84
|
-
|
|
85
|
-
var _this$props = this.props,
|
|
86
|
-
className = _this$props.className,
|
|
87
|
-
id = _this$props.id,
|
|
88
|
-
children = _this$props.children,
|
|
89
|
-
name = _this$props.name,
|
|
90
|
-
label = _this$props.label,
|
|
91
|
-
required = _this$props.required,
|
|
92
|
-
disabled = _this$props.disabled,
|
|
93
|
-
error = _this$props.error,
|
|
94
|
-
onChange = _this$props.onChange;
|
|
95
|
-
var validationState = this.state.validationState;
|
|
96
|
-
var isValid = validationState ? validationState.valid : true;
|
|
97
|
-
var classes = (0, _classnames.default)('RadioGroup', 'FormElement', {
|
|
98
|
-
'FormElement-contains-error': !isValid
|
|
99
|
-
}, className);
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement("fieldset", {
|
|
101
|
-
className: classes,
|
|
102
|
-
id: "RadioGroup-".concat(id)
|
|
103
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
-
className: "FormElement-control-container",
|
|
105
|
-
role: "radiogroup"
|
|
106
|
-
}, label, (0, _map.default)(_react.Children).call(_react.Children, children, function (child, i) {
|
|
107
|
-
var _context;
|
|
108
|
-
|
|
109
|
-
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
110
|
-
name: name,
|
|
111
|
-
disabled: disabled,
|
|
112
|
-
required: required,
|
|
113
|
-
onChange: onChange,
|
|
114
|
-
id: (0, _concat.default)(_context = "".concat(id, "-item-")).call(_context, i),
|
|
115
|
-
onValidationChange: _this2._onValidationChange
|
|
116
|
-
});
|
|
117
|
-
})), !isValid && error);
|
|
118
|
-
}
|
|
119
|
-
}]);
|
|
120
|
-
return RadioGroup;
|
|
121
|
-
}(_react.Component);
|
|
122
|
-
|
|
123
|
-
exports.default = RadioGroup;
|
package/backlog/Radio/index.js
DELETED
|
@@ -1,23 +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, "Radio", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _Radio.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "RadioGroup", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _RadioGroup.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var _Radio = _interopRequireDefault(require("./Radio"));
|
|
22
|
-
|
|
23
|
-
var _RadioGroup = _interopRequireDefault(require("./RadioGroup"));
|
|
@@ -1,103 +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 _reactDom = require("react-dom");
|
|
31
|
-
|
|
32
|
-
var _reactRedux = require("react-redux");
|
|
33
|
-
|
|
34
|
-
var _dom = _interopRequireDefault(require("@spothero/utils/dom"));
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
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; }
|
|
39
|
-
|
|
40
|
-
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); }; }
|
|
41
|
-
|
|
42
|
-
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; } }
|
|
43
|
-
|
|
44
|
-
var RenderInBody = /*#__PURE__*/function (_Component) {
|
|
45
|
-
(0, _inherits2.default)(RenderInBody, _Component);
|
|
46
|
-
|
|
47
|
-
var _super = _createSuper(RenderInBody);
|
|
48
|
-
|
|
49
|
-
function RenderInBody() {
|
|
50
|
-
(0, _classCallCheck2.default)(this, RenderInBody);
|
|
51
|
-
return _super.apply(this, arguments);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
(0, _createClass2.default)(RenderInBody, [{
|
|
55
|
-
key: "componentDidMount",
|
|
56
|
-
value: function componentDidMount() {
|
|
57
|
-
var className = this.props.className;
|
|
58
|
-
this._container = document.createElement('div');
|
|
59
|
-
|
|
60
|
-
if (className) {
|
|
61
|
-
_dom.default.addClass(this._container, className);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
document.body.appendChild(this._container);
|
|
65
|
-
|
|
66
|
-
this._renderLayer();
|
|
67
|
-
}
|
|
68
|
-
}, {
|
|
69
|
-
key: "componentDidUpdate",
|
|
70
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
71
|
-
this._renderLayer();
|
|
72
|
-
}
|
|
73
|
-
}, {
|
|
74
|
-
key: "componentWillUnmount",
|
|
75
|
-
value: function componentWillUnmount() {
|
|
76
|
-
(0, _reactDom.unmountComponentAtNode)(this._container);
|
|
77
|
-
document.body.removeChild(this._container);
|
|
78
|
-
}
|
|
79
|
-
}, {
|
|
80
|
-
key: "_renderLayer",
|
|
81
|
-
value: function _renderLayer() {
|
|
82
|
-
var _this$props = this.props,
|
|
83
|
-
store = _this$props.store,
|
|
84
|
-
children = _this$props.children;
|
|
85
|
-
|
|
86
|
-
if (store) {
|
|
87
|
-
(0, _reactDom.render)( /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
|
|
88
|
-
store: store
|
|
89
|
-
}, children), this._container);
|
|
90
|
-
} else {
|
|
91
|
-
(0, _reactDom.render)(children, this._container);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}, {
|
|
95
|
-
key: "render",
|
|
96
|
-
value: function render() {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
}]);
|
|
100
|
-
return RenderInBody;
|
|
101
|
-
}(_react.Component);
|
|
102
|
-
|
|
103
|
-
exports.default = RenderInBody;
|