@equinor/eds-core-react 0.14.0-dev.20210930
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/LICENSE +21 -0
- package/README.md +99 -0
- package/dist/core-react.cjs.js +18695 -0
- package/dist/core-react.esm.js +18625 -0
- package/dist/core-react.umd.js +18697 -0
- package/dist/types/components/Accordion/Accordion.d.ts +4 -0
- package/dist/types/components/Accordion/Accordion.tokens.d.ts +9 -0
- package/dist/types/components/Accordion/Accordion.types.d.ts +6 -0
- package/dist/types/components/Accordion/AccordionHeader.d.ts +35 -0
- package/dist/types/components/Accordion/AccordionHeaderTitle.d.ts +14 -0
- package/dist/types/components/Accordion/AccordionItem.d.ts +19 -0
- package/dist/types/components/Accordion/AccordionPanel.d.ts +18 -0
- package/dist/types/components/Accordion/index.d.ts +15 -0
- package/dist/types/components/Avatar/Avatar.d.ts +23 -0
- package/dist/types/components/Avatar/Avatar.tokens.d.ts +10 -0
- package/dist/types/components/Avatar/index.d.ts +1 -0
- package/dist/types/components/Banner/Banner.d.ts +7 -0
- package/dist/types/components/Banner/Banner.tokens.d.ts +9 -0
- package/dist/types/components/Banner/BannerActions.d.ts +11 -0
- package/dist/types/components/Banner/BannerIcon.d.ts +15 -0
- package/dist/types/components/Banner/BannerMessage.d.ts +10 -0
- package/dist/types/components/Banner/index.d.ts +12 -0
- package/dist/types/components/Breadcrumbs/Breadcrumb.d.ts +11 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.d.ts +11 -0
- package/dist/types/components/Breadcrumbs/Breadcrumbs.tokens.d.ts +2 -0
- package/dist/types/components/Breadcrumbs/index.d.ts +8 -0
- package/dist/types/components/Button/Button.d.ts +43 -0
- package/dist/types/components/Button/Button.types.d.ts +12 -0
- package/dist/types/components/Button/InnerFullWidth.d.ts +2 -0
- package/dist/types/components/Button/index.d.ts +1 -0
- package/dist/types/components/Button/tokens/button.d.ts +2 -0
- package/dist/types/components/Button/tokens/contained.d.ts +4 -0
- package/dist/types/components/Button/tokens/ghost.d.ts +4 -0
- package/dist/types/components/Button/tokens/icon.d.ts +4 -0
- package/dist/types/components/Button/tokens/index.d.ts +8 -0
- package/dist/types/components/Button/tokens/outlined.d.ts +4 -0
- package/dist/types/components/Card/Card.d.ts +9 -0
- package/dist/types/components/Card/Card.tokens.d.ts +6 -0
- package/dist/types/components/Card/CardActions.d.ts +13 -0
- package/dist/types/components/Card/CardHeader.d.ts +3 -0
- package/dist/types/components/Card/CardHeaderTitle.d.ts +3 -0
- package/dist/types/components/Card/CardMedia.d.ts +9 -0
- package/dist/types/components/Card/index.d.ts +14 -0
- package/dist/types/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/types/components/Checkbox/Checkbox.tokens.d.ts +4 -0
- package/dist/types/components/Checkbox/Input.d.ts +12 -0
- package/dist/types/components/Checkbox/index.d.ts +1 -0
- package/dist/types/components/Chip/Chip.d.ts +17 -0
- package/dist/types/components/Chip/Chip.tokens.d.ts +8 -0
- package/dist/types/components/Chip/Icon.d.ts +6 -0
- package/dist/types/components/Chip/index.d.ts +1 -0
- package/dist/types/components/Combobox/Combobox.d.ts +55 -0
- package/dist/types/components/Combobox/Combobox.tokens.d.ts +3 -0
- package/dist/types/components/Combobox/index.d.ts +1 -0
- package/dist/types/components/Dialog/Actions.d.ts +3 -0
- package/dist/types/components/Dialog/CustomContent.d.ts +9 -0
- package/dist/types/components/Dialog/Dialog.d.ts +3 -0
- package/dist/types/components/Dialog/Dialog.tokens.d.ts +4 -0
- package/dist/types/components/Dialog/Title.d.ts +3 -0
- package/dist/types/components/Dialog/index.d.ts +12 -0
- package/dist/types/components/Divider/Divider.d.ts +17 -0
- package/dist/types/components/Divider/Divider.tokens.d.ts +12 -0
- package/dist/types/components/Divider/index.d.ts +1 -0
- package/dist/types/components/EdsProvider/eds.context.d.ts +15 -0
- package/dist/types/components/EdsProvider/index.d.ts +1 -0
- package/dist/types/components/Icon/Icon.d.ts +20 -0
- package/dist/types/components/Icon/Icon.types.d.ts +11 -0
- package/dist/types/components/Icon/index.d.ts +5 -0
- package/dist/types/components/Icon/library.d.ts +8 -0
- package/dist/types/components/Input/Input.d.ts +26 -0
- package/dist/types/components/Input/Input.tokens.d.ts +12 -0
- package/dist/types/components/Input/index.d.ts +1 -0
- package/dist/types/components/Label/Label.d.ts +11 -0
- package/dist/types/components/Label/Label.tokens.d.ts +4 -0
- package/dist/types/components/Label/index.d.ts +1 -0
- package/dist/types/components/List/List.d.ts +14 -0
- package/dist/types/components/List/List.tokens.d.ts +4 -0
- package/dist/types/components/List/ListItem.d.ts +4 -0
- package/dist/types/components/List/index.d.ts +8 -0
- package/dist/types/components/Menu/Menu.context.d.ts +15 -0
- package/dist/types/components/Menu/Menu.d.ts +27 -0
- package/dist/types/components/Menu/Menu.tokens.d.ts +4 -0
- package/dist/types/components/Menu/Menu.types.d.ts +1 -0
- package/dist/types/components/Menu/MenuItem.d.ts +21 -0
- package/dist/types/components/Menu/MenuList.d.ts +8 -0
- package/dist/types/components/Menu/MenuSection.d.ts +11 -0
- package/dist/types/components/Menu/index.d.ts +10 -0
- package/dist/types/components/Pagination/Pagination.d.ts +25 -0
- package/dist/types/components/Pagination/Pagination.tokens.d.ts +2 -0
- package/dist/types/components/Pagination/PaginationItem.d.ts +8 -0
- package/dist/types/components/Pagination/index.d.ts +1 -0
- package/dist/types/components/Pagination/paginationControl.d.ts +1 -0
- package/dist/types/components/Paper/Paper.d.ts +8 -0
- package/dist/types/components/Paper/Paper.tokens.d.ts +12 -0
- package/dist/types/components/Paper/index.d.ts +1 -0
- package/dist/types/components/Popover/Popover.d.ts +22 -0
- package/dist/types/components/Popover/Popover.tokens.d.ts +4 -0
- package/dist/types/components/Popover/PopoverContent.d.ts +3 -0
- package/dist/types/components/Popover/PopoverTitle.d.ts +3 -0
- package/dist/types/components/Popover/index.d.ts +10 -0
- package/dist/types/components/Progress/Circular/CircularProgress.d.ts +16 -0
- package/dist/types/components/Progress/Circular/CircularProgress.tokens.d.ts +8 -0
- package/dist/types/components/Progress/Dots/DotProgress.d.ts +11 -0
- package/dist/types/components/Progress/Dots/DotProgress.tokens.d.ts +5 -0
- package/dist/types/components/Progress/Linear/LinearProgress.d.ts +18 -0
- package/dist/types/components/Progress/Linear/LinearProgress.tokens.d.ts +7 -0
- package/dist/types/components/Progress/Star/StarProgress.d.ts +14 -0
- package/dist/types/components/Progress/Star/StarProgress.tokens.d.ts +2 -0
- package/dist/types/components/Progress/index.d.ts +15 -0
- package/dist/types/components/Radio/Radio.d.ts +10 -0
- package/dist/types/components/Radio/Radio.tokens.d.ts +4 -0
- package/dist/types/components/Radio/index.d.ts +1 -0
- package/dist/types/components/Scrim/Scrim.d.ts +15 -0
- package/dist/types/components/Scrim/Scrim.tokens.d.ts +2 -0
- package/dist/types/components/Scrim/index.d.ts +1 -0
- package/dist/types/components/Search/Search.d.ts +3 -0
- package/dist/types/components/Search/Search.tokens.d.ts +4 -0
- package/dist/types/components/Search/index.d.ts +1 -0
- package/dist/types/components/Select/MultiSelect/MultiSelect.d.ts +48 -0
- package/dist/types/components/Select/MultiSelect/index.d.ts +1 -0
- package/dist/types/components/Select/NativeSelect/NativeSelect.d.ts +29 -0
- package/dist/types/components/Select/NativeSelect/NativeSelect.tokens.d.ts +4 -0
- package/dist/types/components/Select/NativeSelect/index.d.ts +1 -0
- package/dist/types/components/Select/Select.tokens.d.ts +3 -0
- package/dist/types/components/Select/SingleSelect/SingleSelect.d.ts +48 -0
- package/dist/types/components/Select/SingleSelect/index.d.ts +1 -0
- package/dist/types/components/Select/commonStyles.d.ts +32 -0
- package/dist/types/components/Select/index.d.ts +3 -0
- package/dist/types/components/SideSheet/SideSheet.d.ts +21 -0
- package/dist/types/components/SideSheet/SideSheet.tokens.d.ts +10 -0
- package/dist/types/components/SideSheet/index.d.ts +1 -0
- package/dist/types/components/Slider/MinMax.d.ts +5 -0
- package/dist/types/components/Slider/Output.d.ts +9 -0
- package/dist/types/components/Slider/Slider.d.ts +49 -0
- package/dist/types/components/Slider/Slider.tokens.d.ts +4 -0
- package/dist/types/components/Slider/SliderInput.d.ts +21 -0
- package/dist/types/components/Slider/index.d.ts +1 -0
- package/dist/types/components/Snackbar/Snackbar.d.ts +21 -0
- package/dist/types/components/Snackbar/Snackbar.tokens.d.ts +4 -0
- package/dist/types/components/Snackbar/SnackbarAction.d.ts +5 -0
- package/dist/types/components/Snackbar/index.d.ts +8 -0
- package/dist/types/components/Switch/Switch.d.ts +12 -0
- package/dist/types/components/Switch/Switch.styles.d.ts +4 -0
- package/dist/types/components/Switch/Switch.tokens.d.ts +3 -0
- package/dist/types/components/Switch/SwitchDefault.d.ts +6 -0
- package/dist/types/components/Switch/SwitchSmall.d.ts +6 -0
- package/dist/types/components/Switch/index.d.ts +1 -0
- package/dist/types/components/Table/Body.d.ts +3 -0
- package/dist/types/components/Table/Caption.d.ts +4 -0
- package/dist/types/components/Table/Cell.d.ts +11 -0
- package/dist/types/components/Table/DataCell/DataCell.d.ts +8 -0
- package/dist/types/components/Table/DataCell/DataCell.tokens.d.ts +15 -0
- package/dist/types/components/Table/DataCell/index.d.ts +1 -0
- package/dist/types/components/Table/Head/Head.d.ts +9 -0
- package/dist/types/components/Table/Head/Head.tokens.d.ts +2 -0
- package/dist/types/components/Table/Head/index.d.ts +1 -0
- package/dist/types/components/Table/HeaderCell/HeaderCell.d.ts +5 -0
- package/dist/types/components/Table/HeaderCell/HeaderCell.tokens.d.ts +3 -0
- package/dist/types/components/Table/HeaderCell/index.d.ts +1 -0
- package/dist/types/components/Table/Inner.context.d.ts +7 -0
- package/dist/types/components/Table/Row/Row.d.ts +9 -0
- package/dist/types/components/Table/Row/Row.tokens.d.ts +2 -0
- package/dist/types/components/Table/Row/index.d.ts +1 -0
- package/dist/types/components/Table/Table.d.ts +3 -0
- package/dist/types/components/Table/Table.types.d.ts +2 -0
- package/dist/types/components/Table/index.d.ts +16 -0
- package/dist/types/components/TableOfContents/LinkItem.d.ts +3 -0
- package/dist/types/components/TableOfContents/TableOfContents.d.ts +14 -0
- package/dist/types/components/TableOfContents/TableOfContents.tokens.d.ts +4 -0
- package/dist/types/components/TableOfContents/index.d.ts +8 -0
- package/dist/types/components/Tabs/Tab.d.ts +13 -0
- package/dist/types/components/Tabs/TabList.d.ts +11 -0
- package/dist/types/components/Tabs/TabPanel.d.ts +10 -0
- package/dist/types/components/Tabs/TabPanels.d.ts +4 -0
- package/dist/types/components/Tabs/Tabs.context.d.ts +13 -0
- package/dist/types/components/Tabs/Tabs.d.ts +19 -0
- package/dist/types/components/Tabs/Tabs.tokens.d.ts +2 -0
- package/dist/types/components/Tabs/Tabs.types.d.ts +1 -0
- package/dist/types/components/Tabs/index.d.ts +14 -0
- package/dist/types/components/TextField/Field.d.ts +34 -0
- package/dist/types/components/TextField/HelperText/HelperText.d.ts +14 -0
- package/dist/types/components/TextField/HelperText/HelperText.token.d.ts +15 -0
- package/dist/types/components/TextField/HelperText/index.d.ts +1 -0
- package/dist/types/components/TextField/Icon/Icon.d.ts +13 -0
- package/dist/types/components/TextField/Icon/Icon.tokens.d.ts +14 -0
- package/dist/types/components/TextField/Icon/index.d.ts +1 -0
- package/dist/types/components/TextField/TextField.context.d.ts +17 -0
- package/dist/types/components/TextField/TextField.d.ts +37 -0
- package/dist/types/components/TextField/TextField.tokens.d.ts +10 -0
- package/dist/types/components/TextField/index.d.ts +1 -0
- package/dist/types/components/TextField/types.d.ts +6 -0
- package/dist/types/components/Textarea/Textarea.d.ts +30 -0
- package/dist/types/components/Textarea/index.d.ts +1 -0
- package/dist/types/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/types/components/Tooltip/Tooltip.tokens.d.ts +4 -0
- package/dist/types/components/Tooltip/index.d.ts +1 -0
- package/dist/types/components/TopBar/Actions.d.ts +3 -0
- package/dist/types/components/TopBar/CustomContent.d.ts +3 -0
- package/dist/types/components/TopBar/Header.d.ts +3 -0
- package/dist/types/components/TopBar/TopBar.d.ts +3 -0
- package/dist/types/components/TopBar/TopBar.tokens.d.ts +4 -0
- package/dist/types/components/TopBar/index.d.ts +12 -0
- package/dist/types/components/Typography/Typography.d.ts +15 -0
- package/dist/types/components/Typography/Typography.tokens.d.ts +453 -0
- package/dist/types/components/Typography/index.d.ts +1 -0
- package/dist/types/hooks/index.d.ts +8 -0
- package/dist/types/hooks/useAutoResize.d.ts +1 -0
- package/dist/types/hooks/useCombinedRefs.d.ts +3 -0
- package/dist/types/hooks/useGlobalKeyPress.d.ts +10 -0
- package/dist/types/hooks/useId.d.ts +1 -0
- package/dist/types/hooks/useMountedRef.d.ts +1 -0
- package/dist/types/hooks/useOutsideClick.d.ts +1 -0
- package/dist/types/hooks/usePopper.d.ts +12 -0
- package/dist/types/hooks/useToken.d.ts +7 -0
- package/dist/types/index.d.ts +35 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/joinHandlers.d.ts +3 -0
- package/dist/types/utils/setReactInputValue.d.ts +7 -0
- package/dist/types/utils/templates/borders.d.ts +2 -0
- package/dist/types/utils/templates/common.d.ts +9 -0
- package/dist/types/utils/templates/focus.d.ts +2 -0
- package/dist/types/utils/templates/index.d.ts +7 -0
- package/package.json +111 -0
- package/src/index.ts +37 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Switch';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import type { CSSObject } from 'styled-components';
|
|
3
|
+
export declare type CaptionProps = Pick<CSSObject, 'captionSide'> & HTMLAttributes<HTMLTableCaptionElement>;
|
|
4
|
+
export declare const Caption: import("react").ForwardRefExoticComponent<Pick<CSSObject, "captionSide"> & HTMLAttributes<HTMLTableCaptionElement> & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TdHTMLAttributes, ThHTMLAttributes } from 'react';
|
|
2
|
+
import { Variants, Colors } from './Table.types';
|
|
3
|
+
export declare type CellProps = {
|
|
4
|
+
/** Specifies which variant to use */
|
|
5
|
+
variant?: Variants;
|
|
6
|
+
/** Specifies cell background color */
|
|
7
|
+
color?: Colors;
|
|
8
|
+
/** Specifies cell sort direction */
|
|
9
|
+
sort?: React.AriaAttributes['aria-sort'];
|
|
10
|
+
} & (TdHTMLAttributes<HTMLTableDataCellElement> | ThHTMLAttributes<HTMLTableHeaderCellElement>);
|
|
11
|
+
export declare const Cell: import("react").ForwardRefExoticComponent<CellProps & import("react").RefAttributes<HTMLTableDataCellElement | HTMLTableHeaderCellElement>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TdHTMLAttributes } from 'react';
|
|
2
|
+
import { Variants, Colors } from '../Table.types';
|
|
3
|
+
export declare const TableDataCell: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
/** Specifies which variant to use */
|
|
5
|
+
variant?: Variants;
|
|
6
|
+
/** Specifies cell background color */
|
|
7
|
+
color?: Colors;
|
|
8
|
+
} & TdHTMLAttributes<HTMLTableDataCellElement> & import("react").RefAttributes<HTMLTableDataCellElement>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ComponentToken } from '@equinor/eds-tokens';
|
|
2
|
+
import { Variants } from '../Table.types';
|
|
3
|
+
declare type Validation = {
|
|
4
|
+
error: Partial<ComponentToken>;
|
|
5
|
+
};
|
|
6
|
+
declare type VariantsType = {
|
|
7
|
+
numeric: Partial<ComponentToken>;
|
|
8
|
+
};
|
|
9
|
+
export declare type TableCellToken = ComponentToken & {
|
|
10
|
+
validation: Validation;
|
|
11
|
+
variants: VariantsType;
|
|
12
|
+
};
|
|
13
|
+
export declare const tableCell: TableCellToken;
|
|
14
|
+
export declare const applyVariant: (variant: Variants, token: TableCellToken) => TableCellToken;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DataCell';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type HeadProps = {
|
|
3
|
+
/** Header will stick to top when scrolling */
|
|
4
|
+
sticky?: boolean;
|
|
5
|
+
} & HTMLAttributes<HTMLTableSectionElement>;
|
|
6
|
+
export declare const Head: import("react").ForwardRefExoticComponent<{
|
|
7
|
+
/** Header will stick to top when scrolling */
|
|
8
|
+
sticky?: boolean;
|
|
9
|
+
} & HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Head';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ThHTMLAttributes } from 'react';
|
|
2
|
+
export declare const TableHeaderCell: import("react").ForwardRefExoticComponent<{
|
|
3
|
+
sort?: React.AriaAttributes['aria-sort'];
|
|
4
|
+
sticky?: boolean;
|
|
5
|
+
} & ThHTMLAttributes<HTMLTableHeaderCellElement> & import("react").RefAttributes<HTMLTableHeaderCellElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './HeaderCell';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type RowProps = {
|
|
3
|
+
/** Hightlight row as active */
|
|
4
|
+
active?: boolean;
|
|
5
|
+
} & React.HTMLAttributes<HTMLTableRowElement>;
|
|
6
|
+
export declare const Row: import("react").ForwardRefExoticComponent<{
|
|
7
|
+
/** Hightlight row as active */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
} & import("react").HTMLAttributes<HTMLTableRowElement> & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Row';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Table as BaseTable, TableProps } from './Table';
|
|
2
|
+
import { Body, BodyProps } from './Body';
|
|
3
|
+
import { Cell, CellProps } from './Cell';
|
|
4
|
+
import { Head, HeadProps } from './Head';
|
|
5
|
+
import { Row, RowProps } from './Row';
|
|
6
|
+
import { Caption, CaptionProps } from './Caption';
|
|
7
|
+
declare type TableCompoundProps = typeof BaseTable & {
|
|
8
|
+
Body: typeof Body;
|
|
9
|
+
Cell: typeof Cell;
|
|
10
|
+
Head: typeof Head;
|
|
11
|
+
Row: typeof Row;
|
|
12
|
+
Caption: typeof Caption;
|
|
13
|
+
};
|
|
14
|
+
declare const Table: TableCompoundProps;
|
|
15
|
+
export { Table };
|
|
16
|
+
export type { TableProps, CellProps, BodyProps, RowProps, CaptionProps, HeadProps, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type TableOfContentsLinkItemProps = HTMLAttributes<HTMLLIElement>;
|
|
3
|
+
export declare const LinkItem: import("react").ForwardRefExoticComponent<TableOfContentsLinkItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type TableOfContentsProps = {
|
|
3
|
+
/** Sticky functionality */
|
|
4
|
+
sticky?: boolean;
|
|
5
|
+
/** Label or title for the ToC */
|
|
6
|
+
label?: string;
|
|
7
|
+
} & HTMLAttributes<HTMLElement>;
|
|
8
|
+
declare const TableOfContents: import("react").ForwardRefExoticComponent<{
|
|
9
|
+
/** Sticky functionality */
|
|
10
|
+
sticky?: boolean;
|
|
11
|
+
/** Label or title for the ToC */
|
|
12
|
+
label?: string;
|
|
13
|
+
} & HTMLAttributes<HTMLElement> & import("react").RefAttributes<HTMLElement>>;
|
|
14
|
+
export { TableOfContents };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { TableOfContents as BaseComponent, TableOfContentsProps } from './TableOfContents';
|
|
2
|
+
import { LinkItem, TableOfContentsLinkItemProps } from './LinkItem';
|
|
3
|
+
declare type TableOfContentsCompoundProps = typeof BaseComponent & {
|
|
4
|
+
LinkItem: typeof LinkItem;
|
|
5
|
+
};
|
|
6
|
+
declare const TableOfContents: TableOfContentsCompoundProps;
|
|
7
|
+
export { TableOfContents };
|
|
8
|
+
export type { TableOfContentsProps, TableOfContentsLinkItemProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export declare type TabProps = {
|
|
3
|
+
/** If `true`, the tab will be active. */
|
|
4
|
+
active?: boolean;
|
|
5
|
+
/** If `true`, the tab will be disabled. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
|
+
export declare const Tab: import("react").ForwardRefExoticComponent<{
|
|
9
|
+
/** If `true`, the tab will be active. */
|
|
10
|
+
active?: boolean;
|
|
11
|
+
/** If `true`, the tab will be disabled. */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
} & ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes, RefAttributes } from 'react';
|
|
2
|
+
import { Variants } from './Tabs.types';
|
|
3
|
+
export declare type TabListProps = {
|
|
4
|
+
/** Sets the width of the tabs */
|
|
5
|
+
variant?: Variants;
|
|
6
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
7
|
+
declare const TabList: import("react").ForwardRefExoticComponent<{
|
|
8
|
+
/** Sets the width of the tabs */
|
|
9
|
+
variant?: Variants;
|
|
10
|
+
} & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { TabList };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export declare type TabPanelProps = {
|
|
3
|
+
/** If `true`, the panel will be hidden. */
|
|
4
|
+
hidden?: boolean;
|
|
5
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
6
|
+
declare const TabPanel: import("react").ForwardRefExoticComponent<{
|
|
7
|
+
/** If `true`, the panel will be hidden. */
|
|
8
|
+
hidden?: boolean;
|
|
9
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { TabPanel };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Variants } from './Tabs.types';
|
|
3
|
+
declare type State = {
|
|
4
|
+
variant: Variants;
|
|
5
|
+
handleChange: (index: number) => void;
|
|
6
|
+
activeTab: number;
|
|
7
|
+
tabsId: string;
|
|
8
|
+
tabsFocused: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare const TabsContext: import("react").Context<State>;
|
|
11
|
+
declare const TabsProvider: import("react").Provider<State>;
|
|
12
|
+
declare const TabsConsumer: import("react").Consumer<State>;
|
|
13
|
+
export { TabsContext, TabsProvider, TabsConsumer };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { Variants } from './Tabs.types';
|
|
3
|
+
export declare type TabsProps = {
|
|
4
|
+
/** The index of the active tab */
|
|
5
|
+
activeTab?: number;
|
|
6
|
+
/** The callback function for selecting a tab */
|
|
7
|
+
onChange?: (index: number) => void;
|
|
8
|
+
/** Sets the width of the tabs. Tabs can have a maximum width of 360px */
|
|
9
|
+
variant?: Variants;
|
|
10
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
|
11
|
+
declare const Tabs: import("react").ForwardRefExoticComponent<{
|
|
12
|
+
/** The index of the active tab */
|
|
13
|
+
activeTab?: number;
|
|
14
|
+
/** The callback function for selecting a tab */
|
|
15
|
+
onChange?: (index: number) => void;
|
|
16
|
+
/** Sets the width of the tabs. Tabs can have a maximum width of 360px */
|
|
17
|
+
variant?: Variants;
|
|
18
|
+
} & Omit<HTMLAttributes<HTMLDivElement>, "onChange"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
export { Tabs };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type Variants = 'fullWidth' | 'minWidth' | '';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tabs as BaseComponent, TabsProps } from './Tabs';
|
|
2
|
+
import { TabList, TabListProps } from './TabList';
|
|
3
|
+
import { Tab, TabProps } from './Tab';
|
|
4
|
+
import { TabPanels, TabPanelsProps } from './TabPanels';
|
|
5
|
+
import { TabPanel, TabPanelProps } from './TabPanel';
|
|
6
|
+
declare type TabsCompoundProps = typeof BaseComponent & {
|
|
7
|
+
Tab: typeof Tab;
|
|
8
|
+
Panels: typeof TabPanels;
|
|
9
|
+
Panel: typeof TabPanel;
|
|
10
|
+
List: typeof TabList;
|
|
11
|
+
};
|
|
12
|
+
declare const Tabs: TabsCompoundProps;
|
|
13
|
+
export { Tabs };
|
|
14
|
+
export type { TabsProps, TabProps, TabListProps, TabPanelProps, TabPanelsProps };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { Variants } from './types';
|
|
3
|
+
import type { TextFieldToken } from './TextField.tokens';
|
|
4
|
+
declare type InputWrapperType = {
|
|
5
|
+
isFocused: boolean;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
isReadOnly: boolean;
|
|
8
|
+
variant: string;
|
|
9
|
+
token: TextFieldToken;
|
|
10
|
+
inputIcon?: ReactNode;
|
|
11
|
+
unit?: string;
|
|
12
|
+
multiline?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const InputWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, InputWrapperType, never>;
|
|
15
|
+
export declare const Field: import("react").ForwardRefExoticComponent<{
|
|
16
|
+
/** Specifies if input should be multiline*/
|
|
17
|
+
multiline?: boolean;
|
|
18
|
+
/** Placeholder */
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/** Variant */
|
|
21
|
+
variant?: Variants;
|
|
22
|
+
/** Disabled state */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Type */
|
|
25
|
+
type?: string;
|
|
26
|
+
/** Read Only */
|
|
27
|
+
readOnly?: boolean;
|
|
28
|
+
/** Unit text */
|
|
29
|
+
unit?: string;
|
|
30
|
+
inputIcon?: ReactNode;
|
|
31
|
+
/** Specifies max rows for multiline input */
|
|
32
|
+
rowsMax?: number;
|
|
33
|
+
} & import("react").HTMLAttributes<HTMLInputElement | HTMLTextAreaElement> & import("react").RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import type { Variants } from '../types';
|
|
3
|
+
declare type TextfieldHelperTextProps = {
|
|
4
|
+
/** Helper text */
|
|
5
|
+
helperText?: string;
|
|
6
|
+
/** Icon */
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
/** Disabled */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Variant */
|
|
11
|
+
variant: Variants;
|
|
12
|
+
};
|
|
13
|
+
declare const TextfieldHelperText: import("react").ForwardRefExoticComponent<TextfieldHelperTextProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export { TextfieldHelperText as HelperText };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Spacing, Typography } from '@equinor/eds-tokens';
|
|
2
|
+
import { ColorStateProps } from '../types';
|
|
3
|
+
export declare type HelperTextProps = {
|
|
4
|
+
background: string;
|
|
5
|
+
typography: Typography;
|
|
6
|
+
spacings: {
|
|
7
|
+
comfortable: Spacing;
|
|
8
|
+
compact: Spacing;
|
|
9
|
+
};
|
|
10
|
+
default: ColorStateProps;
|
|
11
|
+
error: ColorStateProps;
|
|
12
|
+
warning: ColorStateProps;
|
|
13
|
+
success: ColorStateProps;
|
|
14
|
+
};
|
|
15
|
+
export declare const helperText: HelperTextProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HelperText } from './HelperText';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import type { Variants, ColorStateProps } from '../types';
|
|
3
|
+
declare const InputIcon: import("react").ForwardRefExoticComponent<{
|
|
4
|
+
/** isDisabled */
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
/** Variant */
|
|
7
|
+
variant?: Variants;
|
|
8
|
+
/** Colors */
|
|
9
|
+
colors?: ColorStateProps;
|
|
10
|
+
/** Size */
|
|
11
|
+
size?: 16 | 24;
|
|
12
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { InputIcon as Icon };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Spacing } from '@equinor/eds-tokens';
|
|
2
|
+
import { ColorStateProps } from '../types';
|
|
3
|
+
declare type InputProps = {
|
|
4
|
+
spacings: {
|
|
5
|
+
comfortable: Spacing;
|
|
6
|
+
compact: Spacing;
|
|
7
|
+
};
|
|
8
|
+
default: ColorStateProps;
|
|
9
|
+
error: ColorStateProps;
|
|
10
|
+
warning: ColorStateProps;
|
|
11
|
+
success: ColorStateProps;
|
|
12
|
+
};
|
|
13
|
+
export declare const input: InputProps;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Icon } from './Icon';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const propsFor: {
|
|
3
|
+
variants: string[];
|
|
4
|
+
};
|
|
5
|
+
declare type State = {
|
|
6
|
+
isFocused: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare type UseTextFieldProps<T> = {
|
|
9
|
+
handleFocus: () => void;
|
|
10
|
+
handleBlur: () => void;
|
|
11
|
+
} & T;
|
|
12
|
+
declare type ProviderProps = {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
export declare const TextFieldProvider: ({ children }: ProviderProps) => JSX.Element;
|
|
16
|
+
export declare const useTextField: () => UseTextFieldProps<State>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, Ref } from 'react';
|
|
2
|
+
import type { Variants } from './types';
|
|
3
|
+
export declare type TextFieldProps = {
|
|
4
|
+
/** @ignore */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Variants */
|
|
7
|
+
variant?: Variants;
|
|
8
|
+
/** Input unique id */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Label text */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Meta text */
|
|
13
|
+
meta?: string;
|
|
14
|
+
/** Unit text */
|
|
15
|
+
unit?: string;
|
|
16
|
+
/** Helper text */
|
|
17
|
+
helperText?: string;
|
|
18
|
+
/** Placeholder text */
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/** Disabled */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Multiline input */
|
|
23
|
+
multiline?: boolean;
|
|
24
|
+
/** Specifies max rows for multiline input */
|
|
25
|
+
rowsMax?: number;
|
|
26
|
+
/** Input ref */
|
|
27
|
+
inputRef?: Ref<HTMLInputElement> | Ref<HTMLTextAreaElement>;
|
|
28
|
+
/** InputIcon */
|
|
29
|
+
inputIcon?: ReactNode;
|
|
30
|
+
/** HelperIcon */
|
|
31
|
+
helperIcon?: ReactNode;
|
|
32
|
+
/** Value */
|
|
33
|
+
value?: string;
|
|
34
|
+
/** Read Only */
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
} & (InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>);
|
|
37
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<TextFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ComponentToken } from '@equinor/eds-tokens';
|
|
2
|
+
export declare type TextFieldToken = ComponentToken & {
|
|
3
|
+
entities?: {
|
|
4
|
+
unit?: ComponentToken;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export declare const textfield: TextFieldToken;
|
|
8
|
+
export declare const error: TextFieldToken;
|
|
9
|
+
export declare const warning: TextFieldToken;
|
|
10
|
+
export declare const success: TextFieldToken;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TextField';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { TextareaHTMLAttributes } from 'react';
|
|
2
|
+
import type { Variants } from '../TextField/types';
|
|
3
|
+
export declare type TextareaProps = {
|
|
4
|
+
/** Placeholder */
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
/** Variant */
|
|
7
|
+
variant?: Variants;
|
|
8
|
+
/** Disabled state */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Type */
|
|
11
|
+
type?: string;
|
|
12
|
+
/** Read Only */
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
/** Specifies max rows for multiline input */
|
|
15
|
+
rowsMax?: number;
|
|
16
|
+
} & TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
17
|
+
export declare const Textarea: import("react").ForwardRefExoticComponent<{
|
|
18
|
+
/** Placeholder */
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/** Variant */
|
|
21
|
+
variant?: Variants;
|
|
22
|
+
/** Disabled state */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Type */
|
|
25
|
+
type?: string;
|
|
26
|
+
/** Read Only */
|
|
27
|
+
readOnly?: boolean;
|
|
28
|
+
/** Specifies max rows for multiline input */
|
|
29
|
+
rowsMax?: number;
|
|
30
|
+
} & TextareaHTMLAttributes<HTMLTextAreaElement> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Textarea';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { Placement } from '../../hooks';
|
|
3
|
+
export declare type TooltipProps = {
|
|
4
|
+
/** Tooltip placement relative to anchor */
|
|
5
|
+
placement?: Placement;
|
|
6
|
+
/** Tooltip title */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Tooltip anchor element */
|
|
9
|
+
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
10
|
+
/** Delay in ms, default 100 */
|
|
11
|
+
enterDelay?: number;
|
|
12
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
13
|
+
export declare const Tooltip: import("react").ForwardRefExoticComponent<{
|
|
14
|
+
/** Tooltip placement relative to anchor */
|
|
15
|
+
placement?: Placement;
|
|
16
|
+
/** Tooltip title */
|
|
17
|
+
title?: string;
|
|
18
|
+
/** Tooltip anchor element */
|
|
19
|
+
children: React.ReactElement & React.RefAttributes<HTMLElement>;
|
|
20
|
+
/** Delay in ms, default 100 */
|
|
21
|
+
enterDelay?: number;
|
|
22
|
+
} & HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tooltip';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TopBar as BaseComponent, TopbarProps } from './TopBar';
|
|
2
|
+
import { Actions, TopbarActionsProps } from './Actions';
|
|
3
|
+
import { Header, TopbarHeaderProps } from './Header';
|
|
4
|
+
import { CustomContent, TopbarCustomContentProps } from './CustomContent';
|
|
5
|
+
declare type TopbarCompoundProps = typeof BaseComponent & {
|
|
6
|
+
Actions: typeof Actions;
|
|
7
|
+
Header: typeof Header;
|
|
8
|
+
CustomContent: typeof CustomContent;
|
|
9
|
+
};
|
|
10
|
+
declare const TopBar: TopbarCompoundProps;
|
|
11
|
+
export { TopBar };
|
|
12
|
+
export type { TopbarProps, TopbarActionsProps, TopbarCustomContentProps, TopbarHeaderProps, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ElementType, HTMLAttributes, AnchorHTMLAttributes } from 'react';
|
|
2
|
+
import { TypographyVariants, ColorVariants, TypographyGroups } from './Typography.tokens';
|
|
3
|
+
import type { Typography as TypographyType } from '@equinor/eds-tokens';
|
|
4
|
+
export declare type TypographyProps = {
|
|
5
|
+
variant?: TypographyVariants;
|
|
6
|
+
group?: TypographyGroups;
|
|
7
|
+
bold?: boolean;
|
|
8
|
+
italic?: boolean;
|
|
9
|
+
link?: boolean;
|
|
10
|
+
color?: ColorVariants | string;
|
|
11
|
+
token?: Partial<TypographyType>;
|
|
12
|
+
lines?: number;
|
|
13
|
+
as?: ElementType;
|
|
14
|
+
} & (HTMLAttributes<HTMLElement> | AnchorHTMLAttributes<HTMLAnchorElement>);
|
|
15
|
+
export declare const Typography: import("react").ForwardRefExoticComponent<TypographyProps & import("react").RefAttributes<HTMLElement>>;
|