@lumx/react 4.9.0-alpha.2 → 4.9.0-alpha.3

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.
Files changed (4) hide show
  1. package/index.d.ts +116 -23
  2. package/index.js +403 -143
  3. package/index.js.map +1 -1
  4. package/package.json +3 -3
package/index.d.ts CHANGED
@@ -1268,8 +1268,8 @@ interface TextProps$1 extends HasClassName {
1268
1268
  * Defines the props of the component.
1269
1269
  */
1270
1270
  interface ListSectionProps$1 extends HasClassName {
1271
- /** Section label displayed as the group title. */
1272
- label?: string;
1271
+ /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */
1272
+ label?: string | JSXElement;
1273
1273
  /** Section icon */
1274
1274
  icon?: string;
1275
1275
  /** List items (should be ListItem, ListDivider, etc.). */
@@ -1362,6 +1362,12 @@ interface ComboboxStateProps$1 {
1362
1362
  * Used to suppress false "empty" state while data is loading.
1363
1363
  */
1364
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;
1365
1371
  };
1366
1372
  }
1367
1373
 
@@ -1377,8 +1383,8 @@ interface ComboboxStateProps extends ReactToJSX<ComboboxStateProps$1, 'state'> {
1377
1383
  * Defines the props for the core ComboboxSection template.
1378
1384
  */
1379
1385
  interface ComboboxSectionProps$1 extends HasClassName {
1380
- /** Section label displayed as the group title. */
1381
- label?: string;
1386
+ /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */
1387
+ label?: string | JSXElement;
1382
1388
  /** Section icon */
1383
1389
  icon?: string;
1384
1390
  /** Section content (should be ComboboxOption elements). */
@@ -1573,6 +1579,12 @@ interface ComboboxOptionSkeletonProps$1 extends HasClassName {
1573
1579
  children?: JSXElement;
1574
1580
  /** ref to the root <li> element. */
1575
1581
  ref?: CommonRef;
1582
+ /**
1583
+ * Number of skeleton `<li>` elements to render.
1584
+ * Each is an independent element with `:nth-child` width cycling applied by SCSS.
1585
+ * @default 1
1586
+ */
1587
+ count?: number;
1576
1588
  }
1577
1589
  /**
1578
1590
  * Props that React/Vue wrappers need to re-declare with framework-specific types.
@@ -1590,12 +1602,6 @@ interface ComboboxOptionSkeletonProps extends GenericProps$1, ReactToJSX<Combobo
1590
1602
  after?: ReactNode;
1591
1603
  /** Override the default SkeletonTypography content entirely. */
1592
1604
  children?: ReactNode;
1593
- /**
1594
- * Number of skeleton `<li>` elements to render.
1595
- * Each is an independent element with `:nth-child` width cycling applied by SCSS.
1596
- * @default 1
1597
- */
1598
- count?: number;
1599
1605
  }
1600
1606
 
1601
1607
  /**
@@ -2061,7 +2067,9 @@ type ComboboxOptionActionProps<E extends ElementType$1 = 'button'> = HasPolymorp
2061
2067
  * Combobox compound component namespace.
2062
2068
  */
2063
2069
  declare const Combobox: {
2070
+ /** Provides shared combobox context (handle, listbox ID, anchor ref) to all sub-components. */
2064
2071
  Provider: typeof ComboboxProvider;
2072
+ /** Button trigger for select-only combobox mode with keyboard navigation and typeahead. */
2065
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> & {
2066
2074
  onSelect?: (option: {
2067
2075
  value: string;
@@ -2072,9 +2080,13 @@ declare const Combobox: {
2072
2080
  displayName: string;
2073
2081
  className: "lumx-combobox-button";
2074
2082
  };
2083
+ /** Text input trigger for autocomplete combobox mode with optional toggle button and filtering. */
2075
2084
  Input: Comp<ComboboxInputProps, HTMLDivElement>;
2085
+ /** Listbox container that registers with the combobox handle and tracks loading state. */
2076
2086
  List: Comp<ComboboxListProps, HTMLUListElement>;
2087
+ /** Selectable option item with filtering and keyboard navigation support. */
2077
2088
  Option: Comp<ComboboxOptionProps, HTMLLIElement>;
2089
+ /** Secondary action button within a grid-mode option row, rendered as an independent gridcell. */
2078
2090
  OptionAction: (<E extends React$1.ElementType = "button">(props: React$1.PropsWithoutRef<React$1.ComponentProps<E>> & {
2079
2091
  as?: E | undefined;
2080
2092
  } & _lumx_core_js_types.HasClassName & _lumx_core_js_types.HasRequiredLinkHref<E> & {
@@ -2087,22 +2099,27 @@ declare const Combobox: {
2087
2099
  displayName: string;
2088
2100
  className: "lumx-combobox-option-action";
2089
2101
  };
2102
+ /** Info button on an option that shows a popover on hover or keyboard highlight. */
2090
2103
  OptionMoreInfo: {
2091
2104
  (props: ComboboxOptionMoreInfoProps): react_jsx_runtime.JSX.Element;
2092
2105
  displayName: string;
2093
2106
  className: "lumx-combobox-option-more-info";
2094
2107
  };
2108
+ /** Loading placeholder skeleton(s) that auto-register loading state with the combobox handle. */
2095
2109
  OptionSkeleton: {
2096
- (props: ComboboxOptionSkeletonProps): react_jsx_runtime.JSX.Element[];
2110
+ (props: ComboboxOptionSkeletonProps): react_jsx_runtime.JSX.Element;
2097
2111
  displayName: string;
2098
2112
  className: "lumx-combobox-option-skeleton";
2099
2113
  };
2114
+ /** Floating popover container that auto-binds to the combobox anchor and open/close state. */
2100
2115
  Popover: {
2101
2116
  (props: ComboboxPopoverComponentProps): react_jsx_runtime.JSX.Element;
2102
2117
  displayName: string;
2103
2118
  className: "lumx-combobox-popover";
2104
2119
  };
2120
+ /** Labelled group of options that auto-hides when all its child options are filtered out. */
2105
2121
  Section: Comp<ComboboxSectionProps, HTMLLIElement>;
2122
+ /** Displays empty, error, and loading state messages for the combobox list. */
2106
2123
  State: {
2107
2124
  (props: ComboboxStateProps): react_jsx_runtime.JSX.Element;
2108
2125
  displayName: string;
@@ -2441,7 +2458,7 @@ declare const Dropdown: Comp<DropdownProps, HTMLDivElement>;
2441
2458
  /**
2442
2459
  * Defines the props of the component.
2443
2460
  */
2444
- interface ExpansionPanelProps extends GenericProps$1, HasCloseMode$1, HasTheme$1 {
2461
+ interface ExpansionPanelProps$1 extends HasClassName, HasCloseMode, HasTheme {
2445
2462
  /** Whether the expansion panel has a background. */
2446
2463
  hasBackground?: boolean;
2447
2464
  /** Whether the header has a divider. */
@@ -2450,6 +2467,41 @@ interface ExpansionPanelProps extends GenericProps$1, HasCloseMode$1, HasTheme$1
2450
2467
  isOpen?: boolean;
2451
2468
  /** Label text (overwritten if a `<header>` is provided in the children). */
2452
2469
  label?: string;
2470
+ /** On open callback. */
2471
+ handleOpen?: (event: any) => void;
2472
+ /** On close callback. */
2473
+ handleClose?: (event: any) => void;
2474
+ /** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */
2475
+ toggleButtonProps: any;
2476
+ /** On toggle open or close callback. */
2477
+ handleToggleOpen?(shouldOpen: boolean, event: any): void;
2478
+ /** Children */
2479
+ children?: JSXElement;
2480
+ /** Ref forwarded to the root `<section>` element. */
2481
+ ref?: CommonRef;
2482
+ /** Ref forwarded to the collapsible wrapper `<div>`. */
2483
+ wrapperRef?: CommonRef;
2484
+ /** Props spread onto the header content `<div>` (e.g. `aria-*`, `data-*`). */
2485
+ headerProps: GenericProps;
2486
+ /** Content rendered inside the header content area. */
2487
+ headerContent?: JSXElement;
2488
+ /** Optional drag handle element rendered at the start of the header. */
2489
+ dragHandle?: JSXElement;
2490
+ /** Content rendered inside the collapsible content area. */
2491
+ content?: JSXElement;
2492
+ /** Optional footer element rendered below the content. */
2493
+ footer?: JSXElement;
2494
+ /** IconButton component injected by the framework wrapper (React or Vue). */
2495
+ IconButton: any;
2496
+ /** Whether the children should remain mounted (visible in the DOM) while the panel is closed. */
2497
+ isChildrenVisible?: boolean;
2498
+ }
2499
+ type ExpansionPanelPropsToOverride = 'handleOpen' | 'handleClose' | 'toggleButtonProps' | 'handleToggleOpen' | 'wrapperRef' | 'headerProps' | 'headerContent' | 'dragHandle' | 'content' | 'IconButton' | 'isChildrenVisible' | 'footer';
2500
+
2501
+ /**
2502
+ * Defines the props of the component.
2503
+ */
2504
+ interface ExpansionPanelProps extends GenericProps$1, ReactToJSX<ExpansionPanelProps$1, ExpansionPanelPropsToOverride> {
2453
2505
  /** On open callback. */
2454
2506
  onOpen?: (event: React__default.MouseEvent) => void;
2455
2507
  /** On close callback. */
@@ -2458,8 +2510,6 @@ interface ExpansionPanelProps extends GenericProps$1, HasCloseMode$1, HasTheme$1
2458
2510
  toggleButtonProps: Pick<IconButtonProps, 'label'> & Omit<IconButtonProps, 'label' | 'onClick' | 'icon' | 'emphasis' | 'color'>;
2459
2511
  /** On toggle open or close callback. */
2460
2512
  onToggleOpen?(shouldOpen: boolean, event: React__default.MouseEvent): void;
2461
- /** Children */
2462
- children?: React__default.ReactNode;
2463
2513
  }
2464
2514
  /**
2465
2515
  * ExpansionPanel component.
@@ -3339,7 +3389,20 @@ declare const Message: Comp<MessageProps, HTMLDivElement>;
3339
3389
  /**
3340
3390
  * Defines the props of the component.
3341
3391
  */
3342
- interface MosaicProps extends GenericProps$1, HasTheme$1 {
3392
+ interface MosaicProps$1 extends HasClassName, HasTheme {
3393
+ /** Thumbnails. */
3394
+ thumbnails: any[];
3395
+ /** On image click callback. */
3396
+ handleClick?(index: number): void;
3397
+ Thumbnail: any;
3398
+ ref?: CommonRef;
3399
+ }
3400
+ type MosaicPropsToOverride = 'Thumbnail' | 'thumbnails';
3401
+
3402
+ /**
3403
+ * Defines the props of the component.
3404
+ */
3405
+ interface MosaicProps extends GenericProps$1, ReactToJSX<MosaicProps$1, MosaicPropsToOverride> {
3343
3406
  /** Thumbnails. */
3344
3407
  thumbnails: ThumbnailProps[];
3345
3408
  /** On image click callback. */
@@ -4455,16 +4518,25 @@ declare enum TabListLayout {
4455
4518
  /**
4456
4519
  * Defines the props of the component.
4457
4520
  */
4458
- interface TabListProps extends GenericProps$1, HasTheme$1 {
4521
+ interface TabListProps$1 extends HasClassName, HasTheme {
4459
4522
  /** ARIA label (purpose of the set of tabs). */
4460
4523
  ['aria-label']: string;
4461
4524
  /** Tab list. */
4462
- children: ReactNode;
4525
+ children: JSXElement;
4463
4526
  /** Layout of the tabs in the list. */
4464
4527
  layout?: TabListLayout;
4465
4528
  /** Position of the tabs in the list (requires 'clustered' layout). */
4466
- position?: Alignment$1;
4529
+ position?: Alignment;
4530
+ /** ref to the wrapper element */
4531
+ ref?: CommonRef;
4467
4532
  }
4533
+
4534
+ /**
4535
+ * Defines the props of the component.
4536
+ */
4537
+ interface TabListProps extends GenericProps$1, ReactToJSX<TabListProps$1> {
4538
+ }
4539
+
4468
4540
  /**
4469
4541
  * TabList component.
4470
4542
  *
@@ -4506,6 +4578,10 @@ interface TabProps$1 extends HasClassName {
4506
4578
  changeToTab?: () => void;
4507
4579
  /** Tab index for roving tabindex management. */
4508
4580
  tabIndex?: number;
4581
+ /** Name of the prop used to set tab index (framework-dependent). */
4582
+ tabIndexProp?: string;
4583
+ /** Name of the prop used to attach the keypress event (framework-dependent). */
4584
+ keyPressProp?: string;
4509
4585
  /** ID applied to the tab button element (for aria-labelledby on the panel). */
4510
4586
  tabId?: string;
4511
4587
  /** ID of the associated tab panel (for aria-controls). */
@@ -4517,7 +4593,7 @@ interface TabProps$1 extends HasClassName {
4517
4593
  /** Forward ref to the underlying button element. */
4518
4594
  ref?: CommonRef;
4519
4595
  }
4520
- type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
4596
+ type TabPropsToOverride = 'isAnyDisabled' | 'shouldActivateOnFocus' | 'changeToTab' | 'tabIndex' | 'tabIndexProp' | 'keyPressProp' | 'tabId' | 'tabPanelId' | 'Icon' | 'Text';
4521
4597
 
4522
4598
  /**
4523
4599
  * Defines the props of the component.
@@ -4552,13 +4628,30 @@ declare const Tab: Comp<TabProps, HTMLButtonElement>;
4552
4628
  /**
4553
4629
  * Defines the props of the component.
4554
4630
  */
4555
- interface TabPanelProps extends GenericProps$1 {
4556
- /** Native id property */
4557
- id?: string;
4631
+ interface TabPanelProps$1 extends HasClassName {
4558
4632
  /** Whether the tab is active or not. */
4559
4633
  isActive?: boolean;
4634
+ /** Whether the tab is lazy loaded or not */
4635
+ isLazy?: boolean;
4560
4636
  /** Children */
4561
- children?: React.ReactNode;
4637
+ children?: JSXElement;
4638
+ /** ID applied to the tab button element (for aria-labelledby on the panel). */
4639
+ tabId?: string;
4640
+ /** ID of the associated tab panel (for aria-controls). */
4641
+ id?: string;
4642
+ /** Name of the prop used to set tab index (framework-dependent). */
4643
+ tabIndexProp?: string;
4644
+ /** Forward ref to the underlying button element. */
4645
+ ref?: CommonRef;
4646
+ }
4647
+ type TabPanelPropsToOverride = 'tabId' | 'isLazy' | 'tabIndexProp';
4648
+
4649
+ /**
4650
+ * Defines the props of the component.
4651
+ */
4652
+ interface TabPanelProps extends GenericProps$1, ReactToJSX<TabPanelProps$1, TabPanelPropsToOverride> {
4653
+ /** Native id property */
4654
+ id?: string;
4562
4655
  }
4563
4656
  /**
4564
4657
  * TabPanel component.