@carbon/ibm-products 2.10.2 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -0
- package/css/index-full-carbon.css +67 -26
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +3 -3
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +67 -26
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +3 -3
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +64 -25
- package/css/index.css.map +1 -1
- package/css/index.min.css +2 -2
- package/css/index.min.css.map +1 -1
- package/es/components/APIKeyModal/APIKeyModal.js +10 -3
- package/es/components/AboutModal/AboutModal.js +10 -3
- package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +17 -5
- package/es/components/CreateModal/CreateModal.js +10 -3
- package/es/components/Datagrid/Datagrid/DatagridContent.js +9 -7
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +3 -2
- package/es/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -13
- package/es/components/Datagrid/Datagrid/DatagridRow.js +47 -40
- package/es/components/Datagrid/Datagrid/DraggableElement.js +36 -132
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +17 -49
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +125 -40
- package/es/components/Datagrid/useExpandedRow.js +1 -1
- package/es/components/Datagrid/utils/DatagridPagination.js +1 -1
- package/es/components/EmptyStates/EmptyState.js +1 -1
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -11
- package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -11
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
- package/es/components/ExportModal/ExportModal.js +10 -3
- package/es/components/ImportModal/ImportModal.js +10 -3
- package/es/components/RemoveModal/RemoveModal.js +10 -3
- package/es/components/TagSet/TagSet.js +5 -21
- package/es/components/TagSet/TagSetModal.js +7 -3
- package/es/components/Tearsheet/TearsheetShell.js +12 -26
- package/es/global/decorators/sidePanelDecorator.js +7 -0
- package/es/global/js/hooks/usePortalTarget.js +30 -0
- package/es/global/js/hooks/useWindowScroll.js +5 -0
- package/es/global/js/package-settings.js +0 -1
- package/es/global/js/utils/getNodeTextContent.js +47 -0
- package/flags.js +6 -0
- package/lib/components/APIKeyModal/APIKeyModal.js +10 -3
- package/lib/components/AboutModal/AboutModal.js +10 -3
- package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +17 -5
- package/lib/components/CreateModal/CreateModal.js +10 -3
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +9 -7
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridExpandedRow.js +26 -13
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +46 -41
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +37 -137
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +20 -49
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +130 -47
- package/lib/components/Datagrid/useExpandedRow.js +1 -1
- package/lib/components/Datagrid/utils/DatagridPagination.js +1 -1
- package/lib/components/EmptyStates/EmptyState.js +1 -1
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -11
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -11
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
- package/lib/components/ExportModal/ExportModal.js +10 -3
- package/lib/components/ImportModal/ImportModal.js +10 -3
- package/lib/components/RemoveModal/RemoveModal.js +10 -3
- package/lib/components/TagSet/TagSet.js +5 -21
- package/lib/components/TagSet/TagSetModal.js +7 -3
- package/lib/components/Tearsheet/TearsheetShell.js +12 -26
- package/lib/global/decorators/sidePanelDecorator.js +7 -0
- package/lib/global/js/hooks/usePortalTarget.js +38 -0
- package/lib/global/js/hooks/useWindowScroll.js +6 -0
- package/lib/global/js/package-settings.js +0 -1
- package/lib/global/js/utils/getNodeTextContent.js +55 -0
- package/package.json +7 -3
- package/scss/components/ActionSet/_action-set.scss +2 -1
- package/scss/components/Datagrid/styles/_datagrid.scss +6 -6
- package/scss/components/Datagrid/styles/_draggableElement.scss +34 -16
- package/scss/components/Datagrid/styles/_useExpandedRow.scss +13 -0
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +1 -1
- package/scss/components/Datagrid/styles/addons/_FilterFlyout.scss +22 -11
- package/scss/components/Datagrid/styles/addons/_FilterPanel.scss +6 -3
- package/scss/components/FilterSummary/_filter-summary.scss +2 -1
- package/scss/global/decorators/_side-panel-decorator.scss +7 -0
- package/scss/global/js/utils/_story-as-full-page.scss +0 -6
@@ -1,3 +1,6 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
1
4
|
/**
|
2
5
|
* Copyright IBM Corp. 2023, 2023
|
3
6
|
*
|
@@ -12,17 +15,21 @@ import { isColumnVisible } from './common';
|
|
12
15
|
import DraggableElement from '../../DraggableElement';
|
13
16
|
import { pkg } from '../../../../../settings';
|
14
17
|
import getColTitle from '../../../utils/getColTitle';
|
18
|
+
import { DndContext, KeyboardSensor, PointerSensor, closestCenter, useSensor, useSensors } from '@dnd-kit/core';
|
19
|
+
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
15
20
|
var blockClass = "".concat(pkg.prefix, "--datagrid");
|
21
|
+
var matchedColsById = function matchedColsById(col1, col2) {
|
22
|
+
return col1 && col2 && col1.id === col2.id;
|
23
|
+
};
|
16
24
|
export var DraggableItemsList = function DraggableItemsList(_ref) {
|
17
25
|
var columns = _ref.columns,
|
18
26
|
filterString = _ref.filterString,
|
19
|
-
|
20
|
-
|
27
|
+
id = _ref.id,
|
28
|
+
moveElement = _ref.moveElement,
|
21
29
|
onSelectColumn = _ref.onSelectColumn,
|
22
|
-
setAriaRegionText = _ref.setAriaRegionText
|
23
|
-
|
24
|
-
|
25
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, columns
|
30
|
+
setAriaRegionText = _ref.setAriaRegionText;
|
31
|
+
var draggableClass = "".concat(blockClass, "__draggable-item");
|
32
|
+
var visibleCols = columns
|
26
33
|
// hide the columns without Header, e.g the sticky actions, spacer
|
27
34
|
.filter(function (colDef) {
|
28
35
|
return !!getColTitle(colDef);
|
@@ -31,7 +38,108 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
31
38
|
}).filter(function (colDef) {
|
32
39
|
var _getColTitle;
|
33
40
|
return filterString.length === 0 || ((_getColTitle = getColTitle(colDef)) === null || _getColTitle === void 0 ? void 0 : _getColTitle.toLowerCase().includes(filterString)) && colDef.id !== 'spacer';
|
34
|
-
})
|
41
|
+
});
|
42
|
+
|
43
|
+
// let localRefCopy;
|
44
|
+
var handleDragEnd = function handleDragEnd(event) {
|
45
|
+
var active = event.active,
|
46
|
+
over = event.over;
|
47
|
+
var fromVisibleIndex = columns.findIndex(function (col) {
|
48
|
+
return matchedColsById(col, active);
|
49
|
+
});
|
50
|
+
var toVisibleIndex = columns.findIndex(function (col) {
|
51
|
+
return matchedColsById(col, over);
|
52
|
+
});
|
53
|
+
var colTitle = getColTitle(visibleCols[fromVisibleIndex]);
|
54
|
+
setAriaRegionText("".concat(colTitle, " dropped. New position ").concat(toVisibleIndex + 1, " of ").concat(visibleCols.length, "."));
|
55
|
+
var fromIndex = columns.findIndex(function (col) {
|
56
|
+
return matchedColsById(col, active);
|
57
|
+
});
|
58
|
+
var toIndex = columns.findIndex(function (col) {
|
59
|
+
return matchedColsById(col, over);
|
60
|
+
});
|
61
|
+
moveElement(fromIndex, toIndex);
|
62
|
+
};
|
63
|
+
var handleDragStart = function handleDragStart(event) {
|
64
|
+
var active = event.active;
|
65
|
+
var fromIndex = visibleCols.findIndex(function (col) {
|
66
|
+
return matchedColsById(col, active);
|
67
|
+
});
|
68
|
+
var colTitle = getColTitle(visibleCols[fromIndex]);
|
69
|
+
setAriaRegionText("".concat(colTitle, " grabbed. Current position ").concat(fromIndex + 1, " of ").concat(visibleCols.length, "."));
|
70
|
+
};
|
71
|
+
var handleDragUpdate = function handleDragUpdate(event) {
|
72
|
+
var active = event.active,
|
73
|
+
over = event.over;
|
74
|
+
var fromIndex = visibleCols.findIndex(function (col) {
|
75
|
+
return matchedColsById(col, active);
|
76
|
+
});
|
77
|
+
var toIndex = visibleCols.findIndex(function (col) {
|
78
|
+
return matchedColsById(col, over);
|
79
|
+
});
|
80
|
+
var colTitle = getColTitle(visibleCols[fromIndex]);
|
81
|
+
setAriaRegionText("".concat(colTitle, " grabbed. Original position ").concat(fromIndex + 1, ", new position ").concat(toIndex + 1, " of ").concat(visibleCols.length, "."));
|
82
|
+
};
|
83
|
+
var pointerSensor = useSensor(PointerSensor, {
|
84
|
+
// Require the mouse to move by 10 pixels before activating
|
85
|
+
activationConstraint: {
|
86
|
+
distance: 4
|
87
|
+
}
|
88
|
+
});
|
89
|
+
var keyboardSensor = useSensor(KeyboardSensor, {
|
90
|
+
coordinateGetter: function coordinateGetter(event, args) {
|
91
|
+
var currentCoordinates = args.currentCoordinates;
|
92
|
+
var target = event.target;
|
93
|
+
while (target && !target.classList.contains(draggableClass)) {
|
94
|
+
target = target.parentNode;
|
95
|
+
}
|
96
|
+
var delta = target.offsetHeight;
|
97
|
+
switch (event.code) {
|
98
|
+
case 'ArrowRight':
|
99
|
+
case 'ArrowLeft':
|
100
|
+
// ignore right and left
|
101
|
+
return currentCoordinates;
|
102
|
+
case 'ArrowUp':
|
103
|
+
return _objectSpread(_objectSpread({}, currentCoordinates), {}, {
|
104
|
+
y: currentCoordinates.y - delta
|
105
|
+
});
|
106
|
+
case 'ArrowDown':
|
107
|
+
return _objectSpread(_objectSpread({}, currentCoordinates), {}, {
|
108
|
+
y: currentCoordinates.y + delta
|
109
|
+
});
|
110
|
+
case 'Space':
|
111
|
+
break;
|
112
|
+
}
|
113
|
+
}
|
114
|
+
});
|
115
|
+
var sensors = useSensors(pointerSensor, keyboardSensor);
|
116
|
+
var handleCheckboxKeydown = function handleCheckboxKeydown(event, colDef) {
|
117
|
+
if (event.code === 'Space') {
|
118
|
+
onSelectColumn(colDef, !isColumnVisible(colDef));
|
119
|
+
event.preventDefault();
|
120
|
+
event.stopPropagation();
|
121
|
+
return false;
|
122
|
+
}
|
123
|
+
};
|
124
|
+
return /*#__PURE__*/React.createElement(DndContext, {
|
125
|
+
collisionDetection: closestCenter,
|
126
|
+
onDragEnd: handleDragEnd,
|
127
|
+
onDragStart: handleDragStart,
|
128
|
+
onDragMove: handleDragUpdate,
|
129
|
+
sensors: sensors
|
130
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
131
|
+
className: "".concat(blockClass, "__draggable-underlay"),
|
132
|
+
"aria-hidden": "true",
|
133
|
+
key: "draggable-underlay-".concat(id)
|
134
|
+
}, visibleCols.map(function (colDef) {
|
135
|
+
return /*#__PURE__*/React.createElement("div", {
|
136
|
+
className: "".concat(blockClass, "__draggable-underlay-item"),
|
137
|
+
key: colDef.id
|
138
|
+
});
|
139
|
+
})), /*#__PURE__*/React.createElement(SortableContext, {
|
140
|
+
items: visibleCols,
|
141
|
+
strategy: verticalListSortingStrategy
|
142
|
+
}, visibleCols.map(function (colDef) {
|
35
143
|
var colHeaderTitle = getColTitle(colDef);
|
36
144
|
var searchString = new RegExp('(' + filterString + ')');
|
37
145
|
var res = filterString.length ? colHeaderTitle.toLowerCase().split(searchString) : null;
|
@@ -39,7 +147,6 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
39
147
|
var highlightedText = res !== null ? res[0] === '' ? "<strong>".concat(firstWord, "</strong>") + res[2] : firstWord + "<strong>".concat(res[1], "</strong>") + res[2] : colHeaderTitle;
|
40
148
|
var isFrozenColumn = !!colDef.sticky;
|
41
149
|
var listContents = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Checkbox, {
|
42
|
-
wrapperClassName: "".concat(blockClass, "__customize-columns-checkbox-wrapper"),
|
43
150
|
checked: isColumnVisible(colDef),
|
44
151
|
disabled: isFrozenColumn,
|
45
152
|
onChange: function onChange(_, _ref2) {
|
@@ -50,7 +157,10 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
50
157
|
labelText: colHeaderTitle,
|
51
158
|
title: colHeaderTitle,
|
52
159
|
className: "".concat(blockClass, "__customize-columns-checkbox"),
|
53
|
-
hideLabel: true
|
160
|
+
hideLabel: true,
|
161
|
+
onKeyDown: function onKeyDown(event) {
|
162
|
+
return handleCheckboxKeydown(event, colDef);
|
163
|
+
}
|
54
164
|
}), /*#__PURE__*/React.createElement("div", {
|
55
165
|
dangerouslySetInnerHTML: {
|
56
166
|
__html: highlightedText
|
@@ -58,46 +168,21 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
58
168
|
className: "".concat(blockClass, "__customize-columns-checkbox-visible-label")
|
59
169
|
}));
|
60
170
|
return /*#__PURE__*/React.createElement(DraggableElement, {
|
171
|
+
classList: draggableClass,
|
61
172
|
key: colDef.id,
|
62
|
-
|
63
|
-
listData: columns,
|
64
|
-
setListData: setColumnsObject,
|
65
|
-
id: "dnd-datagrid-columns-".concat(colDef.id),
|
66
|
-
type: "column-customization",
|
173
|
+
id: colDef.id,
|
67
174
|
disabled: filterString.length > 0 || isFrozenColumn,
|
68
175
|
ariaLabel: colHeaderTitle,
|
69
|
-
onGrab: setAriaRegionText,
|
70
|
-
isFocused: focusIndex === i
|
71
|
-
// moveElement={moveElement}
|
72
|
-
,
|
73
|
-
onArrowKeyDown: function onArrowKeyDown(e, isGrabbed, currentIndex) {
|
74
|
-
if (isGrabbed) {
|
75
|
-
var _columns$nextIndex;
|
76
|
-
var nextIndex = getNextIndex(columns, currentIndex, e.key);
|
77
|
-
e.preventDefault();
|
78
|
-
e.stopPropagation();
|
79
|
-
if (nextIndex >= 0 && !((_columns$nextIndex = columns[nextIndex]) !== null && _columns$nextIndex !== void 0 && _columns$nextIndex.sticky)) {
|
80
|
-
setFocusIndex(nextIndex);
|
81
|
-
// moveElement(currentIndex, nextIndex);
|
82
|
-
e.target.scrollIntoView({
|
83
|
-
block: 'center'
|
84
|
-
});
|
85
|
-
}
|
86
|
-
}
|
87
|
-
},
|
88
176
|
isSticky: isFrozenColumn,
|
89
177
|
selected: isColumnVisible(colDef)
|
90
178
|
}, listContents);
|
91
|
-
}));
|
179
|
+
}))));
|
92
180
|
};
|
93
181
|
DraggableItemsList.propTypes = {
|
94
182
|
columns: PropTypes.array.isRequired,
|
95
183
|
filterString: PropTypes.string.isRequired,
|
96
|
-
|
97
|
-
|
98
|
-
// moveElement: PropTypes.func.isRequired,
|
184
|
+
id: PropTypes.string.isRequired,
|
185
|
+
moveElement: PropTypes.func.isRequired,
|
99
186
|
onSelectColumn: PropTypes.func.isRequired,
|
100
|
-
setAriaRegionText: PropTypes.func.isRequired
|
101
|
-
setColumnsObject: PropTypes.func.isRequired,
|
102
|
-
setFocusIndex: PropTypes.func.isRequired
|
187
|
+
setAriaRegionText: PropTypes.func.isRequired
|
103
188
|
};
|
@@ -33,7 +33,7 @@ var useExpandedRow = function useExpandedRow(hooks) {
|
|
33
33
|
return _objectSpread(_objectSpread({}, row), {}, {
|
34
34
|
canExpand: row.original && !row.original.notExpandable,
|
35
35
|
expandedContentHeight: expandedRowsHeight[row.index] || expandedContentHeight,
|
36
|
-
|
36
|
+
RowExpansionRenderer: DatagridExpandedRow(ExpandedRowContentComponent)
|
37
37
|
});
|
38
38
|
});
|
39
39
|
Object.assign(instance, {
|
@@ -50,7 +50,7 @@ export var EmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
50
50
|
title = _ref.title,
|
51
51
|
rest = _objectWithoutProperties(_ref, _excluded);
|
52
52
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
53
|
-
className: cx(blockClass, className, _defineProperty({}, "".concat(blockClass, "-position--").concat(illustrationPosition), !!illustration)),
|
53
|
+
className: cx(blockClass, "".concat(blockClass, "-type--default"), className, _defineProperty({}, "".concat(blockClass, "-position--").concat(illustrationPosition), !!illustration)),
|
54
54
|
ref: ref
|
55
55
|
}, getDevtoolsProps(componentName)), illustration && /*#__PURE__*/React.createElement("img", {
|
56
56
|
src: illustration,
|
@@ -44,7 +44,7 @@ export var ErrorEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
44
44
|
title = _ref.title,
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
47
|
-
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition)),
|
47
|
+
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--error")),
|
48
48
|
ref: ref
|
49
49
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(ErrorIllustration, {
|
50
50
|
theme: illustrationTheme,
|
@@ -44,7 +44,7 @@ export var NoDataEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
44
44
|
title = _ref.title,
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
47
|
-
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition)),
|
47
|
+
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--noData")),
|
48
48
|
ref: ref
|
49
49
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NoDataIllustration, {
|
50
50
|
theme: illustrationTheme,
|
@@ -44,7 +44,7 @@ export var NoTagsEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, ref)
|
|
44
44
|
title = _ref.title,
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
47
|
-
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition)),
|
47
|
+
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--noTags")),
|
48
48
|
ref: ref
|
49
49
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NoTagsIllustration, {
|
50
50
|
theme: illustrationTheme,
|
@@ -44,7 +44,7 @@ export var NotFoundEmptyState = /*#__PURE__*/React.forwardRef(function (_ref, re
|
|
44
44
|
title = _ref.title,
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
47
|
-
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition)),
|
47
|
+
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--notFound")),
|
48
48
|
ref: ref
|
49
49
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NotFoundIllustration, {
|
50
50
|
theme: illustrationTheme,
|
@@ -44,7 +44,7 @@ export var NotificationsEmptyState = /*#__PURE__*/React.forwardRef(function (_re
|
|
44
44
|
title = _ref.title,
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
47
|
-
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition)),
|
47
|
+
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--notifications")),
|
48
48
|
ref: ref
|
49
49
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(NotificationsIllustration, {
|
50
50
|
size: size,
|
@@ -44,7 +44,7 @@ export var UnauthorizedEmptyState = /*#__PURE__*/React.forwardRef(function (_ref
|
|
44
44
|
title = _ref.title,
|
45
45
|
rest = _objectWithoutProperties(_ref, _excluded);
|
46
46
|
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
47
|
-
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition)),
|
47
|
+
className: cx(blockClass, className, "".concat(blockClass, "-position--").concat(illustrationPosition), "".concat(blockClass, "-type--unauthorized")),
|
48
48
|
ref: ref
|
49
49
|
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement(UnauthorizedIllustration, {
|
50
50
|
size: size,
|
@@ -24,13 +24,14 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
24
24
|
size = _ref.size,
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
26
|
var svgId = uuidv4();
|
27
|
-
return
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
29
29
|
width: 80,
|
30
30
|
height: 80,
|
31
31
|
viewBox: "0 0 80 80",
|
32
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
33
|
-
|
32
|
+
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-error"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
|
+
role: "img"
|
34
|
+
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
34
35
|
id: "prefix__a_dark_".concat(svgId),
|
35
36
|
x1: 38.9,
|
36
37
|
y1: 77.08,
|
@@ -94,13 +95,7 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
94
95
|
}), /*#__PURE__*/React.createElement("path", {
|
95
96
|
d: "M38.93 49.79a6.9 6.9 0 01-2.66-2.51 6.11 6.11 0 01-.81-3v-1a2.26 2.26 0 01.81-2c.54-.35 1.43-.17 2.66.54a6.71 6.71 0 012.61 2.5 6.06 6.06 0 01.81 3v1a2.24 2.24 0 01-.81 2.05c-.54.29-1.41.12-2.61-.58zm-1.16-11.63L36 22.77V13l5.81 3.36v9.73l-1.64 13.46z",
|
96
97
|
fill: "#525252"
|
97
|
-
})) : /*#__PURE__*/React.createElement("
|
98
|
-
xmlns: "http://www.w3.org/2000/svg",
|
99
|
-
width: 80,
|
100
|
-
height: 80,
|
101
|
-
viewBox: "0 0 80 80",
|
102
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
103
|
-
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
98
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
104
99
|
id: "prefix__a_".concat(svgId),
|
105
100
|
x1: 29.96,
|
106
101
|
y1: 45.68,
|
@@ -210,7 +205,7 @@ export var ErrorIllustration = function ErrorIllustration(_ref) {
|
|
210
205
|
}), /*#__PURE__*/React.createElement("path", {
|
211
206
|
d: "M38.93 49.79a6.9 6.9 0 01-2.66-2.51 6.11 6.11 0 01-.81-3v-1a2.26 2.26 0 01.81-2c.54-.35 1.43-.17 2.66.54a6.71 6.71 0 012.61 2.5 6.06 6.06 0 01.81 3v1a2.24 2.24 0 01-.81 2.05c-.54.29-1.41.12-2.61-.58zm-1.16-11.63L36 22.77V13l5.81 3.36v9.73l-1.64 13.46z",
|
212
207
|
fill: "url(#prefix__e_".concat(svgId, ")")
|
213
|
-
}));
|
208
|
+
})));
|
214
209
|
};
|
215
210
|
ErrorIllustration.propTypes = {
|
216
211
|
size: PropTypes.oneOf(['lg', 'sm']),
|
@@ -24,13 +24,14 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
24
24
|
size = _ref.size,
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
26
|
var svgId = uuidv4();
|
27
|
-
return
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
29
29
|
width: 80,
|
30
30
|
height: 80,
|
31
31
|
viewBox: "0 0 80 80",
|
32
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
33
|
-
|
32
|
+
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noData"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
|
+
role: "img"
|
34
|
+
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
34
35
|
id: "prefix__a_dark_".concat(svgId),
|
35
36
|
x1: 11.12,
|
36
37
|
y1: 43.34,
|
@@ -93,13 +94,7 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
93
94
|
}), /*#__PURE__*/React.createElement("path", {
|
94
95
|
fill: "#525252",
|
95
96
|
d: "M21.49 33.33l-8.2-4.73.01-5.69 8.19 4.74v5.68z"
|
96
|
-
})) : /*#__PURE__*/React.createElement("
|
97
|
-
xmlns: "http://www.w3.org/2000/svg",
|
98
|
-
width: 80,
|
99
|
-
height: 80,
|
100
|
-
viewBox: "0 0 80 80",
|
101
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
102
|
-
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
97
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
103
98
|
id: "prefix__a_".concat(svgId),
|
104
99
|
x1: 18.35,
|
105
100
|
y1: 74.17,
|
@@ -173,7 +168,7 @@ export var NoDataIllustration = function NoDataIllustration(_ref) {
|
|
173
168
|
}), /*#__PURE__*/React.createElement("path", {
|
174
169
|
className: "prefix__g_".concat(svgId),
|
175
170
|
d: "M40 35.24L11.13 18.57v-.24l.21-.12 28.87 16.67-.21.11v.25zM21.49 33.33l-8.2-4.73.01-5.69 8.19 4.74v5.68z"
|
176
|
-
}));
|
171
|
+
})));
|
177
172
|
};
|
178
173
|
NoDataIllustration.propTypes = {
|
179
174
|
size: PropTypes.oneOf(['lg', 'sm']),
|
@@ -24,14 +24,15 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
24
24
|
size = _ref.size,
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
26
|
var svgId = uuidv4();
|
27
|
-
return
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
29
29
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
30
30
|
width: 80,
|
31
31
|
height: 80,
|
32
32
|
viewBox: "0 0 80 80",
|
33
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
34
|
-
|
33
|
+
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-noTags"), "".concat(blockClass, "__illustration--").concat(size)]),
|
34
|
+
role: "img"
|
35
|
+
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
36
|
id: "prefix__c_dark_".concat(svgId),
|
36
37
|
x1: 34.96,
|
37
38
|
y1: 5.37,
|
@@ -231,14 +232,7 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
231
232
|
}), /*#__PURE__*/React.createElement("path", {
|
232
233
|
d: "M35.67 16.33a2.88 2.88 0 011.41.43 7 7 0 013.13 5.44c0 1.42-.7 2.24-1.73 2.24a2.82 2.82 0 01-1.4-.43 6.93 6.93 0 01-3.14-5.44c0-1.42.7-2.24 1.73-2.24m0-.41c-1.3 0-2.15 1-2.15 2.65a7.3 7.3 0 003.35 5.8 3.23 3.23 0 001.61.48c1.3 0 2.15-1 2.15-2.65a7.29 7.29 0 00-3.35-5.8 3.2 3.2 0 00-1.61-.48z",
|
233
234
|
fill: "url(#prefix__i_dark_".concat(svgId, ")")
|
234
|
-
})) : /*#__PURE__*/React.createElement("
|
235
|
-
xmlns: "http://www.w3.org/2000/svg",
|
236
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
237
|
-
width: 80,
|
238
|
-
height: 80,
|
239
|
-
viewBox: "0 0 80 80",
|
240
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
241
|
-
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
235
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
242
236
|
id: "prefix__b_".concat(svgId),
|
243
237
|
x1: 634.81,
|
244
238
|
y1: 667.18,
|
@@ -481,7 +475,7 @@ export var NoTagsIllustration = function NoTagsIllustration(_ref) {
|
|
481
475
|
}), /*#__PURE__*/React.createElement("path", {
|
482
476
|
d: "M35.67 16.33a2.88 2.88 0 011.41.43 7 7 0 013.13 5.44c0 1.42-.7 2.24-1.73 2.24a2.82 2.82 0 01-1.4-.43 6.93 6.93 0 01-3.14-5.44c0-1.42.7-2.24 1.73-2.24m0-.41c-1.3 0-2.15 1-2.15 2.65a7.3 7.3 0 003.35 5.8 3.23 3.23 0 001.61.48c1.3 0 2.15-1 2.15-2.65a7.29 7.29 0 00-3.35-5.8 3.2 3.2 0 00-1.61-.48z",
|
483
477
|
fill: "url(#prefix__j_".concat(svgId, ")")
|
484
|
-
}));
|
478
|
+
})));
|
485
479
|
};
|
486
480
|
NoTagsIllustration.propTypes = {
|
487
481
|
size: PropTypes.oneOf(['lg', 'sm']),
|
@@ -24,13 +24,14 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
24
24
|
size = _ref.size,
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
26
|
var svgId = uuidv4();
|
27
|
-
return
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
29
29
|
width: 80,
|
30
30
|
height: 80,
|
31
31
|
viewBox: "0 0 80 80",
|
32
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
33
|
-
|
32
|
+
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notFound"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
|
+
role: "img"
|
34
|
+
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
34
35
|
id: "prefix__a_dark_".concat(svgId),
|
35
36
|
x1: 2.6,
|
36
37
|
y1: -12.81,
|
@@ -181,14 +182,7 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
181
182
|
}), /*#__PURE__*/React.createElement("path", {
|
182
183
|
d: "M57 37.5c0-12-8.75-26.85-19.56-33.08C31.82 1.16 26.73.89 23.16 3.09l-4.83 2.78 1.19 1.94c3.25-1.74 7.72-1.38 12.67 1.47C42.09 15 50.11 28.57 50.11 39.6c0 4.86-1.55 8.4-4.11 10.4-.12.1-1.17.73-1.31.82l2.12 1.42 4.83-2.79C55 47.44 57 43.34 57 37.5",
|
183
184
|
fill: "url(#prefix__f_dark_".concat(svgId, ")")
|
184
|
-
})) : /*#__PURE__*/React.createElement("
|
185
|
-
xmlns: "http://www.w3.org/2000/svg",
|
186
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
187
|
-
width: 80,
|
188
|
-
height: 80,
|
189
|
-
viewBox: "0 0 80 80",
|
190
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
191
|
-
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
185
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
192
186
|
id: "prefix__a_".concat(svgId),
|
193
187
|
x1: 2.6,
|
194
188
|
y1: -12.81,
|
@@ -358,7 +352,7 @@ export var NotFoundIllustration = function NotFoundIllustration(_ref) {
|
|
358
352
|
}), /*#__PURE__*/React.createElement("path", {
|
359
353
|
d: "M57 37.5c0-12-8.75-26.85-19.56-33.08C31.82 1.16 26.73.89 23.16 3.09l-4.83 2.78 1.19 1.94c3.25-1.74 7.72-1.38 12.67 1.47C42.09 15 50.11 28.57 50.11 39.6c0 4.86-1.55 8.4-4.11 10.4-.12.1-1.17.73-1.31.82l2.12 1.42 4.83-2.79C55 47.44 57 43.34 57 37.5",
|
360
354
|
fill: "url(#prefix__g_".concat(svgId, ")")
|
361
|
-
}));
|
355
|
+
})));
|
362
356
|
};
|
363
357
|
NotFoundIllustration.propTypes = {
|
364
358
|
size: PropTypes.oneOf(['lg', 'sm']),
|
@@ -24,13 +24,14 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
|
|
24
24
|
size = _ref.size,
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
26
|
var svgId = uuidv4();
|
27
|
-
return
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
29
29
|
width: 80,
|
30
30
|
height: 80,
|
31
31
|
viewBox: "0 0 80 80",
|
32
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
33
|
-
|
32
|
+
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-notification"), "".concat(blockClass, "__illustration--").concat(size)]),
|
33
|
+
role: "img"
|
34
|
+
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
34
35
|
id: "prefix__a_dark_".concat(svgId),
|
35
36
|
x1: 30.05,
|
36
37
|
y1: 54.31,
|
@@ -126,14 +127,7 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
|
|
126
127
|
}), /*#__PURE__*/React.createElement("path", {
|
127
128
|
d: "M60.76 30.55a2.54 2.54 0 01.14.8v3.95l.41-.13v-3.82a3.54 3.54 0 00-1.63-2.82L16.86 3.8a2.09 2.09 0 00-.44-.19l-.78.45a1 1 0 01.21-.06h.48l.27.12 21.47 12.4 21.41 12.36a3.19 3.19 0 011.28 1.67z",
|
128
129
|
fill: "url(#prefix__d_dark_".concat(svgId, ")")
|
129
|
-
})) : /*#__PURE__*/React.createElement("
|
130
|
-
xmlns: "http://www.w3.org/2000/svg",
|
131
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
132
|
-
width: 80,
|
133
|
-
height: 80,
|
134
|
-
viewBox: "0 0 80 80",
|
135
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
136
|
-
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
130
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
137
131
|
id: "prefix__a_".concat(svgId),
|
138
132
|
x1: 61.44,
|
139
133
|
y1: 66.99,
|
@@ -329,7 +323,7 @@ export var NotificationsIllustration = function NotificationsIllustration(_ref)
|
|
329
323
|
}), /*#__PURE__*/React.createElement("path", {
|
330
324
|
d: "M60.76 30.55a2.54 2.54 0 01.14.8v3.95l.41-.13v-3.82a3.54 3.54 0 00-1.63-2.82L16.86 3.8a2.09 2.09 0 00-.44-.19l-.78.45a1 1 0 01.21-.06h.48l.27.12 21.47 12.4 21.41 12.36a3.19 3.19 0 011.28 1.67z",
|
331
325
|
fill: "url(#prefix__k_".concat(svgId, ")")
|
332
|
-
}));
|
326
|
+
})));
|
333
327
|
};
|
334
328
|
NotificationsIllustration.propTypes = {
|
335
329
|
size: PropTypes.oneOf(['lg', 'sm']),
|
@@ -24,14 +24,15 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
24
24
|
size = _ref.size,
|
25
25
|
rest = _objectWithoutProperties(_ref, _excluded);
|
26
26
|
var svgId = uuidv4();
|
27
|
-
return
|
27
|
+
return /*#__PURE__*/React.createElement("svg", _extends({}, rest, {
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
29
29
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
30
30
|
width: 80,
|
31
31
|
height: 80,
|
32
32
|
viewBox: "0 0 80 80",
|
33
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
34
|
-
|
33
|
+
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration-unauthorized"), "".concat(blockClass, "__illustration--").concat(size)]),
|
34
|
+
role: "img"
|
35
|
+
}), theme === 'dark' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
35
36
|
id: "prefix__b_dark_".concat(svgId),
|
36
37
|
x1: 17.33,
|
37
38
|
y1: 40.68,
|
@@ -114,14 +115,7 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
114
115
|
}), /*#__PURE__*/React.createElement("path", {
|
115
116
|
d: "M51.41 38.51a1.9 1.9 0 00-.64-.65l-1.1-.63-28.49-16.45-.1-.05-.61.35a.33.33 0 01.17 0 .6.6 0 01.32.1l28.5 16.41 1.1.63a1.5 1.5 0 01.49.51s.05.09.08.14l.36-.21z",
|
116
117
|
fill: "#6f6f6f"
|
117
|
-
})) : /*#__PURE__*/React.createElement("
|
118
|
-
xmlns: "http://www.w3.org/2000/svg",
|
119
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
120
|
-
width: 80,
|
121
|
-
height: 80,
|
122
|
-
viewBox: "0 0 80 80",
|
123
|
-
className: cx(["".concat(blockClass, "__illustration"), "".concat(blockClass, "__illustration--").concat(size)])
|
124
|
-
}), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
118
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
125
119
|
id: "prefix__b",
|
126
120
|
x1: 27.98,
|
127
121
|
y1: 73.72,
|
@@ -302,7 +296,7 @@ export var UnauthorizedIllustration = function UnauthorizedIllustration(_ref) {
|
|
302
296
|
}), /*#__PURE__*/React.createElement("path", {
|
303
297
|
d: "M51.41 38.51a1.9 1.9 0 00-.64-.65l-1.1-.63-28.49-16.45-.1-.05-.61.35a.33.33 0 01.17 0 .6.6 0 01.32.1l28.5 16.41 1.1.63a1.5 1.5 0 01.49.51s.05.09.08.14l.36-.21z",
|
304
298
|
fill: "url(#prefix__h_".concat(svgId, ")")
|
305
|
-
}));
|
299
|
+
})));
|
306
300
|
};
|
307
301
|
UnauthorizedIllustration.propTypes = {
|
308
302
|
size: PropTypes.oneOf(['lg', 'sm']),
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
|
-
var _excluded = ["body", "className", "error", "errorMessage", "filename", "hidePasswordLabel", "inputLabel", "inputType", "invalidInputText", "loading", "loadingMessage", "onClose", "onRequestSubmit", "open", "preformattedExtensions", "preformattedExtensionsLabel", "primaryButtonText", "secondaryButtonText", "showPasswordLabel", "successMessage", "successful", "title", "validExtensions"];
|
5
|
+
var _excluded = ["body", "className", "error", "errorMessage", "filename", "hidePasswordLabel", "inputLabel", "inputType", "invalidInputText", "loading", "loadingMessage", "onClose", "onRequestSubmit", "open", "portalTarget", "preformattedExtensions", "preformattedExtensionsLabel", "primaryButtonText", "secondaryButtonText", "showPasswordLabel", "successMessage", "successful", "title", "validExtensions"];
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
//
|
@@ -20,6 +20,7 @@ import PropTypes from 'prop-types';
|
|
20
20
|
import { getDevtoolsProps } from '../../global/js/utils/devtools';
|
21
21
|
import uuidv4 from '../../global/js/utils/uuidv4';
|
22
22
|
import { pkg } from '../../settings';
|
23
|
+
import { usePortalTarget } from '../../global/js/hooks/usePortalTarget';
|
23
24
|
var componentName = 'ExportModal';
|
24
25
|
|
25
26
|
// Default values for props
|
@@ -48,6 +49,7 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
48
49
|
onClose = _ref.onClose,
|
49
50
|
onRequestSubmit = _ref.onRequestSubmit,
|
50
51
|
open = _ref.open,
|
52
|
+
portalTargetIn = _ref.portalTarget,
|
51
53
|
_ref$preformattedExte = _ref.preformattedExtensions,
|
52
54
|
preformattedExtensions = _ref$preformattedExte === void 0 ? defaults.preformattedExtensions : _ref$preformattedExte,
|
53
55
|
preformattedExtensionsLabel = _ref.preformattedExtensionsLabel,
|
@@ -73,6 +75,7 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
73
75
|
_useState6 = _slicedToArray(_useState5, 2),
|
74
76
|
extension = _useState6[0],
|
75
77
|
setExtension = _useState6[1];
|
78
|
+
var renderPortalUse = usePortalTarget(portalTargetIn);
|
76
79
|
useEffect(function () {
|
77
80
|
var _preformattedExtensio;
|
78
81
|
setName(filename);
|
@@ -117,7 +120,7 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
117
120
|
invalidText: invalidInputText,
|
118
121
|
onBlur: onBlurHandler
|
119
122
|
}, 'data-modal-primary-focus', true);
|
120
|
-
return /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
|
123
|
+
return renderPortalUse( /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
|
121
124
|
className: cx(blockClass, className),
|
122
125
|
"aria-label": title,
|
123
126
|
size: "sm",
|
@@ -177,7 +180,7 @@ export var ExportModal = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
177
180
|
kind: "primary",
|
178
181
|
onClick: onSubmitHandler,
|
179
182
|
disabled: primaryButtonDisabled
|
180
|
-
}, primaryButtonText)));
|
183
|
+
}, primaryButtonText))));
|
181
184
|
});
|
182
185
|
|
183
186
|
// Return a placeholder if not released and not enabled by feature flag
|
@@ -239,6 +242,10 @@ ExportModal.propTypes = {
|
|
239
242
|
* Specify whether the Modal is currently open
|
240
243
|
*/
|
241
244
|
open: PropTypes.bool,
|
245
|
+
/**
|
246
|
+
* The DOM node the tearsheet should be rendered within. Defaults to document.body.
|
247
|
+
*/
|
248
|
+
portalTarget: PropTypes.node,
|
242
249
|
/**
|
243
250
|
* Array of extensions to display as radio buttons
|
244
251
|
*/
|