x-ui-design 0.2.99 → 0.3.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.
- package/dist/index.esm.js +3 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/lib/components/Select/Select.tsx +3 -2
- package/package.json +1 -1
- package/src/app/page.tsx +13 -5
package/dist/index.esm.js
CHANGED
|
@@ -2922,6 +2922,7 @@ styleInject(css_248z$5);
|
|
|
2922
2922
|
const LIST_HEIGHT = 200;
|
|
2923
2923
|
const PADDING_PLACEMENT = 18;
|
|
2924
2924
|
const PADDING_TAG_INPUT = 4;
|
|
2925
|
+
const DROPDOWN_CONTENT_PADDING = 8;
|
|
2925
2926
|
function getTextFromNode(node) {
|
|
2926
2927
|
if (typeof node === 'string' || typeof node === 'number') {
|
|
2927
2928
|
return node.toString();
|
|
@@ -3180,7 +3181,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
3180
3181
|
const popupContainer = useMemo(() => {
|
|
3181
3182
|
if (typeof window === 'undefined') return null;
|
|
3182
3183
|
return selectRef.current ? getPopupContainer?.(selectRef.current) : document.body;
|
|
3183
|
-
}, [getPopupContainer]);
|
|
3184
|
+
}, [getPopupContainer, selectRef.current]);
|
|
3184
3185
|
const extractedOptions = children ? (Array.isArray(children) ? children : [children]).filter(e => e).map(child => child.props) : options;
|
|
3185
3186
|
const filteredOptions = extractedOptions.filter(option => {
|
|
3186
3187
|
if (typeof filterOption === 'function') {
|
|
@@ -3266,7 +3267,7 @@ const SelectComponent = /*#__PURE__*/forwardRef(({
|
|
|
3266
3267
|
style: {
|
|
3267
3268
|
maxHeight: listHeight,
|
|
3268
3269
|
overflowY: 'auto',
|
|
3269
|
-
maxWidth: selectRef.current ? `${selectRef.current.getBoundingClientRect().width -
|
|
3270
|
+
maxWidth: selectRef.current ? `${selectRef.current.getBoundingClientRect().width - DROPDOWN_CONTENT_PADDING}px` : 'inherit'
|
|
3270
3271
|
}
|
|
3271
3272
|
}, asTag && !!searchQuery && /*#__PURE__*/React$1.createElement(Option, {
|
|
3272
3273
|
value: searchQuery,
|