@flodesk/grain 5.8.0 → 5.8.1

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.
@@ -81,10 +81,19 @@ var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
81
81
  icon: /*#__PURE__*/React.createElement(IconCheck, null)
82
82
  })));
83
83
  });
84
- export var Select = function Select(_ref3) {
85
- var options = _ref3.options,
86
- defaultOption = _ref3.defaultOption,
87
- onChange = _ref3.onChange;
84
+
85
+ var Root = function Root(_ref3) {
86
+ var props = Object.assign({}, _ref3);
87
+ return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
88
+ width: "fit-content",
89
+ position: "relative"
90
+ }));
91
+ };
92
+
93
+ export var Select = function Select(_ref4) {
94
+ var options = _ref4.options,
95
+ defaultOption = _ref4.defaultOption,
96
+ onChange = _ref4.onChange;
88
97
 
89
98
  var _useState = useState(defaultOption || options[0]),
90
99
  _useState2 = _slicedToArray(_useState, 2),
@@ -97,6 +106,7 @@ export var Select = function Select(_ref3) {
97
106
  };
98
107
 
99
108
  return /*#__PURE__*/React.createElement(Listbox, {
109
+ as: Root,
100
110
  value: selectedOption,
101
111
  onChange: handleChange
102
112
  }, /*#__PURE__*/React.createElement(SelectButton, null, selectedOption.content), /*#__PURE__*/React.createElement(Options, null, options.map(function (option, index) {
@@ -104,9 +114,9 @@ export var Select = function Select(_ref3) {
104
114
  key: index,
105
115
  value: option,
106
116
  as: React.Fragment
107
- }, function (_ref4) {
108
- var active = _ref4.active,
109
- selected = _ref4.selected;
117
+ }, function (_ref5) {
118
+ var active = _ref5.active,
119
+ selected = _ref5.selected;
110
120
  return /*#__PURE__*/React.createElement(MenuItem, {
111
121
  isSelected: selected,
112
122
  isActive: active
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flodesk/grain",
3
- "version": "5.8.0",
3
+ "version": "5.8.1",
4
4
  "description": "Flodesk design system",
5
5
  "module": "es/index.js",
6
6
  "author": "Flodesk",