@homebound/beam 2.358.0 → 2.359.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.
@@ -21,6 +21,7 @@ type MenuItemBase = {
21
21
  /** Whether the interactive element is disabled. If a ReactNode, it's treated as a "disabled reason" that's shown in a tooltip. */
22
22
  disabled?: boolean | ReactNode;
23
23
  destructive?: boolean;
24
+ hasDivider?: boolean;
24
25
  };
25
26
  export type IconMenuItemType = MenuItemBase & {
26
27
  icon: IconProps["icon"];
@@ -30,7 +31,10 @@ export type ImageMenuItemType = MenuItemBase & {
30
31
  size?: 24 | 48;
31
32
  isAvatar?: boolean;
32
33
  };
33
- export type MenuItem = MenuItemBase | IconMenuItemType | ImageMenuItemType;
34
+ export type DividerMenuItemType = MenuItemBase & {
35
+ hasDivider: boolean;
36
+ };
37
+ export type MenuItem = MenuItemBase | IconMenuItemType | ImageMenuItemType | DividerMenuItemType;
34
38
  export type MenuSection = MenuItem & {
35
39
  items?: MenuItem[];
36
40
  };
@@ -1,17 +1,15 @@
1
- import { Key } from "react";
2
1
  import { Matcher } from "react-day-picker";
3
2
  import { Filter } from "./types";
4
- import { Value } from "../../inputs";
5
3
  import { DateRange } from "../../types";
6
- export type DateRangeFilterProps<V extends Value, DV extends DateRangeFilterValue<V>> = {
4
+ export type DateRangeFilterProps<O extends string> = {
7
5
  label: string;
8
- defaultValue?: DV;
6
+ defaultValue?: DateRangeFilterValue<O>;
9
7
  placeholderText?: string;
10
8
  disabledDays?: Matcher | Matcher[];
11
9
  testFieldLabel?: string;
12
10
  };
13
- export type DateRangeFilterValue<V extends Value> = {
14
- op: V;
11
+ export type DateRangeFilterValue<O extends string> = {
12
+ op: O;
15
13
  value: DateRange | undefined;
16
14
  };
17
- export declare function dateRangeFilter<V extends Key>(props: DateRangeFilterProps<V, DateRangeFilterValue<V>>): (key: string) => Filter<DateRangeFilterValue<V>>;
15
+ export declare function dateRangeFilter<O extends string>(props: DateRangeFilterProps<O>): (key: string) => Filter<DateRangeFilterValue<O>>;
@@ -62,6 +62,7 @@ function MenuItemImpl(props) {
62
62
  }, state, ref);
63
63
  return ((0, jsx_runtime_1.jsx)("li", { ...menuItemProps, ...hoverProps, ref: ref, css: {
64
64
  ...Css_1.Css.df.aic.py1.px2.cursorPointer.outline0.mh("42px").sm.$,
65
+ ...(menuItem.hasDivider ? Css_1.Css.bb.bcGray400.$ : {}),
65
66
  ...(!isDisabled && isHovered ? (contrast ? Css_1.Css.bgGray800.$ : Css_1.Css.bgGray100.$) : {}),
66
67
  ...(isFocused ? Css_1.Css.add("boxShadow", `inset 0 0 0 1px ${Css_1.Palette.Blue700}`).$ : {}),
67
68
  ...(isDisabled ? Css_1.Css.gray500.cursorNotAllowed.$ : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.358.0",
3
+ "version": "2.359.0",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",