@pingux/astro 1.27.0-alpha.14 → 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/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +8 -2
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +35 -0
- package/lib/cjs/components/PageHeader/PageHeader.js +7 -1
- package/lib/cjs/context/DataTableContext/index.js +31 -0
- package/lib/cjs/index.js +67 -2
- package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +38 -30
- package/lib/cjs/recipes/ListAndPanel.stories.js +102 -87
- package/lib/cjs/recipes/MaskedValue.stories.js +8 -5
- package/lib/cjs/recipes/NeutralInput.stories.js +6 -3
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
- package/lib/cjs/recipes/PageHeader.stories.js +73 -0
- package/lib/cjs/recipes/RowLineChart.stories.js +58 -70
- package/lib/cjs/recipes/SelectedFieldOverlay.story.js +25 -21
- package/lib/cjs/recipes/TrialExperienceStatusBar.stories.js +81 -72
- 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/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.js +7 -2
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.test.js +25 -0
- package/lib/components/PageHeader/PageHeader.js +8 -1
- package/lib/context/DataTableContext/index.js +5 -0
- package/lib/index.js +4 -1
- package/lib/recipes/FlippableCaretMenuButton.stories.js +38 -30
- package/lib/recipes/ListAndPanel.stories.js +102 -87
- package/lib/recipes/MaskedValue.stories.js +8 -5
- package/lib/recipes/NeutralInput.stories.js +6 -3
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +38 -33
- package/lib/recipes/PageHeader.stories.js +53 -0
- package/lib/recipes/RowLineChart.stories.js +58 -70
- package/lib/recipes/SelectedFieldOverlay.story.js +25 -21
- package/lib/recipes/TrialExperienceStatusBar.stories.js +81 -72
- package/lib/styles/variants/variants.js +3 -1
- package/package.json +55 -50
@@ -0,0 +1,310 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
_Object$defineProperty(exports, "__esModule", {
|
8
|
+
value: true
|
9
|
+
});
|
10
|
+
|
11
|
+
exports["default"] = exports.Default = exports.CustomContent = void 0;
|
12
|
+
|
13
|
+
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/parse-int"));
|
14
|
+
|
15
|
+
var _includes = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/includes"));
|
16
|
+
|
17
|
+
var _sort = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/sort"));
|
18
|
+
|
19
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs3/regenerator"));
|
20
|
+
|
21
|
+
var _assign = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/assign"));
|
22
|
+
|
23
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/keys"));
|
24
|
+
|
25
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
26
|
+
|
27
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
28
|
+
|
29
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
30
|
+
|
31
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
32
|
+
|
33
|
+
var _react = _interopRequireDefault(require("react"));
|
34
|
+
|
35
|
+
var _data = require("@react-stately/data");
|
36
|
+
|
37
|
+
var _ApplicationIcon = _interopRequireDefault(require("mdi-react/ApplicationIcon"));
|
38
|
+
|
39
|
+
var _addonActions = require("@storybook/addon-actions");
|
40
|
+
|
41
|
+
var _faker = require("@faker-js/faker");
|
42
|
+
|
43
|
+
var _isChromatic = _interopRequireDefault(require("chromatic/isChromatic"));
|
44
|
+
|
45
|
+
var _index = require("../../index");
|
46
|
+
|
47
|
+
var _react2 = require("@emotion/react");
|
48
|
+
|
49
|
+
var _default = {
|
50
|
+
title: 'DataTable',
|
51
|
+
component: _index.DataTable,
|
52
|
+
parameters: {
|
53
|
+
docs: {
|
54
|
+
source: {
|
55
|
+
type: 'code'
|
56
|
+
}
|
57
|
+
}
|
58
|
+
},
|
59
|
+
argTypes: {
|
60
|
+
density: {
|
61
|
+
control: {
|
62
|
+
type: 'radio',
|
63
|
+
options: ['compact', 'regular', 'spacious']
|
64
|
+
},
|
65
|
+
defaultValue: 'spacious'
|
66
|
+
},
|
67
|
+
overflowMode: {
|
68
|
+
control: {
|
69
|
+
type: 'radio',
|
70
|
+
options: ['truncate', 'wrap']
|
71
|
+
},
|
72
|
+
defaultValue: 'truncate'
|
73
|
+
},
|
74
|
+
width: {
|
75
|
+
defaultValue: '100%',
|
76
|
+
control: {
|
77
|
+
type: 'text'
|
78
|
+
}
|
79
|
+
},
|
80
|
+
height: {
|
81
|
+
defaultValue: 565,
|
82
|
+
control: {
|
83
|
+
type: 'number'
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
};
|
88
|
+
exports["default"] = _default;
|
89
|
+
|
90
|
+
var Default = function Default(args) {
|
91
|
+
var columns = [{
|
92
|
+
name: 'Country',
|
93
|
+
key: 'country'
|
94
|
+
}, {
|
95
|
+
name: 'Population',
|
96
|
+
key: 'population'
|
97
|
+
}, {
|
98
|
+
name: 'Continent',
|
99
|
+
key: 'continent'
|
100
|
+
}];
|
101
|
+
var rows = [{
|
102
|
+
id: 1,
|
103
|
+
country: 'USA',
|
104
|
+
population: '320,000,000',
|
105
|
+
continent: 'North America'
|
106
|
+
}, {
|
107
|
+
id: 2,
|
108
|
+
country: 'Canada',
|
109
|
+
population: '37,000,000',
|
110
|
+
continent: 'North America'
|
111
|
+
}, {
|
112
|
+
id: 3,
|
113
|
+
country: 'China',
|
114
|
+
population: '1,398,000,000',
|
115
|
+
continent: 'Asia'
|
116
|
+
}, {
|
117
|
+
id: 4,
|
118
|
+
country: 'France',
|
119
|
+
population: '67,000,000',
|
120
|
+
continent: 'Europe'
|
121
|
+
}];
|
122
|
+
return (0, _react2.jsx)(_index.DataTable, (0, _extends2["default"])({}, args, {
|
123
|
+
"aria-label": "Static table"
|
124
|
+
}), (0, _react2.jsx)(_index.DataTableHeader, {
|
125
|
+
columns: columns
|
126
|
+
}, function (column) {
|
127
|
+
return (0, _react2.jsx)(_index.DataTableColumn, {
|
128
|
+
align: "center"
|
129
|
+
}, column.name);
|
130
|
+
}), (0, _react2.jsx)(_index.DataTableBody, {
|
131
|
+
items: rows
|
132
|
+
}, function (item) {
|
133
|
+
return (0, _react2.jsx)(_index.DataTableRow, null, function (columnKey) {
|
134
|
+
return (0, _react2.jsx)(_index.DataTableCell, null, item[columnKey]);
|
135
|
+
});
|
136
|
+
}));
|
137
|
+
};
|
138
|
+
|
139
|
+
exports.Default = Default;
|
140
|
+
|
141
|
+
var CustomContent = function CustomContent(args) {
|
142
|
+
/**
|
143
|
+
* isChromatic checks if the code is running in Chromatic environment
|
144
|
+
* @returns {Boolean}
|
145
|
+
* Source: https://www.chromatic.com/docs/ischromatic
|
146
|
+
* */
|
147
|
+
var chromatic = (0, _isChromatic["default"])();
|
148
|
+
var columns = [{
|
149
|
+
name: 'Name/ID',
|
150
|
+
key: 'name_id',
|
151
|
+
isSortable: true
|
152
|
+
}, {
|
153
|
+
name: 'Status',
|
154
|
+
key: 'status',
|
155
|
+
isSortable: false
|
156
|
+
}, {
|
157
|
+
name: 'Category',
|
158
|
+
key: 'category',
|
159
|
+
isSortable: false
|
160
|
+
}, {
|
161
|
+
name: 'Date Submitted',
|
162
|
+
key: 'date',
|
163
|
+
isSortable: true
|
164
|
+
}, {
|
165
|
+
name: 'Submitted By',
|
166
|
+
key: 'submitted_by',
|
167
|
+
isSortable: true
|
168
|
+
}, {
|
169
|
+
name: 'Menu',
|
170
|
+
key: 'menu',
|
171
|
+
isSortable: false
|
172
|
+
}];
|
173
|
+
var list = (0, _data.useAsyncList)({
|
174
|
+
load: function load(_ref) {
|
175
|
+
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
176
|
+
var _context, _context2, _context3;
|
177
|
+
|
178
|
+
var signal, cursor, res, json, random, fakeData, tableData;
|
179
|
+
return _regenerator["default"].wrap(function _callee$(_context5) {
|
180
|
+
while (1) {
|
181
|
+
switch (_context5.prev = _context5.next) {
|
182
|
+
case 0:
|
183
|
+
signal = _ref.signal, cursor = _ref.cursor;
|
184
|
+
|
185
|
+
if (cursor) {
|
186
|
+
// eslint-disable-next-line no-param-reassign
|
187
|
+
cursor = cursor.replace(/^http:\/\//i, 'https://');
|
188
|
+
}
|
189
|
+
|
190
|
+
_context5.next = 4;
|
191
|
+
return fetch(cursor || 'https://pokeapi.co/api/v2/pokemon', {
|
192
|
+
signal: signal
|
193
|
+
});
|
194
|
+
|
195
|
+
case 4:
|
196
|
+
res = _context5.sent;
|
197
|
+
_context5.next = 7;
|
198
|
+
return res.json();
|
199
|
+
|
200
|
+
case 7:
|
201
|
+
json = _context5.sent;
|
202
|
+
|
203
|
+
random = function random(items) {
|
204
|
+
return items[Math.floor(Math.random() * items.length)];
|
205
|
+
};
|
206
|
+
|
207
|
+
fakeData = (0, _map["default"])(_context = (0, _concat["default"])(_context2 = []).call(_context2, (0, _keys["default"])(_context3 = Array(json.results.length)).call(_context3))).call(_context, function (key) {
|
208
|
+
var _context4;
|
209
|
+
|
210
|
+
return {
|
211
|
+
id: key,
|
212
|
+
date: chromatic ? '2022-12-25' : "".concat(_faker.faker.date.past().toLocaleDateString('fr-CA')),
|
213
|
+
category: chromatic ? 'Other' : "".concat(random(['App Catalog', 'Delete Environment', 'Other'])),
|
214
|
+
status: (0, _react2.jsx)(_index.DataTableChip, {
|
215
|
+
cell: chromatic ? 'Pending' : "".concat(random(['Pending', 'Rejected', 'Approved', 'Failed']))
|
216
|
+
}),
|
217
|
+
submitted_by: chromatic ? 'John Doe' : (0, _concat["default"])(_context4 = "".concat(_faker.faker.name.firstName(), " ")).call(_context4, _faker.faker.name.lastName()),
|
218
|
+
name_id: (0, _react2.jsx)(_index.DataTableMultiLine, {
|
219
|
+
cell: [{
|
220
|
+
name: chromatic ? 'ACME' : "".concat(_faker.faker.company.name()),
|
221
|
+
icon: _ApplicationIcon["default"],
|
222
|
+
accountId: chromatic ? '123456789' : "".concat(_faker.faker.finance.routingNumber())
|
223
|
+
}]
|
224
|
+
}),
|
225
|
+
menu: (0, _react2.jsx)(_index.DataTableMenu, null)
|
226
|
+
};
|
227
|
+
});
|
228
|
+
tableData = (0, _map["default"])(fakeData).call(fakeData, function (item, i) {
|
229
|
+
return (0, _assign["default"])({}, item, json.results[i]);
|
230
|
+
});
|
231
|
+
return _context5.abrupt("return", {
|
232
|
+
items: tableData,
|
233
|
+
cursor: json.next
|
234
|
+
});
|
235
|
+
|
236
|
+
case 12:
|
237
|
+
case "end":
|
238
|
+
return _context5.stop();
|
239
|
+
}
|
240
|
+
}
|
241
|
+
}, _callee);
|
242
|
+
}))();
|
243
|
+
},
|
244
|
+
sort: function sort(_ref2) {
|
245
|
+
return (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
246
|
+
var items, sortDescriptor, cmp;
|
247
|
+
return _regenerator["default"].wrap(function _callee2$(_context7) {
|
248
|
+
while (1) {
|
249
|
+
switch (_context7.prev = _context7.next) {
|
250
|
+
case 0:
|
251
|
+
items = _ref2.items, sortDescriptor = _ref2.sortDescriptor;
|
252
|
+
return _context7.abrupt("return", {
|
253
|
+
items: (0, _sort["default"])(items).call(items, function (a, b) {
|
254
|
+
var _context6;
|
255
|
+
|
256
|
+
var first = sortDescriptor.column !== 'name_id' ? a[sortDescriptor.column] : a[sortDescriptor.column].props.cell[0].name;
|
257
|
+
var second = sortDescriptor.column !== 'name_id' ? b[sortDescriptor.column] : b[sortDescriptor.column].props.cell[0].name;
|
258
|
+
|
259
|
+
if ((0, _includes["default"])(_context6 = sortDescriptor.column).call(_context6, 'date')) {
|
260
|
+
cmp = new Date(first) < new Date(second) ? -1 : 1;
|
261
|
+
} else {
|
262
|
+
cmp = ((0, _parseInt2["default"])(first, 10) || first) < ((0, _parseInt2["default"])(second, 10) || second) ? -1 : 1;
|
263
|
+
}
|
264
|
+
|
265
|
+
if (sortDescriptor.direction === 'descending') {
|
266
|
+
cmp *= -1;
|
267
|
+
}
|
268
|
+
|
269
|
+
return cmp;
|
270
|
+
})
|
271
|
+
});
|
272
|
+
|
273
|
+
case 2:
|
274
|
+
case "end":
|
275
|
+
return _context7.stop();
|
276
|
+
}
|
277
|
+
}
|
278
|
+
}, _callee2);
|
279
|
+
}))();
|
280
|
+
}
|
281
|
+
});
|
282
|
+
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.DataTable, (0, _extends2["default"])({}, args, {
|
283
|
+
sortDescriptor: list.sortDescriptor,
|
284
|
+
onSortChange: (0, _sort["default"])(list),
|
285
|
+
"aria-label": "Custom content table",
|
286
|
+
onAction: (0, _addonActions.action)('onAction')
|
287
|
+
}), (0, _react2.jsx)(_index.DataTableHeader, {
|
288
|
+
columns: columns
|
289
|
+
}, function (column) {
|
290
|
+
return (0, _react2.jsx)(_index.DataTableColumn, {
|
291
|
+
width: // eslint-disable-next-line no-nested-ternary
|
292
|
+
column.key === 'name_id' ? '26.5%' : column.key === 'menu' ? '5%' : '16%',
|
293
|
+
align: column.key !== 'menu' ? 'start' : 'center',
|
294
|
+
allowsSorting: column.isSortable,
|
295
|
+
hideHeader: column.key === 'menu'
|
296
|
+
}, column.name);
|
297
|
+
}), (0, _react2.jsx)(_index.DataTableBody, {
|
298
|
+
items: list.items,
|
299
|
+
loadingState: list.loadingState,
|
300
|
+
onLoadMore: list.loadMore
|
301
|
+
}, function (item) {
|
302
|
+
return (0, _react2.jsx)(_index.DataTableRow, {
|
303
|
+
key: item.name
|
304
|
+
}, function (columnKey) {
|
305
|
+
return (0, _react2.jsx)(_index.DataTableCell, null, item[columnKey]);
|
306
|
+
});
|
307
|
+
})));
|
308
|
+
};
|
309
|
+
|
310
|
+
exports.CustomContent = CustomContent;
|
@@ -0,0 +1,156 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
6
|
+
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
8
|
+
|
9
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
10
|
+
|
11
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
12
|
+
|
13
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
14
|
+
|
15
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
16
|
+
|
17
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
18
|
+
|
19
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
20
|
+
|
21
|
+
_Object$defineProperty(exports, "__esModule", {
|
22
|
+
value: true
|
23
|
+
});
|
24
|
+
|
25
|
+
exports["default"] = void 0;
|
26
|
+
|
27
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
|
+
|
29
|
+
var _text = require("./../../styles/variants/text");
|
30
|
+
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
32
|
+
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
34
|
+
|
35
|
+
var tableCell = _objectSpread(_objectSpread({}, _text.text.tableData), {}, {
|
36
|
+
color: 'text.primary',
|
37
|
+
position: 'relative',
|
38
|
+
display: 'flex',
|
39
|
+
fontSize: '13px',
|
40
|
+
height: '100%',
|
41
|
+
'&.is-key-focused': {
|
42
|
+
outline: '1px',
|
43
|
+
outlineStyle: 'solid',
|
44
|
+
outlineColor: 'accent.50',
|
45
|
+
outlineOffset: '-1px',
|
46
|
+
backgroundColor: 'white'
|
47
|
+
},
|
48
|
+
'&.is-align-start': {
|
49
|
+
alignItems: 'flex-start'
|
50
|
+
},
|
51
|
+
'&.is-align-center': {
|
52
|
+
alignItems: 'center'
|
53
|
+
},
|
54
|
+
'&.is-align-end': {
|
55
|
+
alignItems: 'flex-end'
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
var tableCellContents = {
|
60
|
+
flex: '1 1 0%',
|
61
|
+
minWidth: '0px',
|
62
|
+
overflow: 'hidden',
|
63
|
+
whiteSpace: 'nowrap',
|
64
|
+
textOverflow: 'ellipsis',
|
65
|
+
fontWeight: '400',
|
66
|
+
justifyContent: 'center'
|
67
|
+
};
|
68
|
+
var tableRow = {
|
69
|
+
position: 'relative',
|
70
|
+
cursor: 'default',
|
71
|
+
borderBottom: '1px',
|
72
|
+
outline: '0',
|
73
|
+
borderBottomStyle: 'solid !important',
|
74
|
+
backgroundColor: 'accent.99',
|
75
|
+
borderBottomColor: 'neutral.80',
|
76
|
+
'&:hover': {
|
77
|
+
backgroundColor: 'white'
|
78
|
+
},
|
79
|
+
'&.is-row-focus-visible': {
|
80
|
+
border: '1px solid',
|
81
|
+
borderColor: 'accent.50',
|
82
|
+
borderBottom: '1px',
|
83
|
+
borderBottomColor: 'accent.50',
|
84
|
+
backgroundColor: 'white'
|
85
|
+
}
|
86
|
+
};
|
87
|
+
var tableHeadWrapper = {
|
88
|
+
borderLeftWidth: '0px',
|
89
|
+
borderLeftStyle: 'solid',
|
90
|
+
borderRightWidth: '0px',
|
91
|
+
borderRightStyle: 'solid',
|
92
|
+
flex: '0 0 auto',
|
93
|
+
borderBottom: '1px',
|
94
|
+
borderBottomStyle: 'solid',
|
95
|
+
borderBottomColor: 'neutral.80'
|
96
|
+
};
|
97
|
+
var tableCenteredWrapper = {
|
98
|
+
display: 'flex',
|
99
|
+
alignItems: 'center',
|
100
|
+
justifyContent: 'center',
|
101
|
+
width: '100%',
|
102
|
+
height: '100%'
|
103
|
+
};
|
104
|
+
|
105
|
+
var tableHeadCell = _objectSpread(_objectSpread({}, _text.text.label), {}, {
|
106
|
+
cursor: 'default',
|
107
|
+
backgroundColor: 'accent.99',
|
108
|
+
flexDirection: 'row !important',
|
109
|
+
alignItems: 'flex-end',
|
110
|
+
fontWeight: 500,
|
111
|
+
height: '100%',
|
112
|
+
py: '10px',
|
113
|
+
'&.is-click-focused': {
|
114
|
+
outline: '0'
|
115
|
+
},
|
116
|
+
'&.is-key-focused': {
|
117
|
+
outline: '1px',
|
118
|
+
outlineStyle: 'solid',
|
119
|
+
outlineColor: 'accent.50 !important',
|
120
|
+
outlineOffset: '-1px',
|
121
|
+
backgroundColor: 'accent.99 !important'
|
122
|
+
},
|
123
|
+
'&.is-column-sortable': {
|
124
|
+
color: 'text.active',
|
125
|
+
cursor: 'pointer'
|
126
|
+
},
|
127
|
+
'&.is-align-start': {
|
128
|
+
justifyContent: 'flex-start'
|
129
|
+
},
|
130
|
+
'&.is-align-center': {
|
131
|
+
justifyContent: 'center'
|
132
|
+
},
|
133
|
+
'&.is-align-end': {
|
134
|
+
justifyContent: 'flex-end'
|
135
|
+
}
|
136
|
+
});
|
137
|
+
|
138
|
+
var tableBody = {
|
139
|
+
position: 'relative',
|
140
|
+
overflow: 'auto'
|
141
|
+
};
|
142
|
+
var tableMenu = {
|
143
|
+
p: '5px',
|
144
|
+
borderRadius: '50px'
|
145
|
+
};
|
146
|
+
var _default = {
|
147
|
+
tableBody: tableBody,
|
148
|
+
tableHeadWrapper: tableHeadWrapper,
|
149
|
+
tableCenteredWrapper: tableCenteredWrapper,
|
150
|
+
tableCellContents: tableCellContents,
|
151
|
+
tableCell: tableCell,
|
152
|
+
tableRow: tableRow,
|
153
|
+
tableHeadCell: tableHeadCell,
|
154
|
+
tableMenu: tableMenu
|
155
|
+
};
|
156
|
+
exports["default"] = _default;
|