@web-fuse/wf-components 1.0.5 → 1.0.7
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Display/Card/DarkCard.Title.d.ts +2 -0
- package/dist/Display/Card/DarkCard.d.ts +4 -1
- package/dist/Display/Card/LightCard.Title.d.ts +2 -0
- package/dist/Display/Card/LightCard.d.ts +4 -1
- package/dist/Display/Card/index.d.ts +2 -2
- package/dist/Form/Form/Form.Item.d.ts +16 -0
- package/dist/Form/Form/Form.d.ts +8 -0
- package/dist/Form/Form/index.d.ts +14 -0
- package/dist/Form/Input/Input.Password.d.ts +14 -0
- package/dist/Form/Input/Input.Search.d.ts +8 -0
- package/dist/Form/Input/Input.TextArea.d.ts +8 -0
- package/dist/Form/Input/Input.d.ts +14 -0
- package/dist/Form/Input/index.d.ts +14 -0
- package/dist/Form/index.d.ts +4 -1
- package/dist/Layout/Main/MainSettings.d.ts +11 -1
- package/dist/Layout/Main/index.d.ts +3 -1
- package/dist/index.cjs.js +234 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +14835 -1961
- package/dist/index.es.js.map +1 -1
- package/dist/util/index.d.ts +1 -0
- package/dist/util/randomstring.d.ts +5 -0
- package/dist/util/useMessageApi.d.ts +4 -0
- package/package.json +1 -1
- package/readme.md +6 -0
- package/dist/Form/Input.d.ts +0 -16
package/dist/util/index.d.ts
CHANGED
@@ -0,0 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import type { MessageInstance } from "antd/es/message/interface";
|
3
|
+
export declare const MessageProvider: ({ children }: React.PropsWithChildren) => import("react").FunctionComponentElement<import("react").ProviderProps<MessageInstance | null>>;
|
4
|
+
export declare const useMessageApi: () => MessageInstance | null;
|
package/package.json
CHANGED
package/readme.md
CHANGED
@@ -17,6 +17,12 @@ To make changes in the repository you should first run storybook as explained in
|
|
17
17
|
|
18
18
|
Each component must always be exported using `export default` and each component must always be assigned to a `const` variable before it is exported. If this is not done vite may have problems rebuilding the component and React will not know the name of the component.
|
19
19
|
|
20
|
+
## Ant design global message API
|
21
|
+
|
22
|
+
You can create a global context for the ant design message API by using the `MessageProvider` component. The messages can be styled by placing the `ConfigurationProvider` higher in the component tree and [customizing the theme](https://ant.design/components/message#design-token). Use the `useMessageApi` hook to access the message API and show message to the user.
|
23
|
+
|
24
|
+
It is currently not possible to create nested MessageProviders.
|
25
|
+
|
20
26
|
## Custom theme algorithm for antd
|
21
27
|
|
22
28
|
If you are using the `theme.darkAlgorithm` in your antd `ConfigProvider` you may notice that your primary color is not preserved. Therefor this package includes the `wfDarkAlgorithm` export. The only change, compared the the darkAlgorithm exported by antd, is that it takes retains your primary color.
|
package/dist/Form/Input.d.ts
DELETED
@@ -1,16 +0,0 @@
|
|
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?: ((instance: InputRef | null) => void) | import("react").RefObject<InputRef> | null | undefined;
|
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
|
-
OTP: import("react").ForwardRefExoticComponent<import("antd/es/input/OTP").OTPProps & import("react").RefAttributes<import("antd/es/input/OTP").OTPRef>>;
|
11
|
-
}, keyof import("react").Component<any, {}, any>>;
|
12
|
-
interface InputProps extends AntProps {
|
13
|
-
label?: React.ReactNode;
|
14
|
-
}
|
15
|
-
declare const Input: import("react").ForwardRefExoticComponent<InputProps & import("react").RefAttributes<InputRef>>;
|
16
|
-
export default Input;
|