@web-fuse/wf-components 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/Display/Card/DarkCard.d.ts +6 -0
  2. package/dist/Display/Card/LightCard.d.ts +6 -0
  3. package/dist/Display/Card/index.d.ts +4 -0
  4. package/dist/Display/Collapse/Collapse.d.ts +16 -0
  5. package/dist/Display/Collapse/CollapseBase.d.ts +27 -0
  6. package/dist/Display/Collapse/CollapseContent.d.ts +10 -0
  7. package/dist/Display/Collapse/index.d.ts +12 -0
  8. package/dist/Display/Selector/SelectorItem.d.ts +10 -0
  9. package/dist/Display/Selector/SelectorSubItem.d.ts +11 -0
  10. package/dist/Display/Selector/index.d.ts +31 -0
  11. package/dist/Display/Selector/style.d.ts +16 -0
  12. package/dist/Display/index.d.ts +5 -0
  13. package/dist/Form/Buttons.d.ts +29 -0
  14. package/dist/Form/HoverLabel.d.ts +11 -0
  15. package/dist/Form/Input.d.ts +15 -0
  16. package/dist/Form/index.d.ts +4 -0
  17. package/dist/Layout/Main/MainSelector.d.ts +12 -0
  18. package/dist/Layout/Main/MainSettings.d.ts +5 -0
  19. package/dist/Layout/Main/index.d.ts +14 -0
  20. package/dist/Layout/Navbar/NavbarDropdown.d.ts +14 -0
  21. package/dist/Layout/Navbar/index.d.ts +31 -0
  22. package/dist/Layout/Navbar/style.d.ts +5 -0
  23. package/dist/Layout/index.d.ts +5 -0
  24. package/dist/Oauth/ErrorBoundary.d.ts +12 -0
  25. package/dist/Oauth/LoginContainer.d.ts +10 -0
  26. package/dist/Oauth/PageBackground.d.ts +7 -0
  27. package/dist/Oauth/index.d.ts +5 -0
  28. package/dist/index.cjs.js +660 -0
  29. package/dist/index.cjs.js.map +1 -0
  30. package/dist/index.d.ts +5 -0
  31. package/dist/index.es.js +2882 -0
  32. package/dist/index.es.js.map +1 -0
  33. package/dist/util/index.d.ts +1 -0
  34. package/dist/util/wfDarkAlgorithm.d.ts +7 -0
  35. package/package.json +65 -0
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type DarkCardProps = React.PropsWithChildren & {
3
+ title?: React.ReactNode;
4
+ };
5
+ declare const DarkCard: React.FC<DarkCardProps>;
6
+ export default DarkCard;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type LightCardProps = React.PropsWithChildren & {
3
+ title?: React.ReactNode;
4
+ };
5
+ declare const LightCard: React.FC<LightCardProps>;
6
+ export default LightCard;
@@ -0,0 +1,4 @@
1
+ export { default as LightCard } from "./LightCard";
2
+ export type { LightCardProps } from "./LightCard";
3
+ export { default as DarkCard } from "./DarkCard";
4
+ export type { DarkCardProps } from "./DarkCard";
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { type CollapseBaseProps, type CollapseRef } from "./CollapseBase";
3
+ type CssColor = React.CSSProperties["color"];
4
+ export interface CollapseProps extends Omit<CollapseBaseProps, "style"> {
5
+ title?: React.ReactNode;
6
+ activeColor?: CssColor;
7
+ inactiveColor?: CssColor;
8
+ image?: string;
9
+ rightText?: React.ReactNode;
10
+ style?: {
11
+ header?: React.CSSProperties;
12
+ children?: React.CSSProperties;
13
+ };
14
+ }
15
+ declare const Collapse: import("react").ForwardRefExoticComponent<CollapseProps & import("react").RefAttributes<CollapseRef>>;
16
+ export default Collapse;
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ export declare const animationDuration = 300;
3
+ export type CollapseChangeHandler = (open: boolean) => void;
4
+ export type CollapseBaseProps = React.PropsWithChildren<{
5
+ open?: boolean;
6
+ onChange?: CollapseChangeHandler;
7
+ defaultOpen?: boolean;
8
+ style?: React.CSSProperties;
9
+ header?: React.ReactNode;
10
+ border?: boolean;
11
+ width?: React.CSSProperties["width"];
12
+ }>;
13
+ export type CollapseRef = {
14
+ calculateHeight: () => void;
15
+ };
16
+ declare const CollapseBase: import("react").ForwardRefExoticComponent<{
17
+ open?: boolean;
18
+ onChange?: CollapseChangeHandler;
19
+ defaultOpen?: boolean;
20
+ style?: React.CSSProperties;
21
+ header?: React.ReactNode;
22
+ border?: boolean;
23
+ width?: React.CSSProperties["width"];
24
+ } & {
25
+ children?: import("react").ReactNode;
26
+ } & import("react").RefAttributes<CollapseRef>>;
27
+ export default CollapseBase;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ export type ContentProps = React.PropsWithChildren<{
3
+ background?: React.CSSProperties["background"];
4
+ }>;
5
+ declare const CollapseContent: import("react").ForwardRefExoticComponent<{
6
+ background?: React.CSSProperties["background"];
7
+ } & {
8
+ children?: import("react").ReactNode;
9
+ } & import("react").RefAttributes<HTMLDivElement>>;
10
+ export default CollapseContent;
@@ -0,0 +1,12 @@
1
+ import { default as InternalCollapse } from "./Collapse";
2
+ import { default as CollapseBase } from "./CollapseBase";
3
+ import { default as CollapseContent } from "./CollapseContent";
4
+ export type { CollapseProps } from "./Collapse";
5
+ export type { CollapseBaseProps, CollapseRef } from "./CollapseBase";
6
+ export type { ContentProps } from "./CollapseContent";
7
+ type CollapseType = typeof InternalCollapse & {
8
+ Content: typeof CollapseContent;
9
+ Base: typeof CollapseBase;
10
+ };
11
+ declare const Collapse: CollapseType;
12
+ export default Collapse;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import type { SelectorClickHandler, SelectorItemGroup, SelectorRenderer } from './index';
3
+ interface SelectorItemProps {
4
+ item?: SelectorItemGroup;
5
+ onClick?: SelectorClickHandler;
6
+ itemRender?: SelectorRenderer;
7
+ open?: boolean;
8
+ }
9
+ declare const SelectorItem: React.FC<SelectorItemProps>;
10
+ export default SelectorItem;
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import type { SelectorClickHandler, SelectorItem, SelectorRenderer } from './index';
3
+ interface SelectorSubItemProps {
4
+ item?: SelectorItem;
5
+ onClick?: SelectorClickHandler;
6
+ active?: boolean;
7
+ parentKey?: string;
8
+ itemRender?: SelectorRenderer;
9
+ }
10
+ declare const SelectorSubItem: React.FC<SelectorSubItemProps>;
11
+ export default SelectorSubItem;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ export interface SelectorItem {
3
+ key: string;
4
+ label: React.ReactNode;
5
+ icon?: React.ReactNode;
6
+ }
7
+ export interface SelectorItemGroup extends SelectorItem {
8
+ type: "group";
9
+ children: SelectorItem[];
10
+ }
11
+ interface ItemInfo {
12
+ item: SelectorItem | SelectorItemGroup;
13
+ key: string;
14
+ keyPath: string[];
15
+ domEvent: React.MouseEvent<HTMLDivElement>;
16
+ }
17
+ export type SelectorRenderer = (child: React.ReactNode, info: Omit<ItemInfo, "domEvent">) => React.ReactNode;
18
+ export type SelectorClickHandler = (info: ItemInfo) => void;
19
+ export interface SelectorProps {
20
+ items?: (SelectorItem | SelectorItemGroup)[];
21
+ messageEmpty?: React.ReactNode;
22
+ onClick?: SelectorClickHandler;
23
+ loading?: boolean | string;
24
+ itemRender?: SelectorRenderer;
25
+ openKeys?: string[];
26
+ bottomAddon?: React.ReactNode;
27
+ search?: string;
28
+ onSearchChange?: (value: string) => void;
29
+ }
30
+ declare const Selector: React.ForwardRefExoticComponent<SelectorProps & React.RefAttributes<HTMLDivElement>>;
31
+ export default Selector;
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export declare const Item: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $colorBorder?: React.CSSProperties["color"];
4
+ }>>;
5
+ export declare const ItemText: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
6
+ ref?: import("react").Ref<HTMLSpanElement>;
7
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, keyof import("react").Component<any, {}, any>>;
8
+ export declare const SubItem: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<Omit<import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$colorBorder"> & {
9
+ $colorBorder?: React.CSSProperties["color"];
10
+ }, "ref"> & {
11
+ ref?: import("react").Ref<HTMLDivElement>;
12
+ }, {
13
+ $colorActiveBg: React.CSSProperties["color"];
14
+ }>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
15
+ $colorBorder?: React.CSSProperties["color"];
16
+ }>>, keyof import("react").Component<any, {}, any>>;
@@ -0,0 +1,5 @@
1
+ export { default as Collapse } from "./Collapse";
2
+ export type { CollapseProps, CollapseRef, CollapseBaseProps } from "./Collapse";
3
+ export { default as Selector } from "./Selector";
4
+ export type { SelectorProps } from "./Selector";
5
+ export * from "./Card";
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ export declare const Button: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
3
+ ref?: import("react").Ref<HTMLElement>;
4
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
5
+ Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
6
+ }, keyof import("react").Component<any, {}, any>>;
7
+ export declare const CenteredButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
8
+ ref?: import("react").Ref<HTMLElement>;
9
+ }, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
10
+ ref?: import("react").Ref<HTMLElement>;
11
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
12
+ Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
13
+ }, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
14
+ export declare const ExtraSmallButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
15
+ ref?: import("react").Ref<HTMLElement>;
16
+ }, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
17
+ ref?: import("react").Ref<HTMLElement>;
18
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
19
+ Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
20
+ }, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
21
+ export declare const RightButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
22
+ ref?: import("react").Ref<HTMLElement>;
23
+ }, never>, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
24
+ ref?: import("react").Ref<HTMLElement>;
25
+ }, never>, never>> & Omit<import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>, "ref"> & {
26
+ ref?: import("react").Ref<HTMLElement>;
27
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<import("antd").ButtonProps & import("react").RefAttributes<HTMLElement>> & {
28
+ Group: import("react").FC<import("antd/es/button").ButtonGroupProps>;
29
+ }, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>, keyof import("react").Component<any, {}, any>>;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface HoverLabelProps {
3
+ name?: string;
4
+ size?: "small" | "middle" | "large";
5
+ colorText?: React.CSSProperties["color"];
6
+ colorTextActive?: React.CSSProperties["color"];
7
+ }
8
+ declare const HoverLabel: React.ForwardRefExoticComponent<HoverLabelProps & {
9
+ children?: React.ReactNode;
10
+ } & React.RefAttributes<HTMLLabelElement>>;
11
+ export default HoverLabel;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { InputProps as AntProps, InputRef } from "antd";
3
+ export declare const HtmlInput: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<AntProps & import("react").RefAttributes<InputRef>, "ref"> & {
4
+ ref?: import("react").Ref<InputRef>;
5
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<AntProps & import("react").RefAttributes<InputRef>> & {
6
+ Group: import("react").FC<import("antd/es/input").GroupProps>;
7
+ Search: import("react").ForwardRefExoticComponent<import("antd/es/input").SearchProps & import("react").RefAttributes<InputRef>>;
8
+ TextArea: import("react").ForwardRefExoticComponent<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef>>;
9
+ Password: import("react").ForwardRefExoticComponent<import("antd/es/input").PasswordProps & import("react").RefAttributes<InputRef>>;
10
+ }, keyof import("react").Component<any, {}, any>>;
11
+ interface InputProps extends AntProps {
12
+ label?: React.ReactNode;
13
+ }
14
+ declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<InputRef>>;
15
+ export default Input;
@@ -0,0 +1,4 @@
1
+ export * from "./Buttons";
2
+ export { default as HoverLabel } from "./HoverLabel";
3
+ export type { HoverLabelProps } from "./HoverLabel";
4
+ export { default as Input } from "./Input";
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ import { type CollapseBaseProps } from '@/Display';
3
+ interface MainSelectorBaseProps {
4
+ title?: React.ReactNode;
5
+ collapseOpen?: boolean;
6
+ onChange?: CollapseBaseProps["onChange"];
7
+ }
8
+ export type MainSelectorProps = React.PropsWithChildren<MainSelectorBaseProps>;
9
+ declare const MainSelector: import("react").ForwardRefExoticComponent<MainSelectorBaseProps & {
10
+ children?: import("react").ReactNode;
11
+ } & import("react").RefAttributes<HTMLDivElement>>;
12
+ export default MainSelector;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const MainSettings: import("react").ForwardRefExoticComponent<{
3
+ children?: import("react").ReactNode;
4
+ } & import("react").RefAttributes<HTMLDivElement>>;
5
+ export default MainSettings;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import MainSettings from "./MainSettings";
3
+ import MainSelector from "./MainSelector";
4
+ interface MainBaseProps {
5
+ overflow?: "scroll" | "visible";
6
+ height?: "full" | "content";
7
+ }
8
+ export type MainProps = React.PropsWithChildren<MainBaseProps>;
9
+ type MainLayoutType = React.ForwardRefExoticComponent<MainProps & React.RefAttributes<HTMLDivElement>> & {
10
+ Settings: typeof MainSettings;
11
+ Selector: typeof MainSelector;
12
+ };
13
+ declare const MainLayout: MainLayoutType;
14
+ export default MainLayout;
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ import type { MenuGroupItem, MenuItem, NavbarRenderer } from './index';
3
+ export type NavbarDropdownClickHandler = (e: React.MouseEvent<HTMLLIElement>, info?: {
4
+ item: MenuItem | MenuGroupItem;
5
+ key: string;
6
+ }) => void;
7
+ export interface NavbarDropdownProps {
8
+ onClick?: NavbarDropdownClickHandler;
9
+ item?: MenuGroupItem;
10
+ activeKey?: string;
11
+ itemRender?: NavbarRenderer;
12
+ }
13
+ declare const NavbarDropdown: React.FC<NavbarDropdownProps>;
14
+ export default NavbarDropdown;
@@ -0,0 +1,31 @@
1
+ /// <reference types="react" />
2
+ type CssColor = React.CSSProperties["color"];
3
+ export interface MenuItem {
4
+ key: string;
5
+ label: React.ReactNode;
6
+ }
7
+ export interface MenuGroupItem extends MenuItem {
8
+ type: "group";
9
+ children: MenuItem[];
10
+ }
11
+ interface ItemInfo {
12
+ item: MenuItem | MenuGroupItem;
13
+ key: string;
14
+ keyPath: string[];
15
+ domEvent: React.MouseEvent<HTMLLIElement>;
16
+ }
17
+ type NavbarClickHandler = (info: ItemInfo) => void;
18
+ export type NavbarRenderer = (child: React.ReactNode, info: Omit<ItemInfo, "domEvent">) => React.ReactNode;
19
+ export interface NavbarProps {
20
+ logo?: React.ReactNode;
21
+ items?: (MenuItem | MenuGroupItem)[];
22
+ onClick?: NavbarClickHandler;
23
+ activeKey?: string;
24
+ textColor?: CssColor;
25
+ activeColor?: CssColor;
26
+ toggleColor?: CssColor;
27
+ height?: number;
28
+ itemRender?: NavbarRenderer;
29
+ }
30
+ declare const Navbar: import("react").ForwardRefExoticComponent<NavbarProps & import("react").RefAttributes<HTMLDivElement>>;
31
+ export default Navbar;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const HeaderTextBox: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>>;
3
+ export declare const HeaderText: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<Omit<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
4
+ ref?: import("react").Ref<HTMLSpanElement>;
5
+ }, never>> & Omit<import("react").ForwardRefExoticComponent<import("antd/es/typography/Text").TextProps & import("react").RefAttributes<HTMLSpanElement>>, keyof import("react").Component<any, {}, any>>;
@@ -0,0 +1,5 @@
1
+ export { default as Navbar } from "./Navbar";
2
+ export type { NavbarProps, NavbarRenderer } from "./Navbar";
3
+ export { default as MainLayout } from "./Main";
4
+ export type { MainProps } from "./Main";
5
+ export type { MainSelectorProps } from "./Main/MainSelector";
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export interface LoginError {
3
+ message: string;
4
+ error_description?: React.ReactNode;
5
+ error_detail?: React.ReactNode;
6
+ }
7
+ export type LoginErrorBoundaryProps = {
8
+ error: LoginError;
9
+ title: React.ReactNode;
10
+ };
11
+ declare const LoginErrorBoundary: React.FC<LoginErrorBoundaryProps>;
12
+ export default LoginErrorBoundary;
@@ -0,0 +1,10 @@
1
+ import type { ParagraphProps } from "antd/es/typography/Paragraph";
2
+ import type { TitleProps } from "antd/es/typography/Title";
3
+ import type { PropsWithChildren } from "react";
4
+ export type LoginContainer = React.FC<PropsWithChildren> & {
5
+ Header: React.FC;
6
+ Title: React.FC<TitleProps>;
7
+ Subtitle: React.FC<ParagraphProps>;
8
+ };
9
+ declare const Container: LoginContainer;
10
+ export default Container;
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from "react";
2
+ export type LoginPageBackgroundProps = {
3
+ width?: React.CSSProperties["width"];
4
+ height?: React.CSSProperties["height"];
5
+ };
6
+ declare const PageBackground: React.FC<PropsWithChildren<LoginPageBackgroundProps>>;
7
+ export default PageBackground;
@@ -0,0 +1,5 @@
1
+ export { default as LoginErrorBoundary } from "./ErrorBoundary";
2
+ export type { LoginErrorBoundaryProps } from "./ErrorBoundary";
3
+ export { default as LoginContainer } from "./LoginContainer";
4
+ export { default as LoginPageBackground } from "./PageBackground";
5
+ export type { LoginPageBackgroundProps } from "./PageBackground";