@progressiveui/react 1.22.1 → 2.0.0

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 (47) hide show
  1. package/.storybook/WfpTheme.js +1 -1
  2. package/.storybook/main.ts +4 -4
  3. package/.storybook/preview.tsx +0 -25
  4. package/es/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
  5. package/es/dist/components/Footer/Footer.d.ts +0 -8
  6. package/es/dist/components/Footer/index.d.ts +2 -2
  7. package/es/dist/components/Input/useInput.d.ts +2 -0
  8. package/es/dist/components/MainNavigation/index.d.ts +3 -4
  9. package/es/dist/hooks/useHeightTransition.d.ts +1 -1
  10. package/es/dist/index.d.ts +1 -1
  11. package/es/index.js +231 -1316
  12. package/lib/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
  13. package/lib/dist/components/Footer/Footer.d.ts +0 -8
  14. package/lib/dist/components/Footer/index.d.ts +2 -2
  15. package/lib/dist/components/Input/useInput.d.ts +2 -0
  16. package/lib/dist/components/MainNavigation/index.d.ts +3 -4
  17. package/lib/dist/hooks/useHeightTransition.d.ts +1 -1
  18. package/lib/dist/index.d.ts +1 -1
  19. package/lib/index.js +256 -1353
  20. package/package.json +68 -78
  21. package/src/components/Accordion/hooks/useAccordion.ts +13 -9
  22. package/src/components/BannerNavigation/BannerNavigation.stories.tsx +0 -2
  23. package/src/components/Button/Button.stories.tsx +0 -16
  24. package/src/components/Button/Button.tsx +14 -11
  25. package/src/components/ContextMenu/ContextMenu.stories.tsx +0 -2
  26. package/src/components/Empty/Empty.stories.tsx +1 -2
  27. package/src/components/Footer/Footer.tsx +2 -42
  28. package/src/components/Footer/index.ts +2 -2
  29. package/src/components/Hero/Hero.stories.tsx +0 -2
  30. package/src/components/MainNavigation/MainNavigation.stories.tsx +1 -4
  31. package/src/components/MainNavigation/MainNavigation.tsx +1 -23
  32. package/src/components/MainNavigation/index.ts +3 -4
  33. package/src/components/Pagination/Pagination.stories.tsx +0 -2
  34. package/src/components/Search/Search.tsx +1 -1
  35. package/src/components/Text/Text.tsx +7 -4
  36. package/src/components/Toggle/Toggle.tsx +4 -4
  37. package/src/index.ts +0 -1
  38. package/umd/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
  39. package/umd/dist/components/Footer/Footer.d.ts +0 -8
  40. package/umd/dist/components/Footer/index.d.ts +2 -2
  41. package/umd/dist/components/Input/useInput.d.ts +2 -0
  42. package/umd/dist/components/MainNavigation/index.d.ts +3 -4
  43. package/umd/dist/hooks/useHeightTransition.d.ts +1 -1
  44. package/umd/dist/index.d.ts +1 -1
  45. package/umd/index.js +231 -1316
  46. package/umd/index.min.js +1 -1
  47. package/src/components/MainNavigation/MainNavigationExternal.tsx +0 -338
@@ -24,12 +24,12 @@ interface ToggleProps extends InputProps, React.ComponentPropsWithRef<"input"> {
24
24
  /**
25
25
  * Provide an optional hook that is called when the control is toggled
26
26
  */
27
- onToggle?: (
27
+ /* onToggleLegacy?: (
28
28
  value: boolean,
29
29
  htmlFor: string,
30
- event: React.ChangeEvent<HTMLInputElement>
30
+ event: React.ChangeEvent<HTMLInputElement>,
31
31
  ) => void;
32
- className?: string;
32
+ className?: string; */
33
33
  /**
34
34
  * Provide an id that unique represents the underlying `input`
35
35
  */
@@ -64,7 +64,7 @@ const Toggle: React.FC<ToggleProps> = React.forwardRef((props, ref) => {
64
64
  {
65
65
  [`${prefix}--form-item`]: true,
66
66
  },
67
- className
67
+ className,
68
68
  );
69
69
 
70
70
  // const checkedProps = {};
package/src/index.ts CHANGED
@@ -80,7 +80,6 @@ export { List, ListItem } from "./components/List";
80
80
  export {
81
81
  MainNavigation,
82
82
  MainNavigationContext,
83
- MainNavigationExternal,
84
83
  useMainNavigation,
85
84
  } from "./components/MainNavigation";
86
85
  export { default as MainNavigationItem } from "./components/MainNavigationItem";
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ItemStateOptions } from '../utils/constants';
3
3
  declare const useAccordionItemEffect: <E extends Element>({ itemKey, initialEntered, disabled, }?: ItemStateOptions) => {
4
- itemRef: import("react").RefObject<HTMLInputElement>;
4
+ itemRef: import("react").RefObject<HTMLInputElement | null>;
5
5
  state: Readonly<{
6
6
  status: import("react-transition-state").TransitionStatus;
7
7
  isMounted: boolean;
@@ -19,18 +19,10 @@ interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {
19
19
  Optional WFP logo for mobile devices, can be used if the Logo should be provided by the CDN
20
20
  */
21
21
  logo?: string | React.ReactNode;
22
- /**
23
- Optional WFP logo for desktop devices, can be used if the Logo should be provided by the CDN
24
- */
25
- logoExtended?: string | React.ReactNode;
26
22
  /**
27
23
  * Specify the max-width on desktop devices (same as \`Wrapper\` component)
28
24
  */
29
25
  pageWidth?: ScreenSize;
30
- /**
31
- Override the SDG icon
32
- */
33
- sdgLogo?: React.ReactNode;
34
26
  /**
35
27
  The WFP logo, can be used if the SDG logo should be provided in a different way
36
28
  */
@@ -1,2 +1,2 @@
1
- export { default as Footer } from './Footer';
2
- export { FooterExternal, LinksColumn, FooterMetaLink } from './FooterExternal';
1
+ export { default as Footer } from "./Footer";
2
+ export { FooterExternal, LinksColumn, FooterMetaLink } from "./FooterExternal";
@@ -112,6 +112,8 @@ export declare const useInput: ({ addonAfter, className, inputClassName, id, pla
112
112
  };
113
113
  wrapperProps: {
114
114
  calculatedId: string | undefined;
115
+ id: string | undefined;
116
+ name: string | undefined;
115
117
  className: string | undefined;
116
118
  addonAfter: React.ReactNode;
117
119
  labelText: React.ReactNode;
@@ -1,4 +1,3 @@
1
- export { default as MainNavigation } from './MainNavigation';
2
- export { default as MainNavigationExternal } from './MainNavigationExternal';
3
- export { default as MainNavigationContext } from './MainNavigationContext';
4
- export { default as useMainNavigation } from './useMainNavigation';
1
+ export { default as MainNavigation } from "./MainNavigation";
2
+ export { default as MainNavigationContext } from "./MainNavigationContext";
3
+ export { default as useMainNavigation } from "./useMainNavigation";
@@ -1,4 +1,4 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { TransitionState } from "react-transition-state";
3
- declare const useHeightTransition: <E extends Element>({ status, isResolved, }: TransitionState) => readonly [CSSProperties, import("react").RefObject<HTMLInputElement>];
3
+ declare const useHeightTransition: <E extends Element>({ status, isResolved, }: TransitionState) => readonly [CSSProperties, import("react").RefObject<HTMLInputElement | null>];
4
4
  export { useHeightTransition };
@@ -27,7 +27,7 @@ export { default as Loading } from "./components/Loading";
27
27
  export { default as Input, useInput, Label, InlineErrorMessage, Helper, AddonBefore, AddonAfter, } from "./components/Input";
28
28
  export { default as InlineLoading } from "./components/InlineLoading";
29
29
  export { List, ListItem } from "./components/List";
30
- export { MainNavigation, MainNavigationContext, MainNavigationExternal, useMainNavigation, } from "./components/MainNavigation";
30
+ export { MainNavigation, MainNavigationContext, useMainNavigation, } from "./components/MainNavigation";
31
31
  export { default as MainNavigationItem } from "./components/MainNavigationItem";
32
32
  export { SubNavigation, SubNavigationHeader, SubNavigationTitle, SubNavigationLink, SubNavigationFilter, SubNavigationContent, SubNavigationList, SubNavigationGroup, SubNavigationItem, } from "./components/SubNavigation";
33
33
  export { default as mdxComponents } from "./components/MdxComponents";