@homebound/beam 4.32.0 → 4.34.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
@@ -17318,103 +17318,105 @@ function EntityLockup(props) {
17318
17318
  } = props;
17319
17319
  const tid = useTestIds(props, "entityLockup");
17320
17320
  const styles = compact ? compactStyles : defaultStyles;
17321
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.container), ...tid, children: [
17322
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.image), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: imgSrc, alt: title, loading: "lazy", className: "w100 h100 obf_cover db", ...tid.image }) }),
17323
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.body), children: [
17324
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.text), children: [
17325
- /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.heading), children: [
17326
- isDefined(eyebrow) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.eyebrow), ...tid.eyebrow, children: eyebrow }),
17327
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.title), ...tid.title, children: title })
17321
+ return (
17322
+ // `defaultStyles` query this container's width to switch to compact.
17323
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "w100 mw0 ctis cn_entityLockup", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.container), children: [
17324
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.image), children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: imgSrc, alt: title, loading: "lazy", className: "w100 h100 obf_cover db", ...tid.image }) }),
17325
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.body), children: [
17326
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.text), children: [
17327
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { ...(0, import_runtime69.trussProps)(styles.heading), children: [
17328
+ isDefined(eyebrow) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.eyebrow), ...tid.eyebrow, children: eyebrow }),
17329
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.title), ...tid.title, children: title })
17330
+ ] }),
17331
+ isDefined(description) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.description), ...tid.description, children: description })
17328
17332
  ] }),
17329
- isDefined(description) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.description), ...tid.description, children: description })
17330
- ] }),
17331
- isDefined(right) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.right), ...tid.right, children: right })
17332
- ] })
17333
- ] });
17333
+ isDefined(right) && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { ...(0, import_runtime69.trussProps)(styles.right), ...tid.right, children: right })
17334
+ ] })
17335
+ ] }) })
17336
+ );
17334
17337
  }
17335
17338
  var defaultStyles = {
17336
17339
  container: {
17337
17340
  display: "df",
17338
17341
  alignItems: "aifs",
17339
- gap: "g_2"
17342
+ gap: "g_2 container_entityLockup_max_width_400px_g_12px"
17340
17343
  },
17341
17344
  image: {
17342
17345
  flexShrink: "fs0",
17343
- height: "h_96px",
17344
- width: "w_96px",
17346
+ height: "h_96px container_entityLockup_max_width_400px_h_62px",
17347
+ width: "w_96px container_entityLockup_max_width_400px_w_62px",
17345
17348
  borderRadius: "br8",
17346
17349
  borderStyle: "bss",
17347
17350
  borderWidth: "bw1",
17348
- borderColor: ["bc_var", {
17349
- "--borderColor": "var(--b-field-border-default)"
17351
+ borderColor: ["bc_var container_entityLockup_max_width_400px_bc_var", {
17352
+ "--borderColor": "var(--b-field-border-default)",
17353
+ "--container_entityLockup_max_width_400px_borderColor": "var(--b-surface-separator)"
17350
17354
  }],
17351
17355
  overflow: "oh",
17352
17356
  backgroundColor: ["bgColor_var", {
17353
17357
  "--backgroundColor": "var(--b-surface-raised)"
17354
17358
  }]
17355
17359
  },
17356
- // On small screens, `right` moves under the description so the text keeps its width.
17357
17360
  body: {
17358
17361
  display: "df",
17359
17362
  flexGrow: "fg1",
17360
17363
  minWidth: "mw0",
17361
- gap: "g_2 sm_g_1",
17362
- flexDirection: "sm_fdc"
17364
+ gap: "g_2 container_entityLockup_max_width_400px_g_12px",
17365
+ alignSelf: "container_entityLockup_max_width_400px_asStretch"
17363
17366
  },
17364
17367
  text: {
17365
17368
  display: "df",
17366
17369
  flexDirection: "fdc",
17367
17370
  minWidth: "mw0",
17368
17371
  flexGrow: "fg1",
17369
- gap: "g_1"
17372
+ gap: "g_1 container_entityLockup_max_width_400px_g_2px",
17373
+ paddingTop: "container_entityLockup_max_width_400px_pt_4px"
17370
17374
  },
17371
17375
  heading: {
17372
17376
  display: "df",
17373
17377
  flexDirection: "fdc",
17374
- gap: "g_2px"
17378
+ gap: "g_2px container_entityLockup_max_width_400px_g_0"
17375
17379
  },
17376
17380
  eyebrow: {
17377
- fontWeight: "fw4",
17378
- fontSize: "fz_14px",
17379
- lineHeight: "lh_20px",
17381
+ fontWeight: "fw4 container_entityLockup_max_width_400px_fw4",
17382
+ fontSize: "fz_14px container_entityLockup_max_width_400px_fz_12px",
17383
+ lineHeight: "lh_20px container_entityLockup_max_width_400px_lh_16px",
17380
17384
  color: ["color_var", {
17381
17385
  "--color": "var(--b-on-surface)"
17382
17386
  }]
17383
17387
  },
17384
17388
  title: {
17385
- fontWeight: "fw6",
17386
- fontSize: "fz_14px",
17387
- lineHeight: "lh_20px",
17389
+ fontWeight: "fw6 container_entityLockup_max_width_400px_fw6",
17390
+ fontSize: "fz_14px container_entityLockup_max_width_400px_fz_12px",
17391
+ lineHeight: "lh_20px container_entityLockup_max_width_400px_lh_16px",
17388
17392
  color: ["color_var", {
17389
17393
  "--color": "var(--b-on-surface)"
17390
17394
  }]
17391
17395
  },
17392
17396
  description: {
17393
- fontWeight: "fw4",
17394
- fontSize: "fz_12px",
17395
- lineHeight: "lh_16px",
17397
+ fontWeight: "fw4 container_entityLockup_max_width_400px_fw4",
17398
+ fontSize: "fz_12px container_entityLockup_max_width_400px_fz_10px",
17399
+ lineHeight: "lh_16px container_entityLockup_max_width_400px_lh_14px",
17396
17400
  color: ["color_var", {
17397
17401
  "--color": "var(--b-on-surface)"
17398
17402
  }]
17399
17403
  },
17400
- // Capped at half the row so wide content can't squeeze the text to nothing; on small screens it gets its own row.
17401
- // A lone child (fewer than two elements) stays right-aligned instead of falling to the start under `jcsb`.
17404
+ // Capped at half the row so wide content can't squeeze the text to nothing.
17402
17405
  right: {
17403
17406
  flexShrink: "fs0",
17404
- maxWidth: "maxw50 sm_maxw_none",
17407
+ maxWidth: "maxw50",
17405
17408
  display: "df",
17406
- flexDirection: "fdc sm_fdr",
17407
- alignItems: "aife sm_aic",
17409
+ flexDirection: "fdc",
17410
+ alignItems: "aife",
17408
17411
  gap: "g_6px",
17409
- alignSelf: "asfs sm_asStretch",
17410
- textAlign: "tar",
17411
- justifyContent: "sm_jcsb sm_n_has_nth_child_2_jcfe"
17412
+ alignSelf: "asfs",
17413
+ textAlign: "tar"
17412
17414
  }
17413
17415
  };
17414
17416
  var compactStyles = {
17415
17417
  container: {
17416
17418
  display: "df",
17417
- alignItems: "aic",
17419
+ alignItems: "aifs",
17418
17420
  gap: "g_12px"
17419
17421
  },
17420
17422
  image: {
@@ -30911,10 +30913,13 @@ function EnvironmentBannerLayout(props) {
30911
30913
  var import_runtime162 = require("@homebound/truss/runtime");
30912
30914
 
30913
30915
  // src/forms/FormSection/FormSection.tsx
30916
+ var import_react_aria70 = require("react-aria");
30917
+ var import_react_stately18 = require("react-stately");
30914
30918
  var import_runtime160 = require("@homebound/truss/runtime");
30915
30919
 
30916
30920
  // src/forms/FormSection/FormSectionChild.tsx
30917
30921
  var import_react164 = require("react");
30922
+ var import_react_aria69 = require("react-aria");
30918
30923
  var import_runtime159 = require("@homebound/truss/runtime");
30919
30924
  var import_jsx_runtime242 = require("react/jsx-runtime");
30920
30925
  function FormSectionChild(props) {
@@ -30924,7 +30929,10 @@ function FormSectionChild(props) {
30924
30929
  actions,
30925
30930
  fields,
30926
30931
  orderField,
30927
- tag
30932
+ tag,
30933
+ value = title,
30934
+ selection,
30935
+ group
30928
30936
  } = props;
30929
30937
  const tid = useTestIds(props, "formSectionChild");
30930
30938
  const itemRef = (0, import_react164.useRef)(null);
@@ -30936,6 +30944,7 @@ function FormSectionChild(props) {
30936
30944
  id: props.id ?? title,
30937
30945
  itemRef
30938
30946
  });
30947
+ const control = group?.mode === "single" ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(FormSectionChildRadio, { state: group.state, value, label: title, ...tid.radio }) : group?.mode === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(FormSectionChildCheckbox, { state: group.state, value, label: title, ...tid.checkbox }) : selection ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(BoundCheckboxField, { field: selection.field, label: title, checkboxOnly: true, ...tid.checkbox }) : void 0;
30939
30948
  return /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)("div", { ...isDraggable ? {
30940
30949
  ...dragItemProps,
30941
30950
  ref: itemRef
@@ -30955,10 +30964,73 @@ function FormSectionChild(props) {
30955
30964
  borderStyle: "lot_bsn",
30956
30965
  borderWidth: "lot_bw_0"
30957
30966
  }), ...tid, children: [
30958
- /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(ContentHeader, { ...tid.header, title, description, actions, level: 4, rightSlotLead: tag && /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(Tag, { ...tag, ...tid.tag }), startAdornment: isDraggable ? /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(DnDGridItemHandle, { dragHandleProps, icon: "drag", compact: true }) : void 0 }),
30967
+ /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(ContentHeader, { ...tid.header, title, description, actions, level: 4, rightSlotLead: tag && /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(Tag, { ...tag, ...tid.tag }), startAdornment: isDraggable || control ? /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)(import_jsx_runtime242.Fragment, { children: [
30968
+ isDraggable && /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(DnDGridItemHandle, { dragHandleProps, icon: "drag", compact: true }),
30969
+ control
30970
+ ] }) : void 0 }),
30959
30971
  fields
30960
30972
  ] });
30961
30973
  }
30974
+ function FormSectionChildRadio(props) {
30975
+ const {
30976
+ state,
30977
+ value,
30978
+ label
30979
+ } = props;
30980
+ const ref = (0, import_react164.useRef)(null);
30981
+ const {
30982
+ inputProps,
30983
+ isDisabled,
30984
+ isSelected
30985
+ } = (0, import_react_aria69.useRadio)({
30986
+ value,
30987
+ "aria-label": label
30988
+ }, state, ref);
30989
+ const {
30990
+ focusProps,
30991
+ isFocusVisible
30992
+ } = (0, import_react_aria69.useFocusRing)();
30993
+ const tid = useTestIds(props);
30994
+ return /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledRadio, { isDisabled, isSelected, isFocusVisible, inputProps: {
30995
+ ...(0, import_react_aria69.mergeProps)(inputProps, focusProps),
30996
+ ref,
30997
+ ...tid
30998
+ } });
30999
+ }
31000
+ function FormSectionChildCheckbox(props) {
31001
+ const {
31002
+ state,
31003
+ value,
31004
+ label
31005
+ } = props;
31006
+ const ref = (0, import_react164.useRef)(null);
31007
+ const {
31008
+ inputProps,
31009
+ isDisabled,
31010
+ isSelected
31011
+ } = (0, import_react_aria69.useCheckboxGroupItem)({
31012
+ value,
31013
+ "aria-label": label
31014
+ }, state, ref);
31015
+ const {
31016
+ focusProps,
31017
+ isFocusVisible
31018
+ } = (0, import_react_aria69.useFocusRing)();
31019
+ const tid = useTestIds(props);
31020
+ return (
31021
+ // `StyledCheckbox` is just the visual box, so the label makes clicking it toggle the hidden input
31022
+ /* @__PURE__ */ (0, import_jsx_runtime242.jsxs)("label", { ...(0, import_runtime159.trussProps)({
31023
+ display: "df",
31024
+ cursor: "cur_pointer",
31025
+ ...isDisabled ? {
31026
+ cursor: "cur_not_allowed"
31027
+ } : {}
31028
+ }), children: [
31029
+ /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(import_react_aria69.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime242.jsx)("input", { ref, ...(0, import_react_aria69.mergeProps)(inputProps, focusProps), ...tid }) }),
31030
+ /* @__PURE__ */ (0, import_jsx_runtime242.jsx)(StyledCheckbox, { isDisabled, isSelected, isFocusVisible })
31031
+ ] })
31032
+ );
31033
+ }
30962
31034
 
30963
31035
  // src/forms/FormSection/FormSection.tsx
30964
31036
  var import_jsx_runtime243 = require("react/jsx-runtime");
@@ -30968,7 +31040,8 @@ function FormSection(props) {
30968
31040
  description,
30969
31041
  actions,
30970
31042
  fields,
30971
- childSections
31043
+ childSections,
31044
+ selection
30972
31045
  } = props;
30973
31046
  const tid = useTestIds(props, "formSection");
30974
31047
  return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)("div", { id: defaultTestId(title), ...(0, import_runtime160.trussProps)({
@@ -30981,15 +31054,94 @@ function FormSection(props) {
30981
31054
  }), ...tid.section, children: [
30982
31055
  /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(ContentHeader, { ...tid, title, description, actions, level: 3 }),
30983
31056
  fields,
30984
- childSections && (isReorderable(childSections) ? /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(DraggableChildren, { childSections, ...tid.childSection }) : /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "df fdc g_3", children: childSections.map((child) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(FormSectionChild, { ...child, ...tid.childSection }, child.id ?? child.title)) }))
31057
+ childSections && (selection?.mode === "single" ? /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(FormSectionRadioGroup, { field: selection.field, label: title, childSections, ...tid }) : selection?.mode === "multiple" ? /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(FormSectionCheckboxGroup, { field: selection.field, label: title, childSections, ...tid }) : /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(ChildSectionList, { childSections, ...tid.childSection }))
30985
31058
  ] });
30986
31059
  }
31060
+ function FormSectionRadioGroup(props) {
31061
+ const {
31062
+ field,
31063
+ label,
31064
+ childSections
31065
+ } = props;
31066
+ const tid = useTestIds(props);
31067
+ const {
31068
+ value,
31069
+ readOnly
31070
+ } = useComputed(() => ({
31071
+ value: field.value ?? null,
31072
+ readOnly: field.readOnly
31073
+ }), [field]);
31074
+ const state = (0, import_react_stately18.useRadioGroupState)({
31075
+ value,
31076
+ onChange: (value2) => {
31077
+ field.set(value2);
31078
+ field.maybeAutoSave();
31079
+ },
31080
+ isDisabled: readOnly
31081
+ });
31082
+ const {
31083
+ radioGroupProps
31084
+ } = (0, import_react_aria70.useRadioGroup)({
31085
+ "aria-label": label,
31086
+ isDisabled: readOnly,
31087
+ onFocus: () => field.focus(),
31088
+ onBlur: () => field.blur()
31089
+ }, state);
31090
+ return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { ...radioGroupProps, ...tid.childGroup, children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(ChildSectionList, { childSections, group: {
31091
+ mode: "single",
31092
+ state
31093
+ }, ...tid.childSection }) });
31094
+ }
31095
+ function FormSectionCheckboxGroup(props) {
31096
+ const {
31097
+ field,
31098
+ label,
31099
+ childSections
31100
+ } = props;
31101
+ const tid = useTestIds(props);
31102
+ const {
31103
+ value,
31104
+ readOnly
31105
+ } = useComputed(() => ({
31106
+ value: field.value ?? [],
31107
+ readOnly: field.readOnly
31108
+ }), [field]);
31109
+ const state = (0, import_react_stately18.useCheckboxGroupState)({
31110
+ value,
31111
+ onChange: (values) => {
31112
+ field.set(values);
31113
+ field.maybeAutoSave();
31114
+ },
31115
+ isDisabled: readOnly
31116
+ });
31117
+ const {
31118
+ groupProps
31119
+ } = (0, import_react_aria70.useCheckboxGroup)({
31120
+ "aria-label": label,
31121
+ isDisabled: readOnly,
31122
+ onFocus: () => field.focus(),
31123
+ onBlur: () => field.blur()
31124
+ }, state);
31125
+ return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { ...groupProps, ...tid.childGroup, children: /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(ChildSectionList, { childSections, group: {
31126
+ mode: "multiple",
31127
+ state
31128
+ }, ...tid.childSection }) });
31129
+ }
31130
+ function ChildSectionList(props) {
31131
+ const {
31132
+ childSections,
31133
+ group,
31134
+ ...tid
31135
+ } = props;
31136
+ return isReorderable(childSections) ? /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(DraggableChildren, { childSections, group, ...tid }) : /* @__PURE__ */ (0, import_jsx_runtime243.jsx)("div", { className: "df fdc g_3", children: childSections.map((child) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(FormSectionChild, { ...child, group, ...tid }, child.id ?? child.title)) });
31137
+ }
30987
31138
  function isReorderable(childSections) {
30988
31139
  return childSections.length > 0 && childSections.every((c) => !!c.orderField);
30989
31140
  }
30990
31141
  function DraggableChildren(props) {
30991
31142
  const {
30992
31143
  childSections,
31144
+ group,
30993
31145
  ...tid
30994
31146
  } = props;
30995
31147
  const sorted = sortByOrderField(childSections);
@@ -31007,7 +31159,7 @@ function DraggableChildren(props) {
31007
31159
  return /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(DnDGrid, { onReorder: handleReorder, lockAxis: "y", gridStyles: {
31008
31160
  gridTemplateColumns: "gtc_minmax_0_1fr",
31009
31161
  gap: "g_3"
31010
- }, children: sorted.map((child) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(FormSectionChild, { ...child, ...tid }, child.id)) });
31162
+ }, children: sorted.map((child) => /* @__PURE__ */ (0, import_jsx_runtime243.jsx)(FormSectionChild, { ...child, group, ...tid }, child.id)) });
31011
31163
  }
31012
31164
  function sortByOrderField(childSections) {
31013
31165
  return [...childSections].sort((a, b) => (a.orderField.value ?? 0) - (b.orderField.value ?? 0));
@@ -32222,8 +32374,8 @@ function useFilter4({ filterDefs }) {
32222
32374
 
32223
32375
  // src/inputs/Autocomplete.tsx
32224
32376
  var import_react180 = require("react");
32225
- var import_react_aria69 = require("react-aria");
32226
- var import_react_stately18 = require("react-stately");
32377
+ var import_react_aria71 = require("react-aria");
32378
+ var import_react_stately19 = require("react-stately");
32227
32379
  var import_jsx_runtime264 = require("react/jsx-runtime");
32228
32380
  function Autocomplete(props) {
32229
32381
  const {
@@ -32242,7 +32394,7 @@ function Autocomplete(props) {
32242
32394
  const { effectiveValue, proposalProps } = useAiProposal(value, proposedValue);
32243
32395
  const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
32244
32396
  const comboBoxChildren = (0, import_react180.useCallback)(
32245
- (item) => /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_react_stately18.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
32397
+ (item) => /* @__PURE__ */ (0, import_jsx_runtime264.jsx)(import_react_stately19.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
32246
32398
  [getOptionValue, getOptionLabel, getOptionMenuLabel]
32247
32399
  );
32248
32400
  const comboBoxProps = {
@@ -32265,12 +32417,12 @@ function Autocomplete(props) {
32265
32417
  },
32266
32418
  ...others
32267
32419
  };
32268
- const state = (0, import_react_stately18.useComboBoxState)(comboBoxProps);
32420
+ const state = (0, import_react_stately19.useComboBoxState)(comboBoxProps);
32269
32421
  const inputWrapRef = (0, import_react180.useRef)(null);
32270
32422
  const inputRef = (0, import_react180.useRef)(null);
32271
32423
  const listBoxRef = (0, import_react180.useRef)(null);
32272
32424
  const popoverRef = (0, import_react180.useRef)(null);
32273
- const { inputProps, listBoxProps, labelProps } = (0, import_react_aria69.useComboBox)(
32425
+ const { inputProps, listBoxProps, labelProps } = (0, import_react_aria71.useComboBox)(
32274
32426
  {
32275
32427
  ...comboBoxProps,
32276
32428
  inputRef,
@@ -32281,7 +32433,7 @@ function Autocomplete(props) {
32281
32433
  },
32282
32434
  state
32283
32435
  );
32284
- const { overlayProps: positionProps } = (0, import_react_aria69.useOverlayPosition)({
32436
+ const { overlayProps: positionProps } = (0, import_react_aria71.useOverlayPosition)({
32285
32437
  targetRef: inputWrapRef,
32286
32438
  overlayRef: popoverRef,
32287
32439
  scrollRef: listBoxRef,
@@ -32338,8 +32490,8 @@ function Autocomplete(props) {
32338
32490
 
32339
32491
  // src/inputs/ToggleButton.tsx
32340
32492
  var import_react181 = require("react");
32341
- var import_react_aria70 = require("react-aria");
32342
- var import_react_stately19 = require("react-stately");
32493
+ var import_react_aria72 = require("react-aria");
32494
+ var import_react_stately20 = require("react-stately");
32343
32495
  var import_runtime172 = require("@homebound/truss/runtime");
32344
32496
  var import_jsx_runtime265 = require("react/jsx-runtime");
32345
32497
  function ToggleButton(props) {
@@ -32360,7 +32512,7 @@ function ToggleButton(props) {
32360
32512
  isDisabled,
32361
32513
  ...otherProps
32362
32514
  };
32363
- const state = (0, import_react_stately19.useToggleState)({
32515
+ const state = (0, import_react_stately20.useToggleState)({
32364
32516
  ...ariaProps,
32365
32517
  onChange: (e) => {
32366
32518
  const result = onChange(e);
@@ -32377,24 +32529,24 @@ function ToggleButton(props) {
32377
32529
  const {
32378
32530
  isPressed: isPressedFromEvents,
32379
32531
  pressProps
32380
- } = (0, import_react_aria70.usePress)({
32532
+ } = (0, import_react_aria72.usePress)({
32381
32533
  ref: labelRef,
32382
32534
  isDisabled
32383
32535
  });
32384
32536
  const {
32385
32537
  inputProps
32386
- } = (0, import_react_aria70.useSwitch)(ariaProps, state, ref);
32538
+ } = (0, import_react_aria72.useSwitch)(ariaProps, state, ref);
32387
32539
  const {
32388
32540
  isFocusVisible: isFocusVisibleFromEvents,
32389
32541
  focusProps
32390
- } = (0, import_react_aria70.useFocusRing)({
32542
+ } = (0, import_react_aria72.useFocusRing)({
32391
32543
  ...otherProps,
32392
32544
  within: true
32393
32545
  });
32394
32546
  const {
32395
32547
  hoverProps,
32396
32548
  isHovered: isHoveredFromEvents
32397
- } = (0, import_react_aria70.useHover)({
32549
+ } = (0, import_react_aria72.useHover)({
32398
32550
  isDisabled
32399
32551
  });
32400
32552
  const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
@@ -32448,7 +32600,7 @@ function ToggleButton(props) {
32448
32600
  children: /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)("label", { ...labelAttrs, children: [
32449
32601
  icon && /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(Icon, { icon }),
32450
32602
  label,
32451
- /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_react_aria70.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("input", { ref, ...inputProps, ...tid.value }) })
32603
+ /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(import_react_aria72.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)("input", { ref, ...inputProps, ...tid.value }) })
32452
32604
  ] })
32453
32605
  });
32454
32606
  }