@amboss/design-system 1.7.1 → 1.7.2--canary-ts2
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/build/build-tokens/assets/logo.json +1 -1
- package/package.json +34 -6
- package/build/build-tokens/_subThemeType.d.ts +0 -1
- package/build/build-tokens/visualConfig.d.ts +0 -912
- package/build/index.js +0 -3
- package/build/index.js.LICENSE.txt +0 -8
- package/build/index.js.map +0 -1
- package/build/src/components/Badge/Badge.d.ts +0 -11
- package/build/src/components/Box/Box.d.ts +0 -36
- package/build/src/components/Button/Button.d.ts +0 -34
- package/build/src/components/Callout/Callout.d.ts +0 -14
- package/build/src/components/Card/Card.d.ts +0 -16
- package/build/src/components/Card/CardBox.d.ts +0 -7
- package/build/src/components/Card/CardHeader/CardHeader.d.ts +0 -12
- package/build/src/components/Collapsible/Collapsible.d.ts +0 -19
- package/build/src/components/Column/Columns.d.ts +0 -41
- package/build/src/components/Container/Container.d.ts +0 -9
- package/build/src/components/Divider/Divider.d.ts +0 -7
- package/build/src/components/DropdownMenu/DropdownMenu.d.ts +0 -35
- package/build/src/components/DropdownMenu/MenuItem.d.ts +0 -19
- package/build/src/components/Form/Checkbox/Checkbox.d.ts +0 -15
- package/build/src/components/Form/FormErrorMessages/FormErrorMessages.d.ts +0 -6
- package/build/src/components/Form/FormField/FormField.d.ts +0 -13
- package/build/src/components/Form/FormFieldGroup/FormFieldGroup.d.ts +0 -11
- package/build/src/components/Form/FormLabelText/FormLabelText.d.ts +0 -7
- package/build/src/components/Form/Input/Input.d.ts +0 -54
- package/build/src/components/Form/PasswordInput/PasswordInput.d.ts +0 -58
- package/build/src/components/Form/Radio/Radio.d.ts +0 -14
- package/build/src/components/Form/RadioButton/RadioButton.d.ts +0 -16
- package/build/src/components/Form/Select/Select.d.ts +0 -23
- package/build/src/components/Form/Textarea/Textarea.d.ts +0 -26
- package/build/src/components/Form/Toggle/Toggle.d.ts +0 -18
- package/build/src/components/Form/ToggleButton/ToggleButton.d.ts +0 -15
- package/build/src/components/Icon/Icon.d.ts +0 -20
- package/build/src/components/Inline/Inline.d.ts +0 -29
- package/build/src/components/Link/Link.d.ts +0 -14
- package/build/src/components/Logo/Logo.d.ts +0 -8
- package/build/src/components/MediaItem/MediaItem.d.ts +0 -21
- package/build/src/components/MediaViewerBar/MediaViewerBar.d.ts +0 -7
- package/build/src/components/Notification/ExpandedContent.d.ts +0 -2
- package/build/src/components/Notification/Notification.d.ts +0 -16
- package/build/src/components/Patterns/ButtonGroup/ButtonGroup.d.ts +0 -15
- package/build/src/components/Patterns/Modal/Modal.d.ts +0 -28
- package/build/src/components/PictogramButton/PictogramButton.d.ts +0 -14
- package/build/src/components/Portal/Portal.d.ts +0 -7
- package/build/src/components/ProgressBar/ProgressBar.d.ts +0 -15
- package/build/src/components/RoundButton/RoundButton.d.ts +0 -12
- package/build/src/components/SearchResult/SearchResult.d.ts +0 -43
- package/build/src/components/SegmentedProgressBar/SegmentedProgressBar.d.ts +0 -28
- package/build/src/components/SegmentedProgressBar/SegmentedProgressBarUtil.d.ts +0 -10
- package/build/src/components/ShadowWebComponent/ShadowWebComponent.d.ts +0 -13
- package/build/src/components/Stack/Stack.d.ts +0 -18
- package/build/src/components/SubThemeProvider/SubThemeProvider.d.ts +0 -8
- package/build/src/components/Tabs/Tabs.d.ts +0 -17
- package/build/src/components/Typography/Header/Header.d.ts +0 -33
- package/build/src/components/Typography/StyledText/StyledText.d.ts +0 -11
- package/build/src/components/Typography/Text/Text.d.ts +0 -17
- package/build/src/components/Typography/TextClamped/TextClamped.d.ts +0 -10
- package/build/src/components/VirtualScrollList/VirtualScrollList.d.ts +0 -11
- package/build/src/components/VirtualScrollList/VirtualScrollListReducer.d.ts +0 -36
- package/build/src/index.d.ts +0 -45
- package/build/src/shared/informDeprecation.d.ts +0 -1
- package/build/src/shared/mediaQueries.d.ts +0 -13
- package/build/src/shared/replaceDeprecated.d.ts +0 -1
- package/build/src/shared/useAutoPosition.d.ts +0 -5
- package/build/src/shared/useDocument.d.ts +0 -1
- package/build/src/shared/useHover.d.ts +0 -2
- package/build/src/shared/useKeyboard.d.ts +0 -17
- package/build/src/shared/useOnEscapePress.d.ts +0 -2
- package/build/src/shared/useOutsideClick.d.ts +0 -11
- package/build/src/shared/useWindow.d.ts +0 -1
- package/build/src/types/index.d.ts +0 -45
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type LogoProps = {
|
|
3
|
-
href: string;
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
role?: string;
|
|
6
|
-
"data-testid"?: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function Logo({ href, ariaLabel, role, "data-testid": dataTestId, }: LogoProps): React.ReactElement;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type MediaItemProps = {
|
|
3
|
-
src: string;
|
|
4
|
-
title: string;
|
|
5
|
-
/** Sets the height of the media to equal the width value making a square <br/>
|
|
6
|
-
*/
|
|
7
|
-
squareByWidth?: boolean;
|
|
8
|
-
/** Specify fit of the media background. <br/>
|
|
9
|
-
* "contain" - the media keeps its aspect ratio, but is resized to fit within the given dimension. <br/>
|
|
10
|
-
* "cover" - the media keeps its aspect ratio and fills the given dimension. The media will be clipped to fit.
|
|
11
|
-
*/
|
|
12
|
-
fit: "cover" | "contain";
|
|
13
|
-
};
|
|
14
|
-
export declare function MediaItem({ src, title, squareByWidth, fit, }: MediaItemProps): React.ReactElement;
|
|
15
|
-
export declare namespace MediaItem {
|
|
16
|
-
var defaultProps: {
|
|
17
|
-
mediaCover: boolean;
|
|
18
|
-
squareByWidth: boolean;
|
|
19
|
-
fit: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
export declare type MediaViewerBarProps = {
|
|
3
|
-
children?: ReactElement | ReactElement[];
|
|
4
|
-
hasSeparator?: boolean;
|
|
5
|
-
"data-e2e-test-id"?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function MediaViewerBar({ children, hasSeparator, "data-e2e-test-id": dataE2eTestId, }: MediaViewerBarProps): ReactElement;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconName } from "../Icon/Icon";
|
|
3
|
-
export declare type NotificationProps = {
|
|
4
|
-
"data-e2e-test-id"?: string;
|
|
5
|
-
text?: string;
|
|
6
|
-
icon?: IconName;
|
|
7
|
-
isDismissable?: boolean;
|
|
8
|
-
callToActionLabel?: string;
|
|
9
|
-
expandButtonLabel?: string;
|
|
10
|
-
shrinkButtonLabel?: string;
|
|
11
|
-
expandable?: boolean;
|
|
12
|
-
onClickCallToAction?: (e: React.MouseEvent) => void;
|
|
13
|
-
onClickDismiss?: () => void;
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
};
|
|
16
|
-
export declare function Notification({ text, icon, isDismissable, callToActionLabel, onClickDismiss, onClickCallToAction, expandable, expandButtonLabel, shrinkButtonLabel, children, "data-e2e-test-id": dataE2eTestId, }: NotificationProps): React.ReactElement;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BaseVariations, MQ, SpaceSizes } from "../../../types";
|
|
3
|
-
export declare type ActionButtonProps = {
|
|
4
|
-
text: string;
|
|
5
|
-
type?: "button" | "submit";
|
|
6
|
-
variant: BaseVariations;
|
|
7
|
-
};
|
|
8
|
-
export declare type ButtonGroupProps = {
|
|
9
|
-
actionButton?: ActionButtonProps;
|
|
10
|
-
cancelButtonText?: string;
|
|
11
|
-
onButtonClick?: (action: "cancel" | "action") => void;
|
|
12
|
-
space?: MQ<SpaceSizes> | SpaceSizes;
|
|
13
|
-
"data-e2e-test-id"?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function ButtonGroup({ cancelButtonText, actionButton, onButtonClick, "data-e2e-test-id": dataE2eTestId, }: ButtonGroupProps): React.ReactElement;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { StackProps } from "../../Stack/Stack";
|
|
3
|
-
import { ActionButtonProps } from "../ButtonGroup/ButtonGroup";
|
|
4
|
-
import { TextProps } from "../../Typography/Text/Text";
|
|
5
|
-
export declare type ModalProps = {
|
|
6
|
-
header: string;
|
|
7
|
-
onAction: (action: "cancel" | "action") => void;
|
|
8
|
-
role?: "dialog" | "alertdialog";
|
|
9
|
-
labelHeader?: string;
|
|
10
|
-
/** The black color is going to be replaced with gray one */
|
|
11
|
-
subHeader?: string;
|
|
12
|
-
/** Aspect ratio 16:9 */
|
|
13
|
-
imageUrl?: string;
|
|
14
|
-
actionButton?: ActionButtonProps;
|
|
15
|
-
cancelButtonLabel?: string;
|
|
16
|
-
/** Aim to use <Modal.Text> and <Modal.Stack> */
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
"data-e2e-test-id"?: string;
|
|
19
|
-
privateProps?: {
|
|
20
|
-
skipPortal?: boolean;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export declare function Modal({ header, subHeader, labelHeader, children, imageUrl, cancelButtonLabel, actionButton, role, onAction, privateProps: { skipPortal }, "data-e2e-test-id": dataE2eTestId, }: ModalProps): React.ReactElement;
|
|
24
|
-
export declare namespace Modal {
|
|
25
|
-
var defaultProps: Partial<ModalProps>;
|
|
26
|
-
var Stack: ({ children, ...rest }: Omit<StackProps, "space">) => JSX.Element;
|
|
27
|
-
var Text: ({ children, ...rest }: Omit<TextProps, "size" | "variant">) => JSX.Element;
|
|
28
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconName } from "../Icon/Icon";
|
|
3
|
-
import { ButtonProps } from "../Button/Button";
|
|
4
|
-
import { AsProp } from "../../types";
|
|
5
|
-
export declare type PictogramButtonProps = Pick<ButtonProps, "variant" | "type" | "disabled" | "onClick" | "onFocus" | "onBlur" | "data-e2e-test-id"> & {
|
|
6
|
-
/** The centered icon to be displayed. */
|
|
7
|
-
icon: IconName;
|
|
8
|
-
/** If true, the button has square corners. */
|
|
9
|
-
squareCorners?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare function PictogramButton<C extends React.ElementType = "button">({ onClick, onFocus, onBlur, type, disabled, as, icon, "data-e2e-test-id": dataE2eTestId, ...rest }: PictogramButtonProps & AsProp<C>): React.ReactElement;
|
|
12
|
-
export declare namespace PictogramButton {
|
|
13
|
-
var defaultProps: Partial<PictogramButtonProps> & AsProp<"button">;
|
|
14
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { ProgressBarWeight } from "../SegmentedProgressBar/SegmentedProgressBar";
|
|
3
|
-
export declare type ProgressBarProps = {
|
|
4
|
-
/** The value for 100% progress. Consumer does not need to do percentage calculation. */
|
|
5
|
-
maxValue: number;
|
|
6
|
-
/** The value already progressed. If progress >= maxValue the bar is filled completely */
|
|
7
|
-
progress: number;
|
|
8
|
-
squareCorners?: boolean;
|
|
9
|
-
weight?: ProgressBarWeight;
|
|
10
|
-
"data-e2e-test-id"?: string;
|
|
11
|
-
};
|
|
12
|
-
export declare function ProgressBar({ maxValue, progress, weight, squareCorners, "data-e2e-test-id": dataE2eTestId, }: ProgressBarProps): React.ReactElement;
|
|
13
|
-
export declare namespace ProgressBar {
|
|
14
|
-
var defaultProps: Partial<ProgressBarProps>;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconName } from "../Icon/Icon";
|
|
3
|
-
import { ButtonProps } from "../Button/Button";
|
|
4
|
-
import { AsProp } from "../../types";
|
|
5
|
-
export declare type RoundButtonProps = Pick<ButtonProps, "variant" | "type" | "disabled" | "onClick" | "onFocus" | "onBlur" | "data-e2e-test-id"> & {
|
|
6
|
-
/** The centered icon to be displayed. */
|
|
7
|
-
icon: IconName;
|
|
8
|
-
};
|
|
9
|
-
export declare function RoundButton<C extends React.ElementType = "button">({ onClick, onFocus, onBlur, type, disabled, as, icon, "data-e2e-test-id": dataE2eTestId, ...rest }: RoundButtonProps & AsProp<C>): React.ReactElement;
|
|
10
|
-
export declare namespace RoundButton {
|
|
11
|
-
var defaultProps: Partial<RoundButtonProps> & AsProp<"button">;
|
|
12
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconName } from "../Icon/Icon";
|
|
3
|
-
export declare type SecondaryTarget = {
|
|
4
|
-
title: string;
|
|
5
|
-
body?: string;
|
|
6
|
-
link: (props: {
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
}) => React.ReactElement;
|
|
9
|
-
"data-e2e-test-id"?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare type SecondaryTargetsProps = {
|
|
12
|
-
data: SecondaryTarget[];
|
|
13
|
-
renderItem: (item: SecondaryTarget) => React.ReactElement;
|
|
14
|
-
compact?: boolean;
|
|
15
|
-
};
|
|
16
|
-
export declare type SearchResultProps = {
|
|
17
|
-
/** The result title. Supports some nested HTML tags like <b> and <i>. Text gets clamped after 3 lines. */
|
|
18
|
-
title: string;
|
|
19
|
-
/** The subtitle that accompanies the title. Supports some nested HTML tags like <b> and <i>. Text gets clamped after 3 lines. */
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
/** The primary AMBOSS target. */
|
|
22
|
-
link: (props: {
|
|
23
|
-
children: React.ReactNode;
|
|
24
|
-
}) => React.ReactElement;
|
|
25
|
-
/** The left icon */
|
|
26
|
-
icon?: IconName;
|
|
27
|
-
/** List of details. Supports some nested HTML tags like <b> and <i>. */
|
|
28
|
-
details?: string[];
|
|
29
|
-
/** Usually a text content of the search result. Supports some nested HTML tags like <b> and <i>. Maximum 3 details items allowed where each test gets clamped after 3 lines. */
|
|
30
|
-
body?: string;
|
|
31
|
-
/** List of secondary AMBOSS targets with titles. Text gets clamped after 3 lines. */
|
|
32
|
-
secondaryTargets?: SecondaryTarget[];
|
|
33
|
-
/** Indicate an external link */
|
|
34
|
-
isExternal?: boolean;
|
|
35
|
-
/** List of labels. For example: preclinic, clinic, physician. */
|
|
36
|
-
labels?: string[];
|
|
37
|
-
/** The test id for the result's primary target. */
|
|
38
|
-
"data-e2e-test-id"?: string;
|
|
39
|
-
};
|
|
40
|
-
export declare function SearchResult({ title, subtitle, icon, details, body, secondaryTargets, link, labels, "data-e2e-test-id": dataE2eTestId, }: SearchResultProps): React.ReactElement;
|
|
41
|
-
export declare namespace SearchResult {
|
|
42
|
-
var defaultProps: Partial<SearchResultProps>;
|
|
43
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type ValuesVariant = "success" | "warning" | "alert";
|
|
3
|
-
export declare type StyleVariant = ValuesVariant | "inProgress";
|
|
4
|
-
export declare type Value = number;
|
|
5
|
-
export declare type ProgressBarWeight = "thin" | "fat";
|
|
6
|
-
export declare type SegmentedProgressBarProps = {
|
|
7
|
-
/** The value for 100% progress. Consumer does not need to do percentage calculation.
|
|
8
|
-
* Just pass this number and some values. The progress bar does all percentag calculations */
|
|
9
|
-
maxValue: number;
|
|
10
|
-
/** The values already progressed. Possible ValuesVariants are used to display progress in a different color.
|
|
11
|
-
* Variants are:
|
|
12
|
-
* success => green;
|
|
13
|
-
* warning => yellow;
|
|
14
|
-
* alert => red */
|
|
15
|
-
values: Partial<Record<ValuesVariant, Value>>;
|
|
16
|
-
squareCorners?: boolean;
|
|
17
|
-
weight?: ProgressBarWeight;
|
|
18
|
-
privateProps?: SegmentedProgressBarPrivateProps;
|
|
19
|
-
"data-e2e-test-id"?: string;
|
|
20
|
-
};
|
|
21
|
-
declare type SegmentedProgressBarPrivateProps = {
|
|
22
|
-
monochrome?: boolean;
|
|
23
|
-
};
|
|
24
|
-
export declare function SegmentedProgressBar({ maxValue, values, weight, squareCorners, privateProps: { monochrome }, "data-e2e-test-id": dataE2eTestId, }: SegmentedProgressBarProps): React.ReactElement;
|
|
25
|
-
export declare namespace SegmentedProgressBar {
|
|
26
|
-
var defaultProps: Partial<SegmentedProgressBarProps>;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StyleVariant, Value, ValuesVariant } from "./SegmentedProgressBar";
|
|
2
|
-
declare const getPercentagesForVariants: (maxValue: number, values: Partial<Record<ValuesVariant, Value>>) => {
|
|
3
|
-
percentage: number;
|
|
4
|
-
style: StyleVariant;
|
|
5
|
-
}[];
|
|
6
|
-
declare const sanitizeInputValues: (maxValue: number, values: Partial<Record<ValuesVariant, Value>>) => {
|
|
7
|
-
sanitizedMaxValue: number;
|
|
8
|
-
sanitizedValues: Partial<Record<ValuesVariant, Value>>;
|
|
9
|
-
};
|
|
10
|
-
export { sanitizeInputValues, getPercentagesForVariants };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare global {
|
|
3
|
-
namespace JSX {
|
|
4
|
-
interface IntrinsicElements {
|
|
5
|
-
"shadow-element": {
|
|
6
|
-
theme: "light-theme" | "dark-theme";
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare function ShadowWebComponent({ theme, }: {
|
|
12
|
-
theme: "light-theme" | "dark-theme";
|
|
13
|
-
}): React.ReactElement;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { HorizontalAlignment, MQ, SpaceSizes } from "../../types";
|
|
3
|
-
export declare type StackProps = {
|
|
4
|
-
/** Represents the vertical between the Stack's children
|
|
5
|
-
* specify [small screen space, medium screen space, large screen space] or one space for all screen sizes
|
|
6
|
-
*/
|
|
7
|
-
space?: MQ<SpaceSizes> | SpaceSizes;
|
|
8
|
-
/** Represents elements' horizontal alignment
|
|
9
|
-
* specify [small screen alignItems, medium screen alignItems, large screen alignItems] or one alignItems for all screen sizes
|
|
10
|
-
*/
|
|
11
|
-
alignItems?: MQ<HorizontalAlignment> | HorizontalAlignment;
|
|
12
|
-
children: React.ReactNode[] | React.ReactElement;
|
|
13
|
-
"data-e2e-test-id"?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare function Stack({ children, space, alignItems, "data-e2e-test-id": dataE2eTestId, }: StackProps): React.ReactElement;
|
|
16
|
-
export declare namespace Stack {
|
|
17
|
-
var defaultProps: Partial<StackProps>;
|
|
18
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SubThemeTypes } from "../../../build-tokens/_subThemeType";
|
|
3
|
-
export declare type SubThemeProviderProps = {
|
|
4
|
-
"data-e2e-test-id"?: string;
|
|
5
|
-
children: React.ReactNode[] | React.ReactNode;
|
|
6
|
-
name: "unset" | SubThemeTypes;
|
|
7
|
-
};
|
|
8
|
-
export declare function SubThemeProvider({ name, children, "data-e2e-test-id": dataE2eTestId, }: SubThemeProviderProps): React.ReactElement;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { IconName } from "../Icon/Icon";
|
|
3
|
-
export declare type TabsProps = {
|
|
4
|
-
children?: React.ReactElement;
|
|
5
|
-
/** an index of active tab */
|
|
6
|
-
activeTab?: number;
|
|
7
|
-
onTabSelect?: (selectedTab: number) => void;
|
|
8
|
-
/** an array of tabs, contains "header", "as", "iconLeft" and "iconRight" */
|
|
9
|
-
tabs: {
|
|
10
|
-
header: string;
|
|
11
|
-
as?: "a" | "button" | React.ComponentType;
|
|
12
|
-
iconLeft?: IconName;
|
|
13
|
-
iconRight?: IconName;
|
|
14
|
-
}[];
|
|
15
|
-
"data-e2e-test-id"?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare function Tabs({ tabs, activeTab, children, onTabSelect, "data-e2e-test-id": dataE2eTestId, }: TabsProps): React.ReactElement;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Theme } from "@emotion/react";
|
|
3
|
-
declare type HeaderProps = {
|
|
4
|
-
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
"data-e2e-test-id"?: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const H1: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: Theme;
|
|
11
|
-
as?: React.ElementType<any>;
|
|
12
|
-
} & HeaderProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
13
|
-
export declare const H2: import("@emotion/styled").StyledComponent<{
|
|
14
|
-
theme?: Theme;
|
|
15
|
-
as?: React.ElementType<any>;
|
|
16
|
-
} & HeaderProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
17
|
-
export declare const H3: import("@emotion/styled").StyledComponent<{
|
|
18
|
-
theme?: Theme;
|
|
19
|
-
as?: React.ElementType<any>;
|
|
20
|
-
} & HeaderProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
21
|
-
export declare const H4: import("@emotion/styled").StyledComponent<{
|
|
22
|
-
theme?: Theme;
|
|
23
|
-
as?: React.ElementType<any>;
|
|
24
|
-
} & HeaderProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
25
|
-
export declare const H5: import("@emotion/styled").StyledComponent<{
|
|
26
|
-
theme?: Theme;
|
|
27
|
-
as?: React.ElementType<any>;
|
|
28
|
-
} & HeaderProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
29
|
-
export declare const H6: import("@emotion/styled").StyledComponent<{
|
|
30
|
-
theme?: Theme;
|
|
31
|
-
as?: React.ElementType<any>;
|
|
32
|
-
} & HeaderProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
33
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type FormattedElementProps = {
|
|
3
|
-
key: string;
|
|
4
|
-
children: string | React.ReactNode[];
|
|
5
|
-
};
|
|
6
|
-
export declare const makeStyledJSX: (string: string) => React.ReactNode[] | string | null;
|
|
7
|
-
export declare type StyledTextProps = {
|
|
8
|
-
children: string;
|
|
9
|
-
"data-e2e-test-id"?: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function StyledText({ children, "data-e2e-test-id": dataE2eTestId, }: StyledTextProps): React.ReactElement;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TextAlignment, TextVariations, TextSize, MQ, Hyphens } from "../../../types";
|
|
3
|
-
export declare type TextProps = {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
size?: TextSize;
|
|
6
|
-
weight?: "normal" | "bold" | "black" | "inherit";
|
|
7
|
-
transform?: "none" | "capitalize" | "uppercase" | "lowercase";
|
|
8
|
-
as?: "p" | "span";
|
|
9
|
-
variant?: TextVariations;
|
|
10
|
-
align?: TextAlignment;
|
|
11
|
-
hyphens?: Hyphens | MQ<Hyphens>;
|
|
12
|
-
"data-e2e-test-id"?: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const Text: import("@emotion/styled").StyledComponent<{
|
|
15
|
-
theme?: import("@emotion/react").Theme;
|
|
16
|
-
as?: React.ElementType<any>;
|
|
17
|
-
} & TextProps, React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { TextProps } from "../Text/Text";
|
|
3
|
-
export declare type TextClampedProps = TextProps & {
|
|
4
|
-
/** The maximum number of lines. Default is 1. */
|
|
5
|
-
lines?: number;
|
|
6
|
-
};
|
|
7
|
-
export declare function TextClamped(props: TextClampedProps): React.ReactElement;
|
|
8
|
-
export declare namespace TextClamped {
|
|
9
|
-
var defaultProps: Partial<TextClampedProps>;
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export declare type VirtualScrollListProps = {
|
|
3
|
-
"data-e2e-test-id"?: string;
|
|
4
|
-
maxHeight: number;
|
|
5
|
-
itemHeight: number;
|
|
6
|
-
itemAmount: number;
|
|
7
|
-
emptyState: () => React.ReactNode;
|
|
8
|
-
itemInView: number;
|
|
9
|
-
itemTemplate: (index: number) => React.ReactNode;
|
|
10
|
-
};
|
|
11
|
-
export declare function VirtualScrollList({ maxHeight, itemHeight, itemAmount, emptyState, itemInView, itemTemplate, "data-e2e-test-id": dataE2eTestId, }: VirtualScrollListProps): React.ReactElement;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
declare type Offset = {
|
|
2
|
-
amount: number;
|
|
3
|
-
isInterpolated: boolean;
|
|
4
|
-
};
|
|
5
|
-
declare type State = {
|
|
6
|
-
avgItemHeight?: number;
|
|
7
|
-
overscan?: number;
|
|
8
|
-
maxHeight?: number;
|
|
9
|
-
topOffsets?: Offset[];
|
|
10
|
-
renderFrom?: number;
|
|
11
|
-
scrolledItemCount?: number;
|
|
12
|
-
scrolledInPx?: number;
|
|
13
|
-
lastItemHeight?: number;
|
|
14
|
-
amountOfItemsInView?: number;
|
|
15
|
-
maxContentHeight?: number;
|
|
16
|
-
recommendedScrollPosition?: number;
|
|
17
|
-
};
|
|
18
|
-
declare type Action = {
|
|
19
|
-
type: "scroll";
|
|
20
|
-
scrollTop: number;
|
|
21
|
-
} | {
|
|
22
|
-
type: "updateViewport";
|
|
23
|
-
viewportNode: HTMLDivElement;
|
|
24
|
-
itemAmount: number;
|
|
25
|
-
} | {
|
|
26
|
-
type: "reset";
|
|
27
|
-
itemHeight: number;
|
|
28
|
-
maxHeight: number;
|
|
29
|
-
overscan: number;
|
|
30
|
-
} | {
|
|
31
|
-
type: "recommendScrollPosition";
|
|
32
|
-
scrollTop: number;
|
|
33
|
-
itemToBeInView: number;
|
|
34
|
-
};
|
|
35
|
-
export declare const VirtualScrollReducer: (prevState: State, action: Action) => State;
|
|
36
|
-
export {};
|
package/build/src/index.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const dark: import("../build-tokens/visualConfig").VisualConfig, light: import("../build-tokens/visualConfig").VisualConfig;
|
|
2
|
-
export { ThemeProvider, CacheProvider } from "@emotion/react";
|
|
3
|
-
export { default as createCache } from "@emotion/cache";
|
|
4
|
-
export { Card } from "./components/Card/Card";
|
|
5
|
-
export { CardBox } from "./components/Card/CardBox";
|
|
6
|
-
export { Box } from "./components/Box/Box";
|
|
7
|
-
export { Inline } from "./components/Inline/Inline";
|
|
8
|
-
export { Stack } from "./components/Stack/Stack";
|
|
9
|
-
export { H1, H2, H3, H4, H5, H6 } from "./components/Typography/Header/Header";
|
|
10
|
-
export { Text } from "./components/Typography/Text/Text";
|
|
11
|
-
export { TextClamped } from "./components/Typography/TextClamped/TextClamped";
|
|
12
|
-
export { StyledText } from "./components/Typography/StyledText/StyledText";
|
|
13
|
-
export { Link } from "./components/Link/Link";
|
|
14
|
-
export { Icon } from "./components/Icon/Icon";
|
|
15
|
-
export { Button } from "./components/Button/Button";
|
|
16
|
-
export { Divider } from "./components/Divider/Divider";
|
|
17
|
-
export { Column, Columns } from "./components/Column/Columns";
|
|
18
|
-
export { Tabs } from "./components/Tabs/Tabs";
|
|
19
|
-
export { Badge } from "./components/Badge/Badge";
|
|
20
|
-
export { SearchResult } from "./components/SearchResult/SearchResult";
|
|
21
|
-
export { ToggleButton } from "./components/Form/ToggleButton/ToggleButton";
|
|
22
|
-
export { DropdownMenu } from "./components/DropdownMenu/DropdownMenu";
|
|
23
|
-
export { FormFieldGroup } from "./components/Form/FormFieldGroup/FormFieldGroup";
|
|
24
|
-
export { Input } from "./components/Form/Input/Input";
|
|
25
|
-
export { Checkbox } from "./components/Form/Checkbox/Checkbox";
|
|
26
|
-
export { Toggle } from "./components/Form/Toggle/Toggle";
|
|
27
|
-
export { Radio } from "./components/Form/Radio/Radio";
|
|
28
|
-
export { RadioButton } from "./components/Form/RadioButton/RadioButton";
|
|
29
|
-
export { Textarea } from "./components/Form/Textarea/Textarea";
|
|
30
|
-
export { Select } from "./components/Form/Select/Select";
|
|
31
|
-
export { SubThemeProvider } from "./components/SubThemeProvider/SubThemeProvider";
|
|
32
|
-
export { PictogramButton } from "./components/PictogramButton/PictogramButton";
|
|
33
|
-
export { MediaViewerBar } from "./components/MediaViewerBar/MediaViewerBar";
|
|
34
|
-
export { SegmentedProgressBar } from "./components/SegmentedProgressBar/SegmentedProgressBar";
|
|
35
|
-
export { ProgressBar } from "./components/ProgressBar/ProgressBar";
|
|
36
|
-
export { Container } from "./components/Container/Container";
|
|
37
|
-
export { PasswordInput } from "./components/Form/PasswordInput/PasswordInput";
|
|
38
|
-
export { RoundButton } from "./components/RoundButton/RoundButton";
|
|
39
|
-
export { Notification } from "./components/Notification/Notification";
|
|
40
|
-
export { Logo } from "./components/Logo/Logo";
|
|
41
|
-
export { MediaItem } from "./components/MediaItem/MediaItem";
|
|
42
|
-
export { Callout } from "./components/Callout/Callout";
|
|
43
|
-
export { Modal } from "./components/Patterns/Modal/Modal";
|
|
44
|
-
export { ButtonGroup } from "./components/Patterns/ButtonGroup/ButtonGroup";
|
|
45
|
-
export { Collapsible, CollapsibleHeader, } from "./components/Collapsible/Collapsible";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const informDeprecation: (property: unknown, value: unknown, location: string, details?: string) => void;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MQ } from "../types";
|
|
2
|
-
declare type MqProp<T> = [
|
|
3
|
-
T | MQ<T>,
|
|
4
|
-
Record<T extends string ? T : never, string | number>
|
|
5
|
-
];
|
|
6
|
-
declare type EmotionCssPropertyName = string;
|
|
7
|
-
declare type EmotionCssValue = string | number;
|
|
8
|
-
declare type EmotionCssDescription = Record<EmotionCssPropertyName, EmotionCssValue>;
|
|
9
|
-
declare type MqFunc = (rules: Record<string, MqProp<any>>) => Record<string, EmotionCssValue | EmotionCssDescription>;
|
|
10
|
-
export declare const mq: MqFunc;
|
|
11
|
-
export declare const mqValue: (rules: Record<EmotionCssPropertyName, EmotionCssValue[] | EmotionCssValue>) => Record<string, EmotionCssValue | EmotionCssDescription>;
|
|
12
|
-
export declare function getMediaQueryClasses<T>(s: T | MQ<T> | undefined, styles: Record<string, string>, prefix?: string): string[];
|
|
13
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const replaceDeprecated: (property: unknown, from: unknown, to: unknown, location: string, details?: string) => unknown;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
export declare type VerticalPosition = "up" | "down";
|
|
3
|
-
export declare type HorizontalPosition = "left" | "right";
|
|
4
|
-
export declare type Position = [VerticalPosition, HorizontalPosition];
|
|
5
|
-
export declare const useAutoPosition: (anchorRef: RefObject<HTMLElement>, contentRef: RefObject<HTMLElement>, isActive: boolean) => Position;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useDocument(): Document;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* useKeyboard handles activation of keyboard hotkeys on a given element.
|
|
4
|
-
* @param {Record<string, (e: KeyboardEvent) => {}} config - A map of keyboardEvent code to function.
|
|
5
|
-
* @param {RefObject} ref - The element which the keyboard config has to apply on.
|
|
6
|
-
* @param {boolean} isActive - A flag to determine when the keyboard config has to be applied.
|
|
7
|
-
*
|
|
8
|
-
* Example:
|
|
9
|
-
* useKeyboard({
|
|
10
|
-
* Escape: closeMenu,
|
|
11
|
-
* ArrowUp: () => { doSomething() },
|
|
12
|
-
* KeyB: () => { console.log("bagi") },
|
|
13
|
-
* }, menuRef, menuOpen)
|
|
14
|
-
*
|
|
15
|
-
* This mean that these keyboard shortcuts will be applied on menuRef when the menu is opened.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useKeyboard(config: Record<string, (e: KeyboardEvent) => void | boolean>, ref: RefObject<any>, isActive: boolean): void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { RefObject } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* useOutsideClick handles outside click of a given element.
|
|
4
|
-
* @param {RefObject} ref - Reference to a DOM element.
|
|
5
|
-
* @param {e: Event) => void} handler - Function invoked when a click is triggered outside the referenced element.
|
|
6
|
-
* @param {boolean} isActive - A flag to determine when the outside click event needs to be applied.
|
|
7
|
-
*
|
|
8
|
-
* Example: useOutsideClick(menuRef, closeMenu, menuIsOpen)
|
|
9
|
-
* Means that when a menu is opened, clicking outside of the menu will close the mneu.
|
|
10
|
-
*/
|
|
11
|
-
export declare const useOutsideClick: (ref: RefObject<any>, handler: (e: Event) => void, isActive: boolean) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useWindow(): Window;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Literal, Union, Static } from "runtypes";
|
|
3
|
-
export declare const LinkTextSizeRuntype: Union<[Literal<"xs">, Literal<"s">, Literal<"m">, Literal<"l">]>;
|
|
4
|
-
export declare type LinkTextSize = Static<typeof LinkTextSizeRuntype>;
|
|
5
|
-
export declare const TextSizeRuntype: Union<[Literal<"xs">, Literal<"s">, Literal<"m">]>;
|
|
6
|
-
export declare type TextSize = Static<typeof TextSizeRuntype>;
|
|
7
|
-
export declare const TextAlignmentRuntype: Union<[Literal<"left">, Literal<"right">, Literal<"center">]>;
|
|
8
|
-
export declare type TextAlignment = Static<typeof TextAlignmentRuntype>;
|
|
9
|
-
export declare const HorizontalAlignmentRuntype: Union<[Literal<"left">, Literal<"right">, Literal<"center">, Literal<"spaceBetween">]>;
|
|
10
|
-
export declare type HorizontalAlignment = Static<typeof HorizontalAlignmentRuntype>;
|
|
11
|
-
export declare const VerticalAlignmentRuntype: Union<[Literal<"top">, Literal<"bottom">, Literal<"center">, Literal<"spaceBetween">]>;
|
|
12
|
-
export declare type VerticalAlignment = Static<typeof VerticalAlignmentRuntype>;
|
|
13
|
-
export declare const SpaceSizesRuntype: Union<[Literal<"zero">, Literal<"xxs">, Literal<"xs">, Literal<"s">, Literal<"m">, Literal<"l">, Literal<"xl">, Literal<"xxl">]>;
|
|
14
|
-
export declare type SpaceSizes = Static<typeof SpaceSizesRuntype>;
|
|
15
|
-
export declare const ColumsSizesRuntype: Union<[Literal<1>, Literal<2>, Literal<3>, Literal<4>, Literal<5>, Literal<6>, Literal<7>, Literal<8>, Literal<9>, Literal<10>, Literal<11>, Literal<12>, Literal<"auto">, Literal<"narrow">, Literal<"fill">]>;
|
|
16
|
-
export declare type ColumnSizes = Static<typeof ColumsSizesRuntype>;
|
|
17
|
-
export declare const ColumnAlignmentRunType: Union<[Literal<"auto">, Literal<"start">, Literal<"center">, Literal<"end">]>;
|
|
18
|
-
export declare type ColumnAlignment = Static<typeof ColumnAlignmentRunType>;
|
|
19
|
-
export declare const OrderRuntype: Union<[Literal<"first">, Literal<"last">, Literal<"unset">]>;
|
|
20
|
-
export declare type Order = Static<typeof OrderRuntype>;
|
|
21
|
-
export declare const BaseVariationsRuntype: Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>;
|
|
22
|
-
export declare type BaseVariations = Static<typeof BaseVariationsRuntype>;
|
|
23
|
-
declare const TextVariationsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"info">, Literal<"error">, Literal<"warning">]>;
|
|
24
|
-
export declare type TextVariations = Static<typeof TextVariationsRuntype>;
|
|
25
|
-
declare const IconsVariationsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>, Literal<"info">, Literal<"error">, Literal<"warning">, Literal<"inherit">]>;
|
|
26
|
-
export declare type IconsVariations = Static<typeof IconsVariationsRuntype>;
|
|
27
|
-
declare const CalloutVariationsRuntype: Union<[Literal<"info">, Literal<"success">, Literal<"error">, Literal<"warning">]>;
|
|
28
|
-
export declare type CalloutVariations = Static<typeof CalloutVariationsRuntype>;
|
|
29
|
-
declare const LinkVariationsRuntype: Union<[Union<[Literal<"primary">, Literal<"secondary">, Literal<"tertiary">]>]>;
|
|
30
|
-
export declare type LinkVariations = Static<typeof LinkVariationsRuntype>;
|
|
31
|
-
export declare type MQ<T> = [T, T?, T?];
|
|
32
|
-
declare const ButtonSizeRuntype: Union<[Literal<"s">, Literal<"m">, Literal<"l">]>;
|
|
33
|
-
export declare type ButtonSize = Static<typeof ButtonSizeRuntype>;
|
|
34
|
-
export declare const HyphensRuntype: Union<[Literal<"auto">, Literal<"none">, Literal<"manual">]>;
|
|
35
|
-
export declare type Hyphens = Static<typeof HyphensRuntype>;
|
|
36
|
-
export declare const ToggleSizeRuntype: Union<[Literal<"s">, Literal<"m">]>;
|
|
37
|
-
export declare type ToggleSize = Static<typeof ToggleSizeRuntype>;
|
|
38
|
-
export declare type AsProp<C extends React.ElementType> = {
|
|
39
|
-
as?: C;
|
|
40
|
-
};
|
|
41
|
-
declare type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
|
42
|
-
export declare type PolymorphicComponentProp<C extends React.ElementType, Props = {
|
|
43
|
-
as: "a";
|
|
44
|
-
}> = React.PropsWithChildren<Props & AsProp<C>> & Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
|
45
|
-
export {};
|