@pingux/astro 2.71.0-alpha.1 → 2.71.0-alpha.2

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.
@@ -5,12 +5,14 @@ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/obje
5
5
  var _Symbol = require("@babel/runtime-corejs3/core-js-stable/symbol");
6
6
  var _Object$create = require("@babel/runtime-corejs3/core-js-stable/object/create");
7
7
  var _Object$getPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/get-prototype-of");
8
- var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
8
+ var _forEachInstanceProperty2 = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
9
9
  var _Object$setPrototypeOf = require("@babel/runtime-corejs3/core-js-stable/object/set-prototype-of");
10
10
  var _Promise = require("@babel/runtime-corejs3/core-js-stable/promise");
11
11
  var _reverseInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/reverse");
12
12
  var _sliceInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/slice");
13
13
  var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
14
+ var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
15
+ var _isArray = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/is-array"));
14
16
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/asyncToGenerator"));
15
17
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
16
18
  var _react = _interopRequireDefault(require("react"));
@@ -20,7 +22,7 @@ var _statuses = _interopRequireDefault(require("../../utils/devUtils/constants/s
20
22
  var _testWrapper = require("../../utils/testUtils/testWrapper");
21
23
  var _universalComponentTest = require("../../utils/testUtils/universalComponentTest");
22
24
  var _react2 = require("@emotion/react");
23
- 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 _context3; _forEachInstanceProperty(_context3 = ["next", "throw", "return"]).call(_context3, 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" }], _forEachInstanceProperty(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 _context4; if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, _forEachInstanceProperty(_context4 = this.tryEntries).call(_context4, 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; }
25
+ 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 _context3; _forEachInstanceProperty2(_context3 = ["next", "throw", "return"]).call(_context3, 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 _context4; 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(_context4 = this.tryEntries).call(_context4, 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; }
24
26
  var items = [{
25
27
  id: 1,
26
28
  name: 'Aardvark',
@@ -34,10 +36,33 @@ var items = [{
34
36
  name: 'Snake',
35
37
  key: 'Snake'
36
38
  }];
39
+ var withSection = [{
40
+ name: 'Animals',
41
+ key: 'Animals',
42
+ children: [{
43
+ name: 'Option A1'
44
+ }, {
45
+ name: 'Option A2'
46
+ }]
47
+ }, {
48
+ name: 'People',
49
+ key: 'People',
50
+ children: [{
51
+ name: 'Option B1'
52
+ }, {
53
+ name: 'Option B2'
54
+ }, {
55
+ name: 'Option B3'
56
+ }]
57
+ }];
37
58
  var defaultProps = {
38
59
  items: items,
39
60
  label: 'Field Label'
40
61
  };
62
+ var defaultSectionProps = {
63
+ items: withSection,
64
+ label: 'Field Label'
65
+ };
41
66
  var getComponent = function getComponent() {
42
67
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
43
68
  var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
@@ -64,6 +89,25 @@ var getComponentInForm = function getComponentInForm(onFormSubmit) {
64
89
  }, item.name);
65
90
  }))));
66
91
  };
92
+ var getSectionsComponent = function getSectionsComponent() {
93
+ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
94
+ var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
95
+ _ref3$renderFn = _ref3.renderFn,
96
+ renderFn = _ref3$renderFn === void 0 ? _testWrapper.render : _ref3$renderFn;
97
+ return renderFn((0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.MultivaluesField, (0, _extends2["default"])({}, defaultSectionProps, props, {
98
+ mode: "condensed"
99
+ }), function (section) {
100
+ return (0, _react2.jsx)(_index.Section, {
101
+ key: section.key,
102
+ items: section.children,
103
+ title: section.name
104
+ }, function (item) {
105
+ return (0, _react2.jsx)(_index.Item, {
106
+ key: item.name
107
+ }, item.name);
108
+ });
109
+ })));
110
+ };
67
111
  beforeAll(function () {
68
112
  jest.spyOn(window.HTMLElement.prototype, 'clientWidth', 'get').mockImplementation(function () {
69
113
  return 1000;
@@ -733,6 +777,211 @@ test('in non-restrictive mode the partial string values should be accepted', fun
733
777
  expect(input).not.toHaveValue('');
734
778
  expect(input).toHaveValue(value);
735
779
  });
780
+ test('in condensed mode selects and deselects ', function () {
781
+ getComponent({
782
+ mode: 'condensed'
783
+ });
784
+ _userEvent["default"].tab();
785
+ var listbox = _testWrapper.screen.getByRole('listbox');
786
+ var options = (0, _testWrapper.within)(listbox).getAllByRole('option');
787
+ var firstOption = options[0];
788
+ var buttons = _testWrapper.screen.getAllByRole('button');
789
+ var button = buttons[1];
790
+ expect(button).toHaveTextContent('Select All');
791
+ button.click();
792
+ expect(button).toHaveTextContent('Deselect All');
793
+ expect(_testWrapper.screen.getByText('All Selected')).toBeInTheDocument();
794
+ firstOption.click();
795
+ expect(button).toHaveTextContent('Select All');
796
+ expect(_testWrapper.screen.getByText('2 Selected')).toBeInTheDocument();
797
+ button.click();
798
+ expect(button).toHaveTextContent('Deselect All');
799
+ button.click();
800
+ expect(button).toHaveTextContent('Select All');
801
+ });
802
+ test('in condensed mode "onSelectionChange" is called', function () {
803
+ var onSelectionChange = jest.fn();
804
+ getComponent({
805
+ mode: 'condensed',
806
+ onSelectionChange: onSelectionChange
807
+ });
808
+ var input = _testWrapper.screen.getByRole('combobox');
809
+ var value = 'Aardvark';
810
+ _userEvent["default"].type(input, value);
811
+ var option = (0, _testWrapper.within)(_testWrapper.screen.getByRole('listbox')).getByRole('option');
812
+ _userEvent["default"].click(option);
813
+ expect(_testWrapper.screen.getByText('1 Selected')).toBeInTheDocument();
814
+ expect(onSelectionChange).toBeCalledTimes(1);
815
+ expect(onSelectionChange.mock.calls[0][0].has(value)).toBeTruthy();
816
+ });
817
+ test('opening and closing listbox fires "onOpenChange" in condensed mode', function () {
818
+ var onOpenChange = jest.fn();
819
+ getComponent({
820
+ mode: 'condensed',
821
+ onOpenChange: onOpenChange
822
+ });
823
+ var input = _testWrapper.screen.getByRole('combobox');
824
+ _userEvent["default"].tab();
825
+ expect(input).toHaveFocus();
826
+ expect(_testWrapper.screen.queryByRole('listbox')).toBeInTheDocument();
827
+ expect(onOpenChange).toHaveBeenCalledWith(true);
828
+ input.blur();
829
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
830
+ expect(onOpenChange).toHaveBeenCalledWith(false);
831
+ });
832
+ test('selected keys in condensed mode ', function () {
833
+ getComponent({
834
+ mode: 'condensed',
835
+ selectedKeys: [items[1].key, items[2].key]
836
+ });
837
+ var listbox = _testWrapper.screen.queryByRole('listbox');
838
+ expect(listbox).not.toBeInTheDocument();
839
+ expect(_testWrapper.screen.getByText('2 Selected')).toBeInTheDocument();
840
+ });
841
+ test('default selected keys in condensed mode ', function () {
842
+ getComponent({
843
+ mode: 'condensed',
844
+ defaultSelectedKeys: [items[1].key, items[2].key]
845
+ });
846
+ var listbox = _testWrapper.screen.queryByRole('listbox');
847
+ expect(listbox).not.toBeInTheDocument();
848
+ expect(_testWrapper.screen.getByText('2 Selected')).toBeInTheDocument();
849
+ });
850
+ test('onInputChange is called in condensed mode ', function () {
851
+ var onInputChange = jest.fn();
852
+ getComponent({
853
+ mode: 'condensed',
854
+ onInputChange: onInputChange
855
+ });
856
+ var input = _testWrapper.screen.getByRole('combobox');
857
+ var value = 'Aardvark';
858
+ _userEvent["default"].type(input, value);
859
+ var listbox = _testWrapper.screen.getByRole('listbox');
860
+ expect(listbox).toBeInTheDocument();
861
+ var options = (0, _testWrapper.within)(listbox).getAllByRole('option');
862
+ expect(options.length).toBe(1);
863
+ expect(onInputChange).toBeCalledTimes(value.length);
864
+ expect(onInputChange).toHaveBeenCalledWith(value);
865
+ });
866
+ test('opens listbox on focus and fires "onFocus', function () {
867
+ var onFocus = jest.fn();
868
+ getComponent({
869
+ mode: 'condensed',
870
+ onFocus: onFocus
871
+ });
872
+ var input = _testWrapper.screen.getByRole('combobox');
873
+ _userEvent["default"].tab();
874
+ expect(input).toHaveFocus();
875
+ expect(_testWrapper.screen.getByRole('listbox')).toBeInTheDocument();
876
+ var options = _testWrapper.screen.getAllByRole('option');
877
+ expect(options.length).toBe(items.length);
878
+ expect(options[0]).toHaveTextContent(items[0].name);
879
+ expect(onFocus).toBeCalled();
880
+ });
881
+ test('closes listbox on blur and fires "onBlur"', function () {
882
+ var onBlur = jest.fn();
883
+ getComponent({
884
+ mode: 'condensed',
885
+ onBlur: onBlur
886
+ });
887
+ var input = _testWrapper.screen.getByRole('combobox');
888
+ _userEvent["default"].tab();
889
+ expect(input).toHaveFocus();
890
+ expect(_testWrapper.screen.queryByRole('listbox')).toBeInTheDocument();
891
+ input.blur();
892
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
893
+ expect(onBlur).toBeCalled();
894
+ });
895
+ test('list and button are keyboard accessible', function () {
896
+ getComponent({
897
+ mode: 'condensed'
898
+ });
899
+ _userEvent["default"].tab();
900
+ var listbox = _testWrapper.screen.getByRole('listbox');
901
+ var options = (0, _testWrapper.within)(listbox).getAllByRole('option');
902
+ var firstOption = options[0];
903
+ var secondOption = options[1];
904
+ var buttons = _testWrapper.screen.getAllByRole('button');
905
+ var button = buttons[1];
906
+ _userEvent["default"].tab();
907
+ expect(button).toHaveFocus();
908
+ _userEvent["default"].tab();
909
+ expect(firstOption).toHaveFocus();
910
+ _userEvent["default"].type(firstOption, '{arrowdown}', {
911
+ skipClick: true
912
+ });
913
+ expect(secondOption).toHaveFocus();
914
+ _userEvent["default"].type(secondOption, '{esc}', {
915
+ skipClick: true
916
+ });
917
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
918
+ });
919
+ test('popover closes on input blur', function () {
920
+ getComponent({
921
+ mode: 'condensed'
922
+ });
923
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
924
+ expect(_testWrapper.screen.queryByRole('option')).not.toBeInTheDocument();
925
+ var input = _testWrapper.screen.getByRole('combobox');
926
+ _userEvent["default"].click(input);
927
+ var listbox = _testWrapper.screen.getByRole('listbox');
928
+ var options = (0, _testWrapper.within)(listbox).getAllByRole('option');
929
+ var checkboxes = (0, _testWrapper.within)(listbox).getAllByRole('img');
930
+ expect(checkboxes.length).toBe(3);
931
+ var secondOption = options[1];
932
+ secondOption.click();
933
+ var value = 'Aardvark';
934
+ _userEvent["default"].type(input, value);
935
+ _userEvent["default"].click(document.body);
936
+ expect(input).toHaveValue('');
937
+ expect(listbox).not.toBeInTheDocument();
938
+ });
939
+ test('trigger button handles popover open and close in condensed', function () {
940
+ getComponent({
941
+ mode: 'condensed'
942
+ });
943
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
944
+ var input = _testWrapper.screen.getByRole('combobox');
945
+ _userEvent["default"].click(_testWrapper.screen.getAllByRole('button')[0]);
946
+ expect(_testWrapper.screen.queryByRole('listbox')).toBeInTheDocument();
947
+ expect(input).toHaveFocus();
948
+ _userEvent["default"].tab();
949
+ _testWrapper.fireEvent.click(_testWrapper.screen.getAllByRole('button')[0]);
950
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
951
+ });
952
+ test('should render items with sections passed in props', function () {
953
+ getSectionsComponent();
954
+ expect(_testWrapper.screen.queryByRole('listbox')).not.toBeInTheDocument();
955
+ expect(_testWrapper.screen.queryByRole('option')).not.toBeInTheDocument();
956
+ var input = _testWrapper.screen.getByRole('combobox');
957
+ _userEvent["default"].click(input);
958
+ expect(_testWrapper.screen.getAllByRole('group')).toHaveLength(2);
959
+ expect(_testWrapper.screen.queryByRole('listbox')).toBeInTheDocument();
960
+ expect(_testWrapper.screen.queryAllByRole('option')).toHaveLength(5);
961
+ });
962
+ test('should render the separators', function () {
963
+ getSectionsComponent();
964
+ var input = _testWrapper.screen.getByRole('combobox');
965
+ _userEvent["default"].click(input);
966
+ expect(_testWrapper.screen.queryAllByRole('separator')).toHaveLength(3);
967
+ var groups = _testWrapper.screen.getAllByRole('group');
968
+ expect(groups).toHaveLength(2);
969
+ expect(_testWrapper.screen.queryByRole('listbox')).toBeInTheDocument();
970
+ expect(_testWrapper.screen.queryAllByRole('option')).toHaveLength(5);
971
+ (0, _forEach["default"])(groups).call(groups, function (group, index) {
972
+ expect(function () {
973
+ return (0, _testWrapper.within)(group).getByText(withSection[index].name);
974
+ });
975
+ var itemOpt = withSection[index].options;
976
+ if ((0, _isArray["default"])(itemOpt)) {
977
+ (0, _forEach["default"])(itemOpt).call(itemOpt, function (opt) {
978
+ return expect(function () {
979
+ return (0, _testWrapper.within)(group).getByText(opt.name);
980
+ });
981
+ });
982
+ }
983
+ });
984
+ });
736
985
 
737
986
  // Needs to be added to each components test file
738
987
  (0, _universalComponentTest.universalComponentTests)({
@@ -5,6 +5,7 @@ import { VirtualizerItemOptions } from '@react-aria/virtualizer';
5
5
  import { ReusableView } from '@react-stately/virtualizer';
6
6
  import type { CollectionChildren, FocusStrategy } from '@react-types/shared';
7
7
  import { BoxProps } from './box';
8
+ import { StyleProps } from './shared';
8
9
  export interface ComboBoxStateType extends ComboBoxState<object> {
9
10
  focusStrategy: FocusStrategy;
10
11
  }
@@ -29,10 +30,15 @@ export interface ListBoxProps extends AriaListBoxOptions<object> {
29
30
  renderEmptyState?: React.ReactNode;
30
31
  variant?: string;
31
32
  children?: CollectionChildren<object>;
33
+ isCondensed?: boolean;
32
34
  }
33
35
  export interface OptionType {
34
36
  item: ListBoxItemType;
35
37
  hasVirtualFocus?: boolean;
38
+ isCondensed?: boolean;
39
+ }
40
+ export interface OptionWithCheckboxType extends StyleProps {
41
+ isSelected?: boolean;
36
42
  }
37
43
  export interface AriaListBoxOptionsType extends AriaOptionProps {
38
44
  onPressStart: () => void;
@@ -8,7 +8,7 @@ import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object
8
8
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
9
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
10
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
11
- var _excluded = ["defaultSelectedKeys", "disabledKeys", "hasAutoFocus", "hasFocusWrap", "hasNoEmptySelection", "hasVirtualFocus", "id", "isLoading", "isFocusedOnHover", "isSelectedOnPressUp", "isVirtualized", "items", "keyboardDelegate", "label", "onLoadMore", "onScroll", "onSelectionChange", "renderEmptyState", "selectedKeys", "selectionMode", "state", "aria-label", "aria-labelledby", "aria-describedby", "aria-details"];
11
+ var _excluded = ["defaultSelectedKeys", "disabledKeys", "hasAutoFocus", "hasFocusWrap", "hasNoEmptySelection", "hasVirtualFocus", "id", "isCondensed", "isLoading", "isFocusedOnHover", "isSelectedOnPressUp", "isVirtualized", "items", "keyboardDelegate", "label", "onLoadMore", "onScroll", "onSelectionChange", "renderEmptyState", "selectedKeys", "selectionMode", "state", "aria-label", "aria-labelledby", "aria-describedby", "aria-details"];
12
12
  import _findInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/find";
13
13
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
14
14
  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; }
@@ -58,6 +58,7 @@ var ListBox = /*#__PURE__*/forwardRef(function (props, ref) {
58
58
  hasNoEmptySelection = props.hasNoEmptySelection,
59
59
  hasVirtualFocus = props.hasVirtualFocus,
60
60
  id = props.id,
61
+ isCondensed = props.isCondensed,
61
62
  isLoading = props.isLoading,
62
63
  isFocusedOnHover = props.isFocusedOnHover,
63
64
  isSelectedOnPressUp = props.isSelectedOnPressUp,
@@ -162,7 +163,8 @@ var ListBox = /*#__PURE__*/forwardRef(function (props, ref) {
162
163
  return ___EmotionJSX(Option, {
163
164
  key: item.key,
164
165
  item: item,
165
- hasVirtualFocus: hasVirtualFocus
166
+ hasVirtualFocus: hasVirtualFocus,
167
+ isCondensed: isCondensed
166
168
  });
167
169
  }
168
170
  if (type === collectionTypes.LOADER) {
@@ -26,8 +26,28 @@ listBox.option = _objectSpread(_objectSpread({}, text.base), {}, {
26
26
  '&.is-focused': {
27
27
  color: 'white',
28
28
  bg: 'active'
29
+ },
30
+ '&.is-condensed': {
31
+ '&.is-selected': {
32
+ pl: 'md',
33
+ color: 'text.primary',
34
+ fontWeight: 400
35
+ },
36
+ '&.is-focused': {
37
+ color: 'text.primary',
38
+ fontWeight: 400,
39
+ bg: 'white'
40
+ }
29
41
  }
30
42
  });
43
+ listBox.checkboxIcon = {
44
+ '&.is-focus-visible': {
45
+ boxShadow: 'none',
46
+ outline: '1px solid',
47
+ outlineColor: 'focus',
48
+ outlineOffset: '0px'
49
+ }
50
+ };
31
51
  listBox.selectField = {
32
52
  maxHeight: '200px',
33
53
  overflow: 'auto',
@@ -6,10 +6,10 @@ import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/inst
6
6
  import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
7
7
  import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
8
8
  import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
9
- import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
9
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
10
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
12
- var _excluded = ["item", "hasVirtualFocus"],
11
+ import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
12
+ var _excluded = ["item", "hasVirtualFocus", "isCondensed"],
13
13
  _excluded2 = ["onPressStart", "onPressUp"];
14
14
  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; }
15
15
  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) { _defineProperty(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; }
@@ -22,10 +22,39 @@ import Box from '../Box';
22
22
  import Icon from '../Icon';
23
23
  import { ListBoxContext } from './ListBoxContext';
24
24
  import { jsx as ___EmotionJSX } from "@emotion/react";
25
+ var UncheckedIcon = function UncheckedIcon(prop) {
26
+ return ___EmotionJSX("svg", _extends({
27
+ width: "24",
28
+ height: "24",
29
+ viewBox: "0 0 24 24",
30
+ fill: "none",
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ "aria-labelledby": "variable-icon-title"
33
+ }, prop), ___EmotionJSX("title", {
34
+ id: "variable-icon-title"
35
+ }, "Unchecked Icon"), ___EmotionJSX("path", {
36
+ d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
37
+ }));
38
+ };
39
+ var CheckedIcon = function CheckedIcon(prop) {
40
+ return ___EmotionJSX("svg", _extends({
41
+ width: "24",
42
+ height: "24",
43
+ viewBox: "0 0 24 24",
44
+ fill: "none",
45
+ xmlns: "http://www.w3.org/2000/svg",
46
+ "aria-labelledby": "variable-icon-title"
47
+ }, prop), ___EmotionJSX("title", {
48
+ id: "variable-icon-title"
49
+ }, "Checked Icon"), ___EmotionJSX("path", {
50
+ d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
51
+ }));
52
+ };
25
53
  var Option = /*#__PURE__*/forwardRef(function (props, ref) {
26
54
  var _state$selectionManag;
27
55
  var item = props.item,
28
56
  hasVirtualFocus = props.hasVirtualFocus,
57
+ isCondensed = props.isCondensed,
29
58
  others = _objectWithoutProperties(props, _excluded);
30
59
  var key = item.key,
31
60
  itemProps = item.props,
@@ -43,24 +72,27 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
43
72
  var _useOption = useOption(_objectSpread({
44
73
  key: key,
45
74
  shouldSelectOnPressUp: true,
46
- shouldFocusOnHover: true,
47
- shouldUseVirtualFocus: hasVirtualFocus,
75
+ shouldFocusOnHover: !isCondensed,
76
+ shouldUseVirtualFocus: isCondensed ? false : hasVirtualFocus,
48
77
  isVirtualized: true
49
78
  }, others), state, optionRef),
50
79
  optionProps = _useOption.optionProps,
51
80
  isDisabled = _useOption.isDisabled,
52
81
  isSelected = _useOption.isSelected,
53
- isFocused = _useOption.isFocused;
82
+ isFocused = _useOption.isFocused,
83
+ isFocusVisible = _useOption.isFocusVisible;
54
84
  var focused = isFocused || (state === null || state === void 0 || (_state$selectionManag = state.selectionManager) === null || _state$selectionManag === void 0 ? void 0 : _state$selectionManag.focusedKey) === item.key;
55
85
  var setFocusOnHover = function setFocusOnHover() {
56
- if (!focused) {
86
+ if (!focused && !isCondensed) {
57
87
  state.selectionManager.setFocusedKey(item.key);
58
88
  }
59
89
  };
60
90
  var _useStatusClasses = useStatusClasses(null, {
61
91
  isDisabled: isDisabled || isSeparator,
62
92
  isFocused: focused,
63
- isSelected: isSelected
93
+ isSelected: isSelected,
94
+ isCondensed: isCondensed,
95
+ isFocusVisible: isFocusVisible
64
96
  }),
65
97
  classNames = _useStatusClasses.classNames;
66
98
  var updateActiveDescendant = useMultivaluesContext();
@@ -87,7 +119,14 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
87
119
  onPointerOver: setFocusOnHover
88
120
  }, theseOptionProps, others, {
89
121
  "aria-label": ariaLabel
90
- }), isSelected && ___EmotionJSX(Icon, {
122
+ }), isCondensed ? ___EmotionJSX(Icon, {
123
+ icon: isSelected ? CheckedIcon : UncheckedIcon,
124
+ color: "active",
125
+ size: "24px",
126
+ mr: "xs",
127
+ className: classNames,
128
+ variant: "listBox.checkboxIcon"
129
+ }) : isSelected && ___EmotionJSX(Icon, {
91
130
  icon: CircleSmallIcon,
92
131
  title: {
93
132
  name: 'Circle Small Icon'