bj-web-components 0.2.17 → 0.2.18
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 +205 -205
- package/dist/index.d.ts +26 -4
- package/dist/miniapp.d.ts +1 -1
- package/dist/mobile.d.ts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/shared.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/web/Table/BTable.js +1 -1
- package/dist/web/Table/BTable.mjs +446 -419
- package/dist/web.d.ts +1139 -2
- package/package.json +92 -92
- package/dist/miniapp/index.d.ts +0 -0
- package/dist/mobile/index.d.ts +0 -0
- package/dist/react/index.d.ts +0 -0
- package/dist/shared/index.d.ts +0 -0
- package/dist/web/BasicInput/BInput.d.ts +0 -3
- package/dist/web/BasicInput/index.d.ts +0 -2
- package/dist/web/BasicInput/types.d.ts +0 -32
- package/dist/web/BasicInput/utils.d.ts +0 -13
- package/dist/web/CategoryDropdown/CategoryDropdown.d.ts +0 -2
- package/dist/web/CategoryDropdown/index.d.ts +0 -2
- package/dist/web/CategoryDropdown/types.d.ts +0 -31
- package/dist/web/CheckBox/BCheckBox.d.ts +0 -3
- package/dist/web/CheckBox/Group.d.ts +0 -3
- package/dist/web/CheckBox/context.d.ts +0 -11
- package/dist/web/CheckBox/index.d.ts +0 -9
- package/dist/web/CheckBox/types.d.ts +0 -54
- package/dist/web/Dropdown/BDropdown.d.ts +0 -2
- package/dist/web/Dropdown/index.d.ts +0 -2
- package/dist/web/Dropdown/types.d.ts +0 -41
- package/dist/web/EmptyInputBox/EmptyInputBox.d.ts +0 -3
- package/dist/web/EmptyInputBox/index.d.ts +0 -2
- package/dist/web/EmptyInputBox/types.d.ts +0 -28
- package/dist/web/FileCard/FileCard.d.ts +0 -2
- package/dist/web/FileCard/index.d.ts +0 -2
- package/dist/web/FileCard/types.d.ts +0 -20
- package/dist/web/Icon/Icon.d.ts +0 -6
- package/dist/web/Icon/index.d.ts +0 -2
- package/dist/web/Icon/types.d.ts +0 -11
- package/dist/web/Input/Input.d.ts +0 -3
- package/dist/web/Input/index.d.ts +0 -2
- package/dist/web/Input/types.d.ts +0 -55
- package/dist/web/InputNumber/BInputNumber.d.ts +0 -3
- package/dist/web/InputNumber/StepHandler.d.ts +0 -10
- package/dist/web/InputNumber/hooks/useCursor.d.ts +0 -2
- package/dist/web/InputNumber/hooks/useFrame.d.ts +0 -2
- package/dist/web/InputNumber/index.d.ts +0 -2
- package/dist/web/InputNumber/types.d.ts +0 -60
- package/dist/web/InputNumber/utils/decimal.d.ts +0 -46
- package/dist/web/Modal/Modal.d.ts +0 -2
- package/dist/web/Modal/index.d.ts +0 -2
- package/dist/web/Modal/types.d.ts +0 -42
- package/dist/web/OverlayScrollbar/BOverlayScrollbar.d.ts +0 -2
- package/dist/web/OverlayScrollbar/index.d.ts +0 -2
- package/dist/web/OverlayScrollbar/types.d.ts +0 -18
- package/dist/web/Pagination/Pagination.d.ts +0 -3
- package/dist/web/Pagination/index.d.ts +0 -2
- package/dist/web/Pagination/types.d.ts +0 -44
- package/dist/web/ProductField/ProductField.d.ts +0 -2
- package/dist/web/ProductField/index.d.ts +0 -2
- package/dist/web/ProductField/types.d.ts +0 -48
- package/dist/web/SkuInputCard/SkuInputCard.d.ts +0 -2
- package/dist/web/SkuInputCard/index.d.ts +0 -2
- package/dist/web/SkuInputCard/types.d.ts +0 -63
- package/dist/web/Switch/Switch.d.ts +0 -6
- package/dist/web/Switch/index.d.ts +0 -2
- package/dist/web/Switch/types.d.ts +0 -29
- package/dist/web/Table/BTable.d.ts +0 -10
- package/dist/web/Table/Column.d.ts +0 -3
- package/dist/web/Table/ColumnGroup.d.ts +0 -3
- package/dist/web/Table/index.d.ts +0 -4
- package/dist/web/Table/types.d.ts +0 -299
- package/dist/web/Table/utils/columns.d.ts +0 -11
- package/dist/web/Table/utils/sortFilter.d.ts +0 -7
- package/dist/web/Tabs/BTabs.d.ts +0 -8
- package/dist/web/Tabs/TabPane.d.ts +0 -7
- package/dist/web/Tabs/index.d.ts +0 -3
- package/dist/web/Tabs/types.d.ts +0 -32
- package/dist/web/Tooltip/ConfirmTooltip.d.ts +0 -2
- package/dist/web/Tooltip/ContentTooltip.d.ts +0 -2
- package/dist/web/Tooltip/ProgressTooltip.d.ts +0 -2
- package/dist/web/Tooltip/TooltipWrapper.d.ts +0 -3
- package/dist/web/Tooltip/index.d.ts +0 -6
- package/dist/web/Tooltip/types.d.ts +0 -36
- package/dist/web/Tooltip/useAutoPlacement.d.ts +0 -7
- package/dist/web/index.d.ts +0 -18
package/package.json
CHANGED
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bj-web-components",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"ui",
|
|
8
|
-
"component",
|
|
9
|
-
"design-system",
|
|
10
|
-
"web",
|
|
11
|
-
"mobile",
|
|
12
|
-
"miniapp"
|
|
13
|
-
],
|
|
14
|
-
"author": "hkm-hfrl",
|
|
15
|
-
"license": "MIT",
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": ""
|
|
19
|
-
},
|
|
20
|
-
"private": false,
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
|
-
"module": "./dist/index.mjs",
|
|
23
|
-
"types": "./dist/index.d.ts",
|
|
24
|
-
"exports": {
|
|
25
|
-
".": {
|
|
26
|
-
"types": "./dist/index.d.ts",
|
|
27
|
-
"import": "./dist/index.mjs",
|
|
28
|
-
"require": "./dist/index.js"
|
|
29
|
-
},
|
|
30
|
-
"./react": {
|
|
31
|
-
"types": "./dist/react.d.ts",
|
|
32
|
-
"import": "./dist/react.mjs",
|
|
33
|
-
"require": "./dist/react.js"
|
|
34
|
-
},
|
|
35
|
-
"./web": {
|
|
36
|
-
"types": "./dist/web.d.ts",
|
|
37
|
-
"import": "./dist/web.mjs",
|
|
38
|
-
"require": "./dist/web.js"
|
|
39
|
-
},
|
|
40
|
-
"./mobile": {
|
|
41
|
-
"types": "./dist/mobile.d.ts",
|
|
42
|
-
"import": "./dist/mobile.mjs",
|
|
43
|
-
"require": "./dist/mobile.js"
|
|
44
|
-
},
|
|
45
|
-
"./miniapp": {
|
|
46
|
-
"types": "./dist/miniapp.d.ts",
|
|
47
|
-
"import": "./dist/miniapp.mjs",
|
|
48
|
-
"require": "./dist/miniapp.js"
|
|
49
|
-
},
|
|
50
|
-
"./shared": {
|
|
51
|
-
"types": "./dist/shared.d.ts",
|
|
52
|
-
"import": "./dist/shared.mjs",
|
|
53
|
-
"require": "./dist/shared.js"
|
|
54
|
-
},
|
|
55
|
-
"./style": "./dist/style.css"
|
|
56
|
-
},
|
|
57
|
-
"files": [
|
|
58
|
-
"dist"
|
|
59
|
-
],
|
|
60
|
-
"scripts": {
|
|
61
|
-
"dev": "vite",
|
|
62
|
-
"build": "vite build --mode lib --minify false",
|
|
63
|
-
"build:dev": "vite build --mode lib --watch --minify false",
|
|
64
|
-
"build:docs": "vite build",
|
|
65
|
-
"preview": "vite preview",
|
|
66
|
-
"lint": "eslint",
|
|
67
|
-
"build:lib": "vite build --mode lib",
|
|
68
|
-
"build:lib:watch": "vite build --mode lib --watch"
|
|
69
|
-
},
|
|
70
|
-
"peerDependencies": {
|
|
71
|
-
"react": ">=17.0.2",
|
|
72
|
-
"react-dom": ">=17.0.2"
|
|
73
|
-
},
|
|
74
|
-
"devDependencies": {
|
|
75
|
-
"@tailwindcss/postcss": "^4",
|
|
76
|
-
"@types/node": "^20",
|
|
77
|
-
"@types/react": "^19",
|
|
78
|
-
"@types/react-dom": "^19",
|
|
79
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
80
|
-
"antd": "^6.3.3",
|
|
81
|
-
"eslint": "^9",
|
|
82
|
-
"less": "^4.6.4",
|
|
83
|
-
"lucide-react": "^0.577.0",
|
|
84
|
-
"react": "19.2.3",
|
|
85
|
-
"react-dom": "19.2.3",
|
|
86
|
-
"react-router-dom": "^6.30.3",
|
|
87
|
-
"tailwindcss": "^4",
|
|
88
|
-
"typescript": "^5",
|
|
89
|
-
"vite": "^6.0.7",
|
|
90
|
-
"vite-plugin-dts": "^4.3.0"
|
|
91
|
-
}
|
|
92
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "bj-web-components",
|
|
3
|
+
"version": "0.2.18",
|
|
4
|
+
"description": "Enterprise UI component library for Web, Mobile, and Mini-app platforms",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"ui",
|
|
8
|
+
"component",
|
|
9
|
+
"design-system",
|
|
10
|
+
"web",
|
|
11
|
+
"mobile",
|
|
12
|
+
"miniapp"
|
|
13
|
+
],
|
|
14
|
+
"author": "hkm-hfrl",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": ""
|
|
19
|
+
},
|
|
20
|
+
"private": false,
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"module": "./dist/index.mjs",
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.mjs",
|
|
28
|
+
"require": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./react": {
|
|
31
|
+
"types": "./dist/react.d.ts",
|
|
32
|
+
"import": "./dist/react.mjs",
|
|
33
|
+
"require": "./dist/react.js"
|
|
34
|
+
},
|
|
35
|
+
"./web": {
|
|
36
|
+
"types": "./dist/web.d.ts",
|
|
37
|
+
"import": "./dist/web.mjs",
|
|
38
|
+
"require": "./dist/web.js"
|
|
39
|
+
},
|
|
40
|
+
"./mobile": {
|
|
41
|
+
"types": "./dist/mobile.d.ts",
|
|
42
|
+
"import": "./dist/mobile.mjs",
|
|
43
|
+
"require": "./dist/mobile.js"
|
|
44
|
+
},
|
|
45
|
+
"./miniapp": {
|
|
46
|
+
"types": "./dist/miniapp.d.ts",
|
|
47
|
+
"import": "./dist/miniapp.mjs",
|
|
48
|
+
"require": "./dist/miniapp.js"
|
|
49
|
+
},
|
|
50
|
+
"./shared": {
|
|
51
|
+
"types": "./dist/shared.d.ts",
|
|
52
|
+
"import": "./dist/shared.mjs",
|
|
53
|
+
"require": "./dist/shared.js"
|
|
54
|
+
},
|
|
55
|
+
"./style": "./dist/style.css"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist"
|
|
59
|
+
],
|
|
60
|
+
"scripts": {
|
|
61
|
+
"dev": "vite",
|
|
62
|
+
"build": "vite build --mode lib --minify false",
|
|
63
|
+
"build:dev": "vite build --mode lib --watch --minify false",
|
|
64
|
+
"build:docs": "vite build",
|
|
65
|
+
"preview": "vite preview",
|
|
66
|
+
"lint": "eslint",
|
|
67
|
+
"build:lib": "vite build --mode lib",
|
|
68
|
+
"build:lib:watch": "vite build --mode lib --watch"
|
|
69
|
+
},
|
|
70
|
+
"peerDependencies": {
|
|
71
|
+
"react": ">=17.0.2",
|
|
72
|
+
"react-dom": ">=17.0.2"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@tailwindcss/postcss": "^4",
|
|
76
|
+
"@types/node": "^20",
|
|
77
|
+
"@types/react": "^19",
|
|
78
|
+
"@types/react-dom": "^19",
|
|
79
|
+
"@vitejs/plugin-react": "^4.3.4",
|
|
80
|
+
"antd": "^6.3.3",
|
|
81
|
+
"eslint": "^9",
|
|
82
|
+
"less": "^4.6.4",
|
|
83
|
+
"lucide-react": "^0.577.0",
|
|
84
|
+
"react": "19.2.3",
|
|
85
|
+
"react-dom": "19.2.3",
|
|
86
|
+
"react-router-dom": "^6.30.3",
|
|
87
|
+
"tailwindcss": "^4",
|
|
88
|
+
"typescript": "^5",
|
|
89
|
+
"vite": "^6.0.7",
|
|
90
|
+
"vite-plugin-dts": "^4.3.0"
|
|
91
|
+
}
|
|
92
|
+
}
|
package/dist/miniapp/index.d.ts
DELETED
|
File without changes
|
package/dist/mobile/index.d.ts
DELETED
|
File without changes
|
package/dist/react/index.d.ts
DELETED
|
File without changes
|
package/dist/shared/index.d.ts
DELETED
|
File without changes
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, InputHTMLAttributes, KeyboardEventHandler, ReactNode } from 'react';
|
|
2
|
-
export type BInputSize = 'small' | 'middle' | 'large';
|
|
3
|
-
export type BInputStatus = 'error' | 'warning';
|
|
4
|
-
export interface BInputFocusOptions extends FocusOptions {
|
|
5
|
-
cursor?: 'start' | 'end' | 'all';
|
|
6
|
-
}
|
|
7
|
-
export interface BInputRef {
|
|
8
|
-
focus: (options?: BInputFocusOptions) => void;
|
|
9
|
-
blur: () => void;
|
|
10
|
-
setSelectionRange: HTMLInputElement['setSelectionRange'];
|
|
11
|
-
select: () => void;
|
|
12
|
-
input: HTMLInputElement | null;
|
|
13
|
-
nativeElement: HTMLElement | null;
|
|
14
|
-
}
|
|
15
|
-
export interface BInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix' | 'value'> {
|
|
16
|
-
value?: InputHTMLAttributes<HTMLInputElement>['value'] | bigint;
|
|
17
|
-
prefix?: ReactNode;
|
|
18
|
-
suffix?: ReactNode;
|
|
19
|
-
addonBefore?: ReactNode;
|
|
20
|
-
addonAfter?: ReactNode;
|
|
21
|
-
allowClear?: boolean | {
|
|
22
|
-
clearIcon?: ReactNode;
|
|
23
|
-
};
|
|
24
|
-
size?: BInputSize;
|
|
25
|
-
status?: BInputStatus;
|
|
26
|
-
bordered?: boolean;
|
|
27
|
-
htmlSize?: number;
|
|
28
|
-
onPressEnter?: KeyboardEventHandler<HTMLInputElement>;
|
|
29
|
-
onClear?: () => void;
|
|
30
|
-
className?: string;
|
|
31
|
-
style?: CSSProperties;
|
|
32
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent, CompositionEvent, MouseEvent } from 'react';
|
|
2
|
-
import { BInputFocusOptions } from './types';
|
|
3
|
-
export declare function hasAddon(props: {
|
|
4
|
-
addonBefore?: unknown;
|
|
5
|
-
addonAfter?: unknown;
|
|
6
|
-
}): boolean;
|
|
7
|
-
export declare function hasPrefixSuffix(props: {
|
|
8
|
-
prefix?: unknown;
|
|
9
|
-
suffix?: unknown;
|
|
10
|
-
allowClear?: unknown;
|
|
11
|
-
}): boolean;
|
|
12
|
-
export declare function resolveOnChange(target: HTMLInputElement, event: ChangeEvent<HTMLInputElement> | MouseEvent<HTMLElement> | CompositionEvent<HTMLInputElement>, onChange: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined, targetValue?: string): void;
|
|
13
|
-
export declare function triggerFocus(element?: HTMLInputElement | null, option?: BInputFocusOptions): void;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { BuCategoryDropdownProps } from './types';
|
|
2
|
-
export default function BuCategoryDropdown({ data, value, onChange, placeholder, disabled, maxVisible, className, style, getPopupContainer, dropdownStyle: customDropdownStyle, }: BuCategoryDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
export interface CategoryItem {
|
|
3
|
-
/** 唯一标识 */
|
|
4
|
-
value: string;
|
|
5
|
-
/** 显示文字 */
|
|
6
|
-
label: string;
|
|
7
|
-
/** 是否禁用(分类未创建好时不可选) */
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
/** 子分类 */
|
|
10
|
-
children?: CategoryItem[];
|
|
11
|
-
}
|
|
12
|
-
export interface BuCategoryDropdownProps {
|
|
13
|
-
/** 分类树数据 */
|
|
14
|
-
data: CategoryItem[];
|
|
15
|
-
/** 当前选中路径,数组索引对应层级 */
|
|
16
|
-
value?: string[];
|
|
17
|
-
/** 选中回调,返回新路径和对应的节点数组 */
|
|
18
|
-
onChange?: (value: string[], path: CategoryItem[]) => void;
|
|
19
|
-
/** 触发按钮占位文字 */
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
/** 是否禁用整个组件 */
|
|
22
|
-
disabled?: boolean;
|
|
23
|
-
/** 每列最多显示几项,超出后出现滚动条,默认 6 */
|
|
24
|
-
maxVisible?: number;
|
|
25
|
-
className?: string;
|
|
26
|
-
style?: CSSProperties;
|
|
27
|
-
/** 自定义下拉面板挂载容器,返回目标 DOM 元素。默认挂载到 document.body */
|
|
28
|
-
getPopupContainer?: () => HTMLElement;
|
|
29
|
-
/** 追加到下拉面板(.bu-category-dropdown__portal)内联样式上,与内部计算出的定位样式(position/top/left/zIndex)合并 */
|
|
30
|
-
dropdownStyle?: CSSProperties;
|
|
31
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CheckboxOptionType, CheckboxValueType, BCheckBoxVariant } from './types';
|
|
2
|
-
export interface CheckBoxGroupContextValue {
|
|
3
|
-
name?: string;
|
|
4
|
-
value: CheckboxValueType[];
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
variant?: BCheckBoxVariant;
|
|
7
|
-
registerValue: (value: CheckboxValueType) => void;
|
|
8
|
-
cancelValue: (value: CheckboxValueType) => void;
|
|
9
|
-
toggleOption: (option: CheckboxOptionType) => void;
|
|
10
|
-
}
|
|
11
|
-
export declare const CheckBoxGroupContext: import('react').Context<CheckBoxGroupContextValue | null>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { default as BCheckBox } from './BCheckBox';
|
|
2
|
-
import { default as Group } from './Group';
|
|
3
|
-
declare const CompoundBCheckBox: typeof BCheckBox & {
|
|
4
|
-
Group: typeof Group;
|
|
5
|
-
__ANT_CHECKBOX: boolean;
|
|
6
|
-
};
|
|
7
|
-
export { CompoundBCheckBox as BCheckBox };
|
|
8
|
-
export default CompoundBCheckBox;
|
|
9
|
-
export type { BCheckBoxGroupProps, BCheckBoxProps, BCheckBoxVariant, CheckboxChangeEvent, CheckboxChangeEventTarget, CheckboxOptionType, CheckboxValueType, } from './types';
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, FocusEventHandler, InputHTMLAttributes, KeyboardEventHandler, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
-
export type CheckboxValueType = string | number | boolean;
|
|
3
|
-
export type BCheckBoxVariant = 'dark' | 'white';
|
|
4
|
-
export interface BCheckBoxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'checked' | 'children' | 'defaultChecked' | 'onChange' | 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'style' | 'type' | 'value'> {
|
|
5
|
-
className?: string;
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
defaultChecked?: boolean;
|
|
8
|
-
checked?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
indeterminate?: boolean;
|
|
11
|
-
onChange?: (event: CheckboxChangeEvent) => void;
|
|
12
|
-
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
13
|
-
onMouseEnter?: MouseEventHandler<HTMLLabelElement>;
|
|
14
|
-
onMouseLeave?: MouseEventHandler<HTMLLabelElement>;
|
|
15
|
-
onFocus?: FocusEventHandler<HTMLInputElement>;
|
|
16
|
-
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
17
|
-
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
18
|
-
onKeyPress?: KeyboardEventHandler<HTMLInputElement>;
|
|
19
|
-
onKeyUp?: KeyboardEventHandler<HTMLInputElement>;
|
|
20
|
-
value?: CheckboxValueType;
|
|
21
|
-
children?: ReactNode;
|
|
22
|
-
skipGroup?: boolean;
|
|
23
|
-
direction?: 'ltr' | 'rtl';
|
|
24
|
-
variant?: BCheckBoxVariant;
|
|
25
|
-
}
|
|
26
|
-
export interface CheckboxChangeEventTarget extends BCheckBoxProps {
|
|
27
|
-
checked: boolean;
|
|
28
|
-
}
|
|
29
|
-
export interface CheckboxChangeEvent {
|
|
30
|
-
target: CheckboxChangeEventTarget;
|
|
31
|
-
stopPropagation: () => void;
|
|
32
|
-
preventDefault: () => void;
|
|
33
|
-
nativeEvent: Event;
|
|
34
|
-
}
|
|
35
|
-
export interface CheckboxOptionType {
|
|
36
|
-
label: ReactNode;
|
|
37
|
-
value: CheckboxValueType;
|
|
38
|
-
style?: CSSProperties;
|
|
39
|
-
disabled?: boolean;
|
|
40
|
-
onChange?: (event: CheckboxChangeEvent) => void;
|
|
41
|
-
}
|
|
42
|
-
export interface BCheckBoxGroupProps {
|
|
43
|
-
className?: string;
|
|
44
|
-
style?: CSSProperties;
|
|
45
|
-
name?: string;
|
|
46
|
-
options?: Array<CheckboxOptionType | string | number>;
|
|
47
|
-
disabled?: boolean;
|
|
48
|
-
defaultValue?: CheckboxValueType[];
|
|
49
|
-
value?: CheckboxValueType[];
|
|
50
|
-
onChange?: (checkedValues: CheckboxValueType[]) => void;
|
|
51
|
-
children?: ReactNode;
|
|
52
|
-
direction?: 'ltr' | 'rtl';
|
|
53
|
-
variant?: BCheckBoxVariant;
|
|
54
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { BDropdownProps } from './types';
|
|
2
|
-
export declare function BDropdown({ className, style, options, value, defaultValue, multiple, optionMode, searchable, searchValue, searchPlaceholder, onSearch, filterOption, emptyText, labels, t, optionRender, onChange, footer, showReset, showConfirm, resetText, confirmText, onReset, onConfirm, }: BDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
export type BDropdownValue = string | number | boolean;
|
|
3
|
-
export interface BDropdownOption {
|
|
4
|
-
label: ReactNode;
|
|
5
|
-
/** Secondary text displayed when optionMode is "double-line". */
|
|
6
|
-
description?: ReactNode;
|
|
7
|
-
value: BDropdownValue;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface BDropdownProps {
|
|
11
|
-
className?: string;
|
|
12
|
-
style?: CSSProperties;
|
|
13
|
-
options: BDropdownOption[];
|
|
14
|
-
value?: BDropdownValue[];
|
|
15
|
-
defaultValue?: BDropdownValue[];
|
|
16
|
-
multiple?: boolean;
|
|
17
|
-
/** Option layout. Double-line options display label and description. */
|
|
18
|
-
optionMode?: 'single-line' | 'double-line';
|
|
19
|
-
searchable?: boolean;
|
|
20
|
-
searchValue?: string;
|
|
21
|
-
searchPlaceholder?: string;
|
|
22
|
-
onSearch?: (value: string) => void;
|
|
23
|
-
filterOption?: boolean | ((input: string, option: BDropdownOption) => boolean);
|
|
24
|
-
/** Empty-state content. Takes precedence over labels.emptyText. */
|
|
25
|
-
emptyText?: ReactNode;
|
|
26
|
-
/** Override default labels for i18n support. */
|
|
27
|
-
labels?: {
|
|
28
|
-
emptyText?: ReactNode;
|
|
29
|
-
};
|
|
30
|
-
/** Internationalization function. Defaults to returning the original text. */
|
|
31
|
-
t?: (text: string) => string;
|
|
32
|
-
optionRender?: (option: BDropdownOption) => ReactNode;
|
|
33
|
-
onChange?: (value: BDropdownValue[], option: BDropdownOption) => void;
|
|
34
|
-
footer?: boolean | ReactNode;
|
|
35
|
-
showReset?: boolean;
|
|
36
|
-
showConfirm?: boolean;
|
|
37
|
-
resetText?: ReactNode;
|
|
38
|
-
confirmText?: ReactNode;
|
|
39
|
-
onReset?: () => void;
|
|
40
|
-
onConfirm?: (value: BDropdownValue[]) => void;
|
|
41
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
export type BuEmptyInputBoxMode = 'single' | 'bilingual';
|
|
3
|
-
export type BuEmptyInputBoxLang = 'zh' | 'en';
|
|
4
|
-
export interface BuEmptyInputBoxProps {
|
|
5
|
-
/** 单语 / 双语模式 */
|
|
6
|
-
mode?: BuEmptyInputBoxMode;
|
|
7
|
-
/** 双语模式下当前激活的语言 */
|
|
8
|
-
activeLang?: BuEmptyInputBoxLang;
|
|
9
|
-
onLangChange?: (lang: BuEmptyInputBoxLang) => void;
|
|
10
|
-
/** 受控值,与 antd Form 兼容 */
|
|
11
|
-
value?: string;
|
|
12
|
-
onChange?: (value: string) => void;
|
|
13
|
-
placeholder?: string;
|
|
14
|
-
maxLength?: number;
|
|
15
|
-
/** 错误状态 */
|
|
16
|
-
error?: boolean;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
/** 点击删除按钮回调(传入时显示删除按钮) */
|
|
19
|
-
onDelete?: () => void;
|
|
20
|
-
/** Override display labels for i18n support */
|
|
21
|
-
labels?: {
|
|
22
|
-
zh?: string;
|
|
23
|
-
en?: string;
|
|
24
|
-
};
|
|
25
|
-
id?: string;
|
|
26
|
-
className?: string;
|
|
27
|
-
style?: CSSProperties;
|
|
28
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
export type FileType = 'pdf' | 'image' | 'doc' | 'docx' | 'xls' | 'xlsx' | 'ppt' | 'pptx' | 'zip' | 'rar' | 'txt' | 'other';
|
|
3
|
-
export interface FileCardProps {
|
|
4
|
-
/** 文件名 */
|
|
5
|
-
fileName: string;
|
|
6
|
-
/** 文件类型 */
|
|
7
|
-
fileType: FileType;
|
|
8
|
-
/** 文件 URL(image 类型可展示缩略图) */
|
|
9
|
-
fileUrl?: string;
|
|
10
|
-
/** 自定义类名 */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** 自定义样式 */
|
|
13
|
-
style?: CSSProperties;
|
|
14
|
-
/** 删除回调 */
|
|
15
|
-
onDelete?: () => void;
|
|
16
|
-
/** 修改文件名提交回调 */
|
|
17
|
-
onRename?: (newName: string) => void | Promise<void>;
|
|
18
|
-
/** 预览点击回调 */
|
|
19
|
-
onPreview?: () => void;
|
|
20
|
-
}
|
package/dist/web/Icon/Icon.d.ts
DELETED
package/dist/web/Icon/index.d.ts
DELETED
package/dist/web/Icon/types.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, MouseEventHandler, SVGProps } from 'react';
|
|
2
|
-
export interface BuIconProps extends Omit<SVGProps<SVGSVGElement>, 'onClick' | 'style' | 'className'> {
|
|
3
|
-
/** iconfont symbol id(不含 # 前缀),对应 <symbol id="icon-xxx"> */
|
|
4
|
-
type: string;
|
|
5
|
-
/** 自定义样式 */
|
|
6
|
-
style?: CSSProperties;
|
|
7
|
-
/** 点击事件 */
|
|
8
|
-
onClick?: MouseEventHandler<SVGSVGElement>;
|
|
9
|
-
/** 自定义类名 */
|
|
10
|
-
className?: string;
|
|
11
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
export type BuInputMode = 'single' | 'bilingual';
|
|
3
|
-
export type BuInputLang = 'zh' | 'en';
|
|
4
|
-
export type BuInputType = 'input' | 'textarea' | 'number';
|
|
5
|
-
export interface BuInputProps {
|
|
6
|
-
/** 输入框类型:input(单行)| textarea(多行) */
|
|
7
|
-
type?: BuInputType;
|
|
8
|
-
/** 单语 / 双语模式 */
|
|
9
|
-
mode?: BuInputMode;
|
|
10
|
-
/** 双语模式下当前激活的语言 */
|
|
11
|
-
activeLang?: BuInputLang;
|
|
12
|
-
onLangChange?: (lang: BuInputLang) => void;
|
|
13
|
-
/** 受控值,与 antd Form 兼容 */
|
|
14
|
-
value?: string;
|
|
15
|
-
onChange?: (value: string) => void;
|
|
16
|
-
/** 标签文字 */
|
|
17
|
-
label?: string;
|
|
18
|
-
/** 是否必填(label 前显示红色 *) */
|
|
19
|
-
required?: boolean;
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
/** 最大字符数,配合 showCount 使用 */
|
|
22
|
-
maxLength?: number;
|
|
23
|
-
/** 是否显示字符计数,双语模式下始终显示 */
|
|
24
|
-
showCount?: boolean;
|
|
25
|
-
/** 错误状态:无值时 placeholder 变红;有值时显示 errorMessage */
|
|
26
|
-
error?: boolean;
|
|
27
|
-
/** 错误提示文字(有输入值 + error=true 时显示在输入框下方) */
|
|
28
|
-
errorMessage?: string;
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** 数字步进器最小值(type='number' 时生效) */
|
|
31
|
-
min?: number;
|
|
32
|
-
/** 数字步进器最大值(type='number' 时生效) */
|
|
33
|
-
max?: number;
|
|
34
|
-
/** 数字步进器步长(type='number' 时生效) */
|
|
35
|
-
step?: number;
|
|
36
|
-
/** 输入框左侧 icon,如拖拽把手 */
|
|
37
|
-
leftIcon?: ReactNode;
|
|
38
|
-
/** 输入框右侧 icon,如删除按钮 */
|
|
39
|
-
rightIcon?: ReactNode;
|
|
40
|
-
/** 自定义语言切换按钮,替换内置的中文/EN 按钮,双语模式下生效 */
|
|
41
|
-
langToggle?: ReactNode;
|
|
42
|
-
/** 正在翻译中状态,显示 loading 指示器 */
|
|
43
|
-
translating?: boolean;
|
|
44
|
-
/** 翻译完成状态,显示对勾 */
|
|
45
|
-
translated?: boolean;
|
|
46
|
-
onBlur?: () => void;
|
|
47
|
-
/** Override display labels for i18n support */
|
|
48
|
-
labels?: {
|
|
49
|
-
zh?: string;
|
|
50
|
-
en?: string;
|
|
51
|
-
};
|
|
52
|
-
id?: string;
|
|
53
|
-
className?: string;
|
|
54
|
-
style?: CSSProperties;
|
|
55
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface StepHandlerProps {
|
|
3
|
-
/** Custom node for the whole control. Defaults to the combined up/down icon. */
|
|
4
|
-
icon?: ReactNode;
|
|
5
|
-
upDisabled: boolean;
|
|
6
|
-
downDisabled: boolean;
|
|
7
|
-
onStep: (up: boolean) => void;
|
|
8
|
-
}
|
|
9
|
-
export default function StepHandler({ icon, upDisabled, downDisabled, onStep }: StepHandlerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|