@zixili/design-system 1.0.0
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/LICENSE +21 -0
- package/README.md +181 -0
- package/dist/bedi.cjs +52 -0
- package/dist/bedi.css +1 -0
- package/dist/bedi.js +3444 -0
- package/dist/components/CodeBlock/index.d.ts +8 -0
- package/dist/components/CodeEditor.d.ts +9 -0
- package/dist/components/ComponentDemo.d.ts +20 -0
- package/dist/components/Header.d.ts +2 -0
- package/dist/components/PropsTable/index.d.ts +13 -0
- package/dist/components/SearchModal/index.d.ts +13 -0
- package/dist/components/basic/Button.d.ts +13 -0
- package/dist/components/basic/ButtonDoc.d.ts +2 -0
- package/dist/components/basic/Icon.d.ts +12 -0
- package/dist/components/basic/Link.d.ts +15 -0
- package/dist/components/basic/index.d.ts +7 -0
- package/dist/components/display/Avatar.d.ts +14 -0
- package/dist/components/display/Badge.d.ts +15 -0
- package/dist/components/display/Card.d.ts +13 -0
- package/dist/components/display/Empty.d.ts +8 -0
- package/dist/components/display/Progress.d.ts +9 -0
- package/dist/components/display/Rate.d.ts +13 -0
- package/dist/components/display/Skeleton.d.ts +23 -0
- package/dist/components/display/Table.d.ts +29 -0
- package/dist/components/display/Tag.d.ts +10 -0
- package/dist/components/display/Tooltip.d.ts +14 -0
- package/dist/components/display/index.d.ts +20 -0
- package/dist/components/feedback/Alert.d.ts +12 -0
- package/dist/components/feedback/Modal.d.ts +17 -0
- package/dist/components/feedback/index.d.ts +4 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/input/Checkbox.d.ts +7 -0
- package/dist/components/input/DatePicker.d.ts +12 -0
- package/dist/components/input/Input.d.ts +11 -0
- package/dist/components/input/Radio.d.ts +6 -0
- package/dist/components/input/Select.d.ts +12 -0
- package/dist/components/input/Slider.d.ts +17 -0
- package/dist/components/input/Switch.d.ts +7 -0
- package/dist/components/input/Upload.d.ts +33 -0
- package/dist/components/input/index.d.ts +16 -0
- package/dist/components/layout/Divider.d.ts +13 -0
- package/dist/components/layout/Grid.d.ts +35 -0
- package/dist/components/layout/Layout.d.ts +38 -0
- package/dist/components/layout/Space.d.ts +13 -0
- package/dist/components/layout/index.d.ts +8 -0
- package/dist/components/navigation/Affix.d.ts +13 -0
- package/dist/components/navigation/Anchor.d.ts +25 -0
- package/dist/components/navigation/BackTop.d.ts +12 -0
- package/dist/components/navigation/Breadcrumb.d.ts +14 -0
- package/dist/components/navigation/Dropdown.d.ts +21 -0
- package/dist/components/navigation/Menu.d.ts +40 -0
- package/dist/components/navigation/Pagination.d.ts +13 -0
- package/dist/components/navigation/Steps.d.ts +17 -0
- package/dist/components/navigation/StickyTool.d.ts +21 -0
- package/dist/components/navigation/Tabs.d.ts +16 -0
- package/dist/components/navigation/index.d.ts +20 -0
- package/dist/context/LanguageContext.d.ts +14 -0
- package/dist/context/ThemeContext.d.ts +12 -0
- package/dist/data/componentList.d.ts +6 -0
- package/dist/i18n/translations.d.ts +856 -0
- package/dist/index.d.ts +3 -0
- package/package.json +63 -0
- package/src/index.css +1 -0
- package/src/tokens/base.css +58 -0
- package/src/tokens/dark.css +27 -0
- package/src/tokens/index.css +4 -0
- package/src/tokens/utilities.css +57 -0
- package/src/tokens/variables.css +145 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BackTopProps {
|
|
4
|
+
visibilityHeight?: number;
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
target?: () => Window | HTMLElement;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const BackTop: React.FC<BackTopProps>;
|
|
12
|
+
export default BackTop;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BreadcrumbItem {
|
|
4
|
+
key: string;
|
|
5
|
+
title: React.ReactNode;
|
|
6
|
+
href?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface BreadcrumbProps {
|
|
9
|
+
items: BreadcrumbItem[];
|
|
10
|
+
separator?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const Breadcrumb: React.FC<BreadcrumbProps>;
|
|
14
|
+
export default Breadcrumb;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DropdownItem {
|
|
4
|
+
key: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
divided?: boolean;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface DropdownProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
items: DropdownItem[];
|
|
15
|
+
placement?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right';
|
|
16
|
+
trigger?: 'click' | 'hover' | 'context';
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const Dropdown: React.FC<DropdownProps>;
|
|
21
|
+
export default Dropdown;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface MenuItemProps {
|
|
4
|
+
/** Use React `key` for list rendering; use `eventKey` for Menu selection logic */
|
|
5
|
+
eventKey?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
onClick?: (key: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface SubMenuProps {
|
|
14
|
+
eventKey?: string;
|
|
15
|
+
title: React.ReactNode;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
icon?: React.ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
isOpen?: boolean;
|
|
22
|
+
onClick?: (key: string) => void;
|
|
23
|
+
}
|
|
24
|
+
export interface MenuProps {
|
|
25
|
+
mode?: 'vertical' | 'horizontal' | 'inline';
|
|
26
|
+
theme?: 'light' | 'dark';
|
|
27
|
+
defaultSelectedKeys?: string[];
|
|
28
|
+
selectedKeys?: string[];
|
|
29
|
+
defaultOpenKeys?: string[];
|
|
30
|
+
openKeys?: string[];
|
|
31
|
+
className?: string;
|
|
32
|
+
style?: React.CSSProperties;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
onSelect?: (selectedKeys: string[]) => void;
|
|
35
|
+
onOpenChange?: (openKeys: string[]) => void;
|
|
36
|
+
}
|
|
37
|
+
export declare const MenuItem: React.FC<MenuItemProps>;
|
|
38
|
+
export declare const SubMenu: React.FC<SubMenuProps>;
|
|
39
|
+
export declare const Menu: React.FC<MenuProps>;
|
|
40
|
+
export default Menu;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
current: number;
|
|
4
|
+
total: number;
|
|
5
|
+
pageSize?: number;
|
|
6
|
+
showSizeChanger?: boolean;
|
|
7
|
+
showQuickJumper?: boolean;
|
|
8
|
+
showTotal?: boolean;
|
|
9
|
+
onChange?: (page: number, pageSize: number) => void;
|
|
10
|
+
onShowSizeChange?: (current: number, size: number) => void;
|
|
11
|
+
size?: 'small' | 'medium' | 'large';
|
|
12
|
+
}
|
|
13
|
+
export default function Pagination({ current, total, pageSize, showSizeChanger, showQuickJumper, showTotal, onChange, onShowSizeChange, size }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
interface Step {
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
7
|
+
}
|
|
8
|
+
export interface StepsProps {
|
|
9
|
+
current: number;
|
|
10
|
+
direction?: 'horizontal' | 'vertical';
|
|
11
|
+
size?: 'small' | 'default';
|
|
12
|
+
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
13
|
+
items: Step[];
|
|
14
|
+
onChange?: (current: number) => void;
|
|
15
|
+
}
|
|
16
|
+
export default function Steps({ current, direction, size, status, items, onChange }: StepsProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface StickyToolItemProps {
|
|
4
|
+
key: string;
|
|
5
|
+
icon: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export interface StickyToolProps {
|
|
12
|
+
position?: 'left' | 'right';
|
|
13
|
+
offset?: number;
|
|
14
|
+
direction?: 'vertical' | 'horizontal';
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
children: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const StickyToolItem: React.FC<StickyToolItemProps>;
|
|
20
|
+
export declare const StickyTool: React.FC<StickyToolProps>;
|
|
21
|
+
export default StickyTool;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
interface TabItem {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps {
|
|
10
|
+
items: TabItem[];
|
|
11
|
+
defaultActiveKey?: string;
|
|
12
|
+
onChange?: (key: string) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export default function Tabs({ items, defaultActiveKey, onChange, className }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as Affix } from './Affix';
|
|
2
|
+
export { default as Anchor, AnchorLink } from './Anchor';
|
|
3
|
+
export { default as BackTop } from './BackTop';
|
|
4
|
+
export { default as Breadcrumb } from './Breadcrumb';
|
|
5
|
+
export { default as Dropdown } from './Dropdown';
|
|
6
|
+
export { default as Menu, MenuItem, SubMenu } from './Menu';
|
|
7
|
+
export { default as Pagination } from './Pagination';
|
|
8
|
+
export { default as Steps } from './Steps';
|
|
9
|
+
export { default as StickyTool, StickyToolItem } from './StickyTool';
|
|
10
|
+
export { default as Tabs } from './Tabs';
|
|
11
|
+
export type { AffixProps } from './Affix';
|
|
12
|
+
export type { AnchorProps, AnchorLinkProps } from './Anchor';
|
|
13
|
+
export type { BackTopProps } from './BackTop';
|
|
14
|
+
export type { BreadcrumbProps } from './Breadcrumb';
|
|
15
|
+
export type { DropdownProps } from './Dropdown';
|
|
16
|
+
export type { MenuProps, MenuItemProps, SubMenuProps } from './Menu';
|
|
17
|
+
export type { PaginationProps } from './Pagination';
|
|
18
|
+
export type { StepsProps } from './Steps';
|
|
19
|
+
export type { StickyToolProps, StickyToolItemProps } from './StickyTool';
|
|
20
|
+
export type { TabsProps } from './Tabs';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type Language = 'zh' | 'en';
|
|
4
|
+
interface LanguageContextType {
|
|
5
|
+
language: Language;
|
|
6
|
+
toggleLanguage: () => void;
|
|
7
|
+
t: (key: string) => string;
|
|
8
|
+
}
|
|
9
|
+
export declare function LanguageProvider({ children, translations: customTranslations }: {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
translations?: Record<string, any>;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function useLanguage(): LanguageContextType;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
type Theme = 'light' | 'dark';
|
|
4
|
+
interface ThemeContextType {
|
|
5
|
+
theme: Theme;
|
|
6
|
+
toggleTheme: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function ThemeProvider({ children }: {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function useTheme(): ThemeContextType;
|
|
12
|
+
export {};
|