@ufoui/core 0.0.5 → 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 (80) hide show
  1. package/assets/icons.d.ts +8 -2
  2. package/components/accordion/accordion.d.ts +31 -3
  3. package/components/accordion/accordionItem.d.ts +31 -3
  4. package/components/badge/badge.d.ts +2 -2
  5. package/components/base/boxBase.d.ts +14 -36
  6. package/components/base/buttonBase.d.ts +4 -4
  7. package/components/base/checkboxBase.d.ts +2 -2
  8. package/components/base/dialogBase.d.ts +111 -13
  9. package/components/base/fieldBase.d.ts +1 -2
  10. package/components/base/textBase.d.ts +1 -2
  11. package/components/breadcrumbs/breadcrumbs.d.ts +48 -0
  12. package/components/calendar/calendar.d.ts +23 -0
  13. package/components/calendar/calendarUtils.d.ts +18 -0
  14. package/components/card/card.d.ts +2 -2
  15. package/components/collapse/collapse.d.ts +15 -20
  16. package/components/dialogs/dialog.d.ts +1 -1
  17. package/components/dialogs/dialogActions.d.ts +19 -7
  18. package/components/dialogs/dialogActions.guards.d.ts +15 -0
  19. package/components/dialogs/dialogContent.d.ts +7 -1
  20. package/components/dialogs/dialogHeader.d.ts +60 -0
  21. package/components/dialogs/dialogTitle.d.ts +9 -5
  22. package/components/dialogs/drawer.d.ts +1 -1
  23. package/components/dialogs/index.d.ts +1 -0
  24. package/components/fieldset/fieldset.d.ts +1 -1
  25. package/components/link/link.d.ts +58 -0
  26. package/components/list/list.d.ts +1 -1
  27. package/components/menu/menu.d.ts +2 -2
  28. package/components/rating/rating.d.ts +68 -0
  29. package/components/slider/slider.d.ts +11 -0
  30. package/components/switch/switch.d.ts +2 -10
  31. package/components/themeProvider/themeProvider.d.ts +10 -15
  32. package/components/toast/toast.d.ts +18 -4
  33. package/components/toast/toastViewport.d.ts +4 -3
  34. package/components/tooltip/tooltip.d.ts +2 -2
  35. package/context/selectionContext.d.ts +18 -17
  36. package/hooks/index.d.ts +3 -1
  37. package/hooks/useAnimate.d.ts +36 -16
  38. package/hooks/useFocusTrap.d.ts +32 -0
  39. package/hooks/useFocusVisible.d.ts +16 -14
  40. package/hooks/useResizeObserver.d.ts +7 -3
  41. package/hooks/useRovingFocus.d.ts +30 -0
  42. package/hooks/useSelection.d.ts +10 -7
  43. package/hooks/useSelectionState.d.ts +29 -0
  44. package/hooks/useSliderKeys.d.ts +41 -0
  45. package/index.css +1 -1
  46. package/index.d.ts +4 -8
  47. package/index.js +4782 -0
  48. package/internal/controlGrid/controlGrid.d.ts +32 -0
  49. package/internal/controlLabel/controlLabel.d.ts +31 -0
  50. package/internal/description/description.d.ts +18 -0
  51. package/internal/icon/icon.d.ts +28 -0
  52. package/internal/index.d.ts +7 -0
  53. package/internal/inlineTooltip/index.d.ts +1 -0
  54. package/internal/inlineTooltip/inlineTooltipManager.d.ts +3 -3
  55. package/internal/slots/slot.d.ts +44 -0
  56. package/internal/stateLayer/stateLayer.d.ts +33 -0
  57. package/package.json +12 -3
  58. package/types/dialog.d.ts +37 -0
  59. package/types/index.d.ts +1 -0
  60. package/types/motion.d.ts +2 -2
  61. package/types/theme.d.ts +0 -30
  62. package/utils/applyThemeTokens.d.ts +10 -0
  63. package/utils/calculateFloatingPosition.d.ts +3 -3
  64. package/utils/color.d.ts +61 -216
  65. package/utils/colorRegistry.d.ts +44 -0
  66. package/utils/controlStyle.d.ts +8 -8
  67. package/utils/flatChildren.d.ts +17 -0
  68. package/utils/generateMaterialColors.d.ts +7 -7
  69. package/utils/getWrapperStyle.d.ts +53 -0
  70. package/utils/index.d.ts +5 -1
  71. package/utils/renderPortal.d.ts +30 -0
  72. package/utils/toasts/ensureViewport.d.ts +6 -1
  73. package/utils/toasts/toast.d.ts +66 -10
  74. package/utils/toasts/toastStore.d.ts +55 -1
  75. package/utils/utils.d.ts +67 -55
  76. package/hooks/useFocusState.d.ts +0 -16
  77. package/index.mjs +0 -4649
  78. package/internal/inlineTooltip/inlineTooltip.d.ts +0 -11
  79. package/internal/inlineTooltip/inlineTooltip2.d.ts +0 -10
  80. package/utils/generateSchemes.d.ts +0 -32
package/assets/icons.d.ts CHANGED
@@ -1,8 +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;
12
+ export declare const ExpandIcon: import("react/jsx-runtime").JSX.Element;
13
+ export declare const StarIcon: import("react/jsx-runtime").JSX.Element;
14
+ export declare const StarFilledIcon: import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,43 @@
1
1
  import { ReactNode } from 'react';
2
- import { BoxBaseProps } from '../base/boxBase';
2
+ import { BoxBaseProps } from '../base';
3
+ import { BaseColor, BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFont, ElementShape } from '../../utils';
4
+ import { MotionAnimation, MotionStyle } from '../../types';
5
+ export type AccordionVariant = 'text' | 'pills' | 'grouped' | 'segmented';
6
+ export type AccordionConfig = {
7
+ variant?: AccordionVariant;
8
+ density?: ElementDensity;
9
+ elevation?: ElementElevation;
10
+ showIcon?: boolean;
11
+ font?: ElementFont;
12
+ border?: ElementBorder;
13
+ borderColor?: BorderColor;
14
+ shape?: ElementShape;
15
+ animation?: MotionAnimation;
16
+ motionStyle?: MotionStyle;
17
+ duration?: number;
18
+ color?: BaseColor;
19
+ disabled?: boolean;
20
+ };
3
21
  /**
4
22
  * Props for {@link Accordion}.
5
23
  *
6
24
  * @category Accordion
7
25
  */
8
- export interface AccordionProps extends Omit<BoxBaseProps, 'type'> {
26
+ export interface AccordionProps extends Omit<BoxBaseProps, 'type' | 'gap' | 'gapY' | 'gapX'> {
9
27
  /** Accordion behavior mode. Default: 'single'. */
10
28
  type?: 'single' | 'multiple';
11
29
  /** Accordion items. */
12
30
  children: ReactNode;
31
+ variant: AccordionVariant;
32
+ elevation?: ElementElevation;
33
+ density?: ElementDensity;
34
+ showIcon?: boolean;
35
+ border?: ElementBorder;
36
+ borderColor?: BorderColor;
37
+ font?: ElementFont;
38
+ animation?: MotionAnimation;
39
+ motionStyle?: MotionStyle;
40
+ duration?: number;
13
41
  }
14
42
  /**
15
43
  * Container component that manages accordion selection state.
@@ -21,4 +49,4 @@ export interface AccordionProps extends Omit<BoxBaseProps, 'type'> {
21
49
  *
22
50
  * @category Accordion
23
51
  */
24
- export declare const Accordion: ({ type, children, ...rest }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
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;
@@ -1,5 +1,8 @@
1
- import { ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  import { IS_ACCORDION_ITEM } from './accordionItem.guards';
3
+ import { AccordionVariant } from './accordion';
4
+ import { ElementFocusEffect, ElementFont, ElementHoverEffect, ElementPressedEffect, ElementSelectedEffect, ElementTouchEffect, SurfaceColor } from '../../utils';
5
+ import { MotionAnimation, MotionStyle } from '../../types';
3
6
  /**
4
7
  * Props for {@link AccordionItem}.
5
8
  *
@@ -9,9 +12,34 @@ export interface AccordionItemProps {
9
12
  /** Unique item value used to control selection state. */
10
13
  value: string;
11
14
  /** Item header content rendered inside the trigger button. */
12
- title: ReactNode;
15
+ label: ReactNode;
13
16
  /** Panel content displayed when the item is expanded. */
14
17
  children: ReactNode;
18
+ leading?: ReactNode;
19
+ trailing?: ReactNode;
20
+ icon?: ReactNode;
21
+ showIcon?: boolean;
22
+ variant?: AccordionVariant;
23
+ font?: ElementFont;
24
+ animation?: MotionAnimation;
25
+ motionStyle?: MotionStyle;
26
+ duration?: number;
27
+ flush?: boolean;
28
+ divided?: boolean;
29
+ onFocus?: React.FocusEventHandler<HTMLButtonElement>;
30
+ onBlur?: React.FocusEventHandler<HTMLButtonElement>;
31
+ /** Hover visual effects. */
32
+ hoverEffects?: ElementHoverEffect[];
33
+ /** Focus visual effects. */
34
+ focusEffects?: ElementFocusEffect[];
35
+ /** Pressed visual effects. */
36
+ pressedEffects?: ElementPressedEffect[];
37
+ /** Touch and click visual effects. */
38
+ touchEffects?: ElementTouchEffect[];
39
+ /** Visual effects applied when selected. */
40
+ selectedEffects?: ElementSelectedEffect[];
41
+ color?: SurfaceColor;
42
+ disabled?: boolean;
15
43
  }
16
44
  /**
17
45
  * Single accordion item consisting of a trigger and collapsible content.
@@ -24,7 +52,7 @@ export interface AccordionItemProps {
24
52
  * @category Accordion
25
53
  */
26
54
  export declare const AccordionItem: {
27
- ({ value, title, children, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
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;
28
56
  /**
29
57
  * Marks this component as an AccordionItem for runtime type guards.
30
58
  *
@@ -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
- import { default as React, HTMLAttributes, ReactNode } from 'react';
2
- import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, SurfaceColor } from '../../utils';
1
+ import { CSSProperties, ElementType, HTMLAttributes, ReactNode } from 'react';
2
+ import { BaseColor, BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, WrapperProps } from '../../utils';
3
3
  /**
4
4
  * Layout mode for {@link BoxBase}.
5
5
  *
@@ -27,27 +27,25 @@ export type BoxDirection = 'row' | 'col';
27
27
  *
28
28
  * @category Box
29
29
  */
30
- export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'content'> {
30
+ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'content'>, WrapperProps {
31
31
  /** Maps to `align-content` (grid/flex-wrap content alignment). */
32
- alignContent?: React.CSSProperties['alignContent'];
32
+ alignContent?: CSSProperties['alignContent'];
33
33
  /** Maps to `align-items` (cross-axis alignment). */
34
- alignItems?: React.CSSProperties['alignItems'];
34
+ alignItems?: CSSProperties['alignItems'];
35
35
  /** Border width (0–5). */
36
36
  border?: ElementBorder;
37
37
  /** Border color token. */
38
38
  borderColor?: BorderColor;
39
- /** Bottom offset. */
40
- bottom?: number | string;
41
39
  /** React children inside the box. */
42
40
  children?: ReactNode;
43
41
  /** Layout direction shortcut. Same as `direction="col"`. */
44
42
  col?: boolean;
45
43
  /** Surface background token. Default: `'surface'`. */
46
- color?: SurfaceColor;
44
+ color?: BaseColor;
47
45
  /** Grid template columns (`3` → `repeat(3, 1fr)`). */
48
46
  cols?: number | string;
49
47
  /** Custom HTML element/component. Default: `div`. */
50
- component?: React.ElementType;
48
+ component?: ElementType;
51
49
  /** Layout direction (`row` or `col`) for flex. Ignored if `row` or `col` is set. */
52
50
  direction?: BoxDirection;
53
51
  /** Native disabled attribute. Applied when supported by the rendered element. */
@@ -75,23 +73,7 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
75
73
  /** Renders as `inline-flex`, `inline-grid` or `inline-block`. */
76
74
  inline?: boolean;
77
75
  /** Maps to `justify-content` (main-axis alignment). */
78
- justifyContent?: React.CSSProperties['justifyContent'];
79
- /** Left offset. */
80
- left?: number | string;
81
- /** Margin (all sides). */
82
- m?: number | string;
83
- /** Margin bottom. */
84
- mb?: number | string;
85
- /** Margin left. */
86
- ml?: number | string;
87
- /** Margin right. */
88
- mr?: number | string;
89
- /** Margin top. */
90
- mt?: number | string;
91
- /** Horizontal margin (`margin-left` + `margin-right`). */
92
- mx?: number | string;
93
- /** Vertical margin (`margin-top` + `margin-bottom`). */
94
- my?: number | string;
76
+ justifyContent?: CSSProperties['justifyContent'];
95
77
  /** Padding (all sides). */
96
78
  p?: number | string;
97
79
  /** Padding bottom. */
@@ -99,9 +81,7 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
99
81
  /** Padding left. */
100
82
  pl?: number | string;
101
83
  /** Maps to `place-items` (grid shortcut for align+justify items). */
102
- placeItems?: React.CSSProperties['placeItems'];
103
- /** CSS position (mapped to `uui-*` class). */
104
- position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
84
+ placeItems?: CSSProperties['placeItems'];
105
85
  /** Padding right. */
106
86
  pr?: number | string;
107
87
  /** Padding top. */
@@ -110,22 +90,20 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
110
90
  px?: number | string;
111
91
  /** Vertical padding (`padding-top` + `padding-bottom`). */
112
92
  py?: number | string;
113
- /** Right offset. */
114
- right?: number | string;
115
93
  /** Layout direction shortcut. Same as `direction="row"`. */
116
94
  row?: boolean;
117
95
  /** Grid template rows (`2` → `repeat(2, 1fr)`). */
118
96
  rows?: number | string;
119
97
  /** Shape/border-radius token (round, rounded, smooth, square). */
120
98
  shape?: ElementShape;
121
- /** Top offset. */
122
- top?: number | string;
123
99
  /** Layout mode (`flex`, `grid`, `block`). Default: `flex`. */
124
100
  type?: BoxType;
125
101
  /** Enables wrapping (`flex-wrap: wrap`). */
126
102
  wrap?: boolean;
127
- /** Stacking order (z-index). */
128
- zIndex?: number;
103
+ /** Width. */
104
+ w?: number | string;
105
+ /** Height. */
106
+ h?: number | string;
129
107
  }
130
108
  /**
131
109
  * `BoxBase` — core layout primitive powering all semantic containers
@@ -152,4 +130,4 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
152
130
  *
153
131
  * @category Box
154
132
  */
155
- export declare const BoxBase: React.ForwardRefExoticComponent<BoxBaseProps & React.RefAttributes<HTMLElement>>;
133
+ export declare const BoxBase: import('react').ForwardRefExoticComponent<BoxBaseProps & import('react').RefAttributes<HTMLElement>>;
@@ -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
  *
@@ -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,32 +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 = 'auto' | '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 {
7
- elementClass: string;
13
+ /** Semantic UUI element class for the dialog panel. */
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;
33
+ /** Expands panel to full width. */
34
+ fullWidth?: boolean;
35
+ /** Expands panel to full height. */
36
+ fullHeight?: boolean;
37
+ /** Fits content to the panel. */
38
+ fit?: boolean;
39
+ /** Renders the panel in detached layout style. */
40
+ detached?: boolean;
41
+ /** Animation preset; `'none'` disables motion. */
17
42
  animation?: DialogAnimation;
43
+ /** Duration in milliseconds for open and close animations. Default: 500 */
18
44
  duration?: number;
19
- disableBackdropClose?: boolean;
20
- 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. */
21
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. */
22
92
  className?: string;
93
+ /** Motion style helper classes for the panel. */
23
94
  motionStyle?: MotionStyle;
95
+ /** Enables modal behaviour, focus trap, aria-modal, and body scroll lock when applicable. */
24
96
  modal?: boolean;
25
- title?: string;
26
- actions?: ReactNode[];
27
- icon?: ReactNode;
28
- showCloseButton?: boolean;
29
- showHandle?: boolean;
97
+ /** Focuses the dialog when opened (with modal focus trap). */
30
98
  autoFocus?: boolean;
99
+ /** Removes default panel padding. */
100
+ flush?: boolean;
101
+ /** Renders inline without a portal (e.g. docked regions). */
102
+ docked?: boolean;
103
+ /** Skips portaling and modal body scroll lock; for anchored overlays. */
104
+ anchored?: boolean;
105
+ font?: ElementFont;
106
+ titleFont?: ElementFont;
31
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
+ */
32
130
  export declare const DialogBase: React.ForwardRefExoticComponent<DialogBaseProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { ElementBorder, ElementDensity, ElementFont, ElementShape } from '../../utils/utils';
3
- import { BorderColor, SemanticColor, SurfaceColor } from '../../utils/color';
2
+ import { BorderColor, ElementBorder, ElementDensity, ElementFont, ElementShape, SemanticColor, SurfaceColor } from '../../utils';
4
3
  type FieldVariant = 'filled' | 'outlined' | 'classic';
5
4
  export interface FieldBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'children'> {
6
5
  color?: SemanticColor;
@@ -1,6 +1,5 @@
1
1
  import { default as React, HTMLAttributes, ReactNode } from 'react';
2
- import { ElementBorder, ElementElevation, ElementFont, ElementShape } from '../../utils/utils';
3
- import { BorderColor, SurfaceColor } from '../../utils/color';
2
+ import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, SurfaceColor } from '../../utils';
4
3
  /**
5
4
  * Props for {@link TextBase}.
6
5
  *
@@ -0,0 +1,48 @@
1
+ import { default as React, ElementType, ReactNode } from 'react';
2
+ import { BoxBaseProps } from '../base';
3
+ import { ElementDensity, ElementFont, SurfaceColor } from '../../utils';
4
+ import { MotionAnimation, MotionStyle } from '../../types';
5
+ /**
6
+ * Breadcrumb item.
7
+ *
8
+ * @function
9
+ * @param props - Item props.
10
+ */
11
+ export interface BreadcrumbItem {
12
+ label: ReactNode;
13
+ href?: string;
14
+ icon?: ReactNode;
15
+ current?: boolean;
16
+ disabled?: boolean;
17
+ }
18
+ /**
19
+ * Props for Breadcrumbs component.
20
+ *
21
+ * @category Navigation
22
+ */
23
+ export interface BreadcrumbsProps extends BoxBaseProps {
24
+ items?: BreadcrumbItem[];
25
+ children?: ReactNode;
26
+ separator?: ReactNode;
27
+ maxItems?: number;
28
+ itemsBeforeCollapse?: number;
29
+ itemsAfterCollapse?: number;
30
+ renderItem?: (item: BreadcrumbItem, index: number) => ReactNode;
31
+ renderSeparator?: (index: number) => ReactNode;
32
+ renderCollapse?: (items: BreadcrumbItem[]) => ReactNode;
33
+ component?: ElementType;
34
+ itemComponent?: ElementType;
35
+ density?: ElementDensity;
36
+ font?: ElementFont;
37
+ color?: SurfaceColor;
38
+ animation?: MotionAnimation;
39
+ motionStyle?: MotionStyle;
40
+ duration?: number;
41
+ }
42
+ /**
43
+ * Breadcrumbs navigation component.
44
+ *
45
+ * @function
46
+ * @param props - Component props.
47
+ */
48
+ export declare const Breadcrumbs: React.ForwardRefExoticComponent<BreadcrumbsProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { BoxBaseProps } from '../base';
3
+ /**
4
+ * Props for Calendar component.
5
+ *
6
+ * @category Calendar
7
+ */
8
+ export interface CalendarProps extends Omit<BoxBaseProps, 'onChange'> {
9
+ /** The currently selected date. */
10
+ value?: Date;
11
+ /** Callback fired when a date is selected. */
12
+ onChange?: (date: Date) => void;
13
+ /** The date that is currently visible in the calendar. */
14
+ viewDate?: Date;
15
+ }
16
+ /**
17
+ * Calendar component following MD3 guidelines.
18
+ *
19
+ * @function
20
+ * @param props Component properties.
21
+ * @category Calendar
22
+ */
23
+ export declare const Calendar: React.ForwardRefExoticComponent<CalendarProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,18 @@
1
+ export interface CalendarDay {
2
+ date: Date;
3
+ isCurrentMonth: boolean;
4
+ isToday: boolean;
5
+ isSelected: boolean;
6
+ }
7
+ export declare const isSameDay: (d1: Date, d2: Date) => boolean;
8
+ export declare const isSameMonth: (d1: Date, d2: Date) => boolean;
9
+ export declare const isToday: (date: Date) => boolean;
10
+ export declare const startOfMonth: (date: Date) => Date;
11
+ export declare const endOfMonth: (date: Date) => Date;
12
+ export declare const startOfWeek: (date: Date, weekStartsOn?: number) => Date;
13
+ export declare const endOfWeek: (date: Date, weekStartsOn?: number) => Date;
14
+ export declare const addMonths: (date: Date, months: number) => Date;
15
+ export declare const addDays: (date: Date, days: number) => Date;
16
+ export declare const getMonthDays: (viewDate: Date, selectedDate?: Date) => CalendarDay[];
17
+ export declare const getWeekDaysShort: () => string[];
18
+ export declare const formatMonthYear: (date: Date) => string;
@@ -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,38 +1,33 @@
1
1
  import { ReactNode } from 'react';
2
- import { ElementOrientation } from '../../utils';
3
- import { BoxBaseProps } from '../base/boxBase';
2
+ import { BoxBaseProps } from '../base';
4
3
  import { MotionAnimation, MotionStyle } from '../../types';
5
4
  /**
6
5
  * Props for the Collapse component.
7
6
  *
8
- * @category Base components
7
+ * @category Collapse
9
8
  */
10
- export interface CollapseProps extends BoxBaseProps {
11
- /** Controls whether the container is expanded. */
12
- open: boolean;
13
- /** Motion animation key. Default: slideDown */
9
+ export interface CollapseProps extends Omit<BoxBaseProps, 'elevation'> {
10
+ /** Motion animation key. Default: slideDown. */
14
11
  animation?: MotionAnimation;
15
- /** Animation duration in milliseconds. Default: 250 */
16
- duration?: number;
17
- /** Motion style variant. */
18
- motionStyle?: MotionStyle;
19
- /** Custom content rendered inside the container. */
12
+ /** Content rendered inside the container. */
20
13
  children?: ReactNode;
21
14
  /** Additional root class name. */
22
15
  className?: string;
23
- /** Collapse axis. Default: vertical */
24
- orientation?: ElementOrientation;
16
+ /** Animation duration in milliseconds. Default: 220. */
17
+ duration?: number;
18
+ /** Motion style variant. */
19
+ motionStyle?: MotionStyle;
20
+ /** Controls whether the container is expanded. */
21
+ open: boolean;
25
22
  }
26
23
  /**
27
- * Animated layout container that expands and collapses
28
- * along vertical or horizontal axis.
24
+ * Animated container that expands and collapses vertically.
29
25
  *
30
- * Combines dimension animation (height / width)
31
- * with UUI motion system.
26
+ * Animates height and integrates with the UUI motion system.
32
27
  *
33
28
  * @function
34
- * @param props - Component properties.
29
+ * @param props Component properties.
35
30
  *
36
- * @category Base components
31
+ * @category Collapse
37
32
  */
38
33
  export declare const Collapse: import('react').ForwardRefExoticComponent<CollapseProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { DialogBaseProps } from '../base/dialogBase';
1
+ import { DialogBaseProps } from '../base';
2
2
  /**
3
3
  * Props for {@link Dialog}.
4
4
  * Extends {@link DialogBaseProps}.