@homebound/beam 2.416.0 → 2.416.2
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 +23 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -35
- package/dist/index.d.ts +34 -35
- package/dist/index.js +117 -104
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -4862,11 +4862,11 @@ interface OverlayTriggerProps {
|
|
|
4862
4862
|
contrast?: boolean;
|
|
4863
4863
|
}
|
|
4864
4864
|
|
|
4865
|
-
|
|
4865
|
+
type EditColumnsButtonProps<R extends Kinded> = {
|
|
4866
4866
|
columns: GridColumn<R>[];
|
|
4867
4867
|
api: GridTableApi<R>;
|
|
4868
4868
|
defaultOpen?: boolean;
|
|
4869
|
-
}
|
|
4869
|
+
} & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip">;
|
|
4870
4870
|
declare function EditColumnsButton<R extends Kinded>(props: EditColumnsButtonProps<R>): _emotion_react_jsx_runtime.JSX.Element;
|
|
4871
4871
|
|
|
4872
4872
|
interface SelectToggleProps {
|
|
@@ -6047,9 +6047,9 @@ interface DatePickerProps {
|
|
|
6047
6047
|
useYearPicker?: boolean;
|
|
6048
6048
|
}
|
|
6049
6049
|
|
|
6050
|
-
|
|
6050
|
+
type ButtonDatePickerProps = {
|
|
6051
6051
|
defaultOpen?: boolean;
|
|
6052
|
-
}
|
|
6052
|
+
} & DatePickerProps & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip">;
|
|
6053
6053
|
declare function ButtonDatePicker(props: ButtonDatePickerProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6054
6054
|
|
|
6055
6055
|
interface ButtonGroupProps {
|
|
@@ -6074,18 +6074,18 @@ type ButtonGroupButton = {
|
|
|
6074
6074
|
declare function ButtonGroup(props: ButtonGroupProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6075
6075
|
type ButtonGroupSize = "xs" | "sm" | "md";
|
|
6076
6076
|
|
|
6077
|
-
|
|
6077
|
+
type ButtonMenuBaseProps = {
|
|
6078
6078
|
items: MenuItem[];
|
|
6079
6079
|
persistentItems?: MenuItem[];
|
|
6080
6080
|
searchable?: boolean;
|
|
6081
6081
|
defaultOpen?: boolean;
|
|
6082
6082
|
contrast?: boolean;
|
|
6083
|
-
}
|
|
6084
|
-
|
|
6083
|
+
} & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip" | "showActiveBorder">;
|
|
6084
|
+
type SelectionButtonMenuProps = {
|
|
6085
6085
|
/** Display a menu item as selected based. Use the Menu Item's label to identify */
|
|
6086
6086
|
selectedItem: string | undefined;
|
|
6087
6087
|
onChange: (key: string) => void;
|
|
6088
|
-
}
|
|
6088
|
+
} & ButtonMenuBaseProps;
|
|
6089
6089
|
type ButtonMenuProps = ButtonMenuBaseProps | SelectionButtonMenuProps;
|
|
6090
6090
|
declare function ButtonMenu(props: ButtonMenuProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6091
6091
|
type MenuItemBase = {
|
|
@@ -6113,13 +6113,13 @@ type MenuSection = MenuItem & {
|
|
|
6113
6113
|
items?: MenuItem[];
|
|
6114
6114
|
};
|
|
6115
6115
|
|
|
6116
|
-
|
|
6116
|
+
type ButtonModalProps = {
|
|
6117
6117
|
content: ReactNode | ((close: () => void) => ReactNode);
|
|
6118
6118
|
title?: string;
|
|
6119
6119
|
variant?: ButtonVariant;
|
|
6120
6120
|
storybookDefaultOpen?: boolean;
|
|
6121
6121
|
hideEndAdornment?: boolean;
|
|
6122
|
-
}
|
|
6122
|
+
} & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip" | "showActiveBorder">;
|
|
6123
6123
|
declare function ButtonModal(props: ButtonModalProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6124
6124
|
|
|
6125
6125
|
type TagXss = Margin | "backgroundColor" | "color";
|
|
@@ -6279,7 +6279,7 @@ interface Filter<V> {
|
|
|
6279
6279
|
render(value: V | undefined, setValue: (value: V | undefined) => void, tid: TestIds, inModal: boolean, vertical: boolean): JSX.Element;
|
|
6280
6280
|
}
|
|
6281
6281
|
|
|
6282
|
-
|
|
6282
|
+
type TextFieldBaseProps<X> = {
|
|
6283
6283
|
labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
|
|
6284
6284
|
inputProps: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
6285
6285
|
inputRef?: MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
@@ -6297,7 +6297,7 @@ interface TextFieldBaseProps<X> extends Pick<BeamTextFieldProps<X>, "label" | "r
|
|
|
6297
6297
|
unfocusedPlaceholder?: ReactNode;
|
|
6298
6298
|
/** 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. */
|
|
6299
6299
|
selectOnFocus?: boolean;
|
|
6300
|
-
}
|
|
6300
|
+
} & Pick<BeamTextFieldProps<X>, "label" | "required" | "errorMsg" | "errorInTooltip" | "onBlur" | "onFocus" | "helperText" | "labelStyle" | "placeholder" | "compact" | "borderless" | "borderOnHover" | "visuallyDisabled" | "fullWidth" | "xss" | "inputStylePalette"> & Partial<Pick<BeamTextFieldProps<X>, "onChange">>;
|
|
6301
6301
|
|
|
6302
6302
|
/**
|
|
6303
6303
|
* The values we support in select fields.
|
|
@@ -6314,7 +6314,7 @@ interface TextFieldBaseProps<X> extends Pick<BeamTextFieldProps<X>, "label" | "r
|
|
|
6314
6314
|
*/
|
|
6315
6315
|
type Value = string | number | null | undefined | boolean;
|
|
6316
6316
|
|
|
6317
|
-
|
|
6317
|
+
type AutocompleteProps<T> = {
|
|
6318
6318
|
onSelect: (item: T) => void;
|
|
6319
6319
|
/** A function that returns how to render the an option in the menu. If not set, `getOptionLabel` will be used */
|
|
6320
6320
|
getOptionMenuLabel?: (o: T) => ReactNode;
|
|
@@ -6337,7 +6337,7 @@ interface AutocompleteProps<T> extends Pick<PresentationFieldProps, "labelStyle"
|
|
|
6337
6337
|
value: Value;
|
|
6338
6338
|
reason: string;
|
|
6339
6339
|
})[];
|
|
6340
|
-
}
|
|
6340
|
+
} & Pick<PresentationFieldProps, "labelStyle"> & Pick<TextFieldBaseProps<any>, "label" | "clearable" | "startAdornment" | "fullWidth">;
|
|
6341
6341
|
declare function Autocomplete<T extends object>(props: AutocompleteProps<T>): _emotion_react_jsx_runtime.JSX.Element;
|
|
6342
6342
|
|
|
6343
6343
|
interface CheckboxProps {
|
|
@@ -6531,7 +6531,7 @@ declare const iconCardStylesHover: {
|
|
|
6531
6531
|
};
|
|
6532
6532
|
|
|
6533
6533
|
/** Base props for either `SelectField` or `MultiSelectField`. */
|
|
6534
|
-
|
|
6534
|
+
type ComboBoxBaseProps<O, V extends Value> = {
|
|
6535
6535
|
/** Renders `opt` in the dropdown menu, defaults to the `getOptionLabel` prop. `isUnsetOpt` is only defined for single SelectField */
|
|
6536
6536
|
getOptionMenuLabel?: (opt: O, isUnsetOpt?: boolean, isAddNewOption?: boolean) => string | ReactNode;
|
|
6537
6537
|
getOptionValue: (opt: O) => V;
|
|
@@ -6588,7 +6588,7 @@ interface ComboBoxBaseProps<O, V extends Value> extends BeamFocusableProps, Pres
|
|
|
6588
6588
|
* Set to false to maintain the original order of options.
|
|
6589
6589
|
*/
|
|
6590
6590
|
autoSort?: boolean;
|
|
6591
|
-
}
|
|
6591
|
+
} & BeamFocusableProps & PresentationFieldProps;
|
|
6592
6592
|
/** Allows lazy-loading select fields, which is useful for pages w/lots of fields the user may not actually use. */
|
|
6593
6593
|
type OptionsOrLoad<O> = O[] | {
|
|
6594
6594
|
/** The initial option(s) to show before the user interacts with the dropdown. */
|
|
@@ -6608,14 +6608,14 @@ interface MultiLineSelectFieldProps<O, V extends Value> extends Exclude<ComboBox
|
|
|
6608
6608
|
}
|
|
6609
6609
|
declare function MultiLineSelectField<O, V extends Value>(props: Optional<MultiLineSelectFieldProps<O, V>, "getOptionLabel" | "getOptionValue">): JSX.Element;
|
|
6610
6610
|
|
|
6611
|
-
|
|
6611
|
+
type MultiSelectFieldProps<O, V extends Value> = {
|
|
6612
6612
|
/** Renders `opt` in the dropdown menu, defaults to the `getOptionLabel` prop. */
|
|
6613
6613
|
getOptionMenuLabel?: (opt: O) => string | ReactNode;
|
|
6614
6614
|
getOptionValue: (opt: O) => V;
|
|
6615
6615
|
getOptionLabel: (opt: O) => string;
|
|
6616
6616
|
values: V[];
|
|
6617
6617
|
onSelect: (values: V[], opts: O[]) => void;
|
|
6618
|
-
}
|
|
6618
|
+
} & Exclude<ComboBoxBaseProps<O, V>, "unsetLabel" | "addNew">;
|
|
6619
6619
|
/**
|
|
6620
6620
|
* Provides a non-native multiselect/dropdown widget.
|
|
6621
6621
|
*
|
|
@@ -6664,7 +6664,7 @@ interface NumberFieldProps extends Pick<PresentationFieldProps, "labelStyle" | "
|
|
|
6664
6664
|
declare function NumberField(props: NumberFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6665
6665
|
declare function formatValue(value: number, factor: number, numFractionDigits: number | undefined, numIntegerDigits: number | undefined, positiveOnly?: boolean): number | undefined;
|
|
6666
6666
|
|
|
6667
|
-
|
|
6667
|
+
type RadioFieldOption<K extends string> = {
|
|
6668
6668
|
/** The label for a specific option, i.e. "Cheddar". */
|
|
6669
6669
|
label: string;
|
|
6670
6670
|
/** An optional longer description to render under the label. */
|
|
@@ -6673,8 +6673,8 @@ interface RadioFieldOption<K extends string> {
|
|
|
6673
6673
|
value: K;
|
|
6674
6674
|
/** Disable only specific option, with an optional reason */
|
|
6675
6675
|
disabled?: boolean | ReactNode;
|
|
6676
|
-
}
|
|
6677
|
-
|
|
6676
|
+
};
|
|
6677
|
+
type RadioGroupFieldProps<K extends string> = {
|
|
6678
6678
|
/** The label for the choice itself, i.e. "Favorite Cheese". */
|
|
6679
6679
|
label: string;
|
|
6680
6680
|
/** The currently selected option value (i.e. an id). */
|
|
@@ -6688,7 +6688,7 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
|
|
|
6688
6688
|
helperText?: string | ReactNode;
|
|
6689
6689
|
onBlur?: () => void;
|
|
6690
6690
|
onFocus?: () => void;
|
|
6691
|
-
}
|
|
6691
|
+
} & Pick<PresentationFieldProps, "labelStyle">;
|
|
6692
6692
|
/**
|
|
6693
6693
|
* Provides a radio group with label.
|
|
6694
6694
|
*
|
|
@@ -6728,7 +6728,7 @@ declare const RichTextField: (props: RichTextFieldProps) => _emotion_react_jsx_r
|
|
|
6728
6728
|
*/
|
|
6729
6729
|
declare function RichTextFieldImpl(props: RichTextFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6730
6730
|
|
|
6731
|
-
|
|
6731
|
+
type SelectFieldProps<O, V extends Value> = {
|
|
6732
6732
|
/** The current value; it can be `undefined`, even if `V` cannot be. */
|
|
6733
6733
|
value: V | undefined;
|
|
6734
6734
|
/**
|
|
@@ -6737,7 +6737,7 @@ interface SelectFieldProps<O, V extends Value> extends Omit<ComboBoxBaseProps<O,
|
|
|
6737
6737
|
* Ideally callers that didn't pass `unsetLabel` would not have to handle the ` | undefined` here.
|
|
6738
6738
|
*/
|
|
6739
6739
|
onSelect: (value: V | undefined, opt: O | undefined) => void;
|
|
6740
|
-
}
|
|
6740
|
+
} & Omit<ComboBoxBaseProps<O, V>, "values" | "onSelect" | "multiselect">;
|
|
6741
6741
|
/**
|
|
6742
6742
|
* Provides a non-native select/dropdown widget.
|
|
6743
6743
|
*
|
|
@@ -6888,7 +6888,7 @@ type TreeSelectResponse<O, V extends Value> = {
|
|
|
6888
6888
|
};
|
|
6889
6889
|
};
|
|
6890
6890
|
|
|
6891
|
-
|
|
6891
|
+
type TreeSelectFieldProps<O, V extends Value> = {
|
|
6892
6892
|
/** Renders `opt` in the dropdown menu, defaults to the `getOptionLabel` prop. `isUnsetOpt` is only defined for single SelectField */
|
|
6893
6893
|
getOptionMenuLabel?: (opt: O, isUnsetOpt?: boolean) => string | ReactNode;
|
|
6894
6894
|
getOptionValue: (opt: O) => V;
|
|
@@ -6926,15 +6926,15 @@ interface TreeSelectFieldProps<O, V extends Value> extends BeamFocusableProps, P
|
|
|
6926
6926
|
* @default root */
|
|
6927
6927
|
chipDisplay?: "all" | "leaf" | "root";
|
|
6928
6928
|
disabledOptions?: V[];
|
|
6929
|
-
}
|
|
6929
|
+
} & BeamFocusableProps & PresentationFieldProps;
|
|
6930
6930
|
declare function TreeSelectField<O, V extends Value>(props: TreeSelectFieldProps<O, V>): JSX.Element;
|
|
6931
6931
|
declare function TreeSelectField<O extends HasIdAndName<V>, V extends Value>(props: Optional<TreeSelectFieldProps<O, V>, "getOptionValue" | "getOptionLabel">): JSX.Element;
|
|
6932
6932
|
declare function useTreeSelectFieldProvider<O, V extends Value>(): CollapsedChildrenState<any, any>;
|
|
6933
|
-
|
|
6933
|
+
type CollapsedChildrenState<O, V extends Value> = {
|
|
6934
6934
|
collapsedKeys: Key$1[];
|
|
6935
6935
|
setCollapsedKeys: Dispatch<SetStateAction<Key$1[]>>;
|
|
6936
6936
|
getOptionValue: (opt: O) => V;
|
|
6937
|
-
}
|
|
6937
|
+
};
|
|
6938
6938
|
declare const CollapsedContext: React__default.Context<CollapsedChildrenState<any, any>>;
|
|
6939
6939
|
|
|
6940
6940
|
type DateFilterProps<O, V extends Value, DV extends DateFilterValue<V>> = {
|
|
@@ -7138,10 +7138,9 @@ interface ResponsiveGridProps extends PropsWithChildren<useResponsiveGridProps>
|
|
|
7138
7138
|
/** Helper component for generating a responsive grid */
|
|
7139
7139
|
declare function ResponsiveGrid(props: ResponsiveGridProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7140
7140
|
|
|
7141
|
-
|
|
7141
|
+
type ResponsiveGridItemProps = PropsWithChildren<{
|
|
7142
7142
|
colSpan: number;
|
|
7143
|
-
}
|
|
7144
|
-
}
|
|
7143
|
+
}>;
|
|
7145
7144
|
/** Helper component for generating grid items with the ResponsiveGrid */
|
|
7146
7145
|
declare function ResponsiveGridItem(props: ResponsiveGridItemProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7147
7146
|
|
|
@@ -7218,11 +7217,11 @@ type BoundCheckboxGroupFieldProps = Omit<CheckboxGroupProps, "values" | "onChang
|
|
|
7218
7217
|
* To make the field agnostic to the order of selected values, add `strictOrder: false` to the field's ObjectConfig */
|
|
7219
7218
|
declare function BoundCheckboxGroupField(props: BoundCheckboxGroupFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7220
7219
|
|
|
7221
|
-
|
|
7220
|
+
type BoundChipSelectFieldProps<O, V extends Value> = {
|
|
7222
7221
|
onSelect?: (option: V | undefined) => void;
|
|
7223
7222
|
field: FieldState<V | null | undefined>;
|
|
7224
7223
|
label?: string;
|
|
7225
|
-
}
|
|
7224
|
+
} & Omit<ChipSelectFieldProps<O, V>, "onSelect" | "label" | "value">;
|
|
7226
7225
|
declare function BoundChipSelectField<O, V extends Value>(props: BoundChipSelectFieldProps<O, V>): JSX.Element;
|
|
7227
7226
|
declare function BoundChipSelectField<O extends HasIdAndName<V>, V extends Value>(props: Optional<BoundChipSelectFieldProps<O, V>, "getOptionValue" | "getOptionLabel">): JSX.Element;
|
|
7228
7227
|
|
|
@@ -7531,13 +7530,13 @@ type FormWidth =
|
|
|
7531
7530
|
| "lg"
|
|
7532
7531
|
/** 100%, works well for showing full width fields, or deferring to the parent width. */
|
|
7533
7532
|
| "full";
|
|
7534
|
-
|
|
7533
|
+
type FormLinesProps = {
|
|
7535
7534
|
/** Let the user interleave group-less lines and grouped lines. */
|
|
7536
7535
|
children: ReactNode;
|
|
7537
7536
|
width?: FormWidth;
|
|
7538
7537
|
/** Increment property (e.g. 1 = 8px). Defines space between form fields */
|
|
7539
7538
|
gap?: number;
|
|
7540
|
-
}
|
|
7539
|
+
} & Pick<PresentationFieldProps, "labelStyle" | "labelLeftFieldWidth" | "labelSuffix" | "compact">;
|
|
7541
7540
|
/**
|
|
7542
7541
|
* Applies standard Form layout/size/spacing between lines.
|
|
7543
7542
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -4862,11 +4862,11 @@ interface OverlayTriggerProps {
|
|
|
4862
4862
|
contrast?: boolean;
|
|
4863
4863
|
}
|
|
4864
4864
|
|
|
4865
|
-
|
|
4865
|
+
type EditColumnsButtonProps<R extends Kinded> = {
|
|
4866
4866
|
columns: GridColumn<R>[];
|
|
4867
4867
|
api: GridTableApi<R>;
|
|
4868
4868
|
defaultOpen?: boolean;
|
|
4869
|
-
}
|
|
4869
|
+
} & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip">;
|
|
4870
4870
|
declare function EditColumnsButton<R extends Kinded>(props: EditColumnsButtonProps<R>): _emotion_react_jsx_runtime.JSX.Element;
|
|
4871
4871
|
|
|
4872
4872
|
interface SelectToggleProps {
|
|
@@ -6047,9 +6047,9 @@ interface DatePickerProps {
|
|
|
6047
6047
|
useYearPicker?: boolean;
|
|
6048
6048
|
}
|
|
6049
6049
|
|
|
6050
|
-
|
|
6050
|
+
type ButtonDatePickerProps = {
|
|
6051
6051
|
defaultOpen?: boolean;
|
|
6052
|
-
}
|
|
6052
|
+
} & DatePickerProps & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip">;
|
|
6053
6053
|
declare function ButtonDatePicker(props: ButtonDatePickerProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6054
6054
|
|
|
6055
6055
|
interface ButtonGroupProps {
|
|
@@ -6074,18 +6074,18 @@ type ButtonGroupButton = {
|
|
|
6074
6074
|
declare function ButtonGroup(props: ButtonGroupProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6075
6075
|
type ButtonGroupSize = "xs" | "sm" | "md";
|
|
6076
6076
|
|
|
6077
|
-
|
|
6077
|
+
type ButtonMenuBaseProps = {
|
|
6078
6078
|
items: MenuItem[];
|
|
6079
6079
|
persistentItems?: MenuItem[];
|
|
6080
6080
|
searchable?: boolean;
|
|
6081
6081
|
defaultOpen?: boolean;
|
|
6082
6082
|
contrast?: boolean;
|
|
6083
|
-
}
|
|
6084
|
-
|
|
6083
|
+
} & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip" | "showActiveBorder">;
|
|
6084
|
+
type SelectionButtonMenuProps = {
|
|
6085
6085
|
/** Display a menu item as selected based. Use the Menu Item's label to identify */
|
|
6086
6086
|
selectedItem: string | undefined;
|
|
6087
6087
|
onChange: (key: string) => void;
|
|
6088
|
-
}
|
|
6088
|
+
} & ButtonMenuBaseProps;
|
|
6089
6089
|
type ButtonMenuProps = ButtonMenuBaseProps | SelectionButtonMenuProps;
|
|
6090
6090
|
declare function ButtonMenu(props: ButtonMenuProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6091
6091
|
type MenuItemBase = {
|
|
@@ -6113,13 +6113,13 @@ type MenuSection = MenuItem & {
|
|
|
6113
6113
|
items?: MenuItem[];
|
|
6114
6114
|
};
|
|
6115
6115
|
|
|
6116
|
-
|
|
6116
|
+
type ButtonModalProps = {
|
|
6117
6117
|
content: ReactNode | ((close: () => void) => ReactNode);
|
|
6118
6118
|
title?: string;
|
|
6119
6119
|
variant?: ButtonVariant;
|
|
6120
6120
|
storybookDefaultOpen?: boolean;
|
|
6121
6121
|
hideEndAdornment?: boolean;
|
|
6122
|
-
}
|
|
6122
|
+
} & Pick<OverlayTriggerProps, "trigger" | "placement" | "disabled" | "tooltip" | "showActiveBorder">;
|
|
6123
6123
|
declare function ButtonModal(props: ButtonModalProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6124
6124
|
|
|
6125
6125
|
type TagXss = Margin | "backgroundColor" | "color";
|
|
@@ -6279,7 +6279,7 @@ interface Filter<V> {
|
|
|
6279
6279
|
render(value: V | undefined, setValue: (value: V | undefined) => void, tid: TestIds, inModal: boolean, vertical: boolean): JSX.Element;
|
|
6280
6280
|
}
|
|
6281
6281
|
|
|
6282
|
-
|
|
6282
|
+
type TextFieldBaseProps<X> = {
|
|
6283
6283
|
labelProps?: LabelHTMLAttributes<HTMLLabelElement>;
|
|
6284
6284
|
inputProps: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
6285
6285
|
inputRef?: MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null>;
|
|
@@ -6297,7 +6297,7 @@ interface TextFieldBaseProps<X> extends Pick<BeamTextFieldProps<X>, "label" | "r
|
|
|
6297
6297
|
unfocusedPlaceholder?: ReactNode;
|
|
6298
6298
|
/** 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. */
|
|
6299
6299
|
selectOnFocus?: boolean;
|
|
6300
|
-
}
|
|
6300
|
+
} & Pick<BeamTextFieldProps<X>, "label" | "required" | "errorMsg" | "errorInTooltip" | "onBlur" | "onFocus" | "helperText" | "labelStyle" | "placeholder" | "compact" | "borderless" | "borderOnHover" | "visuallyDisabled" | "fullWidth" | "xss" | "inputStylePalette"> & Partial<Pick<BeamTextFieldProps<X>, "onChange">>;
|
|
6301
6301
|
|
|
6302
6302
|
/**
|
|
6303
6303
|
* The values we support in select fields.
|
|
@@ -6314,7 +6314,7 @@ interface TextFieldBaseProps<X> extends Pick<BeamTextFieldProps<X>, "label" | "r
|
|
|
6314
6314
|
*/
|
|
6315
6315
|
type Value = string | number | null | undefined | boolean;
|
|
6316
6316
|
|
|
6317
|
-
|
|
6317
|
+
type AutocompleteProps<T> = {
|
|
6318
6318
|
onSelect: (item: T) => void;
|
|
6319
6319
|
/** A function that returns how to render the an option in the menu. If not set, `getOptionLabel` will be used */
|
|
6320
6320
|
getOptionMenuLabel?: (o: T) => ReactNode;
|
|
@@ -6337,7 +6337,7 @@ interface AutocompleteProps<T> extends Pick<PresentationFieldProps, "labelStyle"
|
|
|
6337
6337
|
value: Value;
|
|
6338
6338
|
reason: string;
|
|
6339
6339
|
})[];
|
|
6340
|
-
}
|
|
6340
|
+
} & Pick<PresentationFieldProps, "labelStyle"> & Pick<TextFieldBaseProps<any>, "label" | "clearable" | "startAdornment" | "fullWidth">;
|
|
6341
6341
|
declare function Autocomplete<T extends object>(props: AutocompleteProps<T>): _emotion_react_jsx_runtime.JSX.Element;
|
|
6342
6342
|
|
|
6343
6343
|
interface CheckboxProps {
|
|
@@ -6531,7 +6531,7 @@ declare const iconCardStylesHover: {
|
|
|
6531
6531
|
};
|
|
6532
6532
|
|
|
6533
6533
|
/** Base props for either `SelectField` or `MultiSelectField`. */
|
|
6534
|
-
|
|
6534
|
+
type ComboBoxBaseProps<O, V extends Value> = {
|
|
6535
6535
|
/** Renders `opt` in the dropdown menu, defaults to the `getOptionLabel` prop. `isUnsetOpt` is only defined for single SelectField */
|
|
6536
6536
|
getOptionMenuLabel?: (opt: O, isUnsetOpt?: boolean, isAddNewOption?: boolean) => string | ReactNode;
|
|
6537
6537
|
getOptionValue: (opt: O) => V;
|
|
@@ -6588,7 +6588,7 @@ interface ComboBoxBaseProps<O, V extends Value> extends BeamFocusableProps, Pres
|
|
|
6588
6588
|
* Set to false to maintain the original order of options.
|
|
6589
6589
|
*/
|
|
6590
6590
|
autoSort?: boolean;
|
|
6591
|
-
}
|
|
6591
|
+
} & BeamFocusableProps & PresentationFieldProps;
|
|
6592
6592
|
/** Allows lazy-loading select fields, which is useful for pages w/lots of fields the user may not actually use. */
|
|
6593
6593
|
type OptionsOrLoad<O> = O[] | {
|
|
6594
6594
|
/** The initial option(s) to show before the user interacts with the dropdown. */
|
|
@@ -6608,14 +6608,14 @@ interface MultiLineSelectFieldProps<O, V extends Value> extends Exclude<ComboBox
|
|
|
6608
6608
|
}
|
|
6609
6609
|
declare function MultiLineSelectField<O, V extends Value>(props: Optional<MultiLineSelectFieldProps<O, V>, "getOptionLabel" | "getOptionValue">): JSX.Element;
|
|
6610
6610
|
|
|
6611
|
-
|
|
6611
|
+
type MultiSelectFieldProps<O, V extends Value> = {
|
|
6612
6612
|
/** Renders `opt` in the dropdown menu, defaults to the `getOptionLabel` prop. */
|
|
6613
6613
|
getOptionMenuLabel?: (opt: O) => string | ReactNode;
|
|
6614
6614
|
getOptionValue: (opt: O) => V;
|
|
6615
6615
|
getOptionLabel: (opt: O) => string;
|
|
6616
6616
|
values: V[];
|
|
6617
6617
|
onSelect: (values: V[], opts: O[]) => void;
|
|
6618
|
-
}
|
|
6618
|
+
} & Exclude<ComboBoxBaseProps<O, V>, "unsetLabel" | "addNew">;
|
|
6619
6619
|
/**
|
|
6620
6620
|
* Provides a non-native multiselect/dropdown widget.
|
|
6621
6621
|
*
|
|
@@ -6664,7 +6664,7 @@ interface NumberFieldProps extends Pick<PresentationFieldProps, "labelStyle" | "
|
|
|
6664
6664
|
declare function NumberField(props: NumberFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6665
6665
|
declare function formatValue(value: number, factor: number, numFractionDigits: number | undefined, numIntegerDigits: number | undefined, positiveOnly?: boolean): number | undefined;
|
|
6666
6666
|
|
|
6667
|
-
|
|
6667
|
+
type RadioFieldOption<K extends string> = {
|
|
6668
6668
|
/** The label for a specific option, i.e. "Cheddar". */
|
|
6669
6669
|
label: string;
|
|
6670
6670
|
/** An optional longer description to render under the label. */
|
|
@@ -6673,8 +6673,8 @@ interface RadioFieldOption<K extends string> {
|
|
|
6673
6673
|
value: K;
|
|
6674
6674
|
/** Disable only specific option, with an optional reason */
|
|
6675
6675
|
disabled?: boolean | ReactNode;
|
|
6676
|
-
}
|
|
6677
|
-
|
|
6676
|
+
};
|
|
6677
|
+
type RadioGroupFieldProps<K extends string> = {
|
|
6678
6678
|
/** The label for the choice itself, i.e. "Favorite Cheese". */
|
|
6679
6679
|
label: string;
|
|
6680
6680
|
/** The currently selected option value (i.e. an id). */
|
|
@@ -6688,7 +6688,7 @@ interface RadioGroupFieldProps<K extends string> extends Pick<PresentationFieldP
|
|
|
6688
6688
|
helperText?: string | ReactNode;
|
|
6689
6689
|
onBlur?: () => void;
|
|
6690
6690
|
onFocus?: () => void;
|
|
6691
|
-
}
|
|
6691
|
+
} & Pick<PresentationFieldProps, "labelStyle">;
|
|
6692
6692
|
/**
|
|
6693
6693
|
* Provides a radio group with label.
|
|
6694
6694
|
*
|
|
@@ -6728,7 +6728,7 @@ declare const RichTextField: (props: RichTextFieldProps) => _emotion_react_jsx_r
|
|
|
6728
6728
|
*/
|
|
6729
6729
|
declare function RichTextFieldImpl(props: RichTextFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
6730
6730
|
|
|
6731
|
-
|
|
6731
|
+
type SelectFieldProps<O, V extends Value> = {
|
|
6732
6732
|
/** The current value; it can be `undefined`, even if `V` cannot be. */
|
|
6733
6733
|
value: V | undefined;
|
|
6734
6734
|
/**
|
|
@@ -6737,7 +6737,7 @@ interface SelectFieldProps<O, V extends Value> extends Omit<ComboBoxBaseProps<O,
|
|
|
6737
6737
|
* Ideally callers that didn't pass `unsetLabel` would not have to handle the ` | undefined` here.
|
|
6738
6738
|
*/
|
|
6739
6739
|
onSelect: (value: V | undefined, opt: O | undefined) => void;
|
|
6740
|
-
}
|
|
6740
|
+
} & Omit<ComboBoxBaseProps<O, V>, "values" | "onSelect" | "multiselect">;
|
|
6741
6741
|
/**
|
|
6742
6742
|
* Provides a non-native select/dropdown widget.
|
|
6743
6743
|
*
|
|
@@ -6888,7 +6888,7 @@ type TreeSelectResponse<O, V extends Value> = {
|
|
|
6888
6888
|
};
|
|
6889
6889
|
};
|
|
6890
6890
|
|
|
6891
|
-
|
|
6891
|
+
type TreeSelectFieldProps<O, V extends Value> = {
|
|
6892
6892
|
/** Renders `opt` in the dropdown menu, defaults to the `getOptionLabel` prop. `isUnsetOpt` is only defined for single SelectField */
|
|
6893
6893
|
getOptionMenuLabel?: (opt: O, isUnsetOpt?: boolean) => string | ReactNode;
|
|
6894
6894
|
getOptionValue: (opt: O) => V;
|
|
@@ -6926,15 +6926,15 @@ interface TreeSelectFieldProps<O, V extends Value> extends BeamFocusableProps, P
|
|
|
6926
6926
|
* @default root */
|
|
6927
6927
|
chipDisplay?: "all" | "leaf" | "root";
|
|
6928
6928
|
disabledOptions?: V[];
|
|
6929
|
-
}
|
|
6929
|
+
} & BeamFocusableProps & PresentationFieldProps;
|
|
6930
6930
|
declare function TreeSelectField<O, V extends Value>(props: TreeSelectFieldProps<O, V>): JSX.Element;
|
|
6931
6931
|
declare function TreeSelectField<O extends HasIdAndName<V>, V extends Value>(props: Optional<TreeSelectFieldProps<O, V>, "getOptionValue" | "getOptionLabel">): JSX.Element;
|
|
6932
6932
|
declare function useTreeSelectFieldProvider<O, V extends Value>(): CollapsedChildrenState<any, any>;
|
|
6933
|
-
|
|
6933
|
+
type CollapsedChildrenState<O, V extends Value> = {
|
|
6934
6934
|
collapsedKeys: Key$1[];
|
|
6935
6935
|
setCollapsedKeys: Dispatch<SetStateAction<Key$1[]>>;
|
|
6936
6936
|
getOptionValue: (opt: O) => V;
|
|
6937
|
-
}
|
|
6937
|
+
};
|
|
6938
6938
|
declare const CollapsedContext: React__default.Context<CollapsedChildrenState<any, any>>;
|
|
6939
6939
|
|
|
6940
6940
|
type DateFilterProps<O, V extends Value, DV extends DateFilterValue<V>> = {
|
|
@@ -7138,10 +7138,9 @@ interface ResponsiveGridProps extends PropsWithChildren<useResponsiveGridProps>
|
|
|
7138
7138
|
/** Helper component for generating a responsive grid */
|
|
7139
7139
|
declare function ResponsiveGrid(props: ResponsiveGridProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7140
7140
|
|
|
7141
|
-
|
|
7141
|
+
type ResponsiveGridItemProps = PropsWithChildren<{
|
|
7142
7142
|
colSpan: number;
|
|
7143
|
-
}
|
|
7144
|
-
}
|
|
7143
|
+
}>;
|
|
7145
7144
|
/** Helper component for generating grid items with the ResponsiveGrid */
|
|
7146
7145
|
declare function ResponsiveGridItem(props: ResponsiveGridItemProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7147
7146
|
|
|
@@ -7218,11 +7217,11 @@ type BoundCheckboxGroupFieldProps = Omit<CheckboxGroupProps, "values" | "onChang
|
|
|
7218
7217
|
* To make the field agnostic to the order of selected values, add `strictOrder: false` to the field's ObjectConfig */
|
|
7219
7218
|
declare function BoundCheckboxGroupField(props: BoundCheckboxGroupFieldProps): _emotion_react_jsx_runtime.JSX.Element;
|
|
7220
7219
|
|
|
7221
|
-
|
|
7220
|
+
type BoundChipSelectFieldProps<O, V extends Value> = {
|
|
7222
7221
|
onSelect?: (option: V | undefined) => void;
|
|
7223
7222
|
field: FieldState<V | null | undefined>;
|
|
7224
7223
|
label?: string;
|
|
7225
|
-
}
|
|
7224
|
+
} & Omit<ChipSelectFieldProps<O, V>, "onSelect" | "label" | "value">;
|
|
7226
7225
|
declare function BoundChipSelectField<O, V extends Value>(props: BoundChipSelectFieldProps<O, V>): JSX.Element;
|
|
7227
7226
|
declare function BoundChipSelectField<O extends HasIdAndName<V>, V extends Value>(props: Optional<BoundChipSelectFieldProps<O, V>, "getOptionValue" | "getOptionLabel">): JSX.Element;
|
|
7228
7227
|
|
|
@@ -7531,13 +7530,13 @@ type FormWidth =
|
|
|
7531
7530
|
| "lg"
|
|
7532
7531
|
/** 100%, works well for showing full width fields, or deferring to the parent width. */
|
|
7533
7532
|
| "full";
|
|
7534
|
-
|
|
7533
|
+
type FormLinesProps = {
|
|
7535
7534
|
/** Let the user interleave group-less lines and grouped lines. */
|
|
7536
7535
|
children: ReactNode;
|
|
7537
7536
|
width?: FormWidth;
|
|
7538
7537
|
/** Increment property (e.g. 1 = 8px). Defines space between form fields */
|
|
7539
7538
|
gap?: number;
|
|
7540
|
-
}
|
|
7539
|
+
} & Pick<PresentationFieldProps, "labelStyle" | "labelLeftFieldWidth" | "labelSuffix" | "compact">;
|
|
7541
7540
|
/**
|
|
7542
7541
|
* Applies standard Form layout/size/spacing between lines.
|
|
7543
7542
|
*
|