@homebound/beam 2.415.4 → 2.416.0-alpha.1

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.
@@ -35,6 +35,7 @@ function fail(message) {
35
35
  function toToggleState(isSelected, onChange) {
36
36
  return {
37
37
  isSelected,
38
+ defaultSelected: false,
38
39
  setSelected: onChange,
39
40
  toggle: () => onChange(!isSelected)
40
41
  };
@@ -92,4 +93,4 @@ export {
92
93
  isDefined,
93
94
  pluralize
94
95
  };
95
- //# sourceMappingURL=chunk-ZQBDHF22.js.map
96
+ //# sourceMappingURL=chunk-XH44AYND.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/utils/defaultTestId.ts","../src/utils/useTestIds.tsx","../src/utils/index.ts"],"sourcesContent":["import { camelCase } from \"change-case\";\n\n/**\n * Guesses an id based on a label string, i.e. given `Homeowner Contract`,\n * returns `homeownerContract`.\n *\n * This is useful for our (non-bound) form fields that will probably have a label,\n * but may not have a `data-testid` set by the encompassing page.\n *\n * (Bound form fields typically set their test id from their form-state field's key.)\n */\nexport function defaultTestId(label: string): string {\n // Strip `m:4` to `m4` to prevent it from becoming `m_4` which our rtl-utils assumes\n // means \"the 4th element with a data-testid value of 'm'\".\n return camelCase(label.replace(\":\", \"\"));\n}\n","import { defaultTestId } from \"src/utils/defaultTestId\";\n\nexport type TestIds = Record<string, object>;\n\n/**\n * Provides a way to easily generate `data-testid`s.\n *\n * The test ids are made of a `${prefix}_${key}`, where:\n *\n * - The prefix is the component name, like \"profile\", and\n * - The key is the specific DOM element that's being tagged, like \"firstName\"\n *\n * To determine the prefix, the component passes us their props, which we'll use\n * to look for an incoming `data-testid` to become the prefix the `data-testid`s\n * that we create. I.e.:\n *\n * ```tsx\n * const { a, b } = props;\n * const tid = useTestIds(props);\n *\n * return <Foo {...tid.foo} />;\n * ```\n *\n * This allows components that embed the component to customize the prefix, i.e.\n * `<TextField data-testid=\"firstName\" />` and `<TextField data-testid=\"lastName\" />`\n * would produce, within `TextField` itself, ids like:\n *\n * - `firstName_input`\n * - `firstName_errors`\n * - `lastName_input`\n * - `lastName_errors`\n *\n * @param props the component's `props` object, which we'll scan for `data-testid` to use as the prefix\n * @param defaultPrefix the default prefix to use if no `data-testid` is found on `props`\n */\nexport function useTestIds(props: object, defaultPrefix?: string): Record<string, object> {\n const prefix: string | undefined =\n (props as any)[\"data-testid\"] ||\n // Pass defaultPrefix through defaultTestId to allow `useTestIds(..., label)` usage\n (defaultPrefix ? defaultTestId(defaultPrefix) : undefined);\n const rootId = { \"data-testid\": prefix };\n return newMethodMissingProxy(rootId, (key) => {\n // If we get tagged ids, remove the colon so that we can do `r.foo_m2` for `m:2`\n key = key.replace(\":\", \"\");\n return { \"data-testid\": prefix ? `${prefix}_${key}` : key };\n }) as any;\n}\n\n/** Uses `object` for any keys that exist on it, otherwise calls `methodMissing` fn. */\nexport function newMethodMissingProxy<T extends object, Y>(\n object: T,\n methodMissing: (key: string) => Y,\n): T & Record<string, Y> {\n return new Proxy(object, {\n get(object, property) {\n if (Reflect.has(object, property)) {\n return Reflect.get(object, property);\n } else if (property === \"then\") {\n return undefined;\n } else {\n return methodMissing(String(property));\n }\n },\n }) as any;\n}\n","import { MutableRefObject } from \"react\";\nimport type { CheckboxGroupState, ToggleState } from \"react-stately\";\n\nexport function fail(message?: string): never {\n throw new Error(message || \"Failed\");\n}\n\n/** Adapts our state to what useToggleState returns in a stateless manner. */\nexport function toToggleState(isSelected: boolean, onChange: (value: boolean) => void): ToggleState {\n return {\n isSelected,\n defaultSelected: false,\n setSelected: onChange,\n toggle: () => onChange(!isSelected),\n };\n}\n\n/** Adapts our state to what use*Group returns in a stateless manner. */\nexport function toGroupState<T extends string>(values: T[], onChange: (value: T[]) => void): CheckboxGroupState {\n const addValue = (value: T) => onChange([...values, value]);\n const removeValue = (value: T) => onChange(values.filter((_value) => _value !== value));\n\n return {\n value: values,\n defaultValue: [],\n setValue: onChange,\n isSelected: (value: T) => values.includes(value),\n addValue,\n removeValue,\n toggleValue: (value: T) => (values.includes(value) ? addValue(value) : removeValue(value)),\n isDisabled: false,\n isReadOnly: false,\n // We do not use the validation state, as our Switch groups do not support error states. However, this field is required by the `CheckboxGroupState` so we need to include it.\n // If we ever update our SwitchGroup component to support error states, we'll need to update this.\n validationState: \"valid\",\n isInvalid: false,\n isRequired: false,\n setInvalid: () => {},\n realtimeValidation: { isInvalid: false, validationErrors: [], validationDetails: {} as ValidityState },\n displayValidation: { isInvalid: false, validationErrors: [], validationDetails: {} as ValidityState },\n updateValidation: () => {},\n resetValidation: () => {},\n commitValidation: () => {},\n };\n}\n\n/**\n * Utility to maybe call a function if undefined with arguments\n *\n * @example\n * maybeCall(onChange, true)\n * maybeCall(onBlur)\n * maybeCall(onSelect, { id: 1, value: \"book 1\"}, true)\n */\nexport function maybeCall(callback: Function | undefined, ...args: any[]) {\n return callback && callback(...args);\n}\n\nexport * from \"./useTestIds\";\n\n/** Casts `Object.keys` to \"what it should be\", as long as your instance doesn't have keys it shouldn't. */\nexport function safeKeys<T>(instance: T): (keyof T)[] {\n return Object.getOwnPropertyNames(instance) as any;\n}\n\n// Returns object with specified key removed\nexport const omitKey = <T, K extends keyof T>(key: K, { [key]: _, ...obj }: T) => obj as T;\n\nexport const noop = (..._: any) => {};\n\ntype Entries<T> = {\n [K in keyof T]: [K, T[K]];\n}[keyof T][];\n\nexport function safeEntries<T extends object>(obj: T): Entries<T> {\n return Object.entries(obj) as any;\n}\n\nexport class EmptyRef<T> implements MutableRefObject<T> {\n get current(): T {\n throw new Error(\"BeamProvider is missing\");\n }\n\n set current(_) {\n throw new Error(\"BeamProvider is missing\");\n }\n}\n\nexport const isAbsoluteUrl = (url: string) => /^(http(s?)):\\/\\//i.test(url);\n\nexport function areArraysEqual(a: any[], b: any[]): boolean {\n return a.length === b.length && a.every((val, idx) => val === b[idx]);\n}\n\nexport function isPromise(obj: any | Promise<any>): obj is Promise<any> {\n return typeof obj === \"object\" && \"then\" in obj && typeof obj.then === \"function\";\n}\n\nexport function isFunction(f: any): f is Function {\n return typeof f === \"function\";\n}\n\nexport function isDefined<T extends any>(param: T | undefined | null): param is T {\n return param !== null && param !== undefined;\n}\n\nexport function pluralize(count: number | unknown[], noun: string, pluralNoun?: string): string {\n if ((Array.isArray(count) ? count.length : count) === 1) return noun;\n return pluralNoun || `${noun}s`;\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAWnB,SAAS,cAAc,OAAuB;AAGnD,SAAO,UAAU,MAAM,QAAQ,KAAK,EAAE,CAAC;AACzC;;;ACoBO,SAAS,WAAW,OAAe,eAAgD;AACxF,QAAM,SACH,MAAc,aAAa;AAAA,GAE3B,gBAAgB,cAAc,aAAa,IAAI;AAClD,QAAM,SAAS,EAAE,eAAe,OAAO;AACvC,SAAO,sBAAsB,QAAQ,CAAC,QAAQ;AAE5C,UAAM,IAAI,QAAQ,KAAK,EAAE;AACzB,WAAO,EAAE,eAAe,SAAS,GAAG,MAAM,IAAI,GAAG,KAAK,IAAI;AAAA,EAC5D,CAAC;AACH;AAGO,SAAS,sBACd,QACA,eACuB;AACvB,SAAO,IAAI,MAAM,QAAQ;AAAA,IACvB,IAAIA,SAAQ,UAAU;AACpB,UAAI,QAAQ,IAAIA,SAAQ,QAAQ,GAAG;AACjC,eAAO,QAAQ,IAAIA,SAAQ,QAAQ;AAAA,MACrC,WAAW,aAAa,QAAQ;AAC9B,eAAO;AAAA,MACT,OAAO;AACL,eAAO,cAAc,OAAO,QAAQ,CAAC;AAAA,MACvC;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;AC7DO,SAAS,KAAK,SAAyB;AAC5C,QAAM,IAAI,MAAM,WAAW,QAAQ;AACrC;AAGO,SAAS,cAAc,YAAqB,UAAiD;AAClG,SAAO;AAAA,IACL;AAAA,IACA,iBAAiB;AAAA,IACjB,aAAa;AAAA,IACb,QAAQ,MAAM,SAAS,CAAC,UAAU;AAAA,EACpC;AACF;AAuCO,SAAS,UAAU,aAAmC,MAAa;AACxE,SAAO,YAAY,SAAS,GAAG,IAAI;AACrC;AAKO,SAAS,SAAY,UAA0B;AACpD,SAAO,OAAO,oBAAoB,QAAQ;AAC5C;AAGO,IAAM,UAAU,CAAuB,KAAQ,EAAE,CAAC,MAAM,GAAG,GAAG,IAAI,MAAS;AAE3E,IAAM,OAAO,IAAI,MAAW;AAAC;AAM7B,SAAS,YAA8B,KAAoB;AAChE,SAAO,OAAO,QAAQ,GAAG;AAC3B;AAEO,IAAM,WAAN,MAAiD;AAAA,EACtD,IAAI,UAAa;AACf,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AAAA,EAEA,IAAI,QAAQ,GAAG;AACb,UAAM,IAAI,MAAM,yBAAyB;AAAA,EAC3C;AACF;AAEO,IAAM,gBAAgB,CAAC,QAAgB,oBAAoB,KAAK,GAAG;AAMnE,SAAS,UAAU,KAA8C;AACtE,SAAO,OAAO,QAAQ,YAAY,UAAU,OAAO,OAAO,IAAI,SAAS;AACzE;AAEO,SAAS,WAAW,GAAuB;AAChD,SAAO,OAAO,MAAM;AACtB;AAEO,SAAS,UAAyB,OAAyC;AAChF,SAAO,UAAU,QAAQ,UAAU;AACrC;AAEO,SAAS,UAAU,OAA2B,MAAc,YAA6B;AAC9F,OAAK,MAAM,QAAQ,KAAK,IAAI,MAAM,SAAS,WAAW,EAAG,QAAO;AAChE,SAAO,cAAc,GAAG,IAAI;AAC9B;","names":["object"]}
package/dist/index.cjs CHANGED
@@ -4388,6 +4388,7 @@ function fail(message) {
4388
4388
  function toToggleState(isSelected, onChange) {
4389
4389
  return {
4390
4390
  isSelected,
4391
+ defaultSelected: false,
4391
4392
  setSelected: onChange,
4392
4393
  toggle: () => onChange(!isSelected)
4393
4394
  };
@@ -4467,7 +4468,16 @@ function Tooltip(props) {
4467
4468
  ] });
4468
4469
  }
4469
4470
  function Popper(props) {
4470
- const { triggerRef, content, placement = "auto", xss, bgColor = "rgba(36, 36, 36, 1)" /* Gray900 */, onMouseEnter, onMouseLeave } = props;
4471
+ const {
4472
+ triggerRef,
4473
+ content,
4474
+ placement = "auto",
4475
+ xss,
4476
+ bgColor = "rgba(36, 36, 36, 1)" /* Gray900 */,
4477
+ onMouseEnter,
4478
+ onMouseLeave,
4479
+ ...ariaProps
4480
+ } = props;
4471
4481
  const popperRef = (0, import_react3.useRef)(null);
4472
4482
  const [arrowRef, setArrowRef] = (0, import_react3.useState)(null);
4473
4483
  const targetElement = triggerRef.current ? triggerRef.current.children[0] ?? triggerRef.current.parentElement : null;
@@ -4485,6 +4495,7 @@ function Popper(props) {
4485
4495
  ref: popperRef,
4486
4496
  style: styles.popper,
4487
4497
  ...attributes.popper,
4498
+ ...ariaProps,
4488
4499
  onMouseEnter,
4489
4500
  onMouseLeave,
4490
4501
  css: {
@@ -7084,7 +7095,7 @@ function Button(props) {
7084
7095
  const result = onPress(e);
7085
7096
  if (isPromise(result)) {
7086
7097
  setAsyncInProgress(true);
7087
- result.finally(() => setAsyncInProgress(false));
7098
+ void result.finally(() => setAsyncInProgress(false));
7088
7099
  }
7089
7100
  return result;
7090
7101
  },
@@ -8491,7 +8502,7 @@ var RowState = class {
8491
8502
  }
8492
8503
  }
8493
8504
  /** Used by node when doing `console.log(rs)`. */
8494
- [Symbol.for("nodejs.util.inspect.custom")]() {
8505
+ [/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
8495
8506
  return `RowState@${this.row.id}`;
8496
8507
  }
8497
8508
  };
@@ -9067,7 +9078,7 @@ function Menu(props) {
9067
9078
  const { items: items2, ...others } = tree;
9068
9079
  const [itemsSection, persistentSection] = items2;
9069
9080
  if (search) {
9070
- const filteredChildren = itemsSection.children.filter((item) => contains(item.value.label, search));
9081
+ const filteredChildren = (itemsSection.children ?? []).filter((item) => contains(item.value.label, search));
9071
9082
  const { items: items3, ...otherValues } = itemsSection.value;
9072
9083
  const filteredValue = items3?.filter((item) => contains(item.label, search));
9073
9084
  return {
@@ -9508,18 +9519,21 @@ function ListBoxChip({ label }) {
9508
9519
  }
9509
9520
 
9510
9521
  // src/inputs/Value.ts
9522
+ var VALUE_PREFIX = "__VALUE--";
9511
9523
  function keyToValue(key) {
9512
9524
  if (typeof key === "number") {
9513
9525
  return key;
9514
9526
  } else if (typeof key === "string") {
9515
- if (key === "__VALUE:null") {
9527
+ if (key === `${VALUE_PREFIX}null` || key === "__VALUE:null") {
9516
9528
  return null;
9517
- } else if (key === "__VALUE:undefined") {
9529
+ } else if (key === `${VALUE_PREFIX}undefined` || key === "__VALUE:undefined") {
9518
9530
  return void 0;
9519
- } else if (key.startsWith("__VALUE:boolean:")) {
9520
- return key.split(":")[2] === "true";
9521
- } else if (key.startsWith("__VALUE:number")) {
9522
- return Number(key.split(":")[2]);
9531
+ } else if (key.startsWith(`${VALUE_PREFIX}boolean--`) || key.startsWith("__VALUE:boolean:")) {
9532
+ const parts = key.includes("--boolean--") ? key.split("--") : key.split(":");
9533
+ return parts[parts.length - 1] === "true";
9534
+ } else if (key.startsWith(`${VALUE_PREFIX}number--`) || key.startsWith("__VALUE:number:")) {
9535
+ const parts = key.includes("--number--") ? key.split("--") : key.split(":");
9536
+ return Number(parts[parts.length - 1]);
9523
9537
  } else {
9524
9538
  return key;
9525
9539
  }
@@ -9531,13 +9545,13 @@ function valueToKey(value) {
9531
9545
  if (typeof value === "string") {
9532
9546
  return value;
9533
9547
  } else if (typeof value === "number") {
9534
- return `__VALUE:number:${value}`;
9548
+ return `${VALUE_PREFIX}number--${value}`;
9535
9549
  } else if (typeof value === "boolean") {
9536
- return `__VALUE:boolean:${value}`;
9550
+ return `${VALUE_PREFIX}boolean--${value}`;
9537
9551
  } else if (value === null) {
9538
- return "__VALUE:null";
9552
+ return `${VALUE_PREFIX}null`;
9539
9553
  } else if (value === void 0) {
9540
- return "__VALUE:undefined";
9554
+ return `${VALUE_PREFIX}undefined`;
9541
9555
  } else {
9542
9556
  throw new Error(`Unsupported value ${value}`);
9543
9557
  }
@@ -10108,7 +10122,8 @@ function VirtualizedOptions(props) {
10108
10122
  allowCollapsing
10109
10123
  } = props;
10110
10124
  const virtuosoRef = (0, import_react45.useRef)(null);
10111
- const focusedItem = state.collection.getItem(state.selectionManager.focusedKey);
10125
+ const focusedKey = state.selectionManager.focusedKey;
10126
+ const focusedItem = focusedKey != null ? state.collection.getItem(focusedKey) : null;
10112
10127
  const selectedItem = state.selectionManager.selectedKeys.size > 0 ? state.collection.getItem([...state.selectionManager.selectedKeys.values()][0]) : void 0;
10113
10128
  (0, import_react45.useEffect)(
10114
10129
  () => {
@@ -10578,6 +10593,7 @@ function TreeSelectFieldBase(props) {
10578
10593
  state.selectionManager.state = (0, import_react_stately6.useMultipleSelectionState)({
10579
10594
  selectionMode: "multiple",
10580
10595
  selectedKeys: fieldState.selectedKeys,
10596
+ disabledKeys: Object.keys(disabledOptionsWithReasons),
10581
10597
  onSelectionChange: (newKeys) => {
10582
10598
  if (newKeys === "all") {
10583
10599
  return;
@@ -10870,7 +10886,9 @@ function ComboBoxInput(props) {
10870
10886
  onKeyDown: (e) => {
10871
10887
  if (isMultiSelect) {
10872
10888
  if (isTree) {
10873
- const item = state.collection.getItem(state.selectionManager.focusedKey);
10889
+ const focusedKey = state.selectionManager.focusedKey;
10890
+ if (focusedKey == null) return;
10891
+ const item = state.collection.getItem(focusedKey);
10874
10892
  if (item && (e.key === "ArrowRight" || e.key === "ArrowLeft")) {
10875
10893
  if (!isLeveledNode(item)) return;
10876
10894
  const leveledOption = item.value;
@@ -10892,7 +10910,10 @@ function ComboBoxInput(props) {
10892
10910
  if (state.isOpen) {
10893
10911
  e.preventDefault();
10894
10912
  }
10895
- state.selectionManager.toggleSelection(state.selectionManager.focusedKey);
10913
+ const focusedKey = state.selectionManager.focusedKey;
10914
+ if (focusedKey != null) {
10915
+ state.selectionManager.toggleSelection(focusedKey);
10916
+ }
10896
10917
  return;
10897
10918
  }
10898
10919
  if (e.key === "Escape") {
@@ -11114,7 +11135,8 @@ function ComboBoxBase(props) {
11114
11135
  // Do not allow an empty selection if single select mode
11115
11136
  disallowEmptySelection: !multiselect,
11116
11137
  selectedKeys,
11117
- onSelectionChange
11138
+ onSelectionChange,
11139
+ disabledKeys: Object.keys(disabledOptionsWithReasons)
11118
11140
  });
11119
11141
  const [debouncedSearch] = (0, import_use_debounce5.useDebounce)(searchValue, 300);
11120
11142
  (0, import_react49.useEffect)(() => {
@@ -11298,6 +11320,7 @@ function Autocomplete(props) {
11298
11320
  allowsCustomValue: true,
11299
11321
  children: (item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_stately8.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
11300
11322
  onSelectionChange: (key) => {
11323
+ if (key == null) return;
11301
11324
  const selectedItem = options.find((i) => getOptionValue(i) === key);
11302
11325
  if (selectedItem) {
11303
11326
  onInputChange(getOptionLabel(selectedItem));
@@ -12136,7 +12159,6 @@ function RadioGroupField(props) {
12136
12159
  /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Label, { label, ...labelProps, ...tid.label, hidden: labelStyle === "hidden" }),
12137
12160
  /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { ...radioGroupProps, children: [
12138
12161
  options.map((option) => {
12139
- const isDisabled = state.isDisabled || !!option.disabled;
12140
12162
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_react58.Fragment, { children: maybeTooltip({
12141
12163
  title: resolveTooltip(option.disabled),
12142
12164
  placement: "bottom",
@@ -12145,7 +12167,8 @@ function RadioGroupField(props) {
12145
12167
  {
12146
12168
  parentId: name,
12147
12169
  option,
12148
- state: { ...state, isDisabled },
12170
+ state,
12171
+ isOptionDisabled: !!option.disabled,
12149
12172
  ...otherProps,
12150
12173
  ...tid[option.value]
12151
12174
  }
@@ -12163,13 +12186,18 @@ function Radio(props) {
12163
12186
  parentId,
12164
12187
  option: { description, label, value },
12165
12188
  state,
12189
+ isOptionDisabled,
12166
12190
  ...others
12167
12191
  } = props;
12168
- const disabled = state.isDisabled;
12169
12192
  const labelId = `${parentId}-${value}-label`;
12170
12193
  const descriptionId = `${parentId}-${value}-description`;
12171
12194
  const ref = (0, import_react58.useRef)(null);
12172
- const { inputProps } = (0, import_react_aria34.useRadio)({ value, "aria-labelledby": labelId }, state, ref);
12195
+ const { inputProps, isDisabled } = (0, import_react_aria34.useRadio)(
12196
+ { value, "aria-labelledby": labelId, isDisabled: isOptionDisabled },
12197
+ state,
12198
+ ref
12199
+ );
12200
+ const disabled = isDisabled;
12173
12201
  const { focusProps, isFocusVisible } = (0, import_react_aria34.useFocusRing)();
12174
12202
  const { hoverProps, isHovered } = (0, import_react_aria34.useHover)({ isDisabled: disabled });
12175
12203
  return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("label", { css: Css.df.cursorPointer.mb1.if(disabled).add("cursor", "initial").$, ...hoverProps, children: [
@@ -12709,7 +12737,7 @@ function ToggleButton(props) {
12709
12737
  const result = onChange(e);
12710
12738
  if (isPromise(result)) {
12711
12739
  setAsyncInProgress(true);
12712
- result.finally(() => setAsyncInProgress(false));
12740
+ void result.finally(() => setAsyncInProgress(false));
12713
12741
  }
12714
12742
  return result;
12715
12743
  }
@@ -14345,7 +14373,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
14345
14373
  const result = infiniteScroll.onEndReached(index);
14346
14374
  if (isPromise(result)) {
14347
14375
  setFetchMoreInProgress(true);
14348
- result.finally(() => setFetchMoreInProgress(false));
14376
+ void result.finally(() => setFetchMoreInProgress(false));
14349
14377
  }
14350
14378
  }
14351
14379
  } : {}
@@ -14736,7 +14764,7 @@ function Modal(props) {
14736
14764
  onClose: closeModal,
14737
14765
  isDismissable: true,
14738
14766
  shouldCloseOnInteractOutside: (el) => {
14739
- return allowClosing && !(el.closest(".tribute-container") || el.closest("[role='dialog']") || el.closest("[role='alert']"));
14767
+ return allowClosing && !(el.closest(".tribute-container") || el.closest("[role='dialog']") || el.closest("[role='alert']") || el.closest("[role='tooltip']"));
14740
14768
  }
14741
14769
  },
14742
14770
  ref
@@ -17815,7 +17843,10 @@ function ButtonDatePicker(props) {
17815
17843
  const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
17816
17844
  const state = (0, import_react_stately18.useMenuTriggerState)({ isOpen: defaultOpen });
17817
17845
  const buttonRef = (0, import_react105.useRef)(null);
17818
- const { menuTriggerProps, menuProps } = (0, import_react_aria46.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
17846
+ const {
17847
+ menuTriggerProps,
17848
+ menuProps: { autoFocus: _af, ...menuProps }
17849
+ } = (0, import_react_aria46.useMenuTrigger)({ isDisabled: !!disabled }, state, buttonRef);
17819
17850
  const tid = useTestIds(
17820
17851
  props,
17821
17852
  isTextButton(trigger) ? defaultTestId(labelOr(trigger, "buttonDatePicker")) : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name