@pingux/astro 1.27.0-alpha.15 → 1.27.0-alpha.16
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/lib/cjs/components/DataTable/DataTable.js +477 -0
- package/lib/cjs/components/DataTable/DataTable.stories.js +310 -0
- package/lib/cjs/components/DataTable/DataTable.styles.js +156 -0
- package/lib/cjs/components/DataTable/DataTable.test.js +1307 -0
- package/lib/cjs/components/DataTable/DataTableChip.js +63 -0
- package/lib/cjs/components/DataTable/DataTableChip.test.js +38 -0
- package/lib/cjs/components/DataTable/DataTableMenu.js +51 -0
- package/lib/cjs/components/DataTable/DataTableMenu.test.js +20 -0
- package/lib/cjs/components/DataTable/DataTableMultiLine.js +75 -0
- package/lib/cjs/components/DataTable/DataTableMultiLine.test.js +30 -0
- package/lib/cjs/components/DataTable/DataTableVirtualizer.js +188 -0
- package/lib/cjs/components/DataTable/index.js +54 -0
- package/lib/cjs/context/DataTableContext/index.js +31 -0
- package/lib/cjs/index.js +67 -2
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
- package/lib/cjs/styles/variants/variants.js +4 -1
- package/lib/components/DataTable/DataTable.js +431 -0
- package/lib/components/DataTable/DataTable.stories.js +273 -0
- package/lib/components/DataTable/DataTable.styles.js +137 -0
- package/lib/components/DataTable/DataTable.test.js +1256 -0
- package/lib/components/DataTable/DataTableChip.js +33 -0
- package/lib/components/DataTable/DataTableChip.test.js +31 -0
- package/lib/components/DataTable/DataTableMenu.js +24 -0
- package/lib/components/DataTable/DataTableMenu.test.js +13 -0
- package/lib/components/DataTable/DataTableMultiLine.js +46 -0
- package/lib/components/DataTable/DataTableMultiLine.test.js +22 -0
- package/lib/components/DataTable/DataTableVirtualizer.js +157 -0
- package/lib/components/DataTable/index.js +5 -0
- package/lib/context/DataTableContext/index.js +5 -0
- package/lib/index.js +4 -1
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
- package/lib/styles/variants/variants.js +3 -1
- package/package.json +55 -50
@@ -0,0 +1,33 @@
|
|
1
|
+
/* eslint-disable no-nested-ternary */
|
2
|
+
import React, { forwardRef } from 'react';
|
3
|
+
import AlertIcon from 'mdi-react/AlertIcon';
|
4
|
+
import AlertCircleIcon from 'mdi-react/AlertCircleIcon';
|
5
|
+
import CheckIcon from 'mdi-react/CheckIcon';
|
6
|
+
import PropTypes from 'prop-types';
|
7
|
+
import { Chip, Icon } from '../../index';
|
8
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
9
|
+
var DataTableChip = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
10
|
+
var cell = _ref.cell;
|
11
|
+
var color = cell === 'Pending' ? 'line.light' : cell === 'Failed' ? 'warning.bright' : cell === 'Rejected' ? 'critical.bright' : 'success.dark';
|
12
|
+
return ___EmotionJSX(Chip, {
|
13
|
+
label: cell,
|
14
|
+
bg: "white",
|
15
|
+
ref: ref,
|
16
|
+
textColor: cell === 'Pending' || cell === 'Failed' ? 'text.primary' : color,
|
17
|
+
sx: {
|
18
|
+
border: '1px',
|
19
|
+
borderStyle: 'solid',
|
20
|
+
borderColor: color,
|
21
|
+
flexDirection: 'row-reverse !important'
|
22
|
+
}
|
23
|
+
}, cell !== 'Pending' && ___EmotionJSX(Icon, {
|
24
|
+
icon: cell === 'Approved' ? CheckIcon : cell === 'Rejected' ? AlertCircleIcon : cell === 'Failed' ? AlertIcon : null,
|
25
|
+
mr: "xs",
|
26
|
+
size: "14px",
|
27
|
+
color: color
|
28
|
+
}));
|
29
|
+
});
|
30
|
+
DataTableChip.propTypes = {
|
31
|
+
cell: PropTypes.string
|
32
|
+
};
|
33
|
+
export default DataTableChip;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render, screen } from '@testing-library/react';
|
3
|
+
import { DataTableChip } from '../../index';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
|
6
|
+
var getComponent = function getComponent() {
|
7
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
8
|
+
return render(___EmotionJSX(DataTableChip, props));
|
9
|
+
};
|
10
|
+
|
11
|
+
test('renders component with rejected label', function () {
|
12
|
+
var cell = 'Rejected';
|
13
|
+
getComponent({
|
14
|
+
cell: cell
|
15
|
+
});
|
16
|
+
expect(screen.queryByText('Rejected')).toBeInTheDocument();
|
17
|
+
});
|
18
|
+
test('renders component with pending label', function () {
|
19
|
+
var cell = 'Pending';
|
20
|
+
getComponent({
|
21
|
+
cell: cell
|
22
|
+
});
|
23
|
+
expect(screen.queryByText('Pending')).toBeInTheDocument();
|
24
|
+
});
|
25
|
+
test('renders component with failed label', function () {
|
26
|
+
var cell = 'Failed';
|
27
|
+
getComponent({
|
28
|
+
cell: cell
|
29
|
+
});
|
30
|
+
expect(screen.queryByText('Failed')).toBeInTheDocument();
|
31
|
+
});
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import React, { forwardRef } from 'react';
|
2
|
+
import DotsVerticalIcon from 'mdi-react/DotsVerticalIcon';
|
3
|
+
import { Box, Icon, IconButton, Item, Menu, OverlayProvider, PopoverMenu, Text } from '../../index';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
var DataTableMenu = /*#__PURE__*/forwardRef(function (props, ref) {
|
6
|
+
return ___EmotionJSX(Box, {
|
7
|
+
ref: ref,
|
8
|
+
variant: "dataTable.tableMenu"
|
9
|
+
}, ___EmotionJSX(OverlayProvider, null, ___EmotionJSX(PopoverMenu, null, ___EmotionJSX(IconButton, {
|
10
|
+
"aria-label": "row menu"
|
11
|
+
}, ___EmotionJSX(Icon, {
|
12
|
+
icon: DotsVerticalIcon
|
13
|
+
})), ___EmotionJSX(Menu, null, ___EmotionJSX(Item, {
|
14
|
+
key: "edit"
|
15
|
+
}, "Edit"), ___EmotionJSX(Item, {
|
16
|
+
key: "duplicate"
|
17
|
+
}, "Duplicate"), ___EmotionJSX(Item, {
|
18
|
+
key: "delete",
|
19
|
+
textValue: "delete"
|
20
|
+
}, ___EmotionJSX(Text, {
|
21
|
+
color: "critical.bright"
|
22
|
+
}, "Delete"))))));
|
23
|
+
});
|
24
|
+
export default DataTableMenu;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render, screen } from '@testing-library/react';
|
3
|
+
import { DataTableMenu } from '../../index';
|
4
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
5
|
+
|
6
|
+
var getComponent = function getComponent() {
|
7
|
+
return render(___EmotionJSX(DataTableMenu, null));
|
8
|
+
};
|
9
|
+
|
10
|
+
test('renders component with menu', function () {
|
11
|
+
getComponent();
|
12
|
+
expect(screen.getByLabelText('row menu')).toBeInTheDocument();
|
13
|
+
});
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
2
|
+
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
3
|
+
import React, { forwardRef } from 'react';
|
4
|
+
import PropTypes from 'prop-types';
|
5
|
+
import { Box, Icon } from '../../index';
|
6
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
7
|
+
var DataTableMultiLine = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
8
|
+
var cell = _ref.cell;
|
9
|
+
return ___EmotionJSX(React.Fragment, null, _mapInstanceProperty(cell).call(cell, function (item) {
|
10
|
+
var _context;
|
11
|
+
|
12
|
+
return ___EmotionJSX(Box, {
|
13
|
+
key: _concatInstanceProperty(_context = "".concat(cell.key, "_")).call(_context, item.accountId),
|
14
|
+
ref: ref
|
15
|
+
}, ___EmotionJSX(Box, {
|
16
|
+
sx: {
|
17
|
+
flexDirection: 'row !important'
|
18
|
+
}
|
19
|
+
}, ___EmotionJSX(Box, {
|
20
|
+
sx: {
|
21
|
+
alignItems: 'center',
|
22
|
+
justifyContent: 'center',
|
23
|
+
mx: '18px'
|
24
|
+
}
|
25
|
+
}, ___EmotionJSX(Icon, {
|
26
|
+
icon: item.icon,
|
27
|
+
color: "accent.40",
|
28
|
+
size: "18.75"
|
29
|
+
})), ___EmotionJSX(Box, null, ___EmotionJSX(Box, {
|
30
|
+
sx: {
|
31
|
+
fontWeight: 500,
|
32
|
+
fontSize: '15px'
|
33
|
+
}
|
34
|
+
}, item.name), ___EmotionJSX(Box, {
|
35
|
+
sx: {
|
36
|
+
color: 'neutral.40',
|
37
|
+
fontWeight: 400,
|
38
|
+
fontSize: '13px'
|
39
|
+
}
|
40
|
+
}, "Account ID: ", item.accountId))));
|
41
|
+
}));
|
42
|
+
});
|
43
|
+
DataTableMultiLine.propTypes = {
|
44
|
+
cell: PropTypes.arrayOf(PropTypes.shape({}))
|
45
|
+
};
|
46
|
+
export default DataTableMultiLine;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { render, screen } from '@testing-library/react';
|
3
|
+
import ApplicationIcon from 'mdi-react/ApplicationIcon';
|
4
|
+
import { DataTableMultiLine } from '../../index';
|
5
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
6
|
+
|
7
|
+
var getComponent = function getComponent() {
|
8
|
+
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
9
|
+
return render(___EmotionJSX(DataTableMultiLine, props));
|
10
|
+
};
|
11
|
+
|
12
|
+
test('renders component with account name', function () {
|
13
|
+
var cell = [{
|
14
|
+
name: 'Acme',
|
15
|
+
icon: ApplicationIcon,
|
16
|
+
accountId: 123
|
17
|
+
}];
|
18
|
+
getComponent({
|
19
|
+
cell: cell
|
20
|
+
});
|
21
|
+
expect(screen.queryByText('Acme')).toBeInTheDocument();
|
22
|
+
});
|
@@ -0,0 +1,157 @@
|
|
1
|
+
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
|
+
var _excluded = ["layout", "collection", "focusedKey", "renderView", "renderWrapper", "domRef", "bodyRef", "setTableWidth", "getColumnWidth", "onVisibleRectChange"];
|
4
|
+
import PropTypes from 'prop-types';
|
5
|
+
import React, { forwardRef, useCallback, useRef } from 'react';
|
6
|
+
import { chain, mergeProps, useLayoutEffect } from '@react-aria/utils';
|
7
|
+
import { ScrollView, setScrollLeft, useVirtualizer } from '@react-aria/virtualizer';
|
8
|
+
import { useVirtualizerState } from '@react-stately/virtualizer';
|
9
|
+
import { Box } from '../../index';
|
10
|
+
/**
|
11
|
+
* Custom Virtualizer using react aria Spectrum TableView/TableVirtualizer
|
12
|
+
* Primarily utilizes [TableView](https://react-spectrum.adobe.com/react-spectrum/TableView.html)
|
13
|
+
*/
|
14
|
+
|
15
|
+
import { jsx as ___EmotionJSX } from "@emotion/react";
|
16
|
+
var DataTableVirtualizer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
17
|
+
var _layout$getLayoutInfo;
|
18
|
+
|
19
|
+
var layout = _ref.layout,
|
20
|
+
collection = _ref.collection,
|
21
|
+
focusedKey = _ref.focusedKey,
|
22
|
+
renderView = _ref.renderView,
|
23
|
+
renderWrapper = _ref.renderWrapper,
|
24
|
+
domRef = _ref.domRef,
|
25
|
+
bodyRef = _ref.bodyRef,
|
26
|
+
setTableWidth = _ref.setTableWidth,
|
27
|
+
getColumnWidth = _ref.getColumnWidth,
|
28
|
+
onVisibleRectChangeProp = _ref.onVisibleRectChange,
|
29
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
30
|
+
|
31
|
+
var direction = 'ltr'; // useLocale override
|
32
|
+
|
33
|
+
var headerRef = useRef(ref);
|
34
|
+
var loadingState = collection.body.props.loadingState;
|
35
|
+
var isLoading = loadingState === 'loading' || loadingState === 'loadingMore';
|
36
|
+
var onLoadMore = collection.body.props.onLoadMore;
|
37
|
+
var state = useVirtualizerState({
|
38
|
+
layout: layout,
|
39
|
+
collection: collection,
|
40
|
+
renderView: renderView,
|
41
|
+
renderWrapper: renderWrapper,
|
42
|
+
onVisibleRectChange: function onVisibleRectChange(rect) {
|
43
|
+
// eslint-disable-next-line no-param-reassign
|
44
|
+
bodyRef.current.scrollTop = rect.y;
|
45
|
+
setScrollLeft(bodyRef.current, direction, rect.x);
|
46
|
+
},
|
47
|
+
transitionDuration: isLoading ? 160 : 220
|
48
|
+
});
|
49
|
+
|
50
|
+
var _useVirtualizer = useVirtualizer({
|
51
|
+
focusedKey: focusedKey,
|
52
|
+
scrollToItem: function scrollToItem(key) {
|
53
|
+
var item = collection.getItem(key);
|
54
|
+
state.virtualizer.scrollToItem(key, {
|
55
|
+
duration: 0,
|
56
|
+
// Prevent scrolling to the top when clicking on column headers.
|
57
|
+
shouldScrollY: (item === null || item === void 0 ? void 0 : item.type) !== 'column',
|
58
|
+
// Offset scroll position by width of selection cell
|
59
|
+
// (which is sticky and will overlap the cell we're scrolling to).
|
60
|
+
offsetX: 0
|
61
|
+
});
|
62
|
+
}
|
63
|
+
}, state, domRef),
|
64
|
+
virtualizerProps = _useVirtualizer.virtualizerProps; // If column widths change, need to relay out.
|
65
|
+
|
66
|
+
|
67
|
+
useLayoutEffect(function () {
|
68
|
+
state.virtualizer.relayoutNow({
|
69
|
+
sizeChanged: true
|
70
|
+
});
|
71
|
+
}, [state.virtualizer]);
|
72
|
+
var headerHeight = ((_layout$getLayoutInfo = layout.getLayoutInfo('header')) === null || _layout$getLayoutInfo === void 0 ? void 0 : _layout$getLayoutInfo.rect.height) || 0;
|
73
|
+
var visibleRect = state.virtualizer.visibleRect; // Sync the scroll position from the table body to the header container.
|
74
|
+
|
75
|
+
var onScroll = useCallback(function () {
|
76
|
+
headerRef.current.scrollLeft = bodyRef.current.scrollLeft;
|
77
|
+
}, [bodyRef]);
|
78
|
+
var onVisibleRectChange = useCallback(function (rect) {
|
79
|
+
setTableWidth(rect.width);
|
80
|
+
state.setVisibleRect(rect);
|
81
|
+
|
82
|
+
if (!isLoading && onLoadMore) {
|
83
|
+
var scrollOffset = state.virtualizer.contentSize.height - rect.height * 2;
|
84
|
+
|
85
|
+
if (rect.y > scrollOffset) {
|
86
|
+
onLoadMore();
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
90
|
+
[onLoadMore, isLoading, state.setVisibleRect, state.virtualizer]);
|
91
|
+
useLayoutEffect(function () {
|
92
|
+
if (!isLoading && onLoadMore && !state.isAnimating) {
|
93
|
+
if (state.contentSize.height <= state.virtualizer.visibleRect.height) {
|
94
|
+
onLoadMore();
|
95
|
+
}
|
96
|
+
}
|
97
|
+
}, [state.contentSize, state.virtualizer, state.isAnimating, onLoadMore, isLoading]);
|
98
|
+
return ___EmotionJSX(Box, _extends({}, mergeProps(otherProps, virtualizerProps), {
|
99
|
+
ref: domRef
|
100
|
+
}), ___EmotionJSX(Box, {
|
101
|
+
role: "presentation",
|
102
|
+
variant: "dataTable.tableHeadWrapper",
|
103
|
+
style: {
|
104
|
+
width: visibleRect.width,
|
105
|
+
height: headerHeight,
|
106
|
+
overflow: 'hidden',
|
107
|
+
position: 'relative',
|
108
|
+
willChange: state.isScrolling ? 'scroll-position' : '',
|
109
|
+
transition: state.isAnimating ? "none ".concat(state.virtualizer.transitionDuration, "ms") : undefined
|
110
|
+
},
|
111
|
+
ref: headerRef
|
112
|
+
}, state.visibleViews[0]), ___EmotionJSX(ScrollView, {
|
113
|
+
role: "presentation",
|
114
|
+
variant: "dataTable.tableBody",
|
115
|
+
style: {
|
116
|
+
flex: 1
|
117
|
+
},
|
118
|
+
innerStyle: {
|
119
|
+
overflow: 'visible',
|
120
|
+
transition: state.isAnimating ? "none ".concat(state.virtualizer.transitionDuration, "ms") : undefined
|
121
|
+
},
|
122
|
+
ref: bodyRef,
|
123
|
+
contentSize: state.contentSize,
|
124
|
+
onVisibleRectChange: chain(onVisibleRectChange, onVisibleRectChangeProp),
|
125
|
+
onScrollStart: state.startScrolling,
|
126
|
+
onScrollEnd: state.endScrolling,
|
127
|
+
onScroll: onScroll
|
128
|
+
}, state.visibleViews[1]));
|
129
|
+
});
|
130
|
+
DataTableVirtualizer.propTypes = {
|
131
|
+
bodyRef: PropTypes.shape({
|
132
|
+
current: PropTypes.shape({
|
133
|
+
scrollLeft: PropTypes.number,
|
134
|
+
scrollTop: PropTypes.number
|
135
|
+
})
|
136
|
+
}),
|
137
|
+
collection: PropTypes.shape({
|
138
|
+
body: PropTypes.shape({
|
139
|
+
props: PropTypes.shape({
|
140
|
+
loadingState: PropTypes.string,
|
141
|
+
onLoadMore: PropTypes.func
|
142
|
+
})
|
143
|
+
}),
|
144
|
+
getItem: PropTypes.func
|
145
|
+
}),
|
146
|
+
domRef: PropTypes.shape({}),
|
147
|
+
focusedKey: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
148
|
+
getColumnWidth: PropTypes.func,
|
149
|
+
layout: PropTypes.shape({
|
150
|
+
getLayoutInfo: PropTypes.func
|
151
|
+
}),
|
152
|
+
onVisibleRectChange: PropTypes.func,
|
153
|
+
renderView: PropTypes.func,
|
154
|
+
renderWrapper: PropTypes.func,
|
155
|
+
setTableWidth: PropTypes.func
|
156
|
+
};
|
157
|
+
export default DataTableVirtualizer;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { default } from './DataTable';
|
2
|
+
export { default as DataTableChip } from './DataTableChip';
|
3
|
+
export { default as DataTableMultiLine } from './DataTableMultiLine';
|
4
|
+
export { default as DataTableVirtualize } from './DataTableVirtualizer';
|
5
|
+
export { default as DataTableMenu } from './DataTableMenu';
|
package/lib/index.js
CHANGED
@@ -151,4 +151,7 @@ export * from './components/TooltipTrigger';
|
|
151
151
|
|
152
152
|
export { Item, Section } from '@react-stately/collections';
|
153
153
|
export { OverlayProvider, useOverlayPosition, useOverlayTrigger } from '@react-aria/overlays';
|
154
|
-
export { useOverlayTriggerState } from '@react-stately/overlays';
|
154
|
+
export { useOverlayTriggerState } from '@react-stately/overlays';
|
155
|
+
export { default as DataTable } from './components/DataTable';
|
156
|
+
export * from './components/DataTable';
|
157
|
+
export { Cell as DataTableCell, Column as DataTableColumn, Row as DataTableRow, TableBody as DataTableBody, TableHeader as DataTableHeader } from '@react-spectrum/table';
|
@@ -19,6 +19,29 @@ var items = [{
|
|
19
19
|
name: 'Third Option',
|
20
20
|
id: '3'
|
21
21
|
}];
|
22
|
+
var sx = {
|
23
|
+
actionIcon: {
|
24
|
+
color: 'neutral.30'
|
25
|
+
},
|
26
|
+
dragVerticalIcon: {
|
27
|
+
color: 'neutral.50'
|
28
|
+
},
|
29
|
+
iconButton: {
|
30
|
+
ml: 'xs'
|
31
|
+
},
|
32
|
+
iconButtonToggleContainer: {
|
33
|
+
mx: 'sm',
|
34
|
+
flexShrink: 0
|
35
|
+
},
|
36
|
+
iconContainer: {
|
37
|
+
alignItems: 'center',
|
38
|
+
ml: '12px',
|
39
|
+
mr: '12px'
|
40
|
+
},
|
41
|
+
outerContainer: {
|
42
|
+
alignItems: 'center'
|
43
|
+
}
|
44
|
+
};
|
22
45
|
export var Default = function Default() {
|
23
46
|
var CustomOnSvg = function CustomOnSvg(props) {
|
24
47
|
return ___EmotionJSX("svg", _extends({
|
@@ -66,24 +89,22 @@ export var Default = function Default() {
|
|
66
89
|
};
|
67
90
|
|
68
91
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
|
69
|
-
sx:
|
70
|
-
alignItems: 'center'
|
71
|
-
},
|
92
|
+
sx: sx.outerContainer,
|
72
93
|
isRow: true
|
73
94
|
}, ___EmotionJSX(Icon, {
|
74
95
|
icon: DragVerticalIcon,
|
75
96
|
size: 25,
|
76
|
-
|
97
|
+
sx: sx.dragVerticalIcon
|
77
98
|
}), ___EmotionJSX(ComboBoxField, {
|
78
99
|
items: items,
|
79
100
|
defaultSelectedKey: "Last Name",
|
101
|
+
"aria-label": "Row one value",
|
80
102
|
containerProps: {
|
81
103
|
width: '275px'
|
82
104
|
},
|
83
105
|
labelProps: {
|
84
106
|
mb: 0
|
85
107
|
},
|
86
|
-
"aria-label": "Row one value",
|
87
108
|
controlProps: {
|
88
109
|
'aria-label': 'test'
|
89
110
|
}
|
@@ -93,10 +114,7 @@ export var Default = function Default() {
|
|
93
114
|
"data-id": item.name
|
94
115
|
}, item.name);
|
95
116
|
}), ___EmotionJSX(Box, {
|
96
|
-
sx:
|
97
|
-
mx: 'sm',
|
98
|
-
flexShrink: 0
|
99
|
-
}
|
117
|
+
sx: sx.iconButtonToggleContainer
|
100
118
|
}, ___EmotionJSX(IconButtonToggle, {
|
101
119
|
toggledIcon: CustomOnSvg,
|
102
120
|
defaultIcon: CustomOffSvg,
|
@@ -126,35 +144,29 @@ export var Default = function Default() {
|
|
126
144
|
}, item.name);
|
127
145
|
}), ___EmotionJSX(Box, {
|
128
146
|
isRow: true,
|
129
|
-
|
130
|
-
sx: {
|
131
|
-
marginLeft: '12px',
|
132
|
-
marginRight: '12px'
|
133
|
-
}
|
147
|
+
sx: sx.iconContainer
|
134
148
|
}, ___EmotionJSX(IconButton, {
|
135
149
|
"aria-label": "Edit"
|
136
150
|
}, ___EmotionJSX(Icon, {
|
137
151
|
icon: CogsIcon,
|
138
|
-
|
152
|
+
sx: sx.actionIcon,
|
139
153
|
size: 20,
|
140
154
|
title: "edit icon"
|
141
155
|
})), ___EmotionJSX(IconButton, {
|
142
|
-
|
156
|
+
sx: sx.iconButton,
|
143
157
|
"aria-label": "Delete"
|
144
158
|
}, ___EmotionJSX(Icon, {
|
145
159
|
icon: DeleteIcon,
|
146
|
-
|
160
|
+
sx: sx.actionIcon,
|
147
161
|
size: 20,
|
148
162
|
title: "delete icon"
|
149
163
|
})))), ___EmotionJSX(Box, {
|
150
|
-
sx:
|
151
|
-
alignItems: 'center'
|
152
|
-
},
|
164
|
+
sx: sx.outerContainer,
|
153
165
|
isRow: true
|
154
166
|
}, ___EmotionJSX(Icon, {
|
155
167
|
icon: DragVerticalIcon,
|
156
168
|
size: 25,
|
157
|
-
|
169
|
+
sx: sx.dragVerticalIcon
|
158
170
|
}), ___EmotionJSX(ComboBoxField, {
|
159
171
|
items: items,
|
160
172
|
defaultSelectedKey: "Last Name",
|
@@ -174,10 +186,7 @@ export var Default = function Default() {
|
|
174
186
|
"data-id": item.name
|
175
187
|
}, item.name);
|
176
188
|
}), ___EmotionJSX(Box, {
|
177
|
-
sx:
|
178
|
-
mx: 'sm',
|
179
|
-
flexShrink: 0
|
180
|
-
}
|
189
|
+
sx: sx.iconButtonToggleContainer
|
181
190
|
}, ___EmotionJSX(IconButtonToggle, {
|
182
191
|
toggledIcon: CustomRightSvg,
|
183
192
|
defaultIcon: CustomRightSvg,
|
@@ -207,24 +216,20 @@ export var Default = function Default() {
|
|
207
216
|
}, item.name);
|
208
217
|
}), ___EmotionJSX(Box, {
|
209
218
|
isRow: true,
|
210
|
-
|
211
|
-
sx: {
|
212
|
-
marginLeft: '12px',
|
213
|
-
marginRight: '12px'
|
214
|
-
}
|
219
|
+
sx: sx.iconContainer
|
215
220
|
}, ___EmotionJSX(IconButton, {
|
216
221
|
"aria-label": "Edit"
|
217
222
|
}, ___EmotionJSX(Icon, {
|
218
223
|
icon: CogsIcon,
|
219
|
-
|
224
|
+
sx: sx.actionIcon,
|
220
225
|
size: 20,
|
221
226
|
title: "edit icon"
|
222
227
|
})), ___EmotionJSX(IconButton, {
|
223
|
-
|
228
|
+
sx: sx.iconButton,
|
224
229
|
"aria-label": "Delete"
|
225
230
|
}, ___EmotionJSX(Icon, {
|
226
231
|
icon: DeleteIcon,
|
227
|
-
|
232
|
+
sx: sx.actionIcon,
|
228
233
|
size: 20,
|
229
234
|
title: "delete icon"
|
230
235
|
})))));
|
@@ -35,6 +35,7 @@ import table from './table';
|
|
35
35
|
import * as tabs from './tabs';
|
36
36
|
import tooltip from './tooltip';
|
37
37
|
import collapsiblePanel from './collapsiblePanel';
|
38
|
+
import dataTable from './../../components/DataTable/DataTable.styles';
|
38
39
|
export default _objectSpread(_objectSpread({
|
39
40
|
accordion: accordion,
|
40
41
|
boxes: boxes,
|
@@ -58,5 +59,6 @@ export default _objectSpread(_objectSpread({
|
|
58
59
|
stepper: stepper,
|
59
60
|
table: table
|
60
61
|
}, tabs), {}, {
|
61
|
-
tooltip: tooltip
|
62
|
+
tooltip: tooltip,
|
63
|
+
dataTable: dataTable
|
62
64
|
});
|