@aozi6666/bee-design 0.1.2 → 0.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 (101) hide show
  1. package/dist/App.d.ts +4 -0
  2. package/{build → dist}/components/AutoComplete/autoCompleteDropdown.d.ts +2 -2
  3. package/dist/components/AutoComplete/index.d.ts +4 -0
  4. package/{build → dist}/components/Button/button.d.ts +2 -2
  5. package/{build → dist}/components/Button/button.types.d.ts +1 -1
  6. package/dist/components/Button/index.d.ts +2 -0
  7. package/{build → dist}/components/Icon/icon.d.ts +2 -2
  8. package/dist/components/Icon/icon.types.d.ts +6 -0
  9. package/dist/components/Icon/index.d.ts +2 -0
  10. package/dist/components/Input/index.d.ts +4 -0
  11. package/dist/components/Input/input.d.ts +5 -0
  12. package/{build → dist}/components/Input/input.types.d.ts +4 -4
  13. package/{build → dist}/components/Menu/index.d.ts +4 -4
  14. package/{build → dist}/components/Menu/menu.d.ts +2 -2
  15. package/{build → dist}/components/Menu/menuContext.d.ts +1 -1
  16. package/{build → dist}/components/Menu/menuItem.d.ts +2 -2
  17. package/{build → dist}/components/Menu/subMenu.d.ts +1 -1
  18. package/dist/components/Progress/index.d.ts +2 -0
  19. package/dist/components/Progress/progress.d.ts +4 -0
  20. package/{build → dist}/components/Progress/progress.types.d.ts +2 -2
  21. package/dist/components/Transition/index.d.ts +3 -0
  22. package/dist/components/Transition/transition.d.ts +4 -0
  23. package/dist/components/Transition/transition.types.d.ts +9 -0
  24. package/{build → dist}/components/Upload/dragger.d.ts +1 -1
  25. package/dist/components/Upload/index.d.ts +2 -0
  26. package/{build → dist}/components/Upload/upload.d.ts +2 -2
  27. package/{build → dist}/components/Upload/upload.types.d.ts +1 -1
  28. package/{build → dist}/components/Upload/uploadList.d.ts +2 -2
  29. package/dist/index.cjs +16272 -0
  30. package/dist/index.cjs.map +1 -0
  31. package/{build → dist}/index.css +24 -24
  32. package/dist/index.d.ts +9 -0
  33. package/dist/index.esm.js +709 -0
  34. package/dist/index.esm.js.map +1 -0
  35. package/dist/index.umd.js +14381 -0
  36. package/dist/index.umd.js.map +1 -0
  37. package/dist/main.d.ts +1 -0
  38. package/dist/setupIcons.d.ts +1 -0
  39. package/dist/setupTests.d.ts +1 -0
  40. package/package.json +52 -82
  41. package/README.md +0 -182
  42. package/build/App.d.ts +0 -4
  43. package/build/App.js +0 -137
  44. package/build/components/AutoComplete/autoComplete.js +0 -150
  45. package/build/components/AutoComplete/autoComplete.types.js +0 -1
  46. package/build/components/AutoComplete/autoCompleteDropdown.js +0 -17
  47. package/build/components/AutoComplete/index.d.ts +0 -4
  48. package/build/components/AutoComplete/index.js +0 -3
  49. package/build/components/Button/button.js +0 -43
  50. package/build/components/Button/button.types.js +0 -19
  51. package/build/components/Button/index.d.ts +0 -2
  52. package/build/components/Button/index.js +0 -2
  53. package/build/components/Icon/icon.js +0 -24
  54. package/build/components/Icon/icon.types.d.ts +0 -6
  55. package/build/components/Icon/icon.types.js +0 -2
  56. package/build/components/Icon/index.d.ts +0 -2
  57. package/build/components/Icon/index.js +0 -2
  58. package/build/components/Input/index.d.ts +0 -4
  59. package/build/components/Input/index.js +0 -3
  60. package/build/components/Input/input.d.ts +0 -5
  61. package/build/components/Input/input.js +0 -32
  62. package/build/components/Input/input.types.js +0 -1
  63. package/build/components/Menu/index.js +0 -9
  64. package/build/components/Menu/menu.js +0 -48
  65. package/build/components/Menu/menuContext.js +0 -2
  66. package/build/components/Menu/menuItem.js +0 -20
  67. package/build/components/Menu/subMenu.js +0 -57
  68. package/build/components/Progress/index.d.ts +0 -2
  69. package/build/components/Progress/index.js +0 -2
  70. package/build/components/Progress/progress.d.ts +0 -4
  71. package/build/components/Progress/progress.js +0 -6
  72. package/build/components/Progress/progress.types.js +0 -2
  73. package/build/components/Transition/index.d.ts +0 -3
  74. package/build/components/Transition/index.js +0 -2
  75. package/build/components/Transition/transition.d.ts +0 -4
  76. package/build/components/Transition/transition.js +0 -10
  77. package/build/components/Transition/transition.types.d.ts +0 -9
  78. package/build/components/Transition/transition.types.js +0 -1
  79. package/build/components/Upload/dragger.js +0 -42
  80. package/build/components/Upload/index.d.ts +0 -2
  81. package/build/components/Upload/index.js +0 -2
  82. package/build/components/Upload/native/axios-react.js +0 -99
  83. package/build/components/Upload/native/from-html.js +0 -5
  84. package/build/components/Upload/upload.js +0 -192
  85. package/build/components/Upload/upload.types.js +0 -3
  86. package/build/components/Upload/uploadList.js +0 -13
  87. package/build/hooks/useClickOutside.js +0 -38
  88. package/build/hooks/useDebounce.js +0 -28
  89. package/build/index.css.map +0 -1
  90. package/build/index.d.ts +0 -9
  91. package/build/index.js +0 -12
  92. package/build/main.d.ts +0 -1
  93. package/build/main.js +0 -7
  94. package/build/setupTests.d.ts +0 -1
  95. package/build/setupTests.js +0 -1
  96. /package/{build → dist}/components/AutoComplete/autoComplete.d.ts +0 -0
  97. /package/{build → dist}/components/AutoComplete/autoComplete.types.d.ts +0 -0
  98. /package/{build → dist}/components/Upload/native/axios-react.d.ts +0 -0
  99. /package/{build → dist}/components/Upload/native/from-html.d.ts +0 -0
  100. /package/{build → dist}/hooks/useClickOutside.d.ts +0 -0
  101. /package/{build → dist}/hooks/useDebounce.d.ts +0 -0
package/dist/App.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { FC } from "react";
2
+ import "./styles/index.scss";
3
+ declare const App: FC;
4
+ export default App;
@@ -1,5 +1,5 @@
1
- import type { FC, ReactElement } from 'react';
2
- import type { DataSourceType } from './autoComplete.types';
1
+ import type { FC, ReactElement } from "react";
2
+ import type { DataSourceType } from "./autoComplete.types";
3
3
  export interface AutoCompleteDropdownProps {
4
4
  loading: boolean;
5
5
  showDropdown: boolean;
@@ -0,0 +1,4 @@
1
+ import AutoComplete from "./autoComplete";
2
+ export default AutoComplete;
3
+ export { AutoComplete } from "./autoComplete";
4
+ export type { AutoCompleteProps, DataSourceType } from "./autoComplete.types";
@@ -1,5 +1,5 @@
1
- import type { FC } from 'react';
2
- import { ButtonSize, ButtonType, type AnchorButtonProps, type ButtonProps, type NativeButtonProps } from './button.types';
1
+ import type { FC } from "react";
2
+ import { ButtonSize, ButtonType, type AnchorButtonProps, type ButtonProps, type NativeButtonProps } from "./button.types";
3
3
  declare const Button: FC<ButtonProps>;
4
4
  export default Button;
5
5
  export { ButtonSize, ButtonType };
@@ -1,4 +1,4 @@
1
- import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from 'react';
1
+ import type { AnchorHTMLAttributes, ButtonHTMLAttributes, ReactNode } from "react";
2
2
  export declare const ButtonSize: {
3
3
  readonly Large: "lg";
4
4
  readonly Small: "sm";
@@ -0,0 +1,2 @@
1
+ import Button from "./button";
2
+ export default Button;
@@ -1,5 +1,5 @@
1
- import type { FC } from 'react';
2
- import type { IconProps } from './icon.types';
1
+ import type { FC } from "react";
2
+ import type { IconProps } from "./icon.types";
3
3
  /**
4
4
  * 提供了一套常用的图标集合 基于 react-fontawesome。
5
5
  *
@@ -0,0 +1,6 @@
1
+ import type { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
2
+ export type ThemeProps = "primary" | "secondary" | "success" | "info" | "warning" | "danger" | "light" | "dark";
3
+ export interface IconProps extends FontAwesomeIconProps {
4
+ /** 支持框架主题,根据主题显示不同的颜色 */
5
+ theme?: ThemeProps;
6
+ }
@@ -0,0 +1,2 @@
1
+ import Icon from "./icon";
2
+ export default Icon;
@@ -0,0 +1,4 @@
1
+ import Input from "./input";
2
+ export default Input;
3
+ export { Input } from "./input";
4
+ export type * from "./input.types";
@@ -0,0 +1,5 @@
1
+ import type { FC } from "react";
2
+ import type { InputProps } from "./input.types";
3
+ export type { InputProps, InputSize } from "./input.types";
4
+ export declare const Input: FC<InputProps>;
5
+ export default Input;
@@ -1,7 +1,7 @@
1
- import type { ChangeEvent, InputHTMLAttributes, ReactElement } from 'react';
2
- import type { IconProp } from '@fortawesome/fontawesome-svg-core';
3
- export type InputSize = 'lg' | 'sm';
4
- export interface InputProps extends Omit<InputHTMLAttributes<HTMLElement>, 'size'> {
1
+ import type { ChangeEvent, InputHTMLAttributes, ReactElement } from "react";
2
+ import type { IconProp } from "@fortawesome/fontawesome-svg-core";
3
+ export type InputSize = "lg" | "sm";
4
+ export interface InputProps extends Omit<InputHTMLAttributes<HTMLElement>, "size"> {
5
5
  /** 是否禁用 Input */
6
6
  disabled?: boolean;
7
7
  /** 设置 input 大小,支持 lg 或者是 sm */
@@ -1,7 +1,7 @@
1
- import type { FC } from 'react';
2
- import { type MenuProps } from './menu';
3
- import { type SubMenuProps } from './subMenu';
4
- import { type MenuItemProps } from './menuItem';
1
+ import type { FC } from "react";
2
+ import { type MenuProps } from "./menu";
3
+ import { type SubMenuProps } from "./subMenu";
4
+ import { type MenuItemProps } from "./menuItem";
5
5
  export type IMenuComponent = FC<MenuProps> & {
6
6
  Item: FC<MenuItemProps>;
7
7
  SubMenu: FC<SubMenuProps>;
@@ -1,5 +1,5 @@
1
- import type { FC, CSSProperties, ReactNode } from 'react';
2
- type MenuMode = 'horizontal' | 'vertical';
1
+ import type { FC, CSSProperties, ReactNode } from "react";
2
+ type MenuMode = "horizontal" | "vertical";
3
3
  export interface MenuProps {
4
4
  /**默认 active 的菜单项的索引值 */
5
5
  defaultIndex?: string;
@@ -1,4 +1,4 @@
1
- type MenuMode = 'horizontal' | 'vertical';
1
+ type MenuMode = "horizontal" | "vertical";
2
2
  export interface IMenuContext {
3
3
  index: string;
4
4
  onSelect?: (selectedIndex: string) => void;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import type { FC, ReactNode } from 'react';
1
+ import React from "react";
2
+ import type { FC, ReactNode } from "react";
3
3
  export interface MenuItemProps {
4
4
  index?: string;
5
5
  /**选项是否被禁用 */
@@ -1,4 +1,4 @@
1
- import type { FC, ReactNode } from 'react';
1
+ import type { FC, ReactNode } from "react";
2
2
  export interface SubMenuProps {
3
3
  index?: string;
4
4
  /**下拉菜单选项的文字 */
@@ -0,0 +1,2 @@
1
+ import Progress from "./progress";
2
+ export default Progress;
@@ -0,0 +1,4 @@
1
+ import type { FC } from "react";
2
+ import type { ProgressProps } from "./progress.types";
3
+ declare const Progress: FC<ProgressProps>;
4
+ export default Progress;
@@ -1,5 +1,5 @@
1
- import type { CSSProperties } from 'react';
2
- import type { ThemeProps } from '../Icon/icon.types';
1
+ import type { CSSProperties } from "react";
2
+ import type { ThemeProps } from "../Icon/icon.types";
3
3
  export interface ProgressProps {
4
4
  percent: number;
5
5
  strokeHeight?: number;
@@ -0,0 +1,3 @@
1
+ import Transition from "./transition";
2
+ export default Transition;
3
+ export type { AnimationName, TransitionProps } from "./transition";
@@ -0,0 +1,4 @@
1
+ import type { TransitionProps } from "./transition.types";
2
+ export type { AnimationName, TransitionProps } from "./transition.types";
3
+ declare const Transition: (props: TransitionProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Transition;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from "react";
2
+ import type { CSSTransitionProps } from "react-transition-group/CSSTransition";
3
+ export type AnimationName = "zoom-in-top" | "zoom-in-left" | "zoom-in-bottom" | "zoom-in-right";
4
+ export type TransitionProps = Omit<CSSTransitionProps<HTMLElement>, "timeout"> & {
5
+ animation?: AnimationName;
6
+ wrapper?: boolean;
7
+ children?: ReactNode;
8
+ timeout: NonNullable<CSSTransitionProps<HTMLElement>["timeout"]>;
9
+ };
@@ -1,4 +1,4 @@
1
- import type { FC, ReactNode } from 'react';
1
+ import type { FC, ReactNode } from "react";
2
2
  interface DraggerProps {
3
3
  onFile: (files: FileList) => void;
4
4
  children?: ReactNode;
@@ -0,0 +1,2 @@
1
+ import Upload from "./upload";
2
+ export default Upload;
@@ -1,5 +1,5 @@
1
- import type { FC } from 'react';
2
- import type { UploadProps } from './upload.types';
1
+ import type { FC } from "react";
2
+ import type { UploadProps } from "./upload.types";
3
3
  /**
4
4
  * 通过点击或者拖拽上传文件
5
5
  * ### 引用方法
@@ -1,4 +1,4 @@
1
- export type UploadFileStatus = 'ready' | 'uploading' | 'success' | 'error';
1
+ export type UploadFileStatus = "ready" | "uploading" | "success" | "error";
2
2
  export interface UploadFile {
3
3
  uid: string;
4
4
  size: number;
@@ -1,5 +1,5 @@
1
- import type { FC } from 'react';
2
- import type { UploadFile } from './upload.types';
1
+ import type { FC } from "react";
2
+ import type { UploadFile } from "./upload.types";
3
3
  interface UploadListProps {
4
4
  fileList: UploadFile[];
5
5
  onRemove: (_file: UploadFile) => void;