@web-fuse/wf-components 1.0.6 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/dist/Display/Card/DarkCard.Title.d.ts +2 -1
  2. package/dist/Display/Card/DarkCard.d.ts +6 -3
  3. package/dist/Display/Card/LightCard.Title.d.ts +2 -1
  4. package/dist/Display/Card/LightCard.d.ts +6 -3
  5. package/dist/Display/Card/index.d.ts +4 -4
  6. package/dist/Display/CodeBlock/CodeBlockCopy.d.ts +2 -2
  7. package/dist/Display/CodeBlock/CodeHeader.d.ts +2 -1
  8. package/dist/Display/CodeBlock/index.d.ts +2 -3
  9. package/dist/Display/CodeBlock/languages.d.ts +10 -11
  10. package/dist/Display/Collapse/Collapse.d.ts +3 -3
  11. package/dist/Display/Collapse/CollapseBase.d.ts +8 -9
  12. package/dist/Display/Collapse/CollapseContent.d.ts +4 -5
  13. package/dist/Display/Collapse/index.d.ts +7 -6
  14. package/dist/Display/Selector/SelectorItem.d.ts +2 -2
  15. package/dist/Display/Selector/SelectorSubItem.d.ts +2 -2
  16. package/dist/Display/Selector/index.d.ts +2 -1
  17. package/dist/Display/Selector/style.d.ts +8 -11
  18. package/dist/Display/index.d.ts +7 -7
  19. package/dist/Form/Buttons.d.ts +14 -29
  20. package/dist/Form/Form/Form.Item.d.ts +16 -0
  21. package/dist/Form/Form/Form.d.ts +8 -0
  22. package/dist/Form/Form/index.d.ts +15 -0
  23. package/dist/Form/HoverLabel.d.ts +3 -2
  24. package/dist/Form/Input/Input.Password.d.ts +4 -4
  25. package/dist/Form/Input/Input.Search.d.ts +7 -4
  26. package/dist/Form/Input/Input.TextArea.d.ts +7 -4
  27. package/dist/Form/Input/Input.d.ts +13 -10
  28. package/dist/Form/Input/index.d.ts +8 -7
  29. package/dist/Form/index.d.ts +7 -4
  30. package/dist/Layout/Main/MainSelector.d.ts +5 -5
  31. package/dist/Layout/Main/MainSettings.d.ts +9 -9
  32. package/dist/Layout/Main/index.d.ts +3 -3
  33. package/dist/Layout/Navbar/NavbarDropdown.d.ts +2 -2
  34. package/dist/Layout/Navbar/index.d.ts +1 -2
  35. package/dist/Layout/Navbar/style.d.ts +4 -5
  36. package/dist/Layout/index.d.ts +5 -5
  37. package/dist/Oauth/ErrorBoundary.d.ts +0 -1
  38. package/dist/Oauth/LoginContainer.d.ts +4 -3
  39. package/dist/Oauth/PageBackground.d.ts +2 -1
  40. package/dist/Oauth/index.d.ts +5 -5
  41. package/dist/index.cjs.js +202 -101
  42. package/dist/index.cjs.js.map +1 -1
  43. package/dist/index.d.ts +5 -5
  44. package/dist/index.es.js +14956 -2069
  45. package/dist/index.es.js.map +1 -1
  46. package/dist/util/index.d.ts +2 -1
  47. package/dist/util/useMessageApi.d.ts +4 -0
  48. package/dist/util/wfDarkAlgorithm.d.ts +2 -1
  49. package/package.json +1 -1
  50. package/readme.md +6 -0
@@ -1 +1,2 @@
1
- export * from "./wfDarkAlgorithm";
1
+ export * from './wfDarkAlgorithm';
2
+ export * from './useMessageApi';
@@ -0,0 +1,4 @@
1
+ import { MessageInstance } from 'antd/es/message/interface';
2
+
3
+ export declare const MessageProvider: ({ children }: React.PropsWithChildren) => import('react').FunctionComponentElement<import('react').ProviderProps<MessageInstance | null>>;
4
+ export declare const useMessageApi: () => MessageInstance | null;
@@ -1,4 +1,5 @@
1
- import { theme } from "antd";
1
+ import { theme } from 'antd';
2
+
2
3
  /**
3
4
  * Custom theme algorithm that restores the primary color
4
5
  * Normally the dark algorithm changes the colorPrimary aliasToken
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@web-fuse/wf-components",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "A library containing common form and display components",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs.js",
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.