@ufoui/core 0.0.58 → 0.0.88
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/assets/index.d.ts +1 -0
- package/assets/spinners.d.ts +16 -0
- package/components/actions/actions.d.ts +55 -0
- package/components/actions/actions.guards.d.ts +15 -0
- package/components/avatar/avatar.d.ts +1 -1
- package/components/base/boxBase.d.ts +6 -6
- package/components/base/dialogBase.d.ts +2 -2
- package/components/base/textBase.d.ts +11 -11
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/button/button.d.ts +1 -1
- package/components/card/card.d.ts +7 -46
- package/components/card/cardHeader.d.ts +49 -0
- package/components/card/cardMedia.d.ts +9 -0
- package/components/card/cardTitle.d.ts +11 -0
- package/components/dialogs/dialogHeader.d.ts +1 -1
- package/components/dialogs/index.d.ts +1 -1
- package/components/fieldset/fieldset.d.ts +1 -1
- package/components/layout/article.d.ts +1 -1
- package/components/layout/aside.d.ts +1 -1
- package/components/layout/content.d.ts +1 -1
- package/components/layout/footer.d.ts +1 -1
- package/components/layout/header.d.ts +1 -1
- package/components/layout/main.d.ts +1 -1
- package/components/layout/nav.d.ts +1 -1
- package/components/layout/section.d.ts +1 -1
- package/components/spinner/spinner.d.ts +27 -2
- package/components/toolbar/toolbar.d.ts +1 -1
- package/components/typography/h1.d.ts +1 -1
- package/components/typography/h2.d.ts +1 -1
- package/components/typography/h3.d.ts +1 -1
- package/components/typography/h4.d.ts +1 -1
- package/components/typography/h5.d.ts +1 -1
- package/components/typography/h6.d.ts +1 -1
- package/components/typography/label.d.ts +1 -1
- package/components/typography/p.d.ts +1 -1
- package/components/typography/span.d.ts +1 -1
- package/hooks/useAnimate.d.ts +8 -6
- package/index.css +1 -1
- package/index.d.ts +3 -0
- package/index.js +2931 -3137
- package/package.json +1 -1
- package/types/color.d.ts +7 -6
- package/types/dialog.d.ts +0 -11
- package/types/motion.d.ts +31 -4
- package/utils/color.d.ts +2 -2
- package/utils/utils.d.ts +1 -1
- package/components/dialogs/dialogActions.d.ts +0 -26
- package/components/dialogs/dialogActions.guards.d.ts +0 -15
package/assets/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type SvgProps = React.ComponentPropsWithoutRef<'svg'>;
|
|
3
|
+
type CircleProps = React.ComponentPropsWithoutRef<'circle'>;
|
|
4
|
+
interface SpinnerRingSvgProps extends SvgProps {
|
|
5
|
+
trackProps?: CircleProps;
|
|
6
|
+
indicatorProps?: CircleProps;
|
|
7
|
+
}
|
|
8
|
+
export declare const SpinnerRingSvg: ({ trackProps, indicatorProps, ...props }: SpinnerRingSvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const SpinnerDotsSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const SpinnerBladeSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const SpinnerBarsSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const SpinnerOrbitSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SpinnerArcSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const SpinnerStepBarSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const SpinnerDualRingSvg: (props: SvgProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { default as React, ReactElement, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Slot contract for components that can act as actions.
|
|
4
|
+
*
|
|
5
|
+
* @category Actions
|
|
6
|
+
*/
|
|
7
|
+
export interface ActionProps {
|
|
8
|
+
/** Text label for the action. */
|
|
9
|
+
label?: string;
|
|
10
|
+
/** Accessible label for actions without visible text. */
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
/** Leading icon for the action. */
|
|
13
|
+
icon?: React.ReactElement;
|
|
14
|
+
/** Custom leading slot content. */
|
|
15
|
+
leading?: ReactNode;
|
|
16
|
+
/** Custom trailing slot content. */
|
|
17
|
+
trailing?: ReactNode;
|
|
18
|
+
/** Disables the action. */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props for action groups used by surface components such as cards and dialogs.
|
|
23
|
+
*
|
|
24
|
+
* @category Actions
|
|
25
|
+
*/
|
|
26
|
+
export interface ActionsProps {
|
|
27
|
+
/** Action elements rendered inside the group. */
|
|
28
|
+
actions?: ReactNode;
|
|
29
|
+
/** Alignment of the action group. */
|
|
30
|
+
align?: 'start' | 'center' | 'end';
|
|
31
|
+
/** Stacks actions vertically instead of horizontally. */
|
|
32
|
+
stack?: boolean;
|
|
33
|
+
/** Additional class names for the action wrapper. */
|
|
34
|
+
className?: string;
|
|
35
|
+
/** Maximum number of visible actions before the rest collapse into an overflow menu. */
|
|
36
|
+
maxActions?: number;
|
|
37
|
+
/** Accessible label for the overflow actions button. Default: "More actions" */
|
|
38
|
+
moreLabel?: string;
|
|
39
|
+
/** Custom icon for the overflow actions button. */
|
|
40
|
+
moreIcon?: ReactElement;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Shared action group renderer used by components that expose footer or inline actions.
|
|
44
|
+
*
|
|
45
|
+
* Filters children to known action elements and applies placement, alignment,
|
|
46
|
+
* and stacking styles.
|
|
47
|
+
*
|
|
48
|
+
* @category Actions
|
|
49
|
+
*/
|
|
50
|
+
declare const Actions: {
|
|
51
|
+
({ actions, className, align, stack, maxActions, moreLabel, moreIcon }: ActionsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
52
|
+
displayName: string;
|
|
53
|
+
};
|
|
54
|
+
export { Actions as DialogActions, Actions as CardActions };
|
|
55
|
+
export type { ActionsProps as DialogActionsProps, ActionsProps as CardActionsProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ActionProps } from './actions';
|
|
3
|
+
export declare const IS_ACTION: unique symbol;
|
|
4
|
+
/**
|
|
5
|
+
* Type guard that checks whether a React node is an action component.
|
|
6
|
+
*
|
|
7
|
+
* Identifies action elements by the internal {@link IS_ACTION} symbol
|
|
8
|
+
* attached to the component type.
|
|
9
|
+
*
|
|
10
|
+
* @param el - React node to test.
|
|
11
|
+
* @returns `true` if the node is an action element.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare function isAction(el: ReactNode): el is ReactElement<ActionProps>;
|
|
@@ -6,7 +6,7 @@ import { ElementSize } from '../../utils';
|
|
|
6
6
|
*
|
|
7
7
|
* @category Avatar
|
|
8
8
|
*/
|
|
9
|
-
export interface AvatarProps extends Omit<BoxBaseProps, '
|
|
9
|
+
export interface AvatarProps extends Omit<BoxBaseProps, 'as' | 'elementClass'> {
|
|
10
10
|
/** Size token controlling width and height. */
|
|
11
11
|
size?: ElementSize;
|
|
12
12
|
/** Image source URL. */
|
|
@@ -32,6 +32,8 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
|
|
|
32
32
|
alignContent?: CSSProperties['alignContent'];
|
|
33
33
|
/** Maps to `align-items` (cross-axis alignment). */
|
|
34
34
|
alignItems?: CSSProperties['alignItems'];
|
|
35
|
+
/** Custom HTML element/component. Default: `div`. */
|
|
36
|
+
as?: ElementType;
|
|
35
37
|
/** Border width (0–5). */
|
|
36
38
|
border?: ElementBorder;
|
|
37
39
|
/** Border color token. */
|
|
@@ -44,8 +46,6 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
|
|
|
44
46
|
color?: BaseColor;
|
|
45
47
|
/** Grid template columns (`3` → `repeat(3, 1fr)`). */
|
|
46
48
|
cols?: number | string;
|
|
47
|
-
/** Custom HTML element/component. Default: `div`. */
|
|
48
|
-
component?: ElementType;
|
|
49
49
|
/** Layout direction (`row` or `col`) for flex. Ignored if `row` or `col` is set. */
|
|
50
50
|
direction?: BoxDirection;
|
|
51
51
|
/** Native disabled attribute. Applied when supported by the rendered element. */
|
|
@@ -70,6 +70,8 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
|
|
|
70
70
|
gapY?: number | string;
|
|
71
71
|
/** Enables flex-grow (fills remaining space). */
|
|
72
72
|
grow?: boolean;
|
|
73
|
+
/** Height. */
|
|
74
|
+
h?: number | string;
|
|
73
75
|
/** Renders as `inline-flex`, `inline-grid` or `inline-block`. */
|
|
74
76
|
inline?: boolean;
|
|
75
77
|
/** Maps to `justify-content` (main-axis alignment). */
|
|
@@ -98,12 +100,10 @@ export interface BoxBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'
|
|
|
98
100
|
shape?: ElementShape;
|
|
99
101
|
/** Layout mode (`flex`, `grid`, `block`). Default: `flex`. */
|
|
100
102
|
type?: BoxType;
|
|
101
|
-
/** Enables wrapping (`flex-wrap: wrap`). */
|
|
102
|
-
wrap?: boolean;
|
|
103
103
|
/** Width. */
|
|
104
104
|
w?: number | string;
|
|
105
|
-
/**
|
|
106
|
-
|
|
105
|
+
/** Enables wrapping (`flex-wrap: wrap`). */
|
|
106
|
+
wrap?: boolean;
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* `BoxBase` — core layout primitive powering all semantic containers
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { BorderColor, ElementElevation, ElementFont, ElementOutline, ElementShape, ElementSize, SurfaceColor } from '../../utils';
|
|
3
|
-
import {
|
|
3
|
+
import { DialogIconSlot, DialogType, MotionAnimation, MotionStyle } from '../../types';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the DialogBase component.
|
|
6
6
|
*
|
|
@@ -39,7 +39,7 @@ export interface DialogBaseProps {
|
|
|
39
39
|
/** Renders the panel in detached layout style. */
|
|
40
40
|
detached?: boolean;
|
|
41
41
|
/** Animation preset; `'none'` disables motion. */
|
|
42
|
-
animation?:
|
|
42
|
+
animation?: MotionAnimation;
|
|
43
43
|
/** Duration in milliseconds for open and close animations. Default: 500 */
|
|
44
44
|
duration?: number;
|
|
45
45
|
/** Whether the dialog closes when the backdrop is clicked. Default: true */
|
|
@@ -10,23 +10,23 @@ import { BorderColor, ElementBorder, ElementElevation, ElementFont, ElementShape
|
|
|
10
10
|
*/
|
|
11
11
|
export interface TextBaseProps extends Omit<HTMLAttributes<HTMLElement>, 'color'> {
|
|
12
12
|
/** Custom HTML element/component. Default: span. */
|
|
13
|
-
|
|
14
|
-
/** Font token controlling typography (size, weight, line-height). */
|
|
15
|
-
font?: ElementFont;
|
|
16
|
-
/** Surface background token. */
|
|
17
|
-
color?: SurfaceColor;
|
|
18
|
-
/** Elevation level (0–5). */
|
|
19
|
-
elevation?: ElementElevation;
|
|
20
|
-
/** Shape/border-radius token. */
|
|
21
|
-
shape?: ElementShape;
|
|
13
|
+
as?: React.ElementType;
|
|
22
14
|
/** Border width (0–5). */
|
|
23
15
|
border?: ElementBorder;
|
|
24
16
|
/** Border color token. */
|
|
25
17
|
borderColor?: BorderColor;
|
|
26
|
-
/** Semantic UUI element class (e.g. uui-text, uui-heading). */
|
|
27
|
-
elementClass?: string;
|
|
28
18
|
/** Text content. */
|
|
29
19
|
children?: ReactNode;
|
|
20
|
+
/** Surface background token. */
|
|
21
|
+
color?: SurfaceColor;
|
|
22
|
+
/** Semantic UUI element class (e.g. uui-text, uui-heading). */
|
|
23
|
+
elementClass?: string;
|
|
24
|
+
/** Elevation level (0–5). */
|
|
25
|
+
elevation?: ElementElevation;
|
|
26
|
+
/** Font token controlling typography (size, weight, line-height). */
|
|
27
|
+
font?: ElementFont;
|
|
28
|
+
/** Shape/border-radius token. */
|
|
29
|
+
shape?: ElementShape;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* TextBase — core typography primitive powering semantic text components.
|
|
@@ -30,7 +30,7 @@ export interface BreadcrumbsProps extends BoxBaseProps {
|
|
|
30
30
|
renderItem?: (item: BreadcrumbItem, index: number) => ReactNode;
|
|
31
31
|
renderSeparator?: (index: number) => ReactNode;
|
|
32
32
|
renderCollapse?: (items: BreadcrumbItem[]) => ReactNode;
|
|
33
|
-
|
|
33
|
+
as?: ElementType;
|
|
34
34
|
itemComponent?: ElementType;
|
|
35
35
|
density?: ElementDensity;
|
|
36
36
|
font?: ElementFont;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { default as React, ElementType,
|
|
2
|
-
import { BorderColor, ElementElevation,
|
|
3
|
-
import {
|
|
1
|
+
import { default as React, ElementType, ReactNode } from 'react';
|
|
2
|
+
import { BorderColor, ElementElevation, ElementShape, SurfaceColor } from '../../utils';
|
|
3
|
+
import { MotionAnimation, MotionStyle } from '../../types';
|
|
4
4
|
import { BoxBaseProps } from '../base';
|
|
5
5
|
export type CardVariant = 'elevated' | 'filled' | 'outlined';
|
|
6
6
|
/**
|
|
@@ -12,15 +12,17 @@ export type CardVariant = 'elevated' | 'filled' | 'outlined';
|
|
|
12
12
|
*/
|
|
13
13
|
export interface CardProps extends Omit<BoxBaseProps, 'type' | 'elementClass' | 'color' | 'elevation' | 'borderColor'> {
|
|
14
14
|
/** Underlying element/component. Default: `article`. */
|
|
15
|
-
|
|
15
|
+
as?: ElementType;
|
|
16
16
|
/** Card content. */
|
|
17
17
|
children?: ReactNode;
|
|
18
|
+
/** Removes default inner spacing from the card content area. */
|
|
19
|
+
flush?: boolean;
|
|
18
20
|
/** Card variant. Default: `elevated`. */
|
|
19
21
|
variant?: CardVariant;
|
|
20
22
|
/** Whether the card is visible. */
|
|
21
23
|
open?: boolean;
|
|
22
24
|
/** Entry/exit animation preset. Use `none` to disable. */
|
|
23
|
-
animation?:
|
|
25
|
+
animation?: MotionAnimation;
|
|
24
26
|
/** Animation duration in ms. */
|
|
25
27
|
duration?: number;
|
|
26
28
|
/** Motion style helper classes. */
|
|
@@ -33,48 +35,7 @@ export interface CardProps extends Omit<BoxBaseProps, 'type' | 'elementClass' |
|
|
|
33
35
|
shape?: ElementShape;
|
|
34
36
|
/** Border color override (used by outlined cards). */
|
|
35
37
|
borderColor?: BorderColor;
|
|
36
|
-
/** Visual title text. */
|
|
37
|
-
label?: string;
|
|
38
38
|
/** Accessible label for cards without visible title. */
|
|
39
39
|
'aria-label'?: string;
|
|
40
|
-
/** Card icon. */
|
|
41
|
-
icon?: ReactElement;
|
|
42
|
-
showIcon?: boolean;
|
|
43
|
-
iconColor?: SurfaceColor;
|
|
44
|
-
iconSlot?: DialogIconSlot;
|
|
45
|
-
/** Title alignment. */
|
|
46
|
-
titleAlign?: 'start' | 'center' | 'end';
|
|
47
|
-
/** Header leading slot content. */
|
|
48
|
-
leading?: ReactNode;
|
|
49
|
-
/** Header trailing slot content. */
|
|
50
|
-
trailing?: ReactNode;
|
|
51
|
-
/** Header/content actions. */
|
|
52
|
-
actions?: ReactNode;
|
|
53
|
-
/** Actions placement. Default: `bottom`. */
|
|
54
|
-
actionsPlacement?: 'top' | 'subtitle' | 'bottom' | 'inline';
|
|
55
|
-
/** Actions alignment. */
|
|
56
|
-
actionsAlign?: 'start' | 'center' | 'end';
|
|
57
|
-
/** Stack actions vertically. */
|
|
58
|
-
actionsStack?: boolean;
|
|
59
|
-
/** Maximum number of visible actions before overflow. */
|
|
60
|
-
maxActions?: number;
|
|
61
|
-
/** Overflow button label. */
|
|
62
|
-
moreLabel?: string;
|
|
63
|
-
/** Overflow button icon. */
|
|
64
|
-
moreIcon?: ReactElement;
|
|
65
|
-
/** Shows close button in header. */
|
|
66
|
-
showClose?: boolean;
|
|
67
|
-
/** Close button icon override. */
|
|
68
|
-
closeIcon?: ReactElement;
|
|
69
|
-
/** Shows back button in header. */
|
|
70
|
-
showBack?: boolean;
|
|
71
|
-
/** Back button icon override. */
|
|
72
|
-
backIcon?: ReactElement;
|
|
73
|
-
/** Back button handler. Defaults to onClose. */
|
|
74
|
-
onBack?: () => void;
|
|
75
|
-
/** Close button handler. */
|
|
76
|
-
onClose?: () => void;
|
|
77
|
-
/** Header title font token. */
|
|
78
|
-
titleFont?: ElementFont;
|
|
79
40
|
}
|
|
80
41
|
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { CardActionsProps } from '../actions/actions';
|
|
3
|
+
import { ElementFont } from '../../utils';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link CardHeader}.
|
|
6
|
+
*
|
|
7
|
+
* @category Card
|
|
8
|
+
*/
|
|
9
|
+
export interface CardHeaderProps {
|
|
10
|
+
/** Optional content before the title row. */
|
|
11
|
+
leading?: ReactNode;
|
|
12
|
+
/** Title alignment passed to {@link CardTitle}. */
|
|
13
|
+
titleAlign?: 'start' | 'center' | 'end';
|
|
14
|
+
/** Title text. */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** Secondary text shown below the title. */
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
/** Action buttons (see {@link CardActions}). */
|
|
19
|
+
actions?: CardActionsProps['actions'];
|
|
20
|
+
actionsAlign?: CardActionsProps['align'];
|
|
21
|
+
actionsStack?: CardActionsProps['stack'];
|
|
22
|
+
maxActions?: CardActionsProps['maxActions'];
|
|
23
|
+
moreLabel?: CardActionsProps['moreLabel'];
|
|
24
|
+
moreIcon?: CardActionsProps['moreIcon'];
|
|
25
|
+
/** Optional content after actions / before close in the header row. */
|
|
26
|
+
trailing?: ReactNode;
|
|
27
|
+
/** When true, renders the close control with {@link closeIcon}. */
|
|
28
|
+
showClose?: boolean;
|
|
29
|
+
/** Invoked when the close control is activated. */
|
|
30
|
+
onClose?: () => void;
|
|
31
|
+
/** Icon element for the close control (already resolved to default or override). */
|
|
32
|
+
closeIcon?: ReactElement;
|
|
33
|
+
font?: ElementFont;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Card title row: leading/icon, title, inline actions, trailing, and close.
|
|
37
|
+
*
|
|
38
|
+
* @remarks
|
|
39
|
+
* Non-inline actions are omitted here and rendered below the content by the parent.
|
|
40
|
+
*
|
|
41
|
+
* @function
|
|
42
|
+
* @param props Component properties.
|
|
43
|
+
*
|
|
44
|
+
* @category Card
|
|
45
|
+
*/
|
|
46
|
+
export declare const CardHeader: {
|
|
47
|
+
({ leading, titleAlign, label, actions, actionsAlign, actionsStack, maxActions, moreLabel, moreIcon, trailing, showClose, onClose, closeIcon, font, }: CardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
48
|
+
displayName: string;
|
|
49
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CardMediaProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const CardMedia: {
|
|
7
|
+
({ children, className }: CardMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
displayName: string;
|
|
9
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ElementFont } from '../../utils';
|
|
2
|
+
export interface CardTitleProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
font?: ElementFont;
|
|
6
|
+
align?: 'start' | 'center' | 'end';
|
|
7
|
+
}
|
|
8
|
+
export declare const CardTitle: {
|
|
9
|
+
({ label, className, align, font, }: CardTitleProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { DialogActionsProps } from '
|
|
2
|
+
import { DialogActionsProps } from '../actions/actions';
|
|
3
3
|
import { ElementFont, SurfaceColor } from '../../utils';
|
|
4
4
|
import { DialogIconSlot } from '../../types';
|
|
5
5
|
/**
|
|
@@ -7,7 +7,7 @@ import { BoxBaseProps } from '../base';
|
|
|
7
7
|
*
|
|
8
8
|
* @category Fieldset
|
|
9
9
|
*/
|
|
10
|
-
export interface FieldsetProps extends Omit<BoxBaseProps, '
|
|
10
|
+
export interface FieldsetProps extends Omit<BoxBaseProps, 'as' | 'elementClass'> {
|
|
11
11
|
/** Supporting text displayed below the fieldset content. */
|
|
12
12
|
description?: string;
|
|
13
13
|
/** Text color of the description. */
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type ArticleProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type ArticleProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<article>` element.
|
|
11
11
|
* Intended for self-contained content units composed of Sections and optional Aside.
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type AsideProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type AsideProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<aside>` element.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type ContentProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type ContentProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Layout wrapper for the main article content.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type FooterProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type FooterProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<footer>` element.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type HeaderProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type HeaderProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<header>` element.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type MainProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type MainProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<main>` element.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type NavProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type NavProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<nav>` element.
|
|
11
11
|
*
|
|
@@ -5,7 +5,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Box
|
|
7
7
|
*/
|
|
8
|
-
export type SectionProps = Omit<BoxBaseProps, 'elementClass' | '
|
|
8
|
+
export type SectionProps = Omit<BoxBaseProps, 'elementClass' | 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Semantic layout wrapper for the native `<section>` element.
|
|
11
11
|
*
|
|
@@ -1,7 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseColor, ElementSize } from '../../utils';
|
|
2
|
+
export type SpinnerVariant = 'ring' | 'dots' | 'blade' | 'bars' | 'orbit' | 'arc' | 'stepBar' | 'dualRing';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the spinner component.
|
|
5
|
+
*
|
|
6
|
+
* @category Spinner
|
|
7
|
+
*/
|
|
2
8
|
export interface SpinnerProps {
|
|
9
|
+
/** Visual spinner variant. */
|
|
3
10
|
variant?: SpinnerVariant;
|
|
11
|
+
/** Semantic color token applied to the spinner. */
|
|
12
|
+
color?: BaseColor;
|
|
13
|
+
/** Size token controlling spinner dimensions. */
|
|
14
|
+
size?: ElementSize;
|
|
15
|
+
/** Additional class names for the root svg element. */
|
|
4
16
|
className?: string;
|
|
17
|
+
/** Applies inline alignment (`vertical-align: middle`) for text-flow usage. */
|
|
5
18
|
inline?: boolean;
|
|
19
|
+
/** Accessible label. When provided, spinner is announced as a status. */
|
|
20
|
+
ariaLabel?: string;
|
|
6
21
|
}
|
|
7
|
-
|
|
22
|
+
/**
|
|
23
|
+
* Renders a loading spinner in one of the supported variants.
|
|
24
|
+
*
|
|
25
|
+
* By default spinner is decorative. Provide `ariaLabel` to expose it as an accessible status.
|
|
26
|
+
*
|
|
27
|
+
* @function Spinner
|
|
28
|
+
* @param props Component properties.
|
|
29
|
+
*
|
|
30
|
+
* @category Spinner
|
|
31
|
+
*/
|
|
32
|
+
export declare const Spinner: ({ variant, color, size, inline, className, ariaLabel }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { BoxBaseProps } from '../base/boxBase';
|
|
|
7
7
|
*
|
|
8
8
|
* @category Toolbar
|
|
9
9
|
*/
|
|
10
|
-
export interface ToolbarProps extends Omit<BoxBaseProps, '
|
|
10
|
+
export interface ToolbarProps extends Omit<BoxBaseProps, 'as' | 'elementClass' | 'direction' | 'row' | 'col'> {
|
|
11
11
|
/** Visual variant of the toolbar. */
|
|
12
12
|
variant?: 'docked' | 'floating';
|
|
13
13
|
/** Surface color token applied to container. */
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type H1Props = Omit<TextBaseProps, '
|
|
8
|
+
export type H1Props = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* H1 semantic heading.
|
|
11
11
|
* Renders native h1 element with default headlineLarge font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type H2Props = Omit<TextBaseProps, '
|
|
8
|
+
export type H2Props = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* H2 semantic heading.
|
|
11
11
|
* Renders native h2 element with default headlineMedium font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type H3Props = Omit<TextBaseProps, '
|
|
8
|
+
export type H3Props = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* H3 semantic heading.
|
|
11
11
|
* Renders native h3 element with default headlineSmall font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type H4Props = Omit<TextBaseProps, '
|
|
8
|
+
export type H4Props = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* H4 semantic heading.
|
|
11
11
|
* Renders native h4 element with default titleLarge font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type H5Props = Omit<TextBaseProps, '
|
|
8
|
+
export type H5Props = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* H5 semantic heading.
|
|
11
11
|
* Renders native h5 element with default titleMedium font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type H6Props = Omit<TextBaseProps, '
|
|
8
|
+
export type H6Props = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* H6 semantic heading.
|
|
11
11
|
* Renders native h6 element with default titleSmall font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type LabelProps = Omit<TextBaseProps, '
|
|
8
|
+
export type LabelProps = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Label semantic text.
|
|
11
11
|
* Renders native label element with default labelLarge font.
|
|
@@ -5,7 +5,7 @@ import { TextBaseProps } from '../base/textBase';
|
|
|
5
5
|
*
|
|
6
6
|
* @category Typography
|
|
7
7
|
*/
|
|
8
|
-
export type SpanProps = Omit<TextBaseProps, '
|
|
8
|
+
export type SpanProps = Omit<TextBaseProps, 'as'>;
|
|
9
9
|
/**
|
|
10
10
|
* Span semantic inline text wrapper.
|
|
11
11
|
* Renders native span element.
|