@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.cjs CHANGED
@@ -5738,6 +5738,7 @@ var Icons = {
5738
5738
  arrowFromRight: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M18 6H20V18H18V6ZM16 11H7.414L11.707 6.707L10.293 5.293L3.586 12L10.293 18.707L11.707 17.293L7.414 13H16V11Z" }),
5739
5739
  arrowFromTop: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M6 4H18V6H6V4ZM12 20.414L18.707 13.707L17.293 12.293L13 16.586V8H11V16.586L6.707 12.293L5.293 13.707L12 20.414Z" }),
5740
5740
  subDirectoryRight: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M14 13H8V5H6V14C6 14.553 6.447 15 7 15H14V18L19 14L14 10V13Z" }),
5741
+ swap: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
5741
5742
  // Media
5742
5743
  camera: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
5743
5744
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
@@ -6013,6 +6014,7 @@ var Icons = {
6013
6014
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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 " }),
6014
6015
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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 " })
6015
6016
  ] }),
6017
+ undo: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6016
6018
  undoCircle: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }) }),
6017
6019
  windy: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
6018
6020
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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 " }),
@@ -6037,11 +6039,16 @@ var Icons = {
6037
6039
  designPackage: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6038
6040
  updateDesignPackage: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6039
6041
  exteriorStyle: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6042
+ squareFootage: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
6043
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6044
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" })
6045
+ ] }),
6040
6046
  time: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
6041
6047
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6042
6048
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M13 7H11V13H17V11H13V7Z" })
6043
6049
  ] }),
6044
6050
  lockOpen: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6051
+ lockClosed: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6045
6052
  map: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
6046
6053
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" }),
6047
6054
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("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" })
@@ -19334,7 +19341,7 @@ function valueToKey(value) {
19334
19341
  }
19335
19342
 
19336
19343
  // src/inputs/internal/selectFieldHelpers.ts
19337
- function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetLabel, autoSort) {
19344
+ function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetLabel, autoSort, getChildren) {
19338
19345
  const result = [];
19339
19346
  if (unsetLabel) {
19340
19347
  result.push(unsetOption);
@@ -19351,8 +19358,8 @@ function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetL
19351
19358
  const toCheck = Array.isArray(current2) ? current2 : [current2];
19352
19359
  toCheck.forEach((current3) => {
19353
19360
  const value = getOptionValue(current3);
19354
- const found = options && options.find((o) => getOptionValue(o) === value);
19355
- if (!found) {
19361
+ const alreadyListed = options !== void 0 && optionsIncludeValue(options, value, getOptionValue, getChildren);
19362
+ if (!alreadyListed) {
19356
19363
  userOptions.push(current3);
19357
19364
  }
19358
19365
  });
@@ -19362,6 +19369,13 @@ function initializeOptions(optionsOrLoad, getOptionValue, getOptionLabel, unsetL
19362
19369
  return result;
19363
19370
  }
19364
19371
  var unsetOption = {};
19372
+ function optionsIncludeValue(options, value, getOptionValue, getChildren) {
19373
+ return options.some((option) => {
19374
+ if (getOptionValue(option) === value) return true;
19375
+ const children = getChildren?.(option);
19376
+ return children !== void 0 && optionsIncludeValue(children, value, getOptionValue, getChildren);
19377
+ });
19378
+ }
19365
19379
  function disabledOptionToKeyedTuple(disabledOption) {
19366
19380
  if (typeof disabledOption === "object" && disabledOption !== null) {
19367
19381
  return [valueToKey(disabledOption.value), disabledOption.reason];
@@ -20131,7 +20145,9 @@ function BaseOptionRow(props) {
20131
20145
  id,
20132
20146
  disabledReason,
20133
20147
  mixedLegendId,
20134
- variant
20148
+ variant,
20149
+ indent,
20150
+ isPathRoot
20135
20151
  } = props;
20136
20152
  const entry = item.value;
20137
20153
  const ref = (0, import_react83.useRef)(null);
@@ -20166,6 +20182,11 @@ function BaseOptionRow(props) {
20166
20182
  ref,
20167
20183
  ...(0, import_runtime86.trussProps)({
20168
20184
  ...rowCss,
20185
+ ...indent !== void 0 ? {
20186
+ paddingLeft: ["pl_var", {
20187
+ "--paddingLeft": `${indent}px`
20188
+ }]
20189
+ } : {},
20169
20190
  ...highlighted ? {
20170
20191
  backgroundColor: ["bgColor_var", {
20171
20192
  "--backgroundColor": "var(--b-surface-raised-hover)"
@@ -20182,7 +20203,17 @@ function BaseOptionRow(props) {
20182
20203
  children: [
20183
20204
  variant === "checkbox" && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(StyledCheckbox, { isSelected, isDisabled }),
20184
20205
  variant === "checkbox" && mixedLegendId && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(MixedDot, {}),
20185
- /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "fg1 mw0", children: item.rendered }),
20206
+ /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { ...(0, import_runtime86.trussProps)({
20207
+ ...{
20208
+ flexGrow: "fg1",
20209
+ minWidth: "mw0"
20210
+ },
20211
+ ...isPathRoot ? {
20212
+ fontWeight: "fw6",
20213
+ fontSize: "fz_14px",
20214
+ lineHeight: "lh_20px"
20215
+ } : {}
20216
+ }), children: item.rendered }),
20186
20217
  variant === "check" && isSelected && /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "df aic fs0", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ }) }),
20187
20218
  variant === "check" && mixedLegendId && // Centered in the check icon's 24px box.
20188
20219
  /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "df aic jcc fs0 h_24px w_24px", children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(MixedDot, {}) })
@@ -20192,6 +20223,21 @@ function BaseOptionRow(props) {
20192
20223
  });
20193
20224
  }
20194
20225
  function TreeOptionRow(props) {
20226
+ const {
20227
+ selectionMode,
20228
+ onExpandedChange,
20229
+ ...rowProps
20230
+ } = props;
20231
+ if (selectionMode === "single") return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(SingleTreeOptionRow, { ...rowProps });
20232
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(MultiTreeOptionRow, { ...rowProps, selectionMode, onExpandedChange });
20233
+ }
20234
+ function SingleTreeOptionRow({
20235
+ row,
20236
+ ...rest
20237
+ }) {
20238
+ return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(BaseOptionRow, { ...rest, variant: "check", indent: rowPaddingX + row.level * singleTreeIndent, isPathRoot: row.level === 0 });
20239
+ }
20240
+ function MultiTreeOptionRow(props) {
20195
20241
  const {
20196
20242
  item,
20197
20243
  state,
@@ -20282,6 +20328,7 @@ function TreeOptionRow(props) {
20282
20328
  }
20283
20329
  var menuRowHeight = 40;
20284
20330
  var rowPaddingX = 16;
20331
+ var singleTreeIndent = 16;
20285
20332
  var treeIndent = 28;
20286
20333
  var rowCss = {
20287
20334
  display: "df",
@@ -20359,7 +20406,7 @@ function OptionList(props) {
20359
20406
  disabledReasons,
20360
20407
  initialIndex,
20361
20408
  loading,
20362
- rowVariant,
20409
+ selectionMode,
20363
20410
  tree,
20364
20411
  mixed
20365
20412
  } = menu;
@@ -20388,8 +20435,7 @@ function OptionList(props) {
20388
20435
  });
20389
20436
  }, [focusedKey, state.collection]);
20390
20437
  const [initialTop] = (0, import_react84.useState)(() => Math.max(0, Math.min(initialIndex, items.length - 1)));
20391
- const Row2 = rowVariant === "checkbox" ? MultiOptionRow : SingleOptionRow;
20392
- const isTree = rowVariant === "tree" && tree !== void 0;
20438
+ const Row2 = selectionMode === "multiple" ? MultiOptionRow : SingleOptionRow;
20393
20439
  const isTest = process.env.NODE_ENV === "test";
20394
20440
  return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { ...listBoxProps, ...onKeyDown ? {
20395
20441
  onKeyDown,
@@ -20413,10 +20459,10 @@ function OptionList(props) {
20413
20459
  const item = items[index];
20414
20460
  const entry = item?.value;
20415
20461
  if (!item || !entry) return null;
20416
- const treeRow = isTree ? tree?.rows.get(String(item.key)) : void 0;
20462
+ const treeRow = tree?.rows.get(String(item.key));
20417
20463
  const mixedLegendId = mixed?.keys.has(entry.valueKey) ? mixed.legendId : void 0;
20418
20464
  if (treeRow && tree) {
20419
- return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TreeOptionRow, { item, state, id: optionDomId(id, index), disabledReason: disabledReasons[entry.valueKey], mixedLegendId, row: treeRow, onExpandedChange: (expanded) => tree.setExpanded(String(item.key), expanded), ...tid });
20465
+ return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(TreeOptionRow, { item, state, id: optionDomId(id, index), disabledReason: disabledReasons[entry.valueKey], mixedLegendId, row: treeRow, selectionMode, onExpandedChange: (expanded) => tree.setExpanded(String(item.key), expanded), ...tid });
20420
20466
  }
20421
20467
  return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(Row2, { item, state, id: optionDomId(id, index), disabledReason: disabledReasons[entry.valueKey], mixedLegendId, ...tid });
20422
20468
  } }, isTest ? items.length : "virtuoso"),
@@ -20689,10 +20735,10 @@ function useMenuSelectField(props) {
20689
20735
  const getOptionLabel = (option) => unsetLabel && option === unsetOption ? unsetLabel : propGetOptionLabel(option);
20690
20736
  const getOptionValue = (option) => unsetLabel && option === unsetOption ? void 0 : propGetOptionValue(option);
20691
20737
  const options = (0, import_react85.useMemo)(
20692
- () => initializeOptions(optionsProp, getOptionValue, getOptionLabel, unsetLabel, autoSort),
20738
+ () => initializeOptions(optionsProp, getOptionValue, getOptionLabel, unsetLabel, autoSort, getChildren),
20693
20739
  // getOptionValue and getOptionLabel are typically inline lambdas
20694
20740
  // oxlint-disable-next-line react-hooks/exhaustive-deps
20695
- [optionsProp, autoSort, unsetLabel]
20741
+ [optionsProp, autoSort, unsetLabel, getChildren]
20696
20742
  );
20697
20743
  const { hoverProps, isHovered } = (0, import_react_aria37.useHover)({});
20698
20744
  const { focusProps, isFocusVisible } = (0, import_react_aria37.useFocusRing)();
@@ -20703,6 +20749,8 @@ function useMenuSelectField(props) {
20703
20749
  // oxlint-disable-next-line react-hooks/exhaustive-deps
20704
20750
  [options, getChildren]
20705
20751
  );
20752
+ const isSingleSelectTree = !multiple && menuTree !== void 0;
20753
+ const isMultiSelectTree = multiple && menuTree !== void 0;
20706
20754
  const allOptions = (0, import_react85.useMemo)(
20707
20755
  () => menuTree ? menuTree.orderedKeys.map((k) => menuTree.nodes.get(k).option) : options,
20708
20756
  [menuTree, options]
@@ -20721,12 +20769,17 @@ function useMenuSelectField(props) {
20721
20769
  const { effectiveValue, proposalProps } = useAiProposal(
20722
20770
  propValues,
20723
20771
  proposedValues,
20724
- (vs) => labelsFor(vs, allOptions, getOptionValue, getOptionLabel).join(", ")
20772
+ (vs) => labelsFor(
20773
+ vs,
20774
+ allOptions,
20775
+ getOptionValue,
20776
+ (option) => isSingleSelectTree && menuTree ? optionPathLabel(menuTree, valueToKey(getOptionValue(option)), getOptionLabel) ?? getOptionLabel(option) : getOptionLabel(option)
20777
+ ).join(", ")
20725
20778
  );
20726
20779
  const values = (0, import_react85.useMemo)(() => effectiveValue ?? [], [effectiveValue]);
20727
20780
  const selectedKeys = (0, import_react85.useMemo)(
20728
- () => menuTree ? normalizeTreeSelection(menuTree, values.map(valueToKey), disabledKeySet) : new Set(values.map(valueToKey)),
20729
- [menuTree, values, disabledKeySet]
20781
+ () => isMultiSelectTree && menuTree ? normalizeTreeSelection(menuTree, values.map(valueToKey), disabledKeySet) : new Set(values.map(valueToKey)),
20782
+ [isMultiSelectTree, menuTree, values, disabledKeySet]
20730
20783
  );
20731
20784
  const selectedRowKeys = (0, import_react85.useMemo)(
20732
20785
  () => menuTree ? new Set(menuTree.orderedKeys.filter((key) => selectedKeys.has(menuTree.nodes.get(key).valueKey))) : selectedKeys,
@@ -20770,10 +20823,11 @@ function useMenuSelectField(props) {
20770
20823
  return visibleNestedRows(
20771
20824
  roots,
20772
20825
  (node) => childNodes(menuTree, node),
20773
- (node) => isExpanded(node.key),
20826
+ // A single-select hierarchy has no chevrons, so every node stays visible.
20827
+ isMultiSelectTree ? (node) => isExpanded(node.key) : () => true,
20774
20828
  matchKeys ? (node) => matchKeys.has(node.valueKey) : void 0
20775
20829
  );
20776
- }, [menuTree, allOptions, search, serverSearch, contains, expandedKeys, searchCollapsedKeys]);
20830
+ }, [menuTree, isMultiSelectTree, allOptions, search, serverSearch, contains, expandedKeys, searchCollapsedKeys]);
20777
20831
  const filteredOptions = (0, import_react85.useMemo)(
20778
20832
  () => menuTree || !search || serverSearch ? options : options.filter(
20779
20833
  (option) => unsetLabel && option === unsetOption ? contains(getOptionLabel(option), search) : matchesSearch(option, search, getOptionLabel, getOptionSearchText, contains)
@@ -20784,7 +20838,7 @@ function useMenuSelectField(props) {
20784
20838
  );
20785
20839
  function onSelectionChange(keys) {
20786
20840
  if (keys === "all") return;
20787
- if (menuTree) {
20841
+ if (isMultiSelectTree && menuTree) {
20788
20842
  const added = [...keys].map(String).find((key2) => !selectedRowKeys.has(key2));
20789
20843
  const removed = [...selectedRowKeys].find((key2) => !keys.has(key2));
20790
20844
  const key = added ?? removed;
@@ -20801,7 +20855,7 @@ function useMenuSelectField(props) {
20801
20855
  close({ restoreFocus: true });
20802
20856
  return;
20803
20857
  }
20804
- const opt = optionsByKey.get(String(key));
20858
+ const opt = isSingleSelectTree && menuTree ? menuTree.nodes.get(String(key))?.option : optionsByKey.get(String(key));
20805
20859
  proposalProps.onUserEdit?.();
20806
20860
  onCommit(opt === void 0 ? [] : [getOptionValue(opt)], opt === void 0 ? [] : [opt]);
20807
20861
  close({ restoreFocus: true });
@@ -20927,7 +20981,7 @@ function useMenuSelectField(props) {
20927
20981
  switch (e.key) {
20928
20982
  case "ArrowRight":
20929
20983
  case "ArrowLeft":
20930
- onTreeArrow(e, current2);
20984
+ if (isMultiSelectTree) onTreeArrow(e, current2);
20931
20985
  break;
20932
20986
  case "ArrowDown":
20933
20987
  e.preventDefault();
@@ -20998,20 +21052,20 @@ function useMenuSelectField(props) {
20998
21052
  0,
20999
21053
  treeRows ? treeRows.findIndex(({ node }) => revealKeys.has(node.valueKey)) : filteredOptions.findIndex((o) => revealKeys.has(valueToKey(getOptionValue(o))))
21000
21054
  );
21001
- const selectedText = !multiple && selectedOptions[0] !== void 0 ? getOptionLabel(selectedOptions[0]) : "";
21055
+ const selectedText = !multiple && selectedOptions[0] !== void 0 ? isSingleSelectTree && menuTree ? optionPathLabel(menuTree, valueToKey(getOptionValue(selectedOptions[0])), getOptionLabel) ?? getOptionLabel(selectedOptions[0]) : getOptionLabel(selectedOptions[0]) : "";
21002
21056
  const hasSelection = menuTree ? selectedKeys.size > 0 : values.length > 0;
21003
21057
  const isMixed = dottedKeys.size > 0 && (multiple || !hasSelection);
21004
21058
  const displayText = isMixed ? mixedLabel : selectedText || (hasSelection ? "" : nothingSelectedText || placeholder || "");
21005
21059
  const isPlaceholder = !isMixed && !selectedText && !hasSelection && !nothingSelectedText && !!placeholder;
21006
- const selectedLabels = menuTree && tree && getChildren ? bucketTreeSelection(selectedOptions, getChildren)[tree.display].map((option) => ({
21060
+ const selectedLabels = isMultiSelectTree && getChildren && tree?.display ? bucketTreeSelection(selectedOptions, getChildren)[tree.display].map((option) => ({
21007
21061
  key: valueToKey(getOptionValue(option)),
21008
21062
  label: getOptionLabel(option)
21009
21063
  })) : multiple ? selectedOptions.map((o) => ({ key: valueToKey(getOptionValue(o)), label: getOptionLabel(o) })) : [];
21010
21064
  const badgeKeys = isMixed ? /* @__PURE__ */ new Set([...selectedLabels.map(({ key }) => key), ...dottedKeys]) : void 0;
21011
21065
  const badgeLabels = badgeKeys ? [...optionsByKey].filter(([key]) => badgeKeys.has(key)).map(([key, option]) => ({ key, label: getOptionLabel(option) })) : selectedLabels;
21012
21066
  const partialKeys = (0, import_react85.useMemo)(
21013
- () => menuTree ? partiallySelectedKeys(menuTree, selectedKeys) : void 0,
21014
- [menuTree, selectedKeys]
21067
+ () => isMultiSelectTree && menuTree ? partiallySelectedKeys(menuTree, selectedKeys) : void 0,
21068
+ [isMultiSelectTree, menuTree, selectedKeys]
21015
21069
  );
21016
21070
  const treeRowStates = treeRows ? new Map(
21017
21071
  treeRows.map(({ node, level }) => [
@@ -21019,15 +21073,15 @@ function useMenuSelectField(props) {
21019
21073
  {
21020
21074
  level,
21021
21075
  hasChildren: node.childKeys.length > 0,
21022
- isExpanded: node.childKeys.length > 0 && isExpanded(node.key),
21023
- isIndeterminate: !!partialKeys?.has(node.key)
21076
+ isExpanded: isMultiSelectTree ? node.childKeys.length > 0 && isExpanded(node.key) : true,
21077
+ isIndeterminate: isMultiSelectTree && !!partialKeys?.has(node.key)
21024
21078
  }
21025
21079
  ])
21026
21080
  ) : void 0;
21027
21081
  function deselect(key) {
21028
21082
  if (!multiple || disabledKeys.includes(key)) return;
21029
21083
  proposalProps.onUserEdit?.();
21030
- if (menuTree) {
21084
+ if (isMultiSelectTree && menuTree) {
21031
21085
  const toggledKeys = toggleTreeSelection(menuTree, selectedKeys, key, false, disabledKeySet);
21032
21086
  commitTree(toggledKeys, key);
21033
21087
  return;
@@ -21100,7 +21154,7 @@ function useMenuSelectField(props) {
21100
21154
  loading: optionsLoading,
21101
21155
  disabledReasons,
21102
21156
  initialIndex,
21103
- rowVariant: treeRowStates ? "tree" : multiple ? "checkbox" : "check",
21157
+ selectionMode,
21104
21158
  tree: treeRowStates ? { rows: treeRowStates, setExpanded: setTreeExpanded } : void 0,
21105
21159
  mixed: dottedKeys.size > 0 ? { keys: dottedKeys, legendId } : void 0,
21106
21160
  onKeyDown: onMenuKeyDown,
@@ -21170,6 +21224,17 @@ function labelsFor(values, options, getOptionValue, getOptionLabel) {
21170
21224
  }
21171
21225
  return labels;
21172
21226
  }
21227
+ function optionPathLabel(tree, valueKey, getOptionLabel) {
21228
+ const node = tree.orderedKeys.map((key) => tree.nodes.get(key)).find((entry) => entry.valueKey === valueKey);
21229
+ if (!node) return void 0;
21230
+ const labels = [];
21231
+ let current2 = node;
21232
+ while (current2) {
21233
+ labels.unshift(getOptionLabel(current2.option));
21234
+ current2 = current2.parentKey === void 0 ? void 0 : tree.nodes.get(current2.parentKey);
21235
+ }
21236
+ return labels.join(" > ");
21237
+ }
21173
21238
  function rootNodes(tree) {
21174
21239
  return tree.orderedKeys.filter((key) => tree.nodes.get(key).parentKey === void 0).map((key) => tree.nodes.get(key));
21175
21240
  }
@@ -21282,7 +21347,8 @@ function BaseMenuSelectField(props) {
21282
21347
  // src/inputs/MenuSelectField/MenuSelectField.tsx
21283
21348
  var import_jsx_runtime119 = require("react/jsx-runtime");
21284
21349
  function MenuSelectField(props) {
21285
- const { value, proposedValue, onSelect, unsetLabel, ...rest } = props;
21350
+ const { value, proposedValue, onSelect, unsetLabel, options, autoSort, ...rest } = props;
21351
+ const nested = optionsHaveChildren(options);
21286
21352
  const values = (0, import_react86.useMemo)(() => {
21287
21353
  if (value !== void 0) return [value];
21288
21354
  return unsetLabel ? [void 0] : [];
@@ -21292,10 +21358,13 @@ function MenuSelectField(props) {
21292
21358
  BaseMenuSelectField,
21293
21359
  {
21294
21360
  ...rest,
21361
+ options,
21295
21362
  unsetLabel,
21363
+ autoSort: autoSort ?? !nested,
21296
21364
  selectionMode: "single",
21297
21365
  values,
21298
21366
  proposedValues,
21367
+ tree: nested ? { getChildren: menuOptionChildren } : void 0,
21299
21368
  onCommit: (next, opts) => {
21300
21369
  const option = opts[0];
21301
21370
  onSelect(next[0], option === unsetOption ? void 0 : option);
@@ -21303,6 +21372,19 @@ function MenuSelectField(props) {
21303
21372
  }
21304
21373
  );
21305
21374
  }
21375
+ function optionsHaveChildren(options) {
21376
+ const list = Array.isArray(options) ? options : [
21377
+ ...options.current === void 0 ? [] : Array.isArray(options.current) ? options.current : [options.current],
21378
+ ...options.options ?? []
21379
+ ];
21380
+ return list.some((option) => isNestedOption(option) && (option.children?.length ?? 0) > 0);
21381
+ }
21382
+ function menuOptionChildren(option) {
21383
+ return isNestedOption(option) ? option.children : void 0;
21384
+ }
21385
+ function isNestedOption(option) {
21386
+ return typeof option === "object" && option !== null && "children" in option && Array.isArray(option.children);
21387
+ }
21306
21388
 
21307
21389
  // src/components/Filters/Filters.tsx
21308
21390
  var import_jsx_runtime120 = require("react/jsx-runtime");