@progressiveui/react 1.22.1 → 2.0.1

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 +10 -7
  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 +69 -79
  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
@@ -8,7 +8,7 @@ export default create({
8
8
  fontBase: '"Open Sans", sans-serif',
9
9
  fontCode: "monospace",
10
10
 
11
- brandTitle: "WFP Design System",
11
+ brandTitle: "Progressive UI",
12
12
  brandUrl: "https://www.designsystem.wfp.org/",
13
13
  brandTarget: "_self",
14
14
 
@@ -4,16 +4,18 @@ import { addons } from "@storybook/manager-api";
4
4
 
5
5
  const config: StorybookConfig = {
6
6
  stories: ["../src/**/*stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
7
- core: {},
7
+
8
8
  addons: [
9
- getAbsolutePath("@storybook/blocks"),
10
- getAbsolutePath("@storybook/addon-links"),
11
- getAbsolutePath("@storybook/addon-essentials"),
9
+ //getAbsolutePath("@storybook/blocks"),
10
+ //getAbsolutePath("@storybook/addon-links"),
11
+ //getAbsolutePath("@storybook/addon-essentials"),
12
12
  ],
13
+
13
14
  framework: {
14
- name: getAbsolutePath("@storybook/react-vite"),
15
- options: {}
15
+ name: "@storybook/react-vite",
16
+ options: {},
16
17
  },
18
+
17
19
  /*
18
20
  typescript: {
19
21
  check: false,
@@ -38,5 +40,6 @@ addons.setConfig({
38
40
  export default config;
39
41
 
40
42
  function getAbsolutePath(value: string): any {
41
- return dirname(require.resolve(join(value, "package.json")));
43
+ return null;
44
+ //return dirname(require.resolve(join(value, "package.json")));
42
45
  }
@@ -22,31 +22,6 @@ export const parameters = {
22
22
  },
23
23
  };
24
24
 
25
- /*
26
- export const globalTypes = {
27
- theme: {
28
- title: 'Theme',
29
- description: 'Global theme for components',
30
- defaultValue: 'light',
31
- toolbar: {
32
- icon: 'circlehollow',
33
- items: ['light', 'dark'],
34
- },
35
- },
36
- locale: {
37
- title: 'Locale',
38
- description: 'Internationalization locale',
39
- defaultValue: 'en',
40
- toolbar: {
41
- icon: 'globe',
42
- items: [
43
- { value: 'ltr', title: 'left-to-right' },
44
- { value: 'rtl', title: 'right-to-left' },
45
- ],
46
- },
47
- },
48
- };*/
49
-
50
25
  const withThemeProvider = (Story, context) => {
51
26
  const { locale, theme } = context.globals;
52
27
  document.body.classList.remove(
@@ -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";