@loomhq/lens 10.68.3 → 10.69.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.
|
@@ -30,7 +30,7 @@ const MenuWrapper = styled.ul `
|
|
|
30
30
|
${getRadius('large')};
|
|
31
31
|
`;
|
|
32
32
|
const MenuItemWrapper = styled.li `
|
|
33
|
-
display: grid;
|
|
33
|
+
display: ${({ hidden }) => (hidden ? 'none' : 'grid')};
|
|
34
34
|
grid-auto-flow: column;
|
|
35
35
|
grid-template-columns: ${props => props.columns};
|
|
36
36
|
${getSize('grid-gap', 'small')};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { HTMLAttributes } from 'react';
|
|
2
2
|
declare const SelectWrapper: import("@emotion/styled-base").StyledComponent<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement>>, object>;
|
|
3
3
|
declare const Select: ({ container, onChange, menuZIndex, menuMaxWidth, menuMaxHeight, selectedOptionValue, onOuterClick, options, placeholder, isDisabled, onOpenChange, trigger, ...props }: SelectProps & React.ComponentProps<typeof SelectWrapper>) => JSX.Element;
|
|
4
4
|
declare type OptionsObject = {
|
|
@@ -7,6 +7,7 @@ declare type OptionsObject = {
|
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
8
|
isDisabled?: boolean;
|
|
9
9
|
hasDivider?: boolean;
|
|
10
|
+
hidden?: HTMLAttributes<HTMLOptionElement>['hidden'];
|
|
10
11
|
};
|
|
11
12
|
declare type SelectProps = {
|
|
12
13
|
onChange?: React.ReactEventHandler;
|
|
@@ -193,7 +193,7 @@ const Select = (_a) => {
|
|
|
193
193
|
isOpen &&
|
|
194
194
|
renderLayer(React.createElement("div", Object.assign({}, layerProps, { style: Object.assign(Object.assign({}, layerProps.style), { zIndex: menuZIndex, width: triggerBounds === null || triggerBounds === void 0 ? void 0 : triggerBounds.width }) }),
|
|
195
195
|
React.createElement(Menu, { downshiftMenuProps: getMenuProps, maxWidth: menuMaxWidth, maxHeight: menuMaxHeight }, options.map((item, index) => {
|
|
196
|
-
return (React.createElement(MenuItem, Object.assign({ key: index, getItemProps: getItemProps, icon: item.icon }, getItemProps({
|
|
196
|
+
return (React.createElement(MenuItem, Object.assign({ key: index, getItemProps: getItemProps, icon: item.icon, hidden: item.hidden }, getItemProps({
|
|
197
197
|
key: `${item.value}-${index}`,
|
|
198
198
|
index,
|
|
199
199
|
item,
|