@ufoui/core 0.0.4 → 0.0.5
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.
- package/README.md +9 -3
- package/assets/icons.d.ts +8 -0
- package/assets/index.d.ts +1 -0
- package/components/accordion/accordion.d.ts +24 -0
- package/components/accordion/accordionItem.d.ts +37 -0
- package/components/accordion/accordionItem.guards.d.ts +15 -0
- package/components/accordion/index.d.ts +2 -0
- package/components/avatar/avatar.d.ts +26 -29
- package/components/avatar/avatar.guards.d.ts +15 -0
- package/components/avatar/avatarGroup.d.ts +29 -0
- package/components/avatar/index.d.ts +2 -0
- package/components/badge/badge.d.ts +1 -1
- package/components/base/{boxBase/boxBase.d.ts → boxBase.d.ts} +32 -3
- package/components/base/{buttonBase/buttonBase.d.ts → buttonBase.d.ts} +1 -2
- package/components/base/{checkboxBase/checkboxBase.d.ts → checkboxBase.d.ts} +2 -3
- package/components/base/{dialogBase/dialog.d.ts → dialogBase.d.ts} +5 -8
- package/components/base/{fieldBase/fieldBase.d.ts → fieldBase.d.ts} +2 -2
- package/components/base/index.d.ts +6 -0
- package/components/base/textBase.d.ts +45 -0
- package/components/button/button.d.ts +1 -1
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/chip/chip.d.ts +1 -1
- package/components/collapse/collapse.d.ts +38 -0
- package/components/dialogs/bottomSheet.d.ts +23 -0
- package/components/dialogs/dialog.d.ts +21 -0
- package/components/{dialog → dialogs}/dialogActions.d.ts +1 -2
- package/components/{dialog → dialogs}/dialogTitle.d.ts +1 -2
- package/components/dialogs/drawer.d.ts +23 -0
- package/components/dialogs/index.d.ts +6 -0
- package/components/divider/divider.d.ts +1 -1
- package/components/divider/divider.guards.d.ts +1 -1
- package/components/fab/fab.d.ts +1 -1
- package/components/fields/dateField.d.ts +24 -0
- package/components/fields/dateTimeField.d.ts +24 -0
- package/components/fields/emailField.d.ts +24 -0
- package/components/fields/index.d.ts +11 -0
- package/components/fields/monthField.d.ts +24 -0
- package/components/fields/numberField.d.ts +24 -0
- package/components/fields/passwordField.d.ts +24 -0
- package/components/fields/phoneField.d.ts +24 -0
- package/components/fields/textField.d.ts +24 -0
- package/components/fields/timeField.d.ts +24 -0
- package/components/fields/urlField.d.ts +24 -0
- package/components/fields/weekField.d.ts +24 -0
- package/components/fieldset/fieldset.d.ts +2 -1
- package/components/iconButton/iconButton.d.ts +1 -1
- package/components/{article → layout}/article.d.ts +1 -1
- package/components/{aside → layout}/aside.d.ts +1 -1
- package/components/{content → layout}/content.d.ts +1 -1
- package/components/{div → layout}/div.d.ts +1 -1
- package/components/{flex → layout}/flex.d.ts +1 -1
- package/components/{footer → layout}/footer.d.ts +1 -1
- package/components/{grid → layout}/grid.d.ts +1 -1
- package/components/{header → layout}/header.d.ts +1 -1
- package/components/layout/index.d.ts +11 -0
- package/components/{main → layout}/main.d.ts +1 -1
- package/components/{nav → layout}/nav.d.ts +1 -1
- package/components/{section → layout}/section.d.ts +1 -1
- package/components/list/list.d.ts +8 -0
- package/components/{listItem → list}/listItem.d.ts +2 -3
- package/components/{listItem → list}/listItem.guards.d.ts +1 -1
- package/components/menu/menu.d.ts +2 -4
- package/components/menu/menu.guards.d.ts +1 -1
- package/components/menuItem/menuItem.d.ts +2 -3
- package/components/menuItem/menuItem.guards.d.ts +1 -1
- package/components/option/option.d.ts +1 -1
- package/components/option/option.guards.d.ts +1 -1
- package/components/progress/progress.d.ts +27 -0
- package/components/radio/radio.d.ts +1 -1
- package/components/radiogroup/radioGroup.d.ts +1 -1
- package/components/select/select.d.ts +1 -1
- package/components/switch/switch.d.ts +1 -2
- package/components/tabs/index.d.ts +2 -0
- package/components/tabs/tab.d.ts +37 -0
- package/components/tabs/tab.guards.d.ts +15 -0
- package/components/tabs/tabs.d.ts +7 -0
- package/components/toast/index.d.ts +2 -0
- package/components/toast/toast.d.ts +38 -0
- package/components/toast/toastViewport.d.ts +6 -0
- package/components/toggleButton/toggleButton.d.ts +1 -1
- package/components/toolbar/toolbar.d.ts +51 -0
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/typography/h1.d.ts +18 -0
- package/components/typography/h2.d.ts +18 -0
- package/components/typography/h3.d.ts +18 -0
- package/components/typography/h4.d.ts +18 -0
- package/components/typography/h5.d.ts +18 -0
- package/components/typography/h6.d.ts +18 -0
- package/components/typography/index.d.ts +9 -0
- package/components/typography/label.d.ts +18 -0
- package/components/typography/p.d.ts +18 -0
- package/components/typography/span.d.ts +18 -0
- package/context/index.d.ts +4 -0
- package/context/selectionContext.d.ts +31 -0
- package/context/themeContext.d.ts +2 -2
- package/hooks/index.d.ts +8 -0
- package/hooks/useAnimate.d.ts +2 -2
- package/hooks/useResizeObserver.d.ts +26 -0
- package/hooks/useSelection.d.ts +13 -0
- package/index.css +1 -1
- package/index.d.ts +26 -36
- package/index.mjs +3818 -3001
- package/internal/inlineTooltip/inlineTooltipManager.d.ts +1 -1
- package/package.json +1 -1
- package/utils/calculateFloatingPosition.d.ts +1 -1
- package/utils/color.d.ts +2 -92
- package/utils/controlStyle.d.ts +67 -0
- package/utils/generateMaterialColors.d.ts +1 -1
- package/utils/generateSchemes.d.ts +1 -1
- package/utils/index.d.ts +9 -0
- package/utils/{inputhMethod.d.ts → interactionMode.d.ts} +1 -1
- package/utils/toasts/ensureViewport.d.ts +2 -0
- package/utils/toasts/index.d.ts +1 -0
- package/utils/toasts/toast.d.ts +29 -0
- package/utils/toasts/toastStore.d.ts +11 -0
- package/utils/uniqueID.d.ts +14 -0
- package/utils/utils.d.ts +17 -29
- package/components/base/inlineBase/inlineBase.d.ts +0 -62
- package/components/dateInput/dateInput.d.ts +0 -2
- package/components/dateTimeInput/dateTimeInput.d.ts +0 -2
- package/components/emailInput/emailInput.d.ts +0 -2
- package/components/numberInput/numberInput.d.ts +0 -2
- package/components/telInput/telInput.d.ts +0 -2
- package/components/textField/textField.d.ts +0 -9
- package/components/timeInput/timeInput.d.ts +0 -2
- package/components/urlInput/urlInput.d.ts +0 -2
- /package/components/{dialog → dialogs}/dialogContent.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# UFO UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
UFO UI is a React UI component library implementing Material Design 3.
|
|
4
4
|
It focuses on simplicity, low dependency count, and small bundle size.
|
|
5
5
|
|
|
6
6
|
The library is designed to be used as a single import, without additional required packages beyond React.
|
|
@@ -15,6 +15,12 @@ The library is designed to be used as a single import, without additional requir
|
|
|
15
15
|
This project is currently in early development (v0.x).
|
|
16
16
|
The API may change.
|
|
17
17
|
|
|
18
|
+
## Live preview
|
|
19
|
+
|
|
20
|
+
UFO UI Playground (preview):
|
|
21
|
+
https://ufoui.kgnet.eu
|
|
22
|
+
|
|
23
|
+
|
|
18
24
|
## Installation
|
|
19
25
|
```bash
|
|
20
26
|
pnpm add @ufoui/core
|
|
@@ -59,5 +65,5 @@ You can customize the theme by providing a seed color:
|
|
|
59
65
|
Apache License 2.0
|
|
60
66
|
|
|
61
67
|
## Trademark
|
|
62
|
-
“UFOUI” and the UFOUI logo are trademarks of the UFOUI project.
|
|
68
|
+
“UFOUI” (UFO UI) and the UFOUI logo are trademarks of the UFOUI project.
|
|
63
69
|
Use of the name or logo requires permission.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const CheckmarkIcon: import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const IndeterminateIcon: import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const RadioIcon: import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const ArrowRightIcon: import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const CheckboxIcon: import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const RadioCheckedIcon: import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const RadioUncheckedIcon: import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const MenuCheckIcon: import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './icons';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxBaseProps } from '../base/boxBase';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link Accordion}.
|
|
5
|
+
*
|
|
6
|
+
* @category Accordion
|
|
7
|
+
*/
|
|
8
|
+
export interface AccordionProps extends Omit<BoxBaseProps, 'type'> {
|
|
9
|
+
/** Accordion behavior mode. Default: 'single'. */
|
|
10
|
+
type?: 'single' | 'multiple';
|
|
11
|
+
/** Accordion items. */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Container component that manages accordion selection state.
|
|
16
|
+
*
|
|
17
|
+
* Uses shared selection behavior and provides it
|
|
18
|
+
* to child components through SelectionContext.
|
|
19
|
+
*
|
|
20
|
+
* @function
|
|
21
|
+
*
|
|
22
|
+
* @category Accordion
|
|
23
|
+
*/
|
|
24
|
+
export declare const Accordion: ({ type, children, ...rest }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { IS_ACCORDION_ITEM } from './accordionItem.guards';
|
|
3
|
+
/**
|
|
4
|
+
* Props for {@link AccordionItem}.
|
|
5
|
+
*
|
|
6
|
+
* @category Accordion
|
|
7
|
+
*/
|
|
8
|
+
export interface AccordionItemProps {
|
|
9
|
+
/** Unique item value used to control selection state. */
|
|
10
|
+
value: string;
|
|
11
|
+
/** Item header content rendered inside the trigger button. */
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
/** Panel content displayed when the item is expanded. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Single accordion item consisting of a trigger and collapsible content.
|
|
18
|
+
*
|
|
19
|
+
* Integrates with shared selection behavior to determine
|
|
20
|
+
* whether the panel is expanded and to toggle its state.
|
|
21
|
+
*
|
|
22
|
+
* @function
|
|
23
|
+
*
|
|
24
|
+
* @category Accordion
|
|
25
|
+
*/
|
|
26
|
+
export declare const AccordionItem: {
|
|
27
|
+
({ value, title, children, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* Marks this component as an AccordionItem for runtime type guards.
|
|
30
|
+
*
|
|
31
|
+
* Used internally to identify Accordion elements via a shared Symbol.
|
|
32
|
+
* Not part of the public API.
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
[IS_ACCORDION_ITEM]: boolean;
|
|
37
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
import { AccordionItemProps } from './accordionItem';
|
|
3
|
+
export declare const IS_ACCORDION_ITEM: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard that checks whether a React node is an AccordionItem component.
|
|
6
|
+
*
|
|
7
|
+
* Identifies AccordionItem elements by the internal {@link IS_ACCORDION_ITEM} symbol
|
|
8
|
+
* attached to the component type.
|
|
9
|
+
*
|
|
10
|
+
* @param el - React node to test.
|
|
11
|
+
* @returns `true` if the node is an AccordionItem element.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function isAccordionItem(el: React.ReactNode): el is ReactElement<AccordionItemProps>;
|
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxBaseProps } from '../base';
|
|
3
|
+
import { ElementSize } from '../../utils';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Properties for Avatar component.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
8
|
-
* Badge displays a status or value in a small decorative label.
|
|
9
|
-
* Supports customization of color, border, elevation, shape, size, and position.
|
|
10
|
-
*
|
|
11
|
-
* @category Component properties
|
|
7
|
+
* @category Avatar
|
|
12
8
|
*/
|
|
13
|
-
export interface AvatarProps extends Omit<
|
|
14
|
-
/**
|
|
15
|
-
label: string;
|
|
16
|
-
/** Semantic color of the badge background (e.g. `'error'`, `'info'`). */
|
|
17
|
-
color?: SemanticColor;
|
|
18
|
-
/** Border width, e.g. `1` or `2`. Ignored if `outlined` is not set.
|
|
19
|
-
* @default 1
|
|
20
|
-
* */
|
|
21
|
-
border?: ElementBorder;
|
|
22
|
-
/** Color of the border when `outlined` is true. */
|
|
23
|
-
borderColor?: BorderColor;
|
|
24
|
-
/** Elevation depth if `raised` is true. */
|
|
25
|
-
elevation?: ElementElevation;
|
|
26
|
-
/** Size of the badge (`small`, `medium`, `large`). */
|
|
9
|
+
export interface AvatarProps extends Omit<BoxBaseProps, 'component' | 'elementClass'> {
|
|
10
|
+
/** Size token controlling width and height. */
|
|
27
11
|
size?: ElementSize;
|
|
28
|
-
/**
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
|
|
12
|
+
/** Image source URL. */
|
|
13
|
+
src?: string;
|
|
14
|
+
/** Alternative text for image element. */
|
|
15
|
+
alt?: string;
|
|
16
|
+
/** Full name used for initials and auto color derivation. */
|
|
17
|
+
name?: string;
|
|
18
|
+
/** Custom fallback content rendered when no image and no name are provided. */
|
|
19
|
+
children?: ReactNode;
|
|
34
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Avatar identity component displaying image, initials, or custom content.
|
|
23
|
+
*
|
|
24
|
+
* Automatically derives a background color from name when no image
|
|
25
|
+
* and no explicit color are provided.
|
|
26
|
+
*
|
|
27
|
+
* @function
|
|
28
|
+
* @param props Component properties.
|
|
29
|
+
*
|
|
30
|
+
* @category Avatar
|
|
31
|
+
*/
|
|
35
32
|
export declare const Avatar: import('react').ForwardRefExoticComponent<AvatarProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React, ReactElement } from 'react';
|
|
2
|
+
import { AvatarProps } from './avatar';
|
|
3
|
+
export declare const IS_AVATAR: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard that checks whether a React node is an Avatar component.
|
|
6
|
+
*
|
|
7
|
+
* Identifies Avatar elements by the internal {@link IS_AVATAR} symbol
|
|
8
|
+
* attached to the component type.
|
|
9
|
+
*
|
|
10
|
+
* @param el - React node to test.
|
|
11
|
+
* @returns `true` if the node is an Avatar element.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function isAvatar(el: React.ReactNode): el is ReactElement<AvatarProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BoxBaseProps } from '../base';
|
|
3
|
+
import { BorderColor, ElementBorder, ElementShape, ElementSize } from '../../utils';
|
|
4
|
+
/**
|
|
5
|
+
* Props for AvatarGroup component.
|
|
6
|
+
*
|
|
7
|
+
* @category Avatar
|
|
8
|
+
*/
|
|
9
|
+
export interface AvatarGroupProps extends Omit<BoxBaseProps, 'type'> {
|
|
10
|
+
max?: number;
|
|
11
|
+
overlap?: number;
|
|
12
|
+
size?: ElementSize;
|
|
13
|
+
shape?: ElementShape;
|
|
14
|
+
border?: ElementBorder;
|
|
15
|
+
borderColor?: BorderColor;
|
|
16
|
+
overflow?: (count: number) => ReactNode;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Groups multiple Avatar components with optional overlap,
|
|
22
|
+
* size/shape override and overflow handling.
|
|
23
|
+
*
|
|
24
|
+
* @function
|
|
25
|
+
* @param props Component properties.
|
|
26
|
+
*
|
|
27
|
+
* @category Avatar
|
|
28
|
+
*/
|
|
29
|
+
export declare const AvatarGroup: import('react').ForwardRefExoticComponent<AvatarGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { ElementAlign, ElementBorder, ElementElevation, ElementFont, ElementShape, ElementSize } from '../../utils/utils
|
|
2
|
+
import { ElementAlign, ElementBorder, ElementElevation, ElementFont, ElementShape, ElementSize } from '../../utils/utils';
|
|
3
3
|
import { BorderColor, SemanticColor } from '../../utils/color';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the Badge component.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { default as React, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { ElementBorder, ElementElevation, ElementShape } from '
|
|
3
|
-
import { BorderColor, SurfaceColor } from '../../../utils/color';
|
|
2
|
+
import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape, SurfaceColor } from '../../utils';
|
|
4
3
|
/**
|
|
5
4
|
* Layout mode for {@link BoxBase}.
|
|
6
5
|
*
|
|
@@ -28,7 +27,7 @@ export type BoxDirection = 'row' | 'col';
|
|
|
28
27
|
*
|
|
29
28
|
* @category Box
|
|
30
29
|
*/
|
|
31
|
-
export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
30
|
+
export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color' | 'content'> {
|
|
32
31
|
/** Maps to `align-content` (grid/flex-wrap content alignment). */
|
|
33
32
|
alignContent?: React.CSSProperties['alignContent'];
|
|
34
33
|
/** Maps to `align-items` (cross-axis alignment). */
|
|
@@ -37,6 +36,8 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>
|
|
|
37
36
|
border?: ElementBorder;
|
|
38
37
|
/** Border color token. */
|
|
39
38
|
borderColor?: BorderColor;
|
|
39
|
+
/** Bottom offset. */
|
|
40
|
+
bottom?: number | string;
|
|
40
41
|
/** React children inside the box. */
|
|
41
42
|
children?: ReactNode;
|
|
42
43
|
/** Layout direction shortcut. Same as `direction="col"`. */
|
|
@@ -57,6 +58,10 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>
|
|
|
57
58
|
elevation?: ElementElevation;
|
|
58
59
|
/** Auto-placement flow direction for grid layouts. */
|
|
59
60
|
flow?: BoxDirection;
|
|
61
|
+
/** Font token controlling typography (size, weight, line-height). */
|
|
62
|
+
font?: ElementFont;
|
|
63
|
+
/** Forces full height (100%). */
|
|
64
|
+
fullHeight?: boolean;
|
|
60
65
|
/** Forces full width (100%). */
|
|
61
66
|
fullWidth?: boolean;
|
|
62
67
|
/** Gap between children (flex/grid). */
|
|
@@ -71,6 +76,22 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>
|
|
|
71
76
|
inline?: boolean;
|
|
72
77
|
/** Maps to `justify-content` (main-axis alignment). */
|
|
73
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;
|
|
74
95
|
/** Padding (all sides). */
|
|
75
96
|
p?: number | string;
|
|
76
97
|
/** Padding bottom. */
|
|
@@ -79,6 +100,8 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>
|
|
|
79
100
|
pl?: number | string;
|
|
80
101
|
/** Maps to `place-items` (grid shortcut for align+justify items). */
|
|
81
102
|
placeItems?: React.CSSProperties['placeItems'];
|
|
103
|
+
/** CSS position (mapped to `uui-*` class). */
|
|
104
|
+
position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
|
|
82
105
|
/** Padding right. */
|
|
83
106
|
pr?: number | string;
|
|
84
107
|
/** Padding top. */
|
|
@@ -87,16 +110,22 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'>
|
|
|
87
110
|
px?: number | string;
|
|
88
111
|
/** Vertical padding (`padding-top` + `padding-bottom`). */
|
|
89
112
|
py?: number | string;
|
|
113
|
+
/** Right offset. */
|
|
114
|
+
right?: number | string;
|
|
90
115
|
/** Layout direction shortcut. Same as `direction="row"`. */
|
|
91
116
|
row?: boolean;
|
|
92
117
|
/** Grid template rows (`2` → `repeat(2, 1fr)`). */
|
|
93
118
|
rows?: number | string;
|
|
94
119
|
/** Shape/border-radius token (round, rounded, smooth, square). */
|
|
95
120
|
shape?: ElementShape;
|
|
121
|
+
/** Top offset. */
|
|
122
|
+
top?: number | string;
|
|
96
123
|
/** Layout mode (`flex`, `grid`, `block`). Default: `flex`. */
|
|
97
124
|
type?: BoxType;
|
|
98
125
|
/** Enables wrapping (`flex-wrap: wrap`). */
|
|
99
126
|
wrap?: boolean;
|
|
127
|
+
/** Stacking order (z-index). */
|
|
128
|
+
zIndex?: number;
|
|
100
129
|
}
|
|
101
130
|
/**
|
|
102
131
|
* `BoxBase` — core layout primitive powering all semantic containers
|
|
@@ -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, ElementTouchEffect } from '
|
|
3
|
-
import { BorderColor, SemanticColor, SurfaceColor } from '../../../utils/color';
|
|
2
|
+
import { BorderColor, ElementAlign, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTouchEffect, SemanticColor, SurfaceColor } from '../../utils';
|
|
4
3
|
/**
|
|
5
4
|
* Props for the ButtonBase component.
|
|
6
5
|
*
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { ElementAlign, ElementBorder, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect } from '
|
|
3
|
-
import { MotionAnimation, MotionStyle } from '
|
|
4
|
-
import { BorderColor, SemanticColor, SurfaceColor } from '../../../utils/color';
|
|
2
|
+
import { BorderColor, ElementAlign, ElementBorder, ElementDensity, ElementElevation, ElementFocusEffect, ElementFont, ElementHoverEffect, ElementOutline, ElementPressedEffect, ElementSelectedEffect, ElementShape, ElementSize, ElementTextPlacement, ElementTouchEffect, SemanticColor, SurfaceColor } from '../../utils';
|
|
3
|
+
import { MotionAnimation, MotionStyle } from '../../types';
|
|
5
4
|
/**
|
|
6
5
|
* Props for the CheckboxBase component.
|
|
7
6
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { default as React, ReactNode } from 'react';
|
|
2
|
-
import { ElementElevation, ElementOutline, ElementShape, ElementSize } from '
|
|
3
|
-
import { MotionAnimation, MotionStyle } from '
|
|
4
|
-
import { BorderColor, SurfaceColor } from '../../../utils/color';
|
|
2
|
+
import { BorderColor, ElementElevation, ElementOutline, ElementShape, ElementSize, SurfaceColor } from '../../utils';
|
|
3
|
+
import { MotionAnimation, MotionStyle } from '../../types';
|
|
5
4
|
export type DialogType = 'basic' | 'fullscreen' | 'dockRight' | 'dockLeft' | 'dockTop' | 'dockBottom';
|
|
6
5
|
export type DialogAnimation = 'auto' | 'none' | MotionAnimation;
|
|
7
|
-
export interface
|
|
6
|
+
export interface DialogBaseProps {
|
|
7
|
+
elementClass: string;
|
|
8
8
|
open: boolean;
|
|
9
9
|
onClose?: () => void;
|
|
10
10
|
type?: DialogType;
|
|
@@ -29,7 +29,4 @@ export interface DialogProps {
|
|
|
29
29
|
showHandle?: boolean;
|
|
30
30
|
autoFocus?: boolean;
|
|
31
31
|
}
|
|
32
|
-
export declare const
|
|
33
|
-
({ open, onClose, type, color, elevation, shape, border, borderColor, size, animation, duration, disableBackdropClose, disableEscapeKey, children, className, motionStyle, modal, }: DialogProps): React.ReactPortal | null;
|
|
34
|
-
displayName: string;
|
|
35
|
-
};
|
|
32
|
+
export declare const DialogBase: React.ForwardRefExoticComponent<DialogBaseProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { ElementBorder, ElementDensity, ElementFont, ElementShape } from '
|
|
3
|
-
import { BorderColor, SemanticColor, SurfaceColor } from '
|
|
2
|
+
import { ElementBorder, ElementDensity, ElementFont, ElementShape } from '../../utils/utils';
|
|
3
|
+
import { BorderColor, SemanticColor, SurfaceColor } from '../../utils/color';
|
|
4
4
|
type FieldVariant = 'filled' | 'outlined' | 'classic';
|
|
5
5
|
export interface FieldBaseProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'children'> {
|
|
6
6
|
color?: SemanticColor;
|
|
@@ -0,0 +1,45 @@
|
|
|
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';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link TextBase}.
|
|
6
|
+
*
|
|
7
|
+
* Defines typography and visual styling for text-level elements
|
|
8
|
+
* without introducing layout behaviour.
|
|
9
|
+
*
|
|
10
|
+
* @category Text
|
|
11
|
+
*/
|
|
12
|
+
export interface TextBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
13
|
+
/** Custom HTML element/component. Default: span. */
|
|
14
|
+
component?: React.ElementType;
|
|
15
|
+
/** Font token controlling typography (size, weight, line-height). */
|
|
16
|
+
font?: ElementFont;
|
|
17
|
+
/** Surface background token. */
|
|
18
|
+
color?: SurfaceColor;
|
|
19
|
+
/** Elevation level (0–5). */
|
|
20
|
+
elevation?: ElementElevation;
|
|
21
|
+
/** Shape/border-radius token. */
|
|
22
|
+
shape?: ElementShape;
|
|
23
|
+
/** Border width (0–5). */
|
|
24
|
+
border?: ElementBorder;
|
|
25
|
+
/** Border color token. */
|
|
26
|
+
borderColor?: BorderColor;
|
|
27
|
+
/** Semantic UUI element class (e.g. uui-text, uui-heading). */
|
|
28
|
+
elementClass?: string;
|
|
29
|
+
/** Text content. */
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* TextBase — core typography primitive powering semantic text components.
|
|
34
|
+
*
|
|
35
|
+
* Provides font tokens, color, border, shape and elevation styling
|
|
36
|
+
* for inline-level and text semantic elements.
|
|
37
|
+
*
|
|
38
|
+
* Intended as a foundation for components such as Text, Heading,
|
|
39
|
+
* Label or other typography-driven UI elements.
|
|
40
|
+
*
|
|
41
|
+
* @category Text
|
|
42
|
+
* @function
|
|
43
|
+
* @param props - Typography and visual styling props.
|
|
44
|
+
*/
|
|
45
|
+
export declare const TextBase: React.ForwardRefExoticComponent<TextBaseProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ButtonBaseProps } from '
|
|
1
|
+
import { ButtonBaseProps } from '../base/buttonBase';
|
|
2
2
|
export type ChipType = 'assist' | 'filter' | 'input' | 'suggestion';
|
|
3
3
|
export interface ChipProps extends Omit<ButtonBaseProps, 'elementClass' | 'iconClass' | 'labelClass'> {
|
|
4
4
|
/** Defines the visual style and behavior of the chip. @default 'assist' */
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ElementOrientation } from '../../utils';
|
|
3
|
+
import { BoxBaseProps } from '../base/boxBase';
|
|
4
|
+
import { MotionAnimation, MotionStyle } from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Collapse component.
|
|
7
|
+
*
|
|
8
|
+
* @category Base components
|
|
9
|
+
*/
|
|
10
|
+
export interface CollapseProps extends BoxBaseProps {
|
|
11
|
+
/** Controls whether the container is expanded. */
|
|
12
|
+
open: boolean;
|
|
13
|
+
/** Motion animation key. Default: slideDown */
|
|
14
|
+
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. */
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/** Additional root class name. */
|
|
22
|
+
className?: string;
|
|
23
|
+
/** Collapse axis. Default: vertical */
|
|
24
|
+
orientation?: ElementOrientation;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Animated layout container that expands and collapses
|
|
28
|
+
* along vertical or horizontal axis.
|
|
29
|
+
*
|
|
30
|
+
* Combines dimension animation (height / width)
|
|
31
|
+
* with UUI motion system.
|
|
32
|
+
*
|
|
33
|
+
* @function
|
|
34
|
+
* @param props - Component properties.
|
|
35
|
+
*
|
|
36
|
+
* @category Base components
|
|
37
|
+
*/
|
|
38
|
+
export declare const Collapse: import('react').ForwardRefExoticComponent<CollapseProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DialogBaseProps } from '../base/dialogBase';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link BottomSheet}.
|
|
4
|
+
* Extends {@link DialogBaseProps}.
|
|
5
|
+
*
|
|
6
|
+
* @category BottomSheet
|
|
7
|
+
*/
|
|
8
|
+
export type BottomSheetProps = Omit<DialogBaseProps, 'elementClass' | 'type'>;
|
|
9
|
+
/**
|
|
10
|
+
* Bottom sheet component used to display supplementary content anchored to the bottom of the screen.
|
|
11
|
+
*
|
|
12
|
+
* Use for actions, filters, or contextual mobile interactions.
|
|
13
|
+
*
|
|
14
|
+
* @category BottomSheet
|
|
15
|
+
* @function
|
|
16
|
+
* @param props - All bottom sheet props inherited from {@link DialogBase}.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <BottomSheet open onClose={() => setOpen(false)}>
|
|
20
|
+
* Content
|
|
21
|
+
* </BottomSheet>
|
|
22
|
+
*/
|
|
23
|
+
export declare const BottomSheet: import('react').ForwardRefExoticComponent<BottomSheetProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DialogBaseProps } from '../base/dialogBase';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link Dialog}.
|
|
4
|
+
* Extends {@link DialogBaseProps}.
|
|
5
|
+
*
|
|
6
|
+
* @category Dialog
|
|
7
|
+
*/
|
|
8
|
+
export type DialogProps = Omit<DialogBaseProps, 'elementClass'>;
|
|
9
|
+
/**
|
|
10
|
+
* Dialog component used to display modal or non-modal content above the app layer.
|
|
11
|
+
*
|
|
12
|
+
* @category Dialog
|
|
13
|
+
* @function
|
|
14
|
+
* @param props - All dialog props inherited from {@link DialogBase}.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <Dialog open onClose={() => setOpen(false)}>
|
|
18
|
+
* Content
|
|
19
|
+
* </Dialog>
|
|
20
|
+
*/
|
|
21
|
+
export declare const Dialog: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ElementOutline } from '../../utils
|
|
3
|
-
import { BorderColor, SurfaceColor } from '../../utils/color';
|
|
2
|
+
import { BorderColor, ElementOutline, SurfaceColor } from '../../utils';
|
|
4
3
|
export interface DialogActionsProps {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
className?: string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ElementFont } from '../../utils
|
|
3
|
-
import { SurfaceColor } from '../../utils/color';
|
|
2
|
+
import { ElementFont, SurfaceColor } from '../../utils';
|
|
4
3
|
export interface DialogTitleProps {
|
|
5
4
|
icon?: ReactNode;
|
|
6
5
|
label?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DialogBaseProps } from '../base/dialogBase';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link Drawer}.
|
|
4
|
+
* Extends {@link DialogBaseProps}.
|
|
5
|
+
*
|
|
6
|
+
* @category Drawer
|
|
7
|
+
*/
|
|
8
|
+
export type DrawerProps = Omit<DialogBaseProps, 'elementClass' | 'type'>;
|
|
9
|
+
/**
|
|
10
|
+
* Drawer component used to display side content that slides in from the edge of the screen.
|
|
11
|
+
*
|
|
12
|
+
* Use for navigation panels, filters, or contextual content.
|
|
13
|
+
*
|
|
14
|
+
* @category Drawer
|
|
15
|
+
* @function
|
|
16
|
+
* @param props - All drawer props inherited from {@link DialogBase}.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <Drawer open onClose={() => setOpen(false)}>
|
|
20
|
+
* Content
|
|
21
|
+
* </Drawer>
|
|
22
|
+
*/
|
|
23
|
+
export declare const Drawer: import('react').ForwardRefExoticComponent<DrawerProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLProps } from 'react';
|
|
2
|
-
import { BorderColor, ElementBorder, ElementElevation, ElementInset, ElementShape } from '../../
|
|
2
|
+
import { BorderColor, ElementBorder, ElementElevation, ElementInset, ElementShape } from '../../utils';
|
|
3
3
|
import { IS_DIVIDER } from './divider.guards';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the {@link Divider} component.
|
package/components/fab/fab.d.ts
CHANGED