@progressiveui/react 1.22.0 → 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 (50) 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 +4 -1
  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 +235 -1318
  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 +4 -1
  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 +260 -1355
  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/FooterExternal.tsx +0 -5
  29. package/src/components/Footer/index.ts +2 -2
  30. package/src/components/Hero/Hero.stories.tsx +0 -2
  31. package/src/components/Input/Input.tsx +1 -0
  32. package/src/components/Input/useInput.tsx +12 -9
  33. package/src/components/MainNavigation/MainNavigation.stories.tsx +1 -4
  34. package/src/components/MainNavigation/MainNavigation.tsx +1 -23
  35. package/src/components/MainNavigation/index.ts +3 -4
  36. package/src/components/Pagination/Pagination.stories.tsx +0 -2
  37. package/src/components/Search/Search.tsx +1 -1
  38. package/src/components/Text/Text.tsx +7 -4
  39. package/src/components/Toggle/Toggle.tsx +4 -4
  40. package/src/index.ts +0 -1
  41. package/umd/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
  42. package/umd/dist/components/Footer/Footer.d.ts +0 -8
  43. package/umd/dist/components/Footer/index.d.ts +2 -2
  44. package/umd/dist/components/Input/useInput.d.ts +4 -1
  45. package/umd/dist/components/MainNavigation/index.d.ts +3 -4
  46. package/umd/dist/hooks/useHeightTransition.d.ts +1 -1
  47. package/umd/dist/index.d.ts +1 -1
  48. package/umd/index.js +235 -1318
  49. package/umd/index.min.js +1 -1
  50. package/src/components/MainNavigation/MainNavigationExternal.tsx +0 -338
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progressiveui/react",
3
- "version": "1.22.0",
3
+ "version": "2.0.0",
4
4
  "description": "WFP UI Kit",
5
5
  "license": "Apache-2",
6
6
  "main": "lib/index.js",
@@ -45,126 +45,116 @@
45
45
  "react-docgen.json"
46
46
  ],
47
47
  "peerDependencies": {
48
- "react": "^18.2.0",
49
- "react-dom": "^18.2.0"
48
+ "react": "^19.1.0",
49
+ "react-dom": "^19.1.0"
50
50
  },
51
51
  "dependencies": {
52
- "@babel/preset-typescript": "^7.18.6",
52
+ "@babel/preset-typescript": "^7.27.0",
53
53
  "@carbon/feature-flags": "^0.6.0",
54
- "classnames": "2.2.6",
54
+ "classnames": "2.5.1",
55
55
  "invariant": "^2.2.4",
56
56
  "react-datepicker": "^4.6.0",
57
57
  "react-frame-component": "^5.2.6",
58
- "react-popper-tooltip": "^4.1.0",
59
- "react-transition-state": "^2.1.0",
58
+ "react-popper-tooltip": "^4.4.2",
59
+ "react-transition-state": "^2.3.1",
60
60
  "warning": "^4.0.3",
61
- "whatwg-fetch": "^3.6.19",
61
+ "whatwg-fetch": "^3.6.20",
62
62
  "window-or-global": "^1.0.1",
63
- "ws": "^8.12.0"
63
+ "ws": "^8.18.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@babel/plugin-proposal-class-properties": "^7.18.6",
67
67
  "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
68
- "@babel/traverse": "^7.23.2",
69
- "@fontsource-variable/open-sans": "^5.0.13",
68
+ "@babel/traverse": "^7.27.0",
69
+ "@fontsource-variable/open-sans": "^5.2.5",
70
70
  "@progressiveui/icons-react": "^10.38.0",
71
- "@progressiveui/pictograms-react": "^11.18.0",
72
- "@progressiveui/styles": "^10.30.0",
71
+ "@progressiveui/styles": "^11.0.0",
73
72
  "@progressiveui/themes-core": "^0.4.0",
74
73
  "@rollup/plugin-babel": "^6.0.4",
75
- "@rollup/plugin-commonjs": "^25.0.7",
76
- "@rollup/plugin-node-resolve": "^15.2.3",
77
- "@rollup/plugin-replace": "^5.0.2",
78
- "@rollup/plugin-terser": "^0.4.3",
79
- "@rollup/plugin-typescript": "^11.1.5",
80
- "@storybook/addon-docs": "^8.0.0-beta.4",
81
- "@storybook/addon-essentials": "^8.0.0-beta.4",
82
- "@storybook/addon-links": "^8.0.0-beta.4",
83
- "@storybook/addon-mdx-gfm": "^8.0.0-beta.4",
84
- "@storybook/addon-styling": "^1.3.7",
85
- "@storybook/blocks": "^8.0.0-beta.4",
86
- "@storybook/react": "^8.0.0-beta.4",
87
- "@storybook/react-vite": "^8.0.0-beta.4",
74
+ "@rollup/plugin-commonjs": "^28.0.3",
75
+ "@rollup/plugin-node-resolve": "^16.0.1",
76
+ "@rollup/plugin-replace": "^6.0.2",
77
+ "@rollup/plugin-typescript": "^12.1.2",
78
+ "@storybook/addon-docs": "^8.6.12",
79
+ "@storybook/addon-essentials": "^8.6.12",
80
+ "@storybook/addon-links": "^8.6.12",
81
+ "@storybook/blocks": "^8.6.12",
82
+ "@storybook/react": "^8.6.12",
83
+ "@storybook/react-vite": "^8.6.12",
88
84
  "@storybook/testing-library": "^0.2.2",
89
- "@testing-library/jest-dom": "^6.1.5",
90
- "@testing-library/react": "^14.1.2",
91
- "@types/jest": "^29.5.11",
92
- "@types/mdx": "^2.0.3",
93
- "@types/mocha": "^10.0.6",
94
- "@types/node": "^20.10.4",
95
- "@types/react": "^18.2.14",
96
- "@types/react-dom": "^18.0.6",
97
- "@typescript-eslint/eslint-plugin": "^5.56.0",
98
- "@typescript-eslint/parser": "^5.56.0",
99
- "all-contributors-cli": "^6.17.0",
100
- "autoprefixer": "^9.8.6",
85
+ "@testing-library/jest-dom": "^6.6.3",
86
+ "@testing-library/react": "^16.3.0",
87
+ "@types/jest": "^29.5.14",
88
+ "@types/mdx": "^2.0.13",
89
+ "@types/mocha": "^10.0.10",
90
+ "@types/node": "^20.14.0",
91
+ "@types/react": "^19.1.0",
92
+ "@types/react-dom": "^19.1.2",
93
+ "@typescript-eslint/eslint-plugin": "^8.29.1",
94
+ "@typescript-eslint/parser": "^8.29.1",
95
+ "autoprefixer": "^10.4.21",
101
96
  "babel-eslint": "^10.1.0",
102
- "babel-loader": "^8.2.2",
103
- "babel-plugin-dev-expression": "^0.2.2",
97
+ "babel-loader": "^10.0.0",
98
+ "babel-plugin-dev-expression": "^0.2.3",
104
99
  "babel-plugin-named-exports-order": "^0.0.2",
105
- "browserslist-config-carbon": "^10.6.1",
106
- "clean-webpack-plugin": "^3.0.0",
107
- "css-loader": "^5.2.4",
100
+ "browserslist-config-carbon": "^11.2.0",
101
+ "clean-webpack-plugin": "^4.0.0",
102
+ "css-loader": "^7.1.2",
108
103
  "enzyme": "^3.11.0",
109
- "enzyme-adapter-react-16": "^1.15.2",
110
- "enzyme-to-json": "^3.5.0",
111
- "eslint-plugin-storybook": "^0.6.15",
112
- "gzip-size": "^5.1.1",
113
- "handlebars": "^4.7.7",
114
- "iframe-resizer": "^4.3.6",
104
+ "enzyme-adapter-react-16": "^1.15.8",
105
+ "eslint-plugin-storybook": "^0.12.0",
106
+ "handlebars": "^4.7.8",
115
107
  "jest": "^29.7.0",
116
108
  "jest-environment-jsdom": "^29.7.0",
117
- "lodash.isequal": "^4.5.0",
118
- "moment": "^2.27.0",
119
109
  "object-assign": "^4.1.1",
120
- "postcss": "^8.2.14",
121
- "postcss-cli": "^8.3.1",
122
- "postcss-custom-properties": "^11.0.0",
123
- "postcss-loader": "4",
124
- "prettier": "^2.8.7",
110
+ "postcss": "^8.5.3",
111
+ "postcss-cli": "^11.0.1",
112
+ "postcss-custom-properties": "^14.0.4",
113
+ "postcss-loader": "8.1.1",
114
+ "prettier": "^3.5.3",
125
115
  "pretty": "^2.0.0",
126
- "prismjs": "^1.20.0",
127
- "promise": "^8.1.0",
116
+ "prismjs": "^1.30.0",
117
+ "promise": "^8.3.0",
128
118
  "prop-types": "^15.8.1",
129
- "raw-loader": "^4.0.1",
130
- "react": "18.2.0",
119
+ "raw-loader": "^4.0.2",
120
+ "react": "19.1.0",
131
121
  "react-dates": "^21.8.0",
132
- "react-docgen": "^7.0.0",
122
+ "react-docgen": "^7.1.1",
133
123
  "react-docgen-typescript": "^2.2.2",
134
- "react-dom": "18.2.0",
135
- "react-dropzone": "^11.0.2",
136
- "react-final-form": "^6.5.1",
124
+ "react-dom": "19.1.0",
125
+ "react-dropzone": "^14.3.8",
126
+ "react-final-form": "^6.5.9",
137
127
  "react-hook-form": "^7.20.5",
138
128
  "react-markdown": "^9.0.0",
139
129
  "react-popper": "^2.2.3",
140
130
  "react-prism": "^4.3.2",
141
131
  "react-redux": "^7.2.1",
142
- "react-select": "^3.1.0",
143
- "react-table": "7.5.0",
144
- "recharts": "^2.7.3",
132
+ "react-select": "^5.10.1",
133
+ "react-table": "7.8.0",
134
+ "recharts": "^2.15.2",
145
135
  "redux-form": "^8.3.10",
146
136
  "requestanimationframe": "^0.0.23",
147
- "rimraf": "^3.0.2",
137
+ "rimraf": "^6.0.1",
148
138
  "rollup": "4.1.4",
149
139
  "rollup-plugin-peer-deps-external": "^2.2.4",
150
140
  "rollup-plugin-preserve-directives": "^0.2.0",
151
141
  "rollup-plugin-string": "^3.0.0",
152
142
  "rollup-plugin-strip-banner": "^3.0.0",
153
143
  "rollup-plugin-terser": "^7.0.2",
154
- "rollup-plugin-visualizer": "^5.12.0",
155
- "sass": "^1.66.1",
156
- "sass-loader": "13.3.2",
157
- "storybook": "^8.0.0-beta.4",
158
- "style-loader": "^2.0.0",
159
- "ts-jest": "^29.1.1",
160
- "twig": "^1.15.4",
161
- "typescript": "^4.8.3",
162
- "vite": "^4.4.9"
144
+ "rollup-plugin-visualizer": "^5.14.0",
145
+ "sass": "^1.86.3",
146
+ "sass-loader": "16.0.5",
147
+ "storybook": "^8.6.12",
148
+ "style-loader": "^4.0.0",
149
+ "ts-jest": "^29.3.1",
150
+ "twig": "^1.17.1",
151
+ "typescript": "^5.8.3",
152
+ "vite": "^6.2.5"
163
153
  },
164
154
  "repository": {
165
155
  "type": "git",
166
156
  "url": "https://github.com/wfp/ui.git"
167
157
  },
168
158
  "bundleSizeThreshold": 80000,
169
- "gitHead": "a5bec728bba7e239d3d00104c0e24d1b13dd554b"
159
+ "gitHead": "d5135d857e06dd46b8cfad1d77b35a61aed8ce50"
170
160
  }
@@ -1,7 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
-
3
- import { HTMLAttributes, KeyboardEvent } from 'react';
4
- import { ACCORDION_ATTR, ACCORDION_BTN_ATTR } from '../utils/constants';
2
+ import { HTMLAttributes, KeyboardEvent } from "react";
3
+ import { ACCORDION_ATTR, ACCORDION_BTN_ATTR } from "../utils/constants";
5
4
 
6
5
  const getAccordion = (node: Element) => {
7
6
  do {
@@ -23,7 +22,7 @@ const moveFocus = (moveUp: boolean, e: KeyboardEvent<Element>) => {
23
22
  return;
24
23
 
25
24
  const nodes = e.currentTarget.querySelectorAll<HTMLElement>(
26
- `[${ACCORDION_BTN_ATTR}]`
25
+ `[${ACCORDION_BTN_ATTR}]`,
27
26
  );
28
27
  const { length } = nodes;
29
28
  for (let i = 0; i < length; i++) {
@@ -40,13 +39,18 @@ const moveFocus = (moveUp: boolean, e: KeyboardEvent<Element>) => {
40
39
  }
41
40
  };
42
41
 
42
+ // Extend HTMLAttributes to allow our custom data attribute
43
+ interface AccordionHTMLAttributes<T> extends HTMLAttributes<T> {
44
+ "data-accordion"?: string;
45
+ }
46
+
43
47
  const useAccordion = () => {
44
- const accordionProps: HTMLAttributes<Element> = {
45
- [ACCORDION_ATTR]: '',
46
- onKeyDown: (e) =>
47
- e.key === 'ArrowUp'
48
+ const accordionProps: AccordionHTMLAttributes<Element> = {
49
+ "data-accordion": "",
50
+ onKeyDown: (e: KeyboardEvent<Element>) =>
51
+ e.key === "ArrowUp"
48
52
  ? moveFocus(true, e)
49
- : e.key === 'ArrowDown' && moveFocus(false, e),
53
+ : e.key === "ArrowDown" && moveFocus(false, e),
50
54
  };
51
55
  return {
52
56
  accordionProps,
@@ -1,8 +1,6 @@
1
1
  import React from "react";
2
- import { action } from "@storybook/addon-actions";
3
2
  import { BannerNavigation, BannerNavigationItem } from "./BannerNavigation";
4
3
  import { BannerNavigationWithContent } from "./BannerNavigationWithContent";
5
- import Search from "../Search";
6
4
  import Link from "../Link";
7
5
 
8
6
  export default {
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
3
  import { buttonKinds } from "../../prop-types/types";
4
4
  import { AddCircle } from "@progressiveui/icons-react";
5
- import markdown from "./README.mdx";
6
5
  import Button from "./Button";
7
6
 
8
7
  const meta: Meta<typeof Button> = {
@@ -12,28 +11,13 @@ const meta: Meta<typeof Button> = {
12
11
  parameters: {
13
12
  componentSubtitle: "Component",
14
13
  status: "released",
15
- mdx: markdown,
16
14
  // twig: buttonTwig,
17
15
  },
18
16
  };
19
17
 
20
- // export default {
21
- // title: "Components/UI Elements/Button",
22
- // component: Button,
23
- // markdown: "hello",
24
- // parameters: {
25
- // componentSubtitle: "Component",
26
- // status: "released",
27
- // mdx: markdown,
28
- // // twig: buttonTwig,
29
- // },
30
- // };
31
-
32
18
  export default meta;
33
19
  type Story = StoryObj<typeof Button>;
34
20
 
35
- //export const ButtonDefault = (args) => <Button {...args}>Default</Button>;
36
-
37
21
  export const ButtonDefault: Story = {
38
22
  render: (args) => <Button {...args} />,
39
23
  args: {
@@ -18,7 +18,6 @@ interface ButtonBaseProps {
18
18
  * Specify whether the Button should be a large variant
19
19
  */
20
20
  large?: boolean;
21
-
22
21
  /**
23
22
  * Specify btnSolid to buttons on solid background to make it stand out
24
23
  */
@@ -31,7 +30,6 @@ interface ButtonBaseProps {
31
30
  * Optionally specify an href for your Button to become an element
32
31
  */
33
32
  href?: string;
34
- //target?: string; // TODO: Remove " "
35
33
  /**
36
34
  * Specify an `icon` to include in the Button through an object representing the SVG data of the icon, similar to the `Icon` component @design
37
35
  */
@@ -40,7 +38,9 @@ interface ButtonBaseProps {
40
38
  * Optionally specify an href for your Button to become an element @design
41
39
  */
42
40
  iconReverse?: boolean;
43
- // todo: revise iconDescription
41
+ /**
42
+ * Icon description for accessibility
43
+ */
44
44
  iconDescription?: string;
45
45
  /**
46
46
  * Specify whether the Button should be disabled, or not
@@ -51,7 +51,6 @@ interface ButtonBaseProps {
51
51
  */
52
52
  tabIndex?: number;
53
53
  target?: React.AnchorHTMLAttributes<HTMLAnchorElement>["target"];
54
- // type?: 'button' | 'reset' | 'submit';
55
54
  useFlexbox?: boolean;
56
55
  id?: string;
57
56
  }
@@ -69,8 +68,8 @@ type ConditionalProps<T> = T extends { href: string }
69
68
  : ButtonButtonProps;
70
69
 
71
70
  /**
72
- * Buttons express what action will occur when the user clicks or touches it. Buttons are used to initialize an action, either in the background or foreground of an experience. */
73
-
71
+ * Buttons express what action will occur when the user clicks or touches it. Buttons are used to initialize an action, either in the background or foreground of an experience.
72
+ */
74
73
  export type ButtonRef<T extends React.ElementType> =
75
74
  React.ComponentPropsWithRef<T>["ref"];
76
75
 
@@ -78,8 +77,8 @@ export const Button = React.forwardRef(
78
77
  <T extends { href?: string }>(
79
78
  props: ConditionalProps<T>,
80
79
  ref: React.Ref<
81
- T extends { href: string } ? HTMLLinkElement : HTMLButtonElement
82
- >
80
+ T extends { href: string } ? HTMLAnchorElement : HTMLButtonElement
81
+ >,
83
82
  ) => {
84
83
  const {
85
84
  children,
@@ -92,6 +91,7 @@ export const Button = React.forwardRef(
92
91
  iconReverse,
93
92
  tabIndex,
94
93
  useFlexbox,
94
+ // Set the default to "button"
95
95
  type = "button",
96
96
  icon,
97
97
  iconDescription,
@@ -144,7 +144,9 @@ export const Button = React.forwardRef(
144
144
  setCount(false);
145
145
  };
146
146
 
147
- const onClickAnimation = (e) => {
147
+ const onClickAnimation = (
148
+ e: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>,
149
+ ) => {
148
150
  if (onClick) {
149
151
  onClick(e);
150
152
  }
@@ -183,7 +185,8 @@ export const Button = React.forwardRef(
183
185
  {...buttonProps}
184
186
  {...commonProps}
185
187
  disabled={disabled}
186
- type={type}
188
+ // Cast the type prop to the allowed union
189
+ type={type as "button" | "reset" | "submit"}
187
190
  onClick={onClickAnimation}
188
191
  ref={ref as React.Ref<HTMLButtonElement>}
189
192
  id={id}
@@ -193,7 +196,7 @@ export const Button = React.forwardRef(
193
196
  {!iconReverse && buttonImage}
194
197
  </button>
195
198
  );
196
- }
199
+ },
197
200
  );
198
201
 
199
202
  Button.displayName = "Button";
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import markdown from "./README.mdx";
3
2
  import { ContextMenu, ContextMenuGroup, ContextMenuItem } from "./ContextMenu";
4
3
  import Link from "../Link";
5
4
 
@@ -9,7 +8,6 @@ export default {
9
8
  parameters: {
10
9
  componentSubtitle: "Component",
11
10
  status: "released",
12
- mdx: markdown,
13
11
  },
14
12
  };
15
13
 
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import markdown from "./README.mdx";
3
3
  import Empty from "./Empty";
4
4
  import Button from "../Button";
5
- //import { IllustrationsMovingVanWithBackground } from '@progressiveui/pictograms-react';
6
5
 
7
6
  export default {
8
7
  title: "Components/UI Elements/Empty",
@@ -32,7 +31,7 @@ EmptyDefault.args = {
32
31
 
33
32
  const emptysourcecode = `
34
33
  import { Empty, Button } from "@progressiveui/react";
35
- import { IllustrationsMovingVanWithBackground } from '@progressiveui/pictograms-react';
34
+
36
35
 
37
36
  <Empty
38
37
  button={<Button kind="accent">New entry</Button>}
@@ -3,10 +3,6 @@ import classNames from "classnames";
3
3
  import Link from "../Link";
4
4
  import Wrapper from "../Wrapper";
5
5
  import { ScreenSize } from "../../utils";
6
- import {
7
- WfpLogoStandardBlackEn,
8
- WfpLogoVerticalEn,
9
- } from "@progressiveui/icons-react";
10
6
  import useSettings from "../../hooks/useSettings";
11
7
 
12
8
  /** A Footer is a section at the bottom of each page. It typically contains basic site information, copyright data or links to related pages. */
@@ -28,18 +24,11 @@ interface FooterProps extends React.HTMLAttributes<HTMLDivElement> {
28
24
  Optional WFP logo for mobile devices, can be used if the Logo should be provided by the CDN
29
25
  */
30
26
  logo?: string | React.ReactNode;
31
- /**
32
- Optional WFP logo for desktop devices, can be used if the Logo should be provided by the CDN
33
- */
34
- logoExtended?: string | React.ReactNode;
35
27
  /**
36
28
  * Specify the max-width on desktop devices (same as \`Wrapper\` component)
37
29
  */
38
30
  pageWidth?: ScreenSize;
39
- /**
40
- Override the SDG icon
41
- */
42
- sdgLogo?: React.ReactNode;
31
+
43
32
  /**
44
33
  The WFP logo, can be used if the SDG logo should be provided in a different way
45
34
  */
@@ -63,7 +52,6 @@ const Footer: React.FC<FooterProps> = ({
63
52
  linkTextTwo,
64
53
  linkHrefTwo,
65
54
  logo,
66
- logoExtended,
67
55
  metaContent,
68
56
  metaLinks,
69
57
  secondary,
@@ -101,35 +89,7 @@ const Footer: React.FC<FooterProps> = ({
101
89
  </div>
102
90
  )}
103
91
  <div className={`${prefix}--footer__cta`}>
104
- {logoExtended && typeof logoExtended === "string" ? (
105
- <img
106
- className={`${prefix}--footer__cta-logo`}
107
- src={logoExtended}
108
- alt="World Food Programme Logo"
109
- />
110
- ) : logoExtended ? (
111
- logoExtended
112
- ) : (
113
- <WfpLogoStandardBlackEn
114
- className={`${prefix}--footer__cta-logo`}
115
- alt="WFP"
116
- />
117
- )}
118
-
119
- {logo && typeof logo === "string" ? (
120
- <img
121
- className={`${prefix}--footer__cta-logo-small`}
122
- src={logo}
123
- alt="WFP Logo"
124
- />
125
- ) : logo ? (
126
- logo
127
- ) : (
128
- <WfpLogoVerticalEn
129
- description="WFP"
130
- className={`${prefix}--footer__cta-logo-small`}
131
- />
132
- )}
92
+ {logo}
133
93
  {secondary && (
134
94
  <div className={`${prefix}--footer__secondary`}>{secondary}</div>
135
95
  )}
@@ -2,7 +2,6 @@ import * as React from "react";
2
2
  import Wrapper from "../Wrapper";
3
3
  import type { PropsWithChildren } from "react";
4
4
  import classNames from "classnames";
5
- import { WfpLogoVerticalEn } from "@progressiveui/icons-react";
6
5
  import {
7
6
  LinkedIn,
8
7
  Facebook,
@@ -40,10 +39,6 @@ const FooterExternal: React.FC<FooterExternalProps> = ({
40
39
  <div className={`${prefix}--footer-ext__content`}>
41
40
  <div className={`${prefix}--footer-ext__info`}>
42
41
  <div className={`${prefix}--footer-ext__branding`}>
43
- <WfpLogoVerticalEn
44
- alt="WFP"
45
- className={`${prefix}--footer-ext__logo`}
46
- />
47
42
  <div className={`${prefix}--footer-ext__product-name`}>
48
43
  {productName}
49
44
  </div>
@@ -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";
@@ -4,7 +4,6 @@ import markdown from "./README.mdx";
4
4
 
5
5
  import { Hero, HeroExternal } from ".";
6
6
  import Button from "../Button";
7
- import { WfpHumEmergencyResponsePos } from "@progressiveui/pictograms-react";
8
7
  //import heroTwig from './Hero.twig';
9
8
 
10
9
  export default {
@@ -240,7 +239,6 @@ Emergencies.args = {
240
239
  ...Regular.args,
241
240
  title: (
242
241
  <>
243
- <WfpHumEmergencyResponsePos fill="#FFF" style={{ marginRight: "1rem" }} />
244
242
  <span>
245
243
  Curabitur ullamcorper ultricies nisi. Proin magna.{" "}
246
244
  <a>Etiam iaculis nunc ac metus</a>
@@ -238,6 +238,7 @@ const Input: React.FC<PropsWithChildren<InputPropsI>> = ({
238
238
  // iconDescription,
239
239
  id,
240
240
  className,
241
+
241
242
  inputWrapperClassName,
242
243
  //placeholder,
243
244
  //type,
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-empty-function */
2
- import React from 'react';
3
- import classNames from 'classnames';
4
- import useSettings from '../../hooks/useSettings';
2
+ import React from "react";
3
+ import classNames from "classnames";
4
+ import useSettings from "../../hooks/useSettings";
5
5
 
6
6
  export interface UseInputProps {
7
7
  /**
@@ -108,10 +108,10 @@ export interface UseInputProps {
108
108
  export const useInput = ({
109
109
  addonAfter,
110
110
  className,
111
- inputClassName = 'wfp--input',
111
+ inputClassName = "wfp--input",
112
112
  id,
113
113
  placeholder,
114
- type = 'text',
114
+ type = "text",
115
115
  onChange = () => {},
116
116
  onClick = () => {},
117
117
  hideLabel,
@@ -155,6 +155,9 @@ export const useInput = ({
155
155
  };
156
156
 
157
157
  const wrapperProps = {
158
+ calculatedId,
159
+ id,
160
+ name,
158
161
  className,
159
162
  addonAfter,
160
163
  labelText,
@@ -164,7 +167,7 @@ export const useInput = ({
164
167
  invalidText,
165
168
  };
166
169
 
167
- const errorId = calculatedId + '-error-msg';
170
+ const errorId = calculatedId + "-error-msg";
168
171
 
169
172
  /*const labelClasses = classNames(`${prefix}--label`, {
170
173
  [`${prefix}--visually-hidden`]: hideLabel || !labelText,
@@ -179,9 +182,9 @@ export const useInput = ({
179
182
  );*/
180
183
 
181
184
  if (invalid) {
182
- inputProps['data-invalid'] = true;
183
- inputProps['aria-invalid'] = true;
184
- inputProps['aria-describedby'] = errorId;
185
+ inputProps["data-invalid"] = true;
186
+ inputProps["aria-invalid"] = true;
187
+ inputProps["aria-describedby"] = errorId;
185
188
  }
186
189
  return { inputProps, wrapperProps };
187
190
  };
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- //import markdown from './README.mdx';
3
2
  import { action } from "@storybook/addon-actions";
4
- import { MainNavigation, MainNavigationExternal } from ".";
3
+ import { MainNavigation } from ".";
5
4
  import MainNavigationItem from "../MainNavigationItem";
6
5
 
7
6
  import {
@@ -23,7 +22,6 @@ import User from "../User";
23
22
  export default {
24
23
  title: "Components/Navigation/MainNavigation",
25
24
  component: MainNavigation,
26
- subcomponents: { MainNavigationExternal },
27
25
  parameters: {
28
26
  componentSubtitle: "Component",
29
27
  status: "released",
@@ -183,7 +181,6 @@ You can customize the content by using \`MainNavigation\`.
183
181
  const sourcecode = (type) => {
184
182
  return `import { Button,User, Search } from "@progressiveui/react";
185
183
  import {
186
- MainNavigationExternal,
187
184
  MainNavigationItem,
188
185
  SubNavigation,
189
186
  SubNavigationHeader,