@ufoui/core 0.0.58 → 0.0.124

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 (69) hide show
  1. package/assets/index.d.ts +1 -0
  2. package/assets/spinners.d.ts +86 -0
  3. package/components/accordion/accordion.d.ts +4 -8
  4. package/components/accordion/accordionItem.d.ts +3 -5
  5. package/components/actions/actions.d.ts +55 -0
  6. package/components/actions/actions.guards.d.ts +15 -0
  7. package/components/avatar/avatar.d.ts +1 -1
  8. package/components/base/boxBase.d.ts +6 -6
  9. package/components/base/checkboxBase.d.ts +3 -7
  10. package/components/base/dialogBase.d.ts +3 -7
  11. package/components/base/textBase.d.ts +13 -12
  12. package/components/breadcrumbs/breadcrumbs.d.ts +3 -5
  13. package/components/button/button.d.ts +1 -1
  14. package/components/card/card.d.ts +8 -51
  15. package/components/card/cardHeader.d.ts +49 -0
  16. package/components/card/cardMedia.d.ts +9 -0
  17. package/components/card/cardTitle.d.ts +11 -0
  18. package/components/collapse/collapse.d.ts +4 -8
  19. package/components/dialogs/dialogHeader.d.ts +1 -1
  20. package/components/dialogs/index.d.ts +1 -1
  21. package/components/fieldset/fieldset.d.ts +1 -1
  22. package/components/item/item.d.ts +43 -0
  23. package/components/item/item.guards.d.ts +12 -0
  24. package/components/layout/article.d.ts +1 -1
  25. package/components/layout/aside.d.ts +1 -1
  26. package/components/layout/content.d.ts +1 -1
  27. package/components/layout/footer.d.ts +1 -1
  28. package/components/layout/header.d.ts +1 -1
  29. package/components/layout/main.d.ts +1 -1
  30. package/components/layout/nav.d.ts +1 -1
  31. package/components/layout/section.d.ts +1 -1
  32. package/components/list/list.d.ts +45 -4
  33. package/components/listbox/listBox.d.ts +25 -0
  34. package/components/progress/progress.d.ts +35 -11
  35. package/components/select/select.d.ts +26 -17
  36. package/components/slider/slider.d.ts +86 -8
  37. package/components/slider/sliderHandle.d.ts +24 -0
  38. package/components/spinner/spinner.d.ts +44 -3
  39. package/components/toast/toast.d.ts +3 -7
  40. package/components/toolbar/toolbar.d.ts +1 -1
  41. package/components/typography/h1.d.ts +1 -1
  42. package/components/typography/h2.d.ts +1 -1
  43. package/components/typography/h3.d.ts +1 -1
  44. package/components/typography/h4.d.ts +1 -1
  45. package/components/typography/h5.d.ts +1 -1
  46. package/components/typography/h6.d.ts +1 -1
  47. package/components/typography/label.d.ts +1 -1
  48. package/components/typography/p.d.ts +1 -1
  49. package/components/typography/span.d.ts +1 -1
  50. package/hooks/index.d.ts +2 -0
  51. package/hooks/useAnimate.d.ts +12 -6
  52. package/hooks/useMotion.d.ts +27 -0
  53. package/hooks/useUpdateEffect.d.ts +26 -0
  54. package/index.css +1 -1
  55. package/index.d.ts +7 -0
  56. package/index.js +3796 -3517
  57. package/package.json +1 -1
  58. package/types/color.d.ts +51 -8
  59. package/types/dialog.d.ts +0 -11
  60. package/types/motion.d.ts +55 -4
  61. package/utils/color.d.ts +5 -4
  62. package/utils/colorRegistry.d.ts +1 -1
  63. package/utils/generateMaterialColors.d.ts +38 -12
  64. package/utils/index.d.ts +1 -1
  65. package/utils/useUniqueId.d.ts +9 -0
  66. package/utils/utils.d.ts +1 -1
  67. package/components/dialogs/dialogActions.d.ts +0 -26
  68. package/components/dialogs/dialogActions.guards.d.ts +0 -15
  69. package/utils/uniqueID.d.ts +0 -14
package/assets/index.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './icons';
2
+ export * from './spinners';
@@ -0,0 +1,86 @@
1
+ import { default as React } from 'react';
2
+ /** Generic SVG props used by spinner assets. */
3
+ type SvgProps = React.ComponentPropsWithoutRef<'svg'>;
4
+ /** Circle-specific SVG props for spinner ring parts. */
5
+ type CircleProps = React.ComponentPropsWithoutRef<'circle'>;
6
+ /**
7
+ * Props for {@link SpinnerRingSvg}.
8
+ *
9
+ * @category Assets
10
+ */
11
+ interface SpinnerRingSvgProps extends SvgProps {
12
+ /** Props forwarded to the ring track circle element. */
13
+ trackProps?: CircleProps;
14
+ /** Props forwarded to the ring indicator circle element. */
15
+ indicatorProps?: CircleProps;
16
+ }
17
+ /**
18
+ * Ring spinner SVG asset.
19
+ *
20
+ * @category Assets
21
+ * @function
22
+ * @param props - SVG props including optional `trackProps` and `indicatorProps`.
23
+ * @param props.trackProps - Props forwarded to the track `<circle>`.
24
+ * @param props.indicatorProps - Props forwarded to the indicator `<circle>`.
25
+ *
26
+ * @example
27
+ * <SpinnerRingSvg className="uui-spinner" />
28
+ */
29
+ export declare const SpinnerRingSvg: ({ trackProps, indicatorProps, ...props }: SpinnerRingSvgProps) => import("react/jsx-runtime").JSX.Element;
30
+ /**
31
+ * Three-dots spinner SVG asset.
32
+ *
33
+ * @category Assets
34
+ * @function
35
+ * @param props - Standard SVG props.
36
+ */
37
+ export declare const SpinnerDotsSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
38
+ /**
39
+ * Blade-style spinner SVG asset.
40
+ *
41
+ * @category Assets
42
+ * @function
43
+ * @param props - Standard SVG props.
44
+ */
45
+ export declare const SpinnerBladeSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
46
+ /**
47
+ * Vertical-bars spinner SVG asset.
48
+ *
49
+ * @category Assets
50
+ * @function
51
+ * @param props - Standard SVG props.
52
+ */
53
+ export declare const SpinnerBarsSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
54
+ /**
55
+ * Orbit spinner SVG asset.
56
+ *
57
+ * @category Assets
58
+ * @function
59
+ * @param props - Standard SVG props.
60
+ */
61
+ export declare const SpinnerOrbitSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
62
+ /**
63
+ * Arc spinner SVG asset.
64
+ *
65
+ * @category Assets
66
+ * @function
67
+ * @param props - Standard SVG props.
68
+ */
69
+ export declare const SpinnerArcSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
70
+ /**
71
+ * Step-bar spinner SVG asset.
72
+ *
73
+ * @category Assets
74
+ * @function
75
+ * @param props - Standard SVG props.
76
+ */
77
+ export declare const SpinnerStepBarSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
78
+ /**
79
+ * Dual-ring spinner SVG asset.
80
+ *
81
+ * @category Assets
82
+ * @function
83
+ * @param props - Standard SVG props.
84
+ */
85
+ export declare const SpinnerDualRingSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
86
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { BoxBaseProps } from '../base';
3
3
  import { BaseColor, BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFont, ElementShape } from '../../utils';
4
- import { MotionAnimation, MotionStyle } from '../../types';
4
+ import { ElementAnimation } from '../../types';
5
5
  export type AccordionVariant = 'text' | 'pills' | 'grouped' | 'segmented';
6
6
  export type AccordionConfig = {
7
7
  variant?: AccordionVariant;
@@ -12,9 +12,7 @@ export type AccordionConfig = {
12
12
  border?: ElementBorder;
13
13
  borderColor?: BorderColor;
14
14
  shape?: ElementShape;
15
- animation?: MotionAnimation;
16
- motionStyle?: MotionStyle;
17
- duration?: number;
15
+ animation?: ElementAnimation;
18
16
  color?: BaseColor;
19
17
  disabled?: boolean;
20
18
  };
@@ -35,9 +33,7 @@ export interface AccordionProps extends Omit<BoxBaseProps, 'type' | 'gap' | 'gap
35
33
  border?: ElementBorder;
36
34
  borderColor?: BorderColor;
37
35
  font?: ElementFont;
38
- animation?: MotionAnimation;
39
- motionStyle?: MotionStyle;
40
- duration?: number;
36
+ animation?: ElementAnimation;
41
37
  }
42
38
  /**
43
39
  * Container component that manages accordion selection state.
@@ -49,4 +45,4 @@ export interface AccordionProps extends Omit<BoxBaseProps, 'type' | 'gap' | 'gap
49
45
  *
50
46
  * @category Accordion
51
47
  */
52
- export declare const Accordion: ({ type, variant, children, density, border, borderColor, elevation, showIcon, font, shape, animation, motionStyle, duration, color, disabled, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const Accordion: ({ type, variant, children, density, border, borderColor, elevation, showIcon, font, shape, animation, color, disabled, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { default as React, ReactNode } from 'react';
2
2
  import { IS_ACCORDION_ITEM } from './accordionItem.guards';
3
3
  import { AccordionVariant } from './accordion';
4
4
  import { ElementFocusEffect, ElementFont, ElementHoverEffect, ElementPressedEffect, ElementSelectedEffect, ElementTouchEffect, SurfaceColor } from '../../utils';
5
- import { MotionAnimation, MotionStyle } from '../../types';
5
+ import { ElementAnimation } from '../../types';
6
6
  /**
7
7
  * Props for {@link AccordionItem}.
8
8
  *
@@ -21,9 +21,7 @@ export interface AccordionItemProps {
21
21
  showIcon?: boolean;
22
22
  variant?: AccordionVariant;
23
23
  font?: ElementFont;
24
- animation?: MotionAnimation;
25
- motionStyle?: MotionStyle;
26
- duration?: number;
24
+ animation?: ElementAnimation;
27
25
  flush?: boolean;
28
26
  divided?: boolean;
29
27
  onFocus?: React.FocusEventHandler<HTMLButtonElement>;
@@ -52,7 +50,7 @@ export interface AccordionItemProps {
52
50
  * @category Accordion
53
51
  */
54
52
  export declare const AccordionItem: {
55
- ({ value, label, children, leading, trailing, showIcon, icon, font, variant, animation, duration, motionStyle, flush, divided, onFocus, onBlur, color, disabled, hoverEffects, focusEffects, pressedEffects, touchEffects, selectedEffects, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
53
+ ({ value, label, children, leading, trailing, showIcon, icon, font, variant, animation, flush, divided, onFocus, onBlur, color, disabled, hoverEffects, focusEffects, pressedEffects, touchEffects, selectedEffects, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
56
54
  /**
57
55
  * Marks this component as an AccordionItem for runtime type guards.
58
56
  *
@@ -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. */
@@ -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, ReactNode } from 'react';
2
2
  import { BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPlacement, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor, SurfaceColor } from '../../utils';
3
- import { MotionAnimation, MotionStyle } from '../../types';
3
+ import { ElementAnimation } from '../../types';
4
4
  /**
5
5
  * Props for the CheckboxBase component.
6
6
  *
@@ -10,8 +10,8 @@ import { MotionAnimation, MotionStyle } from '../../types';
10
10
  * @category Base components
11
11
  */
12
12
  export interface CheckboxBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'size'> {
13
- /** Animation preset for check and uncheck transitions. */
14
- animation?: MotionAnimation;
13
+ /** Motion value (`MotionAnimation` or full motion config). */
14
+ animation?: ElementAnimation;
15
15
  /** Border style. */
16
16
  border?: ElementBorder;
17
17
  /** Border color override. */
@@ -30,8 +30,6 @@ export interface CheckboxBaseProps extends Omit<React.InputHTMLAttributes<HTMLIn
30
30
  descriptionColor?: SurfaceColor;
31
31
  /** Font applied to the description text. */
32
32
  descriptionFont?: ElementFont;
33
- /** Duration in milliseconds for the check or uncheck animation. */
34
- duration?: number;
35
33
  /** Required root class name for styling. */
36
34
  elementClass: string;
37
35
  /** Elevation level applied to the glyph. */
@@ -60,8 +58,6 @@ export interface CheckboxBaseProps extends Omit<React.InputHTMLAttributes<HTMLIn
60
58
  label?: string;
61
59
  /** Text color override for the label. */
62
60
  labelColor?: SurfaceColor;
63
- /** Motion style applied to animated elements. */
64
- motionStyle?: MotionStyle;
65
61
  /** DOM name attribute. */
66
62
  name?: string;
67
63
  /** Change event handler. */
@@ -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, ElementAnimation } from '../../types';
4
4
  /**
5
5
  * Props for the DialogBase component.
6
6
  *
@@ -38,10 +38,8 @@ export interface DialogBaseProps {
38
38
  fit?: boolean;
39
39
  /** Renders the panel in detached layout style. */
40
40
  detached?: boolean;
41
- /** Animation preset; `'none'` disables motion. */
42
- animation?: DialogAnimation;
43
- /** Duration in milliseconds for open and close animations. Default: 500 */
44
- duration?: number;
41
+ /** Motion value (`MotionAnimation` or full motion config). */
42
+ animation?: ElementAnimation;
45
43
  /** Whether the dialog closes when the backdrop is clicked. Default: true */
46
44
  closeOnBackdrop?: boolean;
47
45
  /** Whether the dialog closes when Escape is pressed. Default: true */
@@ -90,8 +88,6 @@ export interface DialogBaseProps {
90
88
  onBack?: () => void;
91
89
  /** Additional class names for the dialog panel. */
92
90
  className?: string;
93
- /** Motion style helper classes for the panel. */
94
- motionStyle?: MotionStyle;
95
91
  /** Enables modal behaviour, focus trap, aria-modal, and body scroll lock when applicable. */
96
92
  modal?: boolean;
97
93
  /** Focuses the dialog when opened (with modal focus trap). */
@@ -1,5 +1,6 @@
1
1
  import { default as React, HTMLAttributes, ReactNode } from 'react';
2
- import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, SurfaceColor } from '../../utils';
2
+ import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape } from '../../utils';
3
+ import { TextColor } from '../../types';
3
4
  /**
4
5
  * Props for {@link TextBase}.
5
6
  *
@@ -10,23 +11,23 @@ import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape
10
11
  */
11
12
  export interface TextBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
12
13
  /** 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;
14
+ as?: React.ElementType;
22
15
  /** Border width (0–5). */
23
16
  border?: ElementBorder;
24
17
  /** Border color token. */
25
18
  borderColor?: BorderColor;
26
- /** Semantic UUI element class (e.g. uui-text, uui-heading). */
27
- elementClass?: string;
28
19
  /** Text content. */
29
20
  children?: ReactNode;
21
+ /** Text color token. */
22
+ color?: TextColor;
23
+ /** Semantic UUI element class (e.g. uui-text, uui-heading). */
24
+ elementClass?: string;
25
+ /** Elevation level (0–5). */
26
+ elevation?: ElementElevation;
27
+ /** Font token controlling typography (size, weight, line-height). */
28
+ font?: ElementFont;
29
+ /** Shape/border-radius token. */
30
+ shape?: ElementShape;
30
31
  }
31
32
  /**
32
33
  * TextBase — core typography primitive powering semantic text components.
@@ -1,7 +1,7 @@
1
1
  import { default as React, ElementType, ReactNode } from 'react';
2
2
  import { BoxBaseProps } from '../base';
3
3
  import { ElementDensity, ElementFont, SurfaceColor } from '../../utils';
4
- import { MotionAnimation, MotionStyle } from '../../types';
4
+ import { ElementAnimation } from '../../types';
5
5
  /**
6
6
  * Breadcrumb item.
7
7
  *
@@ -30,14 +30,12 @@ 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;
37
37
  color?: SurfaceColor;
38
- animation?: MotionAnimation;
39
- motionStyle?: MotionStyle;
40
- duration?: number;
38
+ animation?: ElementAnimation;
41
39
  }
42
40
  /**
43
41
  * Breadcrumbs navigation component.
@@ -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,6 +1,6 @@
1
- import { default as React, ElementType, ReactElement, ReactNode } from 'react';
2
- import { BorderColor, ElementElevation, ElementFont, ElementShape, SurfaceColor } from '../../utils';
3
- import { DialogAnimation, DialogIconSlot, MotionStyle } from '../../types';
1
+ import { default as React, ElementType, ReactNode } from 'react';
2
+ import { BorderColor, ElementElevation, ElementShape, SurfaceColor } from '../../utils';
3
+ import { ElementAnimation } from '../../types';
4
4
  import { BoxBaseProps } from '../base';
5
5
  export type CardVariant = 'elevated' | 'filled' | 'outlined';
6
6
  /**
@@ -12,19 +12,17 @@ export type CardVariant = 'elevated' | 'filled' | 'outlined';
12
12
  */
13
13
  export interface CardProps extends Omit<BoxBaseProps, 'type' | 'elementClass' | 'color' | 'elevation' | 'borderColor'> {
14
14
  /** Underlying element/component. Default: `article`. */
15
- component?: ElementType;
15
+ as?: ElementType;
16
16
  /** Card content. */
17
17
  children?: ReactNode;
18
+ /** Removes default inner spacing from the card content area. */
19
+ flush?: boolean;
18
20
  /** Card variant. Default: `elevated`. */
19
21
  variant?: CardVariant;
20
22
  /** Whether the card is visible. */
21
23
  open?: boolean;
22
- /** Entry/exit animation preset. Use `none` to disable. */
23
- animation?: DialogAnimation;
24
- /** Animation duration in ms. */
25
- duration?: number;
26
- /** Motion style helper classes. */
27
- motionStyle?: MotionStyle;
24
+ /** Motion value (`MotionAnimation` or full motion config). */
25
+ animation?: ElementAnimation;
28
26
  /** Surface color token override. */
29
27
  color?: SurfaceColor;
30
28
  /** Elevation override. */
@@ -33,48 +31,7 @@ export interface CardProps extends Omit<BoxBaseProps, 'type' | 'elementClass' |
33
31
  shape?: ElementShape;
34
32
  /** Border color override (used by outlined cards). */
35
33
  borderColor?: BorderColor;
36
- /** Visual title text. */
37
- label?: string;
38
34
  /** Accessible label for cards without visible title. */
39
35
  'aria-label'?: string;
40
- /** Card icon. */
41
- icon?: ReactElement;
42
- showIcon?: boolean;
43
- iconColor?: SurfaceColor;
44
- iconSlot?: DialogIconSlot;
45
- /** Title alignment. */
46
- titleAlign?: 'start' | 'center' | 'end';
47
- /** Header leading slot content. */
48
- leading?: ReactNode;
49
- /** Header trailing slot content. */
50
- trailing?: ReactNode;
51
- /** Header/content actions. */
52
- actions?: ReactNode;
53
- /** Actions placement. Default: `bottom`. */
54
- actionsPlacement?: 'top' | 'subtitle' | 'bottom' | 'inline';
55
- /** Actions alignment. */
56
- actionsAlign?: 'start' | 'center' | 'end';
57
- /** Stack actions vertically. */
58
- actionsStack?: boolean;
59
- /** Maximum number of visible actions before overflow. */
60
- maxActions?: number;
61
- /** Overflow button label. */
62
- moreLabel?: string;
63
- /** Overflow button icon. */
64
- moreIcon?: ReactElement;
65
- /** Shows close button in header. */
66
- showClose?: boolean;
67
- /** Close button icon override. */
68
- closeIcon?: ReactElement;
69
- /** Shows back button in header. */
70
- showBack?: boolean;
71
- /** Back button icon override. */
72
- backIcon?: ReactElement;
73
- /** Back button handler. Defaults to onClose. */
74
- onBack?: () => void;
75
- /** Close button handler. */
76
- onClose?: () => void;
77
- /** Header title font token. */
78
- titleFont?: ElementFont;
79
36
  }
80
37
  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,24 +1,20 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { BoxBaseProps } from '../base';
3
- import { MotionAnimation, MotionStyle } from '../../types';
3
+ import { ElementAnimation } from '../../types';
4
4
  /**
5
5
  * Props for the Collapse component.
6
6
  *
7
7
  * @category Collapse
8
8
  */
9
9
  export interface CollapseProps extends Omit<BoxBaseProps, 'elevation'> {
10
- /** Motion animation key. Default: slideDown. */
11
- animation?: MotionAnimation;
10
+ /** Motion value (`MotionAnimation` or full motion config). */
11
+ animation?: ElementAnimation;
12
12
  /** Content rendered inside the container. */
13
13
  children?: ReactNode;
14
14
  /** Additional root class name. */
15
15
  className?: string;
16
- /** Animation duration in milliseconds. Default: 220. */
17
- duration?: number;
18
- /** Motion style variant. */
19
- motionStyle?: MotionStyle;
20
16
  /** Controls whether the container is expanded. */
21
- open: boolean;
17
+ open?: boolean;
22
18
  }
23
19
  /**
24
20
  * Animated container that expands and collapses vertically.
@@ -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. */