@homebound/beam 4.61.0 → 4.63.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.d.cts CHANGED
@@ -5191,6 +5191,7 @@ declare const Icons: {
5191
5191
  arrowFromRight: React__default.JSX.Element;
5192
5192
  arrowFromTop: React__default.JSX.Element;
5193
5193
  subDirectoryRight: React__default.JSX.Element;
5194
+ swap: React__default.JSX.Element;
5194
5195
  camera: React__default.JSX.Element;
5195
5196
  email: React__default.JSX.Element;
5196
5197
  fileBlank: React__default.JSX.Element;
@@ -5262,6 +5263,7 @@ declare const Icons: {
5262
5263
  snow: React__default.JSX.Element;
5263
5264
  sunny: React__default.JSX.Element;
5264
5265
  thunderstorms: React__default.JSX.Element;
5266
+ undo: React__default.JSX.Element;
5265
5267
  undoCircle: React__default.JSX.Element;
5266
5268
  windy: React__default.JSX.Element;
5267
5269
  circle: React__default.JSX.Element;
@@ -5274,8 +5276,10 @@ declare const Icons: {
5274
5276
  designPackage: React__default.JSX.Element;
5275
5277
  updateDesignPackage: React__default.JSX.Element;
5276
5278
  exteriorStyle: React__default.JSX.Element;
5279
+ squareFootage: React__default.JSX.Element;
5277
5280
  time: React__default.JSX.Element;
5278
5281
  lockOpen: React__default.JSX.Element;
5282
+ lockClosed: React__default.JSX.Element;
5279
5283
  map: React__default.JSX.Element;
5280
5284
  pin: React__default.JSX.Element;
5281
5285
  pinFilled: React__default.JSX.Element;
@@ -8768,6 +8772,31 @@ type OptionsOrLoad<O> = O[] | {
8768
8772
  options: O[] | undefined;
8769
8773
  };
8770
8774
 
8775
+ type NestedOption<O> = O & {
8776
+ children?: NestedOption<O>[];
8777
+ defaultCollapsed?: boolean;
8778
+ };
8779
+ type NestedOptionsOrLoad<O> = NestedOption<O>[] | {
8780
+ current: NestedOption<O>[];
8781
+ load: () => Promise<{
8782
+ options: NestedOption<O>[];
8783
+ }>;
8784
+ };
8785
+ type TreeSelectResponse<O, V extends Value> = {
8786
+ all: {
8787
+ values: V[];
8788
+ options: O[];
8789
+ };
8790
+ leaf: {
8791
+ values: V[];
8792
+ options: O[];
8793
+ };
8794
+ root: {
8795
+ values: V[];
8796
+ options: O[];
8797
+ };
8798
+ };
8799
+
8771
8800
  /** Props shared by `MenuSelectField`, `MenuMultiSelectField`, and `MenuTreeSelectField`. */
8772
8801
  type MenuSelectFieldBaseProps<O, V extends Value> = {
8773
8802
  label: string;
@@ -8781,7 +8810,7 @@ type MenuSelectFieldBaseProps<O, V extends Value> = {
8781
8810
  getOptionMenuLabel?: (opt: O, isUnsetOpt: boolean) => ReactNode;
8782
8811
  /** Extra text the menu search matches, in addition to `getOptionLabel`. */
8783
8812
  getOptionSearchText?: (opt: O) => string | readonly string[];
8784
- /** Sort options by `getOptionLabel`. On by default. `MenuTreeSelectField` defaults this to false. */
8813
+ /** Sort options by `getOptionLabel`. On by default. `MenuTreeSelectField` defaults this to false, and so does `MenuSelectField` when an option has `children`. */
8785
8814
  autoSort?: boolean;
8786
8815
  /** Debounced menu search text. The caller replaces `options` and should keep `mixedValues` in that list. Closing calls this with `""`. */
8787
8816
  onSearch?: (search: string) => void;
@@ -8806,7 +8835,9 @@ type MenuSelectFieldBaseProps<O, V extends Value> = {
8806
8835
  onFocus?: VoidFunction;
8807
8836
  onBlur?: VoidFunction;
8808
8837
  } & Pick<PresentationFieldProps, "labelStyle" | "compact" | "borderless" | "borderOnHover" | "fullWidth" | "visuallyDisabled" | "errorInTooltip" | "inputStylePalette">;
8809
- type MenuSelectFieldProps<O, V extends Value> = MenuSelectFieldBaseProps<O, V> & {
8838
+ type MenuSelectFieldProps<O, V extends Value> = Omit<MenuSelectFieldBaseProps<O, V>, "options"> & {
8839
+ /** Flat `O[]`, or `NestedOption<O>[]` when a row has `children`. `{ current, load, options }` loads either list. */
8840
+ options: OptionsOrLoad<O> | OptionsOrLoad<NestedOption<O>>;
8810
8841
  value: V | undefined;
8811
8842
  /** Value proposed by an AI model; puts the field in AI mode. */
8812
8843
  proposedValue?: V;
@@ -8846,31 +8877,6 @@ type BoundMenuSelectFieldProps<O, V extends Value> = Omit<MenuSelectFieldProps<O
8846
8877
  /** Binds `MenuSelectField` to a form field. */
8847
8878
  declare function BoundMenuSelectField<O, V extends Value>(props: BoundMenuSelectFieldProps<O, V>): JSX.Element;
8848
8879
 
8849
- type NestedOption<O> = O & {
8850
- children?: NestedOption<O>[];
8851
- defaultCollapsed?: boolean;
8852
- };
8853
- type NestedOptionsOrLoad<O> = NestedOption<O>[] | {
8854
- current: NestedOption<O>[];
8855
- load: () => Promise<{
8856
- options: NestedOption<O>[];
8857
- }>;
8858
- };
8859
- type TreeSelectResponse<O, V extends Value> = {
8860
- all: {
8861
- values: V[];
8862
- options: O[];
8863
- };
8864
- leaf: {
8865
- values: V[];
8866
- options: O[];
8867
- };
8868
- root: {
8869
- values: V[];
8870
- options: O[];
8871
- };
8872
- };
8873
-
8874
8880
  type MenuTreeSelectFieldProps<O, V extends Value> = MenuSelectFieldBaseProps<NestedOption<O>, V> & {
8875
8881
  /** Selected values. A parent selects its whole subtree; a parent whose children are all selected is selected too. */
8876
8882
  values: V[];
@@ -12038,7 +12044,9 @@ type ErrorMessageProps = {
12038
12044
  */
12039
12045
  declare function ErrorMessage(props: ErrorMessageProps): React$1.JSX.Element;
12040
12046
 
12041
- /** Select whose trigger shows the value and opens a menu. Search is included when the list is longer than `searchOptionLimit`, or when `onSearch` is set. See `MenuSelectField.mdx`. */
12047
+ /** Select whose trigger shows the value and opens a menu.
12048
+ *
12049
+ * Options with `children` are a tree: every node stays visible, and the trigger shows the path. Search is included when the list is longer than `searchOptionLimit`, or when `onSearch` is set. See `MenuSelectField.mdx`. */
12042
12050
  declare function MenuSelectField<O, V extends Value>(props: MenuSelectFieldProps<O, V>): JSX.Element;
12043
12051
 
12044
12052
  type ToggleButtonProps = {
package/dist/index.d.ts CHANGED
@@ -5191,6 +5191,7 @@ declare const Icons: {
5191
5191
  arrowFromRight: React__default.JSX.Element;
5192
5192
  arrowFromTop: React__default.JSX.Element;
5193
5193
  subDirectoryRight: React__default.JSX.Element;
5194
+ swap: React__default.JSX.Element;
5194
5195
  camera: React__default.JSX.Element;
5195
5196
  email: React__default.JSX.Element;
5196
5197
  fileBlank: React__default.JSX.Element;
@@ -5262,6 +5263,7 @@ declare const Icons: {
5262
5263
  snow: React__default.JSX.Element;
5263
5264
  sunny: React__default.JSX.Element;
5264
5265
  thunderstorms: React__default.JSX.Element;
5266
+ undo: React__default.JSX.Element;
5265
5267
  undoCircle: React__default.JSX.Element;
5266
5268
  windy: React__default.JSX.Element;
5267
5269
  circle: React__default.JSX.Element;
@@ -5274,8 +5276,10 @@ declare const Icons: {
5274
5276
  designPackage: React__default.JSX.Element;
5275
5277
  updateDesignPackage: React__default.JSX.Element;
5276
5278
  exteriorStyle: React__default.JSX.Element;
5279
+ squareFootage: React__default.JSX.Element;
5277
5280
  time: React__default.JSX.Element;
5278
5281
  lockOpen: React__default.JSX.Element;
5282
+ lockClosed: React__default.JSX.Element;
5279
5283
  map: React__default.JSX.Element;
5280
5284
  pin: React__default.JSX.Element;
5281
5285
  pinFilled: React__default.JSX.Element;
@@ -8768,6 +8772,31 @@ type OptionsOrLoad<O> = O[] | {
8768
8772
  options: O[] | undefined;
8769
8773
  };
8770
8774
 
8775
+ type NestedOption<O> = O & {
8776
+ children?: NestedOption<O>[];
8777
+ defaultCollapsed?: boolean;
8778
+ };
8779
+ type NestedOptionsOrLoad<O> = NestedOption<O>[] | {
8780
+ current: NestedOption<O>[];
8781
+ load: () => Promise<{
8782
+ options: NestedOption<O>[];
8783
+ }>;
8784
+ };
8785
+ type TreeSelectResponse<O, V extends Value> = {
8786
+ all: {
8787
+ values: V[];
8788
+ options: O[];
8789
+ };
8790
+ leaf: {
8791
+ values: V[];
8792
+ options: O[];
8793
+ };
8794
+ root: {
8795
+ values: V[];
8796
+ options: O[];
8797
+ };
8798
+ };
8799
+
8771
8800
  /** Props shared by `MenuSelectField`, `MenuMultiSelectField`, and `MenuTreeSelectField`. */
8772
8801
  type MenuSelectFieldBaseProps<O, V extends Value> = {
8773
8802
  label: string;
@@ -8781,7 +8810,7 @@ type MenuSelectFieldBaseProps<O, V extends Value> = {
8781
8810
  getOptionMenuLabel?: (opt: O, isUnsetOpt: boolean) => ReactNode;
8782
8811
  /** Extra text the menu search matches, in addition to `getOptionLabel`. */
8783
8812
  getOptionSearchText?: (opt: O) => string | readonly string[];
8784
- /** Sort options by `getOptionLabel`. On by default. `MenuTreeSelectField` defaults this to false. */
8813
+ /** Sort options by `getOptionLabel`. On by default. `MenuTreeSelectField` defaults this to false, and so does `MenuSelectField` when an option has `children`. */
8785
8814
  autoSort?: boolean;
8786
8815
  /** Debounced menu search text. The caller replaces `options` and should keep `mixedValues` in that list. Closing calls this with `""`. */
8787
8816
  onSearch?: (search: string) => void;
@@ -8806,7 +8835,9 @@ type MenuSelectFieldBaseProps<O, V extends Value> = {
8806
8835
  onFocus?: VoidFunction;
8807
8836
  onBlur?: VoidFunction;
8808
8837
  } & Pick<PresentationFieldProps, "labelStyle" | "compact" | "borderless" | "borderOnHover" | "fullWidth" | "visuallyDisabled" | "errorInTooltip" | "inputStylePalette">;
8809
- type MenuSelectFieldProps<O, V extends Value> = MenuSelectFieldBaseProps<O, V> & {
8838
+ type MenuSelectFieldProps<O, V extends Value> = Omit<MenuSelectFieldBaseProps<O, V>, "options"> & {
8839
+ /** Flat `O[]`, or `NestedOption<O>[]` when a row has `children`. `{ current, load, options }` loads either list. */
8840
+ options: OptionsOrLoad<O> | OptionsOrLoad<NestedOption<O>>;
8810
8841
  value: V | undefined;
8811
8842
  /** Value proposed by an AI model; puts the field in AI mode. */
8812
8843
  proposedValue?: V;
@@ -8846,31 +8877,6 @@ type BoundMenuSelectFieldProps<O, V extends Value> = Omit<MenuSelectFieldProps<O
8846
8877
  /** Binds `MenuSelectField` to a form field. */
8847
8878
  declare function BoundMenuSelectField<O, V extends Value>(props: BoundMenuSelectFieldProps<O, V>): JSX.Element;
8848
8879
 
8849
- type NestedOption<O> = O & {
8850
- children?: NestedOption<O>[];
8851
- defaultCollapsed?: boolean;
8852
- };
8853
- type NestedOptionsOrLoad<O> = NestedOption<O>[] | {
8854
- current: NestedOption<O>[];
8855
- load: () => Promise<{
8856
- options: NestedOption<O>[];
8857
- }>;
8858
- };
8859
- type TreeSelectResponse<O, V extends Value> = {
8860
- all: {
8861
- values: V[];
8862
- options: O[];
8863
- };
8864
- leaf: {
8865
- values: V[];
8866
- options: O[];
8867
- };
8868
- root: {
8869
- values: V[];
8870
- options: O[];
8871
- };
8872
- };
8873
-
8874
8880
  type MenuTreeSelectFieldProps<O, V extends Value> = MenuSelectFieldBaseProps<NestedOption<O>, V> & {
8875
8881
  /** Selected values. A parent selects its whole subtree; a parent whose children are all selected is selected too. */
8876
8882
  values: V[];
@@ -12038,7 +12044,9 @@ type ErrorMessageProps = {
12038
12044
  */
12039
12045
  declare function ErrorMessage(props: ErrorMessageProps): React$1.JSX.Element;
12040
12046
 
12041
- /** Select whose trigger shows the value and opens a menu. Search is included when the list is longer than `searchOptionLimit`, or when `onSearch` is set. See `MenuSelectField.mdx`. */
12047
+ /** Select whose trigger shows the value and opens a menu.
12048
+ *
12049
+ * Options with `children` are a tree: every node stays visible, and the trigger shows the path. Search is included when the list is longer than `searchOptionLimit`, or when `onSearch` is set. See `MenuSelectField.mdx`. */
12042
12050
  declare function MenuSelectField<O, V extends Value>(props: MenuSelectFieldProps<O, V>): JSX.Element;
12043
12051
 
12044
12052
  type ToggleButtonProps = {
package/dist/index.js CHANGED
@@ -5270,6 +5270,7 @@ var Icons = {
5270
5270
  arrowFromRight: /* @__PURE__ */ jsx2("path", { d: "M18 6H20V18H18V6ZM16 11H7.414L11.707 6.707L10.293 5.293L3.586 12L10.293 18.707L11.707 17.293L7.414 13H16V11Z" }),
5271
5271
  arrowFromTop: /* @__PURE__ */ jsx2("path", { d: "M6 4H18V6H6V4ZM12 20.414L18.707 13.707L17.293 12.293L13 16.586V8H11V16.586L6.707 12.293L5.293 13.707L12 20.414Z" }),
5272
5272
  subDirectoryRight: /* @__PURE__ */ jsx2("path", { d: "M14 13H8V5H6V14C6 14.553 6.447 15 7 15H14V18L19 14L14 10V13Z" }),
5273
+ swap: /* @__PURE__ */ jsx2("path", { d: "M4 9L19 9A1 1 0 0 0 19 7L4 7A1 1 0 0 0 4 9ZM15.7071 12.7071L19.7071 8.7071A1 1 0 0 0 18.2929 7.2929L14.2929 11.2929A1 1 0 0 0 15.7071 12.7071ZM19.7071 7.2929L15.7071 3.2929A1 1 0 0 0 14.2929 4.7071L18.2929 8.7071A1 1 0 0 0 19.7071 7.2929ZM20 15L5 15A1 1 0 0 0 5 17L20 17A1 1 0 0 0 20 15ZM9.7071 19.2929L5.7071 15.2929A1 1 0 0 0 4.2929 16.7071L8.2929 20.7071A1 1 0 0 0 9.7071 19.2929ZM5.7071 16.7071L9.7071 12.7071A1 1 0 0 0 8.2929 11.2929L4.2929 15.2929A1 1 0 0 0 5.7071 16.7071Z" }),
5273
5274
  // Media
5274
5275
  camera: /* @__PURE__ */ jsxs2(Fragment2, { children: [
5275
5276
  /* @__PURE__ */ jsx2("path", { d: "M12 8C9.832 8 8 9.832 8 12C8 14.168 9.832 16 12 16C14.168 16 16 14.168 16 12C16 9.832 14.168 8 12 8ZM12 14C10.935 14 10 13.065 10 12C10 10.935 10.935 10 12 10C13.065 10 14 10.935 14 12C14 13.065 13.065 14 12 14Z" }),
@@ -5545,6 +5546,7 @@ var Icons = {
5545
5546
  /* @__PURE__ */ jsx2("path", { d: "M 17.246094 7.484375 C 16.898438 7.453125 16.519531 7.453125 16.171875 7.515625 C 15.414062 5.304688 13.359375 3.789062 10.992188 3.789062 C 7.992188 3.789062 5.527344 6.285156 5.527344 9.316406 C 5.527344 9.410156 5.527344 9.472656 5.527344 9.570312 C 4.738281 9.695312 4.042969 10.074219 3.507812 10.640625 C 2.84375 11.335938 2.496094 12.253906 2.527344 13.230469 C 2.589844 15.125 4.265625 16.738281 6.191406 16.738281 L 7.421875 16.738281 C 7.675781 16.738281 7.898438 16.515625 7.898438 16.261719 C 7.898438 16.011719 7.644531 15.789062 7.390625 15.789062 L 6.160156 15.789062 C 4.738281 15.789062 3.507812 14.621094 3.445312 13.199219 C 3.414062 12.472656 3.664062 11.808594 4.171875 11.304688 C 4.644531 10.800781 5.339844 10.484375 6.035156 10.484375 C 6.160156 10.484375 6.285156 10.421875 6.382812 10.328125 C 6.476562 10.230469 6.507812 10.105469 6.476562 9.949219 C 6.445312 9.726562 6.445312 9.535156 6.445312 9.316406 C 6.445312 6.789062 8.464844 4.738281 10.960938 4.738281 C 13.011719 4.738281 14.8125 6.15625 15.347656 8.179688 C 15.414062 8.429688 15.664062 8.589844 15.917969 8.527344 C 16.328125 8.429688 16.707031 8.398438 17.117188 8.429688 C 19.011719 8.589844 20.464844 10.105469 20.527344 11.96875 C 20.558594 12.980469 20.179688 13.957031 19.484375 14.683594 C 18.792969 15.410156 17.84375 15.789062 16.832031 15.789062 L 16.738281 15.789062 C 16.484375 15.789062 16.265625 16.011719 16.265625 16.261719 C 16.265625 16.515625 16.484375 16.738281 16.738281 16.738281 L 16.832031 16.738281 C 18.097656 16.738281 19.296875 16.230469 20.148438 15.347656 C 21.035156 14.429688 21.476562 13.230469 21.445312 11.9375 C 21.414062 9.601562 19.582031 7.671875 17.246094 7.484375 Z M 17.246094 7.484375 " }),
5546
5547
  /* @__PURE__ */ jsx2("path", { d: "M 14.527344 15.535156 L 13.421875 15.535156 L 14.527344 12.882812 C 14.65625 12.601562 14.558594 12.285156 14.308594 12.125 C 14.210938 12.03125 14.085938 12 13.960938 12 C 13.800781 12 13.644531 12.0625 13.550781 12.15625 L 9.128906 16.105469 C 8.9375 16.292969 8.875 16.546875 8.96875 16.800781 C 9.066406 17.050781 9.285156 17.210938 9.570312 17.210938 L 10.675781 17.210938 L 9.476562 19.988281 C 9.347656 20.273438 9.445312 20.589844 9.695312 20.746094 C 9.792969 20.8125 9.917969 20.875 10.042969 20.875 C 10.203125 20.875 10.359375 20.8125 10.453125 20.714844 L 14.90625 16.640625 C 15.035156 16.515625 15.128906 16.359375 15.128906 16.167969 C 15.160156 15.820312 14.875 15.535156 14.527344 15.535156 Z M 10.074219 20.242188 L 11.402344 17.019531 L 11.9375 16.578125 L 9.539062 16.578125 L 13.960938 12.632812 L 12.695312 15.695312 C 12.601562 15.949219 12.695312 16.167969 12.980469 16.167969 L 14.558594 16.167969 Z M 10.074219 20.242188 " })
5547
5548
  ] }),
5549
+ undo: /* @__PURE__ */ jsx2("path", { d: "M9 10H15C16.654 10 18 11.346 18 13C18 14.654 16.654 16 15 16H12V18H15C17.757 18 20 15.757 20 13C20 10.243 17.757 8 15 8H9V5L4 9L9 13V10Z" }),
5548
5550
  undoCircle: /* @__PURE__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsx2("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M-0.000124931 11.9995C-0.000124931 5.3827 5.35788 -0.000488281 11.9435 -0.000488281C18.5914 -0.000488281 23.9999 5.3827 23.9999 11.9995C23.9999 18.6163 18.6166 23.9994 11.9999 23.9994C5.38308 23.9994 -0.000124931 18.6163 -0.000124931 11.9995ZM2.39988 11.9995C2.39988 17.2926 6.70667 21.5995 11.9999 21.5995C17.2931 21.5995 21.5999 17.2926 21.5999 11.9995C21.5999 6.70631 17.2691 2.39951 11.9435 2.39951C6.68028 2.39951 2.39988 6.70631 2.39988 11.9995ZM14.3997 10.7995H9.59969V12.7994L5.59968 9.59941L9.59969 6.39941V8.79941H14.3997C16.6054 8.79941 18.3997 10.5938 18.3997 12.7994C18.3997 15.005 16.6054 16.7994 14.3997 16.7994H11.9997V14.8795H14.3997C15.723 14.8795 16.5565 14.1227 16.5565 12.7994C16.5565 11.4762 15.723 10.7995 14.3997 10.7995Z" }) }),
5549
5551
  windy: /* @__PURE__ */ jsxs2(Fragment2, { children: [
5550
5552
  /* @__PURE__ */ jsx2("path", { d: "M 23.429688 12.695312 L 23.210938 12.695312 C 22.957031 12.695312 22.738281 12.914062 22.738281 13.167969 C 22.738281 13.421875 22.957031 13.640625 23.210938 13.640625 L 23.429688 13.640625 C 23.683594 13.640625 23.90625 13.421875 23.90625 13.167969 C 23.90625 12.914062 23.683594 12.695312 23.429688 12.695312 Z M 23.429688 12.695312 " }),
@@ -5569,11 +5571,16 @@ var Icons = {
5569
5571
  designPackage: /* @__PURE__ */ jsx2("path", { d: "M6.591 5.633A1308.744 1308.744 0 0 0 .876 10.58c-.445.429-.438 1.092.016 1.481.165.141.469.259.668.259.181 0 .452-.115.66-.28l.2-.158.01 4.759.01 4.759h19.52v-4.94c0-2.717.007-4.94.015-4.94s.091.027.185.06c.213.075.333.075.584.001.699-.208.942-1.094.444-1.615-.07-.073-.772-.665-1.56-1.315L20.197 7.47l.614-.625c.338-.344.681-.724.762-.845.289-.428.427-1.092.348-1.672-.092-.669-.347-1.197-.8-1.649-.516-.517-1.076-.756-1.841-.789-.391-.017-.509-.007-.779.067-.559.154-.72.268-1.654 1.173-.471.457-.868.83-.883.83-.015 0-.878-.702-1.919-1.56A241.53 241.53 0 0 0 12.146.843l-5.555 4.79m6.769-1.207c.627.518 1.14.954 1.14.968 0 .014-1.242 1.243-2.76 2.73l-2.76 2.703-.606 2.537a134.196 134.196 0 0 0-.595 2.547c.006.007 1.115-.207 2.466-.474l2.455-.486 3.04-3.032 3.04-3.032.568.466.567.467.003 4.79.002 4.79H4.44v-9.268l3.85-3.323c2.118-1.828 3.868-3.324 3.89-3.325.022-.001.553.423 1.18.942m6.256-.412c.202.155.304.372.304.652v.228l-.628.633c-.346.348-.641.633-.657.633-.024 0-.908-.711-1.067-.859-.042-.039.09-.184.672-.739l.725-.691.253.016c.199.013.283.04.398.127M16.657 7.14c.297.242.54.449.541.46.001.011-1.231 1.253-2.738 2.76l-2.74 2.74-.63.126c-.347.07-.635.122-.64.117-.006-.006.073-.351.175-.767l.185-.756 2.625-2.568c1.444-1.413 2.638-2.565 2.653-2.56.016.004.272.206.569.448", fillRule: "evenodd" }),
5570
5572
  updateDesignPackage: /* @__PURE__ */ jsx2("path", { d: "M6.34 5.463C3.37 8.025.798 10.25.624 10.408c-.371.338-.478.537-.475.881a.953.953 0 0 0 .343.732c.165.141.469.259.67.259.173 0 .44-.111.636-.264l.182-.141.01 4.742L2 21.36h6.573c7.298 0 6.786.019 7.082-.269.234-.226.322-.427.322-.731 0-.393-.189-.697-.556-.894l-.161-.086-5.61-.011-5.61-.01v-9.267l3.863-3.329c2.125-1.831 3.884-3.32 3.91-3.309.067.029 2.285 1.867 2.299 1.905.006.017-1.116 1.136-2.494 2.486L9.112 10.3l-.213.012-.213.012-.062.268c-.033.147-.331 1.401-.662 2.785a111.038 111.038 0 0 0-.589 2.529c.007.007 1.118-.205 2.47-.471l2.457-.484 3.046-3.042 3.047-3.042.562.469.562.468.011 2.528c.012 2.477.014 2.532.097 2.711.108.235.337.456.56.541.209.08.612.061.803-.038.182-.094.374-.301.468-.506.08-.172.085-.255.096-1.87.007-.93.018-1.69.025-1.69.007 0 .083.029.168.065.196.082.539.056.762-.058.189-.097.398-.323.484-.524.126-.298.05-.767-.163-.997a34.338 34.338 0 0 0-1.108-.939 1093.61 1093.61 0 0 1-1.473-1.22l-.453-.376.678-.685c.738-.748.872-.943.993-1.456.089-.378.056-1.131-.065-1.49-.256-.759-.754-1.328-1.461-1.666a2.682 2.682 0 0 0-1.199-.252 2.34 2.34 0 0 0-1.139.263c-.306.151-.344.184-1.681 1.483l-.34.33-1.914-1.579a242.13 242.13 0 0 0-1.92-1.576c-.003.001-2.436 2.098-5.406 4.66m12.782-1.502c.235.12.371.352.391.666l.017.258-.638.641-.637.641-.497-.409a26.934 26.934 0 0 1-.557-.464c-.051-.047-.001-.114.38-.498.241-.244.561-.55.71-.68.253-.221.284-.236.472-.236.122 0 .262.032.359.081m-2.656 3.323.366.304-2.756 2.756L11.32 13.1l-.63.126c-.347.07-.636.121-.644.113a9.854 9.854 0 0 1 .159-.738l.173-.726.901-.892c.495-.491 1.693-1.667 2.661-2.614l1.759-1.72.201.165c.11.09.365.302.566.47m3.854 9.601c-.366.07-.687.404-.76.79-.022.119-.04.545-.04.948v.732l-.89.012c-.822.012-.902.02-1.05.099a1.007 1.007 0 0 0-.538.894c0 .377.202.712.538.894.148.079.228.087 1.046.099l.886.012.014.868c.013.809.02.879.106 1.054.051.104.163.251.248.328.149.134.474.265.66.265.186 0 .511-.131.66-.265.085-.077.197-.224.248-.328.086-.175.093-.245.106-1.054l.014-.868.886-.012c.962-.014 1.019-.026 1.28-.268.199-.185.266-.366.266-.725s-.067-.54-.266-.725c-.261-.242-.318-.254-1.28-.268l-.886-.012-.016-.868c-.017-.949-.034-1.029-.269-1.297-.225-.257-.599-.375-.963-.305", fillRule: "evenodd" }),
5571
5573
  exteriorStyle: /* @__PURE__ */ jsx2("path", { d: "m11.378 2.08-1.158.998-.078-.109a6.796 6.796 0 0 0-.36-.405 4.617 4.617 0 0 0-4.099-1.383c-1.436.233-2.759 1.221-3.384 2.527-.35.73-.478 1.362-.446 2.192.023.599.106 1.025.292 1.488l.104.26-.157.166A6.027 6.027 0 0 0 .787 9.985a5.927 5.927 0 0 0-.001 3.855c.292.87.765 1.625 1.437 2.297a5.61 5.61 0 0 0 1.389 1.044l.349.186-.011 2.206-.01 2.207-1.97.01-1.97.011V23.8h24v-2h-1.52v-9.918l.185.117a.96.96 0 0 0 1.16-.088L24 11.75v-1.173l-.17-.165c-.093-.09-2.645-2.202-5.67-4.693a5312.503 5312.503 0 0 1-5.562-4.583c-.053-.046-.217.081-1.22.944M7.24 3.235c.756.241 1.446.931 1.684 1.685.115.363.141.94.06 1.319-.091.426-.279.79-.7 1.355-.203.272-.364.498-.357.504l.513.371c.275.199.598.449.718.556.477.428.946 1.215 1.13 1.895.079.293.092.434.091 1.02 0 .588-.013.723-.092.999-.394 1.371-1.392 2.39-2.749 2.807-.332.102-.41.11-1.078.112-.636.002-.757-.009-1.04-.09-1.153-.332-2.032-1.061-2.542-2.108-.323-.663-.378-.918-.375-1.74.002-.833.062-1.108.377-1.748.347-.703.705-1.093 1.56-1.7.253-.18.475-.339.493-.355.019-.015-.133-.25-.336-.522-.563-.753-.756-1.238-.756-1.895 0-1.182.858-2.263 1.999-2.52.362-.082 1.056-.054 1.4.055m9.305 3.745c2.917 2.404 3.954 3.281 3.952 3.34-.001.044-.006 2.501-.01 5.46l-.007 5.38H8.92v-3.793l.348-.186a5.61 5.61 0 0 0 1.389-1.044 5.558 5.558 0 0 0 1.082-1.465c1.153-2.22.814-4.862-.867-6.761l-.238-.269.103-.258c.22-.55.28-.906.282-1.664.001-.686.003-.702.095-.776.052-.042.393-.334.759-.65s.677-.574.691-.574c.014 0 1.806 1.467 3.981 3.26M6.92 19.54v1.62h-.96v-3.24h.96v1.62", fillRule: "evenodd" }),
5574
+ squareFootage: /* @__PURE__ */ jsxs2(Fragment2, { children: [
5575
+ /* @__PURE__ */ jsx2("path", { d: "M3.61719 3.07617C3.99086 2.92139 4.42103 3.00697 4.70703 3.29297L20.707 19.293C20.993 19.579 21.0786 20.0091 20.9238 20.3828C20.769 20.7564 20.4044 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.59558 3.24359 3.23098 3.61719 3.07617ZM5 19H17.5859L5 6.41406V19Z" }),
5576
+ /* @__PURE__ */ jsx2("path", { d: "M7.61719 12.0762C7.99086 11.9214 8.42103 12.007 8.70703 12.293L11.707 15.293C11.993 15.579 12.0786 16.0091 11.9238 16.3828C11.769 16.7564 11.4044 17 11 17H8C7.44772 17 7 16.5523 7 16V13C7 12.5956 7.24359 12.231 7.61719 12.0762Z" })
5577
+ ] }),
5572
5578
  time: /* @__PURE__ */ jsxs2(Fragment2, { children: [
5573
5579
  /* @__PURE__ */ jsx2("path", { d: "M12 2C6.486 2 2 6.486 2 12C2 17.514 6.486 22 12 22C17.514 22 22 17.514 22 12C22 6.486 17.514 2 12 2ZM12 20C7.589 20 4 16.411 4 12C4 7.589 7.589 4 12 4C16.411 4 20 7.589 20 12C20 16.411 16.411 20 12 20Z" }),
5574
5580
  /* @__PURE__ */ jsx2("path", { d: "M13 7H11V13H17V11H13V7Z" })
5575
5581
  ] }),
5576
5582
  lockOpen: /* @__PURE__ */ jsx2("path", { d: "M17 8V7C17 4.243 14.757 2 12 2C9.243 2 7 4.243 7 7V10H6C4.897 10 4 10.897 4 12V20C4 21.103 4.897 22 6 22H18C19.103 22 20 21.103 20 20V12C20 10.897 19.103 10 18 10H9V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V8H17ZM18 12L18.002 20H6V12H18Z" }),
5583
+ lockClosed: /* @__PURE__ */ jsx2("path", { d: "M12 2C9.243 2 7 4.243 7 7V10H6C4.897 10 4 10.897 4 12V20C4 21.103 4.897 22 6 22H18C19.103 22 20 21.103 20 20V12C20 10.897 19.103 10 18 10H17V7C17 4.243 14.757 2 12 2ZM18 12L18.002 20H6V12H18ZM9 10V7C9 5.346 10.346 4 12 4C13.654 4 15 5.346 15 7V10H9Z" }),
5577
5584
  map: /* @__PURE__ */ jsxs2(Fragment2, { children: [
5578
5585
  /* @__PURE__ */ jsx2("path", { d: "M12 14C14.206 14 16 12.206 16 10C16 7.794 14.206 6 12 6C9.794 6 8 7.794 8 10C8 12.206 9.794 14 12 14ZM12 8C13.103 8 14 8.897 14 10C14 11.103 13.103 12 12 12C10.897 12 10 11.103 10 10C10 8.897 10.897 8 12 8Z" }),
5579
5586
  /* @__PURE__ */ jsx2("path", { d: "M11.42 21.814C11.594 21.938 11.797 22 12 22C12.203 22 12.406 21.938 12.58 21.814C12.884 21.599 20.029 16.44 20 10C20 5.589 16.411 2 12 2C7.58897 2 3.99997 5.589 3.99997 9.995C3.97097 16.44 11.116 21.599 11.42 21.814ZM12 4C15.309 4 18 6.691 18 10.005C18.021 14.443 13.612 18.428 12 19.735C10.389 18.427 5.97897 14.441 5.99997 10C5.99997 6.691 8.69097 4 12 4Z" })
@@ -18823,7 +18830,7 @@ function valueToKey(value) {
18823
18830
  }
18824
18831
 
18825
18832
  // src/inputs/internal/selectFieldHelpers.ts
18826
- function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetLabel, autoSort) {
18833
+ function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetLabel, autoSort, getChildren) {
18827
18834
  const result = [];
18828
18835
  if (unsetLabel) {
18829
18836
  result.push(unsetOption);
@@ -18840,8 +18847,8 @@ function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetL
18840
18847
  const toCheck = Array.isArray(current2) ? current2 : [current2];
18841
18848
  toCheck.forEach((current3) => {
18842
18849
  const value = getOptionValue(current3);
18843
- const found = options && options.find((o) => getOptionValue(o) === value);
18844
- if (!found) {
18850
+ const alreadyListed = options !== void 0 && optionsIncludeValue(options, value, getOptionValue, getChildren);
18851
+ if (!alreadyListed) {
18845
18852
  userOptions.push(current3);
18846
18853
  }
18847
18854
  });
@@ -18851,6 +18858,13 @@ function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetL
18851
18858
  return result;
18852
18859
  }
18853
18860
  var unsetOption = {};
18861
+ function optionsIncludeValue(options, value, getOptionValue, getChildren) {
18862
+ return options.some((option) => {
18863
+ if (getOptionValue(option) === value) return true;
18864
+ const children = getChildren?.(option);
18865
+ return children !== void 0 && optionsIncludeValue(children, value, getOptionValue, getChildren);
18866
+ });
18867
+ }
18854
18868
  function disabledOptionToKeyedTuple(disabledOption) {
18855
18869
  if (typeof disabledOption === "object" && disabledOption !== null) {
18856
18870
  return [valueToKey(disabledOption.value), disabledOption.reason];
@@ -19620,7 +19634,9 @@ function BaseOptionRow(props) {
19620
19634
  id,
19621
19635
  disabledReason,
19622
19636
  mixedLegendId,
19623
- variant
19637
+ variant,
19638
+ indent,
19639
+ isPathRoot
19624
19640
  } = props;
19625
19641
  const entry = item.value;
19626
19642
  const ref = useRef34(null);
@@ -19655,6 +19671,11 @@ function BaseOptionRow(props) {
19655
19671
  ref,
19656
19672
  ...trussProps76({
19657
19673
  ...rowCss,
19674
+ ...indent !== void 0 ? {
19675
+ paddingLeft: ["pl_var", {
19676
+ "--paddingLeft": `${indent}px`
19677
+ }]
19678
+ } : {},
19658
19679
  ...highlighted ? {
19659
19680
  backgroundColor: ["bgColor_var", {
19660
19681
  "--backgroundColor": "var(--b-surface-raised-hover)"
@@ -19671,7 +19692,17 @@ function BaseOptionRow(props) {
19671
19692
  children: [
19672
19693
  variant === "checkbox" && /* @__PURE__ */ jsx115(StyledCheckbox, { isSelected, isDisabled }),
19673
19694
  variant === "checkbox" && mixedLegendId && /* @__PURE__ */ jsx115(MixedDot, {}),
19674
- /* @__PURE__ */ jsx115("span", { className: "fg1 mw0", children: item.rendered }),
19695
+ /* @__PURE__ */ jsx115("span", { ...trussProps76({
19696
+ ...{
19697
+ flexGrow: "fg1",
19698
+ minWidth: "mw0"
19699
+ },
19700
+ ...isPathRoot ? {
19701
+ fontWeight: "fw6",
19702
+ fontSize: "fz_14px",
19703
+ lineHeight: "lh_20px"
19704
+ } : {}
19705
+ }), children: item.rendered }),
19675
19706
  variant === "check" && isSelected && /* @__PURE__ */ jsx115("span", { className: "df aic fs0", children: /* @__PURE__ */ jsx115(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ }) }),
19676
19707
  variant === "check" && mixedLegendId && // Centered in the check icon's 24px box.
19677
19708
  /* @__PURE__ */ jsx115("span", { className: "df aic jcc fs0 h_24px w_24px", children: /* @__PURE__ */ jsx115(MixedDot, {}) })
@@ -19681,6 +19712,21 @@ function BaseOptionRow(props) {
19681
19712
  });
19682
19713
  }
19683
19714
  function TreeOptionRow(props) {
19715
+ const {
19716
+ selectionMode,
19717
+ onExpandedChange,
19718
+ ...rowProps
19719
+ } = props;
19720
+ if (selectionMode === "single") return /* @__PURE__ */ jsx115(SingleTreeOptionRow, { ...rowProps });
19721
+ return /* @__PURE__ */ jsx115(MultiTreeOptionRow, { ...rowProps, selectionMode, onExpandedChange });
19722
+ }
19723
+ function SingleTreeOptionRow({
19724
+ row,
19725
+ ...rest
19726
+ }) {
19727
+ return /* @__PURE__ */ jsx115(BaseOptionRow, { ...rest, variant: "check", indent: rowPaddingX + row.level * singleTreeIndent, isPathRoot: row.level === 0 });
19728
+ }
19729
+ function MultiTreeOptionRow(props) {
19684
19730
  const {
19685
19731
  item,
19686
19732
  state,
@@ -19771,6 +19817,7 @@ function TreeOptionRow(props) {
19771
19817
  }
19772
19818
  var menuRowHeight = 40;
19773
19819
  var rowPaddingX = 16;
19820
+ var singleTreeIndent = 16;
19774
19821
  var treeIndent = 28;
19775
19822
  var rowCss = {
19776
19823
  display: "df",
@@ -19848,7 +19895,7 @@ function OptionList(props) {
19848
19895
  disabledReasons,
19849
19896
  initialIndex,
19850
19897
  loading,
19851
- rowVariant,
19898
+ selectionMode,
19852
19899
  tree,
19853
19900
  mixed
19854
19901
  } = menu;
@@ -19877,8 +19924,7 @@ function OptionList(props) {
19877
19924
  });
19878
19925
  }, [focusedKey, state.collection]);
19879
19926
  const [initialTop] = useState30(() => Math.max(0, Math.min(initialIndex, items.length - 1)));
19880
- const Row2 = rowVariant === "checkbox" ? MultiOptionRow : SingleOptionRow;
19881
- const isTree = rowVariant === "tree" && tree !== void 0;
19927
+ const Row2 = selectionMode === "multiple" ? MultiOptionRow : SingleOptionRow;
19882
19928
  const isTest = process.env.NODE_ENV === "test";
19883
19929
  return /* @__PURE__ */ jsx116("div", { ...listBoxProps, ...onKeyDown ? {
19884
19930
  onKeyDown,
@@ -19902,10 +19948,10 @@ function OptionList(props) {
19902
19948
  const item = items[index];
19903
19949
  const entry = item?.value;
19904
19950
  if (!item || !entry) return null;
19905
- const treeRow = isTree ? tree?.rows.get(String(item.key)) : void 0;
19951
+ const treeRow = tree?.rows.get(String(item.key));
19906
19952
  const mixedLegendId = mixed?.keys.has(entry.valueKey) ? mixed.legendId : void 0;
19907
19953
  if (treeRow && tree) {
19908
- return /* @__PURE__ */ jsx116(TreeOptionRow, { item, state, id: optionDomId(id, index), disabledReason: disabledReasons[entry.valueKey], mixedLegendId, row: treeRow, onExpandedChange: (expanded) => tree.setExpanded(String(item.key), expanded), ...tid });
19954
+ return /* @__PURE__ */ jsx116(TreeOptionRow, { item, state, id: optionDomId(id, index), disabledReason: disabledReasons[entry.valueKey], mixedLegendId, row: treeRow, selectionMode, onExpandedChange: (expanded) => tree.setExpanded(String(item.key), expanded), ...tid });
19909
19955
  }
19910
19956
  return /* @__PURE__ */ jsx116(Row2, { item, state, id: optionDomId(id, index), disabledReason: disabledReasons[entry.valueKey], mixedLegendId, ...tid });
19911
19957
  } }, isTest ? items.length : "virtuoso"),
@@ -20178,10 +20224,10 @@ function useMenuSelectField(props) {
20178
20224
  const getOptionLabel = (option) => unsetLabel && option === unsetOption ? unsetLabel : propGetOptionLabel(option);
20179
20225
  const getOptionValue = (option) => unsetLabel && option === unsetOption ? void 0 : propGetOptionValue(option);
20180
20226
  const options = useMemo28(
20181
- () => initializeOptions(optionsProp, getOptionValue, getOptionLabel, unsetLabel, autoSort),
20227
+ () => initializeOptions(optionsProp, getOptionValue, getOptionLabel, unsetLabel, autoSort, getChildren),
20182
20228
  // getOptionValue and getOptionLabel are typically inline lambdas
20183
20229
  // oxlint-disable-next-line react-hooks/exhaustive-deps
20184
- [optionsProp, autoSort, unsetLabel]
20230
+ [optionsProp, autoSort, unsetLabel, getChildren]
20185
20231
  );
20186
20232
  const { hoverProps, isHovered } = useHover13({});
20187
20233
  const { focusProps, isFocusVisible } = useFocusRing10();
@@ -20192,6 +20238,8 @@ function useMenuSelectField(props) {
20192
20238
  // oxlint-disable-next-line react-hooks/exhaustive-deps
20193
20239
  [options, getChildren]
20194
20240
  );
20241
+ const isSingleSelectTree = !multiple && menuTree !== void 0;
20242
+ const isMultiSelectTree = multiple && menuTree !== void 0;
20195
20243
  const allOptions = useMemo28(
20196
20244
  () => menuTree ? menuTree.orderedKeys.map((k) => menuTree.nodes.get(k).option) : options,
20197
20245
  [menuTree, options]
@@ -20210,12 +20258,17 @@ function useMenuSelectField(props) {
20210
20258
  const { effectiveValue, proposalProps } = useAiProposal(
20211
20259
  propValues,
20212
20260
  proposedValues,
20213
- (vs) => labelsFor(vs, allOptions, getOptionValue, getOptionLabel).join(", ")
20261
+ (vs) => labelsFor(
20262
+ vs,
20263
+ allOptions,
20264
+ getOptionValue,
20265
+ (option) => isSingleSelectTree && menuTree ? optionPathLabel(menuTree, valueToKey(getOptionValue(option)), getOptionLabel) ?? getOptionLabel(option) : getOptionLabel(option)
20266
+ ).join(", ")
20214
20267
  );
20215
20268
  const values = useMemo28(() => effectiveValue ?? [], [effectiveValue]);
20216
20269
  const selectedKeys = useMemo28(
20217
- () => menuTree ? normalizeTreeSelection(menuTree, values.map(valueToKey), disabledKeySet) : new Set(values.map(valueToKey)),
20218
- [menuTree, values, disabledKeySet]
20270
+ () => isMultiSelectTree && menuTree ? normalizeTreeSelection(menuTree, values.map(valueToKey), disabledKeySet) : new Set(values.map(valueToKey)),
20271
+ [isMultiSelectTree, menuTree, values, disabledKeySet]
20219
20272
  );
20220
20273
  const selectedRowKeys = useMemo28(
20221
20274
  () => menuTree ? new Set(menuTree.orderedKeys.filter((key) => selectedKeys.has(menuTree.nodes.get(key).valueKey))) : selectedKeys,
@@ -20259,10 +20312,11 @@ function useMenuSelectField(props) {
20259
20312
  return visibleNestedRows(
20260
20313
  roots,
20261
20314
  (node) => childNodes(menuTree, node),
20262
- (node) => isExpanded(node.key),
20315
+ // A single-select hierarchy has no chevrons, so every node stays visible.
20316
+ isMultiSelectTree ? (node) => isExpanded(node.key) : () => true,
20263
20317
  matchKeys ? (node) => matchKeys.has(node.valueKey) : void 0
20264
20318
  );
20265
- }, [menuTree, allOptions, search, serverSearch, contains, expandedKeys, searchCollapsedKeys]);
20319
+ }, [menuTree, isMultiSelectTree, allOptions, search, serverSearch, contains, expandedKeys, searchCollapsedKeys]);
20266
20320
  const filteredOptions = useMemo28(
20267
20321
  () => menuTree || !search || serverSearch ? options : options.filter(
20268
20322
  (option) => unsetLabel && option === unsetOption ? contains(getOptionLabel(option), search) : matchesSearch(option, search, getOptionLabel, getOptionSearchText, contains)
@@ -20273,7 +20327,7 @@ function useMenuSelectField(props) {
20273
20327
  );
20274
20328
  function onSelectionChange(keys) {
20275
20329
  if (keys === "all") return;
20276
- if (menuTree) {
20330
+ if (isMultiSelectTree && menuTree) {
20277
20331
  const added = [...keys].map(String).find((key2) => !selectedRowKeys.has(key2));
20278
20332
  const removed = [...selectedRowKeys].find((key2) => !keys.has(key2));
20279
20333
  const key = added ?? removed;
@@ -20290,7 +20344,7 @@ function useMenuSelectField(props) {
20290
20344
  close({ restoreFocus: true });
20291
20345
  return;
20292
20346
  }
20293
- const opt = optionsByKey.get(String(key));
20347
+ const opt = isSingleSelectTree && menuTree ? menuTree.nodes.get(String(key))?.option : optionsByKey.get(String(key));
20294
20348
  proposalProps.onUserEdit?.();
20295
20349
  onCommit(opt === void 0 ? [] : [getOptionValue(opt)], opt === void 0 ? [] : [opt]);
20296
20350
  close({ restoreFocus: true });
@@ -20416,7 +20470,7 @@ function useMenuSelectField(props) {
20416
20470
  switch (e.key) {
20417
20471
  case "ArrowRight":
20418
20472
  case "ArrowLeft":
20419
- onTreeArrow(e, current2);
20473
+ if (isMultiSelectTree) onTreeArrow(e, current2);
20420
20474
  break;
20421
20475
  case "ArrowDown":
20422
20476
  e.preventDefault();
@@ -20487,20 +20541,20 @@ function useMenuSelectField(props) {
20487
20541
  0,
20488
20542
  treeRows ? treeRows.findIndex(({ node }) => revealKeys.has(node.valueKey)) : filteredOptions.findIndex((o) => revealKeys.has(valueToKey(getOptionValue(o))))
20489
20543
  );
20490
- const selectedText = !multiple && selectedOptions[0] !== void 0 ? getOptionLabel(selectedOptions[0]) : "";
20544
+ const selectedText = !multiple && selectedOptions[0] !== void 0 ? isSingleSelectTree && menuTree ? optionPathLabel(menuTree, valueToKey(getOptionValue(selectedOptions[0])), getOptionLabel) ?? getOptionLabel(selectedOptions[0]) : getOptionLabel(selectedOptions[0]) : "";
20491
20545
  const hasSelection = menuTree ? selectedKeys.size > 0 : values.length > 0;
20492
20546
  const isMixed = dottedKeys.size > 0 && (multiple || !hasSelection);
20493
20547
  const displayText = isMixed ? mixedLabel : selectedText || (hasSelection ? "" : nothingSelectedText || placeholder || "");
20494
20548
  const isPlaceholder = !isMixed && !selectedText && !hasSelection && !nothingSelectedText && !!placeholder;
20495
- const selectedLabels = menuTree && tree && getChildren ? bucketTreeSelection(selectedOptions, getChildren)[tree.display].map((option) => ({
20549
+ const selectedLabels = isMultiSelectTree && getChildren && tree?.display ? bucketTreeSelection(selectedOptions, getChildren)[tree.display].map((option) => ({
20496
20550
  key: valueToKey(getOptionValue(option)),
20497
20551
  label: getOptionLabel(option)
20498
20552
  })) : multiple ? selectedOptions.map((o) => ({ key: valueToKey(getOptionValue(o)), label: getOptionLabel(o) })) : [];
20499
20553
  const badgeKeys = isMixed ? /* @__PURE__ */ new Set([...selectedLabels.map(({ key }) => key), ...dottedKeys]) : void 0;
20500
20554
  const badgeLabels = badgeKeys ? [...optionsByKey].filter(([key]) => badgeKeys.has(key)).map(([key, option]) => ({ key, label: getOptionLabel(option) })) : selectedLabels;
20501
20555
  const partialKeys = useMemo28(
20502
- () => menuTree ? partiallySelectedKeys(menuTree, selectedKeys) : void 0,
20503
- [menuTree, selectedKeys]
20556
+ () => isMultiSelectTree && menuTree ? partiallySelectedKeys(menuTree, selectedKeys) : void 0,
20557
+ [isMultiSelectTree, menuTree, selectedKeys]
20504
20558
  );
20505
20559
  const treeRowStates = treeRows ? new Map(
20506
20560
  treeRows.map(({ node, level }) => [
@@ -20508,15 +20562,15 @@ function useMenuSelectField(props) {
20508
20562
  {
20509
20563
  level,
20510
20564
  hasChildren: node.childKeys.length > 0,
20511
- isExpanded: node.childKeys.length > 0 && isExpanded(node.key),
20512
- isIndeterminate: !!partialKeys?.has(node.key)
20565
+ isExpanded: isMultiSelectTree ? node.childKeys.length > 0 && isExpanded(node.key) : true,
20566
+ isIndeterminate: isMultiSelectTree && !!partialKeys?.has(node.key)
20513
20567
  }
20514
20568
  ])
20515
20569
  ) : void 0;
20516
20570
  function deselect(key) {
20517
20571
  if (!multiple || disabledKeys.includes(key)) return;
20518
20572
  proposalProps.onUserEdit?.();
20519
- if (menuTree) {
20573
+ if (isMultiSelectTree && menuTree) {
20520
20574
  const toggledKeys = toggleTreeSelection(menuTree, selectedKeys, key, false, disabledKeySet);
20521
20575
  commitTree(toggledKeys, key);
20522
20576
  return;
@@ -20589,7 +20643,7 @@ function useMenuSelectField(props) {
20589
20643
  loading: optionsLoading,
20590
20644
  disabledReasons,
20591
20645
  initialIndex,
20592
- rowVariant: treeRowStates ? "tree" : multiple ? "checkbox" : "check",
20646
+ selectionMode,
20593
20647
  tree: treeRowStates ? { rows: treeRowStates, setExpanded: setTreeExpanded } : void 0,
20594
20648
  mixed: dottedKeys.size > 0 ? { keys: dottedKeys, legendId } : void 0,
20595
20649
  onKeyDown: onMenuKeyDown,
@@ -20659,6 +20713,17 @@ function labelsFor(values, options, getOptionValue, getOptionLabel) {
20659
20713
  }
20660
20714
  return labels;
20661
20715
  }
20716
+ function optionPathLabel(tree, valueKey, getOptionLabel) {
20717
+ const node = tree.orderedKeys.map((key) => tree.nodes.get(key)).find((entry) => entry.valueKey === valueKey);
20718
+ if (!node) return void 0;
20719
+ const labels = [];
20720
+ let current2 = node;
20721
+ while (current2) {
20722
+ labels.unshift(getOptionLabel(current2.option));
20723
+ current2 = current2.parentKey === void 0 ? void 0 : tree.nodes.get(current2.parentKey);
20724
+ }
20725
+ return labels.join(" > ");
20726
+ }
20662
20727
  function rootNodes(tree) {
20663
20728
  return tree.orderedKeys.filter((key) => tree.nodes.get(key).parentKey === void 0).map((key) => tree.nodes.get(key));
20664
20729
  }
@@ -20771,7 +20836,8 @@ function BaseMenuSelectField(props) {
20771
20836
  // src/inputs/MenuSelectField/MenuSelectField.tsx
20772
20837
  import { jsx as jsx119 } from "react/jsx-runtime";
20773
20838
  function MenuSelectField(props) {
20774
- const { value, proposedValue, onSelect, unsetLabel, ...rest } = props;
20839
+ const { value, proposedValue, onSelect, unsetLabel, options, autoSort, ...rest } = props;
20840
+ const nested = optionsHaveChildren(options);
20775
20841
  const values = useMemo29(() => {
20776
20842
  if (value !== void 0) return [value];
20777
20843
  return unsetLabel ? [void 0] : [];
@@ -20781,10 +20847,13 @@ function MenuSelectField(props) {
20781
20847
  BaseMenuSelectField,
20782
20848
  {
20783
20849
  ...rest,
20850
+ options,
20784
20851
  unsetLabel,
20852
+ autoSort: autoSort ?? !nested,
20785
20853
  selectionMode: "single",
20786
20854
  values,
20787
20855
  proposedValues,
20856
+ tree: nested ? { getChildren: menuOptionChildren } : void 0,
20788
20857
  onCommit: (next, opts) => {
20789
20858
  const option = opts[0];
20790
20859
  onSelect(next[0], option === unsetOption ? void 0 : option);
@@ -20792,6 +20861,19 @@ function MenuSelectField(props) {
20792
20861
  }
20793
20862
  );
20794
20863
  }
20864
+ function optionsHaveChildren(options) {
20865
+ const list = Array.isArray(options) ? options : [
20866
+ ...options.current === void 0 ? [] : Array.isArray(options.current) ? options.current : [options.current],
20867
+ ...options.options ?? []
20868
+ ];
20869
+ return list.some((option) => isNestedOption(option) && (option.children?.length ?? 0) > 0);
20870
+ }
20871
+ function menuOptionChildren(option) {
20872
+ return isNestedOption(option) ? option.children : void 0;
20873
+ }
20874
+ function isNestedOption(option) {
20875
+ return typeof option === "object" && option !== null && "children" in option && Array.isArray(option.children);
20876
+ }
20795
20877
 
20796
20878
  // src/components/Filters/Filters.tsx
20797
20879
  import { jsx as jsx120, jsxs as jsxs79 } from "react/jsx-runtime";