@lumx/core 4.20.0-next.4 → 4.20.0-next.5

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.
@@ -1,6 +1,6 @@
1
1
  import { Kind } from '../../constants';
2
2
  import type { LumxClassName, JSXElement, HasClassName, CommonRef } from '../../types';
3
- import { DialogProps } from '../Dialog';
3
+ import { DialogShellProps } from '../Dialog';
4
4
  export interface BaseAlertDialogProps {
5
5
  /** Message variant. */
6
6
  kind?: Kind;
@@ -11,7 +11,7 @@ export interface BaseAlertDialogProps {
11
11
  */
12
12
  children?: JSXElement;
13
13
  }
14
- export interface AlertDialogProps extends HasClassName, BaseAlertDialogProps, Pick<DialogProps, 'size'> {
14
+ export interface AlertDialogProps extends HasClassName, BaseAlertDialogProps, Pick<DialogShellProps, 'size'> {
15
15
  /** Props forwarded to the confirm button */
16
16
  confirmProps: any;
17
17
  /**
@@ -169,10 +169,10 @@ export declare function setup({ component: IconButton, decorators: { withCombina
169
169
  isActive?: boolean | undefined;
170
170
  isFocused?: boolean | undefined;
171
171
  isHovered?: boolean | undefined;
172
+ 'aria-label'?: string | undefined;
172
173
  'aria-expanded'?: boolean | "true" | "false" | undefined;
173
174
  'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
174
175
  'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined;
175
- 'aria-label'?: string | undefined;
176
176
  className?: string | undefined;
177
177
  theme?: import("@lumx/core/js/constants").Theme | undefined;
178
178
  'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
@@ -243,10 +243,10 @@ export declare function setup({ component: Button, decorators: { withCombination
243
243
  isActive?: boolean | undefined;
244
244
  isFocused?: boolean | undefined;
245
245
  isHovered?: boolean | undefined;
246
+ 'aria-label'?: string | undefined;
246
247
  'aria-expanded'?: boolean | "true" | "false" | undefined;
247
248
  'aria-haspopup'?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
248
249
  'aria-pressed'?: boolean | "false" | "mixed" | "true" | undefined;
249
- 'aria-label'?: string | undefined;
250
250
  className?: string | undefined;
251
251
  theme?: Theme | undefined;
252
252
  'aria-disabled'?: import("../../types/Booleanish").Booleanish | undefined;
@@ -93,6 +93,11 @@ export interface ComboboxHandle {
93
93
  destroy(): void;
94
94
  /** Subscribe to a combobox event. Returns an unsubscribe function. */
95
95
  subscribe<K extends keyof ComboboxEventMap>(event: K, callback: (value: ComboboxEventMap[K]) => void): () => void;
96
+ /**
97
+ * Read the last dispatched value of an event synchronously, for pull-based subscribers such as
98
+ * React's `useSyncExternalStore`. Returns `undefined` until the event has fired at least once.
99
+ */
100
+ getSnapshot<K extends keyof ComboboxEventMap>(event: K): ComboboxEventMap[K] | undefined;
96
101
  /** The current trigger element (may be null before registration). */
97
102
  readonly trigger: HTMLInputElement | HTMLButtonElement | null;
98
103
  /** The current listbox/grid element (may be null before registration). */
@@ -0,0 +1,61 @@
1
+ import type { CommonRef, GenericProps, JSXElement } from '../../types';
2
+ import type { BaseDialogProps } from './types';
3
+ /**
4
+ * Component display name.
5
+ */
6
+ export declare const COMPONENT_NAME = "DialogContent";
7
+ /**
8
+ * Props of the dialog content: the `role="dialog"` element (which carries `aria-labelledby`) and
9
+ * everything inside it (header, body, footer). It is meant to be rendered by a framework component
10
+ * that has resolved `labelId` from the ids registry.
11
+ */
12
+ export interface DialogContentProps extends BaseDialogProps {
13
+ /**
14
+ * Id of the heading naming this dialog (read from the ids registry by the framework), applied as
15
+ * `aria-labelledby`. Overridden by an explicit `aria-label`/`aria-labelledby` set via `dialogProps`.
16
+ */
17
+ labelId?: string;
18
+ /** Additional props for the dialog container element. */
19
+ dialogProps?: GenericProps;
20
+ /** On close callback. */
21
+ handleClose?(): void;
22
+ /** Whether to prevent closing on click away. */
23
+ shouldPreventCloseOnClickAway?: boolean;
24
+ /** Refs used for click-away detection. */
25
+ clickAwayRefs?: any;
26
+ /** Ref for the root wrapper element. */
27
+ rootRef?: CommonRef;
28
+ /** Ref for the inner section element. */
29
+ wrapperRef?: CommonRef;
30
+ /** Reference to the dialog content element. */
31
+ contentRef?: CommonRef;
32
+ /** Props forwarded from a child <header> element. */
33
+ headerChildProps?: GenericProps;
34
+ /** Content extracted from a child <header> element. */
35
+ headerChildContent?: JSXElement;
36
+ /** Whether the header sentinel is out of view (controls header divider). */
37
+ hasTopIntersection: boolean | null;
38
+ /** Dialog body content. */
39
+ content?: JSXElement;
40
+ /** Ref setter for the top scroll sentinel element. */
41
+ setSentinelTop?: any;
42
+ /** Ref setter for the bottom scroll sentinel element. */
43
+ setSentinelBottom?: any;
44
+ /** Props forwarded from a child <footer> element. */
45
+ footerChildProps?: GenericProps;
46
+ /** Content extracted from a child <footer> element. */
47
+ footerChildContent?: JSXElement;
48
+ /** Whether the footer sentinel is out of view (controls footer divider). */
49
+ hasBottomIntersection: boolean | null;
50
+ /** ProgressCircular component. */
51
+ ProgressCircular: any;
52
+ /** ClickAwayProvider component. */
53
+ ClickAwayProvider: any;
54
+ }
55
+ /**
56
+ * Dialog content: the `role="dialog"` element + header/body/footer.
57
+ *
58
+ * @param props Component props.
59
+ * @return React element.
60
+ */
61
+ export declare const DialogContent: (props: DialogContentProps) => import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import type { SetupStoriesOptions } from '@lumx/core/stories/types';
2
+ /**
3
+ * Core stories for DialogHeading, shared by React and Vue.
4
+ *
5
+ * Framework-agnostic on purpose: it defines no JSX `render` and no `play`, relying on Storybook's
6
+ * default rendering of the injected `component` from `args`. Each framework only injects its own
7
+ * `DialogHeading` component.
8
+ */
9
+ export declare function setup({ component: DialogHeading }: SetupStoriesOptions): {
10
+ meta: {
11
+ component: any;
12
+ render: ({ children, ...args }: any) => import("react").JSX.Element;
13
+ args: {
14
+ children: string;
15
+ };
16
+ };
17
+ /**
18
+ * `DialogHeading` renders a `Heading` defaulting to the `title` typography.
19
+ *
20
+ * Rendered inside a `Dialog`, `Lightbox` or `PopoverDialog` it also names the container via
21
+ * `aria-labelledby` — see those components' stories for the integration.
22
+ */
23
+ Default: {
24
+ args: {};
25
+ };
26
+ /** The default `title` typography can be overridden with the `typography` prop. */
27
+ CustomTypography: {
28
+ args: {
29
+ typography: "headline";
30
+ };
31
+ };
32
+ };
@@ -0,0 +1,18 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ /**
3
+ * Mounts a standalone DialogHeading and returns the rendered heading element.
4
+ *
5
+ * The framework-specific `render` adapter receives `{ children, ...props }` and is responsible for
6
+ * mounting `<DialogHeading {...props}>{children}</DialogHeading>` in its own idiom.
7
+ */
8
+ export declare const setup: (propsOverride: any | undefined, { render, ...options }: SetupOptions<any>) => {
9
+ props: any;
10
+ dialogHeading: HTMLElement;
11
+ wrapper: Partial<import("../../../testing").SetupResult>;
12
+ };
13
+ /**
14
+ * Shared assertions for the standalone rendering of `DialogHeading` (no enclosing container).
15
+ * Registry wiring lives in `labelRegistryTests`; framework-specific prop/ref forwarding stays in the
16
+ * per-package `commonTestsSuite`.
17
+ */
18
+ export declare const DialogHeadingTests: (renderOptions: SetupOptions<any>) => void;
@@ -0,0 +1,42 @@
1
+ import type { CommonRef, HasClassName } from '../../types';
2
+ import type { DialogSizes } from './types';
3
+ /**
4
+ * Props of the outer shell: the overlay + the context providers (theme, heading level, and the
5
+ * internal ids registry). It renders `children` - typically a framework component that reads the
6
+ * registered label id and renders a `DialogContent`.
7
+ */
8
+ export interface DialogShellProps extends HasClassName {
9
+ /** Reference to the root element. */
10
+ ref?: CommonRef;
11
+ /** Whether the component is open or not. */
12
+ isOpen?: boolean;
13
+ /** Whether the indefinite progress indicator is displayed (drives the loading class). */
14
+ isLoading?: boolean;
15
+ /** Whether the component is still visible (e.g. during close animation). */
16
+ isVisible?: boolean;
17
+ /** Size variant. */
18
+ size?: DialogSizes;
19
+ /** Z-axis position. */
20
+ zIndex?: number;
21
+ /** Content rendered inside the overlay + providers (typically a framework `DialogContent` reader). */
22
+ children?: any;
23
+ /** Portal component for rendering outside the DOM hierarchy. */
24
+ Portal: any;
25
+ /** HeadingLevelProvider component. */
26
+ HeadingLevelProvider: any;
27
+ /** ThemeProvider component. */
28
+ ThemeProvider: any;
29
+ /** Provides the ids registry so a `DialogHeading` in the subtree can be linked via `aria-labelledby`. */
30
+ IdsRegistryProvider: any;
31
+ }
32
+ /**
33
+ * Component default props.
34
+ */
35
+ export declare const DEFAULT_PROPS: Partial<Pick<DialogShellProps, 'size'>>;
36
+ /**
37
+ * Dialog shell: overlay + context providers (theme, heading level, ids registry).
38
+ *
39
+ * @param props Component props.
40
+ * @return React element.
41
+ */
42
+ export declare const DialogShell: (props: DialogShellProps) => import("react").JSX.Element;
@@ -19,7 +19,7 @@ export declare function setup({ component: Dialog, render, decorators: { withChr
19
19
  };
20
20
  };
21
21
  decorators: ((story: any, context: any) => any)[];
22
- args: Partial<import(".").DialogProps>;
22
+ args: Partial<Pick<import("./DialogShell").DialogShellProps, "size">>;
23
23
  argTypes: {
24
24
  size: {
25
25
  control: {
@@ -0,0 +1,24 @@
1
+ import type { LumxClassName } from '../../types';
2
+ /**
3
+ * Dialog label id key in IdsRegistry
4
+ */
5
+ export declare const DIALOG_LABEL_KEY = "dialog-label";
6
+ /**
7
+ * Component display name.
8
+ */
9
+ export declare const COMPONENT_NAME = "Dialog";
10
+ /**
11
+ * `DialogHeading` component display name.
12
+ */
13
+ export declare const DIALOG_HEADING_COMPONENT_NAME = "DialogHeading";
14
+ /**
15
+ * Component default class name and class prefix. Shared by the shell and the container modules.
16
+ */
17
+ export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
18
+ export declare const block: {
19
+ (additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
20
+ (modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
21
+ }, element: {
22
+ (elem: string, additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
23
+ (elem: string, modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
24
+ };
@@ -1,99 +1,4 @@
1
- import type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps } from '../../types';
2
- import { Size } from '../../constants';
3
- export interface BaseDialogProps {
4
- /** Footer content. */
5
- footer?: JSXElement;
6
- /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
7
- forceFooterDivider?: boolean;
8
- /** Header content. */
9
- header?: JSXElement;
10
- /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */
11
- forceHeaderDivider?: boolean;
12
- /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
13
- isLoading?: boolean;
14
- /** Whether the component is open or not. */
15
- isOpen?: boolean;
16
- }
17
- /**
18
- * Defines the props of the component.
19
- */
20
- export interface DialogProps extends HasClassName, BaseDialogProps {
21
- /** Reference to the root element. */
22
- ref?: CommonRef;
23
- /** Whether the component is still visible (e.g. during close animation). */
24
- isVisible?: boolean;
25
- /** Reference to the dialog content element. */
26
- contentRef?: CommonRef;
27
- /** Size variant. */
28
- size?: DialogSizes;
29
- /** Z-axis position. */
30
- zIndex?: number;
31
- /** Additional props for the dialog container element. */
32
- dialogProps?: GenericProps;
33
- /** On close callback. */
34
- handleClose?(): void;
35
- /** Whether to prevent closing on click away. */
36
- shouldPreventCloseOnClickAway?: boolean;
37
- /** Refs used for click-away detection. */
38
- clickAwayRefs?: any;
39
- /** Ref for the root wrapper element. */
40
- rootRef?: CommonRef;
41
- /** Ref for the inner section element. */
42
- wrapperRef?: CommonRef;
43
- /** Whether the header sentinel is out of view (controls header divider). */
44
- hasTopIntersection: boolean | null;
45
- /** Whether the footer sentinel is out of view (controls footer divider). */
46
- hasBottomIntersection: boolean | null;
47
- /** Props forwarded from a child <header> element. */
48
- headerChildProps?: GenericProps;
49
- /** Content extracted from a child <header> element. */
50
- headerChildContent?: JSXElement;
51
- /** Props forwarded from a child <footer> element. */
52
- footerChildProps?: GenericProps;
53
- /** Content extracted from a child <footer> element. */
54
- footerChildContent?: JSXElement;
55
- /** Dialog body content. */
56
- content?: JSXElement;
57
- /** Ref setter for the top scroll sentinel element. */
58
- setSentinelTop?: any;
59
- /** Ref setter for the bottom scroll sentinel element. */
60
- setSentinelBottom?: any;
61
- /** Portal component for rendering outside the DOM hierarchy. */
62
- Portal: any;
63
- /** HeadingLevelProvider component. */
64
- HeadingLevelProvider: any;
65
- /** ThemeProvider component. */
66
- ThemeProvider: any;
67
- /** ClickAwayProvider component. */
68
- ClickAwayProvider: any;
69
- /** ProgressCircular component */
70
- ProgressCircular: any;
71
- }
72
- export type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
73
- /**
74
- * Component display name.
75
- */
76
- export declare const COMPONENT_NAME = "Dialog";
77
- /**
78
- * Component default class name and class prefix.
79
- */
80
- export declare const CLASSNAME: LumxClassName<typeof COMPONENT_NAME>;
81
- export declare const block: {
82
- (additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
83
- (modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
84
- }, element: {
85
- (elem: string, additionalClasses: import("../../utils/classNames/bem/types").AdditionalClasses): string;
86
- (elem: string, modifiers?: import("../../utils/classNames/bem/types").Modifier, additionalClasses?: import("../../utils/classNames/bem/types").AdditionalClasses): string;
87
- };
88
- /**
89
- * Component default props.
90
- */
91
- export declare const DEFAULT_PROPS: Partial<DialogProps>;
92
- /**
93
- * Dialog component.
94
- *
95
- * @param props Component props.
96
- * @param ref Component ref.
97
- * @return React element.
98
- */
99
- export declare const Dialog: (props: DialogProps) => import("react").JSX.Element;
1
+ export { COMPONENT_NAME, CLASSNAME, block, element, DIALOG_LABEL_KEY } from './constants';
2
+ export { type BaseDialogProps, type DialogSizes } from './types';
3
+ export { DialogShell, DEFAULT_PROPS, type DialogShellProps } from './DialogShell';
4
+ export { DialogContent, type DialogContentProps } from './DialogContent';
@@ -0,0 +1,19 @@
1
+ import { SetupOptions } from '../../../testing';
2
+ export interface LabelRegistrySetupOptions extends SetupOptions<any> {
3
+ /** Framework factory producing a DialogHeading child carrying the given accessible name. */
4
+ makeDialogHeading: (name: string) => any;
5
+ }
6
+ /**
7
+ * Shared assertions proving a dialog-like container (`Dialog`, `Lightbox`, `PopoverDialog`) wires the
8
+ * ids registry: it links itself to a rendered `DialogHeading` via `aria-labelledby`, and stays
9
+ * unlabelled when none is present.
10
+ *
11
+ * The container's own precedence rules (explicit `aria-label`/`aria-labelledby`/`label` props), the
12
+ * unmount behaviour, and any framework-specific concerns (e.g. Vue stray-attribute leaks) stay in the
13
+ * per-package test files. Registry mechanics (last-wins, fallback) are covered by the IdsRegistry
14
+ * tests.
15
+ *
16
+ * `aria-label` is forced to `undefined` because some containers default it, which would otherwise win
17
+ * over the registry-provided `aria-labelledby`.
18
+ */
19
+ export declare const DialogLabelRegistryTests: (renderOptions: LabelRegistrySetupOptions) => void;
@@ -0,0 +1,17 @@
1
+ import type { JSXElement } from '../../types';
2
+ import type { Size } from '../../constants';
3
+ export interface BaseDialogProps {
4
+ /** Footer content. */
5
+ footer?: JSXElement;
6
+ /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */
7
+ forceFooterDivider?: boolean;
8
+ /** Header content. */
9
+ header?: JSXElement;
10
+ /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */
11
+ forceHeaderDivider?: boolean;
12
+ /** Whether the indefinite progress indicator over the dialog content is displayed or not. */
13
+ isLoading?: boolean;
14
+ /** Whether the component is open or not. */
15
+ isOpen?: boolean;
16
+ }
17
+ export type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;
@@ -32,6 +32,7 @@ export declare const getHeadingProps: (props: HeadingProps, contextHeadingElemen
32
32
  as: HeadingElement;
33
33
  className: string;
34
34
  typography: import("../../constants").Typography;
35
+ id?: string | undefined;
35
36
  color?: import("../../constants").ColorWithVariants | undefined;
36
37
  colorVariant?: import("../../constants").ColorVariant | undefined;
37
38
  truncate?: boolean | {
@@ -68,12 +68,12 @@ export declare function setup({ component: ImageBlock, components: { Chip, ChipG
68
68
  className?: string | undefined;
69
69
  theme?: import("../../constants").Theme | undefined;
70
70
  title?: string | undefined;
71
+ tags?: import("react").ReactNode;
71
72
  description?: import("react").ReactNode | {
72
73
  __html: string;
73
74
  };
74
75
  titleProps?: import("../../types").GenericProps | undefined;
75
76
  descriptionProps?: import("../../types").GenericProps | undefined;
76
- tags?: import("react").ReactNode;
77
77
  captionStyle?: import("../../types").GenericProps | undefined;
78
78
  };
79
79
  decorators: ((story: any, context: any) => any)[];
@@ -4,6 +4,8 @@ export interface BaseLightboxProps extends HasClassName, HasTheme, Pick<AriaAttr
4
4
  isOpen?: boolean;
5
5
  /** Whether to keep the dialog open on clickaway or escape press. */
6
6
  preventAutoClose?: boolean;
7
+ /** Whether to keep the dialog open on clickaway (overridden by `preventAutoClose`). */
8
+ preventCloseOnClick?: boolean;
7
9
  /** Z-axis position. */
8
10
  zIndex?: number;
9
11
  }
@@ -27,6 +29,12 @@ export interface LightboxProps extends BaseLightboxProps {
27
29
  parentElement?: CommonRef;
28
30
  /** 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. */
29
31
  focusElement?: CommonRef;
32
+ /**
33
+ * Id of the heading naming this lightbox (via the internal ids registry), applied as
34
+ * `aria-labelledby` on the lightbox container. Overridden by an explicit `aria-label`/
35
+ * `aria-labelledby`.
36
+ */
37
+ labelId?: string;
30
38
  /** On close callback. */
31
39
  handleClose?(): void;
32
40
  /** Children */
@@ -1,10 +1,13 @@
1
- import type { HasAriaLabelOrLabelledBy, LumxClassName } from '../../types';
1
+ import type { AriaAttributes, LumxClassName } from '../../types';
2
2
  import type { PopoverProps } from '../Popover';
3
3
  /**
4
4
  * PopoverDialog props.
5
- * The PopoverDialog has the same props as the Popover but requires an accessible label.
5
+ * The PopoverDialog has the same props as the Popover, plus optional accessible-name props.
6
+ * An accessible name can be provided via `label`, `aria-label`, `aria-labelledby`, or by
7
+ * rendering a `DialogHeading` inside the dialog (which names it via the internal label
8
+ * registry) - at least one of these should be used.
6
9
  */
7
- export type PopoverDialogProps = PopoverProps & HasAriaLabelOrLabelledBy & {
10
+ export type PopoverDialogProps = PopoverProps & Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> & {
8
11
  /** Accessible label for the dialog (alternative to aria-label prop). */
9
12
  label?: string;
10
13
  };
@@ -5,6 +5,10 @@ import { ColorWithVariants, ColorVariant, Typography, WhiteSpace } from '../../c
5
5
  * Defines the props of the component.
6
6
  */
7
7
  export interface TextProps extends HasClassName {
8
+ /**
9
+ * HTML id.
10
+ */
11
+ id?: string;
8
12
  /**
9
13
  * Color variant.
10
14
  */
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Picks the accessible-name prop (`aria-label` or `aria-labelledby`).
3
+ */
4
+ export declare function resolveAccessibleNameProps(ariaLabel: string | undefined, ariaLabelledBy: string | undefined): {
5
+ 'aria-label': string;
6
+ } | {
7
+ 'aria-labelledby': string;
8
+ } | undefined;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * `IdsRegistryProvider` component display name.
3
+ */
4
+ export declare const COMPONENT_NAME = "IdsRegistryProvider";
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Internal "ids registry" contract shared between framework wrappers (`@lumx/react`, `@lumx/vue`).
3
+ */
4
+ export interface IdsRegistry {
5
+ /** Get the id currently registered under `key` (the most recently registered one still holding it), if any. */
6
+ getId(key: string): string | undefined;
7
+ /**
8
+ * Register (or clear, when `id` is `undefined`) the id held by `token` under `key`. `token` identifies the
9
+ * registrant (e.g. one per component instance) so that clearing/overwriting only ever affects its own
10
+ * registration: if it wasn't the most recent registrant, clearing it falls back to whichever other
11
+ * registrant is still holding the key. Notifies its listeners when the id returned by `getId` changes.
12
+ */
13
+ setId(key: string, token: unknown, id: string | undefined): void;
14
+ /** Subscribe to changes of the id registered under `key`. Returns an unsubscribe function. */
15
+ subscribe(key: string, listener: (key: string) => void): () => void;
16
+ }
17
+ /**
18
+ * Create a standalone ids registry.
19
+ *
20
+ * Can be used to store ids for 'aria-labelledby' or 'aria-describedby'. Registrations under the same key are
21
+ * kept as a stack (most recently registered wins); a registrant clearing itself only affects the top of the
22
+ * stack if it put itself there, so an older still-registered registrant is restored instead of the key going
23
+ * empty.
24
+ */
25
+ export declare function createIdsRegistry(): IdsRegistry;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@floating-ui/dom": "^1.7.5",
10
- "@lumx/icons": "^4.20.0-next.4",
10
+ "@lumx/icons": "^4.20.0-next.5",
11
11
  "classnames": "^2.3.2",
12
12
  "focus-visible": "^5.0.2",
13
13
  "lodash": "4.18.1",
@@ -66,7 +66,7 @@
66
66
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
67
67
  },
68
68
  "sideEffects": false,
69
- "version": "4.20.0-next.4",
69
+ "version": "4.20.0-next.5",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",
@@ -88,7 +88,7 @@
88
88
  "version-changelog": "^3.1.1",
89
89
  "vite": "^7.3.5",
90
90
  "vite-tsconfig-paths": "^5.1.4",
91
- "vitest": "^4.0.18"
91
+ "vitest": "^4.1.10"
92
92
  },
93
93
  "stableVersion": "4.19.0"
94
94
  }
@@ -1,8 +0,0 @@
1
- /**
2
- * Wrap `fn` so that, no matter how many times the returned function is called within the same
3
- * microtask cycle, `fn` only runs once at the end of that cycle.
4
- */
5
- export declare function debounceMicrotask(fn: () => void): {
6
- (): void;
7
- cancel(): void;
8
- };