@lumx/react 4.9.0-alpha.0 → 4.9.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.
- package/index.d.ts +1300 -735
- package/index.js +13638 -10935
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Kind as Kind$1, HorizontalAlignment as HorizontalAlignment$1, Theme as Theme$1, Size as Size$1, Orientation as Orientation$1, Alignment as Alignment$1, AspectRatio as AspectRatio$1, Emphasis as Emphasis$1 } from '@lumx/core/js/constants';
|
|
2
2
|
export * from '@lumx/core/js/constants';
|
|
3
3
|
import * as _lumx_core_js_types from '@lumx/core/js/types';
|
|
4
|
-
import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf as ValueOf$1, PropsToOverride,
|
|
4
|
+
import { GenericProps as GenericProps$1, HasTheme as HasTheme$1, ValueOf as ValueOf$1, PropsToOverride, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasClassName as HasClassName$1, HasCloseMode as HasCloseMode$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
|
|
5
5
|
export * from '@lumx/core/js/types';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
|
-
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, RefObject,
|
|
7
|
+
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, RefObject, SetStateAction, Key, CSSProperties, HTMLInputTypeAttribute, ComponentProps, ElementType as ElementType$1, ImgHTMLAttributes, AriaAttributes as AriaAttributes$1 } from 'react';
|
|
8
8
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
9
9
|
|
|
10
10
|
/** LumX Component Type. */
|
|
@@ -32,6 +32,13 @@ type ComponentRef<C> = C extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElem
|
|
|
32
32
|
ref?: infer R;
|
|
33
33
|
}> ? R : never;
|
|
34
34
|
|
|
35
|
+
type HasPolymorphicAs$1<E extends React.ElementType> = React.ComponentPropsWithoutRef<E> & {
|
|
36
|
+
/**
|
|
37
|
+
* Customize the rendered component.
|
|
38
|
+
*/
|
|
39
|
+
as?: E;
|
|
40
|
+
};
|
|
41
|
+
|
|
35
42
|
interface AlertDialogProps extends Omit<DialogProps, 'header' | 'footer'> {
|
|
36
43
|
/** Message variant. */
|
|
37
44
|
kind?: Kind$1;
|
|
@@ -1067,248 +1074,343 @@ interface SelectionChipGroupProps<O> extends GenericProps$1 {
|
|
|
1067
1074
|
*/
|
|
1068
1075
|
declare const SelectionChipGroup: <O>({ onChange, value, getOptionId, getOptionName, inputRef, inputLabel, renderChip, theme, isDisabled, chipTooltipLabel, label, ...forwardedProps }: SelectionChipGroupProps<O>) => react_jsx_runtime.JSX.Element;
|
|
1069
1076
|
|
|
1077
|
+
type Listener = (evt: KeyboardEvent) => void;
|
|
1078
|
+
interface UseKeyboardListNavigationType {
|
|
1079
|
+
/** the current active index */
|
|
1080
|
+
activeItemIndex: number;
|
|
1081
|
+
/** callback to be used when a key is pressed. usually used with the native prop `onKeyDown` */
|
|
1082
|
+
onKeyboardNavigation: Listener;
|
|
1083
|
+
/** Resets the active index to the initial state */
|
|
1084
|
+
resetActiveIndex(): void;
|
|
1085
|
+
/** Sets the active index to a given value */
|
|
1086
|
+
setActiveItemIndex(value: SetStateAction<number>): void;
|
|
1087
|
+
}
|
|
1088
|
+
type useKeyboardListNavigationType = <I>(items: I[], ref: RefObject<HTMLElement>, onListItemSelected: (itemSelected: I) => void, onListItemNavigated?: (itemSelected: I) => void, onEnterPressed?: (itemSelected: string) => void, onBackspacePressed?: Listener, keepFocusAfterSelection?: boolean, initialIndex?: number, preventTabOnEnteredValue?: boolean) => UseKeyboardListNavigationType;
|
|
1089
|
+
|
|
1090
|
+
/** List item padding size. */
|
|
1091
|
+
type ListItemPadding = Extract<Size, 'big' | 'huge'>;
|
|
1070
1092
|
/**
|
|
1071
|
-
*
|
|
1093
|
+
* Defines the props of the component.
|
|
1072
1094
|
*/
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1095
|
+
interface ListProps$1 extends HasClassName {
|
|
1096
|
+
/** List content (should be ListItem, ListDivider, etc.). */
|
|
1097
|
+
children?: JSXElement;
|
|
1098
|
+
/** Item padding size. */
|
|
1099
|
+
itemPadding?: ListItemPadding;
|
|
1100
|
+
/** ref to the root element */
|
|
1101
|
+
ref?: CommonRef;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1078
1104
|
/**
|
|
1079
1105
|
* Defines the props of the component.
|
|
1080
1106
|
*/
|
|
1081
|
-
interface
|
|
1082
|
-
/** Action toolbar content. */
|
|
1083
|
-
actions?: ReactNode;
|
|
1084
|
-
/** Props to pass to the avatar. */
|
|
1085
|
-
avatarProps: AvatarProps;
|
|
1086
|
-
/** Comment block replies. */
|
|
1087
|
-
children?: ReactNode;
|
|
1088
|
-
/** Comment date with the minimal timestamp information (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/
|
|
1089
|
-
date?: string;
|
|
1090
|
-
/** Comment date with the full timestamp information (day, month, year, time) */
|
|
1091
|
-
fullDate?: string;
|
|
1092
|
-
/** Whether the component has actions to display or not. */
|
|
1093
|
-
hasActions?: boolean;
|
|
1094
|
-
/** Action toolbar header content. */
|
|
1095
|
-
headerActions?: ReactNode;
|
|
1096
|
-
/** Whether the component is open or not. */
|
|
1097
|
-
isOpen?: boolean;
|
|
1098
|
-
/** Whether the comment is relevant or not. */
|
|
1099
|
-
isRelevant?: boolean;
|
|
1100
|
-
/** Comment author name. */
|
|
1101
|
-
name?: React.ReactNode;
|
|
1102
|
-
/**
|
|
1103
|
-
* On click callback.
|
|
1104
|
-
* @deprecated Use avatarProps instead and/or inject a clickable component in `name`
|
|
1105
|
-
*/
|
|
1106
|
-
onClick?(): void;
|
|
1107
|
-
/**
|
|
1108
|
-
* On mouse enter callback.
|
|
1109
|
-
* @deprecated Use avatarProps instead and/or inject a clickable component in `name`
|
|
1110
|
-
*/
|
|
1111
|
-
onMouseEnter?(): void;
|
|
1107
|
+
interface ListProps extends GenericProps$1, ReactToJSX<ListProps$1> {
|
|
1112
1108
|
/**
|
|
1113
|
-
*
|
|
1114
|
-
* @deprecated
|
|
1109
|
+
* Whether the list items are clickable.
|
|
1110
|
+
* @deprecated not needed anymore.
|
|
1115
1111
|
*/
|
|
1116
|
-
|
|
1117
|
-
/**
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
|
|
1112
|
+
isClickable?: boolean;
|
|
1113
|
+
/** Tab index of the list. */
|
|
1114
|
+
tabIndex?: number;
|
|
1115
|
+
/** @deprecated not supported since v4.0.0 */
|
|
1116
|
+
onListItemSelected?(key: Key, index: number, evt: SyntheticEvent): void;
|
|
1121
1117
|
}
|
|
1118
|
+
declare const List: Comp<ListProps, HTMLUListElement> & {
|
|
1119
|
+
useKeyboardListNavigation: useKeyboardListNavigationType;
|
|
1120
|
+
};
|
|
1121
|
+
|
|
1122
1122
|
/**
|
|
1123
|
-
*
|
|
1124
|
-
*
|
|
1125
|
-
* @param props Component props.
|
|
1126
|
-
* @param ref Component ref.
|
|
1127
|
-
* @return React element.
|
|
1123
|
+
* ListItemAction props.
|
|
1128
1124
|
*/
|
|
1129
|
-
|
|
1125
|
+
type ListItemActionProps<E extends ClickableElement = 'button'> = RawClickableProps<E> & HasClassName;
|
|
1130
1126
|
|
|
1127
|
+
/** ListItem size variants. */
|
|
1128
|
+
type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
1131
1129
|
/**
|
|
1132
1130
|
* Defines the props of the component.
|
|
1133
1131
|
*/
|
|
1134
|
-
interface
|
|
1135
|
-
/**
|
|
1136
|
-
|
|
1137
|
-
/**
|
|
1138
|
-
|
|
1139
|
-
/**
|
|
1140
|
-
|
|
1141
|
-
/**
|
|
1142
|
-
|
|
1143
|
-
/**
|
|
1144
|
-
|
|
1145
|
-
/**
|
|
1146
|
-
|
|
1147
|
-
/**
|
|
1148
|
-
|
|
1149
|
-
/**
|
|
1150
|
-
|
|
1151
|
-
/**
|
|
1152
|
-
|
|
1132
|
+
interface ListItemProps$1 extends HasClassName, HasAriaDisabled {
|
|
1133
|
+
/** A component to be rendered after the content. */
|
|
1134
|
+
after?: JSXElement;
|
|
1135
|
+
/** A component to be rendered before the content. */
|
|
1136
|
+
before?: JSXElement;
|
|
1137
|
+
/** Content. */
|
|
1138
|
+
children?: JSXElement;
|
|
1139
|
+
/** Whether the list item should be highlighted or not. */
|
|
1140
|
+
isHighlighted?: boolean;
|
|
1141
|
+
/** Whether the component is selected or not. */
|
|
1142
|
+
isSelected?: boolean;
|
|
1143
|
+
/** Whether link/button is disabled or not. */
|
|
1144
|
+
isDisabled?: boolean;
|
|
1145
|
+
/** Custom component for the link (can be used to inject router Link). */
|
|
1146
|
+
linkAs?: 'a' | any;
|
|
1147
|
+
/** Props that will be passed on to the Link. */
|
|
1148
|
+
linkProps?: GenericProps;
|
|
1149
|
+
/** Reference to the link element. */
|
|
1150
|
+
linkRef?: CommonRef;
|
|
1151
|
+
/** Size variant. */
|
|
1152
|
+
size?: ListItemSize;
|
|
1153
|
+
/** ref to the root <li> element */
|
|
1154
|
+
ref?: CommonRef;
|
|
1155
|
+
/** On click callback. */
|
|
1156
|
+
handleClick?: (event: any) => void;
|
|
1153
1157
|
}
|
|
1154
|
-
|
|
1155
|
-
/**
|
|
1156
|
-
* DatePicker component.
|
|
1157
|
-
*
|
|
1158
|
-
* @param props Component props.
|
|
1159
|
-
* @param ref Component ref.
|
|
1160
|
-
* @return React element.
|
|
1161
|
-
*/
|
|
1162
|
-
declare const DatePicker: Comp<DatePickerProps, HTMLDivElement>;
|
|
1158
|
+
type ListItemPropsToOverride = 'after' | 'before' | 'children' | 'handleClick';
|
|
1163
1159
|
|
|
1164
1160
|
/**
|
|
1165
1161
|
* Defines the props of the component.
|
|
1166
1162
|
*/
|
|
1167
|
-
interface
|
|
1168
|
-
/**
|
|
1169
|
-
|
|
1170
|
-
/**
|
|
1171
|
-
|
|
1172
|
-
/**
|
|
1173
|
-
|
|
1174
|
-
/**
|
|
1175
|
-
|
|
1163
|
+
interface ListItemProps extends GenericProps$1, HasAriaDisabled$1, ReactToJSX<ListItemProps$1, ListItemPropsToOverride> {
|
|
1164
|
+
/** A component to be rendered after the content. */
|
|
1165
|
+
after?: ReactNode;
|
|
1166
|
+
/** A component to be rendered before the content. */
|
|
1167
|
+
before?: ReactNode;
|
|
1168
|
+
/** Content. */
|
|
1169
|
+
children: string | ReactNode;
|
|
1170
|
+
/** Reference to the <li> element. */
|
|
1171
|
+
listItemRef?: Ref<HTMLLIElement>;
|
|
1172
|
+
/** Reference to the link element. */
|
|
1173
|
+
linkRef?: Ref<HTMLAnchorElement>;
|
|
1174
|
+
/** On click callback. */
|
|
1175
|
+
onClick?(event: SyntheticEvent): void;
|
|
1176
|
+
/** @alias onClick */
|
|
1177
|
+
onItemSelected?(evt: SyntheticEvent): void;
|
|
1176
1178
|
}
|
|
1177
1179
|
/**
|
|
1178
|
-
*
|
|
1179
|
-
*
|
|
1180
|
-
* @param props Component props.
|
|
1181
|
-
* @param ref Component ref.
|
|
1182
|
-
* @return React element.
|
|
1180
|
+
* ListItem component with Action sub-component.
|
|
1183
1181
|
*/
|
|
1184
|
-
declare const
|
|
1182
|
+
declare const ListItem: Comp<ListItemProps, HTMLLIElement> & {
|
|
1183
|
+
/** Sub-component that renders the default action (button or link) for the action area pattern. */
|
|
1184
|
+
Action: (<E extends React$1.ElementType = "button">(props: React$1.PropsWithoutRef<React$1.ComponentProps<E>> & {
|
|
1185
|
+
as?: E | undefined;
|
|
1186
|
+
} & GenericProps$1 & ReactToJSX<ListItemActionProps, "children"> & _lumx_core_js_types.HasRequiredLinkHref<E> & {
|
|
1187
|
+
children: ReactNode;
|
|
1188
|
+
onClick?(evt: SyntheticEvent): void;
|
|
1189
|
+
} & React$1.ComponentProps<E> & {
|
|
1190
|
+
ref?: ComponentRef<E> | undefined;
|
|
1191
|
+
}) => React.JSX.Element) & {
|
|
1192
|
+
displayName: string;
|
|
1193
|
+
className: string;
|
|
1194
|
+
defaultProps: Partial<ListItemActionProps<"button">>;
|
|
1195
|
+
};
|
|
1196
|
+
};
|
|
1185
1197
|
|
|
1186
1198
|
/**
|
|
1187
1199
|
* Defines the props of the component.
|
|
1188
1200
|
*/
|
|
1189
|
-
interface
|
|
1190
|
-
/**
|
|
1191
|
-
|
|
1192
|
-
/** Locale (language or region) to use. */
|
|
1193
|
-
locale?: string;
|
|
1194
|
-
/** Date after which dates can't be selected. */
|
|
1195
|
-
maxDate?: Date;
|
|
1196
|
-
/** Date before which dates can't be selected. */
|
|
1197
|
-
minDate?: Date;
|
|
1198
|
-
/** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
|
|
1199
|
-
nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
1200
|
-
/** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
|
|
1201
|
-
previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
1202
|
-
/** Currently selected date. */
|
|
1203
|
-
value: Date | undefined;
|
|
1204
|
-
/** On change callback. */
|
|
1205
|
-
onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;
|
|
1201
|
+
interface ListDividerProps$1 extends HasClassName {
|
|
1202
|
+
/** ref to the root element */
|
|
1203
|
+
ref?: CommonRef;
|
|
1206
1204
|
}
|
|
1205
|
+
|
|
1207
1206
|
/**
|
|
1208
|
-
*
|
|
1207
|
+
* Defines the props of the component.
|
|
1208
|
+
*/
|
|
1209
|
+
type ListDividerProps = GenericProps$1 & ReactToJSX<ListDividerProps$1>;
|
|
1210
|
+
/**
|
|
1211
|
+
* ListDivider component.
|
|
1212
|
+
* Purely decorative, consider a `ListSection` with label for a better list structure.
|
|
1209
1213
|
*
|
|
1210
1214
|
* @param props Component props.
|
|
1211
1215
|
* @param ref Component ref.
|
|
1212
1216
|
* @return React element.
|
|
1213
1217
|
*/
|
|
1214
|
-
declare const
|
|
1218
|
+
declare const ListDivider: Comp<ListDividerProps, HTMLLIElement>;
|
|
1215
1219
|
|
|
1216
1220
|
/**
|
|
1217
1221
|
* Defines the props of the component.
|
|
1218
1222
|
*/
|
|
1219
|
-
interface
|
|
1220
|
-
/**
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
/**
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
/**
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
/**
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
/**
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
/**
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1223
|
+
interface TextProps$1 extends HasClassName {
|
|
1224
|
+
/**
|
|
1225
|
+
* Color variant.
|
|
1226
|
+
*/
|
|
1227
|
+
color?: ColorWithVariants;
|
|
1228
|
+
/**
|
|
1229
|
+
* Lightened or darkened variant of the selected color.
|
|
1230
|
+
*/
|
|
1231
|
+
colorVariant?: ColorVariant;
|
|
1232
|
+
/**
|
|
1233
|
+
* Typography variant.
|
|
1234
|
+
*/
|
|
1235
|
+
typography?: Typography;
|
|
1236
|
+
/**
|
|
1237
|
+
* Custom component to render the text.
|
|
1238
|
+
*/
|
|
1239
|
+
as: TextElement;
|
|
1240
|
+
/**
|
|
1241
|
+
* Control whether the text should truncate or not.
|
|
1242
|
+
* Setting as `true` will make the text truncate on a single line.
|
|
1243
|
+
* Setting as `{ lines: number }` will make the text truncate on a multiple lines.
|
|
1244
|
+
*/
|
|
1245
|
+
truncate?: boolean | {
|
|
1246
|
+
lines: number;
|
|
1247
|
+
};
|
|
1248
|
+
/**
|
|
1249
|
+
* Prevents text to wrap on multiple lines
|
|
1250
|
+
* (automatically activated when single line text truncate is activated).
|
|
1251
|
+
*/
|
|
1252
|
+
noWrap?: boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* WhiteSpace variant
|
|
1255
|
+
* Ignored when `noWrap` is set to true
|
|
1256
|
+
* Ignored when `truncate` is set to true or lines: 1
|
|
1257
|
+
* */
|
|
1258
|
+
whiteSpace?: WhiteSpace;
|
|
1259
|
+
/**
|
|
1260
|
+
* Children
|
|
1261
|
+
*/
|
|
1262
|
+
children?: JSXElement;
|
|
1263
|
+
/** list of styles to apply */
|
|
1264
|
+
style?: CSSProperties;
|
|
1258
1265
|
}
|
|
1259
|
-
type DialogSizes = Extract<Size$1, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
1260
|
-
/**
|
|
1261
|
-
* Dialog component.
|
|
1262
|
-
*
|
|
1263
|
-
* @param props Component props.
|
|
1264
|
-
* @param ref Component ref.
|
|
1265
|
-
* @return React element.
|
|
1266
|
-
*/
|
|
1267
|
-
declare const Dialog: Comp<DialogProps, HTMLDivElement>;
|
|
1268
1266
|
|
|
1269
1267
|
/**
|
|
1270
1268
|
* Defines the props of the component.
|
|
1271
1269
|
*/
|
|
1272
|
-
interface
|
|
1273
|
-
/**
|
|
1270
|
+
interface ListSectionProps$1 extends HasClassName {
|
|
1271
|
+
/** Section label displayed as the group title. */
|
|
1272
|
+
label?: string;
|
|
1273
|
+
/** Section icon */
|
|
1274
|
+
icon?: string;
|
|
1275
|
+
/** List items (should be ListItem, ListDivider, etc.). */
|
|
1276
|
+
children: JSXElement;
|
|
1277
|
+
/** Items wrapper forwarded props */
|
|
1278
|
+
itemsWrapperProps?: Record<string, any>;
|
|
1279
|
+
/** ID for the label element (used for aria-labelledby). */
|
|
1280
|
+
id: string;
|
|
1281
|
+
/** ref to the root element */
|
|
1274
1282
|
ref?: CommonRef;
|
|
1283
|
+
/** Text component to use for rendering the label */
|
|
1284
|
+
Text: (props: TextProps$1 & Record<string, any>) => any;
|
|
1275
1285
|
}
|
|
1276
1286
|
|
|
1277
1287
|
/**
|
|
1278
1288
|
* Defines the props of the component.
|
|
1279
1289
|
*/
|
|
1280
|
-
interface
|
|
1290
|
+
interface ListSectionProps extends GenericProps$1, ReactToJSX<ListSectionProps$1, 'children' | 'id' | 'Text'> {
|
|
1291
|
+
/** Section content */
|
|
1292
|
+
children: ReactNode;
|
|
1281
1293
|
}
|
|
1282
1294
|
/**
|
|
1283
|
-
*
|
|
1295
|
+
* ListSection component.
|
|
1284
1296
|
*
|
|
1285
1297
|
* @param props Component props.
|
|
1286
1298
|
* @param ref Component ref.
|
|
1287
1299
|
* @return React element.
|
|
1288
1300
|
*/
|
|
1289
|
-
declare const
|
|
1290
|
-
|
|
1291
|
-
/**
|
|
1292
|
-
* Defines the props of the component.
|
|
1293
|
-
*/
|
|
1294
|
-
interface DragHandleProps$1 extends HasTheme, HasClassName {
|
|
1295
|
-
/** Reference to the root element */
|
|
1296
|
-
ref?: CommonRef;
|
|
1297
|
-
}
|
|
1301
|
+
declare const ListSection: Comp<ListSectionProps, HTMLLIElement>;
|
|
1298
1302
|
|
|
1299
1303
|
/**
|
|
1300
1304
|
* Defines the props of the component.
|
|
1301
1305
|
*/
|
|
1302
|
-
interface
|
|
1306
|
+
interface ListSubheaderProps extends GenericProps$1 {
|
|
1307
|
+
/** Content. */
|
|
1308
|
+
children: string | ReactNode;
|
|
1303
1309
|
}
|
|
1304
1310
|
/**
|
|
1305
|
-
*
|
|
1311
|
+
* ListSubheader component.
|
|
1312
|
+
* @deprecated ListSubheader produces improper list structure. use ListSection instead.
|
|
1306
1313
|
*
|
|
1307
1314
|
* @param props Component props.
|
|
1308
1315
|
* @param ref Component ref.
|
|
1309
1316
|
* @return React element.
|
|
1310
1317
|
*/
|
|
1311
|
-
declare const
|
|
1318
|
+
declare const ListSubheader: Comp<ListSubheaderProps, HTMLLIElement>;
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* Defines the props for the core ComboboxState template.
|
|
1322
|
+
*/
|
|
1323
|
+
interface ComboboxStateProps$1 {
|
|
1324
|
+
/**
|
|
1325
|
+
* Message to display when the list has no visible options.
|
|
1326
|
+
* Can be a plain string or a function receiving the current input value (for dynamic messages).
|
|
1327
|
+
* When omitted, the empty state is not shown.
|
|
1328
|
+
*/
|
|
1329
|
+
emptyMessage?: string | ((inputValue: string) => string);
|
|
1330
|
+
/**
|
|
1331
|
+
* Error state title message.
|
|
1332
|
+
* When provided, the error state is active (takes priority over the empty state).
|
|
1333
|
+
* When omitted, the error state is not shown.
|
|
1334
|
+
*/
|
|
1335
|
+
errorMessage?: string;
|
|
1336
|
+
/**
|
|
1337
|
+
* Secondary error message (e.g. "Please try again").
|
|
1338
|
+
* Only rendered when `errorMessage` is provided.
|
|
1339
|
+
*/
|
|
1340
|
+
errorTryReloadMessage?: string;
|
|
1341
|
+
/**
|
|
1342
|
+
* Message to announce when loading persists (after a 500ms debounce).
|
|
1343
|
+
* When omitted, no loading announcement is made.
|
|
1344
|
+
*/
|
|
1345
|
+
loadingMessage?: string;
|
|
1346
|
+
/**
|
|
1347
|
+
* List state
|
|
1348
|
+
*/
|
|
1349
|
+
state?: {
|
|
1350
|
+
/**
|
|
1351
|
+
* Whether the list currently has no visible options.
|
|
1352
|
+
* Driven by the framework wrapper via the combobox handle's `emptyChange` event.
|
|
1353
|
+
*/
|
|
1354
|
+
isEmpty?: boolean;
|
|
1355
|
+
/**
|
|
1356
|
+
* The current value of the combobox input.
|
|
1357
|
+
* Passed to `emptyMessage` when it is a function.
|
|
1358
|
+
*/
|
|
1359
|
+
inputValue?: string;
|
|
1360
|
+
/**
|
|
1361
|
+
* Whether loading is active (immediate, from `loadingChange` event).
|
|
1362
|
+
* Used to suppress false "empty" state while data is loading.
|
|
1363
|
+
*/
|
|
1364
|
+
isLoading?: boolean;
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* Props for Combobox.State component.
|
|
1370
|
+
*/
|
|
1371
|
+
interface ComboboxStateProps extends ReactToJSX<ComboboxStateProps$1, 'state'> {
|
|
1372
|
+
/** Additional content rendered after the state message. */
|
|
1373
|
+
children?: ReactNode;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/**
|
|
1377
|
+
* Defines the props for the core ComboboxSection template.
|
|
1378
|
+
*/
|
|
1379
|
+
interface ComboboxSectionProps$1 extends HasClassName {
|
|
1380
|
+
/** Section label displayed as the group title. */
|
|
1381
|
+
label?: string;
|
|
1382
|
+
/** Section icon */
|
|
1383
|
+
icon?: string;
|
|
1384
|
+
/** Section content (should be ComboboxOption elements). */
|
|
1385
|
+
children: JSXElement;
|
|
1386
|
+
/** ref to the root element. */
|
|
1387
|
+
ref?: CommonRef;
|
|
1388
|
+
/**
|
|
1389
|
+
* When true, the section renders as a bare `<li hidden>` wrapper, keeping children
|
|
1390
|
+
* mounted (so option registrations stay alive) but invisible to the user and screen readers.
|
|
1391
|
+
* Set automatically by the React/Vue wrapper when all child options are filtered out.
|
|
1392
|
+
*/
|
|
1393
|
+
hidden?: boolean;
|
|
1394
|
+
/**
|
|
1395
|
+
* When true, the section is visually rendered (label + content) but hidden from assistive
|
|
1396
|
+
* technology. Used for skeleton-only sections: the visual skeleton provides feedback to
|
|
1397
|
+
* sighted users, while the live region (`ComboboxState`) handles the loading announcement.
|
|
1398
|
+
*/
|
|
1399
|
+
'aria-hidden'?: boolean;
|
|
1400
|
+
}
|
|
1401
|
+
/**
|
|
1402
|
+
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
1403
|
+
* Used by `ReactToJSX<ComboboxSectionProps, ComboboxSectionPropsToOverride>`.
|
|
1404
|
+
*/
|
|
1405
|
+
type ComboboxSectionPropsToOverride = 'children';
|
|
1406
|
+
|
|
1407
|
+
/**
|
|
1408
|
+
* Props for Combobox.Section component.
|
|
1409
|
+
*/
|
|
1410
|
+
interface ComboboxSectionProps extends GenericProps$1, ReactToJSX<ComboboxSectionProps$1, ComboboxSectionPropsToOverride> {
|
|
1411
|
+
/** Section content (should be Combobox.Option elements). */
|
|
1412
|
+
children: ReactNode;
|
|
1413
|
+
}
|
|
1312
1414
|
|
|
1313
1415
|
/**
|
|
1314
1416
|
* Different possible placements for the popover.
|
|
@@ -1445,164 +1547,882 @@ interface PopoverProps extends GenericProps$1, ReactToJSX<PopoverProps$1, 'ancho
|
|
|
1445
1547
|
declare const Popover: Comp<PopoverProps, HTMLDivElement>;
|
|
1446
1548
|
|
|
1447
1549
|
/**
|
|
1448
|
-
*
|
|
1550
|
+
* Props for Popover that can be passed to Combobox.Popover.
|
|
1551
|
+
* Excludes isOpen, anchorRef, children, and onClose which are managed internally.
|
|
1449
1552
|
*/
|
|
1450
|
-
|
|
1451
|
-
/**
|
|
1452
|
-
* Reference to the element around which the dropdown is placed.
|
|
1453
|
-
* @see {@link PopoverProps#anchorRef}
|
|
1454
|
-
*/
|
|
1455
|
-
anchorRef: PopoverProps['anchorRef'];
|
|
1456
|
-
/** Dropdown content. */
|
|
1457
|
-
children: React.ReactNode;
|
|
1458
|
-
/**
|
|
1459
|
-
* Whether a click anywhere out of the Dropdown would close it or not.
|
|
1460
|
-
* @see {@link PopoverProps#closeOnClickAway}
|
|
1461
|
-
*/
|
|
1462
|
-
closeOnClickAway?: boolean;
|
|
1463
|
-
/**
|
|
1464
|
-
* Whether to close the Dropdown when clicking in it or not.
|
|
1465
|
-
*/
|
|
1466
|
-
closeOnClick?: boolean;
|
|
1467
|
-
/**
|
|
1468
|
-
* Whether an escape key press would close the Dropdown or not.
|
|
1469
|
-
* @see {@link PopoverProps#closeOnEscape}
|
|
1470
|
-
*/
|
|
1471
|
-
closeOnEscape?: boolean;
|
|
1472
|
-
/**
|
|
1473
|
-
* Manage dropdown width:
|
|
1474
|
-
* - `maxWidth`: dropdown not bigger than anchor
|
|
1475
|
-
* - `minWidth` or `true`: dropdown not smaller than anchor
|
|
1476
|
-
* - `width`: dropdown equal to the anchor.
|
|
1477
|
-
* @see {@link PopoverProps#fitToAnchorWidth}
|
|
1478
|
-
*/
|
|
1479
|
-
fitToAnchorWidth?: PopoverProps['fitToAnchorWidth'];
|
|
1480
|
-
/**
|
|
1481
|
-
* Whether the dropdown should shrink to fit within the viewport height or not.
|
|
1482
|
-
* @see {@link PopoverProps#fitWithinViewportHeight}
|
|
1483
|
-
*/
|
|
1484
|
-
fitWithinViewportHeight?: boolean;
|
|
1485
|
-
/**
|
|
1486
|
-
* Whether the dropdown should be displayed or not. Useful to control the Dropdown from outside the component.
|
|
1487
|
-
* @see {@link PopoverProps#isOpen}
|
|
1488
|
-
*/
|
|
1489
|
-
isOpen: boolean;
|
|
1490
|
-
/**
|
|
1491
|
-
* Offset applied to the Dropdown position.
|
|
1492
|
-
* @see {@link PopoverProps#offset}
|
|
1493
|
-
*/
|
|
1494
|
-
offset?: Offset;
|
|
1495
|
-
/**
|
|
1496
|
-
* Preferred Dropdown placement against the anchor element.
|
|
1497
|
-
* @see {@link PopoverProps#placement}
|
|
1498
|
-
*/
|
|
1499
|
-
placement?: Placement;
|
|
1500
|
-
/** Whether the focus should be set on the list when the dropdown is open or not. */
|
|
1501
|
-
shouldFocusOnOpen?: boolean;
|
|
1502
|
-
/** Whether the dropdown should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
|
|
1503
|
-
usePortal?: boolean;
|
|
1504
|
-
/** Whether the focus should go back on the anchor when dropdown closes and focus is within. */
|
|
1505
|
-
focusAnchorOnClose?: boolean;
|
|
1506
|
-
/**
|
|
1507
|
-
* Z-axis position.
|
|
1508
|
-
* @see {@link PopoverProps#zIndex}
|
|
1509
|
-
*/
|
|
1510
|
-
zIndex?: number;
|
|
1511
|
-
/**
|
|
1512
|
-
* On close callback.
|
|
1513
|
-
* @see {@link PopoverProps#onClose}
|
|
1514
|
-
*/
|
|
1515
|
-
onClose?(): void;
|
|
1516
|
-
/** On scroll end callback. */
|
|
1517
|
-
onInfiniteScroll?(): void;
|
|
1518
|
-
}
|
|
1553
|
+
type ComboboxPopoverProps = Partial<Omit<PopoverProps, 'isOpen' | 'anchorRef' | 'children' | 'onClose'>>;
|
|
1519
1554
|
/**
|
|
1520
|
-
*
|
|
1521
|
-
*
|
|
1522
|
-
* @param props Component props.
|
|
1523
|
-
* @param ref Component ref.
|
|
1524
|
-
* @return React element.
|
|
1555
|
+
* Props for the Combobox.Popover component.
|
|
1525
1556
|
*/
|
|
1526
|
-
|
|
1557
|
+
interface ComboboxPopoverComponentProps extends ComboboxPopoverProps {
|
|
1558
|
+
/** Content (should contain a Combobox.List). */
|
|
1559
|
+
children: ReactNode;
|
|
1560
|
+
}
|
|
1527
1561
|
|
|
1528
1562
|
/**
|
|
1529
|
-
* Defines the props
|
|
1563
|
+
* Defines the props for the core ComboboxOptionSkeleton template.
|
|
1530
1564
|
*/
|
|
1531
|
-
interface
|
|
1532
|
-
/**
|
|
1533
|
-
|
|
1534
|
-
/**
|
|
1535
|
-
|
|
1536
|
-
/**
|
|
1537
|
-
|
|
1538
|
-
/**
|
|
1539
|
-
|
|
1540
|
-
/**
|
|
1541
|
-
|
|
1542
|
-
/** On close callback. */
|
|
1543
|
-
onClose?: (event: React__default.MouseEvent) => void;
|
|
1544
|
-
/** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
|
|
1545
|
-
toggleButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
|
|
1546
|
-
/** On toggle open or close callback. */
|
|
1547
|
-
onToggleOpen?(shouldOpen: boolean, event: React__default.MouseEvent): void;
|
|
1548
|
-
/** Children */
|
|
1549
|
-
children?: React__default.ReactNode;
|
|
1565
|
+
interface ComboboxOptionSkeletonProps$1 extends HasClassName {
|
|
1566
|
+
/** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */
|
|
1567
|
+
before?: JSXElement;
|
|
1568
|
+
/** Content rendered after the skeleton text. */
|
|
1569
|
+
after?: JSXElement;
|
|
1570
|
+
/** Show a secondary skeleton line (mirrors ComboboxOption's `description` prop). */
|
|
1571
|
+
hasDescription?: boolean;
|
|
1572
|
+
/** Override the default SkeletonTypography content entirely. */
|
|
1573
|
+
children?: JSXElement;
|
|
1574
|
+
/** ref to the root <li> element. */
|
|
1575
|
+
ref?: CommonRef;
|
|
1550
1576
|
}
|
|
1551
1577
|
/**
|
|
1552
|
-
*
|
|
1553
|
-
*
|
|
1554
|
-
* @param props Component props.
|
|
1555
|
-
* @param ref Component ref.
|
|
1556
|
-
* @return React element.
|
|
1578
|
+
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
1579
|
+
* Used by `ReactToJSX<ComboboxOptionSkeletonProps, ComboboxOptionSkeletonPropsToOverride>`.
|
|
1557
1580
|
*/
|
|
1558
|
-
|
|
1581
|
+
type ComboboxOptionSkeletonPropsToOverride = 'before' | 'after' | 'children';
|
|
1559
1582
|
|
|
1560
1583
|
/**
|
|
1561
|
-
*
|
|
1584
|
+
* Props for Combobox.OptionSkeleton component.
|
|
1562
1585
|
*/
|
|
1563
|
-
interface
|
|
1586
|
+
interface ComboboxOptionSkeletonProps extends GenericProps$1, ReactToJSX<ComboboxOptionSkeletonProps$1, ComboboxOptionSkeletonPropsToOverride> {
|
|
1587
|
+
/** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */
|
|
1588
|
+
before?: ReactNode;
|
|
1589
|
+
/** Content rendered after the skeleton text. */
|
|
1590
|
+
after?: ReactNode;
|
|
1591
|
+
/** Override the default SkeletonTypography content entirely. */
|
|
1592
|
+
children?: ReactNode;
|
|
1564
1593
|
/**
|
|
1565
|
-
*
|
|
1594
|
+
* Number of skeleton `<li>` elements to render.
|
|
1595
|
+
* Each is an independent element with `:nth-child` width cycling applied by SCSS.
|
|
1596
|
+
* @default 1
|
|
1597
|
+
*/
|
|
1598
|
+
count?: number;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
* Defines the props for the core ComboboxOptionMoreInfo template.
|
|
1603
|
+
*/
|
|
1604
|
+
interface ComboboxOptionMoreInfoProps$1 extends HasClassName {
|
|
1605
|
+
/** Popover content (additional details about the option). */
|
|
1606
|
+
children?: JSXElement;
|
|
1607
|
+
/** Whether the popover is open. */
|
|
1608
|
+
isOpen?: boolean;
|
|
1609
|
+
/** ID for the popover element (used for aria-describedby on the parent option). */
|
|
1610
|
+
popoverId: string;
|
|
1611
|
+
/** Ref for the anchor element (icon button). */
|
|
1612
|
+
ref?: CommonRef;
|
|
1613
|
+
/** Mouse enter callback. */
|
|
1614
|
+
onMouseEnter?(): void;
|
|
1615
|
+
/** Mouse leave callback. */
|
|
1616
|
+
onMouseLeave?(): void;
|
|
1617
|
+
}
|
|
1618
|
+
/**
|
|
1619
|
+
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
1620
|
+
*/
|
|
1621
|
+
type ComboboxOptionMoreInfoPropsToOverride = 'children' | 'popoverId' | 'isOpen';
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* Props for Combobox.OptionMoreInfo component.
|
|
1625
|
+
*/
|
|
1626
|
+
interface ComboboxOptionMoreInfoProps extends ReactToJSX<ComboboxOptionMoreInfoProps$1, ComboboxOptionMoreInfoPropsToOverride> {
|
|
1627
|
+
/** Content of the popover (additional details about the option). */
|
|
1628
|
+
children?: ReactNode;
|
|
1629
|
+
/** Callback when the popover opens or closes. */
|
|
1630
|
+
onToggle?(isOpen: boolean): void;
|
|
1631
|
+
}
|
|
1632
|
+
|
|
1633
|
+
/**
|
|
1634
|
+
* Defines the props for the core ComboboxOption template.
|
|
1635
|
+
*/
|
|
1636
|
+
interface ComboboxOptionProps$1 extends HasClassName {
|
|
1637
|
+
/** A component to be rendered before the content (e.g. an icon or avatar). */
|
|
1638
|
+
before?: JSXElement;
|
|
1639
|
+
/** A component to be rendered after the content (e.g. ComboboxOptionAction elements). */
|
|
1640
|
+
after?: JSXElement;
|
|
1641
|
+
/** Content (option label). */
|
|
1642
|
+
children?: JSXElement;
|
|
1643
|
+
/** Props forwarded to a Tooltip wrapping the role="option" / role="gridcell" element. */
|
|
1644
|
+
tooltipProps?: Record<string, any>;
|
|
1645
|
+
/** Helper description. */
|
|
1646
|
+
description?: string;
|
|
1647
|
+
/** Unique ID for the option element. */
|
|
1648
|
+
id?: string;
|
|
1649
|
+
/** Unique ID for the description element (for aria-describedby). */
|
|
1650
|
+
descriptionId?: string;
|
|
1651
|
+
/** Whether the option is disabled. */
|
|
1652
|
+
isDisabled?: boolean;
|
|
1653
|
+
/** Whether the option is selected. */
|
|
1654
|
+
isSelected?: boolean;
|
|
1655
|
+
/** Whether the parent list is in grid mode. */
|
|
1656
|
+
isGrid?: boolean;
|
|
1657
|
+
/**
|
|
1658
|
+
* Whether the option is hidden (filtered out by auto-filter).
|
|
1659
|
+
* When true, renders a bare `<li hidden>` with only the children text — no ARIA roles,
|
|
1660
|
+
* no classes, no visual structure. This keeps the element in the DOM so its textContent
|
|
1661
|
+
* can be read for future filter evaluations, while naturally excluding it from
|
|
1662
|
+
* `[role="option"]` queries (focus navigation) and `.lumx-combobox-option` CSS rules
|
|
1663
|
+
* (section/popover auto-hide).
|
|
1664
|
+
*/
|
|
1665
|
+
hidden?: boolean;
|
|
1666
|
+
/** On click callback. */
|
|
1667
|
+
handleClick?(): void;
|
|
1668
|
+
/** ref to the root <li> element. */
|
|
1669
|
+
ref?: CommonRef;
|
|
1670
|
+
/** The value for this option (used for selection). */
|
|
1671
|
+
value?: string;
|
|
1672
|
+
}
|
|
1673
|
+
/**
|
|
1674
|
+
* Props that React/Vue wrappers need to re-declare with framework-specific types.
|
|
1675
|
+
* Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.
|
|
1676
|
+
*/
|
|
1677
|
+
type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps';
|
|
1678
|
+
|
|
1679
|
+
declare const ARIA_LINK_MODES: readonly ["aria-describedby", "aria-labelledby"];
|
|
1680
|
+
|
|
1681
|
+
/** Position of the tooltip relative to the anchor element. */
|
|
1682
|
+
type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
|
|
1683
|
+
/**
|
|
1684
|
+
* Framework-agnostic tooltip props (shared between React and Vue wrappers).
|
|
1685
|
+
*/
|
|
1686
|
+
interface TooltipProps$1 extends HasCloseMode {
|
|
1687
|
+
/** Delay (in ms) before closing the tooltip. */
|
|
1688
|
+
delay?: number;
|
|
1689
|
+
/** Whether the tooltip is displayed even without the mouse hovering the anchor. */
|
|
1690
|
+
forceOpen?: boolean;
|
|
1691
|
+
/** Label text. */
|
|
1692
|
+
label?: string | null | false;
|
|
1693
|
+
/** Placement of the tooltip relative to the anchor. */
|
|
1694
|
+
placement?: TooltipPlacement;
|
|
1695
|
+
/** Choose how the tooltip text should link to the anchor */
|
|
1696
|
+
ariaLinkMode?: (typeof ARIA_LINK_MODES)[number];
|
|
1697
|
+
/** Z-index for the tooltip */
|
|
1698
|
+
zIndex?: number;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Defines the props of the component.
|
|
1703
|
+
*/
|
|
1704
|
+
interface TooltipProps extends GenericProps$1, TooltipProps$1 {
|
|
1705
|
+
/** Anchor (element on which we activate the tooltip). */
|
|
1706
|
+
children: ReactNode;
|
|
1707
|
+
}
|
|
1708
|
+
/**
|
|
1709
|
+
* Tooltip component.
|
|
1710
|
+
*
|
|
1711
|
+
* @param props Component props.
|
|
1712
|
+
* @param ref Component ref.
|
|
1713
|
+
* @return React element.
|
|
1714
|
+
*/
|
|
1715
|
+
declare const Tooltip: Comp<TooltipProps, HTMLDivElement>;
|
|
1716
|
+
|
|
1717
|
+
/**
|
|
1718
|
+
* Props for Combobox.Option component.
|
|
1719
|
+
*/
|
|
1720
|
+
interface ComboboxOptionProps extends GenericProps$1, ReactToJSX<ComboboxOptionProps$1, ComboboxOptionPropsToOverride> {
|
|
1721
|
+
/** Display label for the option. */
|
|
1722
|
+
children?: ReactNode;
|
|
1723
|
+
/** On option clicked (or activated with keyboard) */
|
|
1724
|
+
onClick?(): void;
|
|
1725
|
+
/** Content rendered before the option label (e.g. an icon or avatar). */
|
|
1726
|
+
before?: ReactNode;
|
|
1727
|
+
/**
|
|
1728
|
+
* Content rendered after the option label.
|
|
1729
|
+
* In grid mode (`type="grid"` on the parent Combobox.List), use `Combobox.OptionAction` elements here
|
|
1730
|
+
* to add secondary action buttons. Each action becomes an independent `role="gridcell"`.
|
|
1731
|
+
*/
|
|
1732
|
+
after?: ReactNode;
|
|
1733
|
+
/** Props forwarded to a Tooltip wrapping the role="option" / role="gridcell" trigger element. */
|
|
1734
|
+
tooltipProps?: Partial<TooltipProps>;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* Popup type for the combobox listbox.
|
|
1739
|
+
* - `'listbox'`: Standard listbox with `role="listbox"` and `role="option"` items.
|
|
1740
|
+
* - `'grid'`: Grid mode with `role="grid"` and `role="gridcell"` items, enabling 2D keyboard navigation.
|
|
1741
|
+
*/
|
|
1742
|
+
type ComboboxListType = 'listbox' | 'grid';
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Props for Combobox.List component.
|
|
1746
|
+
* Note: role, id are set internally and cannot be overridden.
|
|
1747
|
+
*/
|
|
1748
|
+
interface ComboboxListProps extends ListProps {
|
|
1749
|
+
/** Accessible label for the listbox (required for accessibility). */
|
|
1750
|
+
'aria-label': string;
|
|
1751
|
+
/**
|
|
1752
|
+
* The popup type. Set to "grid" when options have action buttons (Combobox.OptionAction).
|
|
1753
|
+
* Enables 2D keyboard navigation and switches ARIA roles from listbox/option to grid/gridcell.
|
|
1754
|
+
* @default 'listbox'
|
|
1755
|
+
*/
|
|
1756
|
+
type?: ComboboxListType;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
interface InputLabelProps$1 extends HasClassName, HasTheme {
|
|
1760
|
+
/** Typography variant. */
|
|
1761
|
+
typography?: Typography;
|
|
1762
|
+
/** Label content. */
|
|
1763
|
+
children: JSXElement;
|
|
1764
|
+
/** Native htmlFor property. */
|
|
1765
|
+
htmlFor: string;
|
|
1766
|
+
/** Whether the component is required or not. */
|
|
1767
|
+
isRequired?: boolean;
|
|
1768
|
+
/** ref to the root element */
|
|
1769
|
+
ref?: CommonRef;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Defines the props of the component.
|
|
1774
|
+
*/
|
|
1775
|
+
interface TextFieldProps$1 extends HasClassName, HasTheme, HasAriaDisabled, HasDisabled {
|
|
1776
|
+
/** Chip Group to be rendered before the main text input. */
|
|
1777
|
+
chips?: JSXElement;
|
|
1778
|
+
/** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
|
|
1779
|
+
clearButtonProps?: GenericProps;
|
|
1780
|
+
/** Error message. */
|
|
1781
|
+
error?: string | JSXElement;
|
|
1782
|
+
/** Whether we force the focus style or not. */
|
|
1783
|
+
forceFocusStyle?: boolean;
|
|
1784
|
+
/** Whether the text field is displayed with error style or not. */
|
|
1785
|
+
hasError?: boolean;
|
|
1786
|
+
/** Additional element to put at the end of the text field. */
|
|
1787
|
+
afterElement?: JSXElement;
|
|
1788
|
+
/** Helper text. */
|
|
1789
|
+
helper?: string | JSXElement;
|
|
1790
|
+
/** Icon (SVG path). */
|
|
1791
|
+
icon?: string;
|
|
1792
|
+
/** Native input id property (generated if not provided to link the label element). */
|
|
1793
|
+
id?: string;
|
|
1794
|
+
/** Generated helper id for accessibility attributes. */
|
|
1795
|
+
helperId?: string;
|
|
1796
|
+
/** Generated error id for accessibility attributes. */
|
|
1797
|
+
errorId?: string;
|
|
1798
|
+
/** Whether the component is required or not. */
|
|
1799
|
+
isRequired?: boolean;
|
|
1800
|
+
/** Whether the text field is displayed with valid style or not. */
|
|
1801
|
+
isValid?: boolean;
|
|
1802
|
+
/** Label text. */
|
|
1803
|
+
label?: string;
|
|
1804
|
+
/** Additional label props. */
|
|
1805
|
+
labelProps?: InputLabelProps$1;
|
|
1806
|
+
/** Max string length the input accepts (constrains the input and displays a character counter). */
|
|
1807
|
+
maxLength?: number;
|
|
1808
|
+
/** Whether the text field is a textarea or an input. */
|
|
1809
|
+
multiline?: boolean;
|
|
1810
|
+
/** Placeholder text. */
|
|
1811
|
+
placeholder?: string;
|
|
1812
|
+
/** Reference to the wrapper. */
|
|
1813
|
+
textFieldRef?: CommonRef;
|
|
1814
|
+
/** Value. */
|
|
1815
|
+
value?: string;
|
|
1816
|
+
/** Whether any part is disabled. */
|
|
1817
|
+
isAnyDisabled?: boolean;
|
|
1818
|
+
/** The input element (input or textarea). */
|
|
1819
|
+
input: JSXElement;
|
|
1820
|
+
/** Whether the input is focused. */
|
|
1821
|
+
isFocus?: boolean;
|
|
1822
|
+
/** IconButton component. */
|
|
1823
|
+
IconButton: (props: Record<string, any>) => any;
|
|
1824
|
+
/** Ref to the component root. */
|
|
1825
|
+
ref?: CommonRef;
|
|
1826
|
+
}
|
|
1827
|
+
type TextFieldPropsToOverride = 'input' | 'IconButton' | 'labelProps' | 'textFieldRef' | 'clearButtonProps' | 'helperId' | 'errorId' | 'isAnyDisabled' | 'isFocus';
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* Defines the props of the component.
|
|
1831
|
+
*/
|
|
1832
|
+
interface TextFieldProps extends GenericProps$1, ReactToJSX<TextFieldProps$1, TextFieldPropsToOverride> {
|
|
1833
|
+
/** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
|
|
1834
|
+
clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
1835
|
+
/** Reference to the <input> or <textarea> element. */
|
|
1836
|
+
inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
1837
|
+
/** Additional label props. */
|
|
1838
|
+
labelProps?: InputLabelProps;
|
|
1839
|
+
/** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */
|
|
1840
|
+
minimumRows?: number;
|
|
1841
|
+
/** Native input name property. */
|
|
1842
|
+
name?: string;
|
|
1843
|
+
/** Reference to the wrapper. */
|
|
1844
|
+
textFieldRef?: Ref<HTMLDivElement>;
|
|
1845
|
+
/** Native input type (only when `multiline` is disabled). */
|
|
1846
|
+
type?: React.ComponentProps<'input'>['type'];
|
|
1847
|
+
/** On blur callback. */
|
|
1848
|
+
onBlur?(event: React.FocusEvent): void;
|
|
1849
|
+
/** On change callback. */
|
|
1850
|
+
onChange(value: string, name?: string, event?: SyntheticEvent): void;
|
|
1851
|
+
/** On clear callback. */
|
|
1852
|
+
onClear?(event?: SyntheticEvent): void;
|
|
1853
|
+
/** On focus callback. */
|
|
1854
|
+
onFocus?(event: React.FocusEvent): void;
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* TextField component.
|
|
1858
|
+
*
|
|
1859
|
+
* @param props Component props.
|
|
1860
|
+
* @param ref Component ref.
|
|
1861
|
+
* @return React element.
|
|
1862
|
+
*/
|
|
1863
|
+
declare const TextField: Comp<TextFieldProps, HTMLDivElement>;
|
|
1864
|
+
|
|
1865
|
+
/**
|
|
1866
|
+
* Defines the props of the component.
|
|
1867
|
+
*/
|
|
1868
|
+
interface RawInputTextProps$1 extends HasTheme, HasClassName {
|
|
1869
|
+
value?: string;
|
|
1870
|
+
type?: HTMLInputTypeAttribute;
|
|
1871
|
+
name?: string | undefined;
|
|
1872
|
+
ref?: CommonRef;
|
|
1873
|
+
handleChange?: (value: string, name?: string, event?: any) => void;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
type NativeInputProps = Omit<ComponentProps<'input'>, 'value' | 'onChange'>;
|
|
1877
|
+
/**
|
|
1878
|
+
* Defines the props of the component.
|
|
1879
|
+
*/
|
|
1880
|
+
interface RawInputTextProps extends NativeInputProps, ReactToJSX<RawInputTextProps$1> {
|
|
1881
|
+
onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
/**
|
|
1885
|
+
* Raw input text component
|
|
1886
|
+
* (input element without any decoration)
|
|
1887
|
+
*/
|
|
1888
|
+
declare const RawInputText: Comp<RawInputTextProps, HTMLInputElement>;
|
|
1889
|
+
|
|
1890
|
+
/**
|
|
1891
|
+
* Defines the props of the component.
|
|
1892
|
+
*/
|
|
1893
|
+
interface RawInputTextareaProps$1 extends HasTheme, HasClassName {
|
|
1894
|
+
value?: string;
|
|
1895
|
+
rows?: number;
|
|
1896
|
+
name?: string | undefined;
|
|
1897
|
+
ref?: CommonRef;
|
|
1898
|
+
handleChange?: (value: string, name?: string, event?: any) => void;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
type NativeTextareaProps = Omit<ComponentProps<'textarea'>, 'value' | 'onChange'>;
|
|
1902
|
+
/**
|
|
1903
|
+
* Defines the props of the component.
|
|
1904
|
+
*/
|
|
1905
|
+
interface RawInputTextareaProps extends NativeTextareaProps, ReactToJSX<RawInputTextareaProps$1, 'rows'> {
|
|
1906
|
+
minimumRows?: number;
|
|
1907
|
+
onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
|
|
1908
|
+
}
|
|
1909
|
+
/**
|
|
1910
|
+
* Raw input text area component
|
|
1911
|
+
* (textarea element without any decoration)
|
|
1912
|
+
*/
|
|
1913
|
+
declare const RawInputTextarea: Comp<Omit<RawInputTextareaProps, "type">, HTMLTextAreaElement>;
|
|
1914
|
+
|
|
1915
|
+
/**
|
|
1916
|
+
* Props for Combobox.Input component.
|
|
1917
|
+
* Note: role, aria-autocomplete, aria-controls, aria-expanded are set internally and cannot be overridden.
|
|
1918
|
+
*/
|
|
1919
|
+
interface ComboboxInputProps extends TextFieldProps {
|
|
1920
|
+
/** Reference to the input element. */
|
|
1921
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
1922
|
+
/**
|
|
1923
|
+
* Props for the toggle button.
|
|
1924
|
+
* When provided, a chevron button will be rendered in the text field's afterElement
|
|
1925
|
+
* to toggle the listbox visibility.
|
|
1926
|
+
*/
|
|
1927
|
+
toggleButtonProps?: Pick<IconButtonProps, 'label'> & Partial<Omit<IconButtonProps, 'label'>>;
|
|
1928
|
+
/** Called when an option is selected. */
|
|
1929
|
+
onSelect?: (option: {
|
|
1930
|
+
value: string;
|
|
1931
|
+
}) => void;
|
|
1932
|
+
/**
|
|
1933
|
+
* When true (default), the combobox automatically filters options as the user types.
|
|
1934
|
+
* Each `Combobox.Option` registers itself and hides when it doesn't match the input value.
|
|
1935
|
+
*
|
|
1936
|
+
* Set to false when you handle filtering yourself (e.g. async search, consumer-side
|
|
1937
|
+
* pre-filtering). Options will not be auto-filtered.
|
|
1938
|
+
*/
|
|
1939
|
+
autoFilter?: boolean;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
/**
|
|
1943
|
+
* Label display mode for the ComboboxButton.
|
|
1944
|
+
* - `'show-selection'`: Show the selected value if available, otherwise the label.
|
|
1945
|
+
* - `'show-label'`: Always show the label.
|
|
1946
|
+
* - `'show-tooltip'`: Show nothing in the button; label appears only in tooltip.
|
|
1947
|
+
*/
|
|
1948
|
+
type ComboboxButtonLabelDisplayMode = 'show-selection' | 'show-label' | 'show-tooltip';
|
|
1949
|
+
/**
|
|
1950
|
+
* Defines the props for the core ComboboxButton template.
|
|
1951
|
+
*/
|
|
1952
|
+
interface ComboboxButtonProps$1 extends HasClassName {
|
|
1953
|
+
/** The label for the button (used for ARIA and tooltip). */
|
|
1954
|
+
label: string;
|
|
1955
|
+
/** The currently selected value to display. */
|
|
1956
|
+
value?: string;
|
|
1957
|
+
/** Controls how the label/value is displayed. */
|
|
1958
|
+
labelDisplayMode?: ComboboxButtonLabelDisplayMode;
|
|
1959
|
+
/** The ID of the listbox element (for aria-controls). */
|
|
1960
|
+
listboxId?: string;
|
|
1961
|
+
/** Whether the combobox is open. */
|
|
1962
|
+
isOpen?: boolean;
|
|
1963
|
+
/** ref to the root button element. */
|
|
1964
|
+
ref?: CommonRef;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
/**
|
|
1968
|
+
* Defines the props of the component.
|
|
1969
|
+
*/
|
|
1970
|
+
interface ComboboxProviderProps {
|
|
1971
|
+
/** Combobox content. */
|
|
1972
|
+
children?: ReactNode;
|
|
1973
|
+
}
|
|
1974
|
+
/**
|
|
1975
|
+
* Combobox.Provider component.
|
|
1976
|
+
*
|
|
1977
|
+
* Provides shared context to sub-components. The vanilla JS combobox handle is
|
|
1978
|
+
* created by the trigger sub-component (Combobox.Input or Combobox.Button) on mount.
|
|
1979
|
+
*
|
|
1980
|
+
* @param props Component props.
|
|
1981
|
+
* @return React element.
|
|
1982
|
+
*/
|
|
1983
|
+
declare function ComboboxProvider(props: ComboboxProviderProps): react_jsx_runtime.JSX.Element;
|
|
1984
|
+
declare namespace ComboboxProvider {
|
|
1985
|
+
var displayName: string;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
/**
|
|
1989
|
+
* Props for Combobox.Button component.
|
|
1990
|
+
*
|
|
1991
|
+
* Polymorphic component — use `as` to render the trigger as a different element or component
|
|
1992
|
+
* (e.g., `as="a"`, `as={RouterLink}`). Defaults to the LumX `Button` component.
|
|
1993
|
+
*/
|
|
1994
|
+
type ComboboxButtonProps<E extends ElementType$1 = typeof Button> = Omit<HasPolymorphicAs$1<E>, 'children' | 'role' | 'aria-controls' | 'aria-haspopup' | 'aria-expanded' | 'aria-activedescendant'> & HasRequiredLinkHref$1<E> & ReactToJSX<ComboboxButtonProps$1> & {
|
|
1995
|
+
/** Called when an option is selected. */
|
|
1996
|
+
onSelect?: (option: {
|
|
1997
|
+
value: string;
|
|
1998
|
+
}) => void;
|
|
1999
|
+
};
|
|
2000
|
+
|
|
2001
|
+
/**
|
|
2002
|
+
* Combobox.OptionAction props.
|
|
2003
|
+
*
|
|
2004
|
+
* Polymorphic component — use `as` to render as a different element or component
|
|
2005
|
+
* (e.g., `as={IconButton}`, `as={Button}`). Defaults to `'button'`.
|
|
2006
|
+
*/
|
|
2007
|
+
type ComboboxOptionActionProps<E extends ElementType$1 = 'button'> = HasPolymorphicAs$1<E> & HasClassName$1 & HasRequiredLinkHref$1<E> & {
|
|
2008
|
+
/** Content of the action (icon, label, etc.). Optional when using a polymorphic `as` that provides its own content (e.g., IconButton). */
|
|
2009
|
+
children?: ReactNode;
|
|
2010
|
+
/** Whether the action is disabled. */
|
|
2011
|
+
isDisabled?: boolean;
|
|
2012
|
+
/** On click callback. */
|
|
2013
|
+
onClick?(evt: SyntheticEvent): void;
|
|
2014
|
+
};
|
|
2015
|
+
|
|
2016
|
+
/**
|
|
2017
|
+
* Combobox compound component namespace.
|
|
2018
|
+
*/
|
|
2019
|
+
declare const Combobox: {
|
|
2020
|
+
Provider: typeof ComboboxProvider;
|
|
2021
|
+
Button: (<E extends React$1.ElementType = Comp<ButtonProps, HTMLButtonElement | HTMLAnchorElement>>(props: Omit<HasPolymorphicAs$1<E>, "children" | "aria-expanded" | "aria-haspopup" | "role" | "aria-controls" | "aria-activedescendant"> & _lumx_core_js_types.HasRequiredLinkHref<E> & ReactToJSX<ComboboxButtonProps$1> & {
|
|
2022
|
+
onSelect?: (option: {
|
|
2023
|
+
value: string;
|
|
2024
|
+
}) => void;
|
|
2025
|
+
} & React$1.ComponentProps<E> & {
|
|
2026
|
+
ref?: ComponentRef<E> | undefined;
|
|
2027
|
+
}) => React.JSX.Element) & {
|
|
2028
|
+
displayName: string;
|
|
2029
|
+
className: "lumx-combobox-button";
|
|
2030
|
+
};
|
|
2031
|
+
Input: Comp<ComboboxInputProps, HTMLDivElement>;
|
|
2032
|
+
List: Comp<ComboboxListProps, HTMLUListElement>;
|
|
2033
|
+
Option: Comp<ComboboxOptionProps, HTMLLIElement>;
|
|
2034
|
+
OptionAction: (<E extends React$1.ElementType = "button">(props: React$1.PropsWithoutRef<React$1.ComponentProps<E>> & {
|
|
2035
|
+
as?: E | undefined;
|
|
2036
|
+
} & _lumx_core_js_types.HasClassName & _lumx_core_js_types.HasRequiredLinkHref<E> & {
|
|
2037
|
+
children?: React$1.ReactNode;
|
|
2038
|
+
isDisabled?: boolean;
|
|
2039
|
+
onClick?(evt: React$1.SyntheticEvent): void;
|
|
2040
|
+
} & React$1.ComponentProps<E> & {
|
|
2041
|
+
ref?: ComponentRef<E> | undefined;
|
|
2042
|
+
}) => React.JSX.Element) & {
|
|
2043
|
+
displayName: string;
|
|
2044
|
+
className: "lumx-combobox-option-action";
|
|
2045
|
+
};
|
|
2046
|
+
OptionMoreInfo: {
|
|
2047
|
+
(props: ComboboxOptionMoreInfoProps): react_jsx_runtime.JSX.Element;
|
|
2048
|
+
displayName: string;
|
|
2049
|
+
className: "lumx-combobox-option-more-info";
|
|
2050
|
+
};
|
|
2051
|
+
OptionSkeleton: {
|
|
2052
|
+
(props: ComboboxOptionSkeletonProps): react_jsx_runtime.JSX.Element[];
|
|
2053
|
+
displayName: string;
|
|
2054
|
+
className: "lumx-combobox-option-skeleton";
|
|
2055
|
+
};
|
|
2056
|
+
Popover: {
|
|
2057
|
+
(props: ComboboxPopoverComponentProps): react_jsx_runtime.JSX.Element;
|
|
2058
|
+
displayName: string;
|
|
2059
|
+
className: "lumx-combobox-popover";
|
|
2060
|
+
};
|
|
2061
|
+
Section: Comp<ComboboxSectionProps, HTMLLIElement>;
|
|
2062
|
+
State: {
|
|
2063
|
+
(props: ComboboxStateProps): react_jsx_runtime.JSX.Element;
|
|
2064
|
+
displayName: string;
|
|
2065
|
+
className: "lumx-combobox-state";
|
|
2066
|
+
};
|
|
2067
|
+
/** Visual separator between option groups (alias for ListDivider). Purely decorative — invisible to screen readers. */
|
|
2068
|
+
Divider: Comp<ListDividerProps, HTMLLIElement>;
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* Comment block variants.
|
|
2073
|
+
*/
|
|
2074
|
+
declare const CommentBlockVariant: {
|
|
2075
|
+
readonly indented: "indented";
|
|
2076
|
+
readonly linear: "linear";
|
|
2077
|
+
};
|
|
2078
|
+
type CommentBlockVariant = ValueOf$1<typeof CommentBlockVariant>;
|
|
2079
|
+
/**
|
|
2080
|
+
* Defines the props of the component.
|
|
2081
|
+
*/
|
|
2082
|
+
interface CommentBlockProps extends GenericProps$1, HasTheme$1 {
|
|
2083
|
+
/** Action toolbar content. */
|
|
2084
|
+
actions?: ReactNode;
|
|
2085
|
+
/** Props to pass to the avatar. */
|
|
2086
|
+
avatarProps: AvatarProps;
|
|
2087
|
+
/** Comment block replies. */
|
|
2088
|
+
children?: ReactNode;
|
|
2089
|
+
/** Comment date with the minimal timestamp information (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/
|
|
2090
|
+
date?: string;
|
|
2091
|
+
/** Comment date with the full timestamp information (day, month, year, time) */
|
|
2092
|
+
fullDate?: string;
|
|
2093
|
+
/** Whether the component has actions to display or not. */
|
|
2094
|
+
hasActions?: boolean;
|
|
2095
|
+
/** Action toolbar header content. */
|
|
2096
|
+
headerActions?: ReactNode;
|
|
2097
|
+
/** Whether the component is open or not. */
|
|
2098
|
+
isOpen?: boolean;
|
|
2099
|
+
/** Whether the comment is relevant or not. */
|
|
2100
|
+
isRelevant?: boolean;
|
|
2101
|
+
/** Comment author name. */
|
|
2102
|
+
name?: React.ReactNode;
|
|
2103
|
+
/**
|
|
2104
|
+
* On click callback.
|
|
2105
|
+
* @deprecated Use avatarProps instead and/or inject a clickable component in `name`
|
|
2106
|
+
*/
|
|
2107
|
+
onClick?(): void;
|
|
2108
|
+
/**
|
|
2109
|
+
* On mouse enter callback.
|
|
2110
|
+
* @deprecated Use avatarProps instead and/or inject a clickable component in `name`
|
|
2111
|
+
*/
|
|
2112
|
+
onMouseEnter?(): void;
|
|
2113
|
+
/**
|
|
2114
|
+
* On mouse leave callback.
|
|
2115
|
+
* @deprecated Use avatarProps instead and/or inject a clickable component in `name`
|
|
2116
|
+
*/
|
|
2117
|
+
onMouseLeave?(): void;
|
|
2118
|
+
/** Comment content. */
|
|
2119
|
+
text: ReactNode | string;
|
|
2120
|
+
/** Comment variant. */
|
|
2121
|
+
variant?: CommentBlockVariant;
|
|
2122
|
+
}
|
|
2123
|
+
/**
|
|
2124
|
+
* CommentBlock component.
|
|
2125
|
+
*
|
|
2126
|
+
* @param props Component props.
|
|
2127
|
+
* @param ref Component ref.
|
|
2128
|
+
* @return React element.
|
|
2129
|
+
*/
|
|
2130
|
+
declare const CommentBlock: Comp<CommentBlockProps, HTMLDivElement>;
|
|
2131
|
+
|
|
2132
|
+
/**
|
|
2133
|
+
* Defines the props of the component.
|
|
2134
|
+
*/
|
|
2135
|
+
interface DatePickerProps extends GenericProps$1 {
|
|
2136
|
+
/** Default month. */
|
|
2137
|
+
defaultMonth?: Date;
|
|
2138
|
+
/** Locale (language or region) to use. */
|
|
2139
|
+
locale?: string;
|
|
2140
|
+
/** Date after which dates can't be selected. */
|
|
2141
|
+
maxDate?: Date;
|
|
2142
|
+
/** Date before which dates can't be selected. */
|
|
2143
|
+
minDate?: Date;
|
|
2144
|
+
/** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
|
|
2145
|
+
nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
2146
|
+
/** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
|
|
2147
|
+
previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
2148
|
+
/** Reference to the <button> element corresponding to the current date or the selected date. */
|
|
2149
|
+
todayOrSelectedDateRef?: Ref<HTMLButtonElement>;
|
|
2150
|
+
/** Currently selected date. */
|
|
2151
|
+
value: Date | undefined;
|
|
2152
|
+
/** On change callback. */
|
|
2153
|
+
onChange(value: Date | undefined): void;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
/**
|
|
2157
|
+
* DatePicker component.
|
|
2158
|
+
*
|
|
2159
|
+
* @param props Component props.
|
|
2160
|
+
* @param ref Component ref.
|
|
2161
|
+
* @return React element.
|
|
2162
|
+
*/
|
|
2163
|
+
declare const DatePicker: Comp<DatePickerProps, HTMLDivElement>;
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* Defines the props of the component.
|
|
2167
|
+
*/
|
|
2168
|
+
interface DatePickerControlledProps extends DatePickerProps {
|
|
2169
|
+
/** Selected month to display. */
|
|
2170
|
+
selectedMonth: Date;
|
|
2171
|
+
/** On previous month change callback. */
|
|
2172
|
+
onPrevMonthChange(): void;
|
|
2173
|
+
/** On next month change callback. */
|
|
2174
|
+
onNextMonthChange(): void;
|
|
2175
|
+
/** On month/year change callback. */
|
|
2176
|
+
onMonthChange?: (newMonth: Date) => void;
|
|
2177
|
+
}
|
|
2178
|
+
/**
|
|
2179
|
+
* DatePickerControlled component.
|
|
2180
|
+
*
|
|
2181
|
+
* @param props Component props.
|
|
2182
|
+
* @param ref Component ref.
|
|
2183
|
+
* @return React element.
|
|
2184
|
+
*/
|
|
2185
|
+
declare const DatePickerControlled: Comp<DatePickerControlledProps, HTMLDivElement>;
|
|
2186
|
+
|
|
2187
|
+
/**
|
|
2188
|
+
* Defines the props of the component.
|
|
2189
|
+
*/
|
|
2190
|
+
interface DatePickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'>, GenericProps$1 {
|
|
2191
|
+
/** Default month. */
|
|
2192
|
+
defaultMonth?: Date;
|
|
2193
|
+
/** Locale (language or region) to use. */
|
|
2194
|
+
locale?: string;
|
|
2195
|
+
/** Date after which dates can't be selected. */
|
|
2196
|
+
maxDate?: Date;
|
|
2197
|
+
/** Date before which dates can't be selected. */
|
|
2198
|
+
minDate?: Date;
|
|
2199
|
+
/** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
|
|
2200
|
+
nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
2201
|
+
/** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
|
|
2202
|
+
previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
2203
|
+
/** Currently selected date. */
|
|
2204
|
+
value: Date | undefined;
|
|
2205
|
+
/** On change callback. */
|
|
2206
|
+
onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* DatePickerField component.
|
|
2210
|
+
*
|
|
2211
|
+
* @param props Component props.
|
|
2212
|
+
* @param ref Component ref.
|
|
2213
|
+
* @return React element.
|
|
2214
|
+
*/
|
|
2215
|
+
declare const DatePickerField: Comp<DatePickerFieldProps, HTMLDivElement>;
|
|
2216
|
+
|
|
2217
|
+
/**
|
|
2218
|
+
* Defines the props of the component.
|
|
2219
|
+
*/
|
|
2220
|
+
interface DialogProps extends GenericProps$1, HasCloseMode$1 {
|
|
2221
|
+
/** Footer content. */
|
|
2222
|
+
footer?: ReactNode;
|
|
2223
|
+
/** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
|
|
2224
|
+
forceFooterDivider?: boolean;
|
|
2225
|
+
/** Header content. */
|
|
2226
|
+
header?: ReactNode;
|
|
2227
|
+
/** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
|
|
2228
|
+
forceHeaderDivider?: boolean;
|
|
2229
|
+
/** Whether the indefinite progress indicator over the dialog content is displayed or not. */
|
|
2230
|
+
isLoading?: boolean;
|
|
2231
|
+
/** Whether the component is open or not. */
|
|
2232
|
+
isOpen?: boolean;
|
|
2233
|
+
/** Reference to the parent element that triggered modal opening (will get back focus on close). */
|
|
2234
|
+
parentElement?: RefObject<HTMLElement>;
|
|
2235
|
+
/** Reference to the dialog content element. */
|
|
2236
|
+
contentRef?: Ref<HTMLDivElement>;
|
|
2237
|
+
/** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */
|
|
2238
|
+
focusElement?: RefObject<HTMLElement>;
|
|
2239
|
+
/** Whether to keep the dialog open on clickaway or escape press. */
|
|
2240
|
+
preventAutoClose?: boolean;
|
|
2241
|
+
/** Whether to keep the dialog open on escape press. */
|
|
2242
|
+
preventCloseOnEscape?: boolean;
|
|
2243
|
+
/** Whether to keep the dialog open on clickaway. */
|
|
2244
|
+
preventCloseOnClick?: boolean;
|
|
2245
|
+
/** Size variant. */
|
|
2246
|
+
size?: DialogSizes;
|
|
2247
|
+
/** Z-axis position. */
|
|
2248
|
+
zIndex?: number;
|
|
2249
|
+
/** Z-axis position. */
|
|
2250
|
+
dialogProps?: GenericProps$1;
|
|
2251
|
+
/** On close callback. */
|
|
2252
|
+
onClose?(): void;
|
|
2253
|
+
/** Callback called when the open animation starts and the close animation finishes. */
|
|
2254
|
+
onVisibilityChange?(isVisible: boolean): void;
|
|
2255
|
+
/** whether to disable the scroll on the body or not */
|
|
2256
|
+
disableBodyScroll?: boolean;
|
|
2257
|
+
/** Children */
|
|
2258
|
+
children?: React__default.ReactNode;
|
|
2259
|
+
}
|
|
2260
|
+
type DialogSizes = Extract<Size$1, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
2261
|
+
/**
|
|
2262
|
+
* Dialog component.
|
|
2263
|
+
*
|
|
2264
|
+
* @param props Component props.
|
|
2265
|
+
* @param ref Component ref.
|
|
2266
|
+
* @return React element.
|
|
2267
|
+
*/
|
|
2268
|
+
declare const Dialog: Comp<DialogProps, HTMLDivElement>;
|
|
2269
|
+
|
|
2270
|
+
/**
|
|
2271
|
+
* Defines the props of the component.
|
|
2272
|
+
*/
|
|
2273
|
+
interface DividerProps$1 extends HasTheme, HasClassName {
|
|
2274
|
+
/** reference to the root element */
|
|
2275
|
+
ref?: CommonRef;
|
|
2276
|
+
}
|
|
2277
|
+
|
|
2278
|
+
/**
|
|
2279
|
+
* Defines the props of the component.
|
|
2280
|
+
*/
|
|
2281
|
+
interface DividerProps extends GenericProps$1, ReactToJSX<DividerProps$1> {
|
|
2282
|
+
}
|
|
2283
|
+
/**
|
|
2284
|
+
* Divider component.
|
|
2285
|
+
*
|
|
2286
|
+
* @param props Component props.
|
|
2287
|
+
* @param ref Component ref.
|
|
2288
|
+
* @return React element.
|
|
2289
|
+
*/
|
|
2290
|
+
declare const Divider: Comp<DividerProps, HTMLHRElement>;
|
|
2291
|
+
|
|
2292
|
+
/**
|
|
2293
|
+
* Defines the props of the component.
|
|
2294
|
+
*/
|
|
2295
|
+
interface DragHandleProps$1 extends HasTheme, HasClassName {
|
|
2296
|
+
/** Reference to the root element */
|
|
2297
|
+
ref?: CommonRef;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
/**
|
|
2301
|
+
* Defines the props of the component.
|
|
2302
|
+
*/
|
|
2303
|
+
interface DragHandleProps extends GenericProps$1, ReactToJSX<DragHandleProps$1> {
|
|
2304
|
+
}
|
|
2305
|
+
/**
|
|
2306
|
+
* DragHandle component.
|
|
2307
|
+
*
|
|
2308
|
+
* @param props Component props.
|
|
2309
|
+
* @param ref Component ref.
|
|
2310
|
+
* @return React element.
|
|
2311
|
+
*/
|
|
2312
|
+
declare const DragHandle: Comp<DragHandleProps, HTMLDivElement>;
|
|
2313
|
+
|
|
2314
|
+
/**
|
|
2315
|
+
* Defines the props of the component.
|
|
2316
|
+
*/
|
|
2317
|
+
interface DropdownProps extends GenericProps$1 {
|
|
2318
|
+
/**
|
|
2319
|
+
* Reference to the element around which the dropdown is placed.
|
|
2320
|
+
* @see {@link PopoverProps#anchorRef}
|
|
1566
2321
|
*/
|
|
1567
|
-
|
|
2322
|
+
anchorRef: PopoverProps['anchorRef'];
|
|
2323
|
+
/** Dropdown content. */
|
|
2324
|
+
children: React.ReactNode;
|
|
1568
2325
|
/**
|
|
1569
|
-
*
|
|
2326
|
+
* Whether a click anywhere out of the Dropdown would close it or not.
|
|
2327
|
+
* @see {@link PopoverProps#closeOnClickAway}
|
|
1570
2328
|
*/
|
|
1571
|
-
|
|
2329
|
+
closeOnClickAway?: boolean;
|
|
1572
2330
|
/**
|
|
1573
|
-
*
|
|
2331
|
+
* Whether to close the Dropdown when clicking in it or not.
|
|
1574
2332
|
*/
|
|
1575
|
-
|
|
2333
|
+
closeOnClick?: boolean;
|
|
1576
2334
|
/**
|
|
1577
|
-
*
|
|
2335
|
+
* Whether an escape key press would close the Dropdown or not.
|
|
2336
|
+
* @see {@link PopoverProps#closeOnEscape}
|
|
1578
2337
|
*/
|
|
1579
|
-
|
|
2338
|
+
closeOnEscape?: boolean;
|
|
1580
2339
|
/**
|
|
1581
|
-
*
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
2340
|
+
* Manage dropdown width:
|
|
2341
|
+
* - `maxWidth`: dropdown not bigger than anchor
|
|
2342
|
+
* - `minWidth` or `true`: dropdown not smaller than anchor
|
|
2343
|
+
* - `width`: dropdown equal to the anchor.
|
|
2344
|
+
* @see {@link PopoverProps#fitToAnchorWidth}
|
|
1584
2345
|
*/
|
|
1585
|
-
|
|
1586
|
-
lines: number;
|
|
1587
|
-
};
|
|
2346
|
+
fitToAnchorWidth?: PopoverProps['fitToAnchorWidth'];
|
|
1588
2347
|
/**
|
|
1589
|
-
*
|
|
1590
|
-
*
|
|
2348
|
+
* Whether the dropdown should shrink to fit within the viewport height or not.
|
|
2349
|
+
* @see {@link PopoverProps#fitWithinViewportHeight}
|
|
1591
2350
|
*/
|
|
1592
|
-
|
|
2351
|
+
fitWithinViewportHeight?: boolean;
|
|
1593
2352
|
/**
|
|
1594
|
-
*
|
|
1595
|
-
*
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
whiteSpace?: WhiteSpace;
|
|
2353
|
+
* Whether the dropdown should be displayed or not. Useful to control the Dropdown from outside the component.
|
|
2354
|
+
* @see {@link PopoverProps#isOpen}
|
|
2355
|
+
*/
|
|
2356
|
+
isOpen: boolean;
|
|
1599
2357
|
/**
|
|
1600
|
-
*
|
|
2358
|
+
* Offset applied to the Dropdown position.
|
|
2359
|
+
* @see {@link PopoverProps#offset}
|
|
1601
2360
|
*/
|
|
1602
|
-
|
|
1603
|
-
/**
|
|
1604
|
-
|
|
2361
|
+
offset?: Offset;
|
|
2362
|
+
/**
|
|
2363
|
+
* Preferred Dropdown placement against the anchor element.
|
|
2364
|
+
* @see {@link PopoverProps#placement}
|
|
2365
|
+
*/
|
|
2366
|
+
placement?: Placement;
|
|
2367
|
+
/** Whether the focus should be set on the list when the dropdown is open or not. */
|
|
2368
|
+
shouldFocusOnOpen?: boolean;
|
|
2369
|
+
/** Whether the dropdown should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
|
|
2370
|
+
usePortal?: boolean;
|
|
2371
|
+
/** Whether the focus should go back on the anchor when dropdown closes and focus is within. */
|
|
2372
|
+
focusAnchorOnClose?: boolean;
|
|
2373
|
+
/**
|
|
2374
|
+
* Z-axis position.
|
|
2375
|
+
* @see {@link PopoverProps#zIndex}
|
|
2376
|
+
*/
|
|
2377
|
+
zIndex?: number;
|
|
2378
|
+
/**
|
|
2379
|
+
* On close callback.
|
|
2380
|
+
* @see {@link PopoverProps#onClose}
|
|
2381
|
+
*/
|
|
2382
|
+
onClose?(): void;
|
|
2383
|
+
/** On scroll end callback. */
|
|
2384
|
+
onInfiniteScroll?(): void;
|
|
2385
|
+
}
|
|
2386
|
+
/**
|
|
2387
|
+
* Dropdown component.
|
|
2388
|
+
*
|
|
2389
|
+
* @param props Component props.
|
|
2390
|
+
* @param ref Component ref.
|
|
2391
|
+
* @return React element.
|
|
2392
|
+
*/
|
|
2393
|
+
declare const Dropdown: Comp<DropdownProps, HTMLDivElement>;
|
|
2394
|
+
|
|
2395
|
+
/**
|
|
2396
|
+
* Defines the props of the component.
|
|
2397
|
+
*/
|
|
2398
|
+
interface ExpansionPanelProps extends GenericProps$1, HasCloseMode$1, HasTheme$1 {
|
|
2399
|
+
/** Whether the expansion panel has a background. */
|
|
2400
|
+
hasBackground?: boolean;
|
|
2401
|
+
/** Whether the header has a divider. */
|
|
2402
|
+
hasHeaderDivider?: boolean;
|
|
2403
|
+
/** Whether the component is open or not. */
|
|
2404
|
+
isOpen?: boolean;
|
|
2405
|
+
/** Label text (overwritten if a `<header>` is provided in the children). */
|
|
2406
|
+
label?: string;
|
|
2407
|
+
/** On open callback. */
|
|
2408
|
+
onOpen?: (event: React__default.MouseEvent) => void;
|
|
2409
|
+
/** On close callback. */
|
|
2410
|
+
onClose?: (event: React__default.MouseEvent) => void;
|
|
2411
|
+
/** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
|
|
2412
|
+
toggleButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
|
|
2413
|
+
/** On toggle open or close callback. */
|
|
2414
|
+
onToggleOpen?(shouldOpen: boolean, event: React__default.MouseEvent): void;
|
|
2415
|
+
/** Children */
|
|
2416
|
+
children?: React__default.ReactNode;
|
|
1605
2417
|
}
|
|
2418
|
+
/**
|
|
2419
|
+
* ExpansionPanel component.
|
|
2420
|
+
*
|
|
2421
|
+
* @param props Component props.
|
|
2422
|
+
* @param ref Component ref.
|
|
2423
|
+
* @return React element.
|
|
2424
|
+
*/
|
|
2425
|
+
declare const ExpansionPanel: Comp<ExpansionPanelProps, HTMLDivElement>;
|
|
1606
2426
|
|
|
1607
2427
|
interface FlagProps$1 extends HasClassName, HasTheme {
|
|
1608
2428
|
/** Color of the component. */
|
|
@@ -1696,7 +2516,7 @@ declare const GenericBlockGapSize: Pick<{
|
|
|
1696
2516
|
readonly medium: "medium";
|
|
1697
2517
|
readonly big: "big";
|
|
1698
2518
|
readonly huge: "huge";
|
|
1699
|
-
}, "
|
|
2519
|
+
}, "big" | "medium" | "tiny" | "regular" | "huge">;
|
|
1700
2520
|
type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
|
|
1701
2521
|
|
|
1702
2522
|
interface GenericBlockProps$1 extends FlexBoxProps$1 {
|
|
@@ -1926,7 +2746,7 @@ interface GridColumnProps extends GenericProps$1, ReactToJSX<GridColumnProps$1>
|
|
|
1926
2746
|
*/
|
|
1927
2747
|
declare const GridColumn: Comp<GridColumnProps, HTMLElement>;
|
|
1928
2748
|
|
|
1929
|
-
declare const ICON_SIZES: ("
|
|
2749
|
+
declare const ICON_SIZES: ("m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl")[];
|
|
1930
2750
|
|
|
1931
2751
|
type IconSizes = (typeof ICON_SIZES)[number];
|
|
1932
2752
|
/**
|
|
@@ -2307,19 +3127,6 @@ interface InputHelperProps extends ReactToJSX<InputHelperProps$1>, GenericProps$
|
|
|
2307
3127
|
*/
|
|
2308
3128
|
declare const InputHelper: Comp<InputHelperProps, HTMLParagraphElement>;
|
|
2309
3129
|
|
|
2310
|
-
interface InputLabelProps$1 extends HasClassName, HasTheme {
|
|
2311
|
-
/** Typography variant. */
|
|
2312
|
-
typography?: Typography;
|
|
2313
|
-
/** Label content. */
|
|
2314
|
-
children: JSXElement;
|
|
2315
|
-
/** Native htmlFor property. */
|
|
2316
|
-
htmlFor: string;
|
|
2317
|
-
/** Whether the component is required or not. */
|
|
2318
|
-
isRequired?: boolean;
|
|
2319
|
-
/** ref to the root element */
|
|
2320
|
-
ref?: CommonRef;
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
3130
|
interface InputLabelProps extends ReactToJSX<InputLabelProps$1>, GenericProps$1 {
|
|
2324
3131
|
}
|
|
2325
3132
|
/**
|
|
@@ -2445,202 +3252,6 @@ interface LinkPreviewProps extends GenericProps$1, HasTheme$1 {
|
|
|
2445
3252
|
*/
|
|
2446
3253
|
declare const LinkPreview: Comp<LinkPreviewProps, HTMLDivElement>;
|
|
2447
3254
|
|
|
2448
|
-
type Listener = (evt: KeyboardEvent) => void;
|
|
2449
|
-
interface UseKeyboardListNavigationType {
|
|
2450
|
-
/** the current active index */
|
|
2451
|
-
activeItemIndex: number;
|
|
2452
|
-
/** callback to be used when a key is pressed. usually used with the native prop `onKeyDown` */
|
|
2453
|
-
onKeyboardNavigation: Listener;
|
|
2454
|
-
/** Resets the active index to the initial state */
|
|
2455
|
-
resetActiveIndex(): void;
|
|
2456
|
-
/** Sets the active index to a given value */
|
|
2457
|
-
setActiveItemIndex(value: SetStateAction<number>): void;
|
|
2458
|
-
}
|
|
2459
|
-
type useKeyboardListNavigationType = <I>(items: I[], ref: RefObject<HTMLElement>, onListItemSelected: (itemSelected: I) => void, onListItemNavigated?: (itemSelected: I) => void, onEnterPressed?: (itemSelected: string) => void, onBackspacePressed?: Listener, keepFocusAfterSelection?: boolean, initialIndex?: number, preventTabOnEnteredValue?: boolean) => UseKeyboardListNavigationType;
|
|
2460
|
-
|
|
2461
|
-
/** List item padding size. */
|
|
2462
|
-
type ListItemPadding = Extract<Size, 'big' | 'huge'>;
|
|
2463
|
-
/**
|
|
2464
|
-
* Defines the props of the component.
|
|
2465
|
-
*/
|
|
2466
|
-
interface ListProps$1 extends HasClassName {
|
|
2467
|
-
/** List content (should be ListItem, ListDivider, etc.). */
|
|
2468
|
-
children?: JSXElement;
|
|
2469
|
-
/** Item padding size. */
|
|
2470
|
-
itemPadding?: ListItemPadding;
|
|
2471
|
-
/** ref to the root element */
|
|
2472
|
-
ref?: CommonRef;
|
|
2473
|
-
}
|
|
2474
|
-
|
|
2475
|
-
/**
|
|
2476
|
-
* Defines the props of the component.
|
|
2477
|
-
*/
|
|
2478
|
-
interface ListProps extends GenericProps$1, ReactToJSX<ListProps$1> {
|
|
2479
|
-
/**
|
|
2480
|
-
* Whether the list items are clickable.
|
|
2481
|
-
* @deprecated not needed anymore.
|
|
2482
|
-
*/
|
|
2483
|
-
isClickable?: boolean;
|
|
2484
|
-
/** Tab index of the list. */
|
|
2485
|
-
tabIndex?: number;
|
|
2486
|
-
/** @deprecated not supported since v4.0.0 */
|
|
2487
|
-
onListItemSelected?(key: Key, index: number, evt: SyntheticEvent): void;
|
|
2488
|
-
}
|
|
2489
|
-
declare const List: Comp<ListProps, HTMLUListElement> & {
|
|
2490
|
-
useKeyboardListNavigation: useKeyboardListNavigationType;
|
|
2491
|
-
};
|
|
2492
|
-
|
|
2493
|
-
/**
|
|
2494
|
-
* ListItemAction props.
|
|
2495
|
-
*/
|
|
2496
|
-
type ListItemActionProps<E extends ClickableElement = 'button'> = RawClickableProps<E> & HasClassName;
|
|
2497
|
-
|
|
2498
|
-
/** ListItem size variants. */
|
|
2499
|
-
type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
|
|
2500
|
-
/**
|
|
2501
|
-
* Defines the props of the component.
|
|
2502
|
-
*/
|
|
2503
|
-
interface ListItemProps$1 extends HasClassName, HasAriaDisabled {
|
|
2504
|
-
/** A component to be rendered after the content. */
|
|
2505
|
-
after?: JSXElement;
|
|
2506
|
-
/** A component to be rendered before the content. */
|
|
2507
|
-
before?: JSXElement;
|
|
2508
|
-
/** Content. */
|
|
2509
|
-
children?: JSXElement;
|
|
2510
|
-
/** Whether the list item should be highlighted or not. */
|
|
2511
|
-
isHighlighted?: boolean;
|
|
2512
|
-
/** Whether the component is selected or not. */
|
|
2513
|
-
isSelected?: boolean;
|
|
2514
|
-
/** Whether link/button is disabled or not. */
|
|
2515
|
-
isDisabled?: boolean;
|
|
2516
|
-
/** Custom component for the link (can be used to inject router Link). */
|
|
2517
|
-
linkAs?: 'a' | any;
|
|
2518
|
-
/** Props that will be passed on to the Link. */
|
|
2519
|
-
linkProps?: GenericProps;
|
|
2520
|
-
/** Reference to the link element. */
|
|
2521
|
-
linkRef?: CommonRef;
|
|
2522
|
-
/** Size variant. */
|
|
2523
|
-
size?: ListItemSize;
|
|
2524
|
-
/** ref to the root <li> element */
|
|
2525
|
-
ref?: CommonRef;
|
|
2526
|
-
/** On click callback. */
|
|
2527
|
-
handleClick?: (event: any) => void;
|
|
2528
|
-
}
|
|
2529
|
-
type ListItemPropsToOverride = 'after' | 'before' | 'children' | 'handleClick';
|
|
2530
|
-
|
|
2531
|
-
/**
|
|
2532
|
-
* Defines the props of the component.
|
|
2533
|
-
*/
|
|
2534
|
-
interface ListItemProps extends GenericProps$1, HasAriaDisabled$1, ReactToJSX<ListItemProps$1, ListItemPropsToOverride> {
|
|
2535
|
-
/** A component to be rendered after the content. */
|
|
2536
|
-
after?: ReactNode;
|
|
2537
|
-
/** A component to be rendered before the content. */
|
|
2538
|
-
before?: ReactNode;
|
|
2539
|
-
/** Content. */
|
|
2540
|
-
children: string | ReactNode;
|
|
2541
|
-
/** Reference to the <li> element. */
|
|
2542
|
-
listItemRef?: Ref<HTMLLIElement>;
|
|
2543
|
-
/** Reference to the link element. */
|
|
2544
|
-
linkRef?: Ref<HTMLAnchorElement>;
|
|
2545
|
-
/** On click callback. */
|
|
2546
|
-
onClick?(event: SyntheticEvent): void;
|
|
2547
|
-
/** @alias onClick */
|
|
2548
|
-
onItemSelected?(evt: SyntheticEvent): void;
|
|
2549
|
-
}
|
|
2550
|
-
/**
|
|
2551
|
-
* ListItem component with Action sub-component.
|
|
2552
|
-
*/
|
|
2553
|
-
declare const ListItem: Comp<ListItemProps, HTMLLIElement> & {
|
|
2554
|
-
/** Sub-component that renders the default action (button or link) for the action area pattern. */
|
|
2555
|
-
Action: (<E extends React$1.ElementType = "button">(props: React$1.PropsWithoutRef<React$1.ComponentProps<E>> & {
|
|
2556
|
-
as?: E | undefined;
|
|
2557
|
-
} & GenericProps$1 & ReactToJSX<ListItemActionProps, "children"> & _lumx_core_js_types.HasRequiredLinkHref<E> & {
|
|
2558
|
-
children: ReactNode;
|
|
2559
|
-
onClick?(evt: SyntheticEvent): void;
|
|
2560
|
-
} & React$1.ComponentProps<E> & {
|
|
2561
|
-
ref?: ComponentRef<E> | undefined;
|
|
2562
|
-
}) => React.JSX.Element) & {
|
|
2563
|
-
displayName: string;
|
|
2564
|
-
className: string;
|
|
2565
|
-
defaultProps: Partial<ListItemActionProps<"button">>;
|
|
2566
|
-
};
|
|
2567
|
-
};
|
|
2568
|
-
|
|
2569
|
-
/**
|
|
2570
|
-
* Defines the props of the component.
|
|
2571
|
-
*/
|
|
2572
|
-
interface ListDividerProps$1 extends HasClassName {
|
|
2573
|
-
/** ref to the root element */
|
|
2574
|
-
ref?: CommonRef;
|
|
2575
|
-
}
|
|
2576
|
-
|
|
2577
|
-
/**
|
|
2578
|
-
* Defines the props of the component.
|
|
2579
|
-
*/
|
|
2580
|
-
type ListDividerProps = GenericProps$1 & ReactToJSX<ListDividerProps$1>;
|
|
2581
|
-
/**
|
|
2582
|
-
* ListDivider component.
|
|
2583
|
-
* Purely decorative, consider a `ListSection` with label for a better list structure.
|
|
2584
|
-
*
|
|
2585
|
-
* @param props Component props.
|
|
2586
|
-
* @param ref Component ref.
|
|
2587
|
-
* @return React element.
|
|
2588
|
-
*/
|
|
2589
|
-
declare const ListDivider: Comp<ListDividerProps, HTMLLIElement>;
|
|
2590
|
-
|
|
2591
|
-
/**
|
|
2592
|
-
* Defines the props of the component.
|
|
2593
|
-
*/
|
|
2594
|
-
interface ListSectionProps$1 extends HasClassName {
|
|
2595
|
-
/** Section label displayed as the group title. */
|
|
2596
|
-
label?: string;
|
|
2597
|
-
/** Section icon */
|
|
2598
|
-
icon?: string;
|
|
2599
|
-
/** List items (should be ListItem, ListDivider, etc.). */
|
|
2600
|
-
children: JSXElement;
|
|
2601
|
-
/** Items wrapper forwarded props */
|
|
2602
|
-
itemsWrapperProps?: Record<string, any>;
|
|
2603
|
-
/** ID for the label element (used for aria-labelledby). */
|
|
2604
|
-
id: string;
|
|
2605
|
-
/** ref to the root element */
|
|
2606
|
-
ref?: CommonRef;
|
|
2607
|
-
/** Text component to use for rendering the label */
|
|
2608
|
-
Text: (props: TextProps$1 & Record<string, any>) => any;
|
|
2609
|
-
}
|
|
2610
|
-
|
|
2611
|
-
/**
|
|
2612
|
-
* Defines the props of the component.
|
|
2613
|
-
*/
|
|
2614
|
-
interface ListSectionProps extends GenericProps$1, ReactToJSX<ListSectionProps$1, 'children' | 'id' | 'Text'> {
|
|
2615
|
-
/** Section content */
|
|
2616
|
-
children: ReactNode;
|
|
2617
|
-
}
|
|
2618
|
-
/**
|
|
2619
|
-
* ListSection component.
|
|
2620
|
-
*
|
|
2621
|
-
* @param props Component props.
|
|
2622
|
-
* @param ref Component ref.
|
|
2623
|
-
* @return React element.
|
|
2624
|
-
*/
|
|
2625
|
-
declare const ListSection: Comp<ListSectionProps, HTMLLIElement>;
|
|
2626
|
-
|
|
2627
|
-
/**
|
|
2628
|
-
* Defines the props of the component.
|
|
2629
|
-
*/
|
|
2630
|
-
interface ListSubheaderProps extends GenericProps$1 {
|
|
2631
|
-
/** Content. */
|
|
2632
|
-
children: string | ReactNode;
|
|
2633
|
-
}
|
|
2634
|
-
/**
|
|
2635
|
-
* ListSubheader component.
|
|
2636
|
-
* @deprecated ListSubheader produces improper list structure. use ListSection instead.
|
|
2637
|
-
*
|
|
2638
|
-
* @param props Component props.
|
|
2639
|
-
* @param ref Component ref.
|
|
2640
|
-
* @return React element.
|
|
2641
|
-
*/
|
|
2642
|
-
declare const ListSubheader: Comp<ListSubheaderProps, HTMLLIElement>;
|
|
2643
|
-
|
|
2644
3255
|
/**
|
|
2645
3256
|
* Defines the props of the component.
|
|
2646
3257
|
*/
|
|
@@ -3808,21 +4419,64 @@ interface TabListProps extends GenericProps$1, HasTheme$1 {
|
|
|
3808
4419
|
/** Position of the tabs in the list (requires 'clustered' layout). */
|
|
3809
4420
|
position?: Alignment$1;
|
|
3810
4421
|
}
|
|
3811
|
-
/**
|
|
3812
|
-
* TabList component.
|
|
3813
|
-
*
|
|
3814
|
-
* Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
3815
|
-
*
|
|
3816
|
-
* @param props Component props.
|
|
3817
|
-
* @param ref Component ref.
|
|
3818
|
-
* @return React element.
|
|
3819
|
-
*/
|
|
3820
|
-
declare const TabList: Comp<TabListProps, HTMLDivElement>;
|
|
4422
|
+
/**
|
|
4423
|
+
* TabList component.
|
|
4424
|
+
*
|
|
4425
|
+
* Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}
|
|
4426
|
+
*
|
|
4427
|
+
* @param props Component props.
|
|
4428
|
+
* @param ref Component ref.
|
|
4429
|
+
* @return React element.
|
|
4430
|
+
*/
|
|
4431
|
+
declare const TabList: Comp<TabListProps, HTMLDivElement>;
|
|
4432
|
+
|
|
4433
|
+
/**
|
|
4434
|
+
* Defines the props of the component.
|
|
4435
|
+
*/
|
|
4436
|
+
interface TabProps$1 extends HasClassName {
|
|
4437
|
+
/** Children are not supported. */
|
|
4438
|
+
children?: never;
|
|
4439
|
+
/** Icon (SVG path). */
|
|
4440
|
+
icon?: IconProps$1['icon'];
|
|
4441
|
+
/** Icon component properties. */
|
|
4442
|
+
iconProps?: Omit<IconProps$1, 'icon'>;
|
|
4443
|
+
/** Native id property. */
|
|
4444
|
+
id?: string;
|
|
4445
|
+
/** Whether the tab is active or not. */
|
|
4446
|
+
isActive?: boolean;
|
|
4447
|
+
/** Whether the component is disabled or not. */
|
|
4448
|
+
isDisabled?: boolean;
|
|
4449
|
+
/** Label content. */
|
|
4450
|
+
label: string | JSXElement;
|
|
4451
|
+
/** Whether any tab in the list is disabled (used to block interaction). */
|
|
4452
|
+
isAnyDisabled?: boolean;
|
|
4453
|
+
/** Whether the tab should become active when it receives focus (automatic activation pattern). */
|
|
4454
|
+
shouldActivateOnFocus?: boolean;
|
|
4455
|
+
/** Focus event handler injected by TabList. */
|
|
4456
|
+
handleFocus?: (event: any) => void;
|
|
4457
|
+
/** Keypress event handler injected by TabList. */
|
|
4458
|
+
handleKeyPress?: (event: any) => void;
|
|
4459
|
+
/** Callback to activate this tab, injected by TabList. */
|
|
4460
|
+
changeToTab?: () => void;
|
|
4461
|
+
/** Tab index for roving tabindex management. */
|
|
4462
|
+
tabIndex?: number;
|
|
4463
|
+
/** ID applied to the tab button element (for aria-labelledby on the panel). */
|
|
4464
|
+
tabId?: string;
|
|
4465
|
+
/** ID of the associated tab panel (for aria-controls). */
|
|
4466
|
+
tabPanelId?: string;
|
|
4467
|
+
/** Icon component injected by the framework wrapper. */
|
|
4468
|
+
Icon: any;
|
|
4469
|
+
/** Text component injected by the framework wrapper. */
|
|
4470
|
+
Text: any;
|
|
4471
|
+
/** Forward ref to the underlying button element. */
|
|
4472
|
+
ref?: CommonRef;
|
|
4473
|
+
}
|
|
4474
|
+
type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
|
|
3821
4475
|
|
|
3822
4476
|
/**
|
|
3823
4477
|
* Defines the props of the component.
|
|
3824
4478
|
*/
|
|
3825
|
-
interface TabProps extends GenericProps$1 {
|
|
4479
|
+
interface TabProps extends GenericProps$1, ReactToJSX<TabProps$1, TabPropsToOverride> {
|
|
3826
4480
|
/** Children are not supported. */
|
|
3827
4481
|
children?: never;
|
|
3828
4482
|
/** Icon (SVG path). */
|
|
@@ -3882,149 +4536,6 @@ interface TextProps extends ReactToJSX<TextProps$1>, GenericProps$1 {
|
|
|
3882
4536
|
*/
|
|
3883
4537
|
declare const Text: Comp<TextProps, HTMLElement>;
|
|
3884
4538
|
|
|
3885
|
-
/**
|
|
3886
|
-
* Defines the props of the component.
|
|
3887
|
-
*/
|
|
3888
|
-
interface TextFieldProps$1 extends HasClassName, HasTheme, HasAriaDisabled, HasDisabled {
|
|
3889
|
-
/** Chip Group to be rendered before the main text input. */
|
|
3890
|
-
chips?: JSXElement;
|
|
3891
|
-
/** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
|
|
3892
|
-
clearButtonProps?: GenericProps;
|
|
3893
|
-
/** Error message. */
|
|
3894
|
-
error?: string | JSXElement;
|
|
3895
|
-
/** Whether we force the focus style or not. */
|
|
3896
|
-
forceFocusStyle?: boolean;
|
|
3897
|
-
/** Whether the text field is displayed with error style or not. */
|
|
3898
|
-
hasError?: boolean;
|
|
3899
|
-
/** Additional element to put at the end of the text field. */
|
|
3900
|
-
afterElement?: JSXElement;
|
|
3901
|
-
/** Helper text. */
|
|
3902
|
-
helper?: string | JSXElement;
|
|
3903
|
-
/** Icon (SVG path). */
|
|
3904
|
-
icon?: string;
|
|
3905
|
-
/** Native input id property (generated if not provided to link the label element). */
|
|
3906
|
-
id?: string;
|
|
3907
|
-
/** Generated helper id for accessibility attributes. */
|
|
3908
|
-
helperId?: string;
|
|
3909
|
-
/** Generated error id for accessibility attributes. */
|
|
3910
|
-
errorId?: string;
|
|
3911
|
-
/** Whether the component is required or not. */
|
|
3912
|
-
isRequired?: boolean;
|
|
3913
|
-
/** Whether the text field is displayed with valid style or not. */
|
|
3914
|
-
isValid?: boolean;
|
|
3915
|
-
/** Label text. */
|
|
3916
|
-
label?: string;
|
|
3917
|
-
/** Additional label props. */
|
|
3918
|
-
labelProps?: InputLabelProps$1;
|
|
3919
|
-
/** Max string length the input accepts (constrains the input and displays a character counter). */
|
|
3920
|
-
maxLength?: number;
|
|
3921
|
-
/** Whether the text field is a textarea or an input. */
|
|
3922
|
-
multiline?: boolean;
|
|
3923
|
-
/** Placeholder text. */
|
|
3924
|
-
placeholder?: string;
|
|
3925
|
-
/** Reference to the wrapper. */
|
|
3926
|
-
textFieldRef?: CommonRef;
|
|
3927
|
-
/** Value. */
|
|
3928
|
-
value?: string;
|
|
3929
|
-
/** Whether any part is disabled. */
|
|
3930
|
-
isAnyDisabled?: boolean;
|
|
3931
|
-
/** The input element (input or textarea). */
|
|
3932
|
-
input: JSXElement;
|
|
3933
|
-
/** Whether the input is focused. */
|
|
3934
|
-
isFocus?: boolean;
|
|
3935
|
-
/** IconButton component. */
|
|
3936
|
-
IconButton: (props: Record<string, any>) => any;
|
|
3937
|
-
/** Ref to the component root. */
|
|
3938
|
-
ref?: CommonRef;
|
|
3939
|
-
}
|
|
3940
|
-
type TextFieldPropsToOverride = 'input' | 'IconButton' | 'labelProps' | 'textFieldRef' | 'clearButtonProps' | 'helperId' | 'errorId' | 'isAnyDisabled' | 'isFocus';
|
|
3941
|
-
|
|
3942
|
-
/**
|
|
3943
|
-
* Defines the props of the component.
|
|
3944
|
-
*/
|
|
3945
|
-
interface TextFieldProps extends GenericProps$1, ReactToJSX<TextFieldProps$1, TextFieldPropsToOverride> {
|
|
3946
|
-
/** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
|
|
3947
|
-
clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
|
|
3948
|
-
/** Reference to the <input> or <textarea> element. */
|
|
3949
|
-
inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
|
|
3950
|
-
/** Additional label props. */
|
|
3951
|
-
labelProps?: InputLabelProps;
|
|
3952
|
-
/** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */
|
|
3953
|
-
minimumRows?: number;
|
|
3954
|
-
/** Native input name property. */
|
|
3955
|
-
name?: string;
|
|
3956
|
-
/** Reference to the wrapper. */
|
|
3957
|
-
textFieldRef?: Ref<HTMLDivElement>;
|
|
3958
|
-
/** Native input type (only when `multiline` is disabled). */
|
|
3959
|
-
type?: React.ComponentProps<'input'>['type'];
|
|
3960
|
-
/** On blur callback. */
|
|
3961
|
-
onBlur?(event: React.FocusEvent): void;
|
|
3962
|
-
/** On change callback. */
|
|
3963
|
-
onChange(value: string, name?: string, event?: SyntheticEvent): void;
|
|
3964
|
-
/** On clear callback. */
|
|
3965
|
-
onClear?(event?: SyntheticEvent): void;
|
|
3966
|
-
/** On focus callback. */
|
|
3967
|
-
onFocus?(event: React.FocusEvent): void;
|
|
3968
|
-
}
|
|
3969
|
-
/**
|
|
3970
|
-
* TextField component.
|
|
3971
|
-
*
|
|
3972
|
-
* @param props Component props.
|
|
3973
|
-
* @param ref Component ref.
|
|
3974
|
-
* @return React element.
|
|
3975
|
-
*/
|
|
3976
|
-
declare const TextField: Comp<TextFieldProps, HTMLDivElement>;
|
|
3977
|
-
|
|
3978
|
-
/**
|
|
3979
|
-
* Defines the props of the component.
|
|
3980
|
-
*/
|
|
3981
|
-
interface RawInputTextProps$1 extends HasTheme, HasClassName {
|
|
3982
|
-
value?: string;
|
|
3983
|
-
type?: HTMLInputTypeAttribute;
|
|
3984
|
-
name?: string | undefined;
|
|
3985
|
-
ref?: CommonRef;
|
|
3986
|
-
handleChange?: (value: string, name?: string, event?: any) => void;
|
|
3987
|
-
}
|
|
3988
|
-
|
|
3989
|
-
type NativeInputProps = Omit<ComponentProps<'input'>, 'value' | 'onChange'>;
|
|
3990
|
-
/**
|
|
3991
|
-
* Defines the props of the component.
|
|
3992
|
-
*/
|
|
3993
|
-
interface RawInputTextProps extends NativeInputProps, ReactToJSX<RawInputTextProps$1> {
|
|
3994
|
-
onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
|
|
3995
|
-
}
|
|
3996
|
-
|
|
3997
|
-
/**
|
|
3998
|
-
* Raw input text component
|
|
3999
|
-
* (input element without any decoration)
|
|
4000
|
-
*/
|
|
4001
|
-
declare const RawInputText: Comp<RawInputTextProps, HTMLInputElement>;
|
|
4002
|
-
|
|
4003
|
-
/**
|
|
4004
|
-
* Defines the props of the component.
|
|
4005
|
-
*/
|
|
4006
|
-
interface RawInputTextareaProps$1 extends HasTheme, HasClassName {
|
|
4007
|
-
value?: string;
|
|
4008
|
-
rows?: number;
|
|
4009
|
-
name?: string | undefined;
|
|
4010
|
-
ref?: CommonRef;
|
|
4011
|
-
handleChange?: (value: string, name?: string, event?: any) => void;
|
|
4012
|
-
}
|
|
4013
|
-
|
|
4014
|
-
type NativeTextareaProps = Omit<ComponentProps<'textarea'>, 'value' | 'onChange'>;
|
|
4015
|
-
/**
|
|
4016
|
-
* Defines the props of the component.
|
|
4017
|
-
*/
|
|
4018
|
-
interface RawInputTextareaProps extends NativeTextareaProps, ReactToJSX<RawInputTextareaProps$1, 'rows'> {
|
|
4019
|
-
minimumRows?: number;
|
|
4020
|
-
onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
|
|
4021
|
-
}
|
|
4022
|
-
/**
|
|
4023
|
-
* Raw input text area component
|
|
4024
|
-
* (textarea element without any decoration)
|
|
4025
|
-
*/
|
|
4026
|
-
declare const RawInputTextarea: Comp<Omit<RawInputTextareaProps, "type">, HTMLTextAreaElement>;
|
|
4027
|
-
|
|
4028
4539
|
declare const useFocusPointStyle: ({ image, aspectRatio, focusPoint, imgProps: { width, height } }: ThumbnailProps, element: HTMLImageElement | undefined, isLoaded: boolean) => CSSProperties;
|
|
4029
4540
|
|
|
4030
4541
|
/**
|
|
@@ -4061,44 +4572,6 @@ interface ToolbarProps extends GenericProps$1, ReactToJSX<ToolbarProps$1> {
|
|
|
4061
4572
|
*/
|
|
4062
4573
|
declare const Toolbar: Comp<ToolbarProps, HTMLDivElement>;
|
|
4063
4574
|
|
|
4064
|
-
declare const ARIA_LINK_MODES: readonly ["aria-describedby", "aria-labelledby"];
|
|
4065
|
-
|
|
4066
|
-
/** Position of the tooltip relative to the anchor element. */
|
|
4067
|
-
type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
|
|
4068
|
-
/**
|
|
4069
|
-
* Framework-agnostic tooltip props (shared between React and Vue wrappers).
|
|
4070
|
-
*/
|
|
4071
|
-
interface TooltipProps$1 extends HasCloseMode {
|
|
4072
|
-
/** Delay (in ms) before closing the tooltip. */
|
|
4073
|
-
delay?: number;
|
|
4074
|
-
/** Whether the tooltip is displayed even without the mouse hovering the anchor. */
|
|
4075
|
-
forceOpen?: boolean;
|
|
4076
|
-
/** Label text. */
|
|
4077
|
-
label?: string | null | false;
|
|
4078
|
-
/** Placement of the tooltip relative to the anchor. */
|
|
4079
|
-
placement?: TooltipPlacement;
|
|
4080
|
-
/** Choose how the tooltip text should link to the anchor */
|
|
4081
|
-
ariaLinkMode?: (typeof ARIA_LINK_MODES)[number];
|
|
4082
|
-
/** Z-index for the tooltip */
|
|
4083
|
-
zIndex?: number;
|
|
4084
|
-
}
|
|
4085
|
-
|
|
4086
|
-
/**
|
|
4087
|
-
* Defines the props of the component.
|
|
4088
|
-
*/
|
|
4089
|
-
interface TooltipProps extends GenericProps$1, TooltipProps$1 {
|
|
4090
|
-
/** Anchor (element on which we activate the tooltip). */
|
|
4091
|
-
children: ReactNode;
|
|
4092
|
-
}
|
|
4093
|
-
/**
|
|
4094
|
-
* Tooltip component.
|
|
4095
|
-
*
|
|
4096
|
-
* @param props Component props.
|
|
4097
|
-
* @param ref Component ref.
|
|
4098
|
-
* @return React element.
|
|
4099
|
-
*/
|
|
4100
|
-
declare const Tooltip: Comp<TooltipProps, HTMLDivElement>;
|
|
4101
|
-
|
|
4102
4575
|
/**
|
|
4103
4576
|
* Uploader variants.
|
|
4104
4577
|
*/
|
|
@@ -4173,41 +4646,133 @@ declare const Uploader: Comp<UploaderProps, HTMLElement>;
|
|
|
4173
4646
|
/**
|
|
4174
4647
|
* User block sizes.
|
|
4175
4648
|
*/
|
|
4176
|
-
type UserBlockSize = Extract<Size
|
|
4649
|
+
type UserBlockSize = Extract<Size, 'xs' | 's' | 'm' | 'l'>;
|
|
4650
|
+
/**
|
|
4651
|
+
* Props for the UserBlock component.
|
|
4652
|
+
*
|
|
4653
|
+
* UserBlock displays user information with an avatar, name, and optional fields.
|
|
4654
|
+
* Supports both horizontal and vertical orientations with customizable actions.
|
|
4655
|
+
*/
|
|
4656
|
+
interface UserBlockProps$1 extends HasClassName, HasTheme {
|
|
4657
|
+
/**
|
|
4658
|
+
* Props to pass to the Avatar component.
|
|
4659
|
+
* Configure the user's avatar appearance and behavior.
|
|
4660
|
+
*/
|
|
4661
|
+
avatarProps?: GenericProps;
|
|
4662
|
+
/**
|
|
4663
|
+
* Additional fields to display below the user's name.
|
|
4664
|
+
* Typically used for role, department, or other user metadata.
|
|
4665
|
+
*/
|
|
4666
|
+
fields?: string[];
|
|
4667
|
+
/**
|
|
4668
|
+
* Props to pass to the Link component wrapping the avatar and/or name.
|
|
4669
|
+
* Used to make the user block clickable with navigation.
|
|
4670
|
+
*/
|
|
4671
|
+
linkProps?: GenericProps;
|
|
4672
|
+
/**
|
|
4673
|
+
* Custom component to use for the link element.
|
|
4674
|
+
* Use this to inject a framework-specific router Link component (e.g., react-router Link).
|
|
4675
|
+
* @default 'a'
|
|
4676
|
+
*/
|
|
4677
|
+
linkAs?: 'a' | any;
|
|
4678
|
+
/**
|
|
4679
|
+
* Content for multiple actions displayed in the action toolbar.
|
|
4680
|
+
* Only visible when orientation is vertical.
|
|
4681
|
+
*/
|
|
4682
|
+
multipleActions?: JSXElement;
|
|
4683
|
+
/**
|
|
4684
|
+
* The user's display name.
|
|
4685
|
+
* Can be a string or custom JSX element.
|
|
4686
|
+
*/
|
|
4687
|
+
name?: JSXElement;
|
|
4688
|
+
/**
|
|
4689
|
+
* Props to pass to the name wrapper element.
|
|
4690
|
+
* Used to customize the name block's appearance and behavior.
|
|
4691
|
+
*/
|
|
4692
|
+
nameProps?: GenericProps;
|
|
4693
|
+
/**
|
|
4694
|
+
* Layout orientation of the user block.
|
|
4695
|
+
* - horizontal: Avatar and info side by side (default)
|
|
4696
|
+
* - vertical: Avatar and info stacked, forces size to 'l'
|
|
4697
|
+
* @default Orientation.horizontal
|
|
4698
|
+
*/
|
|
4699
|
+
orientation?: Orientation;
|
|
4700
|
+
/**
|
|
4701
|
+
* Content for a single action displayed in the action toolbar.
|
|
4702
|
+
* Only visible when orientation is vertical.
|
|
4703
|
+
*/
|
|
4704
|
+
simpleAction?: JSXElement;
|
|
4705
|
+
/**
|
|
4706
|
+
* Size variant of the component.
|
|
4707
|
+
* Note: When orientation is vertical, size is automatically forced to 'l'.
|
|
4708
|
+
* @default Size.m
|
|
4709
|
+
*/
|
|
4710
|
+
size?: UserBlockSize;
|
|
4711
|
+
/**
|
|
4712
|
+
* Click event handler.
|
|
4713
|
+
* Called when the user clicks on the clickable area (name/avatar).
|
|
4714
|
+
*/
|
|
4715
|
+
handleClick?(): void;
|
|
4716
|
+
/**
|
|
4717
|
+
* Mouse enter event handler.
|
|
4718
|
+
* Called when the mouse enters the component.
|
|
4719
|
+
*/
|
|
4720
|
+
handleMouseEnter?(): void;
|
|
4721
|
+
mouseEnterProp?: string;
|
|
4722
|
+
/**
|
|
4723
|
+
* Mouse leave event handler.
|
|
4724
|
+
* Called when the mouse leaves the component.
|
|
4725
|
+
*/
|
|
4726
|
+
handleMouseLeave?(): void;
|
|
4727
|
+
mouseLeaveProp?: string;
|
|
4728
|
+
/**
|
|
4729
|
+
* Additional custom fields to display below the standard fields.
|
|
4730
|
+
* Only visible when size is not 'xs' or 's'.
|
|
4731
|
+
*/
|
|
4732
|
+
additionalFields?: JSXElement;
|
|
4733
|
+
/**
|
|
4734
|
+
* Content to display after the entire component.
|
|
4735
|
+
* Position depends on orientation:
|
|
4736
|
+
* - horizontal: displayed to the right
|
|
4737
|
+
* - vertical: displayed at the bottom
|
|
4738
|
+
*/
|
|
4739
|
+
after?: JSXElement;
|
|
4740
|
+
/**
|
|
4741
|
+
* Custom content to replace the default name block.
|
|
4742
|
+
* When provided, replaces the default name rendering.
|
|
4743
|
+
*/
|
|
4744
|
+
children?: JSXElement;
|
|
4745
|
+
/**
|
|
4746
|
+
* Ref to attach to the root element.
|
|
4747
|
+
*/
|
|
4748
|
+
ref?: CommonRef;
|
|
4749
|
+
/**
|
|
4750
|
+
* Text component for rendering text content.
|
|
4751
|
+
* Injected by the framework wrapper (React/Vue).
|
|
4752
|
+
*/
|
|
4753
|
+
Text: (props: any) => any;
|
|
4754
|
+
/**
|
|
4755
|
+
* Avatar component for rendering the user avatar.
|
|
4756
|
+
* Injected by the framework wrapper (React/Vue).
|
|
4757
|
+
*/
|
|
4758
|
+
Avatar: (props: any) => any;
|
|
4759
|
+
}
|
|
4760
|
+
type UserBlockPropsToOverride = 'Avatar' | 'Text' | 'linkProps' | 'avatarProps' | 'mouseLeaveProp' | 'mouseEnterProp';
|
|
4761
|
+
|
|
4177
4762
|
/**
|
|
4178
4763
|
* Defines the props of the component.
|
|
4179
4764
|
*/
|
|
4180
|
-
interface UserBlockProps extends GenericProps$1,
|
|
4765
|
+
interface UserBlockProps extends GenericProps$1, ReactToJSX<UserBlockProps$1, UserBlockPropsToOverride> {
|
|
4181
4766
|
/** Props to pass to the avatar. */
|
|
4182
4767
|
avatarProps?: Omit<AvatarProps, 'alt'>;
|
|
4183
|
-
/** Additional fields used to describe the user. */
|
|
4184
|
-
fields?: string[];
|
|
4185
4768
|
/** Props to pass to the link wrapping the avatar thumbnail. */
|
|
4186
4769
|
linkProps?: React__default.DetailedHTMLProps<React__default.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
|
|
4187
|
-
/** Custom react component for the link (can be used to inject react router Link). */
|
|
4188
|
-
linkAs?: 'a' | any;
|
|
4189
|
-
/** Multiple action toolbar content. */
|
|
4190
|
-
multipleActions?: ReactNode;
|
|
4191
|
-
/** User name. */
|
|
4192
|
-
name?: React__default.ReactNode;
|
|
4193
|
-
/** Props to pass to the name block. */
|
|
4194
|
-
nameProps?: GenericProps$1;
|
|
4195
|
-
/** Orientation. */
|
|
4196
|
-
orientation?: Orientation$1;
|
|
4197
|
-
/** Simple action toolbar content. */
|
|
4198
|
-
simpleAction?: ReactNode;
|
|
4199
|
-
/** Size variant. */
|
|
4200
|
-
size?: UserBlockSize;
|
|
4201
4770
|
/** On click callback. */
|
|
4202
4771
|
onClick?(): void;
|
|
4203
4772
|
/** On mouse enter callback. */
|
|
4204
4773
|
onMouseEnter?(): void;
|
|
4205
4774
|
/** On mouse leave callback. */
|
|
4206
4775
|
onMouseLeave?(): void;
|
|
4207
|
-
/** Display additional fields below the original name and fields */
|
|
4208
|
-
additionalFields?: React__default.ReactNode;
|
|
4209
|
-
/** Display an additional element after the entire component. (to the right if orientation is horizontal, at the bottom if orientation is vertical) */
|
|
4210
|
-
after?: React__default.ReactNode;
|
|
4211
4776
|
}
|
|
4212
4777
|
/**
|
|
4213
4778
|
* UserBlock component.
|
|
@@ -4227,5 +4792,5 @@ declare const ThemeProvider: React__default.FC<{
|
|
|
4227
4792
|
/** Get the theme in the current context. */
|
|
4228
4793
|
declare function useTheme(): ThemeContextValue;
|
|
4229
4794
|
|
|
4230
|
-
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME, COMPONENT_NAME, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSection, ListSubheader, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SelectionChipGroup, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableCellVariant as TableCellVariantType, TableHeader, TableRow, Text, TextField, ThOrder, ThOrder as ThOrderType, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
4231
|
-
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GenericBlockSectionProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, IconProps, IconSizes, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, InputHelperProps, InputLabelProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSectionProps, ListSubheaderProps, MarginAutoAlignment, MessageProps, MosaicProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectMultipleProps, SelectProps, SelectionChipGroupProps, SideNavigationItemProps, SideNavigationProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|
|
4795
|
+
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, CLASSNAME, COMPONENT_NAME, Checkbox, Chip, ChipGroup, Combobox, CommentBlock, CommentBlockVariant, DEFAULT_PROPS, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSection, ListSubheader, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SelectionChipGroup, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableCellVariant as TableCellVariantType, TableHeader, TableRow, Text, TextField, ThOrder, ThOrder as ThOrderType, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
4796
|
+
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, ComboboxButtonProps, ComboboxInputProps, ComboboxListProps, ComboboxOptionActionProps, ComboboxOptionMoreInfoProps, ComboboxOptionProps, ComboboxOptionSkeletonProps, ComboboxPopoverComponentProps, ComboboxPopoverProps, ComboboxProviderProps, ComboboxSectionProps, ComboboxStateProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GenericBlockSectionProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, IconProps, IconSizes, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, InputHelperProps, InputLabelProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSectionProps, ListSubheaderProps, MarginAutoAlignment, MessageProps, MosaicProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectMultipleProps, SelectProps, SelectionChipGroupProps, SideNavigationItemProps, SideNavigationProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|