@homebound/beam 3.86.0 → 3.87.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 +2225 -2084
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +1814 -1673
- package/dist/index.js.map +1 -1
- package/dist/truss.css +6 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -4888,6 +4888,8 @@ interface BeamTextFieldProps<X> extends BeamFocusableProps, PresentationFieldPro
|
|
|
4888
4888
|
/** Marks the field as required or optional, the default is assumed ambiguous/unknown. */
|
|
4889
4889
|
required?: boolean;
|
|
4890
4890
|
value: string | undefined;
|
|
4891
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
4892
|
+
proposedValue?: string;
|
|
4891
4893
|
/** Handler called when the interactive element state changes. */
|
|
4892
4894
|
onChange: (value: string | undefined) => void;
|
|
4893
4895
|
/** Called when the component loses focus, mostly for BoundTextField to use. */
|
|
@@ -7916,6 +7918,14 @@ type TextFieldBaseProps<X> = {
|
|
|
7916
7918
|
hideErrorMessage?: boolean;
|
|
7917
7919
|
alwaysShowHelperText?: boolean;
|
|
7918
7920
|
unfocusedPlaceholder?: ReactNode;
|
|
7921
|
+
/** Value proposed by an AI model; puts the field in AI mode. Pre-formatted for display. */
|
|
7922
|
+
proposedValue?: string;
|
|
7923
|
+
/** The formatted value on record, rendered struck through beside the input. Independent of `proposedValue`. */
|
|
7924
|
+
originalValue?: string;
|
|
7925
|
+
/** Called on any edit the user makes, so the owning field can end AI mode. */
|
|
7926
|
+
onUserEdit?: VoidFunction;
|
|
7927
|
+
/** Called when the user leaves the field, so the owning field can retire the struck-through original. */
|
|
7928
|
+
onUserBlur?: VoidFunction;
|
|
7919
7929
|
/** Allow focusing without selecting, i.e. to let the user keep typing after we've pre-filled text + called focus, like the Add New component. */
|
|
7920
7930
|
selectOnFocus?: boolean;
|
|
7921
7931
|
} & Pick<BeamTextFieldProps<X>, "label" | "required" | "errorMsg" | "errorInTooltip" | "onBlur" | "onFocus" | "helperText" | "labelStyle" | "placeholder" | "compact" | "borderless" | "borderOnHover" | "visuallyDisabled" | "fullWidth" | "xss" | "inputStylePalette"> & Partial<Pick<BeamTextFieldProps<X>, "onChange">>;
|
|
@@ -7958,7 +7968,7 @@ type AutocompleteProps<T> = {
|
|
|
7958
7968
|
value: Value;
|
|
7959
7969
|
reason: string;
|
|
7960
7970
|
})[];
|
|
7961
|
-
} & Pick<PresentationFieldProps, "labelStyle"> & Pick<TextFieldBaseProps<any>, "label" | "clearable" | "startAdornment" | "fullWidth">;
|
|
7971
|
+
} & Pick<PresentationFieldProps, "labelStyle"> & Pick<TextFieldBaseProps<any>, "label" | "clearable" | "startAdornment" | "fullWidth" | "proposedValue">;
|
|
7962
7972
|
declare function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element;
|
|
7963
7973
|
|
|
7964
7974
|
interface CheckboxProps {
|
|
@@ -8095,11 +8105,15 @@ type DateFieldCommonProps = Pick<TextFieldBaseProps<Properties>, "borderless" |
|
|
|
8095
8105
|
/** Render header that skips years in addition to months */
|
|
8096
8106
|
useYearPicker?: boolean;
|
|
8097
8107
|
};
|
|
8098
|
-
|
|
8108
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
8109
|
+
type ProposedValue<V> = {
|
|
8110
|
+
proposedValue?: V;
|
|
8111
|
+
};
|
|
8112
|
+
type DateFieldProps = DateFieldCommonProps & ProposedValue<PlainDate> & {
|
|
8099
8113
|
value: PlainDate | undefined;
|
|
8100
8114
|
onChange: (value: PlainDate | undefined) => void;
|
|
8101
8115
|
};
|
|
8102
|
-
type DateRangeFieldProps = DateFieldCommonProps & {
|
|
8116
|
+
type DateRangeFieldProps = DateFieldCommonProps & ProposedValue<DateRange> & {
|
|
8103
8117
|
value: DateRange | undefined;
|
|
8104
8118
|
onChange: (value: DateRange | undefined) => void;
|
|
8105
8119
|
};
|
|
@@ -8130,6 +8144,8 @@ type ComboBoxBaseProps<O, V extends Value> = {
|
|
|
8130
8144
|
getOptionLabel: (opt: O) => string;
|
|
8131
8145
|
/** The current value; it can be `undefined`, even if `V` cannot be. */
|
|
8132
8146
|
values: V[] | undefined;
|
|
8147
|
+
/** Values proposed by an AI model; puts the field in AI mode. */
|
|
8148
|
+
proposedValues?: V[];
|
|
8133
8149
|
onSelect: (values: V[], opts: O[]) => void;
|
|
8134
8150
|
multiselect?: boolean;
|
|
8135
8151
|
disabledOptions?: (V | {
|
|
@@ -8236,6 +8252,8 @@ interface NumberFieldProps extends Pick<PresentationFieldProps, "labelStyle" | "
|
|
|
8236
8252
|
/** If set, the label will be defined as 'aria-label` on the input element */
|
|
8237
8253
|
type?: NumberFieldType;
|
|
8238
8254
|
value: number | undefined;
|
|
8255
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
8256
|
+
proposedValue?: number;
|
|
8239
8257
|
onChange: (value: number | undefined) => void;
|
|
8240
8258
|
compact?: boolean;
|
|
8241
8259
|
clearable?: boolean;
|
|
@@ -8406,13 +8424,15 @@ declare function SelectCardGroup<V extends Value>(props: SelectCardGroupProps<V>
|
|
|
8406
8424
|
type SelectFieldProps<O, V extends Value> = {
|
|
8407
8425
|
/** The current value; it can be `undefined`, even if `V` cannot be. */
|
|
8408
8426
|
value: V | undefined;
|
|
8427
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
8428
|
+
proposedValue?: V;
|
|
8409
8429
|
/**
|
|
8410
8430
|
* Called when a value is selected, or `undefined` if `unsetLabel` is being used.
|
|
8411
8431
|
*
|
|
8412
8432
|
* Ideally callers that didn't pass `unsetLabel` would not have to handle the ` | undefined` here.
|
|
8413
8433
|
*/
|
|
8414
8434
|
onSelect: (value: V | undefined, opt: O | undefined) => void;
|
|
8415
|
-
} & Omit<ComboBoxBaseProps<O, V>, "values" | "onSelect" | "multiselect">;
|
|
8435
|
+
} & Omit<ComboBoxBaseProps<O, V>, "values" | "proposedValues" | "onSelect" | "multiselect">;
|
|
8416
8436
|
/**
|
|
8417
8437
|
* Provides a non-native select/dropdown widget.
|
|
8418
8438
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -4888,6 +4888,8 @@ interface BeamTextFieldProps<X> extends BeamFocusableProps, PresentationFieldPro
|
|
|
4888
4888
|
/** Marks the field as required or optional, the default is assumed ambiguous/unknown. */
|
|
4889
4889
|
required?: boolean;
|
|
4890
4890
|
value: string | undefined;
|
|
4891
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
4892
|
+
proposedValue?: string;
|
|
4891
4893
|
/** Handler called when the interactive element state changes. */
|
|
4892
4894
|
onChange: (value: string | undefined) => void;
|
|
4893
4895
|
/** Called when the component loses focus, mostly for BoundTextField to use. */
|
|
@@ -7916,6 +7918,14 @@ type TextFieldBaseProps<X> = {
|
|
|
7916
7918
|
hideErrorMessage?: boolean;
|
|
7917
7919
|
alwaysShowHelperText?: boolean;
|
|
7918
7920
|
unfocusedPlaceholder?: ReactNode;
|
|
7921
|
+
/** Value proposed by an AI model; puts the field in AI mode. Pre-formatted for display. */
|
|
7922
|
+
proposedValue?: string;
|
|
7923
|
+
/** The formatted value on record, rendered struck through beside the input. Independent of `proposedValue`. */
|
|
7924
|
+
originalValue?: string;
|
|
7925
|
+
/** Called on any edit the user makes, so the owning field can end AI mode. */
|
|
7926
|
+
onUserEdit?: VoidFunction;
|
|
7927
|
+
/** Called when the user leaves the field, so the owning field can retire the struck-through original. */
|
|
7928
|
+
onUserBlur?: VoidFunction;
|
|
7919
7929
|
/** Allow focusing without selecting, i.e. to let the user keep typing after we've pre-filled text + called focus, like the Add New component. */
|
|
7920
7930
|
selectOnFocus?: boolean;
|
|
7921
7931
|
} & Pick<BeamTextFieldProps<X>, "label" | "required" | "errorMsg" | "errorInTooltip" | "onBlur" | "onFocus" | "helperText" | "labelStyle" | "placeholder" | "compact" | "borderless" | "borderOnHover" | "visuallyDisabled" | "fullWidth" | "xss" | "inputStylePalette"> & Partial<Pick<BeamTextFieldProps<X>, "onChange">>;
|
|
@@ -7958,7 +7968,7 @@ type AutocompleteProps<T> = {
|
|
|
7958
7968
|
value: Value;
|
|
7959
7969
|
reason: string;
|
|
7960
7970
|
})[];
|
|
7961
|
-
} & Pick<PresentationFieldProps, "labelStyle"> & Pick<TextFieldBaseProps<any>, "label" | "clearable" | "startAdornment" | "fullWidth">;
|
|
7971
|
+
} & Pick<PresentationFieldProps, "labelStyle"> & Pick<TextFieldBaseProps<any>, "label" | "clearable" | "startAdornment" | "fullWidth" | "proposedValue">;
|
|
7962
7972
|
declare function Autocomplete<T extends object>(props: AutocompleteProps<T>): JSX.Element;
|
|
7963
7973
|
|
|
7964
7974
|
interface CheckboxProps {
|
|
@@ -8095,11 +8105,15 @@ type DateFieldCommonProps = Pick<TextFieldBaseProps<Properties>, "borderless" |
|
|
|
8095
8105
|
/** Render header that skips years in addition to months */
|
|
8096
8106
|
useYearPicker?: boolean;
|
|
8097
8107
|
};
|
|
8098
|
-
|
|
8108
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
8109
|
+
type ProposedValue<V> = {
|
|
8110
|
+
proposedValue?: V;
|
|
8111
|
+
};
|
|
8112
|
+
type DateFieldProps = DateFieldCommonProps & ProposedValue<PlainDate> & {
|
|
8099
8113
|
value: PlainDate | undefined;
|
|
8100
8114
|
onChange: (value: PlainDate | undefined) => void;
|
|
8101
8115
|
};
|
|
8102
|
-
type DateRangeFieldProps = DateFieldCommonProps & {
|
|
8116
|
+
type DateRangeFieldProps = DateFieldCommonProps & ProposedValue<DateRange> & {
|
|
8103
8117
|
value: DateRange | undefined;
|
|
8104
8118
|
onChange: (value: DateRange | undefined) => void;
|
|
8105
8119
|
};
|
|
@@ -8130,6 +8144,8 @@ type ComboBoxBaseProps<O, V extends Value> = {
|
|
|
8130
8144
|
getOptionLabel: (opt: O) => string;
|
|
8131
8145
|
/** The current value; it can be `undefined`, even if `V` cannot be. */
|
|
8132
8146
|
values: V[] | undefined;
|
|
8147
|
+
/** Values proposed by an AI model; puts the field in AI mode. */
|
|
8148
|
+
proposedValues?: V[];
|
|
8133
8149
|
onSelect: (values: V[], opts: O[]) => void;
|
|
8134
8150
|
multiselect?: boolean;
|
|
8135
8151
|
disabledOptions?: (V | {
|
|
@@ -8236,6 +8252,8 @@ interface NumberFieldProps extends Pick<PresentationFieldProps, "labelStyle" | "
|
|
|
8236
8252
|
/** If set, the label will be defined as 'aria-label` on the input element */
|
|
8237
8253
|
type?: NumberFieldType;
|
|
8238
8254
|
value: number | undefined;
|
|
8255
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
8256
|
+
proposedValue?: number;
|
|
8239
8257
|
onChange: (value: number | undefined) => void;
|
|
8240
8258
|
compact?: boolean;
|
|
8241
8259
|
clearable?: boolean;
|
|
@@ -8406,13 +8424,15 @@ declare function SelectCardGroup<V extends Value>(props: SelectCardGroupProps<V>
|
|
|
8406
8424
|
type SelectFieldProps<O, V extends Value> = {
|
|
8407
8425
|
/** The current value; it can be `undefined`, even if `V` cannot be. */
|
|
8408
8426
|
value: V | undefined;
|
|
8427
|
+
/** Value proposed by an AI model; puts the field in AI mode. */
|
|
8428
|
+
proposedValue?: V;
|
|
8409
8429
|
/**
|
|
8410
8430
|
* Called when a value is selected, or `undefined` if `unsetLabel` is being used.
|
|
8411
8431
|
*
|
|
8412
8432
|
* Ideally callers that didn't pass `unsetLabel` would not have to handle the ` | undefined` here.
|
|
8413
8433
|
*/
|
|
8414
8434
|
onSelect: (value: V | undefined, opt: O | undefined) => void;
|
|
8415
|
-
} & Omit<ComboBoxBaseProps<O, V>, "values" | "onSelect" | "multiselect">;
|
|
8435
|
+
} & Omit<ComboBoxBaseProps<O, V>, "values" | "proposedValues" | "onSelect" | "multiselect">;
|
|
8416
8436
|
/**
|
|
8417
8437
|
* Provides a non-native select/dropdown widget.
|
|
8418
8438
|
*
|