@baishuyun/ui-base 2.2.0 → 2.2.2

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.
Files changed (95) hide show
  1. package/dist/Card/{Card-CXULQNHa.js → Card-DHOMkrEE.js} +2 -2
  2. package/dist/Card/index.js +1 -1
  3. package/dist/CheckBox/{CheckBox-Bu40TO29.js → CheckBox-VlP6u_-s.js} +2 -2
  4. package/dist/CheckBox/index.js +19 -17
  5. package/dist/ColorPicker/ColorPicker-049kyJn6.js +205 -0
  6. package/dist/ColorPicker/index.js +1 -1
  7. package/dist/DropDown/DropDown-BkTY-3y0.js +166 -0
  8. package/dist/DropDown/index.js +4 -0
  9. package/dist/Editor/ToolbarPlugin/Buttons/index.js +4 -0
  10. package/dist/Editor/constants/index.js +20 -0
  11. package/dist/Editor/index-C0MY9j94.js +832 -0
  12. package/dist/Editor/index.js +581 -0
  13. package/dist/Icon/Icon-CkHAU1fA.js +24 -0
  14. package/dist/Icon/index.js +1 -1
  15. package/dist/InputTag/InputTag-S9hHXsyQ.js +137 -0
  16. package/dist/InputTag/index.js +2 -135
  17. package/dist/Loading/Loading-CEB4PLUE.js +9 -0
  18. package/dist/Loading/index.js +4 -0
  19. package/dist/Modal/{Modal-BZTEGGa0.js → Modal-oRJ-Almn.js} +1 -1
  20. package/dist/Modal/index.js +1 -1
  21. package/dist/Radio/index.js +1 -1
  22. package/dist/Select/Select-7KGHOKs6.js +820 -0
  23. package/dist/Select/SelectInputSearch-DigfTvpo.js +34 -0
  24. package/dist/Select/index.js +1 -1
  25. package/dist/Tabs/TabSelect-bKB0Qe9F.js +445 -0
  26. package/dist/Tabs/index.js +7 -0
  27. package/dist/Tree/index.js +1 -1
  28. package/dist/Tree/utils/index.js +1 -1
  29. package/dist/components/CheckBox/Group.d.ts +4 -0
  30. package/dist/components/DropDown/DropDown.d.ts +3 -0
  31. package/dist/components/DropDown/MenuItem/MenuItem.d.ts +8 -0
  32. package/dist/components/DropDown/MenuList/MenuList.d.ts +9 -0
  33. package/dist/components/DropDown/index.d.ts +1 -0
  34. package/dist/components/Editor/Editor.d.ts +4 -0
  35. package/dist/components/Editor/EditorCore.d.ts +4 -0
  36. package/dist/components/Editor/ToolbarPlugin/BaseButton/BaseButton.d.ts +29 -0
  37. package/dist/components/Editor/ToolbarPlugin/Buttons/AlignButton.d.ts +2 -0
  38. package/dist/components/Editor/ToolbarPlugin/Buttons/BoldButton.d.ts +2 -0
  39. package/dist/components/Editor/ToolbarPlugin/Buttons/FillButton.d.ts +2 -0
  40. package/dist/components/Editor/ToolbarPlugin/Buttons/FontColorButton.d.ts +2 -0
  41. package/dist/components/Editor/ToolbarPlugin/Buttons/FontSizeButton.d.ts +2 -0
  42. package/dist/components/Editor/ToolbarPlugin/Buttons/ItalicButton.d.ts +2 -0
  43. package/dist/components/Editor/ToolbarPlugin/Buttons/LinkButton.d.ts +2 -0
  44. package/dist/components/Editor/ToolbarPlugin/Buttons/PictureButton/LinkInput.d.ts +5 -0
  45. package/dist/components/Editor/ToolbarPlugin/Buttons/PictureButton/PictureButton.d.ts +2 -0
  46. package/dist/components/Editor/ToolbarPlugin/Buttons/PictureButton/UploadImage.d.ts +8 -0
  47. package/dist/components/Editor/ToolbarPlugin/Buttons/UnLinkButton.d.ts +2 -0
  48. package/dist/components/Editor/ToolbarPlugin/Buttons/UnderLineButton.d.ts +2 -0
  49. package/dist/components/Editor/ToolbarPlugin/Buttons/index.d.ts +14 -0
  50. package/dist/components/Editor/ToolbarPlugin/ToolbarPlugin.d.ts +3 -0
  51. package/dist/components/Editor/ToolbarPlugin/context/TextFormatProvider.d.ts +3 -0
  52. package/dist/components/Editor/ToolbarPlugin/context/TextFormatsContext.d.ts +17 -0
  53. package/dist/components/Editor/ToolbarPlugin/context/useTextFormatsContext.d.ts +1 -0
  54. package/dist/components/Editor/ToolbarPlugin/interface.d.ts +32 -0
  55. package/dist/components/Editor/commands/ImageCommands.d.ts +8 -0
  56. package/dist/components/Editor/constants/index.d.ts +41 -0
  57. package/dist/components/Editor/hooks/useTextFormatsState.d.ts +2 -0
  58. package/dist/components/Editor/index.d.ts +2 -0
  59. package/dist/components/Editor/interface.d.ts +62 -0
  60. package/dist/components/Editor/nodes/ExtendedTextNode.d.ts +11 -0
  61. package/dist/components/Editor/nodes/ImageComponent.d.ts +11 -0
  62. package/dist/components/Editor/nodes/ImageNode.d.ts +50 -0
  63. package/dist/components/Editor/plugins/EnterKeyPlugin.d.ts +1 -0
  64. package/dist/components/Editor/plugins/ImagePlugin.d.ts +1 -0
  65. package/dist/components/Loading/Loading.d.ts +5 -0
  66. package/dist/components/Loading/index.d.ts +1 -0
  67. package/dist/components/Select/context/SelectContext.d.ts +12 -0
  68. package/dist/components/Tabs/Tab/Tab.d.ts +10 -0
  69. package/dist/components/Tabs/TabList/TabList.d.ts +4 -0
  70. package/dist/components/Tabs/TabList/useTabIndicator.d.ts +19 -0
  71. package/dist/components/Tabs/TabList/useTabScroll.d.ts +16 -0
  72. package/dist/components/Tabs/TabPanel/TabPanel.d.ts +9 -0
  73. package/dist/components/Tabs/TabSelect/TabSelect.d.ts +3 -0
  74. package/dist/components/Tabs/TabSelect/interface.d.ts +26 -0
  75. package/dist/components/Tabs/Tabs.d.ts +3 -0
  76. package/dist/components/Tabs/constants.d.ts +9 -0
  77. package/dist/components/Tabs/context/TabContext.d.ts +7 -0
  78. package/dist/components/Tabs/index.d.ts +4 -0
  79. package/dist/components/Tabs/interface.d.ts +61 -0
  80. package/dist/components/index.d.ts +6 -0
  81. package/dist/index.js +41 -30
  82. package/dist/style.css +1 -1
  83. package/dist/vendors/{Tree-CCY2gtpG.js → Tree-C-8x1jXV.js} +4 -4
  84. package/dist/vendors/color-VzwvCPhF.js +21 -0
  85. package/dist/vendors/index-MTmG1Ezy.js +15 -0
  86. package/dist/vendors/lexical-DdSmj_Kv.js +5891 -0
  87. package/dist/vendors/{lodash-es-CZfJRWhO.js → lodash-es-DFpaJB4Y.js} +2 -2
  88. package/dist/vendors/{simplebar-react-Bf9Zq-21.js → simplebar-react-D68KzE44.js} +1 -1
  89. package/dist/vendors/useFloatingPortal-9VUFOAOG.js +45 -0
  90. package/dist/vendors/{index-ByQkttKA.js → useLocale-DgqW9M3h.js} +35 -47
  91. package/package.json +1 -1
  92. package/dist/ColorPicker/ColorPicker-CwFsihkL.js +0 -207
  93. package/dist/Icon/Icon-BlkVlKDd.js +0 -24
  94. package/dist/Select/Select-C3abXG27.js +0 -855
  95. package/dist/vendors/lexical-Bz4mqKs6.js +0 -3
@@ -0,0 +1,17 @@
1
+ export type TextFormatType = 'bold' | 'italic' | 'underline' | 'fontSize' | 'fontColor' | 'backgroundColor' | 'align';
2
+ export type TextFormatsState = {
3
+ bold: boolean;
4
+ italic: boolean;
5
+ underline: boolean;
6
+ fontSize: string;
7
+ fontColor: string;
8
+ backgroundColor: string;
9
+ align: 'left' | 'center' | 'right';
10
+ link?: {
11
+ link?: string;
12
+ linkText?: string;
13
+ newBlank?: boolean;
14
+ };
15
+ };
16
+ declare const TextFormatsContext: import('react').Context<TextFormatsState | null>;
17
+ export default TextFormatsContext;
@@ -0,0 +1 @@
1
+ export declare const useTextFormatsContext: () => import('./TextFormatsContext').TextFormatsState;
@@ -0,0 +1,32 @@
1
+ import { ButtonType } from './Buttons/index';
2
+
3
+
4
+ export interface ToolbarButtonProps {
5
+ /**
6
+ * @description 根据外部配置传入你想要渲染的 toolbar 按钮
7
+ * @description 如果数组为空,则会渲染默认的 toolbar 按钮
8
+ */
9
+ config?: Array<{
10
+ /**
11
+ * @description 分组的唯一标识
12
+ */
13
+ key: string;
14
+ /**
15
+ * @description 按钮组名称
16
+ */
17
+ buttons: Array<
18
+ | ButtonType
19
+ | {
20
+ name: ButtonType;
21
+ /**
22
+ * @description 各个 button 组件的 props
23
+ */
24
+ props?: Record<string, any>;
25
+ }
26
+ >;
27
+ }>;
28
+ /**
29
+ * @description 自定义样式
30
+ */
31
+ style?: React.CSSProperties;
32
+ }
@@ -0,0 +1,8 @@
1
+ import { LexicalCommand } from 'lexical';
2
+ export interface InsertImagePayload {
3
+ src: string;
4
+ altText?: string;
5
+ width?: number;
6
+ height?: number;
7
+ }
8
+ export declare const INSERT_INLINE_IMAGE_COMMAND: LexicalCommand<InsertImagePayload>;
@@ -0,0 +1,41 @@
1
+ export declare const FONT_SIZES: readonly [{
2
+ readonly label: "12";
3
+ readonly value: "12px";
4
+ }, {
5
+ readonly label: "14";
6
+ readonly value: "14px";
7
+ }, {
8
+ readonly label: "16";
9
+ readonly value: "16px";
10
+ }, {
11
+ readonly label: "18";
12
+ readonly value: "18px";
13
+ }, {
14
+ readonly label: "20";
15
+ readonly value: "20px";
16
+ }, {
17
+ readonly label: "22";
18
+ readonly value: "22px";
19
+ }, {
20
+ readonly label: "24";
21
+ readonly value: "24px";
22
+ }, {
23
+ readonly label: "28";
24
+ readonly value: "28px";
25
+ }, {
26
+ readonly label: "32";
27
+ readonly value: "32px";
28
+ }, {
29
+ readonly label: "36";
30
+ readonly value: "36px";
31
+ }, {
32
+ readonly label: "64";
33
+ readonly value: "64px";
34
+ }, {
35
+ readonly label: "128";
36
+ readonly value: "128px";
37
+ }];
38
+ export declare const DEFAULT_FONT_SIZE = "16px";
39
+ export declare const DEFAULT_FONT_COLOR = "#000";
40
+ export declare const DEFAULT_BACKGROUND_COLOR = "transparent";
41
+ export type FontSize = (typeof FONT_SIZES)[number]['value'];
@@ -0,0 +1,2 @@
1
+ import { TextFormatsState } from '../ToolbarPlugin/context/TextFormatsContext';
2
+ export declare function useTextFormatsState(): TextFormatsState;
@@ -0,0 +1,2 @@
1
+ export { Editor as default } from './Editor';
2
+ export type { EditorProps } from './interface';
@@ -0,0 +1,62 @@
1
+ import { EditorState } from 'lexical';
2
+ import { ToolbarButtonProps } from './ToolbarPlugin/interface.d';
3
+
4
+
5
+ export type EditorProps = {
6
+ /**
7
+ * 编辑器容器高度
8
+ */
9
+ height?: number;
10
+ /**
11
+ * 编辑器内容变化回调
12
+ */
13
+ onChange: (
14
+ { text, html }: { text: string; html: string | null },
15
+ editorState: EditorState
16
+ ) => void;
17
+
18
+ toolbar?: {
19
+ /**
20
+ * toolbar 配置
21
+ */
22
+ config?: ToolbarButtonProps['config'];
23
+
24
+ style?: React.CSSProperties;
25
+ };
26
+
27
+ /**
28
+ * 编辑器受控内容
29
+ */
30
+ value?: string | null;
31
+
32
+ /**
33
+ * @description 占位符文本
34
+ * @todo 待实现
35
+ */
36
+ placeholder?: string;
37
+
38
+ /**
39
+ * @description 是否自动聚焦,默认为 false
40
+ */
41
+ autoFocus?: boolean;
42
+ /**
43
+ * @description 是否禁用
44
+ * @todo 待实现
45
+ */
46
+ disabled?: boolean;
47
+ /**
48
+ * @description 错误处理回调
49
+ * @todo 待实现
50
+ */
51
+ onError?: (error: Error) => void;
52
+
53
+ /**
54
+ * @description 图片上传配置
55
+ * @todo 待实现
56
+ */
57
+ imageUpload?: {
58
+ maxSize?: number; // 最大文件大小
59
+ accept?: string[]; // 支持的文件类型
60
+ customUpload?: (file: File) => Promise<string>; // 自定义上传函数
61
+ };
62
+ };
@@ -0,0 +1,11 @@
1
+ import { DOMConversionMap, NodeKey, TextNode, SerializedTextNode, LexicalNode } from 'lexical';
2
+ export declare class ExtendedTextNode extends TextNode {
3
+ constructor(text: string, key?: NodeKey);
4
+ static getType(): string;
5
+ static clone(node: ExtendedTextNode): ExtendedTextNode;
6
+ static importDOM(): DOMConversionMap | null;
7
+ static importJSON(serializedNode: SerializedTextNode): TextNode;
8
+ isSimpleText(): boolean;
9
+ }
10
+ export declare function $createExtendedTextNode(text?: string): ExtendedTextNode;
11
+ export declare function $isExtendedTextNode(node: LexicalNode | null | undefined): node is ExtendedTextNode;
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import { NodeKey } from 'lexical';
3
+ interface ImageComponentProps {
4
+ src: string;
5
+ altText: string;
6
+ width?: number;
7
+ height?: number;
8
+ nodeKey: NodeKey;
9
+ }
10
+ declare const ImageComponent: React.FC<ImageComponentProps>;
11
+ export default ImageComponent;
@@ -0,0 +1,50 @@
1
+ import { DecoratorNode, NodeKey, LexicalNode, SerializedLexicalNode, Spread, DOMConversionOutput } from 'lexical';
2
+ import { ReactNode } from 'react';
3
+ export interface ImagePayload {
4
+ src: string;
5
+ altText?: string;
6
+ width?: number;
7
+ height?: number;
8
+ key?: NodeKey;
9
+ }
10
+ export type SerializedImageNode = Spread<{
11
+ src: string;
12
+ altText?: string;
13
+ width?: number;
14
+ height?: number;
15
+ }, SerializedLexicalNode>;
16
+ export declare class ImageNode extends DecoratorNode<ReactNode> {
17
+ __src: string;
18
+ __altText: string;
19
+ __width?: number;
20
+ __height?: number;
21
+ static getType(): string;
22
+ static clone(node: ImageNode): ImageNode;
23
+ constructor(src: string, altText?: string, width?: number, height?: number, key?: NodeKey);
24
+ createDOM(): HTMLElement;
25
+ updateDOM(): false;
26
+ exportDOM(): {
27
+ element: HTMLImageElement;
28
+ };
29
+ getSrc(): string;
30
+ getAltText(): string;
31
+ getWidth(): number | undefined;
32
+ getHeight(): number | undefined;
33
+ setSrc(src: string): void;
34
+ setAltText(altText: string): void;
35
+ setWidthAndHeight(width: number, height: number): void;
36
+ decorate(): ReactNode;
37
+ static importDOM(): {
38
+ img: () => {
39
+ conversion: typeof convertImageElement;
40
+ priority: 0;
41
+ };
42
+ };
43
+ static importJSON(serializedNode: SerializedImageNode): ImageNode;
44
+ exportJSON(): SerializedImageNode;
45
+ isInline(): boolean;
46
+ }
47
+ export declare function $createImageNode({ src, altText, width, height, key }: ImagePayload): ImageNode;
48
+ export declare function $isImageNode(node: LexicalNode | null | undefined): node is ImageNode;
49
+ declare function convertImageElement(domNode: Node): null | DOMConversionOutput;
50
+ export {};
@@ -0,0 +1 @@
1
+ export default function EnterKeyPlugin(): null;
@@ -0,0 +1 @@
1
+ export default function ImagePlugin(): null;
@@ -0,0 +1,5 @@
1
+ interface LoadingProps {
2
+ tip?: string;
3
+ }
4
+ declare const Loading: ({ tip }: LoadingProps) => import("react/jsx-runtime").JSX.Element;
5
+ export { Loading };
@@ -0,0 +1 @@
1
+ export { Loading as default } from './Loading';
@@ -16,6 +16,18 @@ export interface SelectStateContextType {
16
16
  * 设置是否打开浮层面板
17
17
  */
18
18
  setIsOpen: (isOpen: boolean) => void;
19
+ /**
20
+ * 根据 value 获取已选缓存的 option(当当前 options 不包含该项时用于回显兜底)
21
+ */
22
+ getCachedOptionByValue?: (value: string | number) => DefaultOptionType | undefined;
23
+ /**
24
+ * 下拉面板内的搜索值(上移至顶层以便在面板隐藏后仍保留)
25
+ */
26
+ searchValue?: string;
27
+ /**
28
+ * 设置搜索值
29
+ */
30
+ setSearchValue?: (value: string) => void;
19
31
  }
20
32
  declare const SelectStateContext: import('react').Context<SelectStateContextType>;
21
33
  export interface SelectConfigContextType {
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ import { TabsProps } from '../interface';
3
+ interface TabProps extends Pick<TabsProps, 'color' | 'type'> {
4
+ label: React.ReactNode;
5
+ active?: boolean;
6
+ onClick?: (key: string) => void;
7
+ tabKey: string;
8
+ }
9
+ declare const Tab: React.FC<TabProps>;
10
+ export default Tab;
@@ -0,0 +1,4 @@
1
+ import { default as React, PropsWithChildren } from 'react';
2
+ import { TabsProps } from '../interface';
3
+ declare const TabList: React.FC<PropsWithChildren & Pick<TabsProps, 'activeKey' | 'className' | 'style' | 'items'>>;
4
+ export default TabList;
@@ -0,0 +1,19 @@
1
+ import { TabsProps } from '../interface';
2
+ interface IndicatorStyle {
3
+ width: number;
4
+ left: number;
5
+ ready: boolean;
6
+ }
7
+ interface UseTabIndicatorProps {
8
+ activeKey?: string;
9
+ showIndicator: boolean;
10
+ type: string;
11
+ wrapperRef: React.RefObject<HTMLDivElement>;
12
+ items?: TabsProps['items'];
13
+ }
14
+ interface UseTabIndicatorReturn {
15
+ indicatorStyle: IndicatorStyle;
16
+ handleTabClick: (tabElement: HTMLElement) => void;
17
+ }
18
+ export declare const useTabIndicator: ({ activeKey, type, showIndicator, wrapperRef, items, }: UseTabIndicatorProps) => UseTabIndicatorReturn;
19
+ export {};
@@ -0,0 +1,16 @@
1
+ interface UseTabScrollProps {
2
+ disabled?: boolean;
3
+ children: React.ReactNode;
4
+ }
5
+ interface UseTabScrollReturn {
6
+ listRef: React.RefObject<HTMLDivElement>;
7
+ wrapperRef: React.RefObject<HTMLDivElement>;
8
+ showControls: boolean;
9
+ canScrollLeft: boolean;
10
+ canScrollRight: boolean;
11
+ translateX: number;
12
+ scrollLeft: () => void;
13
+ scrollRight: () => void;
14
+ }
15
+ export declare const useTabScroll: ({ disabled, children }: UseTabScrollProps) => UseTabScrollReturn;
16
+ export {};
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { TabsProps } from '../interface';
3
+ interface TabPanelProps {
4
+ items: NonNullable<TabsProps['items']>;
5
+ activeKey?: string;
6
+ className?: string;
7
+ }
8
+ declare const TabPanel: React.FC<TabPanelProps>;
9
+ export default TabPanel;
@@ -0,0 +1,3 @@
1
+ import { TabSelectProps } from './interface';
2
+ declare const TabSelect: React.FC<TabSelectProps>;
3
+ export default TabSelect;
@@ -0,0 +1,26 @@
1
+ import { TabType } from '../constants';
2
+
3
+
4
+ type TabSelectProps = {
5
+ /**
6
+ * @description 下拉选中的 tab 类型
7
+ */
8
+ value?: TabType;
9
+
10
+ /**
11
+ * @description 切换 tab 类型的回调
12
+ */
13
+ onChange?: (value: TabType) => void;
14
+
15
+ /**
16
+ * @description 初始化选中 tab 类型,如果没有设置 value,则默认选中第一个
17
+ */
18
+ defaultValue?: TabType;
19
+
20
+ /**
21
+ * @description 主题色
22
+ */
23
+ color?: string;
24
+ };
25
+
26
+ export type { TabSelectProps };
@@ -0,0 +1,3 @@
1
+ import { TabsProps } from './interface';
2
+ declare const Tabs: React.FC<TabsProps>;
3
+ export default Tabs;
@@ -0,0 +1,9 @@
1
+ declare const TABS_TYPE: {
2
+ readonly LINE: "line";
3
+ readonly CARD: "card";
4
+ readonly FILLED_CARD: "filled-card";
5
+ readonly BADGE_CARD: "badge-card";
6
+ };
7
+ type TabType = (typeof TABS_TYPE)[keyof typeof TABS_TYPE];
8
+ export type { TabType };
9
+ export { TABS_TYPE };
@@ -0,0 +1,7 @@
1
+ import { TabType } from '../constants';
2
+ declare const TabContext: import('react').Context<{
3
+ color?: string;
4
+ type?: TabType;
5
+ disabled?: boolean;
6
+ }>;
7
+ export default TabContext;
@@ -0,0 +1,4 @@
1
+ export { default } from './Tabs';
2
+ export { default as TabSelect } from './TabSelect/TabSelect';
3
+ export { default as TabPanel } from './TabPanel/TabPanel';
4
+ export { TABS_TYPE, type TabType } from './constants';
@@ -0,0 +1,61 @@
1
+ import { TabType } from './constants';
2
+
3
+
4
+ interface TabsProps {
5
+ items?: {
6
+ /**
7
+ * @description 页签的唯一标识
8
+ */
9
+ key: string;
10
+ /**
11
+ * @description 页签的标签
12
+ */
13
+ label: React.ReactNode;
14
+ /**
15
+ * @description 页签的内容
16
+ */
17
+ children?: React.ReactNode;
18
+ }[];
19
+
20
+ /**
21
+ * @description 当前激活的页签的唯一标识
22
+ */
23
+ activeKey?: string;
24
+
25
+ /**
26
+ * @description 初始化选中面板的 key,如果没有设置 activeKey,则默认选中第一个
27
+ */
28
+ defaultActiveKey?: string;
29
+
30
+ /**
31
+ * @description 切换页签的回调
32
+ */
33
+ onChange?: (key: string) => void;
34
+
35
+ /**
36
+ * @description 主题色
37
+ */
38
+ color?: string;
39
+
40
+ /**
41
+ * @description 页签的基本样式,可选 line、card 、 filled-card、 badge-card 类型
42
+ */
43
+ type?: TabType;
44
+
45
+ /**
46
+ * 禁止卡片交互效果
47
+ */
48
+ disabled?: boolean;
49
+
50
+ /**
51
+ * @description 自定义样式类
52
+ */
53
+ className?: string;
54
+
55
+ /**
56
+ * @description 自定义样式
57
+ */
58
+ style?: React.CSSProperties;
59
+ }
60
+
61
+ export type { TabsProps };
@@ -8,3 +8,9 @@ export { Select } from './Select';
8
8
  export { Tree } from './Tree';
9
9
  export { default as Checkbox } from './CheckBox';
10
10
  export { default as Ratio } from './Radio';
11
+ export { default as Tabs } from './Tabs';
12
+ export { default as DropDown } from './DropDown';
13
+ export { default as Loading } from './Loading';
14
+ export { NotFoundContent } from './NotFoundContent';
15
+ export { default as TabSelect } from './Tabs/TabSelect/TabSelect';
16
+ export { default as InputTag } from './InputTag';
package/dist/index.js CHANGED
@@ -1,71 +1,82 @@
1
- import { I as W } from "./Icon/Icon-BlkVlKDd.js";
1
+ import { I as W } from "./Icon/Icon-CkHAU1fA.js";
2
2
  import { jsx as p } from "react/jsx-runtime";
3
3
  import { useMemo as a, useCallback as u } from "react";
4
- import { z as s, L as f } from "./vendors/index-ByQkttKA.js";
5
- import { C as Y } from "./Card/Card-CXULQNHa.js";
6
- import { M as _ } from "./Modal/Modal-BZTEGGa0.js";
7
- import { C as te } from "./ColorPicker/ColorPicker-CwFsihkL.js";
4
+ import { z as i, L as f } from "./vendors/useLocale-DgqW9M3h.js";
5
+ import { C as Y } from "./Card/Card-DHOMkrEE.js";
6
+ import { M as _ } from "./Modal/Modal-oRJ-Almn.js";
7
+ import { C as oe } from "./ColorPicker/ColorPicker-049kyJn6.js";
8
8
  import { S as ae } from "./Segmented/Segmented-UgzW78Ey.js";
9
- import { S as re } from "./Select/Select-C3abXG27.js";
10
- import { T as ie } from "./vendors/Tree-CCY2gtpG.js";
9
+ import { S as re } from "./Select/Select-7KGHOKs6.js";
10
+ import { T as se } from "./vendors/Tree-C-8x1jXV.js";
11
11
  import { default as ce } from "./CheckBox/index.js";
12
12
  import { default as de } from "./Radio/index.js";
13
- const C = "Please select", U = "search", I = "No search data", S = "Select All", k = "Please enter the content", L = "No Data", h = "No Data Found", x = "Data Searching...", A = "Select All by Search", P = "Left Align", y = "Center Align", N = "Right Align", R = "Underline", F = "Link", v = "Hyper Link", z = "Show Content", b = "Link Address", w = "Open in New Tab", D = "Confirm", M = "Cancel", T = "Cancel Link", E = "preset color", O = { linkTip: "Support https://link or @form alias", bold: "Bold", italic: "Italic", fontSize: "Font Size", fontColor: "Font Color", fill: "fill", alignment: "Alignment", centerAlign: "Center Align", rightAlign: "Right Align", uploadImage: "Upload Image", imageUrl: "Image URL", imageUrlPlaceholder: "Please enter image URL", imageUrlRequired: "Please enter image URL", imageUrlInvalid: "Please enter a valid image URL", imageUrlNote: "Note: Enter image URL to insert image", inputImageUrl: "Enter Image URL", uploadImageNote: "Note: Single image size cannot exceed 1MB", uploadImageText: "Click or drag to upload image", previewImage: "Preview Image", underline: "Underline", imageFormatOnly: "Only image formats are supported", uploadImageFirst: "Please upload image first", imageAddSuccess: "Image added successfully", operationFailed: "Operation failed", onlyImageFormatsSupported: "Only image formats are supported", pleaseUploadImageFirst: "Please upload image first", imageSizeNote: "Image size cannot exceed 1MB", clickOrDragToUpload: "Click or drag to upload image", enterImageUrl: "Enter image URL", pleaseEnterImageUrl: "Please enter image URL", pleaseEnterValidImageUrl: "Please enter a valid image URL", linkAddressEmpty: "Link address cannot be empty" }, B = "Picture", V = "Custom Color", j = "Add Picture", q = {
13
+ import { a as pe, T as ue } from "./Tabs/TabSelect-bKB0Qe9F.js";
14
+ import { D as Ce } from "./DropDown/DropDown-BkTY-3y0.js";
15
+ import { L as Ie } from "./Loading/Loading-CEB4PLUE.js";
16
+ import { N as Le } from "./NotFoundContent/NotFoundContent-h0-oIXlk.js";
17
+ import { I as ke } from "./InputTag/InputTag-S9hHXsyQ.js";
18
+ const C = "Please select", U = "search", I = "No search data", x = "Select All", L = "Please enter the content", S = "No Data", k = "No Data Found", h = "Data Searching...", A = "Select All by Search", P = "Left Align", y = "Center Align", N = "Right Align", R = "Underline", F = "Link", T = "Hyper Link", D = "Show Content", b = "Link Address", v = "Open in New Tab", z = "Confirm", w = "Cancel", M = "Cancel Link", E = "preset color", O = { linkTip: "Support https://link or @form alias", bold: "Bold", italic: "Italic", fontSize: "Font Size", fontColor: "Font Color", fill: "fill", alignment: "Alignment", centerAlign: "Center Align", rightAlign: "Right Align", uploadImage: "Upload Image", imageUrl: "Image URL", imageUrlPlaceholder: "Please enter image URL", imageUrlRequired: "Please enter image URL", imageUrlInvalid: "Please enter a valid image URL", imageUrlNote: "Note: Enter image URL to insert image", inputImageUrl: "Enter Image URL", uploadImageNote: "Note: Single image size cannot exceed 1MB", uploadImageText: "Click or drag to upload image", previewImage: "Preview Image", underline: "Underline", imageFormatOnly: "Only image formats are supported", uploadImageFirst: "Please upload image first", imageAddSuccess: "Image added successfully", operationFailed: "Operation failed", onlyImageFormatsSupported: "Only image formats are supported", pleaseUploadImageFirst: "Please upload image first", imageSizeNote: "Image size cannot exceed 1MB", clickOrDragToUpload: "Click or drag to upload image", enterImageUrl: "Enter image URL", pleaseEnterImageUrl: "Please enter image URL", pleaseEnterValidImageUrl: "Please enter a valid image URL", linkAddressEmpty: "Link address cannot be empty" }, B = "Picture", V = "Custom Color", j = "Add Picture", q = {
14
19
  select: C,
15
20
  search: U,
16
21
  noFindData: I,
17
- allSelect: S,
18
- context: k,
19
- noData: L,
20
- noDataFound: h,
21
- dataSearching: x,
22
+ allSelect: x,
23
+ context: L,
24
+ noData: S,
25
+ noDataFound: k,
26
+ dataSearching: h,
22
27
  allSelectedBySearch: A,
23
28
  leftAlign: P,
24
29
  centerAlign: y,
25
30
  rightAlign: N,
26
31
  underline: R,
27
32
  link: F,
28
- hyperLink: v,
29
- showContent: z,
33
+ hyperLink: T,
34
+ showContent: D,
30
35
  linkAddress: b,
31
- openInNewTab: w,
32
- confirm: D,
33
- cancel: M,
34
- cancelLink: T,
36
+ openInNewTab: v,
37
+ confirm: z,
38
+ cancel: w,
39
+ cancelLink: M,
35
40
  presetColors: E,
36
41
  editor: O,
37
42
  picture: B,
38
43
  customColor: V,
39
44
  addPicture: j
40
- }, J = ({ children: c, locale: t = "zh-CN", messages: n = {} }) => {
41
- const r = a(() => ({ "zh-CN": s, "en-US": q, ...n }), [n]), l = a(() => r[t] || s, [t, r]), i = u(
42
- (o) => {
43
- const d = o.split(".");
45
+ }, J = ({ children: c, locale: o = "zh-CN", messages: n = {} }) => {
46
+ const r = a(() => ({ "zh-CN": i, "en-US": q, ...n }), [n]), l = a(() => r[o] || i, [o, r]), s = u(
47
+ (t) => {
48
+ const d = t.split(".");
44
49
  let e = l;
45
50
  for (const g of d)
46
51
  if (e = e[g], !e)
47
- return console.warn(`[LocaleProvider] Cannot find translation for key: ${o}`), o;
48
- return typeof e == "string" ? e : o;
52
+ return console.warn(`[LocaleProvider] Cannot find translation for key: ${t}`), t;
53
+ return typeof e == "string" ? e : t;
49
54
  },
50
55
  [l]
51
56
  ), m = a(
52
57
  () => ({
53
- locale: t,
54
- t: i
58
+ locale: o,
59
+ t: s
55
60
  }),
56
- [t, i]
61
+ [o, s]
57
62
  );
58
63
  return /* @__PURE__ */ p(f.Provider, { value: m, children: c });
59
64
  };
60
65
  export {
61
66
  Y as Card,
62
67
  ce as Checkbox,
63
- te as ColorPicker,
68
+ oe as ColorPicker,
69
+ Ce as DropDown,
64
70
  W as Icon,
71
+ ke as InputTag,
72
+ Ie as Loading,
65
73
  J as LocaleProvider,
66
74
  _ as Modal,
75
+ Le as NotFoundContent,
67
76
  de as Ratio,
68
77
  ae as Segmented,
69
78
  re as Select,
70
- ie as Tree
79
+ pe as TabSelect,
80
+ ue as Tabs,
81
+ se as Tree
71
82
  };