@lumx/react 4.9.0-next.8 → 4.9.0-next.9

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 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, HasCloseMode as HasCloseMode$1, HasClassName as HasClassName$1, JSXElement as JSXElement$1, CommonRef as CommonRef$1, Falsy, HeadingElement as HeadingElement$1, HasAriaDisabled as HasAriaDisabled$1, HasRequiredLinkHref as HasRequiredLinkHref$1, HasAriaLabelOrLabelledBy as HasAriaLabelOrLabelledBy$1 } from '@lumx/core/js/types';
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, CSSProperties, ImgHTMLAttributes, AriaAttributes as AriaAttributes$1, SetStateAction, Key, ElementType as ElementType$1, HTMLInputTypeAttribute, ComponentProps } from 'react';
7
+ import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, RefObject, SetStateAction, Key, CSSProperties, ElementType as ElementType$1, HTMLInputTypeAttribute, ComponentProps, 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,349 @@ 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
- * Comment block variants.
1093
+ * Defines the props of the component.
1072
1094
  */
1073
- declare const CommentBlockVariant: {
1074
- readonly indented: "indented";
1075
- readonly linear: "linear";
1076
- };
1077
- type CommentBlockVariant = ValueOf$1<typeof CommentBlockVariant>;
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 CommentBlockProps extends GenericProps$1, HasTheme$1 {
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
- * On mouse leave callback.
1114
- * @deprecated Use avatarProps instead and/or inject a clickable component in `name`
1109
+ * Whether the list items are clickable.
1110
+ * @deprecated not needed anymore.
1115
1111
  */
1116
- onMouseLeave?(): void;
1117
- /** Comment content. */
1118
- text: ReactNode | string;
1119
- /** Comment variant. */
1120
- variant?: CommentBlockVariant;
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
- * CommentBlock component.
1124
- *
1125
- * @param props Component props.
1126
- * @param ref Component ref.
1127
- * @return React element.
1123
+ * ListItemAction props.
1128
1124
  */
1129
- declare const CommentBlock: Comp<CommentBlockProps, HTMLDivElement>;
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 DatePickerProps extends GenericProps$1 {
1135
- /** Default month. */
1136
- defaultMonth?: Date;
1137
- /** Locale (language or region) to use. */
1138
- locale?: string;
1139
- /** Date after which dates can't be selected. */
1140
- maxDate?: Date;
1141
- /** Date before which dates can't be selected. */
1142
- minDate?: Date;
1143
- /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
1144
- nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
1145
- /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
1146
- previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
1147
- /** Reference to the <button> element corresponding to the current date or the selected date. */
1148
- todayOrSelectedDateRef?: Ref<HTMLButtonElement>;
1149
- /** Currently selected date. */
1150
- value: Date | undefined;
1151
- /** On change callback. */
1152
- onChange(value: Date | undefined): void;
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 DatePickerControlledProps extends DatePickerProps {
1168
- /** Selected month to display. */
1169
- selectedMonth: Date;
1170
- /** On previous month change callback. */
1171
- onPrevMonthChange(): void;
1172
- /** On next month change callback. */
1173
- onNextMonthChange(): void;
1174
- /** On month/year change callback. */
1175
- onMonthChange?: (newMonth: Date) => void;
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
- * DatePickerControlled component.
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 DatePickerControlled: Comp<DatePickerControlledProps, HTMLDivElement>;
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 DatePickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'>, GenericProps$1 {
1190
- /** Default month. */
1191
- defaultMonth?: Date;
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
- * DatePickerField component.
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 DatePickerField: Comp<DatePickerFieldProps, HTMLDivElement>;
1218
+ declare const ListDivider: Comp<ListDividerProps, HTMLLIElement>;
1215
1219
 
1216
1220
  /**
1217
1221
  * Defines the props of the component.
1218
1222
  */
1219
- interface DialogProps extends GenericProps$1, HasCloseMode$1 {
1220
- /** Footer content. */
1221
- footer?: ReactNode;
1222
- /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
1223
- forceFooterDivider?: boolean;
1224
- /** Header content. */
1225
- header?: ReactNode;
1226
- /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
1227
- forceHeaderDivider?: boolean;
1228
- /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
1229
- isLoading?: boolean;
1230
- /** Whether the component is open or not. */
1231
- isOpen?: boolean;
1232
- /** Reference to the parent element that triggered modal opening (will get back focus on close). */
1233
- parentElement?: RefObject<HTMLElement>;
1234
- /** Reference to the dialog content element. */
1235
- contentRef?: Ref<HTMLDivElement>;
1236
- /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */
1237
- focusElement?: RefObject<HTMLElement>;
1238
- /** Whether to keep the dialog open on clickaway or escape press. */
1239
- preventAutoClose?: boolean;
1240
- /** Whether to keep the dialog open on escape press. */
1241
- preventCloseOnEscape?: boolean;
1242
- /** Whether to keep the dialog open on clickaway. */
1243
- preventCloseOnClick?: boolean;
1244
- /** Size variant. */
1245
- size?: DialogSizes;
1246
- /** Z-axis position. */
1247
- zIndex?: number;
1248
- /** Z-axis position. */
1249
- dialogProps?: GenericProps$1;
1250
- /** On close callback. */
1251
- onClose?(): void;
1252
- /** Callback called when the open animation starts and the close animation finishes. */
1253
- onVisibilityChange?(isVisible: boolean): void;
1254
- /** whether to disable the scroll on the body or not */
1255
- disableBodyScroll?: boolean;
1256
- /** Children */
1257
- children?: React__default.ReactNode;
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 DividerProps$1 extends HasTheme, HasClassName {
1273
- /** reference to the root element */
1270
+ interface ListSectionProps$1 extends HasClassName {
1271
+ /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */
1272
+ label?: string | JSXElement;
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 DividerProps extends GenericProps$1, ReactToJSX<DividerProps$1> {
1290
+ interface ListSectionProps extends GenericProps$1, ReactToJSX<ListSectionProps$1, 'children' | 'id' | 'Text'> {
1291
+ /** Section content */
1292
+ children: ReactNode;
1281
1293
  }
1282
1294
  /**
1283
- * Divider component.
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 Divider: Comp<DividerProps, HTMLHRElement>;
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 DragHandleProps extends GenericProps$1, ReactToJSX<DragHandleProps$1> {
1306
+ interface ListSubheaderProps extends GenericProps$1 {
1307
+ /** Content. */
1308
+ children: string | ReactNode;
1303
1309
  }
1304
1310
  /**
1305
- * DragHandle component.
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 DragHandle: Comp<DragHandleProps, HTMLDivElement>;
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
+ * Whether the combobox popover is open.
1367
+ * Used to gate live region content so screen readers announce messages
1368
+ * when the popover opens (content insertion triggers `aria-live` announcement).
1369
+ */
1370
+ isOpen?: boolean;
1371
+ };
1372
+ }
1373
+
1374
+ /**
1375
+ * Props for Combobox.State component.
1376
+ */
1377
+ interface ComboboxStateProps extends ReactToJSX<ComboboxStateProps$1, 'state'> {
1378
+ /** Additional content rendered after the state message. */
1379
+ children?: ReactNode;
1380
+ }
1381
+
1382
+ /**
1383
+ * Defines the props for the core ComboboxSection template.
1384
+ */
1385
+ interface ComboboxSectionProps$1 extends HasClassName {
1386
+ /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */
1387
+ label?: string | JSXElement;
1388
+ /** Section icon */
1389
+ icon?: string;
1390
+ /** Section content (should be ComboboxOption elements). */
1391
+ children: JSXElement;
1392
+ /** ref to the root element. */
1393
+ ref?: CommonRef;
1394
+ /**
1395
+ * When true, the section renders as a bare `<li hidden>` wrapper, keeping children
1396
+ * mounted (so option registrations stay alive) but invisible to the user and screen readers.
1397
+ * Set automatically by the React/Vue wrapper when all child options are filtered out.
1398
+ */
1399
+ hidden?: boolean;
1400
+ /**
1401
+ * When true, the section is visually rendered (label + content) but hidden from assistive
1402
+ * technology. Used for skeleton-only sections: the visual skeleton provides feedback to
1403
+ * sighted users, while the live region (`ComboboxState`) handles the loading announcement.
1404
+ */
1405
+ 'aria-hidden'?: boolean;
1406
+ }
1407
+ /**
1408
+ * Props that React/Vue wrappers need to re-declare with framework-specific types.
1409
+ * Used by `ReactToJSX<ComboboxSectionProps, ComboboxSectionPropsToOverride>`.
1410
+ */
1411
+ type ComboboxSectionPropsToOverride = 'children';
1412
+
1413
+ /**
1414
+ * Props for Combobox.Section component.
1415
+ */
1416
+ interface ComboboxSectionProps extends GenericProps$1, ReactToJSX<ComboboxSectionProps$1, ComboboxSectionPropsToOverride> {
1417
+ /** Section content (should be Combobox.Option elements). */
1418
+ children: ReactNode;
1419
+ }
1312
1420
 
1313
1421
  /**
1314
1422
  * Different possible placements for the popover.
@@ -1445,821 +1553,1239 @@ interface PopoverProps extends GenericProps$1, ReactToJSX<PopoverProps$1, 'ancho
1445
1553
  declare const Popover: Comp<PopoverProps, HTMLDivElement>;
1446
1554
 
1447
1555
  /**
1448
- * Defines the props of the component.
1556
+ * Props for Popover that can be passed to Combobox.Popover.
1557
+ * Excludes isOpen, anchorRef, children, and onClose which are managed internally.
1449
1558
  */
1450
- interface DropdownProps extends GenericProps$1 {
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
- }
1559
+ type ComboboxPopoverProps = Partial<Omit<PopoverProps, 'isOpen' | 'anchorRef' | 'children' | 'onClose'>>;
1519
1560
  /**
1520
- * Dropdown component.
1521
- *
1522
- * @param props Component props.
1523
- * @param ref Component ref.
1524
- * @return React element.
1561
+ * Props for the Combobox.Popover component.
1525
1562
  */
1526
- declare const Dropdown: Comp<DropdownProps, HTMLDivElement>;
1563
+ interface ComboboxPopoverComponentProps extends ComboboxPopoverProps {
1564
+ /** Content (should contain a Combobox.List). */
1565
+ children: ReactNode;
1566
+ }
1527
1567
 
1528
1568
  /**
1529
- * Defines the props of the component.
1569
+ * Defines the props for the core ComboboxOptionSkeleton template.
1530
1570
  */
1531
- interface ExpansionPanelProps extends GenericProps$1, HasCloseMode$1, HasTheme$1 {
1532
- /** Whether the expansion panel has a background. */
1533
- hasBackground?: boolean;
1534
- /** Whether the header has a divider. */
1535
- hasHeaderDivider?: boolean;
1536
- /** Whether the component is open or not. */
1537
- isOpen?: boolean;
1538
- /** Label text (overwritten if a `<header>` is provided in the children). */
1539
- label?: string;
1540
- /** On open callback. */
1541
- onOpen?: (event: React__default.MouseEvent) => void;
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;
1571
+ interface ComboboxOptionSkeletonProps$1 extends HasClassName {
1572
+ /** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */
1573
+ before?: JSXElement;
1574
+ /** Content rendered after the skeleton text. */
1575
+ after?: JSXElement;
1576
+ /** Show a secondary skeleton line (mirrors ComboboxOption's `description` prop). */
1577
+ hasDescription?: boolean;
1578
+ /** Override the default SkeletonTypography content entirely. */
1579
+ children?: JSXElement;
1580
+ /** ref to the root <li> element. */
1581
+ ref?: CommonRef;
1550
1582
  }
1551
1583
  /**
1552
- * ExpansionPanel component.
1553
- *
1554
- * @param props Component props.
1555
- * @param ref Component ref.
1556
- * @return React element.
1584
+ * Props that React/Vue wrappers need to re-declare with framework-specific types.
1585
+ * Used by `ReactToJSX<ComboboxOptionSkeletonProps, ComboboxOptionSkeletonPropsToOverride>`.
1557
1586
  */
1558
- declare const ExpansionPanel: Comp<ExpansionPanelProps, HTMLDivElement>;
1587
+ type ComboboxOptionSkeletonPropsToOverride = 'before' | 'after' | 'children';
1559
1588
 
1560
1589
  /**
1561
- * Defines the props of the component.
1590
+ * Props for Combobox.OptionSkeleton component.
1562
1591
  */
1563
- interface TextProps$1 extends HasClassName {
1592
+ interface ComboboxOptionSkeletonProps extends GenericProps$1, ReactToJSX<ComboboxOptionSkeletonProps$1, ComboboxOptionSkeletonPropsToOverride> {
1593
+ /** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */
1594
+ before?: ReactNode;
1595
+ /** Content rendered after the skeleton text. */
1596
+ after?: ReactNode;
1597
+ /** Override the default SkeletonTypography content entirely. */
1598
+ children?: ReactNode;
1564
1599
  /**
1565
- * Color variant.
1600
+ * Number of skeleton `<li>` elements to render.
1601
+ * Each is an independent element with `:nth-child` width cycling applied by SCSS.
1602
+ * @default 1
1566
1603
  */
1567
- color?: ColorWithVariants;
1568
- /**
1569
- * Lightened or darkened variant of the selected color.
1570
- */
1571
- colorVariant?: ColorVariant;
1572
- /**
1573
- * Typography variant.
1574
- */
1575
- typography?: Typography;
1576
- /**
1577
- * Custom component to render the text.
1578
- */
1579
- as: TextElement;
1580
- /**
1581
- * Control whether the text should truncate or not.
1582
- * Setting as `true` will make the text truncate on a single line.
1583
- * Setting as `{ lines: number }` will make the text truncate on a multiple lines.
1584
- */
1585
- truncate?: boolean | {
1586
- lines: number;
1587
- };
1588
- /**
1589
- * Prevents text to wrap on multiple lines
1590
- * (automatically activated when single line text truncate is activated).
1591
- */
1592
- noWrap?: boolean;
1593
- /**
1594
- * WhiteSpace variant
1595
- * Ignored when `noWrap` is set to true
1596
- * Ignored when `truncate` is set to true or lines: 1
1597
- * */
1598
- whiteSpace?: WhiteSpace;
1599
- /**
1600
- * Children
1601
- */
1602
- children?: JSXElement;
1603
- /** list of styles to apply */
1604
- style?: CSSProperties;
1604
+ count?: number;
1605
1605
  }
1606
1606
 
1607
- interface FlagProps$1 extends HasClassName, HasTheme {
1608
- /** Color of the component. */
1609
- color?: ColorPalette;
1610
- /** Icon to use before the label. */
1611
- icon?: string;
1612
- /** Text label of the flag. */
1613
- children: JSXElement;
1614
- /** Enable text truncate on overflow */
1615
- truncate?: boolean;
1616
- /** ref to the root element */
1607
+ /**
1608
+ * Defines the props for the core ComboboxOptionMoreInfo template.
1609
+ */
1610
+ interface ComboboxOptionMoreInfoProps$1 extends HasClassName {
1611
+ /** Popover content (additional details about the option). */
1612
+ children?: JSXElement;
1613
+ /** Whether the popover is open. */
1614
+ isOpen?: boolean;
1615
+ /** ID for the popover element (used for aria-describedby on the parent option). */
1616
+ popoverId: string;
1617
+ /** Ref for the anchor element (icon button). */
1617
1618
  ref?: CommonRef;
1618
- /** Text component to use for rendering the label */
1619
- Text: (props: TextProps$1) => any;
1620
- }
1621
-
1622
- interface FlagProps extends GenericProps$1, ReactToJSX<FlagProps$1, 'children' | 'Text'> {
1623
- /** Text label of the flag. */
1624
- label: React.ReactNode;
1619
+ /** Mouse enter callback. */
1620
+ onMouseEnter?(): void;
1621
+ /** Mouse leave callback. */
1622
+ onMouseLeave?(): void;
1623
+ /** Props forwarded to the IconButton. */
1624
+ buttonProps?: Record<string, any>;
1625
1625
  }
1626
1626
  /**
1627
- * Flag component.
1628
- *
1629
- * @param props Component props.
1630
- * @param ref Component ref.
1631
- * @return React element.
1627
+ * Props that React/Vue wrappers need to re-declare with framework-specific types.
1632
1628
  */
1633
- declare const Flag: Comp<FlagProps, HTMLDivElement>;
1629
+ type ComboboxOptionMoreInfoPropsToOverride = 'children' | 'popoverId' | 'isOpen';
1634
1630
 
1635
- type MarginAutoAlignment = Extract<Alignment, 'top' | 'bottom' | 'right' | 'left'>;
1636
- type GapSize = Extract<Size, 'tiny' | 'regular' | 'medium' | 'big' | 'huge'>;
1637
- type SpaceAlignment = Extract<Alignment, 'space-between' | 'space-evenly' | 'space-around'>;
1638
- type FlexVerticalAlignment = VerticalAlignment | SpaceAlignment;
1639
- type FlexHorizontalAlignment = HorizontalAlignment | SpaceAlignment;
1631
+ /**
1632
+ * Props for Combobox.OptionMoreInfo component.
1633
+ */
1634
+ interface ComboboxOptionMoreInfoProps extends ReactToJSX<ComboboxOptionMoreInfoProps$1, ComboboxOptionMoreInfoPropsToOverride> {
1635
+ /** Content of the popover (additional details about the option). */
1636
+ children?: ReactNode;
1637
+ /** Callback when the popover opens or closes. */
1638
+ onToggle?(isOpen: boolean): void;
1639
+ /** Props forwarded to the IconButton. */
1640
+ buttonProps?: Partial<IconButtonProps>;
1641
+ }
1640
1642
 
1641
1643
  /**
1642
- * Defines the props of the component.
1644
+ * Defines the props for the core ComboboxOption template.
1643
1645
  */
1644
- interface FlexBoxProps$1 extends HasClassName {
1645
- /** Children elements. */
1646
+ interface ComboboxOptionProps$1 extends HasClassName {
1647
+ /** A component to be rendered before the content (e.g. an icon or avatar). */
1648
+ before?: JSXElement;
1649
+ /** A component to be rendered after the content (e.g. ComboboxOptionAction elements). */
1650
+ after?: JSXElement;
1651
+ /** Content (option label). */
1646
1652
  children?: JSXElement;
1647
- /** Whether the "content filling space" is enabled or not. */
1648
- fillSpace?: boolean;
1649
- /** Gap space between flexbox items. */
1650
- gap?: GapSize;
1651
- /** Flex horizontal alignment. */
1652
- hAlign?: FlexVerticalAlignment;
1653
- /** Whether the "auto margin" is enabled all around or not. */
1654
- marginAuto?: MarginAutoAlignment | MarginAutoAlignment[];
1655
- /** Whether the "content shrink" is disabled or not. */
1656
- noShrink?: boolean;
1657
- /** Flex direction. */
1658
- orientation?: Orientation;
1659
- /** Flex vertical alignment. */
1660
- vAlign?: FlexHorizontalAlignment;
1661
- /** Whether the "flex wrap" is enabled or not. */
1662
- wrap?: boolean;
1663
- /** reference to the root element */
1653
+ /** Props forwarded to a Tooltip wrapping the role="option" / role="gridcell" element. */
1654
+ tooltipProps?: Record<string, any>;
1655
+ /** Helper description. */
1656
+ description?: string;
1657
+ /** Unique ID for the option element. */
1658
+ id?: string;
1659
+ /** Unique ID for the description element (for aria-describedby). */
1660
+ descriptionId?: string;
1661
+ /** Whether the option is disabled. */
1662
+ isDisabled?: boolean;
1663
+ /** Whether the option is selected. */
1664
+ isSelected?: boolean;
1665
+ /** Whether the parent list is in grid mode. */
1666
+ isGrid?: boolean;
1667
+ /**
1668
+ * Whether the option is hidden (filtered out by auto-filter).
1669
+ * When true, renders a bare `<li hidden>` with only the children text — no ARIA roles,
1670
+ * no classes, no visual structure. This keeps the element in the DOM so its textContent
1671
+ * can be read for future filter evaluations, while naturally excluding it from
1672
+ * `[role="option"]` queries (focus navigation) and `.lumx-combobox-option` CSS rules
1673
+ * (section/popover auto-hide).
1674
+ */
1675
+ hidden?: boolean;
1676
+ /** On click callback. */
1677
+ handleClick?(): void;
1678
+ /** Extra props forwarded to the inner action element (e.g. link props when as="a"). */
1679
+ actionProps?: Record<string, any>;
1680
+ /** ref to the root <li> element. */
1664
1681
  ref?: CommonRef;
1682
+ /** The value for this option (used for selection). */
1683
+ value?: string;
1684
+ }
1685
+ /**
1686
+ * Props that React/Vue wrappers need to re-declare with framework-specific types.
1687
+ * Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.
1688
+ */
1689
+ type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';
1690
+
1691
+ declare const ARIA_LINK_MODES: readonly ["aria-describedby", "aria-labelledby"];
1692
+
1693
+ /** Position of the tooltip relative to the anchor element. */
1694
+ type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
1695
+ /**
1696
+ * Framework-agnostic tooltip props (shared between React and Vue wrappers).
1697
+ */
1698
+ interface TooltipProps$1 extends HasCloseMode {
1699
+ /** Delay (in ms) before closing the tooltip. */
1700
+ delay?: number;
1701
+ /** Whether the tooltip is displayed even without the mouse hovering the anchor. */
1702
+ forceOpen?: boolean;
1703
+ /** Label text. */
1704
+ label?: string | null | false;
1705
+ /** Placement of the tooltip relative to the anchor. */
1706
+ placement?: TooltipPlacement;
1707
+ /** Choose how the tooltip text should link to the anchor */
1708
+ ariaLinkMode?: (typeof ARIA_LINK_MODES)[number];
1709
+ /** Z-index for the tooltip */
1710
+ zIndex?: number;
1665
1711
  }
1666
1712
 
1667
1713
  /**
1668
1714
  * Defines the props of the component.
1669
1715
  */
1670
- interface FlexBoxProps extends GenericProps$1, ReactToJSX<FlexBoxProps$1> {
1671
- /** Customize the root element. */
1672
- as?: React__default.ElementType;
1716
+ interface TooltipProps extends GenericProps$1, TooltipProps$1 {
1717
+ /** Anchor (element on which we activate the tooltip). */
1718
+ children: ReactNode;
1673
1719
  }
1674
1720
  /**
1675
- * FlexBox component.
1721
+ * Tooltip component.
1676
1722
  *
1677
1723
  * @param props Component props.
1678
1724
  * @param ref Component ref.
1679
1725
  * @return React element.
1680
1726
  */
1681
- declare const FlexBox: Comp<FlexBoxProps, HTMLDivElement>;
1727
+ declare const Tooltip: Comp<TooltipProps, HTMLDivElement>;
1682
1728
 
1683
1729
  /**
1684
- * Accepted gap sizes for the generic block.
1730
+ * Props forwarded to the inner action element (button or link).
1685
1731
  */
1686
- declare const GenericBlockGapSize: Pick<{
1687
- readonly xxs: "xxs";
1688
- readonly xs: "xs";
1689
- readonly s: "s";
1690
- readonly m: "m";
1691
- readonly l: "l";
1692
- readonly xl: "xl";
1693
- readonly xxl: "xxl";
1694
- readonly tiny: "tiny";
1695
- readonly regular: "regular";
1696
- readonly medium: "medium";
1697
- readonly big: "big";
1698
- readonly huge: "huge";
1699
- }, "tiny" | "regular" | "medium" | "big" | "huge">;
1700
- type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
1701
-
1702
- interface GenericBlockProps$1 extends FlexBoxProps$1 {
1703
- /**
1704
- * Component to use as visual element.
1705
- */
1706
- figure?: JSXElement;
1707
- /**
1708
- * Main content.
1709
- */
1710
- content?: JSXElement;
1711
- /**
1712
- * Actions to set after the main content.
1713
- */
1714
- actions?: JSXElement;
1715
- /**
1716
- * Orientation of the 3 sections
1717
- */
1718
- orientation?: FlexBoxProps$1['orientation'];
1719
- /**
1720
- * Horizontal alignment.
1721
- */
1722
- horizontalAlign?: FlexBoxProps$1['hAlign'];
1723
- /**
1724
- * Vertical alignment.
1725
- */
1726
- verticalAlign?: FlexBoxProps$1['vAlign'];
1727
- /**
1728
- * The props to forward to the content.
1729
- * By default, the content will have the same alignment as wrapper.
1730
- */
1731
- contentProps?: Omit<FlexBoxProps$1, 'children'>;
1732
- /**
1733
- * props to forward to the actions element.
1734
- */
1735
- actionsProps?: Omit<FlexBoxProps$1, 'children'>;
1736
- /**
1737
- * props to forward to the figure element.
1738
- */
1739
- figureProps?: Omit<FlexBoxProps$1, 'children'>;
1740
- /**
1741
- * FlexBox component
1742
- */
1743
- FlexBox: (props: FlexBoxProps$1) => any;
1744
- /**
1745
- * Gap space between sections.
1746
- */
1747
- gap?: GenericBlockGapSize;
1748
- /**
1749
- * reference to the root element
1750
- */
1751
- ref?: CommonRef;
1752
- }
1753
- interface GenericBlockSectionProps$1 extends FlexBoxProps$1 {
1732
+ type ComboboxOptionActionProps$1<E extends ElementType$1 = 'button'> = HasPolymorphicAs$1<E> & HasRequiredLinkHref$1<E>;
1733
+ /**
1734
+ * Props for Combobox.Option component.
1735
+ */
1736
+ interface ComboboxOptionProps extends GenericProps$1, ReactToJSX<ComboboxOptionProps$1, ComboboxOptionPropsToOverride> {
1737
+ /** Display label for the option. */
1738
+ children?: ReactNode;
1739
+ /** On option clicked (or activated with keyboard) */
1740
+ onClick?(): void;
1741
+ /** Content rendered before the option label (e.g. an icon or avatar). */
1742
+ before?: ReactNode;
1754
1743
  /**
1755
- * Gap space between items.
1744
+ * Content rendered after the option label.
1745
+ * In grid mode (`type="grid"` on the parent Combobox.List), use `Combobox.OptionAction` elements here
1746
+ * to add secondary action buttons. Each action becomes an independent `role="gridcell"`.
1756
1747
  */
1757
- gap?: GenericBlockGapSize;
1748
+ after?: ReactNode;
1749
+ /** Props forwarded to a Tooltip wrapping the role="option" / role="gridcell" trigger element. */
1750
+ tooltipProps?: Partial<TooltipProps>;
1751
+ /** Props forwarded to the inner action element (e.g. `{ as: 'a', href: '/foo' }`). */
1752
+ actionProps?: ComboboxOptionActionProps$1<any>;
1758
1753
  }
1759
- type GenericBlockPropsToOverride = 'FlexBox' | 'content';
1760
1754
 
1761
- interface GenericBlockProps extends GenericProps$1, ReactToJSX<GenericBlockProps$1, GenericBlockPropsToOverride> {
1762
- /**
1763
- * Main content to display or sections components
1764
- * ({@see GenericBlock.Figure}, {@see GenericBlock.Content} & {@see GenericBlock.Actions})
1765
- */
1766
- children: ReactNode;
1767
- }
1768
- interface GenericBlockSectionProps extends GenericProps$1, ReactToJSX<GenericBlockSectionProps$1> {
1769
- /** Customize the root element. */
1770
- as?: React__default.ElementType;
1771
- }
1772
- type BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;
1773
1755
  /**
1774
- * The GenericBlock is a layout component made of 3 sections that can be
1775
- * displayed either horizontally of vertically with the same gap between each section.
1776
- *
1777
- * The sections are:
1778
- * - `Figure` => A visual element to display before the main content.
1779
- * - `Content` => The main content displayed
1780
- * - `Actions` => One or more actions to set after the element.
1781
- *
1782
- * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076
1756
+ * Popup type for the combobox listbox.
1757
+ * - `'listbox'`: Standard listbox with `role="listbox"` and `role="option"` items.
1758
+ * - `'grid'`: Grid mode with `role="grid"` and `role="gridcell"` items, enabling 2D keyboard navigation.
1783
1759
  */
1784
- declare const BaseGenericBlock: BaseGenericBlock;
1785
- interface GenericBlock extends BaseGenericBlock {
1786
- /**
1787
- * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject
1788
- * the "figure" section of the block (instead of using `figure` and `figureProps` props).
1789
- */
1790
- Figure: Comp<GenericBlockSectionProps>;
1791
- /**
1792
- * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject
1793
- * the "content" section of the block (instead of using `content` and `contentProps` props).
1794
- */
1795
- Content: Comp<GenericBlockSectionProps>;
1760
+ type ComboboxListType = 'listbox' | 'grid';
1761
+
1762
+ /**
1763
+ * Props for Combobox.List component.
1764
+ * Note: role, id are set internally and cannot be overridden.
1765
+ */
1766
+ interface ComboboxListProps extends ListProps {
1767
+ /** Accessible label for the listbox (required for accessibility). */
1768
+ 'aria-label': string;
1796
1769
  /**
1797
- * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject
1798
- * the "actions" section of the block (instead of using `actions` and `actionsProps` props).
1770
+ * The popup type. Set to "grid" when options have action buttons (Combobox.OptionAction).
1771
+ * Enables 2D keyboard navigation and switches ARIA roles from listbox/option to grid/gridcell.
1772
+ * @default 'listbox'
1799
1773
  */
1800
- Actions: Comp<GenericBlockSectionProps>;
1774
+ type?: ComboboxListType;
1801
1775
  }
1802
- declare const GenericBlock: GenericBlock;
1803
1776
 
1804
- /**
1805
- * Defines the props of the component.
1806
- */
1807
- interface HeadingProps$1 extends Partial<TextProps$1> {
1808
- /**
1809
- * Display a specific heading level instead of the one provided by parent context provider.
1810
- */
1811
- as?: HeadingElement;
1777
+ interface InputLabelProps$1 extends HasClassName, HasTheme {
1778
+ /** Typography variant. */
1779
+ typography?: Typography;
1780
+ /** Label content. */
1781
+ children: JSXElement;
1782
+ /** Native htmlFor property. */
1783
+ htmlFor: string;
1784
+ /** Whether the component is required or not. */
1785
+ isRequired?: boolean;
1786
+ /** ref to the root element */
1787
+ ref?: CommonRef;
1812
1788
  }
1813
1789
 
1814
- interface HeadingProps extends GenericProps$1, HeadingProps$1 {
1815
- }
1816
1790
  /**
1817
- * Renders a heading component.
1818
- * Extends the `Text` Component with the heading level automatically computed based on
1819
- * the current level provided by the context.
1791
+ * Defines the props of the component.
1820
1792
  */
1821
- declare const Heading: Comp<HeadingProps, HTMLElement>;
1822
-
1823
- interface HeadingLevelProviderProps {
1824
- /** The heading level to start at. If left undefined, the parent context will be used, if any. */
1825
- level?: number;
1826
- /** The children to display */
1827
- children: ReactNode;
1793
+ interface TextFieldProps$1 extends HasClassName, HasTheme, HasAriaDisabled, HasDisabled {
1794
+ /** Chip Group to be rendered before the main text input. */
1795
+ chips?: JSXElement;
1796
+ /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
1797
+ clearButtonProps?: GenericProps;
1798
+ /** Error message. */
1799
+ error?: string | JSXElement;
1800
+ /** Whether we force the focus style or not. */
1801
+ forceFocusStyle?: boolean;
1802
+ /** Whether the text field is displayed with error style or not. */
1803
+ hasError?: boolean;
1804
+ /** Additional element to put at the end of the text field. */
1805
+ afterElement?: JSXElement;
1806
+ /** Helper text. */
1807
+ helper?: string | JSXElement;
1808
+ /** Icon (SVG path). */
1809
+ icon?: string;
1810
+ /** Native input id property (generated if not provided to link the label element). */
1811
+ id?: string;
1812
+ /** Generated helper id for accessibility attributes. */
1813
+ helperId?: string;
1814
+ /** Generated error id for accessibility attributes. */
1815
+ errorId?: string;
1816
+ /** Whether the component is required or not. */
1817
+ isRequired?: boolean;
1818
+ /** Whether the text field is displayed with valid style or not. */
1819
+ isValid?: boolean;
1820
+ /** Label text. */
1821
+ label?: string;
1822
+ /** Additional label props. */
1823
+ labelProps?: InputLabelProps$1;
1824
+ /** Max string length the input accepts (constrains the input and displays a character counter). */
1825
+ maxLength?: number;
1826
+ /** Whether the text field is a textarea or an input. */
1827
+ multiline?: boolean;
1828
+ /** Placeholder text. */
1829
+ placeholder?: string;
1830
+ /** Reference to the wrapper. */
1831
+ textFieldRef?: CommonRef;
1832
+ /** Value. */
1833
+ value?: string;
1834
+ /** Whether any part is disabled. */
1835
+ isAnyDisabled?: boolean;
1836
+ /** The input element (input or textarea). */
1837
+ input: JSXElement;
1838
+ /** Whether the input is focused. */
1839
+ isFocus?: boolean;
1840
+ /** IconButton component. */
1841
+ IconButton: (props: Record<string, any>) => any;
1842
+ /** Ref to the component root. */
1843
+ ref?: CommonRef;
1828
1844
  }
1829
- /**
1830
- * Provide a new heading level context.
1831
- */
1832
- declare const HeadingLevelProvider: React.FC<HeadingLevelProviderProps>;
1833
-
1834
- declare const useHeadingLevel: () => {
1835
- level: number;
1836
- headingElement: _lumx_core_js_types.HeadingElement;
1837
- };
1845
+ type TextFieldPropsToOverride = 'input' | 'IconButton' | 'labelProps' | 'textFieldRef' | 'clearButtonProps' | 'helperId' | 'errorId' | 'isAnyDisabled' | 'isFocus';
1838
1846
 
1839
- type GridGutterSize = Extract<Size$1, 'regular' | 'big' | 'huge'>;
1840
1847
  /**
1841
1848
  * Defines the props of the component.
1842
1849
  */
1843
- interface GridProps extends GenericProps$1 {
1844
- /** Orientation. */
1845
- orientation?: Orientation$1;
1846
- /** Whether the children are wrapped or not. */
1847
- wrap?: string;
1848
- /** Vertical alignment. */
1849
- vAlign?: Alignment$1;
1850
- /** Horizontal alignment. */
1851
- hAlign?: Alignment$1;
1852
- /** Gutter size. */
1853
- gutter?: GridGutterSize;
1854
- /** Children */
1855
- children?: React.ReactNode;
1850
+ interface TextFieldProps extends GenericProps$1, ReactToJSX<TextFieldProps$1, TextFieldPropsToOverride> {
1851
+ /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
1852
+ clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
1853
+ /** Reference to the <input> or <textarea> element. */
1854
+ inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
1855
+ /** Additional label props. */
1856
+ labelProps?: InputLabelProps;
1857
+ /** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */
1858
+ minimumRows?: number;
1859
+ /** Native input name property. */
1860
+ name?: string;
1861
+ /** Reference to the wrapper. */
1862
+ textFieldRef?: Ref<HTMLDivElement>;
1863
+ /** Native input type (only when `multiline` is disabled). */
1864
+ type?: React.ComponentProps<'input'>['type'];
1865
+ /** On blur callback. */
1866
+ onBlur?(event: React.FocusEvent): void;
1867
+ /** On change callback. */
1868
+ onChange(value: string, name?: string, event?: SyntheticEvent): void;
1869
+ /** On clear callback. */
1870
+ onClear?(event?: SyntheticEvent): void;
1871
+ /** On focus callback. */
1872
+ onFocus?(event: React.FocusEvent): void;
1856
1873
  }
1857
1874
  /**
1858
- * Grid component.
1875
+ * TextField component.
1859
1876
  *
1860
1877
  * @param props Component props.
1861
1878
  * @param ref Component ref.
1862
1879
  * @return React element.
1863
1880
  */
1864
- declare const Grid: Comp<GridProps, HTMLDivElement>;
1881
+ declare const TextField: Comp<TextFieldProps, HTMLDivElement>;
1865
1882
 
1866
- type Columns = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
1867
1883
  /**
1868
1884
  * Defines the props of the component.
1869
1885
  */
1870
- interface GridItemProps extends GenericProps$1 {
1871
- /** Alignment. */
1872
- align?: Alignment$1;
1873
- /** Order. */
1874
- order?: Columns;
1875
- /** Width. */
1876
- width?: Columns;
1877
- /** Children */
1878
- children?: React.ReactNode;
1886
+ interface RawInputTextProps$1 extends HasTheme, HasClassName {
1887
+ value?: string;
1888
+ type?: HTMLInputTypeAttribute;
1889
+ name?: string | undefined;
1890
+ ref?: CommonRef;
1891
+ handleChange?: (value: string, name?: string, event?: any) => void;
1879
1892
  }
1893
+
1894
+ type NativeInputProps = Omit<ComponentProps<'input'>, 'value' | 'onChange'>;
1880
1895
  /**
1881
- * GridItem component.
1882
- *
1883
- * @param props Component props.
1884
- * @param ref Component ref.
1885
- * @return React element.
1896
+ * Defines the props of the component.
1886
1897
  */
1887
- declare const GridItem: Comp<GridItemProps, HTMLDivElement>;
1898
+ interface RawInputTextProps extends NativeInputProps, ReactToJSX<RawInputTextProps$1> {
1899
+ onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
1900
+ }
1901
+
1902
+ /**
1903
+ * Raw input text component
1904
+ * (input element without any decoration)
1905
+ */
1906
+ declare const RawInputText: Comp<RawInputTextProps, HTMLInputElement>;
1888
1907
 
1889
- type GridColumnGapSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
1890
1908
  /**
1891
1909
  * Defines the props of the component.
1892
1910
  */
1893
- interface GridColumnProps$1 extends HasClassName {
1894
- /** Customize the root element. */
1895
- as?: any;
1896
- /** Children elements. */
1897
- children?: JSXElement;
1898
- /** Space between columns and rows. */
1899
- gap?: GridColumnGapSize;
1900
- /** Ideal number of columns. */
1901
- maxColumns?: number;
1902
- /** Minimum width for each item, reduce the number of column if there is not enough space. */
1903
- itemMinWidth?: number;
1904
- /** Custom styles. */
1905
- style?: any;
1906
- /** reference to the root element */
1911
+ interface RawInputTextareaProps$1 extends HasTheme, HasClassName {
1912
+ value?: string;
1913
+ rows?: number;
1914
+ name?: string | undefined;
1907
1915
  ref?: CommonRef;
1916
+ handleChange?: (value: string, name?: string, event?: any) => void;
1908
1917
  }
1909
1918
 
1919
+ type NativeTextareaProps = Omit<ComponentProps<'textarea'>, 'value' | 'onChange'>;
1910
1920
  /**
1911
1921
  * Defines the props of the component.
1912
1922
  */
1913
- interface GridColumnProps extends GenericProps$1, ReactToJSX<GridColumnProps$1> {
1914
- /** Customize the root element. */
1915
- as?: React.ElementType;
1923
+ interface RawInputTextareaProps extends NativeTextareaProps, ReactToJSX<RawInputTextareaProps$1, 'rows'> {
1924
+ minimumRows?: number;
1925
+ onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
1916
1926
  }
1917
-
1918
1927
  /**
1919
- * The GridColumn is a layout component that can display children in a grid
1920
- * with custom display properties. It also comes with a responsive design,
1921
- * with a number of column that reduce when there is not enough space for each item.
1922
- *
1923
- * @param props Component props.
1924
- * @param ref Component ref.
1925
- * @return React element.
1928
+ * Raw input text area component
1929
+ * (textarea element without any decoration)
1926
1930
  */
1927
- declare const GridColumn: Comp<GridColumnProps, HTMLElement>;
1928
-
1929
- declare const ICON_SIZES: ("xxs" | "xs" | "s" | "m" | "l" | "xl" | "xxl")[];
1931
+ declare const RawInputTextarea: Comp<Omit<RawInputTextareaProps, "type">, HTMLTextAreaElement>;
1930
1932
 
1931
- type IconSizes = (typeof ICON_SIZES)[number];
1932
1933
  /**
1933
- * Defines the props of the component.
1934
+ * Props for Combobox.Input component.
1935
+ * Note: role, aria-autocomplete, aria-controls, aria-expanded are set internally and cannot be overridden.
1934
1936
  */
1935
- interface IconProps$1 extends HasClassName, HasTheme {
1936
- /** Color variant. */
1937
- color?: ColorWithVariants;
1938
- /** Lightened or darkened variant of the selected icon color. */
1939
- colorVariant?: ColorVariant;
1940
- /** Whether the icon has a shape. */
1941
- hasShape?: boolean;
1937
+ interface ComboboxInputProps extends TextFieldProps {
1938
+ /** Reference to the input element. */
1939
+ inputRef?: Ref<HTMLInputElement>;
1942
1940
  /**
1943
- * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).
1944
- * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
1941
+ * Props for the toggle button.
1942
+ * When provided, a chevron button will be rendered in the text field's afterElement
1943
+ * to toggle the listbox visibility.
1945
1944
  */
1946
- icon: string;
1947
- /** Size variant. */
1948
- size?: IconSizes;
1949
- /** Sets an alternative text on the svg. Will set an `img` role to the svg. */
1950
- alt?: string;
1951
- /** Vertical alignment of the icon (only applies for icons nested in Text/Heading). */
1952
- verticalAlign?: null | 'middle';
1953
- /** reference to the root element */
1954
- ref?: CommonRef;
1945
+ toggleButtonProps?: Pick<IconButtonProps, 'label'> & Partial<Omit<IconButtonProps, 'label'>>;
1946
+ /** Called when an option is selected. */
1947
+ onSelect?: (option: {
1948
+ value: string;
1949
+ }) => void;
1950
+ /**
1951
+ * When true (default), the combobox automatically filters options as the user types.
1952
+ * Each `Combobox.Option` registers itself and hides when it doesn't match the input value.
1953
+ *
1954
+ * Set to false when you handle filtering yourself (e.g. async search, consumer-side
1955
+ * pre-filtering). Options will not be auto-filtered.
1956
+ */
1957
+ autoFilter?: boolean;
1955
1958
  }
1956
1959
 
1957
- interface IconProps extends ReactToJSX<IconProps$1>, GenericProps$1 {
1958
- }
1959
1960
  /**
1960
- * Icon component.
1961
- *
1962
- * @param props Component props.
1963
- * @param ref Component ref.
1964
- * @return React element.
1961
+ * Label display mode for the ComboboxButton.
1962
+ * - `'show-selection'`: Show the selected value if available, otherwise the label.
1963
+ * - `'show-label'`: Always show the label.
1964
+ * - `'show-tooltip'`: Show nothing in the button; label appears only in tooltip.
1965
1965
  */
1966
- declare const Icon: Comp<IconProps, HTMLElement>;
1967
-
1966
+ type ComboboxButtonLabelDisplayMode = 'show-selection' | 'show-label' | 'show-tooltip';
1968
1967
  /**
1969
- * Loading attribute is not yet supported in typescript, so we need
1970
- * to add it in order to avoid a ts error.
1971
- * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes
1968
+ * Defines the props for the core ComboboxButton template.
1972
1969
  */
1973
- declare module 'react' {
1974
- interface ImgHTMLAttributes<T> extends React.HTMLAttributes<T> {
1975
- loading?: 'eager' | 'lazy';
1976
- }
1970
+ interface ComboboxButtonProps$1 extends HasClassName {
1971
+ /** The label for the button (used for ARIA and tooltip). */
1972
+ label: string;
1973
+ /** The currently selected value to display. */
1974
+ value?: string;
1975
+ /** Controls how the label/value is displayed. */
1976
+ labelDisplayMode?: ComboboxButtonLabelDisplayMode;
1977
+ /** The ID of the listbox element (for aria-controls). */
1978
+ listboxId?: string;
1979
+ /** Whether the combobox is open. */
1980
+ isOpen?: boolean;
1981
+ /** ref to the root button element. */
1982
+ ref?: CommonRef;
1977
1983
  }
1984
+
1978
1985
  /**
1979
- * Thumbnail sizes.
1986
+ * Defines the props of the component.
1980
1987
  */
1981
- type ThumbnailSize$1 = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
1988
+ interface ComboboxProviderProps {
1989
+ /** Combobox content. */
1990
+ children?: ReactNode;
1991
+ }
1982
1992
  /**
1983
- * Thumbnail variants.
1993
+ * Combobox.Provider component.
1994
+ *
1995
+ * Provides shared context to sub-components. The vanilla JS combobox handle is
1996
+ * created by the trigger sub-component (Combobox.Input or Combobox.Button) on mount.
1997
+ *
1998
+ * @param props Component props.
1999
+ * @return React element.
1984
2000
  */
1985
- declare const ThumbnailVariant$1: {
1986
- readonly squared: "squared";
1987
- readonly rounded: "rounded";
1988
- };
1989
- type ThumbnailVariant$1 = ValueOf<typeof ThumbnailVariant$1>;
2001
+ declare function ComboboxProvider(props: ComboboxProviderProps): react_jsx_runtime.JSX.Element;
2002
+ declare namespace ComboboxProvider {
2003
+ var displayName: string;
2004
+ }
2005
+
2006
+ /** Map of combobox event names to their payload types. */
2007
+ interface ComboboxEventMap {
2008
+ /** Fired when the combobox open state changes. Payload: whether the combobox is open. */
2009
+ open: boolean;
2010
+ /** Fired when the active descendant changes (visual focus). Payload: the option id or null. */
2011
+ activeDescendantChange: string | null;
2012
+ /**
2013
+ * Fired when the visible option count transitions between empty and non-empty.
2014
+ * Payload: whether the list is empty plus the current input value.
2015
+ */
2016
+ emptyChange: {
2017
+ isEmpty?: boolean;
2018
+ inputValue?: string;
2019
+ } | undefined;
2020
+ /**
2021
+ * Fired immediately when the aggregate loading state changes (skeleton count transitions
2022
+ * between 0 and >0). Used for empty suppression in ComboboxState and for aria-busy on the listbox.
2023
+ */
2024
+ loadingChange: boolean;
2025
+ /**
2026
+ * Fired after a 500ms debounce when loading persists, or immediately when loading ends.
2027
+ * Used to control the loading message text in the live region (ComboboxState).
2028
+ */
2029
+ loadingAnnouncement: boolean;
2030
+ }
2031
+
1990
2032
  /**
1991
- * Thumbnail object fit.
2033
+ * Hook to subscribe to a combobox event via the handle's subscriber system.
2034
+ * Re-subscribes when the handle changes (e.g. trigger mount/unmount).
1992
2035
  */
1993
- declare const ThumbnailObjectFit$1: {
1994
- readonly cover: "cover";
1995
- readonly contain: "contain";
2036
+ declare function useComboboxEvent<K extends keyof ComboboxEventMap>(event: K, initialValue: ComboboxEventMap[K]): ComboboxEventMap[K];
2037
+
2038
+ /**
2039
+ * Props for Combobox.Button component.
2040
+ *
2041
+ * Polymorphic component — use `as` to render the trigger as a different element or component
2042
+ * (e.g., `as="a"`, `as={RouterLink}`). Defaults to the LumX `Button` component.
2043
+ */
2044
+ 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> & {
2045
+ /** Called when an option is selected. */
2046
+ onSelect?: (option: {
2047
+ value: string;
2048
+ }) => void;
1996
2049
  };
1997
- type ThumbnailObjectFit$1 = ValueOf<typeof ThumbnailObjectFit$1>;
1998
2050
 
1999
- type ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;
2000
2051
  /**
2001
- * Defines the props of the component.
2052
+ * Combobox.OptionAction props.
2053
+ *
2054
+ * Polymorphic component — use `as` to render as a different element or component
2055
+ * (e.g., `as={IconButton}`, `as={Button}`). Defaults to `'button'`.
2002
2056
  */
2003
- interface ThumbnailProps$1 extends HasTheme$1, HasClassName$1 {
2004
- /** Alignment of the thumbnail in it's parent (requires flex parent). */
2005
- align?: HorizontalAlignment$1;
2006
- /** Image alternative text. */
2007
- alt: string;
2008
- /** Image aspect ratio. */
2009
- aspectRatio?: AspectRatio$1;
2010
- /** Badge. */
2011
- badge?: JSXElement$1;
2012
- /** Image cross origin resource policy. */
2013
- crossOrigin?: ImgHTMLProps['crossOrigin'];
2014
- /** Fallback icon (SVG path) or react node when image fails to load. */
2015
- fallback?: string | JSXElement$1;
2016
- /** Whether the thumbnail should fill it's parent size (requires flex parent) or not. */
2017
- fillHeight?: boolean;
2018
- /** Image URL. */
2019
- image: string;
2020
- loadingState: string;
2021
- /** Props to inject into the native <img> element. */
2022
- imgProps?: ImgHTMLProps;
2023
- /** Reference to the native <img> element. */
2024
- imgRef?: CommonRef$1;
2025
- ref?: CommonRef$1;
2026
- /** Set to true to force the display of the loading skeleton. */
2027
- isLoading?: boolean;
2028
- /** Set how the image should fit when its aspect ratio is constrained */
2029
- objectFit?: ThumbnailObjectFit$1;
2030
- /** Size variant of the component. */
2031
- size?: ThumbnailSize$1;
2032
- /** Image loading mode. */
2033
- loading?: 'eager' | 'lazy';
2034
- /** Ref of an existing placeholder image to display while loading. */
2035
- loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement>;
2057
+ type ComboboxOptionActionProps<E extends ElementType$1 = 'button'> = HasPolymorphicAs$1<E> & HasClassName$1 & HasRequiredLinkHref$1<E> & {
2058
+ /** Content of the action (icon, label, etc.). Optional when using a polymorphic `as` that provides its own content (e.g., IconButton). */
2059
+ children?: ReactNode;
2060
+ /** Whether the action is disabled. */
2061
+ isDisabled?: boolean;
2036
2062
  /** On click callback. */
2037
- handleClick?: (event: any) => void;
2038
- /** On key press callback. */
2039
- handleKeyPress?: (event: any) => void;
2040
- /** Variant of the component. */
2041
- variant?: ThumbnailVariant$1;
2042
- /** Props to pass to the link wrapping the thumbnail. */
2043
- linkProps?: GenericProps$1;
2044
- focusPointStyle?: GenericProps$1;
2045
- disabledStateProps?: GenericProps$1;
2046
- isAnyDisabled?: boolean;
2047
- /** Custom react component for the link (can be used to inject react router Link). */
2048
- linkAs?: 'a' | any;
2049
- 'aria-label'?: string;
2050
- }
2063
+ onClick?(evt: SyntheticEvent): void;
2064
+ };
2051
2065
 
2052
2066
  /**
2053
- * Focal point using vertical alignment, horizontal alignment or coordinates (from -1 to 1).
2067
+ * Combobox compound component namespace.
2054
2068
  */
2055
- type FocusPoint = {
2056
- x?: number;
2057
- y?: number;
2069
+ declare const Combobox: {
2070
+ /** Provides shared combobox context (handle, listbox ID, anchor ref) to all sub-components. */
2071
+ Provider: typeof ComboboxProvider;
2072
+ /** Button trigger for select-only combobox mode with keyboard navigation and typeahead. */
2073
+ 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> & {
2074
+ onSelect?: (option: {
2075
+ value: string;
2076
+ }) => void;
2077
+ } & React$1.ComponentProps<E> & {
2078
+ ref?: ComponentRef<E> | undefined;
2079
+ }) => React.JSX.Element) & {
2080
+ displayName: string;
2081
+ className: "lumx-combobox-button";
2082
+ };
2083
+ /** Text input trigger for autocomplete combobox mode with optional toggle button and filtering. */
2084
+ Input: Comp<ComboboxInputProps, HTMLDivElement>;
2085
+ /** Listbox container that registers with the combobox handle and tracks loading state. */
2086
+ List: Comp<ComboboxListProps, HTMLUListElement>;
2087
+ /** Selectable option item with filtering and keyboard navigation support. */
2088
+ Option: Comp<ComboboxOptionProps, HTMLLIElement>;
2089
+ /** Secondary action button within a grid-mode option row, rendered as an independent gridcell. */
2090
+ OptionAction: (<E extends React$1.ElementType = "button">(props: React$1.PropsWithoutRef<React$1.ComponentProps<E>> & {
2091
+ as?: E | undefined;
2092
+ } & _lumx_core_js_types.HasClassName & _lumx_core_js_types.HasRequiredLinkHref<E> & {
2093
+ children?: React$1.ReactNode;
2094
+ isDisabled?: boolean;
2095
+ onClick?(evt: React$1.SyntheticEvent): void;
2096
+ } & React$1.ComponentProps<E> & {
2097
+ ref?: ComponentRef<E> | undefined;
2098
+ }) => React.JSX.Element) & {
2099
+ displayName: string;
2100
+ className: "lumx-combobox-option-action";
2101
+ };
2102
+ /** Info button on an option that shows a popover on hover or keyboard highlight. */
2103
+ OptionMoreInfo: {
2104
+ (props: ComboboxOptionMoreInfoProps): react_jsx_runtime.JSX.Element;
2105
+ displayName: string;
2106
+ className: "lumx-combobox-option-more-info";
2107
+ };
2108
+ /** Loading placeholder skeleton(s) that auto-register loading state with the combobox handle. */
2109
+ OptionSkeleton: {
2110
+ (props: ComboboxOptionSkeletonProps): react_jsx_runtime.JSX.Element[];
2111
+ displayName: string;
2112
+ className: "lumx-combobox-option-skeleton";
2113
+ };
2114
+ /** Floating popover container that auto-binds to the combobox anchor and open/close state. */
2115
+ Popover: {
2116
+ (props: ComboboxPopoverComponentProps): react_jsx_runtime.JSX.Element;
2117
+ displayName: string;
2118
+ className: "lumx-combobox-popover";
2119
+ };
2120
+ /** Labelled group of options that auto-hides when all its child options are filtered out. */
2121
+ Section: Comp<ComboboxSectionProps, HTMLLIElement>;
2122
+ /** Displays empty, error, and loading state messages for the combobox list. */
2123
+ State: {
2124
+ (props: ComboboxStateProps): react_jsx_runtime.JSX.Element;
2125
+ displayName: string;
2126
+ className: "lumx-combobox-state";
2127
+ };
2128
+ /** Visual separator between option groups (alias for ListDivider). Purely decorative — invisible to screen readers. */
2129
+ Divider: Comp<ListDividerProps, HTMLLIElement>;
2130
+ /** Hook to subscribe to combobox events. Must be used within a Combobox.Provider. */
2131
+ useComboboxEvent: typeof useComboboxEvent;
2058
2132
  };
2133
+
2059
2134
  /**
2060
- * Loading attribute is not yet supported in typescript, so we need
2061
- * to add it in order to avoid a ts error.
2062
- * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes
2135
+ * Comment block variants.
2063
2136
  */
2064
- declare module 'react' {
2065
- interface ImgHTMLAttributes<T> extends React__default.HTMLAttributes<T> {
2066
- loading?: 'eager' | 'lazy';
2067
- }
2137
+ declare const CommentBlockVariant: {
2138
+ readonly indented: "indented";
2139
+ readonly linear: "linear";
2140
+ };
2141
+ type CommentBlockVariant = ValueOf$1<typeof CommentBlockVariant>;
2142
+ /**
2143
+ * Defines the props of the component.
2144
+ */
2145
+ interface CommentBlockProps extends GenericProps$1, HasTheme$1 {
2146
+ /** Action toolbar content. */
2147
+ actions?: ReactNode;
2148
+ /** Props to pass to the avatar. */
2149
+ avatarProps: AvatarProps;
2150
+ /** Comment block replies. */
2151
+ children?: ReactNode;
2152
+ /** Comment date with the minimal timestamp information (xx minutes, x hours, yesterday, 6 days, Month Day, Month Day Year)*/
2153
+ date?: string;
2154
+ /** Comment date with the full timestamp information (day, month, year, time) */
2155
+ fullDate?: string;
2156
+ /** Whether the component has actions to display or not. */
2157
+ hasActions?: boolean;
2158
+ /** Action toolbar header content. */
2159
+ headerActions?: ReactNode;
2160
+ /** Whether the component is open or not. */
2161
+ isOpen?: boolean;
2162
+ /** Whether the comment is relevant or not. */
2163
+ isRelevant?: boolean;
2164
+ /** Comment author name. */
2165
+ name?: React.ReactNode;
2166
+ /**
2167
+ * On click callback.
2168
+ * @deprecated Use avatarProps instead and/or inject a clickable component in `name`
2169
+ */
2170
+ onClick?(): void;
2171
+ /**
2172
+ * On mouse enter callback.
2173
+ * @deprecated Use avatarProps instead and/or inject a clickable component in `name`
2174
+ */
2175
+ onMouseEnter?(): void;
2176
+ /**
2177
+ * On mouse leave callback.
2178
+ * @deprecated Use avatarProps instead and/or inject a clickable component in `name`
2179
+ */
2180
+ onMouseLeave?(): void;
2181
+ /** Comment content. */
2182
+ text: ReactNode | string;
2183
+ /** Comment variant. */
2184
+ variant?: CommentBlockVariant;
2068
2185
  }
2069
2186
  /**
2070
- * All available aspect ratios.
2071
- * @deprecated
2187
+ * CommentBlock component.
2188
+ *
2189
+ * @param props Component props.
2190
+ * @param ref Component ref.
2191
+ * @return React element.
2072
2192
  */
2073
- declare const ThumbnailAspectRatio: Record<string, AspectRatio$1>;
2193
+ declare const CommentBlock: Comp<CommentBlockProps, HTMLDivElement>;
2194
+
2074
2195
  /**
2075
- * Thumbnail sizes.
2196
+ * Defines the props of the component.
2076
2197
  */
2077
- type ThumbnailSize = Extract<Size$1, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
2198
+ interface DatePickerProps extends GenericProps$1 {
2199
+ /** Default month. */
2200
+ defaultMonth?: Date;
2201
+ /** Locale (language or region) to use. */
2202
+ locale?: string;
2203
+ /** Date after which dates can't be selected. */
2204
+ maxDate?: Date;
2205
+ /** Date before which dates can't be selected. */
2206
+ minDate?: Date;
2207
+ /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
2208
+ nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
2209
+ /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
2210
+ previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
2211
+ /** Reference to the <button> element corresponding to the current date or the selected date. */
2212
+ todayOrSelectedDateRef?: Ref<HTMLButtonElement>;
2213
+ /** Currently selected date. */
2214
+ value: Date | undefined;
2215
+ /** On change callback. */
2216
+ onChange(value: Date | undefined): void;
2217
+ }
2218
+
2078
2219
  /**
2079
- * Thumbnail variants.
2220
+ * DatePicker component.
2221
+ *
2222
+ * @param props Component props.
2223
+ * @param ref Component ref.
2224
+ * @return React element.
2080
2225
  */
2081
- declare const ThumbnailVariant: {
2082
- readonly squared: "squared";
2083
- readonly rounded: "rounded";
2084
- };
2085
- type ThumbnailVariant = ValueOf$1<typeof ThumbnailVariant>;
2226
+ declare const DatePicker: Comp<DatePickerProps, HTMLDivElement>;
2227
+
2086
2228
  /**
2087
- * Thumbnail object fit.
2229
+ * Defines the props of the component.
2088
2230
  */
2089
- declare const ThumbnailObjectFit: {
2090
- readonly cover: "cover";
2091
- readonly contain: "contain";
2092
- };
2093
- type ThumbnailObjectFit = ValueOf$1<typeof ThumbnailObjectFit>;
2231
+ interface DatePickerControlledProps extends DatePickerProps {
2232
+ /** Selected month to display. */
2233
+ selectedMonth: Date;
2234
+ /** On previous month change callback. */
2235
+ onPrevMonthChange(): void;
2236
+ /** On next month change callback. */
2237
+ onNextMonthChange(): void;
2238
+ /** On month/year change callback. */
2239
+ onMonthChange?: (newMonth: Date) => void;
2240
+ }
2241
+ /**
2242
+ * DatePickerControlled component.
2243
+ *
2244
+ * @param props Component props.
2245
+ * @param ref Component ref.
2246
+ * @return React element.
2247
+ */
2248
+ declare const DatePickerControlled: Comp<DatePickerControlledProps, HTMLDivElement>;
2249
+
2250
+ /**
2251
+ * Defines the props of the component.
2252
+ */
2253
+ interface DatePickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'>, GenericProps$1 {
2254
+ /** Default month. */
2255
+ defaultMonth?: Date;
2256
+ /** Locale (language or region) to use. */
2257
+ locale?: string;
2258
+ /** Date after which dates can't be selected. */
2259
+ maxDate?: Date;
2260
+ /** Date before which dates can't be selected. */
2261
+ minDate?: Date;
2262
+ /** Props to pass to the next month button (minus those already set by the DatePickerControlled props). */
2263
+ nextButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
2264
+ /** Props to pass to the previous month button (minus those already set by the DatePickerControlled props). */
2265
+ previousButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
2266
+ /** Currently selected date. */
2267
+ value: Date | undefined;
2268
+ /** On change callback. */
2269
+ onChange(value: Date | undefined, name?: string, event?: SyntheticEvent): void;
2270
+ }
2271
+ /**
2272
+ * DatePickerField component.
2273
+ *
2274
+ * @param props Component props.
2275
+ * @param ref Component ref.
2276
+ * @return React element.
2277
+ */
2278
+ declare const DatePickerField: Comp<DatePickerFieldProps, HTMLDivElement>;
2279
+
2280
+ /**
2281
+ * Defines the props of the component.
2282
+ */
2283
+ interface DialogProps extends GenericProps$1, HasCloseMode$1 {
2284
+ /** Footer content. */
2285
+ footer?: ReactNode;
2286
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
2287
+ forceFooterDivider?: boolean;
2288
+ /** Header content. */
2289
+ header?: ReactNode;
2290
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
2291
+ forceHeaderDivider?: boolean;
2292
+ /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
2293
+ isLoading?: boolean;
2294
+ /** Whether the component is open or not. */
2295
+ isOpen?: boolean;
2296
+ /** Reference to the parent element that triggered modal opening (will get back focus on close). */
2297
+ parentElement?: RefObject<HTMLElement>;
2298
+ /** Reference to the dialog content element. */
2299
+ contentRef?: Ref<HTMLDivElement>;
2300
+ /** Reference to the of the element that should get the focus when the dialogs opens. By default, the first child will take focus. */
2301
+ focusElement?: RefObject<HTMLElement>;
2302
+ /** Whether to keep the dialog open on clickaway or escape press. */
2303
+ preventAutoClose?: boolean;
2304
+ /** Whether to keep the dialog open on escape press. */
2305
+ preventCloseOnEscape?: boolean;
2306
+ /** Whether to keep the dialog open on clickaway. */
2307
+ preventCloseOnClick?: boolean;
2308
+ /** Size variant. */
2309
+ size?: DialogSizes;
2310
+ /** Z-axis position. */
2311
+ zIndex?: number;
2312
+ /** Z-axis position. */
2313
+ dialogProps?: GenericProps$1;
2314
+ /** On close callback. */
2315
+ onClose?(): void;
2316
+ /** Callback called when the open animation starts and the close animation finishes. */
2317
+ onVisibilityChange?(isVisible: boolean): void;
2318
+ /** whether to disable the scroll on the body or not */
2319
+ disableBodyScroll?: boolean;
2320
+ /** Children */
2321
+ children?: React__default.ReactNode;
2322
+ }
2323
+ type DialogSizes = Extract<Size$1, 'tiny' | 'regular' | 'big' | 'huge'>;
2324
+ /**
2325
+ * Dialog component.
2326
+ *
2327
+ * @param props Component props.
2328
+ * @param ref Component ref.
2329
+ * @return React element.
2330
+ */
2331
+ declare const Dialog: Comp<DialogProps, HTMLDivElement>;
2332
+
2333
+ /**
2334
+ * Defines the props of the component.
2335
+ */
2336
+ interface DividerProps$1 extends HasTheme, HasClassName {
2337
+ /** reference to the root element */
2338
+ ref?: CommonRef;
2339
+ }
2340
+
2341
+ /**
2342
+ * Defines the props of the component.
2343
+ */
2344
+ interface DividerProps extends GenericProps$1, ReactToJSX<DividerProps$1> {
2345
+ }
2346
+ /**
2347
+ * Divider component.
2348
+ *
2349
+ * @param props Component props.
2350
+ * @param ref Component ref.
2351
+ * @return React element.
2352
+ */
2353
+ declare const Divider: Comp<DividerProps, HTMLHRElement>;
2354
+
2355
+ /**
2356
+ * Defines the props of the component.
2357
+ */
2358
+ interface DragHandleProps$1 extends HasTheme, HasClassName {
2359
+ /** Reference to the root element */
2360
+ ref?: CommonRef;
2361
+ }
2362
+
2363
+ /**
2364
+ * Defines the props of the component.
2365
+ */
2366
+ interface DragHandleProps extends GenericProps$1, ReactToJSX<DragHandleProps$1> {
2367
+ }
2368
+ /**
2369
+ * DragHandle component.
2370
+ *
2371
+ * @param props Component props.
2372
+ * @param ref Component ref.
2373
+ * @return React element.
2374
+ */
2375
+ declare const DragHandle: Comp<DragHandleProps, HTMLDivElement>;
2376
+
2377
+ /**
2378
+ * Defines the props of the component.
2379
+ */
2380
+ interface DropdownProps extends GenericProps$1 {
2381
+ /**
2382
+ * Reference to the element around which the dropdown is placed.
2383
+ * @see {@link PopoverProps#anchorRef}
2384
+ */
2385
+ anchorRef: PopoverProps['anchorRef'];
2386
+ /** Dropdown content. */
2387
+ children: React.ReactNode;
2388
+ /**
2389
+ * Whether a click anywhere out of the Dropdown would close it or not.
2390
+ * @see {@link PopoverProps#closeOnClickAway}
2391
+ */
2392
+ closeOnClickAway?: boolean;
2393
+ /**
2394
+ * Whether to close the Dropdown when clicking in it or not.
2395
+ */
2396
+ closeOnClick?: boolean;
2397
+ /**
2398
+ * Whether an escape key press would close the Dropdown or not.
2399
+ * @see {@link PopoverProps#closeOnEscape}
2400
+ */
2401
+ closeOnEscape?: boolean;
2402
+ /**
2403
+ * Manage dropdown width:
2404
+ * - `maxWidth`: dropdown not bigger than anchor
2405
+ * - `minWidth` or `true`: dropdown not smaller than anchor
2406
+ * - `width`: dropdown equal to the anchor.
2407
+ * @see {@link PopoverProps#fitToAnchorWidth}
2408
+ */
2409
+ fitToAnchorWidth?: PopoverProps['fitToAnchorWidth'];
2410
+ /**
2411
+ * Whether the dropdown should shrink to fit within the viewport height or not.
2412
+ * @see {@link PopoverProps#fitWithinViewportHeight}
2413
+ */
2414
+ fitWithinViewportHeight?: boolean;
2415
+ /**
2416
+ * Whether the dropdown should be displayed or not. Useful to control the Dropdown from outside the component.
2417
+ * @see {@link PopoverProps#isOpen}
2418
+ */
2419
+ isOpen: boolean;
2420
+ /**
2421
+ * Offset applied to the Dropdown position.
2422
+ * @see {@link PopoverProps#offset}
2423
+ */
2424
+ offset?: Offset;
2425
+ /**
2426
+ * Preferred Dropdown placement against the anchor element.
2427
+ * @see {@link PopoverProps#placement}
2428
+ */
2429
+ placement?: Placement;
2430
+ /** Whether the focus should be set on the list when the dropdown is open or not. */
2431
+ shouldFocusOnOpen?: boolean;
2432
+ /** Whether the dropdown should be rendered into a DOM node that exists outside the DOM hierarchy of the parent component. */
2433
+ usePortal?: boolean;
2434
+ /** Whether the focus should go back on the anchor when dropdown closes and focus is within. */
2435
+ focusAnchorOnClose?: boolean;
2436
+ /**
2437
+ * Z-axis position.
2438
+ * @see {@link PopoverProps#zIndex}
2439
+ */
2440
+ zIndex?: number;
2441
+ /**
2442
+ * On close callback.
2443
+ * @see {@link PopoverProps#onClose}
2444
+ */
2445
+ onClose?(): void;
2446
+ /** On scroll end callback. */
2447
+ onInfiniteScroll?(): void;
2448
+ }
2449
+ /**
2450
+ * Dropdown component.
2451
+ *
2452
+ * @param props Component props.
2453
+ * @param ref Component ref.
2454
+ * @return React element.
2455
+ */
2456
+ declare const Dropdown: Comp<DropdownProps, HTMLDivElement>;
2457
+
2458
+ /**
2459
+ * Defines the props of the component.
2460
+ */
2461
+ interface ExpansionPanelProps extends GenericProps$1, HasCloseMode$1, HasTheme$1 {
2462
+ /** Whether the expansion panel has a background. */
2463
+ hasBackground?: boolean;
2464
+ /** Whether the header has a divider. */
2465
+ hasHeaderDivider?: boolean;
2466
+ /** Whether the component is open or not. */
2467
+ isOpen?: boolean;
2468
+ /** Label text (overwritten if a `<header>` is provided in the children). */
2469
+ label?: string;
2470
+ /** On open callback. */
2471
+ onOpen?: (event: React__default.MouseEvent) => void;
2472
+ /** On close callback. */
2473
+ onClose?: (event: React__default.MouseEvent) => void;
2474
+ /** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
2475
+ toggleButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
2476
+ /** On toggle open or close callback. */
2477
+ onToggleOpen?(shouldOpen: boolean, event: React__default.MouseEvent): void;
2478
+ /** Children */
2479
+ children?: React__default.ReactNode;
2480
+ }
2481
+ /**
2482
+ * ExpansionPanel component.
2483
+ *
2484
+ * @param props Component props.
2485
+ * @param ref Component ref.
2486
+ * @return React element.
2487
+ */
2488
+ declare const ExpansionPanel: Comp<ExpansionPanelProps, HTMLDivElement>;
2489
+
2490
+ interface FlagProps$1 extends HasClassName, HasTheme {
2491
+ /** Color of the component. */
2492
+ color?: ColorPalette;
2493
+ /** Icon to use before the label. */
2494
+ icon?: string;
2495
+ /** Text label of the flag. */
2496
+ children: JSXElement;
2497
+ /** Enable text truncate on overflow */
2498
+ truncate?: boolean;
2499
+ /** ref to the root element */
2500
+ ref?: CommonRef;
2501
+ /** Text component to use for rendering the label */
2502
+ Text: (props: TextProps$1) => any;
2503
+ }
2504
+
2505
+ interface FlagProps extends GenericProps$1, ReactToJSX<FlagProps$1, 'children' | 'Text'> {
2506
+ /** Text label of the flag. */
2507
+ label: React.ReactNode;
2508
+ }
2509
+ /**
2510
+ * Flag component.
2511
+ *
2512
+ * @param props Component props.
2513
+ * @param ref Component ref.
2514
+ * @return React element.
2515
+ */
2516
+ declare const Flag: Comp<FlagProps, HTMLDivElement>;
2517
+
2518
+ type MarginAutoAlignment = Extract<Alignment, 'top' | 'bottom' | 'right' | 'left'>;
2519
+ type GapSize = Extract<Size, 'tiny' | 'regular' | 'medium' | 'big' | 'huge'>;
2520
+ type SpaceAlignment = Extract<Alignment, 'space-between' | 'space-evenly' | 'space-around'>;
2521
+ type FlexVerticalAlignment = VerticalAlignment | SpaceAlignment;
2522
+ type FlexHorizontalAlignment = HorizontalAlignment | SpaceAlignment;
2523
+
2524
+ /**
2525
+ * Defines the props of the component.
2526
+ */
2527
+ interface FlexBoxProps$1 extends HasClassName {
2528
+ /** Children elements. */
2529
+ children?: JSXElement;
2530
+ /** Whether the "content filling space" is enabled or not. */
2531
+ fillSpace?: boolean;
2532
+ /** Gap space between flexbox items. */
2533
+ gap?: GapSize;
2534
+ /** Flex horizontal alignment. */
2535
+ hAlign?: FlexVerticalAlignment;
2536
+ /** Whether the "auto margin" is enabled all around or not. */
2537
+ marginAuto?: MarginAutoAlignment | MarginAutoAlignment[];
2538
+ /** Whether the "content shrink" is disabled or not. */
2539
+ noShrink?: boolean;
2540
+ /** Flex direction. */
2541
+ orientation?: Orientation;
2542
+ /** Flex vertical alignment. */
2543
+ vAlign?: FlexHorizontalAlignment;
2544
+ /** Whether the "flex wrap" is enabled or not. */
2545
+ wrap?: boolean;
2546
+ /** reference to the root element */
2547
+ ref?: CommonRef;
2548
+ }
2549
+
2550
+ /**
2551
+ * Defines the props of the component.
2552
+ */
2553
+ interface FlexBoxProps extends GenericProps$1, ReactToJSX<FlexBoxProps$1> {
2554
+ /** Customize the root element. */
2555
+ as?: React__default.ElementType;
2556
+ }
2557
+ /**
2558
+ * FlexBox component.
2559
+ *
2560
+ * @param props Component props.
2561
+ * @param ref Component ref.
2562
+ * @return React element.
2563
+ */
2564
+ declare const FlexBox: Comp<FlexBoxProps, HTMLDivElement>;
2565
+
2566
+ /**
2567
+ * Accepted gap sizes for the generic block.
2568
+ */
2569
+ declare const GenericBlockGapSize: Pick<{
2570
+ readonly xxs: "xxs";
2571
+ readonly xs: "xs";
2572
+ readonly s: "s";
2573
+ readonly m: "m";
2574
+ readonly l: "l";
2575
+ readonly xl: "xl";
2576
+ readonly xxl: "xxl";
2577
+ readonly tiny: "tiny";
2578
+ readonly regular: "regular";
2579
+ readonly medium: "medium";
2580
+ readonly big: "big";
2581
+ readonly huge: "huge";
2582
+ }, "big" | "medium" | "tiny" | "regular" | "huge">;
2583
+ type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;
2584
+
2585
+ interface GenericBlockProps$1 extends FlexBoxProps$1 {
2586
+ /**
2587
+ * Component to use as visual element.
2588
+ */
2589
+ figure?: JSXElement;
2590
+ /**
2591
+ * Main content.
2592
+ */
2593
+ content?: JSXElement;
2594
+ /**
2595
+ * Actions to set after the main content.
2596
+ */
2597
+ actions?: JSXElement;
2598
+ /**
2599
+ * Orientation of the 3 sections
2600
+ */
2601
+ orientation?: FlexBoxProps$1['orientation'];
2602
+ /**
2603
+ * Horizontal alignment.
2604
+ */
2605
+ horizontalAlign?: FlexBoxProps$1['hAlign'];
2606
+ /**
2607
+ * Vertical alignment.
2608
+ */
2609
+ verticalAlign?: FlexBoxProps$1['vAlign'];
2610
+ /**
2611
+ * The props to forward to the content.
2612
+ * By default, the content will have the same alignment as wrapper.
2613
+ */
2614
+ contentProps?: Omit<FlexBoxProps$1, 'children'>;
2615
+ /**
2616
+ * props to forward to the actions element.
2617
+ */
2618
+ actionsProps?: Omit<FlexBoxProps$1, 'children'>;
2619
+ /**
2620
+ * props to forward to the figure element.
2621
+ */
2622
+ figureProps?: Omit<FlexBoxProps$1, 'children'>;
2623
+ /**
2624
+ * FlexBox component
2625
+ */
2626
+ FlexBox: (props: FlexBoxProps$1) => any;
2627
+ /**
2628
+ * Gap space between sections.
2629
+ */
2630
+ gap?: GenericBlockGapSize;
2631
+ /**
2632
+ * reference to the root element
2633
+ */
2634
+ ref?: CommonRef;
2635
+ }
2636
+ interface GenericBlockSectionProps$1 extends FlexBoxProps$1 {
2637
+ /**
2638
+ * Gap space between items.
2639
+ */
2640
+ gap?: GenericBlockGapSize;
2641
+ }
2642
+ type GenericBlockPropsToOverride = 'FlexBox' | 'content';
2643
+
2644
+ interface GenericBlockProps extends GenericProps$1, ReactToJSX<GenericBlockProps$1, GenericBlockPropsToOverride> {
2645
+ /**
2646
+ * Main content to display or sections components
2647
+ * ({@see GenericBlock.Figure}, {@see GenericBlock.Content} & {@see GenericBlock.Actions})
2648
+ */
2649
+ children: ReactNode;
2650
+ }
2651
+ interface GenericBlockSectionProps extends GenericProps$1, ReactToJSX<GenericBlockSectionProps$1> {
2652
+ /** Customize the root element. */
2653
+ as?: React__default.ElementType;
2654
+ }
2655
+ type BaseGenericBlock = Comp<GenericBlockProps, HTMLDivElement>;
2656
+ /**
2657
+ * The GenericBlock is a layout component made of 3 sections that can be
2658
+ * displayed either horizontally of vertically with the same gap between each section.
2659
+ *
2660
+ * The sections are:
2661
+ * - `Figure` => A visual element to display before the main content.
2662
+ * - `Content` => The main content displayed
2663
+ * - `Actions` => One or more actions to set after the element.
2664
+ *
2665
+ * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076
2666
+ */
2667
+ declare const BaseGenericBlock: BaseGenericBlock;
2668
+ interface GenericBlock extends BaseGenericBlock {
2669
+ /**
2670
+ * Use `GenericBlock.Figure` component as children of the `GenericBlock` component as an alternative way to inject
2671
+ * the "figure" section of the block (instead of using `figure` and `figureProps` props).
2672
+ */
2673
+ Figure: Comp<GenericBlockSectionProps>;
2674
+ /**
2675
+ * Use `GenericBlock.Content` component as children of the `GenericBlock` component as an alternative way to inject
2676
+ * the "content" section of the block (instead of using `content` and `contentProps` props).
2677
+ */
2678
+ Content: Comp<GenericBlockSectionProps>;
2679
+ /**
2680
+ * Use `GenericBlock.Actions` component as children of the `GenericBlock` component as an alternative way to inject
2681
+ * the "actions" section of the block (instead of using `actions` and `actionsProps` props).
2682
+ */
2683
+ Actions: Comp<GenericBlockSectionProps>;
2684
+ }
2685
+ declare const GenericBlock: GenericBlock;
2686
+
2687
+ /**
2688
+ * Defines the props of the component.
2689
+ */
2690
+ interface HeadingProps$1 extends Partial<TextProps$1> {
2691
+ /**
2692
+ * Display a specific heading level instead of the one provided by parent context provider.
2693
+ */
2694
+ as?: HeadingElement;
2695
+ }
2094
2696
 
2697
+ interface HeadingProps extends GenericProps$1, HeadingProps$1 {
2698
+ }
2095
2699
  /**
2096
- * Defines the props of the component.
2700
+ * Renders a heading component.
2701
+ * Extends the `Text` Component with the heading level automatically computed based on
2702
+ * the current level provided by the context.
2097
2703
  */
2098
- interface ThumbnailProps extends GenericProps$1, ReactToJSX<ThumbnailProps$1, 'loadingState' | 'isAnyDisabled' | 'focusPointStyle' | 'disabledStateProps' | 'badge'> {
2099
- /** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */
2100
- focusPoint?: FocusPoint;
2101
- /** Badge. */
2102
- badge?: ReactElement | Falsy;
2103
- /** On click callback. */
2104
- onClick?: React__default.MouseEventHandler<HTMLDivElement>;
2105
- /** On key press callback. */
2106
- onKeyPress?: React__default.KeyboardEventHandler<HTMLDivElement>;
2704
+ declare const Heading: Comp<HeadingProps, HTMLElement>;
2705
+
2706
+ interface HeadingLevelProviderProps {
2707
+ /** The heading level to start at. If left undefined, the parent context will be used, if any. */
2708
+ level?: number;
2709
+ /** The children to display */
2710
+ children: ReactNode;
2107
2711
  }
2108
2712
  /**
2109
- * Thumbnail component.
2110
- *
2111
- * @param props Component props.
2112
- * @param ref Component ref.
2113
- * @return React element.
2713
+ * Provide a new heading level context.
2114
2714
  */
2115
- declare const Thumbnail: Comp<ThumbnailProps, HTMLElement>;
2715
+ declare const HeadingLevelProvider: React.FC<HeadingLevelProviderProps>;
2116
2716
 
2117
- type ForwardedTextProps = Omit<TextProps, 'as' | 'typography' | 'color' | 'colorVariant'>;
2118
- type ImageCaptionMetadata = {
2119
- /** Image title to display in the caption. */
2120
- title?: string;
2121
- /** Props to pass to the title. */
2122
- titleProps?: ForwardedTextProps;
2123
- /** Image description. Can be either a string, or sanitized html. */
2124
- description?: string | {
2125
- __html: string;
2126
- };
2127
- /** Props to pass to the title. */
2128
- descriptionProps?: ForwardedTextProps;
2129
- /** Tag content. */
2130
- tags?: ReactNode;
2131
- /** Caption custom CSS style. */
2132
- captionStyle?: CSSProperties;
2717
+ declare const useHeadingLevel: () => {
2718
+ level: number;
2719
+ headingElement: _lumx_core_js_types.HeadingElement;
2133
2720
  };
2134
2721
 
2135
- /**
2136
- * Image block variants.
2137
- */
2138
- declare const ImageBlockCaptionPosition: {
2139
- readonly below: "below";
2140
- readonly over: "over";
2141
- };
2142
- type ImageBlockCaptionPosition = ValueOf$1<typeof ImageBlockCaptionPosition>;
2143
- /**
2144
- * Image block sizes.
2145
- */
2146
- type ImageBlockSize = Extract<Size$1, 'xl' | 'xxl'>;
2722
+ type GridGutterSize = Extract<Size$1, 'regular' | 'big' | 'huge'>;
2147
2723
  /**
2148
2724
  * Defines the props of the component.
2149
2725
  */
2150
- interface ImageBlockProps extends GenericProps$1, HasTheme$1, ImageCaptionMetadata {
2151
- /** Action toolbar content. */
2152
- actions?: ReactNode;
2153
- /** Alignment. */
2154
- align?: HorizontalAlignment$1;
2155
- /** Image alternative text. */
2156
- alt: string;
2157
- /** Caption position. */
2158
- captionPosition?: ImageBlockCaptionPosition;
2159
- /** Whether the image has to fill its container height or not. */
2160
- fillHeight?: boolean;
2161
- /** Image URL. */
2162
- image: string;
2163
- /** Size variant. */
2164
- size?: ImageBlockSize;
2165
- /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */
2166
- thumbnailProps?: Omit<ThumbnailProps, 'image' | 'size' | 'theme' | 'align' | 'fillHeight'>;
2726
+ interface GridProps extends GenericProps$1 {
2727
+ /** Orientation. */
2728
+ orientation?: Orientation$1;
2729
+ /** Whether the children are wrapped or not. */
2730
+ wrap?: string;
2731
+ /** Vertical alignment. */
2732
+ vAlign?: Alignment$1;
2733
+ /** Horizontal alignment. */
2734
+ hAlign?: Alignment$1;
2735
+ /** Gutter size. */
2736
+ gutter?: GridGutterSize;
2737
+ /** Children */
2738
+ children?: React.ReactNode;
2167
2739
  }
2168
2740
  /**
2169
- * ImageBlock component.
2741
+ * Grid component.
2170
2742
  *
2171
2743
  * @param props Component props.
2172
2744
  * @param ref Component ref.
2173
2745
  * @return React element.
2174
2746
  */
2175
- declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
2747
+ declare const Grid: Comp<GridProps, HTMLDivElement>;
2176
2748
 
2177
- type InheritedSlideShowProps = Pick<SlideshowProps, 'slideshowControlsProps' | 'slideGroupLabel'>;
2178
- interface ZoomButtonProps {
2179
- /** Zoom in button props */
2180
- zoomInButtonProps?: IconButtonProps;
2181
- /** Zoom out button props */
2182
- zoomOutButtonProps?: IconButtonProps;
2183
- }
2184
- type InheritedThumbnailProps = Pick<ThumbnailProps, 'image' | 'alt' | 'imgProps' | 'imgRef' | 'loadingPlaceholderImageRef'>;
2185
- type InheritedImageMetadata = Pick<ImageCaptionMetadata, 'title' | 'description' | 'tags'>;
2186
- type ImageProps = InheritedThumbnailProps & InheritedImageMetadata;
2187
- interface ImagesProps {
2188
- /** Index of the active image to show on open */
2189
- activeImageIndex?: number;
2190
- /** List of images to display */
2191
- images: Array<ImageProps>;
2192
- /** Ref of the active image when the lightbox is open */
2193
- activeImageRef?: React.Ref<HTMLImageElement>;
2194
- }
2195
- type InheritedLightboxProps = Pick<LightboxProps, 'isOpen' | 'parentElement' | 'onClose' | 'closeButtonProps' | 'aria-label' | 'aria-labelledby'>;
2196
- type ForwardedProps = React.ComponentPropsWithoutRef<'div'>;
2749
+ type Columns = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
2197
2750
  /**
2198
- * ImageLightbox component props
2751
+ * Defines the props of the component.
2199
2752
  */
2200
- interface ImageLightboxProps extends HasClassName$1, ZoomButtonProps, ImagesProps, InheritedSlideShowProps, InheritedLightboxProps, ForwardedProps {
2753
+ interface GridItemProps extends GenericProps$1 {
2754
+ /** Alignment. */
2755
+ align?: Alignment$1;
2756
+ /** Order. */
2757
+ order?: Columns;
2758
+ /** Width. */
2759
+ width?: Columns;
2760
+ /** Children */
2761
+ children?: React.ReactNode;
2201
2762
  }
2202
-
2203
- /** Subset of the ImageLightboxProps managed by the useImageLightbox hook */
2204
- type ManagedProps = Pick<ImageLightboxProps, 'isOpen' | 'images' | 'parentElement' | 'activeImageRef' | 'onClose' | 'activeImageIndex'>;
2205
- type TriggerOptions = Pick<ImageLightboxProps, 'activeImageIndex'>;
2206
- /**
2207
- * Set up an ImageLightbox with images and triggers.
2208
- *
2209
- * - Associate a trigger with the lightbox to properly focus the trigger on close
2210
- * - Associate a trigger with an image to display on open
2211
- * - Automatically provide a view transition between an image trigger and the displayed image on open & close
2212
- *
2213
- * @param props Images to display in the image lightbox
2214
- */
2215
- declare function useImageLightbox<P extends Partial<ImageLightboxProps>>(props: P): {
2216
- /**
2217
- * Generates trigger props
2218
- * @param index Provide an index to choose which image to display when the image lightbox opens.
2219
- * */
2220
- getTriggerProps: (options?: TriggerOptions) => {
2221
- onClick: (ev?: React__default.MouseEvent) => void;
2222
- ref: React__default.Ref<any>;
2223
- };
2224
- /** Props to forward to the ImageLightbox */
2225
- imageLightboxProps: ManagedProps & P;
2226
- };
2227
-
2228
2763
  /**
2229
- * ImageLightbox component.
2764
+ * GridItem component.
2230
2765
  *
2231
2766
  * @param props Component props.
2232
2767
  * @param ref Component ref.
2233
2768
  * @return React element.
2234
2769
  */
2235
- declare const ImageLightbox: Comp<ImageLightboxProps, HTMLDivElement> & {
2236
- useImageLightbox: typeof useImageLightbox;
2237
- };
2770
+ declare const GridItem: Comp<GridItemProps, HTMLDivElement>;
2238
2771
 
2772
+ type GridColumnGapSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
2239
2773
  /**
2240
2774
  * Defines the props of the component.
2241
2775
  */
2242
- interface InlineListProps$1 extends HasClassName {
2243
- /**
2244
- * List items to render.
2245
- */
2246
- items?: JSXElement[];
2247
- /**
2248
- * Text color.
2249
- */
2250
- color?: ColorWithVariants;
2251
- /**
2252
- * Lightened or darkened variant of the selected color.
2253
- */
2254
- colorVariant?: ColorVariant;
2255
- /**
2256
- * Typography variant.
2257
- */
2258
- typography?: Typography;
2259
- /**
2260
- * Activate line wrap on overflow.
2261
- */
2262
- wrap?: boolean;
2776
+ interface GridColumnProps$1 extends HasClassName {
2777
+ /** Customize the root element. */
2778
+ as?: any;
2779
+ /** Children elements. */
2780
+ children?: JSXElement;
2781
+ /** Space between columns and rows. */
2782
+ gap?: GridColumnGapSize;
2783
+ /** Ideal number of columns. */
2784
+ maxColumns?: number;
2785
+ /** Minimum width for each item, reduce the number of column if there is not enough space. */
2786
+ itemMinWidth?: number;
2787
+ /** Custom styles. */
2788
+ style?: any;
2263
2789
  /** reference to the root element */
2264
2790
  ref?: CommonRef;
2265
2791
  }
@@ -2267,379 +2793,527 @@ interface InlineListProps$1 extends HasClassName {
2267
2793
  /**
2268
2794
  * Defines the props of the component.
2269
2795
  */
2270
- interface InlineListProps extends GenericProps$1, ReactToJSX<InlineListProps$1, 'items'> {
2271
- /**
2272
- * Children
2273
- */
2274
- children?: React.ReactNode;
2796
+ interface GridColumnProps extends GenericProps$1, ReactToJSX<GridColumnProps$1> {
2797
+ /** Customize the root element. */
2798
+ as?: React.ElementType;
2275
2799
  }
2800
+
2276
2801
  /**
2277
- * InlineList component.
2802
+ * The GridColumn is a layout component that can display children in a grid
2803
+ * with custom display properties. It also comes with a responsive design,
2804
+ * with a number of column that reduce when there is not enough space for each item.
2278
2805
  *
2279
- * @param props Component props.
2280
- * @param ref Component ref.
2806
+ * @param props Component props.
2807
+ * @param ref Component ref.
2281
2808
  * @return React element.
2282
2809
  */
2283
- declare const InlineList: Comp<InlineListProps, HTMLUListElement>;
2810
+ declare const GridColumn: Comp<GridColumnProps, HTMLElement>;
2284
2811
 
2285
- /**
2286
- * Defines the props of the component.
2287
- */
2288
- interface InputHelperProps$1 extends HasClassName, HasTheme {
2289
- /** Helper content. */
2290
- children: JSXElement;
2291
- /** Helper variant. */
2292
- kind?: Kind;
2293
- /** ref to the root element `p` */
2294
- ref?: CommonRef;
2295
- /** id for the input helper */
2296
- id?: string;
2297
- }
2812
+ declare const ICON_SIZES: ("m" | "s" | "xxs" | "xs" | "l" | "xl" | "xxl")[];
2298
2813
 
2299
- interface InputHelperProps extends ReactToJSX<InputHelperProps$1>, GenericProps$1 {
2300
- }
2814
+ type IconSizes = (typeof ICON_SIZES)[number];
2301
2815
  /**
2302
- * InputHelper component.
2303
- *
2304
- * @param props Component props.
2305
- * @param ref Component ref.
2306
- * @return React element.
2816
+ * Defines the props of the component.
2307
2817
  */
2308
- declare const InputHelper: Comp<InputHelperProps, HTMLParagraphElement>;
2309
-
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 */
2818
+ interface IconProps$1 extends HasClassName, HasTheme {
2819
+ /** Color variant. */
2820
+ color?: ColorWithVariants;
2821
+ /** Lightened or darkened variant of the selected icon color. */
2822
+ colorVariant?: ColorVariant;
2823
+ /** Whether the icon has a shape. */
2824
+ hasShape?: boolean;
2825
+ /**
2826
+ * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).
2827
+ * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
2828
+ */
2829
+ icon: string;
2830
+ /** Size variant. */
2831
+ size?: IconSizes;
2832
+ /** Sets an alternative text on the svg. Will set an `img` role to the svg. */
2833
+ alt?: string;
2834
+ /** Vertical alignment of the icon (only applies for icons nested in Text/Heading). */
2835
+ verticalAlign?: null | 'middle';
2836
+ /** reference to the root element */
2320
2837
  ref?: CommonRef;
2321
2838
  }
2322
2839
 
2323
- interface InputLabelProps extends ReactToJSX<InputLabelProps$1>, GenericProps$1 {
2840
+ interface IconProps extends ReactToJSX<IconProps$1>, GenericProps$1 {
2324
2841
  }
2325
2842
  /**
2326
- * InputLabel component.
2843
+ * Icon component.
2327
2844
  *
2328
2845
  * @param props Component props.
2329
2846
  * @param ref Component ref.
2330
2847
  * @return React element.
2331
2848
  */
2332
- declare const InputLabel: Comp<InputLabelProps, HTMLLabelElement>;
2849
+ declare const Icon: Comp<IconProps, HTMLElement>;
2333
2850
 
2334
2851
  /**
2335
- * Defines the props of the component.
2852
+ * Loading attribute is not yet supported in typescript, so we need
2853
+ * to add it in order to avoid a ts error.
2854
+ * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes
2336
2855
  */
2337
- interface LightboxProps extends GenericProps$1, HasTheme$1, Pick<AriaAttributes$1, 'aria-label' | 'aria-labelledby'> {
2338
- /** Props to pass to the close button (minus those already set by the Lightbox props). */
2339
- closeButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
2340
- /** Whether the component is open or not. */
2341
- isOpen?: boolean;
2342
- /** Reference to the element that triggered modal opening to set focus on. */
2343
- parentElement: RefObject<any>;
2344
- /** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */
2345
- focusElement?: RefObject<HTMLElement>;
2346
- /** Whether to keep the dialog open on clickaway or escape press. */
2347
- preventAutoClose?: boolean;
2348
- /** Z-axis position. */
2349
- zIndex?: number;
2350
- /** On close callback. */
2351
- onClose?(): void;
2352
- /** Children */
2353
- children?: React.ReactNode;
2856
+ declare module 'react' {
2857
+ interface ImgHTMLAttributes<T> extends React.HTMLAttributes<T> {
2858
+ loading?: 'eager' | 'lazy';
2859
+ }
2354
2860
  }
2355
2861
  /**
2356
- * Lightbox component.
2357
- *
2358
- * @param props Component props.
2359
- * @param ref Component ref.
2360
- * @return React element.
2862
+ * Thumbnail sizes.
2361
2863
  */
2362
- declare const Lightbox: Comp<LightboxProps, HTMLDivElement>;
2864
+ type ThumbnailSize$1 = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
2865
+ /**
2866
+ * Thumbnail variants.
2867
+ */
2868
+ declare const ThumbnailVariant$1: {
2869
+ readonly squared: "squared";
2870
+ readonly rounded: "rounded";
2871
+ };
2872
+ type ThumbnailVariant$1 = ValueOf<typeof ThumbnailVariant$1>;
2873
+ /**
2874
+ * Thumbnail object fit.
2875
+ */
2876
+ declare const ThumbnailObjectFit$1: {
2877
+ readonly cover: "cover";
2878
+ readonly contain: "contain";
2879
+ };
2880
+ type ThumbnailObjectFit$1 = ValueOf<typeof ThumbnailObjectFit$1>;
2363
2881
 
2882
+ type ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;
2364
2883
  /**
2365
2884
  * Defines the props of the component.
2366
2885
  */
2367
- interface LinkProps$1 extends HasClassName, HasAriaDisabled, HasDisabled {
2368
- /** Children content */
2369
- children?: JSXElement;
2370
- /** Color variant. */
2371
- color?: ColorWithVariants;
2372
- /** Lightened or darkened variant of the selected icon color. */
2373
- colorVariant?: ColorVariant;
2374
- /** Link href. */
2375
- href?: string;
2376
- /** Whether the component is disabled or not. */
2377
- isDisabled?: boolean;
2378
- /** Custom element/component for the link. */
2379
- linkAs?: string | any;
2380
- /** Click handler (framework wrappers convert onClick to handleClick). */
2886
+ interface ThumbnailProps$1 extends HasTheme$1, HasClassName$1 {
2887
+ /** Alignment of the thumbnail in it's parent (requires flex parent). */
2888
+ align?: HorizontalAlignment$1;
2889
+ /** Image alternative text. */
2890
+ alt: string;
2891
+ /** Image aspect ratio. */
2892
+ aspectRatio?: AspectRatio$1;
2893
+ /** Badge. */
2894
+ badge?: JSXElement$1;
2895
+ /** Image cross origin resource policy. */
2896
+ crossOrigin?: ImgHTMLProps['crossOrigin'];
2897
+ /** Fallback icon (SVG path) or react node when image fails to load. */
2898
+ fallback?: string | JSXElement$1;
2899
+ /** Whether the thumbnail should fill it's parent size (requires flex parent) or not. */
2900
+ fillHeight?: boolean;
2901
+ /** Image URL. */
2902
+ image: string;
2903
+ loadingState: string;
2904
+ /** Props to inject into the native <img> element. */
2905
+ imgProps?: ImgHTMLProps;
2906
+ /** Reference to the native <img> element. */
2907
+ imgRef?: CommonRef$1;
2908
+ ref?: CommonRef$1;
2909
+ /** Set to true to force the display of the loading skeleton. */
2910
+ isLoading?: boolean;
2911
+ /** Set how the image should fit when its aspect ratio is constrained */
2912
+ objectFit?: ThumbnailObjectFit$1;
2913
+ /** Size variant of the component. */
2914
+ size?: ThumbnailSize$1;
2915
+ /** Image loading mode. */
2916
+ loading?: 'eager' | 'lazy';
2917
+ /** Ref of an existing placeholder image to display while loading. */
2918
+ loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement>;
2919
+ /** On click callback. */
2381
2920
  handleClick?: (event: any) => void;
2382
- /** Link target. */
2383
- target?: string;
2384
- /** Typography variant. */
2385
- typography?: Typography;
2386
- /** Element ref. */
2387
- ref?: CommonRef;
2921
+ /** On key press callback. */
2922
+ handleKeyPress?: (event: any) => void;
2923
+ /** Variant of the component. */
2924
+ variant?: ThumbnailVariant$1;
2925
+ /** Props to pass to the link wrapping the thumbnail. */
2926
+ linkProps?: GenericProps$1;
2927
+ focusPointStyle?: GenericProps$1;
2928
+ disabledStateProps?: GenericProps$1;
2929
+ isAnyDisabled?: boolean;
2930
+ /** Custom react component for the link (can be used to inject react router Link). */
2931
+ linkAs?: 'a' | any;
2932
+ 'aria-label'?: string;
2933
+ }
2934
+
2935
+ /**
2936
+ * Focal point using vertical alignment, horizontal alignment or coordinates (from -1 to 1).
2937
+ */
2938
+ type FocusPoint = {
2939
+ x?: number;
2940
+ y?: number;
2941
+ };
2942
+ /**
2943
+ * Loading attribute is not yet supported in typescript, so we need
2944
+ * to add it in order to avoid a ts error.
2945
+ * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes
2946
+ */
2947
+ declare module 'react' {
2948
+ interface ImgHTMLAttributes<T> extends React__default.HTMLAttributes<T> {
2949
+ loading?: 'eager' | 'lazy';
2950
+ }
2388
2951
  }
2952
+ /**
2953
+ * All available aspect ratios.
2954
+ * @deprecated
2955
+ */
2956
+ declare const ThumbnailAspectRatio: Record<string, AspectRatio$1>;
2957
+ /**
2958
+ * Thumbnail sizes.
2959
+ */
2960
+ type ThumbnailSize = Extract<Size$1, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
2961
+ /**
2962
+ * Thumbnail variants.
2963
+ */
2964
+ declare const ThumbnailVariant: {
2965
+ readonly squared: "squared";
2966
+ readonly rounded: "rounded";
2967
+ };
2968
+ type ThumbnailVariant = ValueOf$1<typeof ThumbnailVariant>;
2969
+ /**
2970
+ * Thumbnail object fit.
2971
+ */
2972
+ declare const ThumbnailObjectFit: {
2973
+ readonly cover: "cover";
2974
+ readonly contain: "contain";
2975
+ };
2976
+ type ThumbnailObjectFit = ValueOf$1<typeof ThumbnailObjectFit>;
2389
2977
 
2390
2978
  /**
2391
2979
  * Defines the props of the component.
2392
2980
  */
2393
- interface LinkProps extends GenericProps$1, ReactToJSX<LinkProps$1> {
2394
- /**
2395
- * Left icon (SVG path).
2396
- * @deprecated Instead, simply nest `<Icon />` in the children
2397
- */
2398
- leftIcon?: string;
2399
- /** Click handler. */
2400
- onClick?: (event: React.MouseEvent) => void;
2401
- /**
2402
- * Right icon (SVG path).
2403
- * @deprecated Instead, simply nest `<Icon />` in the children
2404
- */
2405
- rightIcon?: string;
2406
- /** Children */
2407
- children?: React.ReactNode;
2981
+ interface ThumbnailProps extends GenericProps$1, ReactToJSX<ThumbnailProps$1, 'loadingState' | 'isAnyDisabled' | 'focusPointStyle' | 'disabledStateProps' | 'badge'> {
2982
+ /** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */
2983
+ focusPoint?: FocusPoint;
2984
+ /** Badge. */
2985
+ badge?: ReactElement | Falsy;
2986
+ /** On click callback. */
2987
+ onClick?: React__default.MouseEventHandler<HTMLDivElement>;
2988
+ /** On key press callback. */
2989
+ onKeyPress?: React__default.KeyboardEventHandler<HTMLDivElement>;
2408
2990
  }
2409
2991
  /**
2410
- * Link component.
2992
+ * Thumbnail component.
2411
2993
  *
2412
2994
  * @param props Component props.
2413
2995
  * @param ref Component ref.
2414
2996
  * @return React element.
2415
2997
  */
2416
- declare const Link: Comp<LinkProps, HTMLButtonElement | HTMLAnchorElement>;
2998
+ declare const Thumbnail: Comp<ThumbnailProps, HTMLElement>;
2999
+
3000
+ type ForwardedTextProps = Omit<TextProps, 'as' | 'typography' | 'color' | 'colorVariant'>;
3001
+ type ImageCaptionMetadata = {
3002
+ /** Image title to display in the caption. */
3003
+ title?: string;
3004
+ /** Props to pass to the title. */
3005
+ titleProps?: ForwardedTextProps;
3006
+ /** Image description. Can be either a string, or sanitized html. */
3007
+ description?: string | {
3008
+ __html: string;
3009
+ };
3010
+ /** Props to pass to the title. */
3011
+ descriptionProps?: ForwardedTextProps;
3012
+ /** Tag content. */
3013
+ tags?: ReactNode;
3014
+ /** Caption custom CSS style. */
3015
+ captionStyle?: CSSProperties;
3016
+ };
2417
3017
 
3018
+ /**
3019
+ * Image block variants.
3020
+ */
3021
+ declare const ImageBlockCaptionPosition: {
3022
+ readonly below: "below";
3023
+ readonly over: "over";
3024
+ };
3025
+ type ImageBlockCaptionPosition = ValueOf$1<typeof ImageBlockCaptionPosition>;
3026
+ /**
3027
+ * Image block sizes.
3028
+ */
3029
+ type ImageBlockSize = Extract<Size$1, 'xl' | 'xxl'>;
2418
3030
  /**
2419
3031
  * Defines the props of the component.
2420
3032
  */
2421
- interface LinkPreviewProps extends GenericProps$1, HasTheme$1 {
2422
- /** Description. */
2423
- description?: string;
2424
- /** Link URL. */
2425
- link: string;
2426
- /** Custom react component for the link (can be used to inject react router Link). */
2427
- linkAs?: 'a' | any;
2428
- /** Props to pass to the link (minus those already set by the LinkPreview props). */
2429
- linkProps?: Omit<LinkProps, 'color' | 'colorVariant' | 'href' | 'target'>;
3033
+ interface ImageBlockProps extends GenericProps$1, HasTheme$1, ImageCaptionMetadata {
3034
+ /** Action toolbar content. */
3035
+ actions?: ReactNode;
3036
+ /** Alignment. */
3037
+ align?: HorizontalAlignment$1;
3038
+ /** Image alternative text. */
3039
+ alt: string;
3040
+ /** Caption position. */
3041
+ captionPosition?: ImageBlockCaptionPosition;
3042
+ /** Whether the image has to fill its container height or not. */
3043
+ fillHeight?: boolean;
3044
+ /** Image URL. */
3045
+ image: string;
2430
3046
  /** Size variant. */
2431
- size?: Extract<Size$1, 'regular' | 'big'>;
2432
- /** Thumbnail for the link preview. */
2433
- thumbnailProps?: ThumbnailProps;
2434
- /** Title. */
2435
- title?: string;
2436
- /** Customize the title heading tag. */
2437
- titleHeading?: HeadingElement$1;
3047
+ size?: ImageBlockSize;
3048
+ /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */
3049
+ thumbnailProps?: Omit<ThumbnailProps, 'image' | 'size' | 'theme' | 'align' | 'fillHeight'>;
2438
3050
  }
2439
3051
  /**
2440
- * LinkPreview component.
3052
+ * ImageBlock component.
2441
3053
  *
2442
3054
  * @param props Component props.
2443
3055
  * @param ref Component ref.
2444
3056
  * @return React element.
2445
3057
  */
2446
- declare const LinkPreview: Comp<LinkPreviewProps, HTMLDivElement>;
3058
+ declare const ImageBlock: Comp<ImageBlockProps, HTMLDivElement>;
2447
3059
 
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;
3060
+ type InheritedSlideShowProps = Pick<SlideshowProps, 'slideshowControlsProps' | 'slideGroupLabel'>;
3061
+ interface ZoomButtonProps {
3062
+ /** Zoom in button props */
3063
+ zoomInButtonProps?: IconButtonProps;
3064
+ /** Zoom out button props */
3065
+ zoomOutButtonProps?: IconButtonProps;
2458
3066
  }
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'>;
3067
+ type InheritedThumbnailProps = Pick<ThumbnailProps, 'image' | 'alt' | 'imgProps' | 'imgRef' | 'loadingPlaceholderImageRef'>;
3068
+ type InheritedImageMetadata = Pick<ImageCaptionMetadata, 'title' | 'description' | 'tags'>;
3069
+ type ImageProps = InheritedThumbnailProps & InheritedImageMetadata;
3070
+ interface ImagesProps {
3071
+ /** Index of the active image to show on open */
3072
+ activeImageIndex?: number;
3073
+ /** List of images to display */
3074
+ images: Array<ImageProps>;
3075
+ /** Ref of the active image when the lightbox is open */
3076
+ activeImageRef?: React.Ref<HTMLImageElement>;
3077
+ }
3078
+ type InheritedLightboxProps = Pick<LightboxProps, 'isOpen' | 'parentElement' | 'onClose' | 'closeButtonProps' | 'aria-label' | 'aria-labelledby'>;
3079
+ type ForwardedProps = React.ComponentPropsWithoutRef<'div'>;
2463
3080
  /**
2464
- * Defines the props of the component.
3081
+ * ImageLightbox component props
2465
3082
  */
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;
3083
+ interface ImageLightboxProps extends HasClassName$1, ZoomButtonProps, ImagesProps, InheritedSlideShowProps, InheritedLightboxProps, ForwardedProps {
2473
3084
  }
2474
3085
 
3086
+ /** Subset of the ImageLightboxProps managed by the useImageLightbox hook */
3087
+ type ManagedProps = Pick<ImageLightboxProps, 'isOpen' | 'images' | 'parentElement' | 'activeImageRef' | 'onClose' | 'activeImageIndex'>;
3088
+ type TriggerOptions = Pick<ImageLightboxProps, 'activeImageIndex'>;
2475
3089
  /**
2476
- * Defines the props of the component.
3090
+ * Set up an ImageLightbox with images and triggers.
3091
+ *
3092
+ * - Associate a trigger with the lightbox to properly focus the trigger on close
3093
+ * - Associate a trigger with an image to display on open
3094
+ * - Automatically provide a view transition between an image trigger and the displayed image on open & close
3095
+ *
3096
+ * @param props Images to display in the image lightbox
2477
3097
  */
2478
- interface ListProps extends GenericProps$1, ReactToJSX<ListProps$1> {
3098
+ declare function useImageLightbox<P extends Partial<ImageLightboxProps>>(props: P): {
2479
3099
  /**
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;
3100
+ * Generates trigger props
3101
+ * @param index Provide an index to choose which image to display when the image lightbox opens.
3102
+ * */
3103
+ getTriggerProps: (options?: TriggerOptions) => {
3104
+ onClick: (ev?: React__default.MouseEvent) => void;
3105
+ ref: React__default.Ref<any>;
3106
+ };
3107
+ /** Props to forward to the ImageLightbox */
3108
+ imageLightboxProps: ManagedProps & P;
2491
3109
  };
2492
3110
 
2493
3111
  /**
2494
- * ListItemAction props.
3112
+ * ImageLightbox component.
3113
+ *
3114
+ * @param props Component props.
3115
+ * @param ref Component ref.
3116
+ * @return React element.
2495
3117
  */
2496
- type ListItemActionProps<E extends ClickableElement = 'button'> = RawClickableProps<E> & HasClassName;
3118
+ declare const ImageLightbox: Comp<ImageLightboxProps, HTMLDivElement> & {
3119
+ useImageLightbox: typeof useImageLightbox;
3120
+ };
2497
3121
 
2498
- /** ListItem size variants. */
2499
- type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
2500
3122
  /**
2501
3123
  * Defines the props of the component.
2502
3124
  */
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 */
3125
+ interface InlineListProps$1 extends HasClassName {
3126
+ /**
3127
+ * List items to render.
3128
+ */
3129
+ items?: JSXElement[];
3130
+ /**
3131
+ * Text color.
3132
+ */
3133
+ color?: ColorWithVariants;
3134
+ /**
3135
+ * Lightened or darkened variant of the selected color.
3136
+ */
3137
+ colorVariant?: ColorVariant;
3138
+ /**
3139
+ * Typography variant.
3140
+ */
3141
+ typography?: Typography;
3142
+ /**
3143
+ * Activate line wrap on overflow.
3144
+ */
3145
+ wrap?: boolean;
3146
+ /** reference to the root element */
2525
3147
  ref?: CommonRef;
2526
- /** On click callback. */
2527
- handleClick?: (event: any) => void;
2528
3148
  }
2529
- type ListItemPropsToOverride = 'after' | 'before' | 'children' | 'handleClick';
2530
3149
 
2531
3150
  /**
2532
3151
  * Defines the props of the component.
2533
3152
  */
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;
3153
+ interface InlineListProps extends GenericProps$1, ReactToJSX<InlineListProps$1, 'items'> {
3154
+ /**
3155
+ * Children
3156
+ */
3157
+ children?: React.ReactNode;
2549
3158
  }
2550
3159
  /**
2551
- * ListItem component with Action sub-component.
3160
+ * InlineList component.
3161
+ *
3162
+ * @param props Component props.
3163
+ * @param ref Component ref.
3164
+ * @return React element.
2552
3165
  */
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
- };
3166
+ declare const InlineList: Comp<InlineListProps, HTMLUListElement>;
2568
3167
 
2569
3168
  /**
2570
3169
  * Defines the props of the component.
2571
3170
  */
2572
- interface ListDividerProps$1 extends HasClassName {
2573
- /** ref to the root element */
3171
+ interface InputHelperProps$1 extends HasClassName, HasTheme {
3172
+ /** Helper content. */
3173
+ children: JSXElement;
3174
+ /** Helper variant. */
3175
+ kind?: Kind;
3176
+ /** ref to the root element `p` */
2574
3177
  ref?: CommonRef;
3178
+ /** id for the input helper */
3179
+ id?: string;
2575
3180
  }
2576
3181
 
3182
+ interface InputHelperProps extends ReactToJSX<InputHelperProps$1>, GenericProps$1 {
3183
+ }
2577
3184
  /**
2578
- * Defines the props of the component.
3185
+ * InputHelper component.
3186
+ *
3187
+ * @param props Component props.
3188
+ * @param ref Component ref.
3189
+ * @return React element.
2579
3190
  */
2580
- type ListDividerProps = GenericProps$1 & ReactToJSX<ListDividerProps$1>;
3191
+ declare const InputHelper: Comp<InputHelperProps, HTMLParagraphElement>;
3192
+
3193
+ interface InputLabelProps extends ReactToJSX<InputLabelProps$1>, GenericProps$1 {
3194
+ }
2581
3195
  /**
2582
- * ListDivider component.
2583
- * Purely decorative, consider a `ListSection` with label for a better list structure.
3196
+ * InputLabel component.
2584
3197
  *
2585
3198
  * @param props Component props.
2586
3199
  * @param ref Component ref.
2587
3200
  * @return React element.
2588
3201
  */
2589
- declare const ListDivider: Comp<ListDividerProps, HTMLLIElement>;
3202
+ declare const InputLabel: Comp<InputLabelProps, HTMLLabelElement>;
2590
3203
 
2591
3204
  /**
2592
3205
  * Defines the props of the component.
2593
3206
  */
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 */
3207
+ interface LightboxProps extends GenericProps$1, HasTheme$1, Pick<AriaAttributes$1, 'aria-label' | 'aria-labelledby'> {
3208
+ /** Props to pass to the close button (minus those already set by the Lightbox props). */
3209
+ closeButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
3210
+ /** Whether the component is open or not. */
3211
+ isOpen?: boolean;
3212
+ /** Reference to the element that triggered modal opening to set focus on. */
3213
+ parentElement: RefObject<any>;
3214
+ /** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */
3215
+ focusElement?: RefObject<HTMLElement>;
3216
+ /** Whether to keep the dialog open on clickaway or escape press. */
3217
+ preventAutoClose?: boolean;
3218
+ /** Z-axis position. */
3219
+ zIndex?: number;
3220
+ /** On close callback. */
3221
+ onClose?(): void;
3222
+ /** Children */
3223
+ children?: React.ReactNode;
3224
+ }
3225
+ /**
3226
+ * Lightbox component.
3227
+ *
3228
+ * @param props Component props.
3229
+ * @param ref Component ref.
3230
+ * @return React element.
3231
+ */
3232
+ declare const Lightbox: Comp<LightboxProps, HTMLDivElement>;
3233
+
3234
+ /**
3235
+ * Defines the props of the component.
3236
+ */
3237
+ interface LinkProps$1 extends HasClassName, HasAriaDisabled, HasDisabled {
3238
+ /** Children content */
3239
+ children?: JSXElement;
3240
+ /** Color variant. */
3241
+ color?: ColorWithVariants;
3242
+ /** Lightened or darkened variant of the selected icon color. */
3243
+ colorVariant?: ColorVariant;
3244
+ /** Link href. */
3245
+ href?: string;
3246
+ /** Whether the component is disabled or not. */
3247
+ isDisabled?: boolean;
3248
+ /** Custom element/component for the link. */
3249
+ linkAs?: string | any;
3250
+ /** Click handler (framework wrappers convert onClick to handleClick). */
3251
+ handleClick?: (event: any) => void;
3252
+ /** Link target. */
3253
+ target?: string;
3254
+ /** Typography variant. */
3255
+ typography?: Typography;
3256
+ /** Element ref. */
2606
3257
  ref?: CommonRef;
2607
- /** Text component to use for rendering the label */
2608
- Text: (props: TextProps$1 & Record<string, any>) => any;
2609
3258
  }
2610
3259
 
2611
3260
  /**
2612
3261
  * Defines the props of the component.
2613
3262
  */
2614
- interface ListSectionProps extends GenericProps$1, ReactToJSX<ListSectionProps$1, 'children' | 'id' | 'Text'> {
2615
- /** Section content */
2616
- children: ReactNode;
3263
+ interface LinkProps extends GenericProps$1, ReactToJSX<LinkProps$1> {
3264
+ /**
3265
+ * Left icon (SVG path).
3266
+ * @deprecated Instead, simply nest `<Icon />` in the children
3267
+ */
3268
+ leftIcon?: string;
3269
+ /** Click handler. */
3270
+ onClick?: (event: React.MouseEvent) => void;
3271
+ /**
3272
+ * Right icon (SVG path).
3273
+ * @deprecated Instead, simply nest `<Icon />` in the children
3274
+ */
3275
+ rightIcon?: string;
3276
+ /** Children */
3277
+ children?: React.ReactNode;
2617
3278
  }
2618
3279
  /**
2619
- * ListSection component.
3280
+ * Link component.
2620
3281
  *
2621
3282
  * @param props Component props.
2622
3283
  * @param ref Component ref.
2623
3284
  * @return React element.
2624
3285
  */
2625
- declare const ListSection: Comp<ListSectionProps, HTMLLIElement>;
3286
+ declare const Link: Comp<LinkProps, HTMLButtonElement | HTMLAnchorElement>;
2626
3287
 
2627
3288
  /**
2628
3289
  * Defines the props of the component.
2629
3290
  */
2630
- interface ListSubheaderProps extends GenericProps$1 {
2631
- /** Content. */
2632
- children: string | ReactNode;
3291
+ interface LinkPreviewProps extends GenericProps$1, HasTheme$1 {
3292
+ /** Description. */
3293
+ description?: string;
3294
+ /** Link URL. */
3295
+ link: string;
3296
+ /** Custom react component for the link (can be used to inject react router Link). */
3297
+ linkAs?: 'a' | any;
3298
+ /** Props to pass to the link (minus those already set by the LinkPreview props). */
3299
+ linkProps?: Omit<LinkProps, 'color' | 'colorVariant' | 'href' | 'target'>;
3300
+ /** Size variant. */
3301
+ size?: Extract<Size$1, 'regular' | 'big'>;
3302
+ /** Thumbnail for the link preview. */
3303
+ thumbnailProps?: ThumbnailProps;
3304
+ /** Title. */
3305
+ title?: string;
3306
+ /** Customize the title heading tag. */
3307
+ titleHeading?: HeadingElement$1;
2633
3308
  }
2634
3309
  /**
2635
- * ListSubheader component.
2636
- * @deprecated ListSubheader produces improper list structure. use ListSection instead.
3310
+ * LinkPreview component.
2637
3311
  *
2638
3312
  * @param props Component props.
2639
3313
  * @param ref Component ref.
2640
3314
  * @return React element.
2641
3315
  */
2642
- declare const ListSubheader: Comp<ListSubheaderProps, HTMLLIElement>;
3316
+ declare const LinkPreview: Comp<LinkPreviewProps, HTMLDivElement>;
2643
3317
 
2644
3318
  /**
2645
3319
  * Defines the props of the component.
@@ -3955,149 +4629,6 @@ interface TextProps extends ReactToJSX<TextProps$1>, GenericProps$1 {
3955
4629
  */
3956
4630
  declare const Text: Comp<TextProps, HTMLElement>;
3957
4631
 
3958
- /**
3959
- * Defines the props of the component.
3960
- */
3961
- interface TextFieldProps$1 extends HasClassName, HasTheme, HasAriaDisabled, HasDisabled {
3962
- /** Chip Group to be rendered before the main text input. */
3963
- chips?: JSXElement;
3964
- /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
3965
- clearButtonProps?: GenericProps;
3966
- /** Error message. */
3967
- error?: string | JSXElement;
3968
- /** Whether we force the focus style or not. */
3969
- forceFocusStyle?: boolean;
3970
- /** Whether the text field is displayed with error style or not. */
3971
- hasError?: boolean;
3972
- /** Additional element to put at the end of the text field. */
3973
- afterElement?: JSXElement;
3974
- /** Helper text. */
3975
- helper?: string | JSXElement;
3976
- /** Icon (SVG path). */
3977
- icon?: string;
3978
- /** Native input id property (generated if not provided to link the label element). */
3979
- id?: string;
3980
- /** Generated helper id for accessibility attributes. */
3981
- helperId?: string;
3982
- /** Generated error id for accessibility attributes. */
3983
- errorId?: string;
3984
- /** Whether the component is required or not. */
3985
- isRequired?: boolean;
3986
- /** Whether the text field is displayed with valid style or not. */
3987
- isValid?: boolean;
3988
- /** Label text. */
3989
- label?: string;
3990
- /** Additional label props. */
3991
- labelProps?: InputLabelProps$1;
3992
- /** Max string length the input accepts (constrains the input and displays a character counter). */
3993
- maxLength?: number;
3994
- /** Whether the text field is a textarea or an input. */
3995
- multiline?: boolean;
3996
- /** Placeholder text. */
3997
- placeholder?: string;
3998
- /** Reference to the wrapper. */
3999
- textFieldRef?: CommonRef;
4000
- /** Value. */
4001
- value?: string;
4002
- /** Whether any part is disabled. */
4003
- isAnyDisabled?: boolean;
4004
- /** The input element (input or textarea). */
4005
- input: JSXElement;
4006
- /** Whether the input is focused. */
4007
- isFocus?: boolean;
4008
- /** IconButton component. */
4009
- IconButton: (props: Record<string, any>) => any;
4010
- /** Ref to the component root. */
4011
- ref?: CommonRef;
4012
- }
4013
- type TextFieldPropsToOverride = 'input' | 'IconButton' | 'labelProps' | 'textFieldRef' | 'clearButtonProps' | 'helperId' | 'errorId' | 'isAnyDisabled' | 'isFocus';
4014
-
4015
- /**
4016
- * Defines the props of the component.
4017
- */
4018
- interface TextFieldProps extends GenericProps$1, ReactToJSX<TextFieldProps$1, TextFieldPropsToOverride> {
4019
- /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */
4020
- clearButtonProps?: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis'>;
4021
- /** Reference to the <input> or <textarea> element. */
4022
- inputRef?: Ref<HTMLInputElement | HTMLTextAreaElement>;
4023
- /** Additional label props. */
4024
- labelProps?: InputLabelProps;
4025
- /** Minimum number of rows displayed in multiline mode (requires `multiline` to be enabled). */
4026
- minimumRows?: number;
4027
- /** Native input name property. */
4028
- name?: string;
4029
- /** Reference to the wrapper. */
4030
- textFieldRef?: Ref<HTMLDivElement>;
4031
- /** Native input type (only when `multiline` is disabled). */
4032
- type?: React.ComponentProps<'input'>['type'];
4033
- /** On blur callback. */
4034
- onBlur?(event: React.FocusEvent): void;
4035
- /** On change callback. */
4036
- onChange(value: string, name?: string, event?: SyntheticEvent): void;
4037
- /** On clear callback. */
4038
- onClear?(event?: SyntheticEvent): void;
4039
- /** On focus callback. */
4040
- onFocus?(event: React.FocusEvent): void;
4041
- }
4042
- /**
4043
- * TextField component.
4044
- *
4045
- * @param props Component props.
4046
- * @param ref Component ref.
4047
- * @return React element.
4048
- */
4049
- declare const TextField: Comp<TextFieldProps, HTMLDivElement>;
4050
-
4051
- /**
4052
- * Defines the props of the component.
4053
- */
4054
- interface RawInputTextProps$1 extends HasTheme, HasClassName {
4055
- value?: string;
4056
- type?: HTMLInputTypeAttribute;
4057
- name?: string | undefined;
4058
- ref?: CommonRef;
4059
- handleChange?: (value: string, name?: string, event?: any) => void;
4060
- }
4061
-
4062
- type NativeInputProps = Omit<ComponentProps<'input'>, 'value' | 'onChange'>;
4063
- /**
4064
- * Defines the props of the component.
4065
- */
4066
- interface RawInputTextProps extends NativeInputProps, ReactToJSX<RawInputTextProps$1> {
4067
- onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
4068
- }
4069
-
4070
- /**
4071
- * Raw input text component
4072
- * (input element without any decoration)
4073
- */
4074
- declare const RawInputText: Comp<RawInputTextProps, HTMLInputElement>;
4075
-
4076
- /**
4077
- * Defines the props of the component.
4078
- */
4079
- interface RawInputTextareaProps$1 extends HasTheme, HasClassName {
4080
- value?: string;
4081
- rows?: number;
4082
- name?: string | undefined;
4083
- ref?: CommonRef;
4084
- handleChange?: (value: string, name?: string, event?: any) => void;
4085
- }
4086
-
4087
- type NativeTextareaProps = Omit<ComponentProps<'textarea'>, 'value' | 'onChange'>;
4088
- /**
4089
- * Defines the props of the component.
4090
- */
4091
- interface RawInputTextareaProps extends NativeTextareaProps, ReactToJSX<RawInputTextareaProps$1, 'rows'> {
4092
- minimumRows?: number;
4093
- onChange?: (value: string, name?: string, event?: SyntheticEvent) => void;
4094
- }
4095
- /**
4096
- * Raw input text area component
4097
- * (textarea element without any decoration)
4098
- */
4099
- declare const RawInputTextarea: Comp<Omit<RawInputTextareaProps, "type">, HTMLTextAreaElement>;
4100
-
4101
4632
  declare const useFocusPointStyle: ({ image, aspectRatio, focusPoint, imgProps: { width, height } }: ThumbnailProps, element: HTMLImageElement | undefined, isLoaded: boolean) => CSSProperties;
4102
4633
 
4103
4634
  /**
@@ -4134,44 +4665,6 @@ interface ToolbarProps extends GenericProps$1, ReactToJSX<ToolbarProps$1> {
4134
4665
  */
4135
4666
  declare const Toolbar: Comp<ToolbarProps, HTMLDivElement>;
4136
4667
 
4137
- declare const ARIA_LINK_MODES: readonly ["aria-describedby", "aria-labelledby"];
4138
-
4139
- /** Position of the tooltip relative to the anchor element. */
4140
- type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
4141
- /**
4142
- * Framework-agnostic tooltip props (shared between React and Vue wrappers).
4143
- */
4144
- interface TooltipProps$1 extends HasCloseMode {
4145
- /** Delay (in ms) before closing the tooltip. */
4146
- delay?: number;
4147
- /** Whether the tooltip is displayed even without the mouse hovering the anchor. */
4148
- forceOpen?: boolean;
4149
- /** Label text. */
4150
- label?: string | null | false;
4151
- /** Placement of the tooltip relative to the anchor. */
4152
- placement?: TooltipPlacement;
4153
- /** Choose how the tooltip text should link to the anchor */
4154
- ariaLinkMode?: (typeof ARIA_LINK_MODES)[number];
4155
- /** Z-index for the tooltip */
4156
- zIndex?: number;
4157
- }
4158
-
4159
- /**
4160
- * Defines the props of the component.
4161
- */
4162
- interface TooltipProps extends GenericProps$1, TooltipProps$1 {
4163
- /** Anchor (element on which we activate the tooltip). */
4164
- children: ReactNode;
4165
- }
4166
- /**
4167
- * Tooltip component.
4168
- *
4169
- * @param props Component props.
4170
- * @param ref Component ref.
4171
- * @return React element.
4172
- */
4173
- declare const Tooltip: Comp<TooltipProps, HTMLDivElement>;
4174
-
4175
4668
  /**
4176
4669
  * Uploader variants.
4177
4670
  */
@@ -4392,5 +4885,5 @@ declare const ThemeProvider: React__default.FC<{
4392
4885
  /** Get the theme in the current context. */
4393
4886
  declare function useTheme(): ThemeContextValue;
4394
4887
 
4395
- 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 };
4396
- 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 };
4888
+ 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 };
4889
+ 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 };