@ebrains/react 0.0.1-alpha.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/package.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@ebrains/react",
3
+ "version": "0.0.1-alpha.0",
4
+ "module": "./index.esm.js",
5
+ "type": "module",
6
+ "main": "./index.esm.js",
7
+ "types": "./index.esm.d.ts"
8
+ }
@@ -0,0 +1,38 @@
1
+ import type { JSX } from '@ebrains/components';
2
+ export declare const EdsAccordion: import("react").ForwardRefExoticComponent<JSX.EdsAccordion & Omit<import("react").HTMLAttributes<HTMLEdsAccordionElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsAccordionElement>>;
3
+ export declare const EdsAlert: import("react").ForwardRefExoticComponent<JSX.EdsAlert & Omit<import("react").HTMLAttributes<HTMLEdsAlertElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsAlertElement>>;
4
+ export declare const EdsAvatar: import("react").ForwardRefExoticComponent<JSX.EdsAvatar & Omit<import("react").HTMLAttributes<HTMLEdsAvatarElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsAvatarElement>>;
5
+ export declare const EdsBlockBreak: import("react").ForwardRefExoticComponent<JSX.EdsBlockBreak & Omit<import("react").HTMLAttributes<HTMLEdsBlockBreakElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsBlockBreakElement>>;
6
+ export declare const EdsBreadcrumb: import("react").ForwardRefExoticComponent<JSX.EdsBreadcrumb & Omit<import("react").HTMLAttributes<HTMLEdsBreadcrumbElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsBreadcrumbElement>>;
7
+ export declare const EdsButton: import("react").ForwardRefExoticComponent<JSX.EdsButton & Omit<import("react").HTMLAttributes<HTMLEdsButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsButtonElement>>;
8
+ export declare const EdsCardDesc: import("react").ForwardRefExoticComponent<JSX.EdsCardDesc & Omit<import("react").HTMLAttributes<HTMLEdsCardDescElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsCardDescElement>>;
9
+ export declare const EdsCardGeneric: import("react").ForwardRefExoticComponent<JSX.EdsCardGeneric & Omit<import("react").HTMLAttributes<HTMLEdsCardGenericElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsCardGenericElement>>;
10
+ export declare const EdsCardSection: import("react").ForwardRefExoticComponent<JSX.EdsCardSection & Omit<import("react").HTMLAttributes<HTMLEdsCardSectionElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsCardSectionElement>>;
11
+ export declare const EdsCodeBlock: import("react").ForwardRefExoticComponent<JSX.EdsCodeBlock & Omit<import("react").HTMLAttributes<HTMLEdsCodeBlockElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsCodeBlockElement>>;
12
+ export declare const EdsDropdown: import("react").ForwardRefExoticComponent<JSX.EdsDropdown & Omit<import("react").HTMLAttributes<HTMLEdsDropdownElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsDropdownElement>>;
13
+ export declare const EdsFooter: import("react").ForwardRefExoticComponent<JSX.EdsFooter & Omit<import("react").HTMLAttributes<HTMLEdsFooterElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsFooterElement>>;
14
+ export declare const EdsForm: import("react").ForwardRefExoticComponent<JSX.EdsForm & Omit<import("react").HTMLAttributes<HTMLEdsFormElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsFormElement>>;
15
+ export declare const EdsFrame: import("react").ForwardRefExoticComponent<JSX.EdsFrame & Omit<import("react").HTMLAttributes<HTMLEdsFrameElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsFrameElement>>;
16
+ export declare const EdsFullscreenMenu: import("react").ForwardRefExoticComponent<JSX.EdsFullscreenMenu & Omit<import("react").HTMLAttributes<HTMLEdsFullscreenMenuElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsFullscreenMenuElement>>;
17
+ export declare const EdsHeader: import("react").ForwardRefExoticComponent<JSX.EdsHeader & Omit<import("react").HTMLAttributes<HTMLEdsHeaderElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsHeaderElement>>;
18
+ export declare const EdsIconWrapper: import("react").ForwardRefExoticComponent<JSX.EdsIconWrapper & Omit<import("react").HTMLAttributes<HTMLEdsIconWrapperElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsIconWrapperElement>>;
19
+ export declare const EdsImg: import("react").ForwardRefExoticComponent<JSX.EdsImg & Omit<import("react").HTMLAttributes<HTMLEdsImgElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsImgElement>>;
20
+ export declare const EdsInputField: import("react").ForwardRefExoticComponent<JSX.EdsInputField & Omit<import("react").HTMLAttributes<HTMLEdsInputFieldElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsInputFieldElement>>;
21
+ export declare const EdsLink: import("react").ForwardRefExoticComponent<JSX.EdsLink & Omit<import("react").HTMLAttributes<HTMLEdsLinkElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsLinkElement>>;
22
+ export declare const EdsLogin: import("react").ForwardRefExoticComponent<JSX.EdsLogin & Omit<import("react").HTMLAttributes<HTMLEdsLoginElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsLoginElement>>;
23
+ export declare const EdsLogo: import("react").ForwardRefExoticComponent<JSX.EdsLogo & Omit<import("react").HTMLAttributes<HTMLEdsLogoElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsLogoElement>>;
24
+ export declare const EdsMatomoNotice: import("react").ForwardRefExoticComponent<JSX.EdsMatomoNotice & Omit<import("react").HTMLAttributes<HTMLEdsMatomoNoticeElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsMatomoNoticeElement>>;
25
+ export declare const EdsModal: import("react").ForwardRefExoticComponent<JSX.EdsModal & Omit<import("react").HTMLAttributes<HTMLEdsModalElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsModalElement>>;
26
+ export declare const EdsPagination: import("react").ForwardRefExoticComponent<JSX.EdsPagination & Omit<import("react").HTMLAttributes<HTMLEdsPaginationElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsPaginationElement>>;
27
+ export declare const EdsProgressBar: import("react").ForwardRefExoticComponent<JSX.EdsProgressBar & Omit<import("react").HTMLAttributes<HTMLEdsProgressBarElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsProgressBarElement>>;
28
+ export declare const EdsRating: import("react").ForwardRefExoticComponent<JSX.EdsRating & Omit<import("react").HTMLAttributes<HTMLEdsRatingElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsRatingElement>>;
29
+ export declare const EdsSectionCore: import("react").ForwardRefExoticComponent<JSX.EdsSectionCore & Omit<import("react").HTMLAttributes<HTMLEdsSectionCoreElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsSectionCoreElement>>;
30
+ export declare const EdsSectionHeading: import("react").ForwardRefExoticComponent<JSX.EdsSectionHeading & Omit<import("react").HTMLAttributes<HTMLEdsSectionHeadingElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsSectionHeadingElement>>;
31
+ export declare const EdsSocialNetworks: import("react").ForwardRefExoticComponent<JSX.EdsSocialNetworks & Omit<import("react").HTMLAttributes<HTMLEdsSocialNetworksElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsSocialNetworksElement>>;
32
+ export declare const EdsTable: import("react").ForwardRefExoticComponent<JSX.EdsTable & Omit<import("react").HTMLAttributes<HTMLEdsTableElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsTableElement>>;
33
+ export declare const EdsTabs: import("react").ForwardRefExoticComponent<JSX.EdsTabs & Omit<import("react").HTMLAttributes<HTMLEdsTabsElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsTabsElement>>;
34
+ export declare const EdsTag: import("react").ForwardRefExoticComponent<JSX.EdsTag & Omit<import("react").HTMLAttributes<HTMLEdsTagElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsTagElement>>;
35
+ export declare const EdsToast: import("react").ForwardRefExoticComponent<JSX.EdsToast & Omit<import("react").HTMLAttributes<HTMLEdsToastElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsToastElement>>;
36
+ export declare const EdsToastManager: import("react").ForwardRefExoticComponent<JSX.EdsToastManager & Omit<import("react").HTMLAttributes<HTMLEdsToastManagerElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsToastManagerElement>>;
37
+ export declare const EdsTooltip: import("react").ForwardRefExoticComponent<JSX.EdsTooltip & Omit<import("react").HTMLAttributes<HTMLEdsTooltipElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsTooltipElement>>;
38
+ export declare const EdsUser: import("react").ForwardRefExoticComponent<JSX.EdsUser & Omit<import("react").HTMLAttributes<HTMLEdsUserElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEdsUserElement>>;
@@ -0,0 +1,16 @@
1
+ export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
2
+ export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
3
+ /**
4
+ * Transforms a React event name to a browser event name.
5
+ */
6
+ export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
+ /**
8
+ * Checks if an event is supported in the current execution environment.
9
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
+ */
11
+ export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
+ export declare const syncEvent: (node: Element & {
13
+ __events?: {
14
+ [key: string]: ((e: Event) => any) | undefined;
15
+ };
16
+ }, eventName: string, newEventHandler?: (e: Event) => any) => void;
@@ -0,0 +1,2 @@
1
+ export declare const dashToPascalCase: (str: string) => string;
2
+ export declare const camelToDashCase: (str: string) => string;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface HTMLStencilElement extends HTMLElement {
3
+ componentOnReady(): Promise<this>;
4
+ }
5
+ interface StencilReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
6
+ forwardedRef: React.RefObject<ElementType>;
7
+ ref?: React.Ref<any>;
8
+ }
9
+ export declare const createReactComponent: <PropType, ElementType extends HTMLStencilElement, ContextStateType = {}, ExpandedPropsTypes = {}>(tagName: string, ReactComponentContext?: React.Context<ContextStateType>, manipulatePropsFunction?: (originalProps: StencilReactInternalProps<ElementType>, propsToPass: any) => ExpandedPropsTypes, defineCustomElement?: () => void) => React.ForwardRefExoticComponent<React.PropsWithoutRef<import("./utils").StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
10
+ export {};
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { OverlayEventDetail } from './interfaces';
3
+ import { StencilReactForwardedRef } from './utils';
4
+ interface OverlayElement extends HTMLElement {
5
+ present: () => Promise<void>;
6
+ dismiss: (data?: any, role?: string | undefined) => Promise<boolean>;
7
+ }
8
+ export interface ReactOverlayProps {
9
+ children?: React.ReactNode;
10
+ isOpen: boolean;
11
+ onDidDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
12
+ onDidPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
13
+ onWillDismiss?: (event: CustomEvent<OverlayEventDetail>) => void;
14
+ onWillPresent?: (event: CustomEvent<OverlayEventDetail>) => void;
15
+ }
16
+ export declare const createOverlayComponent: <OverlayComponent extends object, OverlayType extends OverlayElement>(tagName: string, controller: {
17
+ create: (options: any) => Promise<OverlayType>;
18
+ }, customElement?: any) => React.ForwardRefExoticComponent<React.PropsWithoutRef<OverlayComponent & ReactOverlayProps & {
19
+ forwardedRef?: StencilReactForwardedRef<OverlayType>;
20
+ }> & React.RefAttributes<OverlayType>>;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const isDevMode: () => boolean;
2
+ export declare const deprecationWarning: (key: string, message: string) => void;
@@ -0,0 +1,2 @@
1
+ export { createReactComponent } from './createComponent';
2
+ export { createOverlayComponent } from './createOverlayComponent';
@@ -0,0 +1,29 @@
1
+ export interface EventEmitter<T = any> {
2
+ emit: (data?: T) => CustomEvent<T>;
3
+ }
4
+ export interface StyleReactProps {
5
+ class?: string;
6
+ className?: string;
7
+ style?: {
8
+ [key: string]: any;
9
+ };
10
+ }
11
+ export interface OverlayEventDetail<T = any> {
12
+ data?: T;
13
+ role?: string;
14
+ }
15
+ export interface OverlayInterface {
16
+ el: HTMLElement;
17
+ animated: boolean;
18
+ keyboardClose: boolean;
19
+ overlayIndex: number;
20
+ presented: boolean;
21
+ enterAnimation?: any;
22
+ leaveAnimation?: any;
23
+ didPresent: EventEmitter<void>;
24
+ willPresent: EventEmitter<void>;
25
+ willDismiss: EventEmitter<OverlayEventDetail>;
26
+ didDismiss: EventEmitter<OverlayEventDetail>;
27
+ present(): Promise<void>;
28
+ dismiss(data?: any, role?: string): Promise<boolean>;
29
+ }
@@ -0,0 +1,16 @@
1
+ export declare const attachProps: (node: HTMLElement, newProps: any, oldProps?: any) => void;
2
+ export declare const getClassName: (classList: DOMTokenList, newProps: any, oldProps: any) => string;
3
+ /**
4
+ * Transforms a React event name to a browser event name.
5
+ */
6
+ export declare const transformReactEventName: (eventNameSuffix: string) => string;
7
+ /**
8
+ * Checks if an event is supported in the current execution environment.
9
+ * @license Modernizr 3.0.0pre (Custom Build) | MIT
10
+ */
11
+ export declare const isCoveredByReact: (eventNameSuffix: string) => boolean;
12
+ export declare const syncEvent: (node: Element & {
13
+ __events?: {
14
+ [key: string]: ((e: Event) => any) | undefined;
15
+ };
16
+ }, eventName: string, newEventHandler?: (e: Event) => any) => void;
@@ -0,0 +1,2 @@
1
+ export declare const dashToPascalCase: (str: string) => string;
2
+ export declare const camelToDashCase: (str: string) => string;
@@ -0,0 +1,2 @@
1
+ export declare const isDevMode: () => boolean;
2
+ export declare const deprecationWarning: (key: string, message: string) => void;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { StyleReactProps } from '../interfaces';
3
+ export type StencilReactExternalProps<PropType, ElementType> = PropType & Omit<React.HTMLAttributes<ElementType>, 'style'> & StyleReactProps;
4
+ export type StencilReactForwardedRef<T> = ((instance: T | null) => void) | React.MutableRefObject<T | null> | null;
5
+ export declare const setRef: (ref: StencilReactForwardedRef<any> | React.Ref<any> | undefined, value: any) => void;
6
+ export declare const mergeRefs: (...refs: (StencilReactForwardedRef<any> | React.Ref<any> | undefined)[]) => React.RefCallback<any>;
7
+ export declare const createForwardRef: <PropType, ElementType>(ReactComponent: any, displayName: string) => React.ForwardRefExoticComponent<React.PropsWithoutRef<StencilReactExternalProps<PropType, ElementType>> & React.RefAttributes<ElementType>>;
8
+ export declare const defineCustomElement: (tagName: string, customElement: any) => void;
9
+ export * from './attachProps';
10
+ export * from './case';
package/src/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './generated/components';