@ufoui/core 0.0.40 → 0.0.88

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 (68) hide show
  1. package/assets/index.d.ts +1 -0
  2. package/assets/spinners.d.ts +16 -0
  3. package/components/actions/actions.d.ts +55 -0
  4. package/components/actions/actions.guards.d.ts +15 -0
  5. package/components/avatar/avatar.d.ts +3 -3
  6. package/components/badge/badge.d.ts +1 -1
  7. package/components/base/boxBase.d.ts +6 -6
  8. package/components/base/dialogBase.d.ts +2 -2
  9. package/components/base/textBase.d.ts +11 -11
  10. package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
  11. package/components/button/button.d.ts +1 -1
  12. package/components/card/card.d.ts +39 -13
  13. package/components/card/cardHeader.d.ts +49 -0
  14. package/components/card/cardMedia.d.ts +9 -0
  15. package/components/card/cardTitle.d.ts +11 -0
  16. package/components/dialogs/dialogHeader.d.ts +1 -1
  17. package/components/dialogs/index.d.ts +1 -1
  18. package/components/fieldset/fieldset.d.ts +1 -1
  19. package/components/layout/article.d.ts +1 -1
  20. package/components/layout/aside.d.ts +1 -1
  21. package/components/layout/content.d.ts +1 -1
  22. package/components/layout/footer.d.ts +1 -1
  23. package/components/layout/header.d.ts +1 -1
  24. package/components/layout/main.d.ts +1 -1
  25. package/components/layout/nav.d.ts +1 -1
  26. package/components/layout/section.d.ts +1 -1
  27. package/components/link/link.d.ts +13 -14
  28. package/components/spinner/spinner.d.ts +27 -2
  29. package/components/themeProvider/themeProvider.d.ts +14 -4
  30. package/components/toolbar/toolbar.d.ts +1 -1
  31. package/components/typography/h1.d.ts +1 -1
  32. package/components/typography/h2.d.ts +1 -1
  33. package/components/typography/h3.d.ts +1 -1
  34. package/components/typography/h4.d.ts +1 -1
  35. package/components/typography/h5.d.ts +1 -1
  36. package/components/typography/h6.d.ts +1 -1
  37. package/components/typography/label.d.ts +1 -1
  38. package/components/typography/p.d.ts +1 -1
  39. package/components/typography/span.d.ts +1 -1
  40. package/hooks/index.d.ts +1 -0
  41. package/hooks/useAnimate.d.ts +8 -6
  42. package/hooks/useResponsive.d.ts +60 -0
  43. package/hooks/useTheme.d.ts +1 -1
  44. package/index.css +1 -1
  45. package/index.d.ts +3 -0
  46. package/index.js +3460 -3404
  47. package/package.json +1 -1
  48. package/types/breakpoints.d.ts +38 -0
  49. package/types/color.d.ts +300 -0
  50. package/types/dialog.d.ts +0 -11
  51. package/types/fonts.d.ts +53 -0
  52. package/types/index.d.ts +3 -0
  53. package/types/motion.d.ts +31 -4
  54. package/types/theme.d.ts +8 -205
  55. package/utils/{applyThemeTokens.d.ts → applyThemeColors.d.ts} +2 -2
  56. package/utils/breakpoints/breakpoint.d.ts +59 -0
  57. package/utils/breakpoints/breakpointStore.d.ts +32 -0
  58. package/utils/breakpoints/index.d.ts +2 -0
  59. package/utils/color.d.ts +4 -90
  60. package/utils/colorRegistry.d.ts +0 -7
  61. package/utils/createRipple.d.ts +17 -0
  62. package/utils/fontRegistry.d.ts +29 -0
  63. package/utils/generateMaterialColors.d.ts +8 -11
  64. package/utils/index.d.ts +6 -1
  65. package/utils/mergeOverrides.d.ts +13 -0
  66. package/utils/utils.d.ts +2 -24
  67. package/components/dialogs/dialogActions.d.ts +0 -26
  68. package/components/dialogs/dialogActions.guards.d.ts +0 -15
package/assets/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './icons';
2
+ export * from './spinners';
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ type SvgProps = React.ComponentPropsWithoutRef<'svg'>;
3
+ type CircleProps = React.ComponentPropsWithoutRef<'circle'>;
4
+ interface SpinnerRingSvgProps extends SvgProps {
5
+ trackProps?: CircleProps;
6
+ indicatorProps?: CircleProps;
7
+ }
8
+ export declare const SpinnerRingSvg: ({ trackProps, indicatorProps, ...props }: SpinnerRingSvgProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const SpinnerDotsSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const SpinnerBladeSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const SpinnerBarsSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const SpinnerOrbitSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const SpinnerArcSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
14
+ export declare const SpinnerStepBarSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const SpinnerDualRingSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,55 @@
1
+ import { default as React, ReactElement, ReactNode } from 'react';
2
+ /**
3
+ * Slot contract for components that can act as actions.
4
+ *
5
+ * @category Actions
6
+ */
7
+ export interface ActionProps {
8
+ /** Text label for the action. */
9
+ label?: string;
10
+ /** Accessible label for actions without visible text. */
11
+ 'aria-label'?: string;
12
+ /** Leading icon for the action. */
13
+ icon?: React.ReactElement;
14
+ /** Custom leading slot content. */
15
+ leading?: ReactNode;
16
+ /** Custom trailing slot content. */
17
+ trailing?: ReactNode;
18
+ /** Disables the action. */
19
+ disabled?: boolean;
20
+ }
21
+ /**
22
+ * Props for action groups used by surface components such as cards and dialogs.
23
+ *
24
+ * @category Actions
25
+ */
26
+ export interface ActionsProps {
27
+ /** Action elements rendered inside the group. */
28
+ actions?: ReactNode;
29
+ /** Alignment of the action group. */
30
+ align?: 'start' | 'center' | 'end';
31
+ /** Stacks actions vertically instead of horizontally. */
32
+ stack?: boolean;
33
+ /** Additional class names for the action wrapper. */
34
+ className?: string;
35
+ /** Maximum number of visible actions before the rest collapse into an overflow menu. */
36
+ maxActions?: number;
37
+ /** Accessible label for the overflow actions button. Default: "More actions" */
38
+ moreLabel?: string;
39
+ /** Custom icon for the overflow actions button. */
40
+ moreIcon?: ReactElement;
41
+ }
42
+ /**
43
+ * Shared action group renderer used by components that expose footer or inline actions.
44
+ *
45
+ * Filters children to known action elements and applies placement, alignment,
46
+ * and stacking styles.
47
+ *
48
+ * @category Actions
49
+ */
50
+ declare const Actions: {
51
+ ({ actions, className, align, stack, maxActions, moreLabel, moreIcon }: ActionsProps): import("react/jsx-runtime").JSX.Element | null;
52
+ displayName: string;
53
+ };
54
+ export { Actions as DialogActions, Actions as CardActions };
55
+ export type { ActionsProps as DialogActionsProps, ActionsProps as CardActionsProps };
@@ -0,0 +1,15 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { ActionProps } from './actions';
3
+ export declare const IS_ACTION: unique symbol;
4
+ /**
5
+ * Type guard that checks whether a React node is an action component.
6
+ *
7
+ * Identifies action elements by the internal {@link IS_ACTION} symbol
8
+ * attached to the component type.
9
+ *
10
+ * @param el - React node to test.
11
+ * @returns `true` if the node is an action element.
12
+ *
13
+ * @internal
14
+ */
15
+ export declare function isAction(el: ReactNode): el is ReactElement<ActionProps>;
@@ -6,7 +6,7 @@ import { ElementSize } from '../../utils';
6
6
  *
7
7
  * @category Avatar
8
8
  */
9
- export interface AvatarProps extends Omit<BoxBaseProps, 'component' | 'elementClass'> {
9
+ export interface AvatarProps extends Omit<BoxBaseProps, 'as' | 'elementClass'> {
10
10
  /** Size token controlling width and height. */
11
11
  size?: ElementSize;
12
12
  /** Image source URL. */
@@ -21,8 +21,8 @@ export interface AvatarProps extends Omit<BoxBaseProps, 'component' | 'elementCl
21
21
  /**
22
22
  * Avatar identity component displaying image, initials, or custom content.
23
23
  *
24
- * Automatically derives a background color from name when no image
25
- * and no explicit color are provided.
24
+ * Automatically derives a fallback background color from name when no image
25
+ * and no explicit color are provided, using semantic and extended color pools.
26
26
  *
27
27
  * @function
28
28
  * @param props Component properties.
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { ElementBorder, ElementElevation, ElementFont, ElementPlacement, ElementShape, ElementSize } from '../../utils/utils';
2
+ import { ElementBorder, ElementElevation, ElementFont, ElementPlacement, ElementShape, ElementSize } from '../../utils';
3
3
  import { BorderColor, SemanticColor } from '../../utils/color';
4
4
  /**
5
5
  * Props for the Badge component.
@@ -32,6 +32,8 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
32
32
  alignContent?: CSSProperties['alignContent'];
33
33
  /** Maps to `align-items` (cross-axis alignment). */
34
34
  alignItems?: CSSProperties['alignItems'];
35
+ /** Custom HTML element/component. Default: `div`. */
36
+ as?: ElementType;
35
37
  /** Border width (0–5). */
36
38
  border?: ElementBorder;
37
39
  /** Border color token. */
@@ -44,8 +46,6 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
44
46
  color?: BaseColor;
45
47
  /** Grid template columns (`3` → `repeat(3, 1fr)`). */
46
48
  cols?: number | string;
47
- /** Custom HTML element/component. Default: `div`. */
48
- component?: ElementType;
49
49
  /** Layout direction (`row` or `col`) for flex. Ignored if `row` or `col` is set. */
50
50
  direction?: BoxDirection;
51
51
  /** Native disabled attribute. Applied when supported by the rendered element. */
@@ -70,6 +70,8 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
70
70
  gapY?: number | string;
71
71
  /** Enables flex-grow (fills remaining space). */
72
72
  grow?: boolean;
73
+ /** Height. */
74
+ h?: number | string;
73
75
  /** Renders as `inline-flex`, `inline-grid` or `inline-block`. */
74
76
  inline?: boolean;
75
77
  /** Maps to `justify-content` (main-axis alignment). */
@@ -98,12 +100,10 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
98
100
  shape?: ElementShape;
99
101
  /** Layout mode (`flex`, `grid`, `block`). Default: `flex`. */
100
102
  type?: BoxType;
101
- /** Enables wrapping (`flex-wrap: wrap`). */
102
- wrap?: boolean;
103
103
  /** Width. */
104
104
  w?: number | string;
105
- /** Height. */
106
- h?: number | string;
105
+ /** Enables wrapping (`flex-wrap: wrap`). */
106
+ wrap?: boolean;
107
107
  }
108
108
  /**
109
109
  * `BoxBase` — core layout primitive powering all semantic containers
@@ -1,6 +1,6 @@
1
1
  import { default as React, ReactElement, ReactNode } from 'react';
2
2
  import { BorderColor, ElementElevation, ElementFont, ElementOutline, ElementShape, ElementSize, SurfaceColor } from '../../utils';
3
- import { DialogAnimation, DialogIconSlot, DialogType, MotionStyle } from '../../types';
3
+ import { DialogIconSlot, DialogType, MotionAnimation, MotionStyle } from '../../types';
4
4
  /**
5
5
  * Props for the DialogBase component.
6
6
  *
@@ -39,7 +39,7 @@ export interface DialogBaseProps {
39
39
  /** Renders the panel in detached layout style. */
40
40
  detached?: boolean;
41
41
  /** Animation preset; `'none'` disables motion. */
42
- animation?: DialogAnimation;
42
+ animation?: MotionAnimation;
43
43
  /** Duration in milliseconds for open and close animations. Default: 500 */
44
44
  duration?: number;
45
45
  /** Whether the dialog closes when the backdrop is clicked. Default: true */
@@ -10,23 +10,23 @@ import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape
10
10
  */
11
11
  export interface TextBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
12
12
  /** Custom HTML element/component. Default: span. */
13
- component?: React.ElementType;
14
- /** Font token controlling typography (size, weight, line-height). */
15
- font?: ElementFont;
16
- /** Surface background token. */
17
- color?: SurfaceColor;
18
- /** Elevation level (0–5). */
19
- elevation?: ElementElevation;
20
- /** Shape/border-radius token. */
21
- shape?: ElementShape;
13
+ as?: React.ElementType;
22
14
  /** Border width (0–5). */
23
15
  border?: ElementBorder;
24
16
  /** Border color token. */
25
17
  borderColor?: BorderColor;
26
- /** Semantic UUI element class (e.g. uui-text, uui-heading). */
27
- elementClass?: string;
28
18
  /** Text content. */
29
19
  children?: ReactNode;
20
+ /** Surface background token. */
21
+ color?: SurfaceColor;
22
+ /** Semantic UUI element class (e.g. uui-text, uui-heading). */
23
+ elementClass?: string;
24
+ /** Elevation level (0–5). */
25
+ elevation?: ElementElevation;
26
+ /** Font token controlling typography (size, weight, line-height). */
27
+ font?: ElementFont;
28
+ /** Shape/border-radius token. */
29
+ shape?: ElementShape;
30
30
  }
31
31
  /**
32
32
  * TextBase — core typography primitive powering semantic text components.
@@ -30,7 +30,7 @@ export interface BreadcrumbsProps extends BoxBaseProps {
30
30
  renderItem?: (item: BreadcrumbItem, index: number) => ReactNode;
31
31
  renderSeparator?: (index: number) => ReactNode;
32
32
  renderCollapse?: (items: BreadcrumbItem[]) => ReactNode;
33
- component?: ElementType;
33
+ as?: ElementType;
34
34
  itemComponent?: ElementType;
35
35
  density?: ElementDensity;
36
36
  font?: ElementFont;
@@ -1,4 +1,4 @@
1
- import { ButtonBaseProps } from '../base/buttonBase';
1
+ import { ButtonBaseProps } from '../base';
2
2
  /**
3
3
  * Props for {@link Button}.
4
4
  * Extends {@link ButtonBaseProps}.
@@ -1,15 +1,41 @@
1
- import { HTMLProps } from 'react';
2
- import { ElementPlacement, ElementShape, ElementSize } from '../../utils/utils';
3
- import { SemanticColor } from '../../utils/color';
4
- export interface CardProps extends Omit<HTMLProps<HTMLSpanElement>, 'ref' | 'size'> {
5
- value: string | number;
6
- color?: SemanticColor;
7
- position?: ElementPlacement;
8
- size?: ElementSize;
1
+ import { default as React, ElementType, ReactNode } from 'react';
2
+ import { BorderColor, ElementElevation, ElementShape, SurfaceColor } from '../../utils';
3
+ import { MotionAnimation, MotionStyle } from '../../types';
4
+ import { BoxBaseProps } from '../base';
5
+ export type CardVariant = 'elevated' | 'filled' | 'outlined';
6
+ /**
7
+ * Props for {@link Card}.
8
+ *
9
+ * Card surface built on top of {@link BoxBase}.
10
+ *
11
+ * @category Card
12
+ */
13
+ export interface CardProps extends Omit<BoxBaseProps, 'type' | 'elementClass' | 'color' | 'elevation' | 'borderColor'> {
14
+ /** Underlying element/component. Default: `article`. */
15
+ as?: ElementType;
16
+ /** Card content. */
17
+ children?: ReactNode;
18
+ /** Removes default inner spacing from the card content area. */
19
+ flush?: boolean;
20
+ /** Card variant. Default: `elevated`. */
21
+ variant?: CardVariant;
22
+ /** Whether the card is visible. */
23
+ open?: boolean;
24
+ /** Entry/exit animation preset. Use `none` to disable. */
25
+ animation?: MotionAnimation;
26
+ /** Animation duration in ms. */
27
+ duration?: number;
28
+ /** Motion style helper classes. */
29
+ motionStyle?: MotionStyle;
30
+ /** Surface color token override. */
31
+ color?: SurfaceColor;
32
+ /** Elevation override. */
33
+ elevation?: ElementElevation;
34
+ /** Shape token. Default: `rounded` (MD3 medium corner). */
9
35
  shape?: ElementShape;
10
- raised?: boolean;
11
- elevated?: boolean;
12
- outlined?: boolean;
13
- filled?: boolean;
36
+ /** Border color override (used by outlined cards). */
37
+ borderColor?: BorderColor;
38
+ /** Accessible label for cards without visible title. */
39
+ 'aria-label'?: string;
14
40
  }
15
- export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLSpanElement>>;
41
+ export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,49 @@
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { CardActionsProps } from '../actions/actions';
3
+ import { ElementFont } from '../../utils';
4
+ /**
5
+ * Props for {@link CardHeader}.
6
+ *
7
+ * @category Card
8
+ */
9
+ export interface CardHeaderProps {
10
+ /** Optional content before the title row. */
11
+ leading?: ReactNode;
12
+ /** Title alignment passed to {@link CardTitle}. */
13
+ titleAlign?: 'start' | 'center' | 'end';
14
+ /** Title text. */
15
+ label?: string;
16
+ /** Secondary text shown below the title. */
17
+ subtitle?: string;
18
+ /** Action buttons (see {@link CardActions}). */
19
+ actions?: CardActionsProps['actions'];
20
+ actionsAlign?: CardActionsProps['align'];
21
+ actionsStack?: CardActionsProps['stack'];
22
+ maxActions?: CardActionsProps['maxActions'];
23
+ moreLabel?: CardActionsProps['moreLabel'];
24
+ moreIcon?: CardActionsProps['moreIcon'];
25
+ /** Optional content after actions / before close in the header row. */
26
+ trailing?: ReactNode;
27
+ /** When true, renders the close control with {@link closeIcon}. */
28
+ showClose?: boolean;
29
+ /** Invoked when the close control is activated. */
30
+ onClose?: () => void;
31
+ /** Icon element for the close control (already resolved to default or override). */
32
+ closeIcon?: ReactElement;
33
+ font?: ElementFont;
34
+ }
35
+ /**
36
+ * Card title row: leading/icon, title, inline actions, trailing, and close.
37
+ *
38
+ * @remarks
39
+ * Non-inline actions are omitted here and rendered below the content by the parent.
40
+ *
41
+ * @function
42
+ * @param props Component properties.
43
+ *
44
+ * @category Card
45
+ */
46
+ export declare const CardHeader: {
47
+ ({ leading, titleAlign, label, actions, actionsAlign, actionsStack, maxActions, moreLabel, moreIcon, trailing, showClose, onClose, closeIcon, font, }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
48
+ displayName: string;
49
+ };
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export interface CardMediaProps {
3
+ children?: ReactNode;
4
+ className?: string;
5
+ }
6
+ export declare const CardMedia: {
7
+ ({ children, className }: CardMediaProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
@@ -0,0 +1,11 @@
1
+ import { ElementFont } from '../../utils';
2
+ export interface CardTitleProps {
3
+ label?: string;
4
+ className?: string;
5
+ font?: ElementFont;
6
+ align?: 'start' | 'center' | 'end';
7
+ }
8
+ export declare const CardTitle: {
9
+ ({ label, className, align, font, }: CardTitleProps): import("react/jsx-runtime").JSX.Element | null;
10
+ displayName: string;
11
+ };
@@ -1,5 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
- import { DialogActionsProps } from './dialogActions';
2
+ import { DialogActionsProps } from '../actions/actions';
3
3
  import { ElementFont, SurfaceColor } from '../../utils';
4
4
  import { DialogIconSlot } from '../../types';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  export * from './dialog';
2
- export * from './dialogActions';
2
+ export * from '../actions/actions';
3
3
  export * from './dialogContent';
4
4
  export * from './dialogHeader';
5
5
  export * from './dialogTitle';
@@ -7,7 +7,7 @@ import { BoxBaseProps } from '../base';
7
7
  *
8
8
  * @category Fieldset
9
9
  */
10
- export interface FieldsetProps extends Omit<BoxBaseProps, 'component' | 'elementClass'> {
10
+ export interface FieldsetProps extends Omit<BoxBaseProps, 'as' | 'elementClass'> {
11
11
  /** Supporting text displayed below the fieldset content. */
12
12
  description?: string;
13
13
  /** Text color of the description. */
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type ArticleProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type ArticleProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<article>` element.
11
11
  * Intended for self-contained content units composed of Sections and optional Aside.
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type AsideProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type AsideProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<aside>` element.
11
11
  *
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type ContentProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type ContentProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Layout wrapper for the main article content.
11
11
  *
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type FooterProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type FooterProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<footer>` element.
11
11
  *
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type HeaderProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type HeaderProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<header>` element.
11
11
  *
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type MainProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type MainProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<main>` element.
11
11
  *
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type NavProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type NavProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<nav>` element.
11
11
  *
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
5
5
  *
6
6
  * @category Box
7
7
  */
8
- export type SectionProps = Omit<BoxBaseProps, 'elementClass' | 'component'>;
8
+ export type SectionProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
9
9
  /**
10
10
  * Semantic layout wrapper for the native `<section>` element.
11
11
  *
@@ -1,9 +1,10 @@
1
1
  import { default as React, ElementType, ReactNode } from 'react';
2
- import { ElementFocusEffect, ElementFont, ElementHoverEffect, ElementPressedEffect, SurfaceColor } from '../../utils';
2
+ import { BaseColor, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementPressedEffect } from '../../utils';
3
3
  /**
4
- * Props for the Link component.
4
+ * Props for {@link Link}.
5
5
  *
6
- * Inline link element with optional leading and trailing content and animated underline.
6
+ * Polymorphic inline link that can render as a native anchor or custom navigation component.
7
+ * Supports optional leading/trailing visuals, underline behavior, and interaction effects.
7
8
  *
8
9
  * @category Link
9
10
  */
@@ -18,14 +19,14 @@ export type LinkProps<T extends ElementType = 'a'> = {
18
19
  leading?: ReactNode;
19
20
  /** Trailing visual element. */
20
21
  trailing?: ReactNode;
21
- /** Surface color token applied to text. */
22
- color?: SurfaceColor;
22
+ /** Color token applied to text. */
23
+ color?: BaseColor;
23
24
  /** Underline visibility behavior. */
24
25
  underline?: 'none' | 'hover' | 'always';
25
26
  /** Font token applied to content. */
26
27
  font?: ElementFont;
27
28
  /** Opens link in new tab with security attributes. */
28
- isExternal?: boolean;
29
+ external?: boolean;
29
30
  /** Accessibility label override. */
30
31
  'aria-label'?: string;
31
32
  /** Additional class applied to the root element. */
@@ -44,15 +45,13 @@ export type LinkProps<T extends ElementType = 'a'> = {
44
45
  underlineAnimation?: 'scale' | 'fade';
45
46
  } & Omit<React.ComponentPropsWithoutRef<T>, 'as' | 'color' | 'children' | 'className'>;
46
47
  export interface LinkComponent {
48
+ /**
49
+ * Renders a polymorphic link element.
50
+ *
51
+ * @typeParam T - Element type rendered by the component.
52
+ * @param props - Link configuration and props for the rendered element type.
53
+ */
47
54
  <T extends ElementType = 'a'>(props: LinkProps<T>): ReactNode;
48
55
  displayName?: string;
49
56
  }
50
- /**
51
- * Inline link component with optional leading and trailing content and animated underline.
52
- *
53
- * @function
54
- * @param props Component properties.
55
- *
56
- * @category Link
57
- */
58
57
  export declare const Link: LinkComponent;
@@ -1,7 +1,32 @@
1
- export type SpinnerVariant = 'circular' | 'dots' | 'bars' | 'ring' | 'bars2' | 'orbit' | 'arc' | 'stepBar';
1
+ import { BaseColor, ElementSize } from '../../utils';
2
+ export type SpinnerVariant = 'ring' | 'dots' | 'blade' | 'bars' | 'orbit' | 'arc' | 'stepBar' | 'dualRing';
3
+ /**
4
+ * Props for the spinner component.
5
+ *
6
+ * @category Spinner
7
+ */
2
8
  export interface SpinnerProps {
9
+ /** Visual spinner variant. */
3
10
  variant?: SpinnerVariant;
11
+ /** Semantic color token applied to the spinner. */
12
+ color?: BaseColor;
13
+ /** Size token controlling spinner dimensions. */
14
+ size?: ElementSize;
15
+ /** Additional class names for the root svg element. */
4
16
  className?: string;
17
+ /** Applies inline alignment (`vertical-align: middle`) for text-flow usage. */
5
18
  inline?: boolean;
19
+ /** Accessible label. When provided, spinner is announced as a status. */
20
+ ariaLabel?: string;
6
21
  }
7
- export declare function Spinner({ variant, inline, className, }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
22
+ /**
23
+ * Renders a loading spinner in one of the supported variants.
24
+ *
25
+ * By default spinner is decorative. Provide `ariaLabel` to expose it as an accessible status.
26
+ *
27
+ * @function Spinner
28
+ * @param props Component properties.
29
+ *
30
+ * @category Spinner
31
+ */
32
+ export declare const Spinner: ({ variant, color, size, inline, className, ariaLabel }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { PartialThemeBreakpoints, PartialThemeFonts, ThemeCustomColors } from '../../types';
2
3
  export interface ThemeProviderProps {
3
4
  /** React children to render within the theme context. */
4
5
  children: ReactNode;
@@ -12,8 +13,12 @@ export interface ThemeProviderProps {
12
13
  * Defaults to #6750A4 if omitted.
13
14
  */
14
15
  seedColor?: string;
15
- /** Optional custom colors map used to define or override generated theme roles. */
16
- colors?: Record<string, string>;
16
+ /** Optional semantic seed colors map (core + augmented). */
17
+ colors?: ThemeCustomColors;
18
+ /** Optional responsive breakpoints map. */
19
+ breakpoints?: PartialThemeBreakpoints;
20
+ /** Optional font class map keyed by theme font token name. */
21
+ fonts?: PartialThemeFonts;
17
22
  }
18
23
  /**
19
24
  * Provides a ThemeContext to all descendant components using Material Design 3 color tokens.
@@ -34,7 +39,7 @@ export interface ThemeProviderProps {
34
39
  * @param props.children - React children rendered within the theme context.
35
40
  * @param props.colorMode - Optional color mode: `'light'` or `'dark'`. Defaults to `'light'`.
36
41
  * @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.
42
+ * @param props.colors - Optional semantic seed colors map (core + augmented via `CustomColors`).
38
43
  *
39
44
  * @example
40
45
  * ```tsx
@@ -43,7 +48,12 @@ export interface ThemeProviderProps {
43
48
  * </ThemeProvider>
44
49
  * ```
45
50
  *
51
+ * @privateRemarks
52
+ * The provider intentionally computes generated schemes during state initialization and once again
53
+ * in the `[colors, seedColor]` effect. This keeps theme token names available on first render,
54
+ * including setups without `ColorRegistry`, at the cost of an extra computation.
55
+ *
46
56
  * @category Components
47
57
  * @group Theme
48
58
  */
49
- export declare const ThemeProvider: ({ children, colorMode, seedColor, colors }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
59
+ export declare const ThemeProvider: ({ children, colorMode, seedColor, colors, breakpoints, fonts }: ThemeProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ import { BoxBaseProps } from '../base/boxBase';
7
7
  *
8
8
  * @category Toolbar
9
9
  */
10
- export interface ToolbarProps extends Omit<BoxBaseProps, 'component' | 'elementClass' | 'direction' | 'row' | 'col'> {
10
+ export interface ToolbarProps extends Omit<BoxBaseProps, 'as' | 'elementClass' | 'direction' | 'row' | 'col'> {
11
11
  /** Visual variant of the toolbar. */
12
12
  variant?: 'docked' | 'floating';
13
13
  /** Surface color token applied to container. */
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
5
5
  *
6
6
  * @category Typography
7
7
  */
8
- export type H1Props = Omit<TextBaseProps, 'component'>;
8
+ export type H1Props = Omit<TextBaseProps, 'as'>;
9
9
  /**
10
10
  * H1 semantic heading.
11
11
  * Renders native h1 element with default headlineLarge font.
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
5
5
  *
6
6
  * @category Typography
7
7
  */
8
- export type H2Props = Omit<TextBaseProps, 'component'>;
8
+ export type H2Props = Omit<TextBaseProps, 'as'>;
9
9
  /**
10
10
  * H2 semantic heading.
11
11
  * Renders native h2 element with default headlineMedium font.
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
5
5
  *
6
6
  * @category Typography
7
7
  */
8
- export type H3Props = Omit<TextBaseProps, 'component'>;
8
+ export type H3Props = Omit<TextBaseProps, 'as'>;
9
9
  /**
10
10
  * H3 semantic heading.
11
11
  * Renders native h3 element with default headlineSmall font.