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
@@ -19,7 +19,7 @@ var _TextInput = require("../TextInput");
19
19
  var _DataContext = require("../../contexts/DataContext");
20
20
  var _MessageContext = require("../../contexts/MessageContext");
21
21
  var _propTypes = require("./propTypes");
22
- var _useThemeValue2 = require("../../utils/useThemeValue");
22
+ var _useThemeValue3 = require("../../utils/useThemeValue");
23
23
  var _excluded = ["drop", "options"],
24
24
  _excluded2 = ["drop", "options"];
25
25
  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); }
@@ -31,14 +31,6 @@ var dropProps = {
31
31
  left: 'left'
32
32
  }
33
33
  };
34
- var tabsProps = {
35
- drop: {
36
- pad: 'small'
37
- },
38
- noDrop: {
39
- justify: 'start'
40
- }
41
- };
42
34
 
43
35
  // options can either be an array of property names or an array of objects.
44
36
  // The form value always uses an array of property names.
@@ -75,6 +67,7 @@ var alignOrder = function alignOrder(value, prevValue, options) {
75
67
  // Content is a separate component since it might be getting its form context
76
68
  // from the DataForm rendered inside DataTableColumns.
77
69
  var Content = function Content(_ref) {
70
+ var _theme$dataTableColum, _theme$dataTableColum2;
78
71
  var drop = _ref.drop,
79
72
  _ref$options = _ref.options,
80
73
  options = _ref$options === void 0 ? [] : _ref$options,
@@ -86,6 +79,18 @@ var Content = function Content(_ref) {
86
79
  useFormInput = _useContext2.useFormInput;
87
80
  var _useContext3 = (0, _react.useContext)(_MessageContext.MessageContext),
88
81
  format = _useContext3.format;
82
+ var _useThemeValue = (0, _useThemeValue3.useThemeValue)(),
83
+ theme = _useThemeValue.theme;
84
+ var PinnedIcon = ((_theme$dataTableColum = theme.dataTableColumns) == null || (_theme$dataTableColum = _theme$dataTableColum.icons) == null ? void 0 : _theme$dataTableColum.pinned) || _Lock.Lock;
85
+ var SearchIcon = ((_theme$dataTableColum2 = theme.dataTableColumns) == null || (_theme$dataTableColum2 = _theme$dataTableColum2.icons) == null ? void 0 : _theme$dataTableColum2.search) || _Search.Search;
86
+ var tabsProps = {
87
+ drop: {
88
+ pad: theme.dataTableColumns.tabs.pad
89
+ },
90
+ noDrop: {
91
+ justify: 'start'
92
+ }
93
+ };
89
94
 
90
95
  // If the user searches for a particular option, render
91
96
  // the filtered list of options.
@@ -110,7 +115,7 @@ var Content = function Content(_ref) {
110
115
  return items != null && items.length ? {
111
116
  background: 'none',
112
117
  color: 'text-weak',
113
- icon: /*#__PURE__*/_react["default"].createElement(_Lock.Lock, null),
118
+ icon: /*#__PURE__*/_react["default"].createElement(PinnedIcon, null),
114
119
  items: items
115
120
  } : undefined;
116
121
  }, [options, objectOptions]);
@@ -147,13 +152,11 @@ var Content = function Content(_ref) {
147
152
  messages: messages == null ? void 0 : messages.dataTableColumns
148
153
  })
149
154
  }, /*#__PURE__*/_react["default"].createElement(_Box.Box, {
150
- pad: {
151
- vertical: 'small'
152
- },
153
- gap: "xsmall"
155
+ pad: theme.dataTableColumns.selectColumns.pad,
156
+ gap: theme.dataTableColumns.selectColumns.gap
154
157
  }, /*#__PURE__*/_react["default"].createElement(_TextInput.TextInput, {
155
158
  type: "search",
156
- icon: /*#__PURE__*/_react["default"].createElement(_Search.Search, null),
159
+ icon: /*#__PURE__*/_react["default"].createElement(SearchIcon, null),
157
160
  placeholder: "Search",
158
161
  value: search,
159
162
  onChange: function onChange(event) {
@@ -182,9 +185,7 @@ var Content = function Content(_ref) {
182
185
  messages: messages == null ? void 0 : messages.dataTableColumns
183
186
  })
184
187
  }, /*#__PURE__*/_react["default"].createElement(_Box.Box, {
185
- pad: {
186
- top: 'small'
187
- }
188
+ pad: theme.dataTableColumns.orderColumns.pad
188
189
  }, /*#__PURE__*/_react["default"].createElement(_List.List, {
189
190
  id: dataId + "--order-columns",
190
191
  "aria-labelledby": dataId + "--order-columns-tab"
@@ -210,7 +211,7 @@ var Content = function Content(_ref) {
210
211
  })))));
211
212
  };
212
213
  var DataTableColumns = exports.DataTableColumns = function DataTableColumns(_ref5) {
213
- var _theme$data$button;
214
+ var _theme$dataTableColum3, _theme$data$button;
214
215
  var drop = _ref5.drop,
215
216
  options = _ref5.options,
216
217
  rest = _objectWithoutPropertiesLoose(_ref5, _excluded2);
@@ -221,11 +222,12 @@ var DataTableColumns = exports.DataTableColumns = function DataTableColumns(_ref
221
222
  inDataForm = _useContext5.inDataForm;
222
223
  var _useContext6 = (0, _react.useContext)(_MessageContext.MessageContext),
223
224
  format = _useContext6.format;
224
- var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
225
- theme = _useThemeValue.theme;
225
+ var _useThemeValue2 = (0, _useThemeValue3.useThemeValue)(),
226
+ theme = _useThemeValue2.theme;
226
227
  var _useState3 = (0, _react.useState)(),
227
228
  showContent = _useState3[0],
228
229
  setShowContent = _useState3[1];
230
+ var ControlIcon = ((_theme$dataTableColum3 = theme.dataTableColumns) == null || (_theme$dataTableColum3 = _theme$dataTableColum3.icons) == null ? void 0 : _theme$dataTableColum3.control) || _Splits.Splits;
229
231
  var tip = format({
230
232
  id: 'dataTableColumns.tip',
231
233
  messages: messages == null ? void 0 : messages.dataTableColumns
@@ -246,7 +248,7 @@ var DataTableColumns = exports.DataTableColumns = function DataTableColumns(_ref
246
248
  messages: messages == null ? void 0 : messages.dataTableColumns
247
249
  }),
248
250
  kind: (_theme$data$button = theme.data.button) == null ? void 0 : _theme$data$button.kind,
249
- icon: /*#__PURE__*/_react["default"].createElement(_Splits.Splits, null),
251
+ icon: /*#__PURE__*/_react["default"].createElement(ControlIcon, null),
250
252
  tip: tip,
251
253
  dropProps: dropProps,
252
254
  dropContent: content,
@@ -55,7 +55,7 @@ var getReference = function getReference(value) {
55
55
  return adjustedDate;
56
56
  };
57
57
  var DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, refArg) {
58
- var _theme$icon, _theme$dateInput$icon;
58
+ var _theme$icon, _theme$dateInput$icon, _theme$dateInput$icon2, _theme$dateInput$butt, _theme$dateInput$butt2;
59
59
  var buttonProps = _ref.buttonProps,
60
60
  calendarProps = _ref.calendarProps,
61
61
  defaultValue = _ref.defaultValue,
@@ -84,7 +84,7 @@ var DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(function
84
84
  var announce = (0, _react.useContext)(_AnnounceContext.AnnounceContext);
85
85
  var _useContext = (0, _react.useContext)(_MessageContext.MessageContext),
86
86
  formatMessage = _useContext.format;
87
- var iconSize = ((_theme$icon = theme.icon) == null ? void 0 : _theme$icon.matchSize) && rest.size || ((_theme$dateInput$icon = theme.dateInput.icon) == null ? void 0 : _theme$dateInput$icon.size) || 'medium';
87
+ var iconSize = ((_theme$icon = theme.icon) == null ? void 0 : _theme$icon.matchSize) && rest.size || ((_theme$dateInput$icon = theme.dateInput.icon) == null ? void 0 : _theme$dateInput$icon.size);
88
88
  var _useContext2 = (0, _react.useContext)(_Form.FormContext),
89
89
  useFormInput = _useContext2.useFormInput;
90
90
  var ref = (0, _utils.useForwardedRef)(refArg);
@@ -98,6 +98,7 @@ var DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(function
98
98
  value = _useFormInput[0],
99
99
  setValue = _useFormInput[1];
100
100
  var usingKeyboard = (0, _utils.useKeyboard)();
101
+ var CalendarIcon = ((_theme$dateInput$icon2 = theme.dateInput.icon) == null ? void 0 : _theme$dateInput$icon2.calendar) || _Calendar.Calendar;
101
102
  var _useState = (0, _react.useState)((0, _Calendar3.getOutputFormat)(value)),
102
103
  outputFormat = _useState[0],
103
104
  setOutputFormat = _useState[1];
@@ -268,7 +269,7 @@ var DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(function
268
269
  align: calendarDropdownAlign
269
270
  }, dropProps),
270
271
  dropContent: calendar,
271
- icon: icon || MaskedInputIcon || /*#__PURE__*/_react["default"].createElement(_Calendar.Calendar, {
272
+ icon: icon || MaskedInputIcon || /*#__PURE__*/_react["default"].createElement(CalendarIcon, {
272
273
  size: iconSize
273
274
  })
274
275
  }, buttonProps));
@@ -292,13 +293,13 @@ var DateInput = exports.DateInput = /*#__PURE__*/(0, _react.forwardRef)(function
292
293
  onClick: open ? closeCalendar : openCalendar,
293
294
  disabled: disabled,
294
295
  plain: true,
295
- icon: icon || MaskedInputIcon || /*#__PURE__*/_react["default"].createElement(_Calendar.Calendar, {
296
+ icon: icon || MaskedInputIcon || /*#__PURE__*/_react["default"].createElement(CalendarIcon, {
296
297
  size: iconSize
297
298
  }),
298
299
  margin: reverse ? {
299
- left: 'small'
300
+ left: (_theme$dateInput$butt = theme.dateInput.button) == null ? void 0 : _theme$dateInput$butt.margin
300
301
  } : {
301
- right: 'small'
302
+ right: (_theme$dateInput$butt2 = theme.dateInput.button) == null ? void 0 : _theme$dateInput$butt2.margin
302
303
  }
303
304
  });
304
305
  var input = /*#__PURE__*/_react["default"].createElement(_Form.FormContext.Provider, {
@@ -7,6 +7,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
7
7
  var _Box = require("../Box");
8
8
  var _Text = require("../Text");
9
9
  var _propTypes2 = require("./propTypes");
10
+ var _useThemeValue2 = require("../../utils/useThemeValue");
10
11
  var _excluded = ["basis", "children", "direction", "fill", "gap", "values"];
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
12
13
  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); }
@@ -38,11 +39,12 @@ var _Distribution = exports.Distribution = function Distribution(_ref2) {
38
39
  _ref2$direction = _ref2.direction,
39
40
  direction = _ref2$direction === void 0 ? 'row' : _ref2$direction,
40
41
  fill = _ref2.fill,
41
- _ref2$gap = _ref2.gap,
42
- gap = _ref2$gap === void 0 ? 'xsmall' : _ref2$gap,
42
+ gap = _ref2.gap,
43
43
  _ref2$values = _ref2.values,
44
44
  values = _ref2$values === void 0 ? defaultValues : _ref2$values,
45
45
  rest = _objectWithoutPropertiesLoose(_ref2, _excluded);
46
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
47
+ theme = _useThemeValue.theme;
46
48
  if (values.length === 1) {
47
49
  var value = values[0];
48
50
  return /*#__PURE__*/_react["default"].createElement(Value, {
@@ -51,6 +53,7 @@ var _Distribution = exports.Distribution = function Distribution(_ref2) {
51
53
  }, children(value));
52
54
  }
53
55
  if (values.length > 1) {
56
+ var _theme$distribution, _theme$distribution2, _theme$distribution3;
54
57
  var reducer = function reducer(accumulator, _ref3) {
55
58
  var value = _ref3.value;
56
59
  return accumulator + (value || 0);
@@ -95,18 +98,18 @@ var _Distribution = exports.Distribution = function Distribution(_ref2) {
95
98
  basis: basis,
96
99
  flex: basis ? 'shrink' : true,
97
100
  overflow: "hidden",
98
- gap: gap,
101
+ gap: gap || ((_theme$distribution = theme.distribution) == null ? void 0 : _theme$distribution.gap),
99
102
  fill: fill
100
103
  }, rest), /*#__PURE__*/_react["default"].createElement(_Distribution, {
101
104
  values: values.slice(0, subIndex),
102
105
  basis: childBasis[0],
103
106
  direction: direction === 'row' ? 'column' : 'row',
104
- gap: gap
107
+ gap: gap || ((_theme$distribution2 = theme.distribution) == null ? void 0 : _theme$distribution2.gap)
105
108
  }, children), /*#__PURE__*/_react["default"].createElement(_Distribution, {
106
109
  values: values.slice(subIndex),
107
110
  basis: childBasis[1],
108
111
  direction: direction === 'row' ? 'column' : 'row',
109
- gap: gap
112
+ gap: gap || ((_theme$distribution3 = theme.distribution) == null ? void 0 : _theme$distribution3.gap)
110
113
  }, children));
111
114
  }
112
115
  return null;
@@ -62,6 +62,7 @@ var defaultPendingRemoval = {
62
62
  index: undefined
63
63
  };
64
64
  var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
65
+ var _theme$fileInput, _theme$fileInput$anch;
65
66
  var a11yTitle = _ref.a11yTitle,
66
67
  background = _ref.background,
67
68
  border = _ref.border,
@@ -107,6 +108,7 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
107
108
  var removeRef = (0, _react.useRef)();
108
109
  var ConfirmRemove = confirmRemove;
109
110
  var RemoveIcon = theme.fileInput.icons.remove;
111
+ var ErrorIcon = ((_theme$fileInput = theme.fileInput) == null || (_theme$fileInput = _theme$fileInput.icons) == null ? void 0 : _theme$fileInput.error) || _CircleAlert.CircleAlert;
110
112
  var usingKeyboard = (0, _utils.useKeyboard)();
111
113
  var _formContext$useFormI = formContext.useFormInput({
112
114
  name: name,
@@ -172,36 +174,6 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
172
174
  } else result = _extends({}, result, dragOverThemeProp);
173
175
  return typeof result === 'object' && Object.keys(result).length === 0 ? undefined : result;
174
176
  };
175
- var rightPad;
176
- if (mergeTheme('pad')) {
177
- var _mergeTheme = mergeTheme('pad'),
178
- horizontal = _mergeTheme.horizontal,
179
- right = _mergeTheme.right;
180
- if (right) {
181
- rightPad = theme.global.edgeSize[right] || right;
182
- } else if (horizontal) {
183
- rightPad = theme.global.edgeSize[horizontal] || horizontal;
184
- }
185
- }
186
-
187
- // rightPad needs to be included in the rightOffset
188
- // otherwise input may cover the RemoveButton, making it
189
- // unreachable by mouse click.
190
- // If browse anchor or button is greater than remove button then
191
- // rightoffset will take the larger width
192
- var rightOffset;
193
- if (removeRef.current && controlRef.current) {
194
- var rightOffsetBrowse = controlRef.current.getBoundingClientRect().width;
195
- var rightOffsetRemove = removeRef.current.getBoundingClientRect().width;
196
- if (rightPad && typeof rightPad === 'string') rightOffset = rightOffsetRemove + (0, _utils.parseMetricToNum)(rightPad);
197
- if (files.length === 1 || files.length > aggregateThreshold) {
198
- rightOffset = rightOffsetBrowse + rightOffsetRemove + (0, _utils.parseMetricToNum)(theme.global.edgeSize.small) * 2;
199
- } else if (rightOffsetBrowse > rightOffsetRemove) {
200
- rightOffset = rightOffsetBrowse + (0, _utils.parseMetricToNum)(theme.global.edgeSize.small) * 2;
201
- } else rightOffset = rightOffsetRemove;
202
- } else if (!files.length && controlRef.current) {
203
- rightOffset = controlRef.current.getBoundingClientRect().width + (0, _utils.parseMetricToNum)(theme.global.edgeSize.small) * 2;
204
- }
205
177
 
206
178
  // Show the number of files when more than one
207
179
 
@@ -244,6 +216,40 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
244
216
  });
245
217
  inputRef.current.focus();
246
218
  };
219
+
220
+ // rightPad needs to be included in the rightOffset
221
+ // otherwise input may cover the RemoveButton, making it
222
+ // unreachable by mouse click.
223
+ var rightPad = '0px';
224
+ if (mergeTheme('pad')) {
225
+ var _mergeTheme = mergeTheme('pad'),
226
+ horizontal = _mergeTheme.horizontal,
227
+ right = _mergeTheme.right;
228
+ if (right) {
229
+ rightPad = theme.global.edgeSize[right] || right;
230
+ } else if (horizontal) {
231
+ rightPad = theme.global.edgeSize[horizontal] || horizontal;
232
+ }
233
+ }
234
+ var removeWidth = removeRef.current ? removeRef.current.getBoundingClientRect().width : 0;
235
+ var controlWidth = controlRef.current ? controlRef.current.getBoundingClientRect().width : 0;
236
+ if (controlRef.current && (_theme$fileInput$anch = theme.fileInput.anchor) != null && _theme$fileInput$anch.margin) {
237
+ if (typeof theme.fileInput.anchor.margin === 'string') {
238
+ controlWidth += parseInt(theme.global.edgeSize[theme.fileInput.anchor.margin] || theme.fileInput.anchor.margin, 10) * 2;
239
+ } else if (typeof theme.fileInput.anchor.margin === 'object') {
240
+ var _theme$fileInput$anch2, _theme$fileInput$anch3, _theme$fileInput$anch4;
241
+ if ((_theme$fileInput$anch2 = theme.fileInput.anchor.margin) != null && _theme$fileInput$anch2.horizontal) {
242
+ controlWidth += parseInt(theme.global.edgeSize[theme.fileInput.anchor.margin.horizontal] || theme.fileInput.anchor.margin.horizontal, 10) * 2;
243
+ }
244
+ if ((_theme$fileInput$anch3 = theme.fileInput.anchor.margin) != null && _theme$fileInput$anch3.right) {
245
+ controlWidth += parseInt(theme.global.edgeSize[theme.fileInput.anchor.margin.right] || theme.fileInput.anchor.margin.right, 10);
246
+ }
247
+ if ((_theme$fileInput$anch4 = theme.fileInput.anchor.margin) != null && _theme$fileInput$anch4.left) {
248
+ controlWidth += parseInt(theme.global.edgeSize[theme.fileInput.anchor.margin.left] || theme.fileInput.anchor.margin.left, 10);
249
+ }
250
+ }
251
+ }
252
+ var rightOffset = files.length > 1 ? removeWidth + parseInt(rightPad, 10) : removeWidth + controlWidth + parseInt(rightPad, 10);
247
253
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(ContentsBox, _extends({
248
254
  theme: theme,
249
255
  flex: false,
@@ -276,7 +282,7 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
276
282
  "aria-invalid": maxSize && files.some(function (f) {
277
283
  return f.size > maxSize;
278
284
  }) || max != null && files.length > max,
279
- rightOffset: rightOffset
285
+ rightOffset: rightOffset || undefined
280
286
  }, passThemeFlag, rest, {
281
287
  onDragOver: function onDragOver() {
282
288
  return setDragOver(true);
@@ -347,7 +353,7 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
347
353
  alignSelf: "center",
348
354
  disabled: disabled,
349
355
  ref: controlRef,
350
- margin: "small",
356
+ margin: theme.fileInput.anchor.margin,
351
357
  onClick: function onClick() {
352
358
  inputRef.current.click();
353
359
  inputRef.current.focus();
@@ -415,7 +421,7 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
415
421
  alignSelf: "center",
416
422
  disabled: disabled,
417
423
  ref: controlRef,
418
- margin: "small",
424
+ margin: theme.fileInput.anchor.margin,
419
425
  onClick: function onClick() {
420
426
  inputRef.current.click();
421
427
  inputRef.current.focus();
@@ -437,10 +443,9 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
437
443
  direction: "row",
438
444
  align: "center"
439
445
  }, renderFile ? renderFile(file) : /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({}, theme.fileInput.label, {
440
- gap: "xsmall",
441
446
  align: "center",
442
447
  direction: "row"
443
- }), (typeof maxSize === 'number' && file.size > maxSize || typeof max === 'number' && index >= max) && /*#__PURE__*/_react["default"].createElement(_CircleAlert.CircleAlert, {
448
+ }), (typeof maxSize === 'number' && file.size > maxSize || typeof max === 'number' && index >= max) && /*#__PURE__*/_react["default"].createElement(ErrorIcon, {
444
449
  a11yTitle: format({
445
450
  id: messageId,
446
451
  messages: messages,
@@ -507,7 +512,7 @@ var FileInput = exports.FileInput = /*#__PURE__*/(0, _react.forwardRef)(function
507
512
  tabIndex: -1,
508
513
  disabled: disabled,
509
514
  ref: controlRef,
510
- margin: "small",
515
+ margin: theme.fileInput.anchor.margin,
511
516
  onClick: function onClick() {
512
517
  inputRef.current.click();
513
518
  inputRef.current.focus();
@@ -4,17 +4,21 @@ exports.__esModule = true;
4
4
  exports.Footer = void 0;
5
5
  var _react = _interopRequireDefault(require("react"));
6
6
  var _Box = require("../Box");
7
+ var _useThemeValue2 = require("../../utils/useThemeValue");
7
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
8
9
  function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
9
10
  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); }
10
11
  var Footer = exports.Footer = function Footer(_ref) {
12
+ var _theme$footer;
11
13
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
14
+ var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
15
+ theme = _useThemeValue.theme;
12
16
  return /*#__PURE__*/_react["default"].createElement(_Box.Box, _extends({
13
17
  as: "footer",
14
18
  align: "center",
15
19
  direction: "row",
16
20
  flex: false,
17
- gap: "medium",
21
+ gap: (_theme$footer = theme.footer) == null ? void 0 : _theme$footer.gap,
18
22
  justify: "between"
19
23
  }, rest));
20
24
  };
@@ -11,7 +11,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
11
11
  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
12
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
13
13
  var Header = exports.Header = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
14
- var _theme$header2;
14
+ var _theme$header2, _theme$header3;
15
15
  var sticky = _ref.sticky,
16
16
  rest = _objectWithoutPropertiesLoose(_ref, _excluded);
17
17
  var _useThemeValue = (0, _useThemeValue2.useThemeValue)(),
@@ -57,7 +57,7 @@ var Header = exports.Header = /*#__PURE__*/_react["default"].forwardRef(function
57
57
  direction: "row",
58
58
  flex: false,
59
59
  justify: "between",
60
- gap: "medium",
60
+ gap: (_theme$header3 = theme.header) == null ? void 0 : _theme$header3.gap,
61
61
  ref: headerRef
62
62
  }, rest));
63
63
  });
@@ -82,12 +82,17 @@ var Layer = exports.Layer = /*#__PURE__*/(0, _react.forwardRef)(function (props,
82
82
  }
83
83
  setTimeout(function () {
84
84
  // we add the id and query here so the unit tests work
85
- var clone = containerTarget.getRootNode().getElementById('layerClone');
86
- if (clone) {
87
- if (containerTarget.contains(clone)) {
88
- containerTarget.removeChild(clone);
85
+ var rootNode = containerTarget.getRootNode();
86
+ // Not all root nodes (ShadowRoot, DocumentFragment)
87
+ // have getElementById.
88
+ if (rootNode && typeof rootNode.getElementById === 'function') {
89
+ var clone = rootNode.getElementById('layerClone');
90
+ if (clone) {
91
+ if (containerTarget.contains(clone)) {
92
+ containerTarget.removeChild(clone);
93
+ }
94
+ layerContainer.remove();
89
95
  }
90
- layerContainer.remove();
91
96
  }
92
97
  }, _StyledLayer.animationDuration);
93
98
  } else if (containerTarget.contains(layerContainer)) {
@@ -451,10 +451,10 @@ var StyledContainer = exports.StyledContainer = _styledComponents["default"].div
451
451
  }).withConfig({
452
452
  displayName: "StyledLayer__StyledContainer",
453
453
  componentId: "sc-rmtehz-2"
454
- })(["", " display:flex;flex-direction:column;min-height:", ";", " outline:none;pointer-events:all;z-index:", ";", " ", " ", ";", ";"], function (props) {
454
+ })(["", " display:flex;flex-direction:column;", " ", " outline:none;pointer-events:all;z-index:", ";", " ", " ", ";", ";"], function (props) {
455
455
  return !props.modal ? _utils.baseStyle : '';
456
456
  }, function (props) {
457
- return props.theme.global.size.xxsmall;
457
+ return (0, _utils.heightStyle)(props.theme.layer.container.height, props.theme);
458
458
  }, function (props) {
459
459
  return !props.plain && (props.background || props.theme.layer.background) && (0, _utils.backgroundStyle)(props.background || props.theme.layer.background, props.theme);
460
460
  }, function (props) {
@@ -370,6 +370,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
370
370
  key: "p"
371
371
  }, theme.list.primaryKey), primary) : primary;
372
372
  if (secondaryKey) {
373
+ var _theme$list;
373
374
  var secondary = getValue(item, index, secondaryKey);
374
375
  content = [content, typeof secondary === 'string' || typeof secondary === 'number' ? /*#__PURE__*/_react["default"].createElement(_Text.Text, {
375
376
  color: pinnedColor,
@@ -379,7 +380,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
379
380
  direction: 'row',
380
381
  align: 'center',
381
382
  justify: 'between',
382
- gap: 'medium'
383
+ gap: (_theme$list = theme.list) == null || (_theme$list = _theme$list.item) == null ? void 0 : _theme$list.gap
383
384
  };
384
385
  }
385
386
  } else if (typeof item === 'object') {
@@ -417,7 +418,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
417
418
  direction: 'row',
418
419
  align: secondaryKey ? 'start' : 'center',
419
420
  justify: 'between',
420
- gap: 'medium'
421
+ gap: theme.list.item.gap
421
422
  };
422
423
  }
423
424
  var adjustedBackground = background || theme.list.item.background;
@@ -570,7 +571,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
570
571
  boxProps = {
571
572
  direction: 'row',
572
573
  align: defaultItemProps && defaultItemProps.align || 'center',
573
- gap: 'medium'
574
+ gap: theme.list.item.gap
574
575
  };
575
576
  }
576
577
  var itemAriaProps;
@@ -603,7 +604,7 @@ var List = exports.List = /*#__PURE__*/_react["default"].forwardRef(function (_r
603
604
  boxProps = {
604
605
  direction: 'row',
605
606
  align: defaultItemProps && defaultItemProps.align || 'center',
606
- gap: 'medium'
607
+ gap: theme.list.item.gap
607
608
  };
608
609
  displayPinned = /*#__PURE__*/_react["default"].createElement(_Box.Box, {
609
610
  direction: "row",
@@ -439,7 +439,12 @@ var MaskedInput = exports.MaskedInput = /*#__PURE__*/(0, _react.forwardRef)(func
439
439
  }, passThemeFlag), mask[activeMaskIndex].options.map(function (option, index) {
440
440
  // Determine whether the label is done as a child or
441
441
  // as an option Button kind property.
442
- var child = !theme.button.option ? /*#__PURE__*/_react["default"].createElement(_Box.Box, {
442
+ var child = !theme.button.option ?
443
+ /*#__PURE__*/
444
+ // Not adding a theme object now because this code path
445
+ // is not used in the HPE theme, but we may add theme
446
+ // support here in the future.
447
+ _react["default"].createElement(_Box.Box, {
443
448
  pad: {
444
449
  horizontal: 'small',
445
450
  vertical: 'xsmall'
@@ -227,6 +227,11 @@ var Menu = exports.Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
227
227
  if (children) {
228
228
  content = children;
229
229
  } else if (!theme.button["default"]) {
230
+ /*
231
+ Not adding a theme object now because this code path
232
+ is not used in the HPE theme, but we may add theme
233
+ support here in the future.
234
+ */
230
235
  content = /*#__PURE__*/_react["default"].createElement(_Box.Box, {
231
236
  direction: "row",
232
237
  justify: justifyContent,
@@ -280,7 +285,14 @@ var Menu = exports.Menu = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
280
285
  var _theme$menu$item, _theme$menu$item2, _theme$menu$item3, _theme$menu$item4;
281
286
  // Determine whether the label is done as a child or
282
287
  // as an option Button kind property.
283
- var child = !theme.button.option ? /*#__PURE__*/_react["default"].createElement(_Box.Box, {
288
+ var child = !theme.button.option ?
289
+ /*#__PURE__*/
290
+ /*
291
+ Not adding a theme object now because this code path
292
+ is not used in the HPE theme, but we may add theme
293
+ support here in the future.
294
+ */
295
+ _react["default"].createElement(_Box.Box, {
284
296
  align: ((_theme$menu$item = theme.menu.item) == null ? void 0 : _theme$menu$item.align) || 'start',
285
297
  pad: "small",
286
298
  direction: "row",
@@ -13,6 +13,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
13
13
  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); }
14
14
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
15
15
  var Bar = exports.Bar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
16
+ var _theme$meter$gap, _theme$meter;
16
17
  var _props$background = props.background,
17
18
  background = _props$background === void 0 ? 'light-1' : _props$background,
18
19
  max = props.max,
@@ -28,13 +29,20 @@ var Bar = exports.Bar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
28
29
  passThemeFlag = _useThemeValue.passThemeFlag;
29
30
  var length = size === 'full' ? 288 : (0, _utils.parseMetricToNum)(theme.global.size[size] || size);
30
31
  var thickness = (0, _utils.parseMetricToNum)(theme.global.edgeSize[thicknessProp] || thicknessProp);
32
+ var gapTheme = (_theme$meter$gap = (_theme$meter = theme.meter) == null ? void 0 : _theme$meter.gap) != null ? _theme$meter$gap : 0;
33
+ var gap = (0, _utils.parseMetricToNum)(theme.global.edgeSize[gapTheme] || gapTheme);
34
+
31
35
  // account for the round cap, if any
32
- var capOffset = round ? thickness / 2 : 0;
36
+ var capRadius = round ? thickness / 2 : 0;
33
37
  var mid = thickness / 2;
34
38
  var someHighlight = (values || []).some(function (v) {
35
39
  return v.highlight;
36
40
  });
37
- var start = direction === 'horizontal' ? capOffset : max * (length - 2 * capOffset) / max;
41
+ var start = direction === 'horizontal' ? capRadius : length - capRadius;
42
+
43
+ // Available space for the bar is the length of the meter minus an end cap
44
+ // on each end, minus the gap between bars.
45
+ var lengthAvailable = length - 2 * capRadius - gap * (values.length - 1);
38
46
  var paths = (values || []).reduce(function (acc, valueArg, index) {
39
47
  if (valueArg.value > 0) {
40
48
  var color = valueArg.color,
@@ -44,8 +52,22 @@ var Bar = exports.Bar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
44
52
  value = valueArg.value,
45
53
  pathRest = _objectWithoutPropertiesLoose(valueArg, _excluded2);
46
54
  var key = "p-" + index;
47
- var delta = value * (length - 2 * capOffset) / max;
48
- var d = direction === 'horizontal' ? "M " + start + "," + mid + " L " + (start + delta) + "," + mid : "M " + mid + "," + start + " L " + mid + "," + (start - delta);
55
+ var delta = value * lengthAvailable / max;
56
+
57
+ // add a little bit extra to start to allow for larger rounded inset cap
58
+ // The extra needed can be calculated by the Pythagorean theorem
59
+ var extraGap = round && index !== 0 ? Math.sqrt(Math.pow(thickness / 2 + gap / 4, 2) - Math.pow(thickness / 2, 2)) : 0;
60
+ var initialStart = direction === 'horizontal' ? start + extraGap : start - extraGap;
61
+
62
+ // define the x,y points for the corners of the bar.
63
+ var points = direction === 'horizontal' ? [initialStart + "," + thickness, initialStart + ",0", start + delta + ",0", start + delta + "," + thickness] : [thickness + "," + initialStart, "0," + initialStart, "0," + (start - delta), thickness + "," + (start - delta)];
64
+
65
+ // if rounded, the starting cap is an arc. All but the first bar
66
+ // will have a gap and a slightly larger radius
67
+ var startRadius = index === 0 ? capRadius : capRadius + gap / 2;
68
+ var startCap = round ? "A " + startRadius + "," + startRadius + " 0 0 " + (index === 0 ? 1 : 0) + " " + points[1] : "L " + points[1];
69
+ var endCap = round ? "A " + capRadius + "," + capRadius + " 0 0 1 " + points[3] : "L " + points[3];
70
+ var d = "M " + points[0] + " " + startCap + " L " + points[2] + " " + endCap + " Z";
49
71
  var colorName = color || (0, _utils2.defaultColor)(index, theme, values ? values.length : 0);
50
72
  var hoverProps;
51
73
  if (onHover) {
@@ -58,23 +80,22 @@ var Bar = exports.Bar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
58
80
  }
59
81
  };
60
82
  }
83
+ var fill = (0, _utils2.fillProps)(someHighlight && !highlight ? background : colorName, theme);
84
+ acc.push(/*#__PURE__*/_react["default"].createElement("path", _extends({
85
+ key: key,
86
+ d: d
87
+ }, fill, {
88
+ strokeWidth: 0,
89
+ stroke: "none"
90
+ }, hoverProps, pathRest)));
61
91
  if (direction === 'horizontal') {
62
- start += delta;
92
+ start += delta + gap;
63
93
  } else {
64
- start -= delta;
94
+ start -= delta + gap;
65
95
  }
66
- var result = /*#__PURE__*/_react["default"].createElement("path", _extends({
67
- key: key,
68
- d: d,
69
- fill: "none"
70
- }, (0, _utils2.strokeProps)(someHighlight && !highlight ? background : colorName, theme), {
71
- strokeWidth: direction === 'horizontal' ? thickness : length,
72
- strokeLinecap: round ? 'round' : 'butt'
73
- }, hoverProps, pathRest));
74
- acc.push(result);
75
96
  }
76
97
  return acc;
77
- }, []).reverse(); // reverse so the caps looks right
98
+ }, []).reverse(); // reverse so the caps look right
78
99
 
79
100
  var width;
80
101
  if (direction === 'horizontal') {
@@ -82,7 +103,7 @@ var Bar = exports.Bar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref
82
103
  } else {
83
104
  width = size === 'full' ? '100%' : thickness;
84
105
  }
85
- var backgroundPath = direction === 'horizontal' ? "M " + capOffset + "," + mid + " L " + (length - capOffset) + "," + mid : "M " + mid + "," + capOffset + " L " + mid + "," + (length - capOffset);
106
+ var backgroundPath = direction === 'horizontal' ? "M " + capRadius + "," + mid + " L " + (length - capRadius) + "," + mid : "M " + mid + "," + capRadius + " L " + mid + "," + (length - capRadius);
86
107
  return /*#__PURE__*/_react["default"].createElement(_StyledMeter.StyledMeter, _extends({
87
108
  ref: ref,
88
109
  viewBox: direction === 'horizontal' ? "0 0 " + length + " " + thickness : "0 0 " + thickness + " " + length,