@wavv/ui 2.4.8 → 2.4.10
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/build/components/DropdownMenuParts/MenuOptions.d.ts +2 -1
- package/build/components/DropdownMenuParts/MenuOptions.js +5 -2
- package/build/components/DropdownSelect.js +2 -1
- package/build/components/ListHelpers/ListStyles.js +1 -0
- package/build/components/Select.js +1 -1
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ type Props = {
|
|
|
10
10
|
itemProps?: Partial<ItemProps>;
|
|
11
11
|
ref?: React.Ref<HTMLDivElement>;
|
|
12
12
|
readOnly?: boolean;
|
|
13
|
+
noBorder?: boolean;
|
|
13
14
|
} & Width & Omit<MenuProps<object>, 'children'> & Pick<SelectInputProps, 'before' | 'after' | 'menuBackground'>;
|
|
14
|
-
declare const MenuOptions: ({ options, children, autoWidth, itemProps, width, ref, before, after, menuBackground, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const MenuOptions: ({ options, children, autoWidth, itemProps, width, ref, before, after, menuBackground, noBorder, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default MenuOptions;
|
|
@@ -4,10 +4,11 @@ import { Menu } from "react-aria-components";
|
|
|
4
4
|
import ListSection from "../ListHelpers/ListSection.js";
|
|
5
5
|
import ListStyles, { preventProps } from "../ListHelpers/ListStyles.js";
|
|
6
6
|
import MenuItem from "./MenuItem.js";
|
|
7
|
-
const MenuOptions = ({ options, children, autoWidth, itemProps, width, ref, before, after, menuBackground, ...props })=>/*#__PURE__*/ jsxs(MenuContainer, {
|
|
7
|
+
const MenuOptions = ({ options, children, autoWidth, itemProps, width, ref, before, after, menuBackground, noBorder, ...props })=>/*#__PURE__*/ jsxs(MenuContainer, {
|
|
8
8
|
autoWidth: autoWidth,
|
|
9
9
|
width: width,
|
|
10
10
|
background: menuBackground,
|
|
11
|
+
noBorder: noBorder,
|
|
11
12
|
children: [
|
|
12
13
|
before,
|
|
13
14
|
/*#__PURE__*/ jsxs(Menu, {
|
|
@@ -42,6 +43,8 @@ const MenuOptions = ({ options, children, autoWidth, itemProps, width, ref, befo
|
|
|
42
43
|
after
|
|
43
44
|
]
|
|
44
45
|
});
|
|
45
|
-
const MenuContainer = styled('div', preventProps)(ListStyles)
|
|
46
|
+
const MenuContainer = styled('div', preventProps)(ListStyles, ({ noBorder })=>({
|
|
47
|
+
border: noBorder ? 'none' : void 0
|
|
48
|
+
}));
|
|
46
49
|
const DropdownMenuParts_MenuOptions = MenuOptions;
|
|
47
50
|
export { DropdownMenuParts_MenuOptions as default };
|
|
@@ -132,7 +132,7 @@ const Select_Select = ({ backgroundColor, menuBackground, children, fontSize, fo
|
|
|
132
132
|
if (isPlaceholder) return defaultChildren;
|
|
133
133
|
if (isMultiple && selectedItems) {
|
|
134
134
|
const count = selectedItems.length;
|
|
135
|
-
return count > 0 ? `${count}
|
|
135
|
+
return count > 0 ? `${count} item${count > 1 ? 's' : ''} selected` : defaultChildren;
|
|
136
136
|
}
|
|
137
137
|
return selectedText;
|
|
138
138
|
}
|