@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.
- package/.storybook/WfpTheme.js +1 -1
- package/.storybook/main.ts +4 -4
- package/.storybook/preview.tsx +0 -25
- package/es/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
- package/es/dist/components/Footer/Footer.d.ts +0 -8
- package/es/dist/components/Footer/index.d.ts +2 -2
- package/es/dist/components/Input/useInput.d.ts +4 -1
- package/es/dist/components/MainNavigation/index.d.ts +3 -4
- package/es/dist/hooks/useHeightTransition.d.ts +1 -1
- package/es/dist/index.d.ts +1 -1
- package/es/index.js +235 -1318
- package/lib/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
- package/lib/dist/components/Footer/Footer.d.ts +0 -8
- package/lib/dist/components/Footer/index.d.ts +2 -2
- package/lib/dist/components/Input/useInput.d.ts +4 -1
- package/lib/dist/components/MainNavigation/index.d.ts +3 -4
- package/lib/dist/hooks/useHeightTransition.d.ts +1 -1
- package/lib/dist/index.d.ts +1 -1
- package/lib/index.js +260 -1355
- package/package.json +68 -78
- package/src/components/Accordion/hooks/useAccordion.ts +13 -9
- package/src/components/BannerNavigation/BannerNavigation.stories.tsx +0 -2
- package/src/components/Button/Button.stories.tsx +0 -16
- package/src/components/Button/Button.tsx +14 -11
- package/src/components/ContextMenu/ContextMenu.stories.tsx +0 -2
- package/src/components/Empty/Empty.stories.tsx +1 -2
- package/src/components/Footer/Footer.tsx +2 -42
- package/src/components/Footer/FooterExternal.tsx +0 -5
- package/src/components/Footer/index.ts +2 -2
- package/src/components/Hero/Hero.stories.tsx +0 -2
- package/src/components/Input/Input.tsx +1 -0
- package/src/components/Input/useInput.tsx +12 -9
- package/src/components/MainNavigation/MainNavigation.stories.tsx +1 -4
- package/src/components/MainNavigation/MainNavigation.tsx +1 -23
- package/src/components/MainNavigation/index.ts +3 -4
- package/src/components/Pagination/Pagination.stories.tsx +0 -2
- package/src/components/Search/Search.tsx +1 -1
- package/src/components/Text/Text.tsx +7 -4
- package/src/components/Toggle/Toggle.tsx +4 -4
- package/src/index.ts +0 -1
- package/umd/dist/components/Accordion/hooks/useAccordionItemEffect.d.ts +1 -1
- package/umd/dist/components/Footer/Footer.d.ts +0 -8
- package/umd/dist/components/Footer/index.d.ts +2 -2
- package/umd/dist/components/Input/useInput.d.ts +4 -1
- package/umd/dist/components/MainNavigation/index.d.ts +3 -4
- package/umd/dist/hooks/useHeightTransition.d.ts +1 -1
- package/umd/dist/index.d.ts +1 -1
- package/umd/index.js +235 -1318
- package/umd/index.min.js +1 -1
- package/src/components/MainNavigation/MainNavigationExternal.tsx +0 -338
package/.storybook/WfpTheme.js
CHANGED
package/.storybook/main.ts
CHANGED
|
@@ -6,13 +6,13 @@ const config: StorybookConfig = {
|
|
|
6
6
|
stories: ["../src/**/*stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
|
|
7
7
|
core: {},
|
|
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
|
framework: {
|
|
14
14
|
name: getAbsolutePath("@storybook/react-vite"),
|
|
15
|
-
options: {}
|
|
15
|
+
options: {},
|
|
16
16
|
},
|
|
17
17
|
/*
|
|
18
18
|
typescript: {
|
package/.storybook/preview.tsx
CHANGED
|
@@ -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
|
|
2
|
-
export { FooterExternal, LinksColumn, FooterMetaLink } from
|
|
1
|
+
export { default as Footer } from "./Footer";
|
|
2
|
+
export { FooterExternal, LinksColumn, FooterMetaLink } from "./FooterExternal";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from "react";
|
|
2
2
|
export interface UseInputProps {
|
|
3
3
|
/**
|
|
4
4
|
* Specify an optional className to be applied to the <input> node
|
|
@@ -111,6 +111,9 @@ export declare const useInput: ({ addonAfter, className, inputClassName, id, pla
|
|
|
111
111
|
className: string;
|
|
112
112
|
};
|
|
113
113
|
wrapperProps: {
|
|
114
|
+
calculatedId: string | undefined;
|
|
115
|
+
id: string | undefined;
|
|
116
|
+
name: string | undefined;
|
|
114
117
|
className: string | undefined;
|
|
115
118
|
addonAfter: React.ReactNode;
|
|
116
119
|
labelText: React.ReactNode;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { default as MainNavigation } from
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as
|
|
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 };
|
package/es/dist/index.d.ts
CHANGED
|
@@ -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,
|
|
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";
|