@bigbinary/neeto-molecules 1.3.3 → 1.3.5

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.
@@ -109,7 +109,8 @@ function _objectWithoutProperties(source, excluded) {
109
109
  var GRID_PROPERTIES = {
110
110
  gridWidth: 300,
111
111
  gridHeight: 300,
112
- columnWidth: 100,
112
+ columnWidthDesktop: 100,
113
+ columnWidthMobile: 90,
113
114
  rowHeight: 100,
114
115
  columnCount: 3
115
116
  };
@@ -188,6 +189,9 @@ var IconPicker = function IconPicker(_ref) {
188
189
  var debouncedSearchTerm = useDebounce(searchTerm);
189
190
  var _useTranslation = useTranslation(),
190
191
  t = _useTranslation.t;
192
+ var isLargerScreen = function isLargerScreen() {
193
+ return window.innerWidth > 768;
194
+ };
191
195
  var handleSearch = function handleSearch(term) {
192
196
  var _gridRef$current;
193
197
  var searchTerm = term.toLowerCase().trim().replace(/\s+/g, "_");
@@ -230,10 +234,10 @@ var IconPicker = function IconPicker(_ref) {
230
234
  setActiveIcon(icon);
231
235
  };
232
236
  return icon ? /*#__PURE__*/React.createElement(Icon, {
233
- active: icon === activeIcon,
234
237
  icon: icon,
235
238
  style: style,
236
239
  symbolsStyle: symbolsStyle,
240
+ active: icon === activeIcon,
237
241
  onClick: handleIconClick
238
242
  }) : null;
239
243
  };
@@ -264,7 +268,7 @@ var IconPicker = function IconPicker(_ref) {
264
268
  return setSearchTerm("");
265
269
  }
266
270
  }, otherProps), /*#__PURE__*/React.createElement("div", {
267
- className: "w-80 flex-grow p-2"
271
+ className: "w-72 flex-grow p-2 md:w-80"
268
272
  }, /*#__PURE__*/React.createElement("div", {
269
273
  className: "mb-1 space-y-2"
270
274
  }, /*#__PURE__*/React.createElement(Input, {
@@ -297,14 +301,14 @@ var IconPicker = function IconPicker(_ref) {
297
301
  style: "link",
298
302
  onClick: handleRemoveClick
299
303
  }))), isNotEmpty(iconList) ? /*#__PURE__*/React.createElement(FixedSizeGrid, {
300
- className: "overflow-x-hidden",
304
+ className: "w-full overflow-x-hidden",
301
305
  columnCount: GRID_PROPERTIES.columnCount,
302
- columnWidth: GRID_PROPERTIES.columnWidth,
303
306
  height: GRID_PROPERTIES.gridHeight,
304
307
  itemData: iconList,
305
308
  ref: gridRef,
306
309
  rowHeight: GRID_PROPERTIES.rowHeight,
307
310
  width: GRID_PROPERTIES.gridWidth,
311
+ columnWidth: isLargerScreen() ? GRID_PROPERTIES.columnWidthDesktop : GRID_PROPERTIES.columnWidthMobile,
308
312
  rowCount: Math.ceil(iconList.length / GRID_PROPERTIES.columnCount)
309
313
  }, renderGridCell) : /*#__PURE__*/React.createElement(NoResults$1, null))));
310
314
  };