grommet 2.48.0 → 2.50.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.
Files changed (157) hide show
  1. package/components/AccordionPanel/AccordionPanel.js +3 -6
  2. package/components/Anchor/StyledAnchor.js +1 -1
  3. package/components/Box/StyledBox.js +1 -1
  4. package/components/Button/BusyAnimation.js +5 -1
  5. package/components/Button/Button.js +3 -1
  6. package/components/Calendar/Calendar.js +7 -10
  7. package/components/Cards/Cards.js +3 -4
  8. package/components/Chart/Chart.js +11 -9
  9. package/components/Chart/calcs.js +21 -13
  10. package/components/CheckBox/CheckBox.js +1 -1
  11. package/components/CheckBoxGroup/CheckBoxGroup.js +2 -3
  12. package/components/Data/Data.js +5 -1
  13. package/components/Data/DataForm.js +6 -4
  14. package/components/Data/stories/Infinite.stories.js +10 -15
  15. package/components/Data/stories/OnSelect.stories.js +10 -15
  16. package/components/Data/stories/SpaceX.stories.js +10 -15
  17. package/components/Data/stories/StarWars.stories.js +6 -8
  18. package/components/DataChart/DataChart.js +14 -12
  19. package/components/DataChart/Detail.js +2 -2
  20. package/components/DataChart/Legend.js +8 -9
  21. package/components/DataChart/utils.js +15 -8
  22. package/components/DataFilter/DataFilter.js +10 -9
  23. package/components/DataFilters/DataFilters.js +9 -10
  24. package/components/DataSearch/DataSearch.js +5 -4
  25. package/components/DataSort/DataSort.js +4 -3
  26. package/components/DataSummary/DataSummary.js +6 -6
  27. package/components/DataTable/ExpanderCell.js +6 -3
  28. package/components/DataTable/Footer.js +6 -3
  29. package/components/DataTable/Header.js +6 -3
  30. package/components/DataTable/Resizer.js +22 -8
  31. package/components/DataTable/Searcher.js +5 -7
  32. package/components/DataTable/stories/ResizePinned.stories.js +321 -0
  33. package/components/DataTable/stories/SpaceX.stories.js +15 -16
  34. package/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
  35. package/components/DataTable/stories/rowDetails.stories.js +6 -8
  36. package/components/DataTableColumns/DataTableColumns.js +24 -22
  37. package/components/DateInput/DateInput.js +7 -6
  38. package/components/Distribution/Distribution.js +8 -5
  39. package/components/FileInput/FileInput.js +41 -36
  40. package/components/Footer/Footer.js +5 -1
  41. package/components/Header/Header.js +2 -2
  42. package/components/Layer/Layer.js +10 -5
  43. package/components/Layer/StyledLayer.js +2 -2
  44. package/components/List/List.js +5 -4
  45. package/components/MaskedInput/MaskedInput.js +6 -1
  46. package/components/Menu/Menu.js +13 -1
  47. package/components/Meter/Bar.js +38 -17
  48. package/components/Meter/Circle.js +31 -46
  49. package/components/Meter/stories/Circle.stories.js +6 -8
  50. package/components/Meter/utils.js +15 -1
  51. package/components/Nav/Nav.js +5 -1
  52. package/components/Notification/Notification.js +6 -8
  53. package/components/Pagination/Pagination.js +5 -10
  54. package/components/Pagination/PaginationStep.js +2 -1
  55. package/components/Paragraph/ParagraphSkeleton.js +2 -1
  56. package/components/RadioButton/RadioButton.js +1 -1
  57. package/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
  58. package/components/RangeSelector/RangeSelector.js +2 -6
  59. package/components/Select/SelectContainer.js +2 -1
  60. package/components/SelectMultiple/SelectMultipleContainer.js +8 -4
  61. package/components/SelectMultiple/SelectMultipleValue.js +5 -7
  62. package/components/SelectMultiple/SelectionSummary.js +7 -8
  63. package/components/Sidebar/Sidebar.js +6 -3
  64. package/components/Spinner/Spinner.js +7 -4
  65. package/components/StarRating/StarRating.js +8 -5
  66. package/components/Tab/Tab.js +2 -1
  67. package/components/Table/StyledTable.js +2 -2
  68. package/components/Tabs/Tabs.js +8 -12
  69. package/components/Tag/StyledTag.js +9 -1
  70. package/components/TextInput/CopyButton.js +3 -2
  71. package/components/TextInput/TextInput.js +5 -0
  72. package/components/ThumbsRating/ThumbsRating.js +15 -10
  73. package/components/Toolbar/Toolbar.js +15 -11
  74. package/components/Video/Video.js +3 -5
  75. package/es6/components/AccordionPanel/AccordionPanel.js +3 -6
  76. package/es6/components/Anchor/StyledAnchor.js +2 -2
  77. package/es6/components/Box/StyledBox.js +1 -1
  78. package/es6/components/Button/BusyAnimation.js +5 -1
  79. package/es6/components/Button/Button.js +3 -1
  80. package/es6/components/Calendar/Calendar.js +7 -10
  81. package/es6/components/Cards/Cards.js +3 -4
  82. package/es6/components/Chart/Chart.js +11 -9
  83. package/es6/components/Chart/calcs.js +21 -13
  84. package/es6/components/CheckBox/CheckBox.js +1 -1
  85. package/es6/components/CheckBoxGroup/CheckBoxGroup.js +2 -3
  86. package/es6/components/Data/Data.js +5 -1
  87. package/es6/components/Data/DataForm.js +6 -4
  88. package/es6/components/Data/stories/Infinite.stories.js +10 -15
  89. package/es6/components/Data/stories/OnSelect.stories.js +10 -15
  90. package/es6/components/Data/stories/SpaceX.stories.js +10 -15
  91. package/es6/components/Data/stories/StarWars.stories.js +6 -8
  92. package/es6/components/DataChart/DataChart.js +14 -12
  93. package/es6/components/DataChart/Detail.js +2 -2
  94. package/es6/components/DataChart/Legend.js +8 -9
  95. package/es6/components/DataChart/utils.js +15 -8
  96. package/es6/components/DataFilter/DataFilter.js +10 -9
  97. package/es6/components/DataFilters/DataFilters.js +9 -10
  98. package/es6/components/DataSearch/DataSearch.js +5 -4
  99. package/es6/components/DataSort/DataSort.js +4 -3
  100. package/es6/components/DataSummary/DataSummary.js +6 -6
  101. package/es6/components/DataTable/ExpanderCell.js +4 -1
  102. package/es6/components/DataTable/Footer.js +4 -1
  103. package/es6/components/DataTable/Header.js +6 -3
  104. package/es6/components/DataTable/Resizer.js +22 -8
  105. package/es6/components/DataTable/Searcher.js +5 -7
  106. package/es6/components/DataTable/stories/ResizePinned.stories.js +316 -0
  107. package/es6/components/DataTable/stories/SpaceX.stories.js +15 -16
  108. package/es6/components/DataTable/stories/SpaceXUngrouped.stories.js +7 -7
  109. package/es6/components/DataTable/stories/rowDetails.stories.js +6 -8
  110. package/es6/components/DataTableColumns/DataTableColumns.js +23 -21
  111. package/es6/components/DateInput/DateInput.js +6 -5
  112. package/es6/components/Distribution/Distribution.js +8 -5
  113. package/es6/components/FileInput/FileInput.js +42 -37
  114. package/es6/components/Footer/Footer.js +5 -1
  115. package/es6/components/Header/Header.js +2 -2
  116. package/es6/components/Layer/Layer.js +10 -5
  117. package/es6/components/Layer/StyledLayer.js +3 -3
  118. package/es6/components/List/List.js +5 -4
  119. package/es6/components/MaskedInput/MaskedInput.js +6 -1
  120. package/es6/components/Menu/Menu.js +13 -1
  121. package/es6/components/Meter/Bar.js +39 -18
  122. package/es6/components/Meter/Circle.js +33 -48
  123. package/es6/components/Meter/stories/Circle.stories.js +7 -9
  124. package/es6/components/Meter/utils.js +14 -0
  125. package/es6/components/Nav/Nav.js +5 -1
  126. package/es6/components/Notification/Notification.js +6 -8
  127. package/es6/components/Pagination/Pagination.js +5 -10
  128. package/es6/components/Pagination/PaginationStep.js +2 -1
  129. package/es6/components/Paragraph/ParagraphSkeleton.js +2 -1
  130. package/es6/components/RadioButton/RadioButton.js +1 -1
  131. package/es6/components/RadioButtonGroup/RadioButtonGroup.js +2 -2
  132. package/es6/components/RangeSelector/RangeSelector.js +2 -6
  133. package/es6/components/Select/SelectContainer.js +2 -1
  134. package/es6/components/SelectMultiple/SelectMultipleContainer.js +8 -4
  135. package/es6/components/SelectMultiple/SelectMultipleValue.js +5 -7
  136. package/es6/components/SelectMultiple/SelectionSummary.js +7 -8
  137. package/es6/components/Sidebar/Sidebar.js +6 -3
  138. package/es6/components/Spinner/Spinner.js +6 -3
  139. package/es6/components/StarRating/StarRating.js +8 -5
  140. package/es6/components/Tab/Tab.js +2 -1
  141. package/es6/components/Table/StyledTable.js +2 -2
  142. package/es6/components/Tabs/Tabs.js +8 -12
  143. package/es6/components/Tag/StyledTag.js +10 -2
  144. package/es6/components/TextInput/CopyButton.js +3 -2
  145. package/es6/components/TextInput/TextInput.js +5 -0
  146. package/es6/components/ThumbsRating/ThumbsRating.js +15 -10
  147. package/es6/components/Toolbar/Toolbar.js +15 -11
  148. package/es6/components/Video/Video.js +3 -5
  149. package/es6/themes/base.d.ts +284 -4
  150. package/es6/themes/base.js +369 -21
  151. package/es6/utils/graphics.js +123 -0
  152. package/grommet.min.js +1 -1
  153. package/grommet.min.js.map +1 -1
  154. package/package.json +46 -46
  155. package/themes/base.d.ts +284 -4
  156. package/themes/base.js +369 -21
  157. package/utils/graphics.js +124 -1
@@ -6,7 +6,8 @@ var _react = _interopRequireWildcard(require("react"));
6
6
  var _grommet = require("grommet");
7
7
  var _grommetIcons = require("grommet-icons");
8
8
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
9
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(typeof r + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
9
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
10
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
10
11
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
11
12
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
12
13
  var buildQuery = function buildQuery(view) {
@@ -34,11 +35,11 @@ var buildQuery = function buildQuery(view) {
34
35
  return query;
35
36
  };
36
37
  var fetchLaunches = /*#__PURE__*/function () {
37
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(view) {
38
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(view) {
38
39
  var _view$sort, _view$sort2, _sort;
39
40
  var query, sort, body;
40
- return _regeneratorRuntime().wrap(function _callee$(_context) {
41
- while (1) switch (_context.prev = _context.next) {
41
+ return _regenerator().w(function (_context) {
42
+ while (1) switch (_context.n) {
42
43
  case 0:
43
44
  query = buildQuery(view);
44
45
  sort = (_sort = {}, _sort[(view == null || (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null || (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
@@ -57,7 +58,7 @@ var fetchLaunches = /*#__PURE__*/function () {
57
58
  },
58
59
  query: query
59
60
  };
60
- return _context.abrupt("return", fetch('https://api.spacexdata.com/v4/launches/query', {
61
+ return _context.a(2, fetch('https://api.spacexdata.com/v4/launches/query', {
61
62
  method: 'POST',
62
63
  headers: {
63
64
  'Content-Type': 'application/json'
@@ -66,9 +67,6 @@ var fetchLaunches = /*#__PURE__*/function () {
66
67
  }).then(function (response) {
67
68
  return response.json();
68
69
  }));
69
- case 4:
70
- case "end":
71
- return _context.stop();
72
70
  }
73
71
  }, _callee);
74
72
  }));
@@ -77,10 +75,10 @@ var fetchLaunches = /*#__PURE__*/function () {
77
75
  };
78
76
  }();
79
77
  var fetchRockets = /*#__PURE__*/function () {
80
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
78
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
81
79
  var body;
82
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
83
- while (1) switch (_context2.prev = _context2.next) {
80
+ return _regenerator().w(function (_context2) {
81
+ while (1) switch (_context2.n) {
84
82
  case 0:
85
83
  body = {
86
84
  options: {
@@ -90,7 +88,7 @@ var fetchRockets = /*#__PURE__*/function () {
90
88
  select: ['name', 'id']
91
89
  }
92
90
  };
93
- return _context2.abrupt("return", fetch('https://api.spacexdata.com/v4/rockets/query', {
91
+ return _context2.a(2, fetch('https://api.spacexdata.com/v4/rockets/query', {
94
92
  method: 'POST',
95
93
  headers: {
96
94
  'Content-Type': 'application/json'
@@ -99,9 +97,6 @@ var fetchRockets = /*#__PURE__*/function () {
99
97
  }).then(function (response) {
100
98
  return response.json();
101
99
  }));
102
- case 2:
103
- case "end":
104
- return _context2.stop();
105
100
  }
106
101
  }, _callee2);
107
102
  }));
@@ -6,7 +6,8 @@ var _react = _interopRequireWildcard(require("react"));
6
6
  var _grommet = require("grommet");
7
7
  var _grommetIcons = require("grommet-icons");
8
8
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
9
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(typeof r + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
9
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
10
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
10
11
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
11
12
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
12
13
  var buildQuery = function buildQuery(view) {
@@ -34,11 +35,11 @@ var buildQuery = function buildQuery(view) {
34
35
  return query;
35
36
  };
36
37
  var fetchLaunches = /*#__PURE__*/function () {
37
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(view) {
38
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(view) {
38
39
  var _view$sort, _view$sort2, _sort;
39
40
  var query, sort, body;
40
- return _regeneratorRuntime().wrap(function _callee$(_context) {
41
- while (1) switch (_context.prev = _context.next) {
41
+ return _regenerator().w(function (_context) {
42
+ while (1) switch (_context.n) {
42
43
  case 0:
43
44
  query = buildQuery(view);
44
45
  sort = (_sort = {}, _sort[(view == null || (_view$sort = view.sort) == null ? void 0 : _view$sort.property) || 'name'] = (view == null || (_view$sort2 = view.sort) == null ? void 0 : _view$sort2.direction) || 'asc', _sort);
@@ -57,7 +58,7 @@ var fetchLaunches = /*#__PURE__*/function () {
57
58
  },
58
59
  query: query
59
60
  };
60
- return _context.abrupt("return", fetch('https://api.spacexdata.com/v4/launches/query', {
61
+ return _context.a(2, fetch('https://api.spacexdata.com/v4/launches/query', {
61
62
  method: 'POST',
62
63
  headers: {
63
64
  'Content-Type': 'application/json'
@@ -66,9 +67,6 @@ var fetchLaunches = /*#__PURE__*/function () {
66
67
  }).then(function (response) {
67
68
  return response.json();
68
69
  }));
69
- case 4:
70
- case "end":
71
- return _context.stop();
72
70
  }
73
71
  }, _callee);
74
72
  }));
@@ -77,10 +75,10 @@ var fetchLaunches = /*#__PURE__*/function () {
77
75
  };
78
76
  }();
79
77
  var fetchRockets = /*#__PURE__*/function () {
80
- var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
78
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
81
79
  var body;
82
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
83
- while (1) switch (_context2.prev = _context2.next) {
80
+ return _regenerator().w(function (_context2) {
81
+ while (1) switch (_context2.n) {
84
82
  case 0:
85
83
  body = {
86
84
  options: {
@@ -90,7 +88,7 @@ var fetchRockets = /*#__PURE__*/function () {
90
88
  select: ['name', 'id']
91
89
  }
92
90
  };
93
- return _context2.abrupt("return", fetch('https://api.spacexdata.com/v4/rockets/query', {
91
+ return _context2.a(2, fetch('https://api.spacexdata.com/v4/rockets/query', {
94
92
  method: 'POST',
95
93
  headers: {
96
94
  'Content-Type': 'application/json'
@@ -99,9 +97,6 @@ var fetchRockets = /*#__PURE__*/function () {
99
97
  }).then(function (response) {
100
98
  return response.json();
101
99
  }));
102
- case 2:
103
- case "end":
104
- return _context2.stop();
105
100
  }
106
101
  }, _callee2);
107
102
  }));
@@ -5,19 +5,20 @@ exports["default"] = exports.StarWars = void 0;
5
5
  var _react = _interopRequireWildcard(require("react"));
6
6
  var _grommet = require("grommet");
7
7
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
8
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return r; }; var t, r = {}, e = Object.prototype, n = e.hasOwnProperty, o = "function" == typeof Symbol ? Symbol : {}, i = o.iterator || "@@iterator", a = o.asyncIterator || "@@asyncIterator", u = o.toStringTag || "@@toStringTag"; function c(t, r, e, n) { return Object.defineProperty(t, r, { value: e, enumerable: !n, configurable: !n, writable: !n }); } try { c({}, ""); } catch (t) { c = function c(t, r, e) { return t[r] = e; }; } function h(r, e, n, o) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype); return c(a, "_invoke", function (r, e, n) { var o = 1; return function (i, a) { if (3 === o) throw Error("Generator is already running"); if (4 === o) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var u = n.delegate; if (u) { var c = d(u, n); if (c) { if (c === f) continue; return c; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (1 === o) throw o = 4, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = 3; var h = s(r, e, n); if ("normal" === h.type) { if (o = n.done ? 4 : 2, h.arg === f) continue; return { value: h.arg, done: n.done }; } "throw" === h.type && (o = 4, n.method = "throw", n.arg = h.arg); } }; }(r, n, new Context(o || [])), !0), a; } function s(t, r, e) { try { return { type: "normal", arg: t.call(r, e) }; } catch (t) { return { type: "throw", arg: t }; } } r.wrap = h; var f = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var l = {}; c(l, i, function () { return this; }); var p = Object.getPrototypeOf, y = p && p(p(x([]))); y && y !== e && n.call(y, i) && (l = y); var v = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(l); function g(t) { ["next", "throw", "return"].forEach(function (r) { c(t, r, function (t) { return this._invoke(r, t); }); }); } function AsyncIterator(t, r) { function e(o, i, a, u) { var c = s(t[o], t, i); if ("throw" !== c.type) { var h = c.arg, f = h.value; return f && "object" == typeof f && n.call(f, "__await") ? r.resolve(f.__await).then(function (t) { e("next", t, a, u); }, function (t) { e("throw", t, a, u); }) : r.resolve(f).then(function (t) { h.value = t, a(h); }, function (t) { return e("throw", t, a, u); }); } u(c.arg); } var o; c(this, "_invoke", function (t, n) { function i() { return new r(function (r, o) { e(t, n, r, o); }); } return o = o ? o.then(i, i) : i(); }, !0); } function d(r, e) { var n = e.method, o = r.i[n]; if (o === t) return e.delegate = null, "throw" === n && r.i["return"] && (e.method = "return", e.arg = t, d(r, e), "throw" === e.method) || "return" !== n && (e.method = "throw", e.arg = new TypeError("The iterator does not provide a '" + n + "' method")), f; var i = s(o, r.i, e.arg); if ("throw" === i.type) return e.method = "throw", e.arg = i.arg, e.delegate = null, f; var a = i.arg; return a ? a.done ? (e[r.r] = a.value, e.next = r.n, "return" !== e.method && (e.method = "next", e.arg = t), e.delegate = null, f) : a : (e.method = "throw", e.arg = new TypeError("iterator result is not an object"), e.delegate = null, f); } function w(t) { this.tryEntries.push(t); } function m(r) { var e = r[4] || {}; e.type = "normal", e.arg = t, r[4] = e; } function Context(t) { this.tryEntries = [[-1]], t.forEach(w, this), this.reset(!0); } function x(r) { if (null != r) { var e = r[i]; if (e) return e.call(r); if ("function" == typeof r.next) return r; if (!isNaN(r.length)) { var o = -1, a = function e() { for (; ++o < r.length;) if (n.call(r, o)) return e.value = r[o], e.done = !1, e; return e.value = t, e.done = !0, e; }; return a.next = a; } } throw new TypeError(typeof r + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, c(v, "constructor", GeneratorFunctionPrototype), c(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = c(GeneratorFunctionPrototype, u, "GeneratorFunction"), r.isGeneratorFunction = function (t) { var r = "function" == typeof t && t.constructor; return !!r && (r === GeneratorFunction || "GeneratorFunction" === (r.displayName || r.name)); }, r.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c(t, u, "GeneratorFunction")), t.prototype = Object.create(v), t; }, r.awrap = function (t) { return { __await: t }; }, g(AsyncIterator.prototype), c(AsyncIterator.prototype, a, function () { return this; }), r.AsyncIterator = AsyncIterator, r.async = function (t, e, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(h(t, e, n, o), i); return r.isGeneratorFunction(e) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, g(v), c(v, u, "Generator"), c(v, i, function () { return this; }), c(v, "toString", function () { return "[object Generator]"; }), r.keys = function (t) { var r = Object(t), e = []; for (var n in r) e.unshift(n); return function t() { for (; e.length;) if ((n = e.pop()) in r) return t.value = n, t.done = !1, t; return t.done = !0, t; }; }, r.values = x, Context.prototype = { constructor: Context, reset: function reset(r) { if (this.prev = this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(m), !r) for (var e in this) "t" === e.charAt(0) && n.call(this, e) && !isNaN(+e.slice(1)) && (this[e] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0][4]; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(r) { if (this.done) throw r; var e = this; function n(t) { a.type = "throw", a.arg = r, e.next = t; } for (var o = e.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i[4], u = this.prev, c = i[1], h = i[2]; if (-1 === i[0]) return n("end"), !1; if (!c && !h) throw Error("try statement without catch or finally"); if (null != i[0] && i[0] <= u) { if (u < c) return this.method = "next", this.arg = t, n(c), !0; if (u < h) return n(h), !1; } } }, abrupt: function abrupt(t, r) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var n = this.tryEntries[e]; if (n[0] > -1 && n[0] <= this.prev && this.prev < n[2]) { var o = n; break; } } o && ("break" === t || "continue" === t) && o[0] <= r && r <= o[2] && (o = null); var i = o ? o[4] : {}; return i.type = t, i.arg = r, o ? (this.method = "next", this.next = o[2], f) : this.complete(i); }, complete: function complete(t, r) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && r && (this.next = r), f; }, finish: function finish(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[2] === t) return this.complete(e[4], e[3]), m(e), f; } }, "catch": function _catch(t) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var e = this.tryEntries[r]; if (e[0] === t) { var n = e[4]; if ("throw" === n.type) { var o = n.arg; m(e); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(r, e, n) { return this.delegate = { i: x(r), r: e, n: n }, "next" === this.method && (this.arg = t), f; } }, r; }
8
+ function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
9
+ function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
9
10
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
10
11
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
11
12
  // Uses the StarWars API for starships, see https://swapi.info
12
13
 
13
14
  var fetchData = /*#__PURE__*/function () {
14
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
15
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
15
16
  var url;
16
- return _regeneratorRuntime().wrap(function _callee$(_context) {
17
- while (1) switch (_context.prev = _context.next) {
17
+ return _regenerator().w(function (_context) {
18
+ while (1) switch (_context.n) {
18
19
  case 0:
19
20
  url = "https://swapi.info/api/starships";
20
- return _context.abrupt("return", fetch(url, {
21
+ return _context.a(2, fetch(url, {
21
22
  method: 'GET',
22
23
  headers: {
23
24
  'Content-Type': 'application/json'
@@ -28,9 +29,6 @@ var fetchData = /*#__PURE__*/function () {
28
29
  if (err.name !== 'AbortError') throw err;
29
30
  return {};
30
31
  }));
31
- case 2:
32
- case "end":
33
- return _context.stop();
34
32
  }
35
33
  }, _callee);
36
34
  }));
@@ -38,7 +38,7 @@ var stackedChartType = {
38
38
  // normalize and automatically handle whatever the caller didn't specify.
39
39
 
40
40
  var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
41
- var _boundsProp$x, _boundsProp$y;
41
+ var _boundsProp$x, _boundsProp$y, _theme$dataChart2;
42
42
  var a11yTitle = _ref.a11yTitle,
43
43
  _ref$axis = _ref.axis,
44
44
  axisProp = _ref$axis === void 0 ? true : _ref$axis,
@@ -50,8 +50,7 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
50
50
  detail = _ref.detail,
51
51
  _ref$direction = _ref.direction,
52
52
  direction = _ref$direction === void 0 ? 'vertical' : _ref$direction,
53
- _ref$gap = _ref.gap,
54
- gap = _ref$gap === void 0 ? 'small' : _ref$gap,
53
+ gap = _ref.gap,
55
54
  guideProp = _ref.guide,
56
55
  legend = _ref.legend,
57
56
  offset = _ref.offset,
@@ -213,6 +212,7 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
213
212
 
214
213
  // map granularities to work well with the number of data points we have
215
214
  var granularities = (0, _react.useMemo)(function () {
215
+ var _theme$dataChart, _theme$dataChart$size;
216
216
  var medium;
217
217
  // determine a good medium granularity that will align well with the
218
218
  // length of the data
@@ -224,7 +224,8 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
224
224
  fine: data.length,
225
225
  medium: medium
226
226
  };
227
- var granularity1 = _extends({}, _utils2.heightYGranularity[size && size.height || 'small'] || {
227
+ var yGranularity = ((_theme$dataChart = theme.dataChart) == null || (_theme$dataChart = _theme$dataChart.granularity) == null ? void 0 : _theme$dataChart.y) || _utils2.heightYGranularity;
228
+ var granularity1 = _extends({}, yGranularity[size && size.height || ((_theme$dataChart$size = theme.dataChart.size) == null ? void 0 : _theme$dataChart$size.height)] || {
228
229
  fine: 5,
229
230
  medium: 3
230
231
  }, {
@@ -237,8 +238,7 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
237
238
  x: granularity0,
238
239
  y: granularity1
239
240
  };
240
- }, [charts, data.length, horizontal, size]);
241
-
241
+ }, [charts, data.length, horizontal, size, theme]);
242
242
  // normalize axis to objects, convert granularity to a number
243
243
  var axis = (0, _react.useMemo)(function () {
244
244
  if (!axisProp) return undefined;
@@ -357,10 +357,11 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
357
357
  bounds: chartBounds[index],
358
358
  direction: direction,
359
359
  steps: steps,
360
- thickness: thickness
360
+ thickness: thickness,
361
+ theme: theme
361
362
  });
362
363
  });
363
- }, [axis, boundsProp, charts, chartValues, data, direction, granularities, horizontal]);
364
+ }, [axis, boundsProp, charts, chartValues, data, direction, granularities, horizontal, theme]);
364
365
 
365
366
  // normalize how we style data properties for use by Legend and Detail
366
367
  var seriesStyles = (0, _react.useMemo)(function () {
@@ -452,11 +453,12 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
452
453
  if (padProp !== undefined) return padProp;
453
454
  var pad0;
454
455
  var pad1;
456
+ var halfPadValues = (0, _utils2.halfPad)(theme);
455
457
  charts.forEach(function (_ref7, index) {
456
458
  var type = _ref7.type;
457
459
  var thickness = chartProps[index].thickness;
458
- pad0 = (0, _utils2.largestSize)(pad0, _utils2.halfPad[thickness]);
459
- if (type && type !== 'bar') pad1 = (0, _utils2.largestSize)(pad1, _utils2.halfPad[thickness]);
460
+ pad0 = (0, _utils2.largestSize)(theme, pad0, halfPadValues[thickness]);
461
+ if (type && type !== 'bar') pad1 = (0, _utils2.largestSize)(theme, pad1, halfPadValues[thickness]);
460
462
  });
461
463
  return horizontal ? {
462
464
  horizontal: pad1,
@@ -465,7 +467,7 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
465
467
  horizontal: pad0,
466
468
  vertical: pad1
467
469
  };
468
- }, [chartProps, charts, horizontal, padProp]);
470
+ }, [chartProps, charts, horizontal, padProp, theme]);
469
471
 
470
472
  // calculate the thickness in pixels of each chart
471
473
  var thicknesses = (0, _react.useMemo)(function () {
@@ -703,7 +705,7 @@ var DataChart = exports.DataChart = /*#__PURE__*/(0, _react.forwardRef)(function
703
705
  start: [1, 0],
704
706
  end: [1, 0]
705
707
  }],
706
- gap: gap
708
+ gap: gap || ((_theme$dataChart2 = theme.dataChart) == null ? void 0 : _theme$dataChart2.gap)
707
709
  }, rest), xAxisElement, yAxisElement, stackElement);
708
710
  if (legendElement) {
709
711
  content = /*#__PURE__*/_react["default"].createElement(_Box.Box, {
@@ -190,13 +190,13 @@ var Detail = exports.Detail = function Detail(_ref) {
190
190
  onMouseLeave: onMouseLeave,
191
191
  trapFocus: false
192
192
  }, /*#__PURE__*/_react["default"].createElement(_Box.Box, {
193
- pad: "small",
193
+ pad: theme.dataChart.detail.pad,
194
194
  background: {
195
195
  color: 'background-back'
196
196
  }
197
197
  }, /*#__PURE__*/_react["default"].createElement(_Grid.Grid, {
198
198
  columns: ['auto', 'auto', 'auto'],
199
- gap: "xsmall",
199
+ gap: theme.dataChart.detail.gap,
200
200
  align: "center"
201
201
  }, series.filter(function (_ref3) {
202
202
  var _data$detailIndex;
@@ -7,6 +7,7 @@ var _Box = require("../Box");
7
7
  var _Button = require("../Button");
8
8
  var _Text = require("../Text");
9
9
  var _Swatch = require("./Swatch");
10
+ var _useThemeValue2 = require("../../utils/useThemeValue");
10
11
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
11
12
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
12
13
  var Legend = exports.Legend = function Legend(_ref) {
@@ -14,6 +15,8 @@ var Legend = exports.Legend = function Legend(_ref) {
14
15
  seriesProp = _ref.series,
15
16
  seriesStyles = _ref.seriesStyles,
16
17
  setActiveProperty = _ref.setActiveProperty;
18
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
19
+ theme = _useThemeValue.theme;
17
20
  var series = (0, _react.useMemo)(function () {
18
21
  return seriesProp.filter(function (s) {
19
22
  return seriesStyles[s.property];
@@ -28,13 +31,12 @@ var Legend = exports.Legend = function Legend(_ref) {
28
31
  }).length > 1;
29
32
  }, [series, seriesStyles]);
30
33
  return /*#__PURE__*/_react["default"].createElement(_Box.Box, {
31
- margin: {
32
- top: 'small'
33
- },
34
+ margin: theme.dataChart.legend.margin,
34
35
  direction: "row",
35
36
  wrap: true,
36
- gap: "small"
37
+ gap: theme.dataChart.legend.gap
37
38
  }, series.map(function (_ref3) {
39
+ var _theme$dataChart, _theme$dataChart2;
38
40
  var property = _ref3.property,
39
41
  label = _ref3.label;
40
42
  var isActive = property === activeProperty;
@@ -52,11 +54,8 @@ var Legend = exports.Legend = function Legend(_ref) {
52
54
  key: property,
53
55
  direction: "row",
54
56
  align: "center",
55
- pad: {
56
- horizontal: 'small',
57
- vertical: 'xsmall'
58
- },
59
- gap: "xsmall"
57
+ pad: (_theme$dataChart = theme.dataChart) == null || (_theme$dataChart = _theme$dataChart.legend) == null || (_theme$dataChart = _theme$dataChart.item) == null ? void 0 : _theme$dataChart.pad,
58
+ gap: (_theme$dataChart2 = theme.dataChart) == null || (_theme$dataChart2 = _theme$dataChart2.legend) == null || (_theme$dataChart2 = _theme$dataChart2.item) == null ? void 0 : _theme$dataChart2.gap
60
59
  }, /*#__PURE__*/_react["default"].createElement(_Swatch.Swatch, _extends({}, seriesStyles[property], swatchProps)), /*#__PURE__*/_react["default"].createElement(_Text.Text, textProps, label || property));
61
60
  if (interactive) {
62
61
  content = /*#__PURE__*/_react["default"].createElement(_Button.Button, {
@@ -30,12 +30,15 @@ var heightYGranularity = exports.heightYGranularity = {
30
30
  medium: 5
31
31
  }
32
32
  };
33
- var halfPad = exports.halfPad = {
34
- xlarge: 'large',
35
- large: 'medium',
36
- medium: 'small',
37
- small: 'xsmall',
38
- xsmall: 'xxsmall'
33
+ var halfPad = exports.halfPad = function halfPad(theme) {
34
+ var _theme$dataChart;
35
+ return (theme == null || (_theme$dataChart = theme.dataChart) == null ? void 0 : _theme$dataChart.halfPad) || {
36
+ xlarge: 'large',
37
+ large: 'medium',
38
+ medium: 'small',
39
+ small: 'xsmall',
40
+ xsmall: 'xxsmall'
41
+ };
39
42
  };
40
43
  var doublePad = exports.doublePad = {
41
44
  large: 'xlarge',
@@ -44,7 +47,10 @@ var doublePad = exports.doublePad = {
44
47
  xsmall: 'small',
45
48
  xxsmall: 'xsmall'
46
49
  };
47
- var orderedSizes = ['xlarge', 'large', 'medium', 'small', 'xsmall', 'xxsmall', 'hair'];
50
+ var getOrderedSizes = function getOrderedSizes(theme) {
51
+ var _theme$dataChart2;
52
+ return (theme == null || (_theme$dataChart2 = theme.dataChart) == null ? void 0 : _theme$dataChart2.orderedSizes) || ['xlarge', 'large', 'medium', 'small', 'xsmall', 'xxsmall', 'hair'];
53
+ };
48
54
  var showInUnits = exports.showInUnits = function showInUnits(content, maxValue) {
49
55
  var divideBy;
50
56
  var unit;
@@ -60,7 +66,8 @@ var showInUnits = exports.showInUnits = function showInUnits(content, maxValue)
60
66
  if (unit) newContent = "" + newContent + unit;
61
67
  return newContent;
62
68
  };
63
- var largestSize = exports.largestSize = function largestSize(size1, size2) {
69
+ var largestSize = exports.largestSize = function largestSize(theme, size1, size2) {
70
+ var orderedSizes = getOrderedSizes(theme);
64
71
  if (size1 && !size2) return size1;
65
72
  if (size2 && !size1) return size2;
66
73
  if (orderedSizes.indexOf(size1) < orderedSizes.indexOf(size2)) return size1;
@@ -13,6 +13,7 @@ var _propTypes = require("./propTypes");
13
13
  var _RangeSelector2 = require("../RangeSelector/RangeSelector");
14
14
  var _DataFormContext = require("../../contexts/DataFormContext");
15
15
  var _utils = require("../Select/utils");
16
+ var _useThemeValue2 = require("../../utils/useThemeValue");
16
17
  var _excluded = ["children", "options", "property", "range"];
17
18
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
19
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
@@ -86,6 +87,8 @@ var DataFilter = exports.DataFilter = function DataFilter(_ref) {
86
87
  var _useState = (0, _react.useState)(''),
87
88
  searchText = _useState[0],
88
89
  setSearchText = _useState[1];
90
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
91
+ theme = _useThemeValue.theme;
89
92
  var _useMemo = (0, _react.useMemo)(function () {
90
93
  var _properties$property, _properties$property2;
91
94
  if (children) return [undefined, undefined]; // caller driving
@@ -138,7 +141,7 @@ var DataFilter = exports.DataFilter = function DataFilter(_ref) {
138
141
  var content = children;
139
142
  if (!content) {
140
143
  if (range) {
141
- var _properties$property4;
144
+ var _properties$property4, _theme$dataFilter;
142
145
  var step =
143
146
  // from `range` on DataFilter
144
147
  (rangeProp == null ? void 0 : rangeProp.step) || (// from range in Data `properties`
@@ -160,7 +163,7 @@ var DataFilter = exports.DataFilter = function DataFilter(_ref) {
160
163
  step = multiplier * delta / (multiplier * defaultRangeSteps);
161
164
  } else step = delta / defaultRangeSteps;
162
165
  }
163
- content = /*#__PURE__*/_react["default"].createElement(_RangeSelector.RangeSelector, {
166
+ content = /*#__PURE__*/_react["default"].createElement(_RangeSelector.RangeSelector, _extends({
164
167
  "aria-label": ariaLabel,
165
168
  id: id,
166
169
  name: property + "._range",
@@ -168,10 +171,8 @@ var DataFilter = exports.DataFilter = function DataFilter(_ref) {
168
171
  label: true,
169
172
  min: range[0],
170
173
  max: range[1],
171
- step: step,
172
- size: "full",
173
- round: "small"
174
- });
174
+ step: step
175
+ }, (_theme$dataFilter = theme.dataFilter) == null ? void 0 : _theme$dataFilter.rangeSelector));
175
176
  } else if (options) {
176
177
  if (options.length === 2 && options[1] === true && options[0] === false) {
177
178
  // special case boolean properties
@@ -189,10 +190,10 @@ var DataFilter = exports.DataFilter = function DataFilter(_ref) {
189
190
  options: options
190
191
  });
191
192
  } else {
192
- content = /*#__PURE__*/_react["default"].createElement(_SelectMultiple.SelectMultiple, {
193
+ var _theme$dataFilter2;
194
+ content = /*#__PURE__*/_react["default"].createElement(_SelectMultiple.SelectMultiple, _extends({
193
195
  "aria-label": ariaLabel,
194
196
  id: id,
195
- dropHeight: "medium",
196
197
  name: property,
197
198
  showSelectedInline: true,
198
199
  options: searchedOptions,
@@ -205,7 +206,7 @@ var DataFilter = exports.DataFilter = function DataFilter(_ref) {
205
206
  key: 'value',
206
207
  reduce: true
207
208
  }
208
- });
209
+ }, (_theme$dataFilter2 = theme.dataFilter) == null ? void 0 : _theme$dataFilter2.selectMultiple));
209
210
  htmlFor = (0, _utils.selectInputId)(id);
210
211
  }
211
212
  }