@ufoui/core 0.0.12 → 0.0.40

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 (43) hide show
  1. package/assets/icons.d.ts +5 -2
  2. package/components/accordion/accordion.d.ts +2 -2
  3. package/components/badge/badge.d.ts +2 -2
  4. package/components/base/boxBase.d.ts +4 -4
  5. package/components/base/buttonBase.d.ts +5 -5
  6. package/components/base/checkboxBase.d.ts +2 -2
  7. package/components/base/dialogBase.d.ts +105 -9
  8. package/components/base/fieldBase.d.ts +1 -1
  9. package/components/card/card.d.ts +2 -2
  10. package/components/dialogs/dialogActions.d.ts +19 -7
  11. package/components/dialogs/dialogActions.guards.d.ts +15 -0
  12. package/components/dialogs/dialogContent.d.ts +7 -1
  13. package/components/dialogs/dialogHeader.d.ts +60 -0
  14. package/components/dialogs/dialogTitle.d.ts +9 -5
  15. package/components/dialogs/index.d.ts +1 -0
  16. package/components/menu/menu.d.ts +2 -2
  17. package/components/rating/rating.d.ts +2 -2
  18. package/components/switch/switch.d.ts +2 -2
  19. package/components/themeProvider/themeProvider.d.ts +10 -15
  20. package/components/toolbar/toolbar.d.ts +1 -1
  21. package/components/tooltip/tooltip.d.ts +2 -2
  22. package/index.css +1 -1
  23. package/index.js +2934 -3033
  24. package/internal/icon/icon.d.ts +28 -0
  25. package/internal/index.d.ts +1 -0
  26. package/internal/inlineTooltip/inlineTooltipManager.d.ts +3 -3
  27. package/internal/slots/slot.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/types/dialog.d.ts +37 -0
  30. package/types/index.d.ts +1 -0
  31. package/types/motion.d.ts +2 -2
  32. package/types/theme.d.ts +0 -30
  33. package/utils/applyThemeTokens.d.ts +10 -0
  34. package/utils/calculateFloatingPosition.d.ts +3 -3
  35. package/utils/color.d.ts +78 -131
  36. package/utils/colorRegistry.d.ts +44 -0
  37. package/utils/controlStyle.d.ts +8 -8
  38. package/utils/flatChildren.d.ts +17 -0
  39. package/utils/generateMaterialColors.d.ts +7 -7
  40. package/utils/index.d.ts +4 -1
  41. package/utils/renderPortal.d.ts +30 -0
  42. package/utils/utils.d.ts +2 -2
  43. package/utils/generateSchemes.d.ts +0 -32
package/assets/icons.d.ts CHANGED
@@ -1,11 +1,14 @@
1
+ export declare const ChevronRightIcon: import("react/jsx-runtime").JSX.Element;
2
+ export declare const CloseIcon: import("react/jsx-runtime").JSX.Element;
3
+ export declare const ArrowBackIcon: import("react/jsx-runtime").JSX.Element;
4
+ export declare const MoreVertIcon: import("react/jsx-runtime").JSX.Element;
1
5
  export declare const CheckmarkIcon: import("react/jsx-runtime").JSX.Element;
2
6
  export declare const IndeterminateIcon: import("react/jsx-runtime").JSX.Element;
3
7
  export declare const RadioIcon: import("react/jsx-runtime").JSX.Element;
4
- export declare const ArrowRightIcon: import("react/jsx-runtime").JSX.Element;
5
8
  export declare const CheckboxIcon: import("react/jsx-runtime").JSX.Element;
9
+ export declare const MenuCheckIcon: import("react/jsx-runtime").JSX.Element;
6
10
  export declare const RadioCheckedIcon: import("react/jsx-runtime").JSX.Element;
7
11
  export declare const RadioUncheckedIcon: import("react/jsx-runtime").JSX.Element;
8
- export declare const MenuCheckIcon: import("react/jsx-runtime").JSX.Element;
9
12
  export declare const ExpandIcon: import("react/jsx-runtime").JSX.Element;
10
13
  export declare const StarIcon: import("react/jsx-runtime").JSX.Element;
11
14
  export declare const StarFilledIcon: import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { BoxBaseProps } from '../base';
3
- import { BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFont, ElementShape, SurfaceColor } from '../../utils';
3
+ import { BaseColor, BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFont, ElementShape } from '../../utils';
4
4
  import { MotionAnimation, MotionStyle } from '../../types';
5
5
  export type AccordionVariant = 'text' | 'pills' | 'grouped' | 'segmented';
6
6
  export type AccordionConfig = {
@@ -15,7 +15,7 @@ export type AccordionConfig = {
15
15
  animation?: MotionAnimation;
16
16
  motionStyle?: MotionStyle;
17
17
  duration?: number;
18
- color?: SurfaceColor;
18
+ color?: BaseColor;
19
19
  disabled?: boolean;
20
20
  };
21
21
  /**
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { ElementAlign, ElementBorder, ElementElevation, ElementFont, ElementShape, ElementSize } from '../../utils/utils';
2
+ import { ElementBorder, ElementElevation, ElementFont, ElementPlacement, ElementShape, ElementSize } from '../../utils/utils';
3
3
  import { BorderColor, SemanticColor } from '../../utils/color';
4
4
  /**
5
5
  * Props for the Badge component.
@@ -10,7 +10,7 @@ import { BorderColor, SemanticColor } from '../../utils/color';
10
10
  */
11
11
  export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'ref' | 'size'> {
12
12
  /** Position relative to the parent element. */
13
- align?: ElementAlign;
13
+ align?: ElementPlacement;
14
14
  /** Accessible label for screen readers when badge conveys information. */
15
15
  ariaLabel?: string;
16
16
  /** Border width when outlined. */
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties, ElementType, HTMLAttributes, ReactNode } from 'react';
2
- import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, SurfaceColor, WrapperProps } from '../../utils';
2
+ import { BaseColor, BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, WrapperProps } from '../../utils';
3
3
  /**
4
4
  * Layout mode for {@link BoxBase}.
5
5
  *
@@ -41,7 +41,7 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
41
41
  /** Layout direction shortcut. Same as `direction="col"`. */
42
42
  col?: boolean;
43
43
  /** Surface background token. Default: `'surface'`. */
44
- color?: SurfaceColor;
44
+ color?: BaseColor;
45
45
  /** Grid template columns (`3` → `repeat(3, 1fr)`). */
46
46
  cols?: number | string;
47
47
  /** Custom HTML element/component. Default: `div`. */
@@ -59,9 +59,9 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
59
59
  /** Font token controlling typography (size, weight, line-height). */
60
60
  font?: ElementFont;
61
61
  /** Forces full height (100%). */
62
- hf?: boolean;
62
+ fullHeight?: boolean;
63
63
  /** Forces full width (100%). */
64
- wf?: boolean;
64
+ fullWidth?: boolean;
65
65
  /** Gap between children (flex/grid). */
66
66
  gap?: number | string;
67
67
  /** Horizontal gap (`column-gap`). */
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { BorderColor, ElementAlign, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTouchEffect, SemanticColor, SurfaceColor } from '../../utils';
2
+ import { BaseColor, BorderColor, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPlacement, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTouchEffect, SemanticColor } from '../../utils';
3
3
  /**
4
4
  * Props for the ButtonBase component.
5
5
  *
@@ -37,7 +37,7 @@ export interface ButtonBaseProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
37
37
  /** Font token for label and content. */
38
38
  font?: ElementFont;
39
39
  /** Expands button to full width. */
40
- wf?: boolean;
40
+ fullWidth?: boolean;
41
41
  /** Hover visual effects. */
42
42
  hoverEffects?: ElementHoverEffect[];
43
43
  /** Icon rendered at the start of the button. */
@@ -77,13 +77,13 @@ export interface ButtonBaseProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
77
77
  /** Shape override when selected. */
78
78
  selectedShape?: ElementShape;
79
79
  /** Text color override when selected. */
80
- selectedTextColor?: SurfaceColor;
80
+ selectedTextColor?: BaseColor;
81
81
  /** Shape of the button. */
82
82
  shape?: ElementShape;
83
83
  /** Predefined button size. Default: medium */
84
84
  size?: ElementSize;
85
85
  /** Text color override. */
86
- textColor?: SurfaceColor;
86
+ textColor?: BaseColor;
87
87
  /** Tooltip text and accessibility label fallback. */
88
88
  title?: string;
89
89
  /** Enables toggle button behavior. */
@@ -91,7 +91,7 @@ export interface ButtonBaseProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
91
91
  /** Enables tonal style. */
92
92
  tonal?: boolean;
93
93
  /** Tooltip alignment relative to the button. */
94
- tooltipAlign?: ElementAlign;
94
+ tooltipAlign?: ElementPlacement;
95
95
  /** Touch and click visual effects. */
96
96
  touchEffects?: ElementTouchEffect[];
97
97
  /** Custom trailing content. */
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { BorderColor, ElementAlign, ElementBorder, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor, SurfaceColor } from '../../utils';
2
+ import { BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPlacement, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor, SurfaceColor } from '../../utils';
3
3
  import { MotionAnimation, MotionStyle } from '../../types';
4
4
  /**
5
5
  * Props for the CheckboxBase component.
@@ -83,7 +83,7 @@ export interface CheckboxBaseProps extends Omit<React.InputHTMLAttributes<HTMLIn
83
83
  /** Placement of text relative to the control. */
84
84
  textPlacement?: ElementTextPlacement;
85
85
  /** Tooltip alignment relative to the control. */
86
- tooltipAlign?: ElementAlign;
86
+ tooltipAlign?: ElementPlacement;
87
87
  /** Touch and click visual effects. */
88
88
  touchEffects?: ElementTouchEffect[];
89
89
  /** Input type. */
@@ -1,34 +1,130 @@
1
- import { default as React, ReactNode } from 'react';
2
- import { BorderColor, ElementElevation, ElementOutline, ElementShape, ElementSize, SurfaceColor } from '../../utils';
3
- import { MotionAnimation, MotionStyle } from '../../types';
4
- export type DialogType = 'basic' | 'fullscreen' | 'dockRight' | 'dockLeft' | 'dockTop' | 'dockBottom';
5
- export type DialogAnimation = 'none' | MotionAnimation;
1
+ import { default as React, ReactElement, ReactNode } from 'react';
2
+ import { BorderColor, ElementElevation, ElementFont, ElementOutline, ElementShape, ElementSize, SurfaceColor } from '../../utils';
3
+ import { DialogAnimation, DialogIconSlot, DialogType, MotionStyle } from '../../types';
4
+ /**
5
+ * Props for the DialogBase component.
6
+ *
7
+ * Supports backdrop and portal rendering, transitions, Escape and backdrop
8
+ * dismiss, and optional modal focus trap and scroll locking.
9
+ *
10
+ * @category Base components
11
+ */
6
12
  export interface DialogBaseProps {
13
+ /** Semantic UUI element class for the dialog panel. */
7
14
  elementClass?: string;
15
+ /** Whether the dialog is open. */
8
16
  open: boolean;
17
+ /** Handler invoked when the dialog should close. */
9
18
  onClose?: () => void;
19
+ /** Layout mode. Default: basic */
10
20
  type?: DialogType;
21
+ /** Surface background token. */
11
22
  color?: SurfaceColor;
23
+ /** Elevation level. Default: 3 for non-fullscreen layouts. */
12
24
  elevation?: ElementElevation;
25
+ /** Predefined panel size. Default: small for horizontal docks, medium otherwise. */
13
26
  size?: ElementSize;
27
+ /** Shape of the dialog panel. */
14
28
  shape?: ElementShape;
29
+ /** Outline thickness when outlined. */
15
30
  border?: ElementOutline;
31
+ /** Outline color when outlined. */
16
32
  borderColor?: BorderColor;
17
- wf?: boolean;
18
- hf?: boolean;
33
+ /** Expands panel to full width. */
34
+ fullWidth?: boolean;
35
+ /** Expands panel to full height. */
36
+ fullHeight?: boolean;
37
+ /** Fits content to the panel. */
19
38
  fit?: boolean;
39
+ /** Renders the panel in detached layout style. */
20
40
  detached?: boolean;
41
+ /** Animation preset; `'none'` disables motion. */
21
42
  animation?: DialogAnimation;
43
+ /** Duration in milliseconds for open and close animations. Default: 500 */
22
44
  duration?: number;
23
- disableBackdropClose?: boolean;
24
- disableEscapeKey?: boolean;
45
+ /** Whether the dialog closes when the backdrop is clicked. Default: true */
46
+ closeOnBackdrop?: boolean;
47
+ /** Whether the dialog closes when Escape is pressed. Default: true */
48
+ closeOnEsc?: boolean;
49
+ /** Dialog content. */
25
50
  children?: ReactNode;
51
+ /** Visual title text. Referenced via aria-labelledby on the dialog element. */
52
+ label?: string;
53
+ /** Accessible label for dialogs without a visible title. */
54
+ 'aria-label'?: string;
55
+ /** Icon rendered in the dialog. Position controlled by iconSlot. */
56
+ icon?: ReactElement;
57
+ showIcon?: boolean;
58
+ iconColor?: SurfaceColor;
59
+ /** Where the icon is placed. Default: leading */
60
+ iconSlot?: DialogIconSlot;
61
+ /** Alignment of the title text. Default: start */
62
+ titleAlign?: 'start' | 'center' | 'end';
63
+ /** Full leading slot content for the title area. */
64
+ leading?: ReactNode;
65
+ /** Trailing slot content for the title area. */
66
+ trailing?: ReactNode;
67
+ /** Action buttons rendered in the dialog. */
68
+ actions?: ReactNode;
69
+ /** Where actions are placed. Default: inline for fullscreen, bottom otherwise (MD3) */
70
+ actionsPlacement?: 'top' | 'subtitle' | 'bottom' | 'inline';
71
+ /** Alignment of action buttons. Default: end (MD3) */
72
+ actionsAlign?: 'start' | 'center' | 'end';
73
+ /** Stack actions vertically instead of horizontally. Default: false (MD3) */
74
+ actionsStack?: boolean;
75
+ /** Maximum number of visible actions before the rest collapse into an overflow menu. Only applies when actionsPosition is inline. */
76
+ maxActions?: number;
77
+ /** Accessible label for the overflow actions button. Default: "More actions" */
78
+ moreLabel?: string;
79
+ /** Custom icon for the overflow actions button. */
80
+ moreIcon?: ReactElement;
81
+ /** Renders a close button in the trailing slot. */
82
+ showClose?: boolean;
83
+ /** Custom icon for the close button. */
84
+ closeIcon?: ReactElement;
85
+ /** Renders a back button in the leading slot. */
86
+ showBack?: boolean;
87
+ /** Custom icon for the back button. */
88
+ backIcon?: ReactElement;
89
+ /** Handler for the back button. Defaults to onClose. */
90
+ onBack?: () => void;
91
+ /** Additional class names for the dialog panel. */
26
92
  className?: string;
93
+ /** Motion style helper classes for the panel. */
27
94
  motionStyle?: MotionStyle;
95
+ /** Enables modal behaviour, focus trap, aria-modal, and body scroll lock when applicable. */
28
96
  modal?: boolean;
97
+ /** Focuses the dialog when opened (with modal focus trap). */
29
98
  autoFocus?: boolean;
99
+ /** Removes default panel padding. */
30
100
  flush?: boolean;
101
+ /** Renders inline without a portal (e.g. docked regions). */
31
102
  docked?: boolean;
103
+ /** Skips portaling and modal body scroll lock; for anchored overlays. */
32
104
  anchored?: boolean;
105
+ font?: ElementFont;
106
+ titleFont?: ElementFont;
33
107
  }
108
+ /**
109
+ * Low-level base component for modal and docked dialogs.
110
+ *
111
+ * Renders a backdrop and panel (via BoxBase), portaled to `#dialog-root` (created if
112
+ * missing; see {@link renderPortal}) unless `docked` or `anchored`.
113
+ *
114
+ *
115
+ * @param props Component properties.
116
+ * @function
117
+ *
118
+ * @example
119
+ * <DialogBase open={open} onClose={() => setOpen(false)} modal>
120
+ * {children}
121
+ * </DialogBase>
122
+ *
123
+ * @example
124
+ * <DialogBase open type="dockRight" anchored >
125
+ * {children}
126
+ * </DialogBase>
127
+ *
128
+ * @category Base components
129
+ */
34
130
  export declare const DialogBase: React.ForwardRefExoticComponent<DialogBaseProps & React.RefAttributes<HTMLDivElement>>;
@@ -21,7 +21,7 @@ export interface FieldBaseProps extends Omit<React.InputHTMLAttributes<HTMLInput
21
21
  outlined?: boolean;
22
22
  filled?: boolean;
23
23
  classic?: boolean;
24
- wFull?: boolean;
24
+ fullWidth?: boolean;
25
25
  /** Control shape variant. */
26
26
  shape?: ElementShape;
27
27
  /** Text color override for the label. */
@@ -1,10 +1,10 @@
1
1
  import { HTMLProps } from 'react';
2
- import { ElementAlign, ElementShape, ElementSize } from '../../utils/utils';
2
+ import { ElementPlacement, ElementShape, ElementSize } from '../../utils/utils';
3
3
  import { SemanticColor } from '../../utils/color';
4
4
  export interface CardProps extends Omit<HTMLProps<HTMLSpanElement>, 'ref' | 'size'> {
5
5
  value: string | number;
6
6
  color?: SemanticColor;
7
- position?: ElementAlign;
7
+ position?: ElementPlacement;
8
8
  size?: ElementSize;
9
9
  shape?: ElementShape;
10
10
  raised?: boolean;
@@ -1,14 +1,26 @@
1
1
  import { ReactNode } from 'react';
2
- import { BorderColor, ElementOutline, SurfaceColor } from '../../utils';
2
+ /** Slot contract for components that can act as dialog actions. */
3
+ export interface DialogActionProps {
4
+ label?: string;
5
+ 'aria-label'?: string;
6
+ icon?: ReactNode;
7
+ leading?: ReactNode;
8
+ trailing?: ReactNode;
9
+ disabled?: boolean;
10
+ }
3
11
  export interface DialogActionsProps {
4
- children?: ReactNode;
12
+ actions?: ReactNode;
13
+ placement?: 'top' | 'subtitle' | 'bottom' | 'inline';
14
+ align?: 'start' | 'center' | 'end';
15
+ stack?: boolean;
5
16
  className?: string;
6
- color?: SurfaceColor;
7
- borderTop?: boolean;
8
- borderTopWidth?: ElementOutline;
9
- borderColor?: BorderColor;
17
+ /** Maximum number of visible actions before the rest collapse into an overflow menu. */
18
+ maxActions?: number;
19
+ /** Accessible label for the overflow actions button. Default: "More actions" */
20
+ moreLabel?: string;
21
+ moreIcon?: ReactNode;
10
22
  }
11
23
  export declare const DialogActions: {
12
- ({ children, className, color, borderTop, borderTopWidth, borderColor, }: DialogActionsProps): import("react/jsx-runtime").JSX.Element | null;
24
+ ({ actions, className, placement, align, stack, maxActions, moreLabel, }: DialogActionsProps): import("react/jsx-runtime").JSX.Element | null;
13
25
  displayName: string;
14
26
  };
@@ -0,0 +1,15 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { DialogActionProps } from './dialogActions';
3
+ export declare const IS_DIALOG_ACTION: unique symbol;
4
+ /**
5
+ * Type guard that checks whether a React node is a dialog action component.
6
+ *
7
+ * Identifies dialog action elements by the internal {@link IS_DIALOG_ACTION} symbol
8
+ * attached to the component type.
9
+ *
10
+ * @param el - React node to test.
11
+ * @returns `true` if the node is a dialog action element.
12
+ *
13
+ * @internal
14
+ */
15
+ export declare function isDialogAction(el: ReactNode): el is ReactElement<DialogActionProps>;
@@ -1,9 +1,15 @@
1
1
  import { ReactNode } from 'react';
2
+ import { SurfaceColor } from '../../utils';
3
+ import { DialogIconSlot } from '../../types';
2
4
  export interface DialogContentProps {
3
5
  children?: ReactNode;
6
+ icon?: ReactNode;
7
+ showIcon?: boolean;
8
+ iconColor?: SurfaceColor;
9
+ iconSlot?: DialogIconSlot;
4
10
  className?: string;
5
11
  }
6
12
  export declare const DialogContent: {
7
- ({ children, className }: DialogContentProps): import("react/jsx-runtime").JSX.Element | null;
13
+ ({ children, iconSlot, icon, showIcon, iconColor, className }: DialogContentProps): import("react/jsx-runtime").JSX.Element | null;
8
14
  displayName: string;
9
15
  };
@@ -0,0 +1,60 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { DialogActionsProps } from './dialogActions';
3
+ import { ElementFont, SurfaceColor } from '../../utils';
4
+ import { DialogIconSlot } from '../../types';
5
+ /**
6
+ * Props for {@link DialogHeader}.
7
+ *
8
+ * @category Dialog
9
+ */
10
+ export interface DialogHeaderProps {
11
+ /** Optional content before the back button and title row. */
12
+ leading?: ReactNode;
13
+ /** When true, renders the back affordance with {@link backIcon}. */
14
+ showBack?: boolean;
15
+ /** Invoked when the back control is activated. */
16
+ onBack?: () => void;
17
+ /** Icon element for the back control. */
18
+ backIcon?: ReactElement;
19
+ /** Resolved icon wrapper for leading/top slots; omit when no dialog icon. */
20
+ icon?: ReactElement;
21
+ showIcon?: boolean;
22
+ iconColor?: SurfaceColor;
23
+ /** Where the icon is placed inside the header vs content (see {@link DialogIconSlot}). */
24
+ iconSlot: DialogIconSlot;
25
+ /** Title alignment passed to {@link DialogTitle}. */
26
+ titleAlign?: 'start' | 'center' | 'end';
27
+ /** Title text. */
28
+ label?: string;
29
+ /** Action buttons (see {@link DialogActions}). */
30
+ actions?: DialogActionsProps['actions'];
31
+ actionsAlign?: DialogActionsProps['align'];
32
+ actionsStack?: DialogActionsProps['stack'];
33
+ maxActions?: DialogActionsProps['maxActions'];
34
+ moreLabel?: DialogActionsProps['moreLabel'];
35
+ moreIcon?: DialogActionsProps['moreIcon'];
36
+ /** Optional content after actions / before close in the header row. */
37
+ trailing?: ReactNode;
38
+ /** When true, renders the close control with {@link closeIcon}. */
39
+ showClose?: boolean;
40
+ /** Invoked when the close control is activated. */
41
+ onClose?: () => void;
42
+ /** Icon element for the close control (already resolved to default or override). */
43
+ closeIcon?: ReactElement;
44
+ font?: ElementFont;
45
+ }
46
+ /**
47
+ * Dialog title row: leading/back/icon, title, inline actions, trailing, and close.
48
+ *
49
+ * @remarks
50
+ * Non-inline actions are omitted here and rendered below the content by the parent.
51
+ *
52
+ * @function
53
+ * @param props Component properties.
54
+ *
55
+ * @category Dialog
56
+ */
57
+ export declare const DialogHeader: {
58
+ ({ leading, showBack, onBack, backIcon, icon, showIcon, iconColor, iconSlot, titleAlign, label, actions, actionsAlign, actionsStack, maxActions, moreLabel, moreIcon, trailing, showClose, onClose, closeIcon, font, }: DialogHeaderProps): import("react/jsx-runtime").JSX.Element;
59
+ displayName: string;
60
+ };
@@ -1,15 +1,19 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ElementFont, SurfaceColor } from '../../utils';
3
+ import { DialogIconSlot } from '../../types';
3
4
  export interface DialogTitleProps {
4
- icon?: ReactNode;
5
5
  label?: string;
6
- children?: ReactNode;
7
6
  className?: string;
8
7
  font?: ElementFont;
9
- color?: SurfaceColor;
10
- textColor?: SurfaceColor;
8
+ /** Resolved icon wrapper for leading/top slots; omit when no dialog icon. */
9
+ icon?: ReactNode | null;
10
+ /** Where the icon is placed inside the header vs content (see {@link DialogIconSlot}). */
11
+ iconSlot?: DialogIconSlot;
12
+ showIcon?: boolean;
13
+ iconColor?: SurfaceColor;
14
+ align?: 'start' | 'center' | 'end';
11
15
  }
12
16
  export declare const DialogTitle: {
13
- ({ icon, label, children, className, font }: DialogTitleProps): import("react/jsx-runtime").JSX.Element | null;
17
+ ({ label, icon, iconSlot, className, iconColor, showIcon, align, font, }: DialogTitleProps): import("react/jsx-runtime").JSX.Element | null;
14
18
  displayName: string;
15
19
  };
@@ -1,6 +1,7 @@
1
1
  export * from './dialog';
2
2
  export * from './dialogActions';
3
3
  export * from './dialogContent';
4
+ export * from './dialogHeader';
4
5
  export * from './dialogTitle';
5
6
  export * from './drawer';
6
7
  export * from './bottomSheet';
@@ -1,6 +1,6 @@
1
1
  import { default as React, HTMLAttributes, ReactNode, RefObject } from 'react';
2
2
  import { MotionAnimation, MotionStyle } from '../../types';
3
- import { BorderColor, ElementAlign, ElementBorder, ElementDensity, ElementElevation, ElementFloatingMode, ElementFocusEffect, ElementFont, ElementSelectedEffect, ElementShape, ElementTouchEffect, SurfaceColor } from '../../utils';
3
+ import { BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFloatingMode, ElementFocusEffect, ElementFont, ElementPlacement, ElementSelectedEffect, ElementShape, ElementTouchEffect, SurfaceColor } from '../../utils';
4
4
  /**
5
5
  * Visual style preset for the Menu component.
6
6
  *
@@ -85,7 +85,7 @@ export interface MenuProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
85
85
  /** Opens the menu on pointer hover. */
86
86
  openOnHover?: boolean;
87
87
  /** Preferred placement relative to the anchor. */
88
- placement?: ElementAlign;
88
+ placement?: ElementPlacement;
89
89
  /** Icon used for checked radio items. */
90
90
  radioCheckedIcon?: ReactNode;
91
91
  /** Icon used for unchecked radio items. */
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { ElementAlign, ElementDensity, ElementFocusEffect, ElementFont, ElementSize, ElementTextPlacement, SurfaceColor } from '../../utils';
2
+ import { ElementDensity, ElementFocusEffect, ElementFont, ElementPlacement, ElementSize, ElementTextPlacement, SurfaceColor } from '../../utils';
3
3
  /**
4
4
  * Props for the Rating component.
5
5
  *
@@ -51,7 +51,7 @@ export interface RatingProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
51
51
  /** Placement of label and description relative to the control. */
52
52
  textPlacement?: ElementTextPlacement;
53
53
  /** Tooltip alignment relative to the control. */
54
- tooltipAlign?: ElementAlign;
54
+ tooltipAlign?: ElementPlacement;
55
55
  /** Current rating value when used as a controlled component. */
56
56
  value?: number;
57
57
  }
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { BorderColor, ElementAlign, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor } from '../../utils';
2
+ import { BorderColor, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPlacement, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor } from '../../utils';
3
3
  /**
4
4
  * Props for the Switch component.
5
5
  *
@@ -63,7 +63,7 @@ export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
63
63
  /** Layout of text relative to the control. */
64
64
  textPlacement?: ElementTextPlacement;
65
65
  /** Tooltip alignment relative to the control. */
66
- tooltipAlign?: ElementAlign;
66
+ tooltipAlign?: ElementPlacement;
67
67
  /** Touch and click visual effects. */
68
68
  touchEffects?: ElementTouchEffect[];
69
69
  /** Border style when unchecked. */
@@ -12,20 +12,14 @@ export interface ThemeProviderProps {
12
12
  * Defaults to #6750A4 if omitted.
13
13
  */
14
14
  seedColor?: string;
15
- /**
16
- * Optional custom colors used for info, warning, and success roles.
17
- * If omitted, defaults to:
18
- * - info: #03a9f4
19
- * - warning: #ffd600
20
- * - success: #689f38
21
- */
22
- extraColors?: Partial<Record<'info' | 'warning' | 'success', string>>;
15
+ /** Optional custom colors map used to define or override generated theme roles. */
16
+ colors?: Record<string, string>;
23
17
  }
24
18
  /**
25
19
  * Provides a ThemeContext to all descendant components using Material Design 3 color tokens.
26
20
  *
27
21
  * - Dynamically generates full theme schemes (`light` and `dark`) based on the provided `seedColor`
28
- * and optional `extraColors` (`info`, `warning`, `success`).
22
+ * and optional `colors`.
29
23
  * - Injects resolved colors as CSS custom properties into the DOM (`:root` and `.dark`).
30
24
  * - Automatically toggles the `.dark` class on `<body>` based on `colorMode`.
31
25
  * - Exposes utility functions via context:
@@ -36,14 +30,15 @@ export interface ThemeProviderProps {
36
30
  *
37
31
  * This provider must wrap your application to enable theming and contextual access to color tokens.
38
32
  *
39
- * @param children - React children rendered within the theme context.
40
- * @param colorMode - Optional color mode: `'light'` or `'dark'`. Defaults to `'light'`.
41
- * @param seedColor - Optional base color used to generate the theme. Defaults to `#6750A4`.
42
- * @param extraColors - Optional custom base colors for semantic roles (`info`, `warning`, `success`).
33
+ * @param props - Theme provider props.
34
+ * @param props.children - React children rendered within the theme context.
35
+ * @param props.colorMode - Optional color mode: `'light'` or `'dark'`. Defaults to `'light'`.
36
+ * @param props.seedColor - Optional base color used to generate the theme. Defaults to `#6750A4`.
37
+ * @param props.colors - Optional custom colors map used to define or override generated theme roles.
43
38
  *
44
39
  * @example
45
40
  * ```tsx
46
- * <ThemeProvider colorMode="dark" seedColor="#6200ee" extraColors={{ info: '#2196f3' }}>
41
+ * <ThemeProvider colorMode="dark" seedColor="#6200ee" colors={{ info: '#2196f3', primary: '#0f62fe' }}>
47
42
  * <App />
48
43
  * </ThemeProvider>
49
44
  * ```
@@ -51,4 +46,4 @@ export interface ThemeProviderProps {
51
46
  * @category Components
52
47
  * @group Theme
53
48
  */
54
- export declare const ThemeProvider: ({ children, colorMode, seedColor, extraColors, }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
49
+ export declare const ThemeProvider: ({ children, colorMode, seedColor, colors }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -19,7 +19,7 @@ export interface ToolbarProps extends Omit<BoxBaseProps, 'component' | 'elementC
19
19
  /** Density token. */
20
20
  density?: ElementDensity;
21
21
  /** Makes toolbar full width. */
22
- wFull?: boolean;
22
+ fullWidth?: boolean;
23
23
  /** Positions floating toolbar. */
24
24
  placement?: 'top' | 'bottom' | 'left' | 'right' | 'center';
25
25
  /** Makes floating toolbar fixed. */
@@ -1,8 +1,8 @@
1
1
  import { HTMLProps, ReactNode } from 'react';
2
- import { ElementAlign } from '../../utils';
2
+ import { ElementPlacement } from '../../utils';
3
3
  export interface TooltipProps extends HTMLProps<HTMLDivElement> {
4
4
  title: string;
5
5
  children?: ReactNode;
6
- align?: ElementAlign;
6
+ align?: ElementPlacement;
7
7
  }
8
8
  export declare const Tooltip: import('react').ForwardRefExoticComponent<Omit<TooltipProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;