@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.
@@ -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 };
@@ -133,7 +133,8 @@ const DropdownSelect = ({ label, options, width, search, onChange, ...props })=>
133
133
  itemProps: {
134
134
  checkbox: true
135
135
  },
136
- readOnly: isEntering || isExiting
136
+ readOnly: isEntering || isExiting,
137
+ noBorder: true
137
138
  })
138
139
  ]
139
140
  })
@@ -18,6 +18,7 @@ const baseStyles = ({ theme, width, zIndex, autoWidth, readOnly, background })=>
18
18
  maxHeight: 'inherit',
19
19
  zIndex,
20
20
  outline: 'none',
21
+ border: theme.defaultBorder,
21
22
  '& > div': {
22
23
  pointerEvents: readOnly ? 'none' : void 0
23
24
  }
@@ -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} items selected` : defaultChildren;
135
+ return count > 0 ? `${count} item${count > 1 ? 's' : ''} selected` : defaultChildren;
136
136
  }
137
137
  return selectedText;
138
138
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavv/ui",
3
- "version": "2.4.8",
3
+ "version": "2.4.10",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {