@pingux/astro 2.133.0 → 2.134.0-alpha.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/lib/cjs/components/Box/Box.styles.d.ts +4 -0
- package/lib/cjs/components/Box/Box.styles.js +5 -0
- package/lib/cjs/components/TableBase/TableBase.js +36 -6
- package/lib/cjs/components/TableBase/TableBase.stories.d.ts +14 -0
- package/lib/cjs/components/TableBase/TableBase.stories.js +193 -6
- package/lib/cjs/components/TableBase/TableBase.styles.d.ts +17 -1
- package/lib/cjs/components/TableBase/TableBase.styles.js +11 -2
- package/lib/cjs/components/TableBase/TableBase.test.js +267 -0
- package/lib/cjs/components/TableBase/stories/NextGenTableBase.js +2 -4
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +2 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +2 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +2 -0
- package/lib/cjs/styles/themes/astro/customProperties/icons.js +1 -1
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/icons.js +1 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +2 -0
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +7 -3
- package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +0 -1
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +1 -3
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +4 -2
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +4 -2
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +7 -2
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +4 -0
- package/lib/components/Box/Box.styles.js +5 -0
- package/lib/components/TableBase/TableBase.js +38 -8
- package/lib/components/TableBase/TableBase.stories.js +195 -8
- package/lib/components/TableBase/TableBase.styles.js +11 -2
- package/lib/components/TableBase/TableBase.test.js +267 -1
- package/lib/components/TableBase/stories/NextGenTableBase.js +3 -5
- package/lib/styles/themes/astro/customProperties/icons.js +1 -1
- package/lib/styles/themes/next-gen/customProperties/icons.js +1 -1
- package/lib/styles/themes/next-gen/variants/cards.js +1 -3
- package/lib/styles/themes/next-gen/variants/tableBase.js +4 -2
- package/lib/styles/themes/next-gen/variants/variants.js +4 -0
- package/package.json +1 -1
@@ -1,15 +1,30 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
|
4
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
5
|
+
var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
|
6
|
+
var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
|
7
|
+
var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
|
8
|
+
var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
9
|
+
var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
|
10
|
+
var _Promise = require("@babel/runtime-corejs3/core-js-stable/promise");
|
11
|
+
var _reverseInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reverse");
|
12
|
+
var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
|
3
13
|
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
14
|
var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
|
15
|
+
var _sort2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/sort"));
|
16
|
+
var _parseInt2 = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/parse-int"));
|
17
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
|
5
18
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
6
19
|
var _react = _interopRequireDefault(require("react"));
|
20
|
+
var _reactStately = require("react-stately");
|
7
21
|
var _react2 = require("@testing-library/react");
|
8
22
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
9
23
|
var _index = require("../../index");
|
10
24
|
var _universalComponentTest = require("../../utils/testUtils/universalComponentTest");
|
11
25
|
var _TableBase = _interopRequireDefault(require("./TableBase"));
|
12
26
|
var _react3 = require("@emotion/react");
|
27
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = _Object$defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof _Symbol ? _Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return _Object$defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = _Object$create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = _Object$getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = _Object$create(IteratorPrototype); function defineIteratorMethods(prototype) { var _context14; _forEachInstanceProperty2(_context14 = ["next", "throw", "return"]).call(_context14, function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], _forEachInstanceProperty2(tryLocsList).call(tryLocsList, pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return _Object$setPrototypeOf ? _Object$setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = _Object$create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = _Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return _reverseInstanceProperty(keys).call(keys), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { var _context15; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty2(_context15 = this.tryEntries).call(_context15, resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+_sliceInstanceProperty(name).call(name, 1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
13
28
|
var testId = 'test-table';
|
14
29
|
var defaultProps = {
|
15
30
|
'aria-label': 'table',
|
@@ -114,6 +129,13 @@ test('renders table rows', function () {
|
|
114
129
|
expect(_react2.screen.getByText(object.continent)).toBeInTheDocument();
|
115
130
|
});
|
116
131
|
});
|
132
|
+
test('renders sticky header', function () {
|
133
|
+
getComponent({
|
134
|
+
isStickyHeader: true
|
135
|
+
});
|
136
|
+
var stickyHeader = _react2.screen.getAllByRole('rowgroup');
|
137
|
+
expect(stickyHeader[0]).toHaveClass('is-sticky');
|
138
|
+
});
|
117
139
|
test('renders checkbox in case of multi selection', function () {
|
118
140
|
getComponent({
|
119
141
|
selectionMode: 'multiple'
|
@@ -268,4 +290,249 @@ test('Arrow Left move the focus to next cell', function () {
|
|
268
290
|
key: 'ArrowLeft'
|
269
291
|
});
|
270
292
|
expect(rows[1]).toHaveFocus();
|
293
|
+
});
|
294
|
+
describe('Sortable Table with useAsyncList', function () {
|
295
|
+
var dataTestId = 'sortableTable';
|
296
|
+
var defaultTableProps = {
|
297
|
+
'aria-label': 'Custom table with sortable content',
|
298
|
+
width: '100%',
|
299
|
+
height: '100%',
|
300
|
+
'data-testid': dataTestId
|
301
|
+
};
|
302
|
+
function load() {
|
303
|
+
return _load.apply(this, arguments);
|
304
|
+
}
|
305
|
+
function _load() {
|
306
|
+
_load = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
|
307
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context11) {
|
308
|
+
while (1) switch (_context11.prev = _context11.next) {
|
309
|
+
case 0:
|
310
|
+
return _context11.abrupt("return", {
|
311
|
+
items: objects
|
312
|
+
});
|
313
|
+
case 1:
|
314
|
+
case "end":
|
315
|
+
return _context11.stop();
|
316
|
+
}
|
317
|
+
}, _callee9);
|
318
|
+
}));
|
319
|
+
return _load.apply(this, arguments);
|
320
|
+
}
|
321
|
+
function sort(_x) {
|
322
|
+
return _sort.apply(this, arguments);
|
323
|
+
}
|
324
|
+
function _sort() {
|
325
|
+
_sort = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(list) {
|
326
|
+
var _context12;
|
327
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context13) {
|
328
|
+
while (1) switch (_context13.prev = _context13.next) {
|
329
|
+
case 0:
|
330
|
+
// eslint-disable-next-line no-param-reassign
|
331
|
+
list.items = (0, _sort2["default"])(_context12 = list.items).call(_context12, function (a, b) {
|
332
|
+
var first = a[list.sortDescriptor.column];
|
333
|
+
var second = b[list.sortDescriptor.column];
|
334
|
+
var cmp = ((0, _parseInt2["default"])(first) || first) < ((0, _parseInt2["default"])(second) || second) // eslint-disable-line
|
335
|
+
? -1 : 1;
|
336
|
+
if (list.sortDescriptor.direction === 'descending') {
|
337
|
+
cmp *= -1;
|
338
|
+
}
|
339
|
+
return cmp;
|
340
|
+
});
|
341
|
+
return _context13.abrupt("return", list);
|
342
|
+
case 2:
|
343
|
+
case "end":
|
344
|
+
return _context13.stop();
|
345
|
+
}
|
346
|
+
}, _callee10);
|
347
|
+
}));
|
348
|
+
return _sort.apply(this, arguments);
|
349
|
+
}
|
350
|
+
var sortableDataTable = function sortableDataTable(_ref) {
|
351
|
+
var result = _ref.result;
|
352
|
+
return (0, _react2.render)((0, _react3.jsx)(_TableBase["default"], (0, _extends2["default"])({}, defaultTableProps, {
|
353
|
+
sortDescriptor: result.current.sortDescriptor
|
354
|
+
}), (0, _react3.jsx)(_index.THead, {
|
355
|
+
columns: headers
|
356
|
+
}, function (column) {
|
357
|
+
return (0, _react3.jsx)(_index.Column, {
|
358
|
+
allowsSorting: true
|
359
|
+
}, column.name);
|
360
|
+
}), (0, _react3.jsx)(_index.TBody, {
|
361
|
+
items: result.current.items
|
362
|
+
}, function (item) {
|
363
|
+
return (0, _react3.jsx)(_index.Row, null, function (columnKey) {
|
364
|
+
return (0, _react3.jsx)(_index.Cell, null, item[columnKey]);
|
365
|
+
});
|
366
|
+
})));
|
367
|
+
};
|
368
|
+
test('sort by country column A => Z', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
|
369
|
+
var _renderHook, result, sortableTable, rowgroups, thead, headerCells, tRows;
|
370
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context5) {
|
371
|
+
while (1) switch (_context5.prev = _context5.next) {
|
372
|
+
case 0:
|
373
|
+
_renderHook = (0, _react2.renderHook)(function () {
|
374
|
+
return (0, _reactStately.useAsyncList)({
|
375
|
+
load: load,
|
376
|
+
sort: sort,
|
377
|
+
initialSortDescriptor: {
|
378
|
+
column: 'country',
|
379
|
+
direction: 'ascending'
|
380
|
+
}
|
381
|
+
});
|
382
|
+
}), result = _renderHook.result;
|
383
|
+
_context5.next = 3;
|
384
|
+
return (0, _react2.act)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
385
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
386
|
+
while (1) switch (_context.prev = _context.next) {
|
387
|
+
case 0:
|
388
|
+
jest.runOnlyPendingTimers();
|
389
|
+
case 1:
|
390
|
+
case "end":
|
391
|
+
return _context.stop();
|
392
|
+
}
|
393
|
+
}, _callee);
|
394
|
+
})));
|
395
|
+
case 3:
|
396
|
+
_context5.next = 5;
|
397
|
+
return (0, _react2.act)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
398
|
+
var _context2;
|
399
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context3) {
|
400
|
+
while (1) switch (_context3.prev = _context3.next) {
|
401
|
+
case 0:
|
402
|
+
(0, _sort2["default"])(_context2 = result.current).call(_context2, {
|
403
|
+
column: 'country',
|
404
|
+
direction: 'ascending'
|
405
|
+
});
|
406
|
+
case 1:
|
407
|
+
case "end":
|
408
|
+
return _context3.stop();
|
409
|
+
}
|
410
|
+
}, _callee2);
|
411
|
+
})));
|
412
|
+
case 5:
|
413
|
+
_context5.next = 7;
|
414
|
+
return (0, _react2.act)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
415
|
+
return _regeneratorRuntime().wrap(function _callee3$(_context4) {
|
416
|
+
while (1) switch (_context4.prev = _context4.next) {
|
417
|
+
case 0:
|
418
|
+
jest.runOnlyPendingTimers();
|
419
|
+
case 1:
|
420
|
+
case "end":
|
421
|
+
return _context4.stop();
|
422
|
+
}
|
423
|
+
}, _callee3);
|
424
|
+
})));
|
425
|
+
case 7:
|
426
|
+
sortableDataTable({
|
427
|
+
result: result
|
428
|
+
});
|
429
|
+
sortableTable = _react2.screen.getByTestId(dataTestId);
|
430
|
+
expect(sortableTable).toBeInTheDocument();
|
431
|
+
expect(sortableTable).toBeVisible();
|
432
|
+
expect(sortableTable).toHaveAttribute('aria-label', 'Custom table with sortable content');
|
433
|
+
expect(sortableTable).toHaveAttribute('data-testid', dataTestId);
|
434
|
+
rowgroups = (0, _react2.within)(sortableTable).getAllByRole('rowgroup'); // verify first header column is sorted a -> z
|
435
|
+
thead = (0, _react2.within)(rowgroups[0]).getByRole('row');
|
436
|
+
headerCells = (0, _react2.within)(thead).getAllByRole('columnheader');
|
437
|
+
expect(headerCells[0]).toHaveTextContent('Country');
|
438
|
+
expect(headerCells[0]).toHaveAttribute('aria-sort', 'ascending');
|
439
|
+
tRows = (0, _react2.within)(rowgroups[1]).getAllByRole('row'); // verify country column is sorted a -> z
|
440
|
+
expect(tRows).toHaveLength(4);
|
441
|
+
expect(tRows[0]).toHaveAttribute('data-key', '2');
|
442
|
+
expect(tRows[0]).toHaveTextContent('Canada');
|
443
|
+
expect(tRows[1]).toHaveAttribute('data-key', '3');
|
444
|
+
expect(tRows[1]).toHaveTextContent('China');
|
445
|
+
expect(tRows[2]).toHaveAttribute('data-key', '4');
|
446
|
+
expect(tRows[2]).toHaveTextContent('France');
|
447
|
+
expect(tRows[3]).toHaveAttribute('data-key', '1');
|
448
|
+
expect(tRows[3]).toHaveTextContent('USA');
|
449
|
+
case 28:
|
450
|
+
case "end":
|
451
|
+
return _context5.stop();
|
452
|
+
}
|
453
|
+
}, _callee4);
|
454
|
+
})));
|
455
|
+
test('sort by country column Z => A', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
|
456
|
+
var _renderHook2, result, sortableTable, rowgroups, tRows;
|
457
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context10) {
|
458
|
+
while (1) switch (_context10.prev = _context10.next) {
|
459
|
+
case 0:
|
460
|
+
_renderHook2 = (0, _react2.renderHook)(function () {
|
461
|
+
return (0, _reactStately.useAsyncList)({
|
462
|
+
load: load,
|
463
|
+
sort: sort,
|
464
|
+
initialSortDescriptor: {
|
465
|
+
column: 'country',
|
466
|
+
direction: 'descending'
|
467
|
+
}
|
468
|
+
});
|
469
|
+
}), result = _renderHook2.result;
|
470
|
+
_context10.next = 3;
|
471
|
+
return (0, _react2.act)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
|
472
|
+
return _regeneratorRuntime().wrap(function _callee5$(_context6) {
|
473
|
+
while (1) switch (_context6.prev = _context6.next) {
|
474
|
+
case 0:
|
475
|
+
jest.runOnlyPendingTimers();
|
476
|
+
case 1:
|
477
|
+
case "end":
|
478
|
+
return _context6.stop();
|
479
|
+
}
|
480
|
+
}, _callee5);
|
481
|
+
})));
|
482
|
+
case 3:
|
483
|
+
_context10.next = 5;
|
484
|
+
return (0, _react2.act)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
|
485
|
+
var _context7;
|
486
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context8) {
|
487
|
+
while (1) switch (_context8.prev = _context8.next) {
|
488
|
+
case 0:
|
489
|
+
(0, _sort2["default"])(_context7 = result.current).call(_context7, {
|
490
|
+
column: 'country',
|
491
|
+
direction: 'descending'
|
492
|
+
});
|
493
|
+
case 1:
|
494
|
+
case "end":
|
495
|
+
return _context8.stop();
|
496
|
+
}
|
497
|
+
}, _callee6);
|
498
|
+
})));
|
499
|
+
case 5:
|
500
|
+
_context10.next = 7;
|
501
|
+
return (0, _react2.act)( /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
|
502
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context9) {
|
503
|
+
while (1) switch (_context9.prev = _context9.next) {
|
504
|
+
case 0:
|
505
|
+
jest.runOnlyPendingTimers();
|
506
|
+
case 1:
|
507
|
+
case "end":
|
508
|
+
return _context9.stop();
|
509
|
+
}
|
510
|
+
}, _callee7);
|
511
|
+
})));
|
512
|
+
case 7:
|
513
|
+
sortableDataTable({
|
514
|
+
result: result
|
515
|
+
});
|
516
|
+
sortableTable = _react2.screen.getByTestId(dataTestId);
|
517
|
+
expect(sortableTable).toBeInTheDocument();
|
518
|
+
expect(sortableTable).toBeVisible();
|
519
|
+
expect(sortableTable).toHaveAttribute('aria-label', 'Custom table with sortable content');
|
520
|
+
expect(sortableTable).toHaveAttribute('data-testid', dataTestId);
|
521
|
+
rowgroups = (0, _react2.within)(sortableTable).getAllByRole('rowgroup');
|
522
|
+
tRows = (0, _react2.within)(rowgroups[1]).getAllByRole('row'); // verify country column is sorted z -> a
|
523
|
+
expect(tRows).toHaveLength(4);
|
524
|
+
expect(tRows[0]).toHaveAttribute('data-key', '1');
|
525
|
+
expect(tRows[0]).toHaveTextContent('USA');
|
526
|
+
expect(tRows[1]).toHaveAttribute('data-key', '4');
|
527
|
+
expect(tRows[1]).toHaveTextContent('France');
|
528
|
+
expect(tRows[2]).toHaveAttribute('data-key', '3');
|
529
|
+
expect(tRows[2]).toHaveTextContent('China');
|
530
|
+
expect(tRows[3]).toHaveAttribute('data-key', '2');
|
531
|
+
expect(tRows[3]).toHaveTextContent('Canada');
|
532
|
+
case 24:
|
533
|
+
case "end":
|
534
|
+
return _context10.stop();
|
535
|
+
}
|
536
|
+
}, _callee8);
|
537
|
+
})));
|
271
538
|
});
|
@@ -42,9 +42,7 @@ var NextGenTableBase = function NextGenTableBase() {
|
|
42
42
|
additional_grant: '+25,000',
|
43
43
|
total_grant: '75,000'
|
44
44
|
}];
|
45
|
-
return (0, _react2.jsx)(_.
|
46
|
-
variant: "cards.tableWrapper"
|
47
|
-
}, (0, _react2.jsx)(_.TableBase, {
|
45
|
+
return (0, _react2.jsx)(_.TableBase, {
|
48
46
|
caption: "Lorem ipsum",
|
49
47
|
"aria-label": "table"
|
50
48
|
}, (0, _react2.jsx)(_.THead, {
|
@@ -61,7 +59,7 @@ var NextGenTableBase = function NextGenTableBase() {
|
|
61
59
|
}, function (columnKey) {
|
62
60
|
return (0, _react2.jsx)(_.Cell, null, item[columnKey]);
|
63
61
|
});
|
64
|
-
}))
|
62
|
+
}));
|
65
63
|
};
|
66
64
|
var _default = NextGenTableBase;
|
67
65
|
exports["default"] = _default;
|
@@ -12,6 +12,8 @@ declare const useGetTheme: () => {
|
|
12
12
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
13
13
|
pingLogoHorizontalSmall: import("react").JSX.Element;
|
14
14
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
15
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
16
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
15
17
|
};
|
16
18
|
styles: {
|
17
19
|
navButtonEstHeight: number;
|
@@ -4,5 +4,7 @@ declare const _default: {
|
|
4
4
|
MenuDown: import("@pingux/mdi-react").MdiReactIconComponentType;
|
5
5
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
6
6
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
7
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
7
9
|
};
|
8
10
|
export default _default;
|
@@ -5,6 +5,8 @@ export declare const nextGenDarkThemeValues: {
|
|
5
5
|
MenuDown: import("@pingux/mdi-react").MdiReactIconComponentType;
|
6
6
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
7
7
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
9
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
10
|
};
|
9
11
|
styles: {
|
10
12
|
navButtonEstHeight: number;
|
@@ -5,5 +5,7 @@ declare const _default: {
|
|
5
5
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
6
6
|
pingLogoHorizontalSmall: import("react").JSX.Element;
|
7
7
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
9
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
10
|
};
|
9
11
|
export default _default;
|
@@ -31,5 +31,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
31
31
|
var _default = (_MenuDown$MenuUp$stat = {
|
32
32
|
MenuDown: _MenuDownIcon["default"],
|
33
33
|
MenuUp: _MenuUpIcon["default"]
|
34
|
-
}, (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].DEFAULT, _InformationIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].ERROR, _AlertCircleIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].SUCCESS, _CheckCircleIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].WARNING, _AlertIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.INFO, _InformationOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.CRITICAL, _AlertCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MAJOR, _ArrowUpIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MINOR, _ArrowDownIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.WARNING_NEUTRAL, _AlertOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.FATAL, _CloseOctagonOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "pingLogoHorizontalSmall", _logos.pingLogoHorizontalSmallWhite), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "listViewMenu", _MoreVertIcon["default"]), _MenuDown$MenuUp$stat);
|
34
|
+
}, (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].DEFAULT, _InformationIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].ERROR, _AlertCircleIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].SUCCESS, _CheckCircleIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].WARNING, _AlertIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.INFO, _InformationOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.CRITICAL, _AlertCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MAJOR, _ArrowUpIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MINOR, _ArrowDownIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.WARNING_NEUTRAL, _AlertOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.FATAL, _CloseOctagonOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "pingLogoHorizontalSmall", _logos.pingLogoHorizontalSmallWhite), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "listViewMenu", _MoreVertIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "Ascending", _ArrowUpIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "Descending", _ArrowDownIcon["default"]), _MenuDown$MenuUp$stat);
|
35
35
|
exports["default"] = _default;
|
@@ -6,6 +6,8 @@ export declare const astroThemeValues: {
|
|
6
6
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
7
7
|
pingLogoHorizontalSmall: import("react").JSX.Element;
|
8
8
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
9
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
10
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
9
11
|
};
|
10
12
|
styles: {
|
11
13
|
navButtonEstHeight: number;
|
@@ -5,5 +5,7 @@ declare const _default: {
|
|
5
5
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
6
6
|
pingLogoHorizontalSmall: import("react").JSX.Element;
|
7
7
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
9
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
8
10
|
};
|
9
11
|
export default _default;
|
@@ -28,5 +28,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
28
28
|
var _default = (_MenuDown$MenuUp$stat = {
|
29
29
|
MenuDown: _ChevronDownIcon["default"],
|
30
30
|
MenuUp: _ChevronUpIcon["default"]
|
31
|
-
}, (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].DEFAULT, _InformationOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].ERROR, _AlertCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].SUCCESS, _CheckCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].WARNING, _AlertOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.INFO, _InformationOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.CRITICAL, _AlertCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MAJOR, _ArrowUpIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MINOR, _ArrowDownIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.WARNING_NEUTRAL, _AlertOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.FATAL, _CloseOctagonOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "pingLogoHorizontalSmall", _logos.pingLogoHorizontalSmall), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "listViewMenu", _DotsHorizontalIcon["default"]), _MenuDown$MenuUp$stat);
|
31
|
+
}, (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].DEFAULT, _InformationOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].ERROR, _AlertCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].SUCCESS, _CheckCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses["default"].WARNING, _AlertOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.INFO, _InformationOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.CRITICAL, _AlertCircleOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MAJOR, _ArrowUpIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.MINOR, _ArrowDownIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.WARNING_NEUTRAL, _AlertOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, _statuses.statusIcon.FATAL, _CloseOctagonOutlineIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "pingLogoHorizontalSmall", _logos.pingLogoHorizontalSmall), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "listViewMenu", _DotsHorizontalIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "Ascending", _ArrowUpIcon["default"]), (0, _defineProperty2["default"])(_MenuDown$MenuUp$stat, "Descending", _ArrowDownIcon["default"]), _MenuDown$MenuUp$stat);
|
32
32
|
exports["default"] = _default;
|
@@ -9,6 +9,8 @@ export declare const nextGenThemeValues: {
|
|
9
9
|
MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
|
10
10
|
pingLogoHorizontalSmall: import("react").JSX.Element;
|
11
11
|
listViewMenu: import("@pingux/mdi-react").MdiReactIconComponentType;
|
12
|
+
Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
13
|
+
Descending: import("@pingux/mdi-react").MdiReactIconComponentType;
|
12
14
|
};
|
13
15
|
tShirtSizes: {
|
14
16
|
xxs: string;
|
@@ -2594,7 +2594,6 @@ declare const _default: {
|
|
2594
2594
|
};
|
2595
2595
|
};
|
2596
2596
|
tableWrapper: {
|
2597
|
-
overflowY: string;
|
2598
2597
|
p: string;
|
2599
2598
|
borderColor: string;
|
2600
2599
|
boxShadow: string;
|
@@ -3841,9 +3840,9 @@ declare const _default: {
|
|
3841
3840
|
borderBottomColor: string;
|
3842
3841
|
backgroundColor: string;
|
3843
3842
|
'&:not(.has-caption)': {
|
3843
|
+
borderTopLeftRadius: string;
|
3844
|
+
borderTopRightRadius: string;
|
3844
3845
|
'& > tr:first-child': {
|
3845
|
-
borderTopLeftRadius: string;
|
3846
|
-
borderTopRightRadius: string;
|
3847
3846
|
'& > th:first-of-type': {
|
3848
3847
|
borderTopLeftRadius: string;
|
3849
3848
|
};
|
@@ -3870,6 +3869,8 @@ declare const _default: {
|
|
3870
3869
|
borderTopColor: string;
|
3871
3870
|
borderBottom: string;
|
3872
3871
|
backgroundColor: string;
|
3872
|
+
borderBottomLeftRadius: string;
|
3873
|
+
borderBottomRightRadius: string;
|
3873
3874
|
'& > tr:last-child': {
|
3874
3875
|
borderBottom: string;
|
3875
3876
|
borderBottomLeftRadius: string;
|
@@ -3966,6 +3967,9 @@ declare const _default: {
|
|
3966
3967
|
stroke: string;
|
3967
3968
|
};
|
3968
3969
|
};
|
3970
|
+
'&.is-focused': {
|
3971
|
+
boxShadow: string;
|
3972
|
+
};
|
3969
3973
|
};
|
3970
3974
|
};
|
3971
3975
|
};
|
@@ -82,9 +82,7 @@ var suggestionRow = _objectSpread(_objectSpread({}, baseSuggestion), {}, {
|
|
82
82
|
var suggestionColumn = _objectSpread(_objectSpread({}, baseSuggestion), {}, {
|
83
83
|
display: 'flex'
|
84
84
|
});
|
85
|
-
var tableWrapper = _objectSpread(
|
86
|
-
overflowY: 'hidden'
|
87
|
-
});
|
85
|
+
var tableWrapper = _objectSpread({}, container);
|
88
86
|
var _default = {
|
89
87
|
interactive: interactive,
|
90
88
|
dark: dark,
|
@@ -30,9 +30,9 @@ export declare const tableBase: {
|
|
30
30
|
borderBottomColor: string;
|
31
31
|
backgroundColor: string;
|
32
32
|
'&:not(.has-caption)': {
|
33
|
+
borderTopLeftRadius: string;
|
34
|
+
borderTopRightRadius: string;
|
33
35
|
'& > tr:first-child': {
|
34
|
-
borderTopLeftRadius: string;
|
35
|
-
borderTopRightRadius: string;
|
36
36
|
'& > th:first-of-type': {
|
37
37
|
borderTopLeftRadius: string;
|
38
38
|
};
|
@@ -59,6 +59,8 @@ export declare const tableBase: {
|
|
59
59
|
borderTopColor: string;
|
60
60
|
borderBottom: string;
|
61
61
|
backgroundColor: string;
|
62
|
+
borderBottomLeftRadius: string;
|
63
|
+
borderBottomRightRadius: string;
|
62
64
|
'& > tr:last-child': {
|
63
65
|
borderBottom: string;
|
64
66
|
borderBottomLeftRadius: string;
|
@@ -48,9 +48,9 @@ var thead = {
|
|
48
48
|
borderBottomColor: 'border.base',
|
49
49
|
backgroundColor: 'background.base',
|
50
50
|
'&:not(.has-caption)': {
|
51
|
+
borderTopLeftRadius: borderRadius,
|
52
|
+
borderTopRightRadius: borderRadius,
|
51
53
|
'& > tr:first-child': {
|
52
|
-
borderTopLeftRadius: borderRadius,
|
53
|
-
borderTopRightRadius: borderRadius,
|
54
54
|
'& > th:first-of-type': {
|
55
55
|
borderTopLeftRadius: borderRadius
|
56
56
|
},
|
@@ -73,6 +73,8 @@ var tbody = {
|
|
73
73
|
borderTopColor: 'border.base',
|
74
74
|
borderBottom: 'unset',
|
75
75
|
backgroundColor: 'background.base',
|
76
|
+
borderBottomLeftRadius: borderRadius,
|
77
|
+
borderBottomRightRadius: borderRadius,
|
76
78
|
'& > tr:last-child': {
|
77
79
|
borderBottom: 'unset',
|
78
80
|
borderBottomLeftRadius: borderRadius,
|
@@ -1440,9 +1440,9 @@ declare const _default: {
|
|
1440
1440
|
borderBottomColor: string;
|
1441
1441
|
backgroundColor: string;
|
1442
1442
|
'&:not(.has-caption)': {
|
1443
|
+
borderTopLeftRadius: string;
|
1444
|
+
borderTopRightRadius: string;
|
1443
1445
|
'& > tr:first-child': {
|
1444
|
-
borderTopLeftRadius: string;
|
1445
|
-
borderTopRightRadius: string;
|
1446
1446
|
'& > th:first-of-type': {
|
1447
1447
|
borderTopLeftRadius: string;
|
1448
1448
|
};
|
@@ -1469,6 +1469,8 @@ declare const _default: {
|
|
1469
1469
|
borderTopColor: string;
|
1470
1470
|
borderBottom: string;
|
1471
1471
|
backgroundColor: string;
|
1472
|
+
borderBottomLeftRadius: string;
|
1473
|
+
borderBottomRightRadius: string;
|
1472
1474
|
'& > tr:last-child': {
|
1473
1475
|
borderBottom: string;
|
1474
1476
|
borderBottomLeftRadius: string;
|
@@ -1565,6 +1567,9 @@ declare const _default: {
|
|
1565
1567
|
stroke: string;
|
1566
1568
|
};
|
1567
1569
|
};
|
1570
|
+
'&.is-focused': {
|
1571
|
+
boxShadow: string;
|
1572
|
+
};
|
1568
1573
|
};
|
1569
1574
|
};
|
1570
1575
|
};
|
@@ -19,6 +19,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
|
|
19
19
|
var _Attachment = _interopRequireDefault(require("../../../../components/AIComponents/Attachment/Attachment.styles"));
|
20
20
|
var _Skeleton = _interopRequireDefault(require("../../../../components/Skeleton/Skeleton.styles"));
|
21
21
|
var _codeView = _interopRequireDefault(require("../codeView/codeView"));
|
22
|
+
var _colors = _interopRequireDefault(require("../colors/colors"));
|
22
23
|
var _avatar = require("./avatar");
|
23
24
|
var _button = _interopRequireWildcard(require("./button"));
|
24
25
|
var _callout = _interopRequireDefault(require("./callout"));
|
@@ -469,6 +470,9 @@ var _default = {
|
|
469
470
|
fill: 'gray-500',
|
470
471
|
stroke: 'gray-500'
|
471
472
|
}
|
473
|
+
},
|
474
|
+
'&.is-focused': {
|
475
|
+
boxShadow: "inset 0px 0px 0px 1px ".concat(_colors["default"].focus)
|
472
476
|
}
|
473
477
|
}
|
474
478
|
}
|
@@ -1,9 +1,11 @@
|
|
1
|
+
import { focus } from '../../styles/colors';
|
1
2
|
var base = {
|
2
3
|
display: 'flex'
|
3
4
|
};
|
4
5
|
var indeterminateCheckboxIcon = {
|
5
6
|
width: '24px',
|
6
7
|
height: '24px',
|
8
|
+
borderRadius: '4px',
|
7
9
|
'& rect[id="indeterminate-checkbox-icon-wrapper"]': {
|
8
10
|
fill: 'active',
|
9
11
|
stroke: 'active'
|
@@ -13,6 +15,9 @@ var indeterminateCheckboxIcon = {
|
|
13
15
|
fill: 'neutral.80',
|
14
16
|
stroke: 'neutral.80'
|
15
17
|
}
|
18
|
+
},
|
19
|
+
'&.is-focused': {
|
20
|
+
boxShadow: "inset 0px 0px 0px 1px ".concat(focus)
|
16
21
|
}
|
17
22
|
};
|
18
23
|
export default {
|