@homebound/beam 2.416.0-alpha.1 → 2.416.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 +18 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -34
- package/dist/index.d.ts +35 -34
- package/dist/index.js +66 -59
- package/dist/index.js.map +1 -1
- package/package.json +2 -4
package/dist/index.cjs
CHANGED
|
@@ -7095,7 +7095,7 @@ function Button(props) {
|
|
|
7095
7095
|
const result = onPress(e);
|
|
7096
7096
|
if (isPromise(result)) {
|
|
7097
7097
|
setAsyncInProgress(true);
|
|
7098
|
-
|
|
7098
|
+
result.finally(() => setAsyncInProgress(false));
|
|
7099
7099
|
}
|
|
7100
7100
|
return result;
|
|
7101
7101
|
},
|
|
@@ -10567,23 +10567,22 @@ function TreeSelectFieldBase(props) {
|
|
|
10567
10567
|
}));
|
|
10568
10568
|
}
|
|
10569
10569
|
}
|
|
10570
|
+
const comboBoxChildren = (0, import_react47.useCallback)(
|
|
10571
|
+
([item]) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_stately6.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item))),
|
|
10572
|
+
[getOptionValue, getOptionLabel, getOptionMenuLabel]
|
|
10573
|
+
);
|
|
10570
10574
|
const comboBoxProps = {
|
|
10571
10575
|
...otherProps,
|
|
10572
10576
|
disabledKeys: Object.keys(disabledOptionsWithReasons),
|
|
10573
10577
|
placeholder: !values || values.length === 0 ? placeholder : "",
|
|
10574
10578
|
label: props.label,
|
|
10575
10579
|
inputValue: fieldState.inputValue,
|
|
10576
|
-
// where we might want to do flatmap and return diff kind of array (children ? add level prop) inside children callback - can put markup wrapper div adds padding
|
|
10577
|
-
// so we're not doing it multiple places
|
|
10578
10580
|
items: fieldState.filteredOptions,
|
|
10579
10581
|
isDisabled,
|
|
10580
10582
|
isReadOnly,
|
|
10581
10583
|
onInputChange,
|
|
10582
10584
|
onOpenChange,
|
|
10583
|
-
children:
|
|
10584
|
-
// what we're telling it to render. look at padding here - don't have to pass down to tree option - filtered options is where we're flat mapping
|
|
10585
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_react_stately6.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item)))
|
|
10586
|
-
)
|
|
10585
|
+
children: comboBoxChildren
|
|
10587
10586
|
};
|
|
10588
10587
|
const state = (0, import_react_stately6.useComboBoxState)({
|
|
10589
10588
|
...comboBoxProps,
|
|
@@ -11101,6 +11100,10 @@ function ComboBoxBase(props) {
|
|
|
11101
11100
|
const listBoxRef = (0, import_react49.useRef)(null);
|
|
11102
11101
|
const popoverRef = (0, import_react49.useRef)(null);
|
|
11103
11102
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
11103
|
+
const comboBoxChildren = (0, import_react49.useCallback)(
|
|
11104
|
+
(item) => /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react_stately7.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item))),
|
|
11105
|
+
[getOptionValue, getOptionLabel, getOptionMenuLabel]
|
|
11106
|
+
);
|
|
11104
11107
|
const comboBoxProps = {
|
|
11105
11108
|
...otherProps,
|
|
11106
11109
|
disabledKeys: Object.keys(disabledOptionsWithReasons),
|
|
@@ -11110,7 +11113,7 @@ function ComboBoxBase(props) {
|
|
|
11110
11113
|
isReadOnly,
|
|
11111
11114
|
onInputChange,
|
|
11112
11115
|
onOpenChange,
|
|
11113
|
-
children:
|
|
11116
|
+
children: comboBoxChildren
|
|
11114
11117
|
};
|
|
11115
11118
|
const state = (0, import_react_stately7.useComboBoxState)({
|
|
11116
11119
|
...comboBoxProps,
|
|
@@ -11310,6 +11313,10 @@ function Autocomplete(props) {
|
|
|
11310
11313
|
...others
|
|
11311
11314
|
} = props;
|
|
11312
11315
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
11316
|
+
const comboBoxChildren = (0, import_react50.useCallback)(
|
|
11317
|
+
(item) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react_stately8.Item, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
|
|
11318
|
+
[getOptionValue, getOptionLabel, getOptionMenuLabel]
|
|
11319
|
+
);
|
|
11313
11320
|
const comboBoxProps = {
|
|
11314
11321
|
isDisabled: !!disabled,
|
|
11315
11322
|
disabledKeys: Object.keys(disabledOptionsWithReasons),
|
|
@@ -11318,7 +11325,7 @@ function Autocomplete(props) {
|
|
|
11318
11325
|
items: options,
|
|
11319
11326
|
// Allow the user to type in a value that is not in the list. Allows for the text to stay in the input when the user clicks away
|
|
11320
11327
|
allowsCustomValue: true,
|
|
11321
|
-
children:
|
|
11328
|
+
children: comboBoxChildren,
|
|
11322
11329
|
onSelectionChange: (key) => {
|
|
11323
11330
|
if (key == null) return;
|
|
11324
11331
|
const selectedItem = options.find((i) => getOptionValue(i) === key);
|
|
@@ -12737,7 +12744,7 @@ function ToggleButton(props) {
|
|
|
12737
12744
|
const result = onChange(e);
|
|
12738
12745
|
if (isPromise(result)) {
|
|
12739
12746
|
setAsyncInProgress(true);
|
|
12740
|
-
|
|
12747
|
+
result.finally(() => setAsyncInProgress(false));
|
|
12741
12748
|
}
|
|
12742
12749
|
return result;
|
|
12743
12750
|
}
|
|
@@ -14373,7 +14380,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, fi
|
|
|
14373
14380
|
const result = infiniteScroll.onEndReached(index);
|
|
14374
14381
|
if (isPromise(result)) {
|
|
14375
14382
|
setFetchMoreInProgress(true);
|
|
14376
|
-
|
|
14383
|
+
result.finally(() => setFetchMoreInProgress(false));
|
|
14377
14384
|
}
|
|
14378
14385
|
}
|
|
14379
14386
|
} : {}
|