@ufoui/core 0.0.4 → 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 (151) hide show
  1. package/README.md +9 -3
  2. package/assets/icons.d.ts +11 -0
  3. package/assets/index.d.ts +1 -0
  4. package/components/accordion/accordion.d.ts +52 -0
  5. package/components/accordion/accordionItem.d.ts +65 -0
  6. package/components/accordion/accordionItem.guards.d.ts +15 -0
  7. package/components/accordion/index.d.ts +2 -0
  8. package/components/avatar/avatar.d.ts +26 -29
  9. package/components/avatar/avatar.guards.d.ts +15 -0
  10. package/components/avatar/avatarGroup.d.ts +29 -0
  11. package/components/avatar/index.d.ts +2 -0
  12. package/components/badge/badge.d.ts +1 -1
  13. package/components/base/{boxBase/boxBase.d.ts → boxBase.d.ts} +18 -11
  14. package/components/base/{buttonBase/buttonBase.d.ts → buttonBase.d.ts} +2 -3
  15. package/components/base/{checkboxBase/checkboxBase.d.ts → checkboxBase.d.ts} +2 -3
  16. package/components/base/dialogBase.d.ts +34 -0
  17. package/components/base/{fieldBase/fieldBase.d.ts → fieldBase.d.ts} +2 -3
  18. package/components/base/index.d.ts +6 -0
  19. package/components/base/textBase.d.ts +44 -0
  20. package/components/breadcrumbs/breadcrumbs.d.ts +48 -0
  21. package/components/button/button.d.ts +1 -1
  22. package/components/calendar/calendar.d.ts +23 -0
  23. package/components/calendar/calendarUtils.d.ts +18 -0
  24. package/components/checkbox/checkbox.d.ts +1 -1
  25. package/components/chip/chip.d.ts +1 -1
  26. package/components/collapse/collapse.d.ts +33 -0
  27. package/components/dialogs/bottomSheet.d.ts +23 -0
  28. package/components/dialogs/dialog.d.ts +21 -0
  29. package/components/{dialog → dialogs}/dialogActions.d.ts +1 -2
  30. package/components/{dialog → dialogs}/dialogTitle.d.ts +2 -3
  31. package/components/dialogs/drawer.d.ts +23 -0
  32. package/components/dialogs/index.d.ts +6 -0
  33. package/components/divider/divider.d.ts +1 -1
  34. package/components/divider/divider.guards.d.ts +1 -1
  35. package/components/fab/fab.d.ts +1 -1
  36. package/components/fields/dateField.d.ts +24 -0
  37. package/components/fields/dateTimeField.d.ts +24 -0
  38. package/components/fields/emailField.d.ts +24 -0
  39. package/components/fields/index.d.ts +11 -0
  40. package/components/fields/monthField.d.ts +24 -0
  41. package/components/fields/numberField.d.ts +24 -0
  42. package/components/fields/passwordField.d.ts +24 -0
  43. package/components/fields/phoneField.d.ts +24 -0
  44. package/components/fields/textField.d.ts +24 -0
  45. package/components/fields/timeField.d.ts +24 -0
  46. package/components/fields/urlField.d.ts +24 -0
  47. package/components/fields/weekField.d.ts +24 -0
  48. package/components/fieldset/fieldset.d.ts +2 -1
  49. package/components/iconButton/iconButton.d.ts +1 -1
  50. package/components/{article → layout}/article.d.ts +1 -1
  51. package/components/{aside → layout}/aside.d.ts +1 -1
  52. package/components/{content → layout}/content.d.ts +1 -1
  53. package/components/{div → layout}/div.d.ts +1 -1
  54. package/components/{flex → layout}/flex.d.ts +1 -1
  55. package/components/{footer → layout}/footer.d.ts +1 -1
  56. package/components/{grid → layout}/grid.d.ts +1 -1
  57. package/components/{header → layout}/header.d.ts +1 -1
  58. package/components/layout/index.d.ts +11 -0
  59. package/components/{main → layout}/main.d.ts +1 -1
  60. package/components/{nav → layout}/nav.d.ts +1 -1
  61. package/components/{section → layout}/section.d.ts +1 -1
  62. package/components/link/link.d.ts +58 -0
  63. package/components/list/list.d.ts +8 -0
  64. package/components/{listItem → list}/listItem.d.ts +2 -3
  65. package/components/{listItem → list}/listItem.guards.d.ts +1 -1
  66. package/components/menu/menu.d.ts +2 -4
  67. package/components/menu/menu.guards.d.ts +1 -1
  68. package/components/menuItem/menuItem.d.ts +2 -3
  69. package/components/menuItem/menuItem.guards.d.ts +1 -1
  70. package/components/option/option.d.ts +1 -1
  71. package/components/option/option.guards.d.ts +1 -1
  72. package/components/progress/progress.d.ts +27 -0
  73. package/components/radio/radio.d.ts +1 -1
  74. package/components/radiogroup/radioGroup.d.ts +1 -1
  75. package/components/rating/rating.d.ts +68 -0
  76. package/components/select/select.d.ts +1 -1
  77. package/components/slider/slider.d.ts +11 -0
  78. package/components/switch/switch.d.ts +1 -10
  79. package/components/tabs/index.d.ts +2 -0
  80. package/components/tabs/tab.d.ts +37 -0
  81. package/components/tabs/tab.guards.d.ts +15 -0
  82. package/components/tabs/tabs.d.ts +7 -0
  83. package/components/toast/index.d.ts +2 -0
  84. package/components/toast/toast.d.ts +52 -0
  85. package/components/toast/toastViewport.d.ts +7 -0
  86. package/components/toggleButton/toggleButton.d.ts +1 -1
  87. package/components/toolbar/toolbar.d.ts +51 -0
  88. package/components/tooltip/tooltip.d.ts +1 -1
  89. package/components/typography/h1.d.ts +18 -0
  90. package/components/typography/h2.d.ts +18 -0
  91. package/components/typography/h3.d.ts +18 -0
  92. package/components/typography/h4.d.ts +18 -0
  93. package/components/typography/h5.d.ts +18 -0
  94. package/components/typography/h6.d.ts +18 -0
  95. package/components/typography/index.d.ts +9 -0
  96. package/components/typography/label.d.ts +18 -0
  97. package/components/typography/p.d.ts +18 -0
  98. package/components/typography/span.d.ts +18 -0
  99. package/context/index.d.ts +4 -0
  100. package/context/selectionContext.d.ts +32 -0
  101. package/context/themeContext.d.ts +2 -2
  102. package/hooks/index.d.ts +10 -0
  103. package/hooks/useAnimate.d.ts +38 -18
  104. package/hooks/useFocusTrap.d.ts +32 -0
  105. package/hooks/useFocusVisible.d.ts +16 -14
  106. package/hooks/useResizeObserver.d.ts +30 -0
  107. package/hooks/useRovingFocus.d.ts +30 -0
  108. package/hooks/useSelection.d.ts +16 -0
  109. package/hooks/useSelectionState.d.ts +29 -0
  110. package/hooks/useSliderKeys.d.ts +41 -0
  111. package/index.css +1 -1
  112. package/index.d.ts +22 -36
  113. package/index.js +4881 -0
  114. package/internal/controlGrid/controlGrid.d.ts +32 -0
  115. package/internal/controlLabel/controlLabel.d.ts +31 -0
  116. package/internal/description/description.d.ts +18 -0
  117. package/internal/index.d.ts +6 -0
  118. package/internal/inlineTooltip/index.d.ts +1 -0
  119. package/internal/inlineTooltip/inlineTooltipManager.d.ts +2 -2
  120. package/internal/slots/slot.d.ts +44 -0
  121. package/internal/stateLayer/stateLayer.d.ts +33 -0
  122. package/package.json +12 -3
  123. package/utils/calculateFloatingPosition.d.ts +1 -1
  124. package/utils/color.d.ts +2 -194
  125. package/utils/controlStyle.d.ts +67 -0
  126. package/utils/generateMaterialColors.d.ts +1 -1
  127. package/utils/generateSchemes.d.ts +1 -1
  128. package/utils/getWrapperStyle.d.ts +53 -0
  129. package/utils/index.d.ts +10 -0
  130. package/utils/{inputhMethod.d.ts → interactionMode.d.ts} +1 -1
  131. package/utils/toasts/ensureViewport.d.ts +7 -0
  132. package/utils/toasts/index.d.ts +1 -0
  133. package/utils/toasts/toast.d.ts +85 -0
  134. package/utils/toasts/toastStore.d.ts +65 -0
  135. package/utils/uniqueID.d.ts +14 -0
  136. package/utils/utils.d.ts +81 -81
  137. package/components/base/dialogBase/dialog.d.ts +0 -35
  138. package/components/base/inlineBase/inlineBase.d.ts +0 -62
  139. package/components/dateInput/dateInput.d.ts +0 -2
  140. package/components/dateTimeInput/dateTimeInput.d.ts +0 -2
  141. package/components/emailInput/emailInput.d.ts +0 -2
  142. package/components/numberInput/numberInput.d.ts +0 -2
  143. package/components/telInput/telInput.d.ts +0 -2
  144. package/components/textField/textField.d.ts +0 -9
  145. package/components/timeInput/timeInput.d.ts +0 -2
  146. package/components/urlInput/urlInput.d.ts +0 -2
  147. package/hooks/useFocusState.d.ts +0 -16
  148. package/index.mjs +0 -3832
  149. package/internal/inlineTooltip/inlineTooltip.d.ts +0 -11
  150. package/internal/inlineTooltip/inlineTooltip2.d.ts +0 -10
  151. /package/components/{dialog → dialogs}/dialogContent.d.ts +0 -0
@@ -1,8 +1,6 @@
1
1
  import { default as React, HTMLAttributes, ReactNode, RefObject } from 'react';
2
- import { ElementAlign, ElementBorder, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementSelectedEffect, ElementShape, ElementTouchEffect } from '../../utils/utils.ts';
3
- import { MotionAnimation, MotionStyle } from '../../types/index.ts';
4
- import { BorderColor, SurfaceColor } from '../../utils/color';
5
- import { ElementFloatingMode } from '../../utils/calculateFloatingPosition';
2
+ import { MotionAnimation, MotionStyle } from '../../types';
3
+ import { BorderColor, ElementAlign, ElementBorder, ElementDensity, ElementElevation, ElementFloatingMode, ElementFocusEffect, ElementFont, ElementSelectedEffect, ElementShape, ElementTouchEffect, SurfaceColor } from '../../utils';
6
4
  /**
7
5
  * Visual style preset for the Menu component.
8
6
  *
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactElement } from 'react';
2
- import { MenuInternalProps, MenuProps } from '../../index.ts';
2
+ import { MenuInternalProps, MenuProps } from './menu';
3
3
  export declare const IS_MENU: unique symbol;
4
4
  /**
5
5
  * Type guard that checks whether a React node is a Menu component.
@@ -1,7 +1,6 @@
1
1
  import { default as React, HTMLProps, ReactNode } from 'react';
2
- import { ElementDensity, ElementFocusEffect, ElementFont, ElementSelectedEffect, ElementShape, ElementTouchEffect } from '../../utils/utils.ts';
3
- import { MenuVariant } from '../../index.ts';
4
- import { SurfaceColor } from '../../utils/color';
2
+ import { ElementDensity, ElementFocusEffect, ElementFont, ElementSelectedEffect, ElementShape, ElementTouchEffect, SurfaceColor } from '../../utils';
3
+ import { MenuVariant } from '../menu/menu';
5
4
  /**
6
5
  * Visual variant of a MenuItem.
7
6
  *
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactElement } from 'react';
2
- import { MenuItemInternalProps, MenuItemProps } from '../../index.ts';
2
+ import { MenuItemInternalProps, MenuItemProps } from './menuItem';
3
3
  export declare const IS_MENU_ITEM: unique symbol;
4
4
  /**
5
5
  * Type guard that checks whether a React node is a MenuItem component.
@@ -1,5 +1,5 @@
1
1
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
- import { MenuItemInternalProps, MenuItemProps } from '../../index.ts';
2
+ import { MenuItemInternalProps, MenuItemProps } from '../menuItem/menuItem';
3
3
  export interface OptionProps extends Omit<MenuItemProps, 'type' | 'checked'> {
4
4
  selected?: boolean;
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { default as React, ReactElement } from 'react';
2
2
  import { OptionProps } from './option';
3
- import { MenuItemInternalProps } from '../../index.ts';
3
+ import { MenuItemInternalProps } from '../menuItem/menuItem';
4
4
  export declare const IS_OPTION: unique symbol;
5
5
  /**
6
6
  * Type guard that checks whether a React node is an Option component.
@@ -0,0 +1,27 @@
1
+ import { default as React } from 'react';
2
+ import { ElementSize, SemanticColor } from '../../utils';
3
+ import { BoxBaseProps } from '../base';
4
+ /**
5
+ * Props for {@link Progress}.
6
+ *
7
+ * @category Progress
8
+ */
9
+ export interface ProgressProps extends Omit<BoxBaseProps, 'children'> {
10
+ variant?: 'linear' | 'circular';
11
+ value?: number;
12
+ min?: number;
13
+ max?: number;
14
+ color?: SemanticColor;
15
+ size?: ElementSize;
16
+ thickness?: number;
17
+ }
18
+ /**
19
+ * Visual progress indicator.
20
+ *
21
+ * @function
22
+ *
23
+ * @param props - Component props.
24
+ *
25
+ * @category Progress
26
+ */
27
+ export declare const Progress: React.ForwardRefExoticComponent<ProgressProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,4 +1,4 @@
1
- import { CheckboxBaseProps } from '../../index.ts';
1
+ import { CheckboxBaseProps } from '../base/checkboxBase';
2
2
  /**
3
3
  * Props for the Radio component.
4
4
  *
@@ -1,5 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { FieldsetProps } from '../../index.ts';
2
+ import { FieldsetProps } from '../fieldset/fieldset';
3
3
  /**
4
4
  * Props for the RadioGroup component.
5
5
  *
@@ -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>>;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { FieldBaseProps } from '../../index.ts';
2
+ import { FieldBaseProps } from '../base/fieldBase';
3
3
  /**
4
4
  * Props for {@link Select}.
5
5
  *
@@ -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>>;
@@ -1,6 +1,5 @@
1
1
  import { default as React, ReactNode } from 'react';
2
- import { ElementAlign, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect } from '../../utils/utils.ts';
3
- import { BorderColor, SemanticColor, SurfaceColor } from '../../utils/color';
2
+ import { BorderColor, ElementAlign, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor } from '../../utils';
4
3
  /**
5
4
  * Props for the Switch component.
6
5
  *
@@ -27,10 +26,6 @@ export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
27
26
  density?: ElementDensity;
28
27
  /** Supporting text displayed below the label. */
29
28
  description?: string;
30
- /** Text color override for the description. */
31
- descriptionColor?: SurfaceColor;
32
- /** Font token applied to the description text. */
33
- descriptionFont?: ElementFont;
34
29
  /** Elevation level of the control surface. */
35
30
  elevation?: ElementElevation;
36
31
  /** Error message text. Overrides description when present. */
@@ -51,8 +46,6 @@ export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
51
46
  id?: string;
52
47
  /** Text label associated with the control. */
53
48
  label?: string;
54
- /** Text color override for the label. */
55
- labelColor?: SurfaceColor;
56
49
  /** Name attribute forwarded to the input element. */
57
50
  name?: string;
58
51
  /** Change event handler. */
@@ -67,8 +60,6 @@ export interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputEle
67
60
  shape?: ElementShape;
68
61
  /** Size of the control. */
69
62
  size?: ElementSize;
70
- /** Text color override for label and content. */
71
- textColor?: SurfaceColor;
72
63
  /** Layout of text relative to the control. */
73
64
  textPlacement?: ElementTextPlacement;
74
65
  /** Tooltip alignment relative to the control. */
@@ -0,0 +1,2 @@
1
+ export * from './tabs';
2
+ export * from './tab';
@@ -0,0 +1,37 @@
1
+ import { ReactNode } from 'react';
2
+ import { IS_TAB } from './tab.guards';
3
+ /**
4
+ * Props for {@link Tab}.
5
+ *
6
+ * @category Tabs
7
+ */
8
+ export interface TabProps {
9
+ /** Unique tab value. */
10
+ value: string;
11
+ /** Tab label. */
12
+ label: ReactNode;
13
+ /** Tab panel content. */
14
+ children: ReactNode;
15
+ }
16
+ /**
17
+ * Tab component containing both trigger and panel.
18
+ *
19
+ * Displays its content when selected.
20
+ *
21
+ * @function
22
+ *
23
+ * @category Tabs
24
+ */
25
+ export declare const Tab: {
26
+ ({ value, label, children }: TabProps): import("react/jsx-runtime").JSX.Element;
27
+ displayName: string;
28
+ /**
29
+ * Marks this component as a Tab for runtime type guards.
30
+ *
31
+ * Used internally to identify Tab elements via a shared Symbol.
32
+ * Not part of the public API.
33
+ *
34
+ * @internal
35
+ */
36
+ [IS_TAB]: boolean;
37
+ };
@@ -0,0 +1,15 @@
1
+ import { default as React, ReactElement } from 'react';
2
+ import { TabProps } from './tab';
3
+ export declare const IS_TAB: unique symbol;
4
+ /**
5
+ * Type guard that checks whether a React node is a Tab component.
6
+ *
7
+ * Identifies Tab elements by the internal {@link IS_TAB} symbol
8
+ * attached to the component type.
9
+ *
10
+ * @param el - React node to test.
11
+ * @returns `true` if the node is a Tab element.
12
+ *
13
+ * @internal
14
+ */
15
+ export declare function isTab(el: React.ReactNode): el is ReactElement<TabProps>;
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ import { BoxBaseProps } from '../base/boxBase';
3
+ export interface TabsProps extends BoxBaseProps {
4
+ defaultValue: string;
5
+ children: ReactNode;
6
+ }
7
+ export declare const Tabs: ({ defaultValue, children, ...rest }: TabsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './toast';
2
+ export * from './toastViewport';
@@ -0,0 +1,52 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { ElementElevation, ElementShape, SurfaceColor, ToastStatus } from '../../utils';
3
+ import { BoxBaseProps } from '../base';
4
+ import { MotionAnimation, MotionStyle } from '../../types';
5
+ /**
6
+ * Props for Toast component.
7
+ *
8
+ * @category Toast
9
+ */
10
+ export interface ToastProps extends Omit<BoxBaseProps, 'children'> {
11
+ /** Toast identifier used for lifecycle control. */
12
+ id: string;
13
+ /** Primary heading text. */
14
+ title?: string;
15
+ /** Secondary supporting text. */
16
+ description?: string;
17
+ /** Surface color token overriding default background and text. */
18
+ color?: SurfaceColor;
19
+ /** Leading visual element. */
20
+ icon?: ReactNode;
21
+ /** Action element rendered below content. */
22
+ action?: ReactNode;
23
+ /** Full content override replacing internal layout. */
24
+ content?: ReactNode;
25
+ /** Time in milliseconds before the toast is automatically dismissed. */
26
+ timeout?: number;
27
+ /** Elevation token. Default: 3 */
28
+ elevation?: ElementElevation;
29
+ /** Status variant applied as CSS modifier class. */
30
+ status?: ToastStatus;
31
+ /** Shape token. Default: smooth */
32
+ shape?: ElementShape;
33
+ /** Animation preset used by internal motion elements. */
34
+ animation?: MotionAnimation;
35
+ /** Animation duration in milliseconds. */
36
+ duration?: number;
37
+ /** Motion style applied to animated elements. */
38
+ motionStyle?: MotionStyle;
39
+ leaving?: boolean;
40
+ onExitComplete?: (id: string) => void;
41
+ }
42
+ /**
43
+ * Toast notification container.
44
+ *
45
+ * Handles auto-dismiss lifecycle using the timeout property.
46
+ *
47
+ * @function
48
+ * @param props Component properties.
49
+ *
50
+ * @category Toast
51
+ */
52
+ export declare const Toast: React.ForwardRefExoticComponent<ToastProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,7 @@
1
+ export type ToastPosition = 'topLeft' | 'topCenter' | 'topRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
2
+ export interface ToastViewportProps {
3
+ position?: ToastPosition;
4
+ timeout?: number;
5
+ limit?: number;
6
+ }
7
+ export declare const ToastViewport: ({ position, timeout, limit }: ToastViewportProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { ButtonBaseProps } from '../../index.ts';
1
+ import { ButtonBaseProps } from '../base/buttonBase';
2
2
  export interface ToggleButtonProps extends Omit<ButtonBaseProps, 'filled' | 'controlClass' | 'iconClass'> {
3
3
  selected?: boolean;
4
4
  iconPosition?: 'start' | 'end';
@@ -0,0 +1,51 @@
1
+ import { default as React } from 'react';
2
+ import { ElementDensity, ElementElevation, ElementOrientation, ElementShape, SurfaceColor } from '../../utils';
3
+ import { BoxBaseProps } from '../base/boxBase';
4
+ /**
5
+ * Props for {@link Toolbar}.
6
+ * Extends {@link BoxBaseProps} except for `component` and `elementClass`.
7
+ *
8
+ * @category Toolbar
9
+ */
10
+ export interface ToolbarProps extends Omit<BoxBaseProps, 'component' | 'elementClass' | 'direction' | 'row' | 'col'> {
11
+ /** Visual variant of the toolbar. */
12
+ variant?: 'docked' | 'floating';
13
+ /** Surface color token applied to container. */
14
+ color?: SurfaceColor;
15
+ /** Elevation token. */
16
+ elevation?: ElementElevation;
17
+ /** Shape token. */
18
+ shape?: ElementShape;
19
+ /** Density token. */
20
+ density?: ElementDensity;
21
+ /** Makes toolbar full width. */
22
+ wFull?: boolean;
23
+ /** Positions floating toolbar. */
24
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'center';
25
+ /** Makes floating toolbar fixed. */
26
+ fixed?: boolean;
27
+ /** Main content area. */
28
+ children?: React.ReactNode;
29
+ /** Adds divider line below toolbar. */
30
+ divider?: boolean;
31
+ orientation?: ElementOrientation;
32
+ /** Additional root class name. */
33
+ className?: string;
34
+ }
35
+ /**
36
+ * Expressive contextual action container based on MD3 Toolbar.
37
+ *
38
+ * Supports docked and floating variants.
39
+ *
40
+ * @function
41
+ * @example
42
+ * <Toolbar
43
+ * variant="floating"
44
+ * >
45
+ * <IconButton />
46
+ * <IconButton />
47
+ * </Toolbar>
48
+ *
49
+ * @category Toolbar
50
+ */
51
+ export declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,5 +1,5 @@
1
1
  import { HTMLProps, ReactNode } from 'react';
2
- import { ElementAlign } from '../../utils/utils.ts';
2
+ import { ElementAlign } from '../../utils';
3
3
  export interface TooltipProps extends HTMLProps<HTMLDivElement> {
4
4
  title: string;
5
5
  children?: ReactNode;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for H1.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type H1Props = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * H1 semantic heading.
11
+ * Renders native h1 element with default headlineLarge font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const H1: import('react').ForwardRefExoticComponent<H1Props & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for H2.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type H2Props = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * H2 semantic heading.
11
+ * Renders native h2 element with default headlineMedium font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const H2: import('react').ForwardRefExoticComponent<H2Props & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for H3.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type H3Props = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * H3 semantic heading.
11
+ * Renders native h3 element with default headlineSmall font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const H3: import('react').ForwardRefExoticComponent<H3Props & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for H4.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type H4Props = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * H4 semantic heading.
11
+ * Renders native h4 element with default titleLarge font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const H4: import('react').ForwardRefExoticComponent<H4Props & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for H5.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type H5Props = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * H5 semantic heading.
11
+ * Renders native h5 element with default titleMedium font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const H5: import('react').ForwardRefExoticComponent<H5Props & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for H6.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type H6Props = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * H6 semantic heading.
11
+ * Renders native h6 element with default titleSmall font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const H6: import('react').ForwardRefExoticComponent<H6Props & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,9 @@
1
+ export * from './h1';
2
+ export * from './h2';
3
+ export * from './h3';
4
+ export * from './h4';
5
+ export * from './h5';
6
+ export * from './h6';
7
+ export * from './p';
8
+ export * from './span';
9
+ export * from './label';
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for Label.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type LabelProps = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * Label semantic text.
11
+ * Renders native label element with default labelLarge font.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const Label: import('react').ForwardRefExoticComponent<LabelProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for P.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type PProps = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * P semantic paragraph.
11
+ * Renders native p element.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const P: import('react').ForwardRefExoticComponent<PProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,18 @@
1
+ import { TextBaseProps } from '../base/textBase';
2
+ /**
3
+ * Props for Span.
4
+ * Extends TextBaseProps except component.
5
+ *
6
+ * @category Typography
7
+ */
8
+ export type SpanProps = Omit<TextBaseProps, 'component'>;
9
+ /**
10
+ * Span semantic inline text wrapper.
11
+ * Renders native span element.
12
+ *
13
+ * @function
14
+ * @param props - Typography props.
15
+ *
16
+ * @category Typography
17
+ */
18
+ export declare const Span: import('react').ForwardRefExoticComponent<SpanProps & import('react').RefAttributes<HTMLElement>>;
@@ -0,0 +1,4 @@
1
+ export * from './radioGroupContext';
2
+ export * from './fieldsetContext';
3
+ export * from './selectionContext';
4
+ export * from './themeContext';
@@ -0,0 +1,32 @@
1
+ import { useRovingFocus } from '../hooks/useRovingFocus';
2
+ /**
3
+ * Context value shared by components that rely on selection behavior.
4
+ *
5
+ * @typeParam T - Optional configuration object provided by the parent component.
6
+ *
7
+ * @category Contexts
8
+ */
9
+ export interface SelectionContextValue<T = unknown> {
10
+ /** Clears all selected values. */
11
+ clear: () => void;
12
+ /** Optional configuration object passed from the parent component. */
13
+ config?: T;
14
+ /** Selection type: single or multiple. */
15
+ type: 'single' | 'multiple';
16
+ /** Optional roving focus controller for keyboard navigation between items. */
17
+ roving?: ReturnType<typeof useRovingFocus>;
18
+ /** Sets a value directly. */
19
+ set: (value: string) => void;
20
+ /** Toggles selection state for a given value. */
21
+ toggle: (value: string) => void;
22
+ /** Currently selected values. */
23
+ values: string[];
24
+ }
25
+ /**
26
+ * React context that exposes shared selection state and optional configuration.
27
+ *
28
+ * Returns `null` when accessed outside of a provider.
29
+ *
30
+ * @category Contexts
31
+ */
32
+ export declare const SelectionContext: import('react').Context<SelectionContextValue<unknown> | null>;