@ufoui/core 0.0.5 → 0.0.12

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 (57) hide show
  1. package/assets/icons.d.ts +3 -0
  2. package/components/accordion/accordion.d.ts +31 -3
  3. package/components/accordion/accordionItem.d.ts +31 -3
  4. package/components/base/boxBase.d.ts +15 -37
  5. package/components/base/buttonBase.d.ts +1 -1
  6. package/components/base/dialogBase.d.ts +9 -7
  7. package/components/base/fieldBase.d.ts +2 -3
  8. package/components/base/textBase.d.ts +1 -2
  9. package/components/breadcrumbs/breadcrumbs.d.ts +48 -0
  10. package/components/calendar/calendar.d.ts +23 -0
  11. package/components/calendar/calendarUtils.d.ts +18 -0
  12. package/components/collapse/collapse.d.ts +15 -20
  13. package/components/dialogs/dialog.d.ts +1 -1
  14. package/components/dialogs/dialogTitle.d.ts +1 -1
  15. package/components/dialogs/drawer.d.ts +1 -1
  16. package/components/fieldset/fieldset.d.ts +1 -1
  17. package/components/link/link.d.ts +58 -0
  18. package/components/list/list.d.ts +1 -1
  19. package/components/rating/rating.d.ts +68 -0
  20. package/components/slider/slider.d.ts +11 -0
  21. package/components/switch/switch.d.ts +1 -9
  22. package/components/toast/toast.d.ts +18 -4
  23. package/components/toast/toastViewport.d.ts +4 -3
  24. package/components/toolbar/toolbar.d.ts +1 -1
  25. package/context/selectionContext.d.ts +18 -17
  26. package/hooks/index.d.ts +3 -1
  27. package/hooks/useAnimate.d.ts +36 -16
  28. package/hooks/useFocusTrap.d.ts +32 -0
  29. package/hooks/useFocusVisible.d.ts +16 -14
  30. package/hooks/useResizeObserver.d.ts +7 -3
  31. package/hooks/useRovingFocus.d.ts +30 -0
  32. package/hooks/useSelection.d.ts +10 -7
  33. package/hooks/useSelectionState.d.ts +29 -0
  34. package/hooks/useSliderKeys.d.ts +41 -0
  35. package/index.css +1 -1
  36. package/index.d.ts +4 -8
  37. package/index.js +4881 -0
  38. package/internal/controlGrid/controlGrid.d.ts +32 -0
  39. package/internal/controlLabel/controlLabel.d.ts +31 -0
  40. package/internal/description/description.d.ts +18 -0
  41. package/internal/index.d.ts +6 -0
  42. package/internal/inlineTooltip/index.d.ts +1 -0
  43. package/internal/inlineTooltip/inlineTooltipManager.d.ts +1 -1
  44. package/internal/slots/slot.d.ts +44 -0
  45. package/internal/stateLayer/stateLayer.d.ts +33 -0
  46. package/package.json +12 -3
  47. package/utils/color.d.ts +0 -102
  48. package/utils/getWrapperStyle.d.ts +53 -0
  49. package/utils/index.d.ts +1 -0
  50. package/utils/toasts/ensureViewport.d.ts +6 -1
  51. package/utils/toasts/toast.d.ts +66 -10
  52. package/utils/toasts/toastStore.d.ts +55 -1
  53. package/utils/utils.d.ts +65 -53
  54. package/hooks/useFocusState.d.ts +0 -16
  55. package/index.mjs +0 -4649
  56. package/internal/inlineTooltip/inlineTooltip.d.ts +0 -11
  57. package/internal/inlineTooltip/inlineTooltip2.d.ts +0 -10
package/assets/icons.d.ts CHANGED
@@ -6,3 +6,6 @@ export declare const CheckboxIcon: import("react/jsx-runtime").JSX.Element;
6
6
  export declare const RadioCheckedIcon: import("react/jsx-runtime").JSX.Element;
7
7
  export declare const RadioUncheckedIcon: import("react/jsx-runtime").JSX.Element;
8
8
  export declare const MenuCheckIcon: import("react/jsx-runtime").JSX.Element;
9
+ export declare const ExpandIcon: import("react/jsx-runtime").JSX.Element;
10
+ export declare const StarIcon: import("react/jsx-runtime").JSX.Element;
11
+ 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 { BorderColor, ElementBorder, ElementDensity, ElementElevation, ElementFont, ElementShape, SurfaceColor } 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?: SurfaceColor;
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
- 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 { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, SurfaceColor, WrapperProps } from '../../utils';
3
3
  /**
4
4
  * Layout mode for {@link BoxBase}.
5
5
  *
@@ -27,17 +27,15 @@ 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"`. */
@@ -47,7 +45,7 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
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. */
@@ -61,9 +59,9 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
61
59
  /** Font token controlling typography (size, weight, line-height). */
62
60
  font?: ElementFont;
63
61
  /** Forces full height (100%). */
64
- fullHeight?: boolean;
62
+ hf?: boolean;
65
63
  /** Forces full width (100%). */
66
- fullWidth?: boolean;
64
+ wf?: boolean;
67
65
  /** Gap between children (flex/grid). */
68
66
  gap?: number | string;
69
67
  /** Horizontal gap (`column-gap`). */
@@ -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>>;
@@ -37,7 +37,7 @@ export interface ButtonBaseProps extends Omit<React.ButtonHTMLAttributes<HTMLBut
37
37
  /** Font token for label and content. */
38
38
  font?: ElementFont;
39
39
  /** Expands button to full width. */
40
- fullWidth?: boolean;
40
+ wf?: boolean;
41
41
  /** Hover visual effects. */
42
42
  hoverEffects?: ElementHoverEffect[];
43
43
  /** Icon rendered at the start of the button. */
@@ -2,9 +2,9 @@ import { default as React, ReactNode } from 'react';
2
2
  import { BorderColor, ElementElevation, ElementOutline, ElementShape, ElementSize, SurfaceColor } from '../../utils';
3
3
  import { MotionAnimation, MotionStyle } from '../../types';
4
4
  export type DialogType = 'basic' | 'fullscreen' | 'dockRight' | 'dockLeft' | 'dockTop' | 'dockBottom';
5
- export type DialogAnimation = 'auto' | 'none' | MotionAnimation;
5
+ export type DialogAnimation = 'none' | MotionAnimation;
6
6
  export interface DialogBaseProps {
7
- elementClass: string;
7
+ elementClass?: string;
8
8
  open: boolean;
9
9
  onClose?: () => void;
10
10
  type?: DialogType;
@@ -14,6 +14,10 @@ export interface DialogBaseProps {
14
14
  shape?: ElementShape;
15
15
  border?: ElementOutline;
16
16
  borderColor?: BorderColor;
17
+ wf?: boolean;
18
+ hf?: boolean;
19
+ fit?: boolean;
20
+ detached?: boolean;
17
21
  animation?: DialogAnimation;
18
22
  duration?: number;
19
23
  disableBackdropClose?: boolean;
@@ -22,11 +26,9 @@ export interface DialogBaseProps {
22
26
  className?: string;
23
27
  motionStyle?: MotionStyle;
24
28
  modal?: boolean;
25
- title?: string;
26
- actions?: ReactNode[];
27
- icon?: ReactNode;
28
- showCloseButton?: boolean;
29
- showHandle?: boolean;
30
29
  autoFocus?: boolean;
30
+ flush?: boolean;
31
+ docked?: boolean;
32
+ anchored?: boolean;
31
33
  }
32
34
  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;
@@ -22,7 +21,7 @@ export interface FieldBaseProps extends Omit<React.InputHTMLAttributes<HTMLInput
22
21
  outlined?: boolean;
23
22
  filled?: boolean;
24
23
  classic?: boolean;
25
- fullWidth?: boolean;
24
+ wFull?: boolean;
26
25
  /** Control shape variant. */
27
26
  shape?: ElementShape;
28
27
  /** Text color override for the label. */
@@ -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,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}.
@@ -10,6 +10,6 @@ export interface DialogTitleProps {
10
10
  textColor?: SurfaceColor;
11
11
  }
12
12
  export declare const DialogTitle: {
13
- ({ icon, label, children, className, font, }: DialogTitleProps): import("react/jsx-runtime").JSX.Element | null;
13
+ ({ icon, label, children, className, font }: DialogTitleProps): import("react/jsx-runtime").JSX.Element | null;
14
14
  displayName: string;
15
15
  };
@@ -1,4 +1,4 @@
1
- import { DialogBaseProps } from '../base/dialogBase';
1
+ import { DialogBaseProps } from '../base';
2
2
  /**
3
3
  * Props for {@link Drawer}.
4
4
  * Extends {@link DialogBaseProps}.
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { ElementFont, SurfaceColor } from '../../utils';
3
- import { BoxBaseProps } from '../base/boxBase';
3
+ import { BoxBaseProps } from '../base';
4
4
  /**
5
5
  * Props for {@link Fieldset}.
6
6
  * Extends {@link BoxBaseProps} except for `elementClass` and `component`.
@@ -0,0 +1,58 @@
1
+ import { default as React, ElementType, ReactNode } from 'react';
2
+ import { ElementFocusEffect, ElementFont, ElementHoverEffect, ElementPressedEffect, SurfaceColor } from '../../utils';
3
+ /**
4
+ * Props for the Link component.
5
+ *
6
+ * Inline link element with optional leading and trailing content and animated underline.
7
+ *
8
+ * @category Link
9
+ */
10
+ export type LinkProps<T extends ElementType = 'a'> = {
11
+ /** Underlying element or router component. */
12
+ as?: T;
13
+ /** Link content. */
14
+ children?: ReactNode;
15
+ /** Fallback text when children is not provided. */
16
+ label?: string;
17
+ /** Leading visual element. */
18
+ leading?: ReactNode;
19
+ /** Trailing visual element. */
20
+ trailing?: ReactNode;
21
+ /** Surface color token applied to text. */
22
+ color?: SurfaceColor;
23
+ /** Underline visibility behavior. */
24
+ underline?: 'none' | 'hover' | 'always';
25
+ /** Font token applied to content. */
26
+ font?: ElementFont;
27
+ /** Opens link in new tab with security attributes. */
28
+ isExternal?: boolean;
29
+ /** Accessibility label override. */
30
+ 'aria-label'?: string;
31
+ /** Additional class applied to the root element. */
32
+ className?: string;
33
+ /** Disables interaction and focus. */
34
+ disabled?: boolean;
35
+ /** Hover visual effects. */
36
+ hoverEffects?: ElementHoverEffect[];
37
+ /** Focus visual effects. */
38
+ focusEffects?: ElementFocusEffect[];
39
+ /** Pressed visual effects. */
40
+ pressedEffects?: ElementPressedEffect[];
41
+ /** Underline animation origin. */
42
+ underlineOrigin?: 'left' | 'center';
43
+ /** Underline animation type. */
44
+ underlineAnimation?: 'scale' | 'fade';
45
+ } & Omit<React.ComponentPropsWithoutRef<T>, 'as' | 'color' | 'children' | 'className'>;
46
+ export interface LinkComponent {
47
+ <T extends ElementType = 'a'>(props: LinkProps<T>): ReactNode;
48
+ displayName?: string;
49
+ }
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
+ export declare const Link: LinkComponent;
@@ -5,4 +5,4 @@ export interface ListProps extends Omit<BoxBaseProps, 'type'> {
5
5
  defaultValue?: string;
6
6
  children: ReactNode;
7
7
  }
8
- export declare const List: ({ type, defaultValue, children, }: ListProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const List: ({ type, defaultValue, children }: ListProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,68 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { ElementAlign, ElementDensity, ElementFocusEffect, ElementFont, ElementSize, ElementTextPlacement, SurfaceColor } from '../../utils';
3
+ /**
4
+ * Props for the Rating component.
5
+ *
6
+ * Numeric rating control rendered as a star slider with optional label and description.
7
+ *
8
+ * @category Rating
9
+ */
10
+ export interface RatingProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'onChange' | 'value' | 'defaultValue' | 'size'> {
11
+ /** Additional class applied to the root element. */
12
+ className?: string;
13
+ /** Color applied to the filled icons. */
14
+ color?: SurfaceColor;
15
+ /** Initial rating value for uncontrolled usage. */
16
+ defaultValue?: number;
17
+ /** Visual density of the control. */
18
+ density?: ElementDensity;
19
+ /** Supporting text displayed below the control. */
20
+ description?: string;
21
+ /** Disables interaction with the control. */
22
+ disabled?: boolean;
23
+ /** Icon used for the empty rating state. */
24
+ emptyIcon?: ReactNode;
25
+ /** Error message displayed below the control. */
26
+ error?: string;
27
+ /** Enables filled visual style for icons. */
28
+ filled?: boolean;
29
+ /** Visual effects applied when the control receives focus. */
30
+ focusEffects?: ElementFocusEffect[];
31
+ /** Font applied to the label text. */
32
+ font?: ElementFont;
33
+ /** Icon used for the filled rating state. */
34
+ icon?: ReactNode;
35
+ /** DOM id used for accessibility attributes. */
36
+ id?: string;
37
+ /** Label text displayed next to the control. */
38
+ label?: string;
39
+ /** Maximum rating value. */
40
+ max?: number;
41
+ /** Called when the rating value changes. */
42
+ onChange?: (value: number) => void;
43
+ /** Prevents value changes while keeping the control focusable. */
44
+ readOnly?: boolean;
45
+ /** Marks the control as required. */
46
+ required?: boolean;
47
+ /** Visual size of the rating icons. */
48
+ size?: ElementSize;
49
+ /** Step size used for keyboard and pointer interaction. */
50
+ step?: number;
51
+ /** Placement of label and description relative to the control. */
52
+ textPlacement?: ElementTextPlacement;
53
+ /** Tooltip alignment relative to the control. */
54
+ tooltipAlign?: ElementAlign;
55
+ /** Current rating value when used as a controlled component. */
56
+ value?: number;
57
+ }
58
+ /**
59
+ * Star rating input rendered as an interactive slider.
60
+ *
61
+ * Supports mouse, keyboard and form integration through a hidden input.
62
+ *
63
+ * @function
64
+ * @param props Component properties.
65
+ *
66
+ * @category Rating
67
+ */
68
+ export declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,11 @@
1
+ export interface SliderProps {
2
+ value?: number;
3
+ defaultValue?: number;
4
+ min?: number;
5
+ max?: number;
6
+ step?: number;
7
+ name?: string;
8
+ disabled?: boolean;
9
+ onChange?: (value: number) => void;
10
+ }
11
+ export declare const Slider: import('react').ForwardRefExoticComponent<SliderProps & import('react').RefAttributes<HTMLDivElement>>;