@ncds/ui-admin 1.8.3 → 1.8.4
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/dist/cjs/src/components/index.js +33 -0
- package/dist/cjs/src/components/layout/block-container/BlockContainer.js +38 -0
- package/dist/cjs/src/components/layout/block-container/index.js +16 -0
- package/dist/cjs/src/components/layout/block-header/BlockHeader.js +107 -0
- package/dist/cjs/src/components/layout/block-header/SubTitle.js +56 -0
- package/dist/cjs/src/components/layout/block-header/index.js +27 -0
- package/dist/cjs/src/components/layout/page-title/PageTitle.js +95 -0
- package/dist/cjs/src/components/layout/page-title/index.js +16 -0
- package/dist/esm/src/components/index.js +3 -0
- package/dist/esm/src/components/layout/block-container/BlockContainer.js +31 -0
- package/dist/esm/src/components/layout/block-container/index.js +1 -0
- package/dist/esm/src/components/layout/block-header/BlockHeader.js +100 -0
- package/dist/esm/src/components/layout/block-header/SubTitle.js +49 -0
- package/dist/esm/src/components/layout/block-header/index.js +2 -0
- package/dist/esm/src/components/layout/page-title/PageTitle.js +88 -0
- package/dist/esm/src/components/layout/page-title/index.js +1 -0
- package/dist/temp/src/components/index.d.ts +3 -0
- package/dist/temp/src/components/index.js +3 -0
- package/dist/temp/src/components/layout/block-container/BlockContainer.d.ts +19 -0
- package/dist/temp/src/components/layout/block-container/BlockContainer.js +11 -0
- package/dist/temp/src/components/layout/block-container/index.d.ts +1 -0
- package/dist/temp/src/components/layout/block-container/index.js +1 -0
- package/dist/temp/src/components/layout/block-header/BlockHeader.d.ts +23 -0
- package/dist/temp/src/components/layout/block-header/BlockHeader.js +21 -0
- package/dist/temp/src/components/layout/block-header/SubTitle.d.ts +19 -0
- package/dist/temp/src/components/layout/block-header/SubTitle.js +8 -0
- package/dist/temp/src/components/layout/block-header/index.d.ts +2 -0
- package/dist/temp/src/components/layout/block-header/index.js +2 -0
- package/dist/temp/src/components/layout/page-title/PageTitle.d.ts +22 -0
- package/dist/temp/src/components/layout/page-title/PageTitle.js +19 -0
- package/dist/temp/src/components/layout/page-title/index.d.ts +1 -0
- package/dist/temp/src/components/layout/page-title/index.js +1 -0
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/layout/block-container/BlockContainer.d.ts +19 -0
- package/dist/types/src/components/layout/block-container/index.d.ts +1 -0
- package/dist/types/src/components/layout/block-header/BlockHeader.d.ts +23 -0
- package/dist/types/src/components/layout/block-header/SubTitle.d.ts +19 -0
- package/dist/types/src/components/layout/block-header/index.d.ts +2 -0
- package/dist/types/src/components/layout/page-title/PageTitle.d.ts +22 -0
- package/dist/types/src/components/layout/page-title/index.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +292 -0
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft, ChevronRight } from '@ncds/ui-admin-icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Fragment } from 'react';
|
|
5
|
+
import { Button } from '../../action/button/Button';
|
|
6
|
+
const renderBreadcrumb = items => _jsx("nav", {
|
|
7
|
+
className: "ncua-page-title__breadcrumb",
|
|
8
|
+
"aria-label": "breadcrumb",
|
|
9
|
+
children: items.map((item, i) =>
|
|
10
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breadcrumb items may have duplicate labels
|
|
11
|
+
_jsx(Fragment, {
|
|
12
|
+
children: i < items.length - 1 ? _jsxs(_Fragment, {
|
|
13
|
+
children: [_jsx("span", {
|
|
14
|
+
className: "ncua-page-title__breadcrumb-item",
|
|
15
|
+
children: item.href ? _jsx("a", {
|
|
16
|
+
href: item.href,
|
|
17
|
+
children: item.label
|
|
18
|
+
}) : item.label
|
|
19
|
+
}), _jsx(ChevronRight, {
|
|
20
|
+
className: "ncua-page-title__breadcrumb-separator"
|
|
21
|
+
})]
|
|
22
|
+
}) : _jsx("span", {
|
|
23
|
+
className: "ncua-page-title__breadcrumb-current",
|
|
24
|
+
children: item.label
|
|
25
|
+
})
|
|
26
|
+
}, i))
|
|
27
|
+
});
|
|
28
|
+
const renderBackButton = onBack => _jsx(Button, {
|
|
29
|
+
label: "",
|
|
30
|
+
hierarchy: "secondary-gray",
|
|
31
|
+
size: "xs",
|
|
32
|
+
onlyIcon: true,
|
|
33
|
+
leadingIcon: {
|
|
34
|
+
type: 'icon',
|
|
35
|
+
icon: ChevronLeft
|
|
36
|
+
},
|
|
37
|
+
onClick: onBack,
|
|
38
|
+
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0\uB85C \uB3CC\uC544\uAC00\uAE30",
|
|
39
|
+
className: "ncua-page-title__back-btn"
|
|
40
|
+
});
|
|
41
|
+
const PageTitle = _ref => {
|
|
42
|
+
let {
|
|
43
|
+
title,
|
|
44
|
+
variant = 'default',
|
|
45
|
+
breadcrumbItems,
|
|
46
|
+
onBack,
|
|
47
|
+
guideButton,
|
|
48
|
+
primaryAction,
|
|
49
|
+
secondaryAction,
|
|
50
|
+
className,
|
|
51
|
+
...rest
|
|
52
|
+
} = _ref;
|
|
53
|
+
const isFixed = variant === 'fixed' || variant === 'fixed-detail';
|
|
54
|
+
const isDetail = variant === 'detail' || variant === 'fixed-detail';
|
|
55
|
+
const hasBreadcrumb = !isFixed && breadcrumbItems && breadcrumbItems.length > 0;
|
|
56
|
+
return _jsx("header", {
|
|
57
|
+
className: classNames('ncua-page-title', {
|
|
58
|
+
'ncua-page-title--fixed': isFixed
|
|
59
|
+
}, className),
|
|
60
|
+
...rest,
|
|
61
|
+
children: _jsx("div", {
|
|
62
|
+
className: "ncua-page-title__page-header",
|
|
63
|
+
children: _jsxs("div", {
|
|
64
|
+
className: classNames('ncua-page-title__header', {
|
|
65
|
+
'ncua-page-title__header--has-breadcrumb': hasBreadcrumb
|
|
66
|
+
}),
|
|
67
|
+
children: [_jsxs("div", {
|
|
68
|
+
className: "ncua-page-title__container",
|
|
69
|
+
children: [hasBreadcrumb && renderBreadcrumb(breadcrumbItems), _jsxs("div", {
|
|
70
|
+
className: "ncua-page-title__title-row",
|
|
71
|
+
children: [isDetail && onBack && renderBackButton(onBack), _jsx("h1", {
|
|
72
|
+
className: "ncua-page-title__title",
|
|
73
|
+
children: title
|
|
74
|
+
}), guideButton && _jsx("div", {
|
|
75
|
+
className: "ncua-page-title__guide-btn",
|
|
76
|
+
children: guideButton
|
|
77
|
+
})]
|
|
78
|
+
})]
|
|
79
|
+
}), (secondaryAction || primaryAction) && _jsxs("div", {
|
|
80
|
+
className: "ncua-page-title__actions",
|
|
81
|
+
children: [secondaryAction, primaryAction]
|
|
82
|
+
})]
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
PageTitle.displayName = 'PageTitle';
|
|
88
|
+
export { PageTitle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageTitle';
|
|
@@ -31,7 +31,10 @@ export * from './forms-and-input/textarea';
|
|
|
31
31
|
export * from './forms-and-input/toggle';
|
|
32
32
|
export * from './image-and-icons/dot';
|
|
33
33
|
export * from './image-and-icons/featured-icon';
|
|
34
|
+
export * from './layout/block-container';
|
|
35
|
+
export * from './layout/block-header';
|
|
34
36
|
export * from './layout/divider';
|
|
37
|
+
export * from './layout/page-title';
|
|
35
38
|
export * from './navigation/bread-crumb';
|
|
36
39
|
export * from './navigation/horizontal-tab';
|
|
37
40
|
export * from './navigation/pagination';
|
|
@@ -36,7 +36,10 @@ export * from './forms-and-input/toggle';
|
|
|
36
36
|
export * from './image-and-icons/dot';
|
|
37
37
|
export * from './image-and-icons/featured-icon';
|
|
38
38
|
// Layout
|
|
39
|
+
export * from './layout/block-container';
|
|
40
|
+
export * from './layout/block-header';
|
|
39
41
|
export * from './layout/divider';
|
|
42
|
+
export * from './layout/page-title';
|
|
40
43
|
// Navigation
|
|
41
44
|
export * from './navigation/bread-crumb';
|
|
42
45
|
export * from './navigation/horizontal-tab';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
interface BlockContainerProps extends ComponentPropsWithoutRef<'section'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
interface BlockContainerBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const BlockContainer: {
|
|
11
|
+
({ children, className, ...rest }: BlockContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
} & {
|
|
14
|
+
Body: {
|
|
15
|
+
({ children, className, ...rest }: BlockContainerBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type { BlockContainerProps, BlockContainerBodyProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
const BlockContainerBase = ({ children, className, ...rest }) => {
|
|
4
|
+
return (_jsx("section", { className: classNames('ncua-block-container', className), ...rest, children: children }));
|
|
5
|
+
};
|
|
6
|
+
BlockContainerBase.displayName = 'BlockContainer';
|
|
7
|
+
const Body = ({ children, className, ...rest }) => {
|
|
8
|
+
return (_jsx("div", { className: classNames('ncua-block-container__body', className), ...rest, children: children }));
|
|
9
|
+
};
|
|
10
|
+
Body.displayName = 'BlockContainer.Body';
|
|
11
|
+
export const BlockContainer = Object.assign(BlockContainerBase, { Body });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BlockContainer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BlockContainer';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
interface BlockHeaderProps extends Omit<ComponentPropsWithoutRef<'header'>, 'title' | 'children'> {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
action?: ReactNode;
|
|
6
|
+
showDivider?: boolean;
|
|
7
|
+
badge?: ReactNode;
|
|
8
|
+
description?: string;
|
|
9
|
+
collapsible?: {
|
|
10
|
+
expanded: boolean;
|
|
11
|
+
onToggle: () => void;
|
|
12
|
+
};
|
|
13
|
+
showRequiredNotice?: boolean;
|
|
14
|
+
controlStrip?: ReactNode;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const BlockHeader: {
|
|
19
|
+
({ title, tooltip, action, showDivider, badge, description, collapsible, showRequiredNotice, controlStrip, children, className, ...rest }: BlockHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export { BlockHeader };
|
|
23
|
+
export type { BlockHeaderProps };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown, ChevronUp } from '@ncds/ui-admin-icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Tooltip } from '../../overlays/tooltip/Tooltip';
|
|
5
|
+
const ICON_SIZE = 24;
|
|
6
|
+
const CollapsibleButton = ({ expanded, onToggle }) => (_jsx("button", { type: "button", className: "ncua-block-header__collapsible-btn", onClick: onToggle, "aria-expanded": expanded, children: expanded ? (_jsx(ChevronUp, { width: ICON_SIZE, height: ICON_SIZE, color: "var(--gray-300)" })) : (_jsx(ChevronDown, { width: ICON_SIZE, height: ICON_SIZE, color: "var(--gray-300)" })) }));
|
|
7
|
+
const BlockHeader = ({ title, tooltip, action, showDivider = true, badge, description, collapsible, showRequiredNotice = false, controlStrip, children, className, ...rest }) => {
|
|
8
|
+
const hasColumnLayout = !!description;
|
|
9
|
+
const hasTabChildren = !!children;
|
|
10
|
+
const hasControlStrip = !!controlStrip;
|
|
11
|
+
const isCollapsed = !!collapsible && !collapsible.expanded;
|
|
12
|
+
return (_jsxs("header", { className: classNames('ncua-block-header', {
|
|
13
|
+
'ncua-block-header--column': hasColumnLayout,
|
|
14
|
+
'ncua-block-header--no-divider': !showDivider || hasTabChildren || isCollapsed,
|
|
15
|
+
'ncua-block-header--has-tab': hasTabChildren && !isCollapsed,
|
|
16
|
+
'ncua-block-header--has-control-strip': hasControlStrip,
|
|
17
|
+
'ncua-block-header--is-required': showRequiredNotice,
|
|
18
|
+
}, className), ...rest, children: [_jsxs("div", { className: "ncua-block-header__row", children: [_jsxs("div", { className: "ncua-block-header__title-area", children: [_jsx("span", { className: "ncua-block-header__title", children: title }), tooltip && _jsx(Tooltip, { content: tooltip, size: "sm", position: "top", hideArrow: true, iconType: "fill" }), badge && _jsx("span", { className: "ncua-block-header__badge", children: badge })] }), _jsxs("div", { className: "ncua-block-header__action-area", children: [showRequiredNotice && (_jsxs("span", { className: "ncua-block-header__required-notice", children: [_jsx("span", { className: "ncua-block-header__required-notice--red", children: "* \uB294 \uD544\uC218 \uC785\uB825" }), _jsx("span", { className: "ncua-block-header__required-notice--gray", children: " \uD56D\uBAA9\uC785\uB2C8\uB2E4." })] })), action, collapsible && _jsx(CollapsibleButton, { ...collapsible })] })] }), hasColumnLayout && _jsx("p", { className: "ncua-block-header__description", children: description }), hasControlStrip && _jsx("div", { className: "ncua-block-header__control-strip", children: controlStrip }), hasTabChildren && !isCollapsed && _jsx("div", { className: "ncua-block-header__tabs", children: children })] }));
|
|
19
|
+
};
|
|
20
|
+
BlockHeader.displayName = 'BlockHeader';
|
|
21
|
+
export { BlockHeader };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import type { Size } from '../../../../constant/size';
|
|
3
|
+
type SubTitleSize = 'middle' | Extract<Size, 'sm' | 'xs'>;
|
|
4
|
+
interface SubTitleProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
size?: SubTitleSize;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const SubTitle: {
|
|
15
|
+
({ title, size, tooltip, description, error, action, required, className, ...rest }: SubTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export { SubTitle };
|
|
19
|
+
export type { SubTitleProps, SubTitleSize };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Tooltip } from '../../overlays/tooltip/Tooltip';
|
|
4
|
+
const SubTitle = ({ title, size = 'sm', tooltip, description, error, action, required = false, className, ...rest }) => {
|
|
5
|
+
return (_jsxs("div", { className: classNames('ncua-sub-title', `ncua-sub-title--${size}`, className), ...rest, children: [_jsxs("div", { className: "ncua-sub-title__title-row", children: [_jsxs("div", { className: "ncua-sub-title__title-area", children: [required && _jsx("span", { className: "ncua-sub-title__required-marker", children: "*" }), _jsx("span", { className: "ncua-sub-title__title", children: title }), tooltip && _jsx(Tooltip, { content: tooltip, size: "sm", position: "right", hideArrow: true })] }), action && _jsx("div", { className: "ncua-sub-title__action", children: action })] }), description && _jsx("p", { className: "ncua-sub-title__description", children: description }), error && _jsx("p", { className: "ncua-sub-title__error", children: error })] }));
|
|
6
|
+
};
|
|
7
|
+
SubTitle.displayName = 'BlockHeader.SubTitle';
|
|
8
|
+
export { SubTitle };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
type PageTitleVariant = 'default' | 'detail' | 'fixed' | 'fixed-detail';
|
|
3
|
+
interface PageTitleBreadcrumbItem {
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PageTitleProps extends ComponentPropsWithoutRef<'header'> {
|
|
8
|
+
title: string;
|
|
9
|
+
variant?: PageTitleVariant;
|
|
10
|
+
breadcrumbItems?: PageTitleBreadcrumbItem[];
|
|
11
|
+
onBack?: () => void;
|
|
12
|
+
guideButton?: ReactNode;
|
|
13
|
+
primaryAction?: ReactNode;
|
|
14
|
+
secondaryAction?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const PageTitle: {
|
|
18
|
+
({ title, variant, breadcrumbItems, onBack, guideButton, primaryAction, secondaryAction, className, ...rest }: PageTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export { PageTitle };
|
|
22
|
+
export type { PageTitleProps, PageTitleVariant, PageTitleBreadcrumbItem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronLeft, ChevronRight } from '@ncds/ui-admin-icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Fragment } from 'react';
|
|
5
|
+
import { Button } from '../../action/button/Button';
|
|
6
|
+
const renderBreadcrumb = (items) => (_jsx("nav", { className: "ncua-page-title__breadcrumb", "aria-label": "breadcrumb", children: items.map((item, i) => (
|
|
7
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breadcrumb items may have duplicate labels
|
|
8
|
+
_jsx(Fragment, { children: i < items.length - 1 ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "ncua-page-title__breadcrumb-item", children: item.href ? _jsx("a", { href: item.href, children: item.label }) : item.label }), _jsx(ChevronRight, { className: "ncua-page-title__breadcrumb-separator" })] })) : (_jsx("span", { className: "ncua-page-title__breadcrumb-current", children: item.label })) }, i))) }));
|
|
9
|
+
const renderBackButton = (onBack) => (_jsx(Button, { label: "", hierarchy: "secondary-gray", size: "xs", onlyIcon: true, leadingIcon: { type: 'icon', icon: ChevronLeft }, onClick: onBack, "aria-label": "\uC774\uC804 \uD398\uC774\uC9C0\uB85C \uB3CC\uC544\uAC00\uAE30", className: "ncua-page-title__back-btn" }));
|
|
10
|
+
const PageTitle = ({ title, variant = 'default', breadcrumbItems, onBack, guideButton, primaryAction, secondaryAction, className, ...rest }) => {
|
|
11
|
+
const isFixed = variant === 'fixed' || variant === 'fixed-detail';
|
|
12
|
+
const isDetail = variant === 'detail' || variant === 'fixed-detail';
|
|
13
|
+
const hasBreadcrumb = !isFixed && breadcrumbItems && breadcrumbItems.length > 0;
|
|
14
|
+
return (_jsx("header", { className: classNames('ncua-page-title', { 'ncua-page-title--fixed': isFixed }, className), ...rest, children: _jsx("div", { className: "ncua-page-title__page-header", children: _jsxs("div", { className: classNames('ncua-page-title__header', {
|
|
15
|
+
'ncua-page-title__header--has-breadcrumb': hasBreadcrumb,
|
|
16
|
+
}), children: [_jsxs("div", { className: "ncua-page-title__container", children: [hasBreadcrumb && renderBreadcrumb(breadcrumbItems), _jsxs("div", { className: "ncua-page-title__title-row", children: [isDetail && onBack && renderBackButton(onBack), _jsx("h1", { className: "ncua-page-title__title", children: title }), guideButton && _jsx("div", { className: "ncua-page-title__guide-btn", children: guideButton })] })] }), (secondaryAction || primaryAction) && (_jsxs("div", { className: "ncua-page-title__actions", children: [secondaryAction, primaryAction] }))] }) }) }));
|
|
17
|
+
};
|
|
18
|
+
PageTitle.displayName = 'PageTitle';
|
|
19
|
+
export { PageTitle };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageTitle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageTitle';
|
|
@@ -31,7 +31,10 @@ export * from './forms-and-input/textarea';
|
|
|
31
31
|
export * from './forms-and-input/toggle';
|
|
32
32
|
export * from './image-and-icons/dot';
|
|
33
33
|
export * from './image-and-icons/featured-icon';
|
|
34
|
+
export * from './layout/block-container';
|
|
35
|
+
export * from './layout/block-header';
|
|
34
36
|
export * from './layout/divider';
|
|
37
|
+
export * from './layout/page-title';
|
|
35
38
|
export * from './navigation/bread-crumb';
|
|
36
39
|
export * from './navigation/horizontal-tab';
|
|
37
40
|
export * from './navigation/pagination';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
interface BlockContainerProps extends ComponentPropsWithoutRef<'section'> {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
interface BlockContainerBodyProps extends ComponentPropsWithoutRef<'div'> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const BlockContainer: {
|
|
11
|
+
({ children, className, ...rest }: BlockContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
} & {
|
|
14
|
+
Body: {
|
|
15
|
+
({ children, className, ...rest }: BlockContainerBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export type { BlockContainerProps, BlockContainerBodyProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BlockContainer';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
interface BlockHeaderProps extends Omit<ComponentPropsWithoutRef<'header'>, 'title' | 'children'> {
|
|
3
|
+
title: ReactNode;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
action?: ReactNode;
|
|
6
|
+
showDivider?: boolean;
|
|
7
|
+
badge?: ReactNode;
|
|
8
|
+
description?: string;
|
|
9
|
+
collapsible?: {
|
|
10
|
+
expanded: boolean;
|
|
11
|
+
onToggle: () => void;
|
|
12
|
+
};
|
|
13
|
+
showRequiredNotice?: boolean;
|
|
14
|
+
controlStrip?: ReactNode;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const BlockHeader: {
|
|
19
|
+
({ title, tooltip, action, showDivider, badge, description, collapsible, showRequiredNotice, controlStrip, children, className, ...rest }: BlockHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export { BlockHeader };
|
|
23
|
+
export type { BlockHeaderProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import type { Size } from '../../../../constant/size';
|
|
3
|
+
type SubTitleSize = 'middle' | Extract<Size, 'sm' | 'xs'>;
|
|
4
|
+
interface SubTitleProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
size?: SubTitleSize;
|
|
7
|
+
tooltip?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const SubTitle: {
|
|
15
|
+
({ title, size, tooltip, description, error, action, required, className, ...rest }: SubTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
export { SubTitle };
|
|
19
|
+
export type { SubTitleProps, SubTitleSize };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
type PageTitleVariant = 'default' | 'detail' | 'fixed' | 'fixed-detail';
|
|
3
|
+
interface PageTitleBreadcrumbItem {
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
}
|
|
7
|
+
interface PageTitleProps extends ComponentPropsWithoutRef<'header'> {
|
|
8
|
+
title: string;
|
|
9
|
+
variant?: PageTitleVariant;
|
|
10
|
+
breadcrumbItems?: PageTitleBreadcrumbItem[];
|
|
11
|
+
onBack?: () => void;
|
|
12
|
+
guideButton?: ReactNode;
|
|
13
|
+
primaryAction?: ReactNode;
|
|
14
|
+
secondaryAction?: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const PageTitle: {
|
|
18
|
+
({ title, variant, breadcrumbItems, onBack, guideButton, primaryAction, secondaryAction, className, ...rest }: PageTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export { PageTitle };
|
|
22
|
+
export type { PageTitleProps, PageTitleVariant, PageTitleBreadcrumbItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageTitle';
|