@onesy/ui-react 1.0.205 → 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 +8 -3
- package/esm/Select/Select.js +8 -3
- package/esm/index.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
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
|
-
})),
|
|
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({},
|
|
513
|
-
|
|
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
|
};
|
package/esm/Select/Select.js
CHANGED
|
@@ -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
|
-
})),
|
|
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({},
|
|
495
|
-
|
|
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
package/index.js
CHANGED