@onesy/ui-react 1.0.204 → 1.0.207

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.
package/Select/Select.js CHANGED
@@ -364,6 +364,7 @@ const Select = props_ => {
364
364
  }))
365
365
  }), 1)] : [])];
366
366
  const sizeListItem = (MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.size) || size;
367
+ const noOptions = !(!!items.length || !!children.length);
367
368
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Line, _objectSpread(_objectSpread({
368
369
  gap: 0,
369
370
  direction: "column",
@@ -430,7 +431,7 @@ const Select = props_ => {
430
431
  justify: other.align,
431
432
  children: renderValues(value)
432
433
  })
433
- })), (!!items.length || children) && /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu, _objectSpread(_objectSpread({
434
+ })), /*#__PURE__*/(0, _jsxRuntime.jsx)(Menu, _objectSpread(_objectSpread({
434
435
  ref: refs.menu,
435
436
  open: open,
436
437
  portal: portal,
@@ -509,8 +510,12 @@ const Select = props_ => {
509
510
  overscrollBehavior: 'contain'
510
511
  }, MenuProps === null || MenuProps === void 0 || (_MenuProps$ListProps2 = MenuProps.ListProps) === null || _MenuProps$ListProps2 === void 0 ? void 0 : _MenuProps$ListProps2.style), ListProps === null || ListProps === void 0 ? void 0 : ListProps.style)
511
512
  }),
512
- style: _objectSpread(_objectSpread({}, styles.menu), MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.style),
513
- className: (0, _styleReact.classNames)(['onesy-Select-Menu', MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
513
+ style: _objectSpread(_objectSpread(_objectSpread({}, noOptions && {
514
+ opacity: 0,
515
+ visibility: 'hidden',
516
+ pointerEvents: 'none'
517
+ }), styles.menu), MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.style),
518
+ className: (0, _styleReact.classNames)(['onesy-Select-Menu', noOptions && 'onesy-Select-Menu-no-options', MenuProps === null || MenuProps === void 0 ? void 0 : MenuProps.className])
514
519
  }))]
515
520
  }));
516
521
  };
@@ -351,6 +351,7 @@ const Select = props_ => {
351
351
  }))
352
352
  }), 1)] : [])];
353
353
  const sizeListItem = MenuProps?.size || size;
354
+ const noOptions = !(!!items.length || !!children.length);
354
355
  return /*#__PURE__*/_jsxs(Line, _objectSpread(_objectSpread({
355
356
  gap: 0,
356
357
  direction: "column",
@@ -417,7 +418,7 @@ const Select = props_ => {
417
418
  justify: other.align,
418
419
  children: renderValues(value)
419
420
  })
420
- })), (!!items.length || children) && /*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({
421
+ })), /*#__PURE__*/_jsx(Menu, _objectSpread(_objectSpread({
421
422
  ref: refs.menu,
422
423
  open: open,
423
424
  portal: portal,
@@ -491,8 +492,12 @@ const Select = props_ => {
491
492
  overscrollBehavior: 'contain'
492
493
  }, MenuProps?.ListProps?.style), ListProps?.style)
493
494
  }),
494
- style: _objectSpread(_objectSpread({}, styles.menu), MenuProps?.style),
495
- className: classNames(['onesy-Select-Menu', MenuProps?.className])
495
+ style: _objectSpread(_objectSpread(_objectSpread({}, noOptions && {
496
+ opacity: 0,
497
+ visibility: 'hidden',
498
+ pointerEvents: 'none'
499
+ }), styles.menu), MenuProps?.style),
500
+ className: classNames(['onesy-Select-Menu', noOptions && 'onesy-Select-Menu-no-options', MenuProps?.className])
496
501
  }))]
497
502
  }));
498
503
  };
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.203
1
+ /** @license UiReact v1.0.206
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.203
1
+ /** @license UiReact v1.0.206
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.204",
3
+ "version": "1.0.207",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar Erić <lazareric1@proton.me>",