@altinn/altinn-components 0.28.1 → 0.29.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/dist/assets/Badge.css +1 -1
- package/dist/assets/Button.css +1 -1
- package/dist/assets/ButtonBase.css +1 -1
- package/dist/assets/ButtonIcon.css +1 -1
- package/dist/assets/ComboButton.css +1 -1
- package/dist/assets/Flex.css +1 -1
- package/dist/assets/Grid.css +1 -1
- package/dist/assets/Heading.css +1 -1
- package/dist/assets/List.css +1 -0
- package/dist/assets/ListItemControls.css +1 -1
- package/dist/assets/ListItemHeader.css +1 -1
- package/dist/assets/MenuItem.css +1 -0
- package/dist/assets/MenuItemBase.css +1 -1
- package/dist/assets/MenuItemLabel.css +1 -1
- package/dist/assets/MenuSearch.css +1 -1
- package/dist/assets/SearchField.css +1 -1
- package/dist/assets/SearchbarField.css +1 -0
- package/dist/assets/Section.css +1 -0
- package/dist/components/Account/AccountList.js +24 -0
- package/dist/components/Account/AccountListItem.js +58 -0
- package/dist/components/Account/AccountListItemControls.js +77 -0
- package/dist/components/Account/AccountMenu.js +56 -0
- package/dist/components/Account/index.js +8 -0
- package/dist/components/Badge/Badge.js +13 -3
- package/dist/components/Button/Button.js +49 -44
- package/dist/components/Button/ButtonBase.js +17 -15
- package/dist/components/Button/ButtonIcon.js +13 -7
- package/dist/components/Button/ComboButton.js +49 -33
- package/dist/components/Button/IconButton.js +31 -27
- package/dist/components/ContextMenu/ContextMenu.js +45 -48
- package/dist/components/Forms/SearchField.js +34 -0
- package/dist/components/Forms/index.js +14 -12
- package/dist/components/GlobalMenu/CurrentAccount.js +28 -0
- package/dist/components/GlobalMenu/GlobalMenu.js +70 -75
- package/dist/components/GlobalMenu/index.js +6 -8
- package/dist/components/Header/HeaderButton.js +1 -1
- package/dist/components/Icon/Icon.js +21 -22
- package/dist/components/Icon/IconOrAvatar.js +12 -12
- package/dist/components/List/List.js +9 -7
- package/dist/components/List/ListItemControls.js +1 -1
- package/dist/components/List/ListItemHeader.js +64 -57
- package/dist/components/List/ListItemLabel.js +36 -28
- package/dist/components/List/ListItemLink.js +32 -32
- package/dist/components/Menu/MenuItem.js +41 -41
- package/dist/components/Menu/MenuItemBase.js +33 -54
- package/dist/components/Menu/MenuItemLabel.js +58 -20
- package/dist/components/Menu/MenuOption.js +32 -41
- package/dist/components/Menu/MenuSearch.js +24 -43
- package/dist/components/Menu/index.js +24 -23
- package/dist/components/Page/Flex.js +5 -5
- package/dist/components/Page/Grid.js +24 -26
- package/dist/components/Page/Section.js +7 -5
- package/dist/components/Page/index.js +20 -22
- package/dist/components/Searchbar/Searchbar.js +6 -6
- package/dist/components/Searchbar/{SearchField.js → SearchbarField.js} +8 -8
- package/dist/components/Searchbar/index.js +6 -6
- package/dist/components/Settings/SettingsItem.js +27 -30
- package/dist/components/Toolbar/ToolbarAccountMenu.js +6 -6
- package/dist/components/Toolbar/ToolbarSearch.js +22 -43
- package/dist/components/Typography/Heading.js +7 -7
- package/dist/components/index.js +391 -390
- package/dist/index.js +397 -396
- package/dist/spacing.css +44 -8
- package/dist/types/lib/components/Account/AccountList.d.ts +10 -0
- package/dist/types/lib/components/Account/AccountList.stories.d.ts +18 -0
- package/dist/types/lib/components/Account/AccountListItem.d.ts +18 -0
- package/dist/types/lib/components/{Profile → Account}/AccountListItem.stories.d.ts +16 -7
- package/dist/types/lib/components/Account/AccountListItemControls.d.ts +17 -0
- package/dist/types/lib/components/Account/AccountMenu.d.ts +22 -0
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +15 -0
- package/dist/types/lib/components/{Profile → Account}/index.d.ts +1 -0
- package/dist/types/lib/components/Badge/Badge.d.ts +4 -1
- package/dist/types/lib/components/Badge/Badge.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/Button.d.ts +5 -5
- package/dist/types/lib/components/Button/Button.stories.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonBase.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +5 -5
- package/dist/types/lib/components/Button/ButtonLabel.d.ts +2 -2
- package/dist/types/lib/components/Button/ComboButton.d.ts +6 -4
- package/dist/types/lib/components/Button/IconButton.d.ts +4 -4
- package/dist/types/lib/components/ContextMenu/ContextMenu.d.ts +1 -3
- package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +2 -1
- package/dist/types/lib/components/Forms/SearchField.d.ts +9 -0
- package/dist/types/lib/components/Forms/SearchField.stories.d.ts +16 -0
- package/dist/types/lib/components/Forms/index.d.ts +1 -0
- package/dist/types/lib/components/GlobalMenu/{AccountButton.d.ts → CurrentAccount.d.ts} +3 -2
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.d.ts +4 -4
- package/dist/types/lib/components/GlobalMenu/GlobalMenu.stories.d.ts +8 -11
- package/dist/types/lib/components/GlobalMenu/index.d.ts +1 -2
- package/dist/types/lib/components/Header/Header.stories.d.ts +8 -7
- package/dist/types/lib/components/Header/LocaleSwitcher.stories.d.ts +3 -1
- package/dist/types/lib/components/Icon/Icon.d.ts +1 -3
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +1 -0
- package/dist/types/lib/components/List/List.d.ts +1 -1
- package/dist/types/lib/components/List/List.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItem.d.ts +24 -1
- package/dist/types/lib/components/List/ListItem.stories.d.ts +1 -1
- package/dist/types/lib/components/List/ListItemLabel.d.ts +2 -1
- package/dist/types/lib/components/List/ListItemLink.d.ts +3 -5
- package/dist/types/lib/components/List/Specimens.stories.d.ts +1 -1
- package/dist/types/lib/components/Menu/Menu.stories.d.ts +5 -0
- package/dist/types/lib/components/Menu/MenuItem.d.ts +7 -9
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -5
- package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +6 -4
- package/dist/types/lib/components/Menu/MenuSearch.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +1 -1
- package/dist/types/lib/components/Page/Breadcrumbs.stories.d.ts +19 -0
- package/dist/types/lib/components/Page/BreadcrumbsLink.d.ts +1 -1
- package/dist/types/lib/components/Page/Flex.d.ts +1 -1
- package/dist/types/lib/components/Page/Flex.stories.d.ts +17 -0
- package/dist/types/lib/components/Page/Grid.d.ts +5 -8
- package/dist/types/lib/components/Page/Grid.stories.d.ts +15 -0
- package/dist/types/lib/components/Page/List.stories.d.ts +17 -0
- package/dist/types/lib/components/Page/Section.d.ts +2 -1
- package/dist/types/lib/components/Page/index.d.ts +0 -1
- package/dist/types/lib/components/Search/SearchItem.d.ts +2 -2
- package/dist/types/lib/components/Searchbar/Searchbar.d.ts +2 -2
- package/dist/types/lib/components/Searchbar/{SearchField.d.ts → SearchbarField.d.ts} +2 -2
- package/dist/types/lib/components/Searchbar/index.d.ts +1 -1
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +5 -6
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +8 -7
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +2 -5
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -0
- package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +7 -8
- package/dist/types/lib/components/Typography/Heading.d.ts +1 -1
- package/dist/types/lib/components/index.d.ts +1 -1
- package/dist/types/lib/stories/Profile/Accounts.stories.d.ts +6 -11
- package/package.json +1 -1
- package/dist/assets/AccountButton.css +0 -1
- package/dist/assets/IconButton.css +0 -1
- package/dist/assets/MenuOption.css +0 -1
- package/dist/assets/ToolbarSearch.css +0 -1
- package/dist/components/GlobalMenu/AccountButton.js +0 -58
- package/dist/components/GlobalMenu/AccountMenu.js +0 -72
- package/dist/components/Page/PageHeader.js +0 -55
- package/dist/components/Profile/AccountList.js +0 -12
- package/dist/components/Profile/AccountListItem.js +0 -86
- package/dist/components/Profile/index.js +0 -6
- package/dist/types/lib/components/GlobalMenu/AccountMenu.d.ts +0 -27
- package/dist/types/lib/components/GlobalMenu/AccountMenu.stories.d.ts +0 -19
- package/dist/types/lib/components/Menu/Examples.stories.d.ts +0 -97
- package/dist/types/lib/components/Page/PageHeader.d.ts +0 -18
- package/dist/types/lib/components/Page/PageHeader.stories.d.ts +0 -16
- package/dist/types/lib/components/Profile/AccountList.d.ts +0 -5
- package/dist/types/lib/components/Profile/AccountListItem.d.ts +0 -12
|
@@ -31,4 +31,27 @@ export interface ListItemInputProps extends ListItemProps {
|
|
|
31
31
|
/** Child items */
|
|
32
32
|
items?: ListItemProps[];
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
/**
|
|
35
|
+
* `ListItem` is a compound component that combines `ListItemBase` and `ListItemHeader`
|
|
36
|
+
* to render a stylized, optionally interactive list item with support for various visual states
|
|
37
|
+
* such as loading, selection, and expansion. It supports customization of appearance through variants,
|
|
38
|
+
* shadows, borders, and iconography.
|
|
39
|
+
*
|
|
40
|
+
* @param {Object} props - Component props
|
|
41
|
+
* @param {string} [props.id] - Unique identifier for the list item.
|
|
42
|
+
* @param {'default' | 'subtle' | 'tinted'} [props.variant='default'] - Visual style variant of the item.
|
|
43
|
+
* @param {string} [props.className] - Custom class name for additional styling.
|
|
44
|
+
* @param {boolean} [props.loading] - Whether to show a loading placeholder.
|
|
45
|
+
* @param {ReactNode | () => ReactElement} [props.label] - Custom label, can be a node or a function returning a ReactElement.
|
|
46
|
+
* @param {ReactNode} [props.title] - Title content of the item.
|
|
47
|
+
* @param {ReactNode} [props.description] - Optional description beneath the title.
|
|
48
|
+
* @param {string} [props.ariaLabel] - ARIA label used for accessibility, defaults to `title` if not provided.
|
|
49
|
+
* @param {ReactNode} [props.icon] - Icon element displayed alongside the content.
|
|
50
|
+
* @param {ReactNode} [props.badge] - Optional badge displayed near the title.
|
|
51
|
+
* @param {boolean} [props.linkIcon=false] - Whether to display a link icon.
|
|
52
|
+
* @param {...ListItemBaseProps} props - Additional props inherited from `ListItemBase` for layout and interaction.
|
|
53
|
+
* @param {...ListItemHeaderProps} props - Additional props inherited from `ListItemHeader` for header controls and behavior.
|
|
54
|
+
*
|
|
55
|
+
* @returns {ReactElement} Rendered ListItem component.
|
|
56
|
+
*/
|
|
57
|
+
export declare const ListItem: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => ReactElement;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { ListItemProps } from '../';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) =>
|
|
5
|
+
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
8
8
|
id: string;
|
|
@@ -6,8 +6,9 @@ export interface ListItemLabelProps {
|
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
size?: ListItemSize;
|
|
8
8
|
title?: HeadingProps | ReactNode | string;
|
|
9
|
+
value?: HeadingProps | ReactNode | string;
|
|
9
10
|
description?: HeadingProps | ReactNode | string;
|
|
10
11
|
children?: ReactNode;
|
|
11
12
|
className?: string;
|
|
12
13
|
}
|
|
13
|
-
export declare const ListItemLabel: ({ loading, size, title, description, children, id, className, }: ListItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const ListItemLabel: ({ loading, size, title, value, description, children, id, className, }: ListItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { ElementType, KeyboardEventHandler
|
|
1
|
+
import { ElementType, KeyboardEventHandler } from 'react';
|
|
2
2
|
export interface ListItemLinkProps {
|
|
3
|
-
interactive?: boolean;
|
|
4
3
|
as?: ElementType;
|
|
5
4
|
href?: string;
|
|
6
5
|
onClick?: () => void;
|
|
7
6
|
onKeyPress?: KeyboardEventHandler;
|
|
7
|
+
ariaLabel?: string;
|
|
8
8
|
tabIndex?: number;
|
|
9
9
|
loading?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
className?: string;
|
|
13
|
-
children?: ReactNode;
|
|
14
13
|
active?: boolean;
|
|
15
|
-
describedby?: string;
|
|
16
14
|
}
|
|
17
|
-
export declare const ListItemLink: ({
|
|
15
|
+
export declare const ListItemLink: ({ as, loading, disabled, selected, href, onClick, onKeyPress, className, active, ariaLabel, }: ListItemLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ListItemProps } from '../';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) =>
|
|
4
|
+
component: ({ className, color, variant, shadow, border, loading, collapsible, expanded, size, icon, label, title, description, badge, linkIcon, select, selected, controls, children, interactive, id, ...rest }: ListItemProps) => React.ReactElement;
|
|
5
5
|
parameters: {};
|
|
6
6
|
args: {
|
|
7
7
|
id: string;
|
|
@@ -9,4 +9,9 @@ export default meta;
|
|
|
9
9
|
type Story = StoryObj<typeof meta>;
|
|
10
10
|
export declare const Default: Story;
|
|
11
11
|
export declare const CreatingHiearchy: Story;
|
|
12
|
+
export declare const AddingBadges: Story;
|
|
12
13
|
export declare const NestingItems: Story;
|
|
14
|
+
export declare const AccountRelationships: Story;
|
|
15
|
+
export declare const PersonMenu: Story;
|
|
16
|
+
export declare const InboxMenu: Story;
|
|
17
|
+
export declare const CompanyMenu: Story;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { MenuItemColor, MenuItemIconProps, MenuItemSize, MenuItemTheme } from './';
|
|
2
|
+
import { BadgeProps, MenuItemColor, MenuItemIconProps, MenuItemLabelProps, MenuItemSize, MenuItemTheme } from '../';
|
|
4
3
|
export interface MenuItemProps {
|
|
5
4
|
id: string;
|
|
6
5
|
type?: string;
|
|
@@ -18,18 +17,17 @@ export interface MenuItemProps {
|
|
|
18
17
|
selected?: boolean;
|
|
19
18
|
disabled?: boolean;
|
|
20
19
|
groupId?: string | number;
|
|
21
|
-
title?:
|
|
22
|
-
description?:
|
|
20
|
+
title?: MenuItemLabelProps['title'];
|
|
21
|
+
description?: MenuItemLabelProps['description'];
|
|
23
22
|
icon?: MenuItemIconProps['icon'];
|
|
24
23
|
iconTheme?: MenuItemIconProps['theme'];
|
|
25
24
|
iconBadge?: MenuItemIconProps['badge'];
|
|
26
|
-
avatar?: AvatarProps;
|
|
27
|
-
avatarGroup?: AvatarGroupProps;
|
|
28
25
|
badge?: BadgeProps | undefined;
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
/** Custom controls */
|
|
27
|
+
controls?: ReactNode;
|
|
28
|
+
linkIcon?: boolean;
|
|
31
29
|
className?: string;
|
|
32
30
|
label?: ReactNode;
|
|
33
31
|
items?: MenuItemProps[];
|
|
34
32
|
}
|
|
35
|
-
export declare const MenuItem: ({ as, size, color, theme, collapsible, expanded, icon, iconTheme, iconBadge,
|
|
33
|
+
export declare const MenuItem: ({ as, size, color, theme, collapsible, expanded, icon, iconTheme, iconBadge, title, description, badge, controls, linkIcon, label, ...rest }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Color } from '..';
|
|
3
3
|
export type MenuItemColor = Color;
|
|
4
4
|
export type MenuItemSize = 'sm' | 'md' | 'lg';
|
|
5
5
|
export type MenuItemTheme = 'default' | 'subtle' | 'surface' | 'base';
|
|
@@ -19,8 +19,5 @@ export interface MenuItemBaseProps {
|
|
|
19
19
|
selected?: boolean;
|
|
20
20
|
expanded?: boolean;
|
|
21
21
|
children?: ReactNode;
|
|
22
|
-
badge?: BadgeProps | undefined;
|
|
23
|
-
linkIcon?: SvgElement;
|
|
24
|
-
linkText?: string;
|
|
25
22
|
}
|
|
26
|
-
export declare const MenuItemBase: ({ as, color, theme, size, className, href, onClick, onKeyPress, tabIndex, hidden, selected, disabled,
|
|
23
|
+
export declare const MenuItemBase: ({ as, color, theme, size, className, href, onClick, onKeyPress, tabIndex, hidden, selected, disabled, children, }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { BadgeProps, HeadingProps } from '..';
|
|
2
3
|
import { MenuItemSize } from './MenuItemBase';
|
|
3
4
|
export interface MenuItemLabelProps {
|
|
4
5
|
className?: string;
|
|
5
6
|
size?: MenuItemSize;
|
|
6
7
|
label?: string;
|
|
7
|
-
title?: string;
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
title?: HeadingProps | ReactNode | string;
|
|
9
|
+
description?: HeadingProps | ReactNode | string;
|
|
10
|
+
badge?: BadgeProps;
|
|
10
11
|
children?: ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export declare
|
|
13
|
+
export declare function getAriaLabelFromTitle(title: HeadingProps | ReactNode | string): string | undefined;
|
|
14
|
+
export declare const MenuItemLabel: ({ className, size, title, badge, description, children }: MenuItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,4 +7,4 @@ export interface MenuSearchProps {
|
|
|
7
7
|
onChange?: ChangeEventHandler;
|
|
8
8
|
onClear?: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare const MenuSearch: ({
|
|
10
|
+
export declare const MenuSearch: ({ name, value, placeholder, clearButtonAltText, onChange, onClear, }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { MenuSearchProps } from './MenuSearch';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({
|
|
5
|
+
component: ({ name, value, placeholder, clearButtonAltText, onChange, onClear, }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {};
|
|
8
8
|
args: {
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ items }: import('./Breadcrumbs').BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {};
|
|
7
|
+
args: {
|
|
8
|
+
items: ({
|
|
9
|
+
label: string;
|
|
10
|
+
href: string;
|
|
11
|
+
} | {
|
|
12
|
+
label: string;
|
|
13
|
+
href?: undefined;
|
|
14
|
+
})[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<typeof meta>;
|
|
19
|
+
export declare const Default: Story;
|
|
@@ -3,7 +3,7 @@ import { Color, Range, Shadow, Theme } from '..';
|
|
|
3
3
|
export type FlexDirection = 'col' | 'row';
|
|
4
4
|
export type FlexAlign = 'initial' | 'start' | 'end' | 'center' | 'stretch';
|
|
5
5
|
export type FlexJustify = 'initial' | 'start' | 'end' | 'center' | 'between';
|
|
6
|
-
export type FlexSpacing = 'page' | 'xs' | Range<11>;
|
|
6
|
+
export type FlexSpacing = 'page' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | Range<11>;
|
|
7
7
|
export type FlexPadding = 'page' | Range<11>;
|
|
8
8
|
export type FlexMargin = 0 | 'page' | 'section' | 'bottom';
|
|
9
9
|
export type FlexSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ as, color, size, theme, shadow, direction, reverse, align, justify, spacing, padding, margin, bleed, className, style, children, ...rest }: import('./Flex').FlexProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {};
|
|
7
|
+
args: {
|
|
8
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const Size: Story;
|
|
15
|
+
export declare const Spacing: Story;
|
|
16
|
+
export declare const Column: Story;
|
|
17
|
+
export declare const ColumnSpacing: Story;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { Color, Range, Theme } from '..';
|
|
3
|
-
export type GridElement = 'div' | 'section' | 'article' | 'header' | 'footer' | 'ul';
|
|
2
|
+
import { Color, Range, Size, Theme } from '..';
|
|
3
|
+
export type GridElement = 'div' | 'section' | 'article' | 'header' | 'footer' | 'ol' | 'ul';
|
|
4
4
|
export type GridCols = 2 | 3 | 4;
|
|
5
|
-
export type GridSpacing = 'xs' | Range<11>;
|
|
6
|
-
export type GridPadding = 'page' | Range<11>;
|
|
7
|
-
export type GridMargin = 'page' | 'section';
|
|
5
|
+
export type GridSpacing = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | Range<11>;
|
|
8
6
|
export interface GridProps {
|
|
9
7
|
as?: GridElement;
|
|
10
8
|
color?: Color;
|
|
11
9
|
theme?: Theme;
|
|
10
|
+
size?: Size;
|
|
12
11
|
cols?: GridCols;
|
|
13
12
|
reverse?: boolean;
|
|
14
13
|
spacing?: GridSpacing;
|
|
15
|
-
padding?: GridPadding;
|
|
16
|
-
margin?: GridMargin;
|
|
17
14
|
children?: ReactNode;
|
|
18
15
|
className?: string;
|
|
19
16
|
style?: CSSProperties;
|
|
20
17
|
}
|
|
21
|
-
export declare const Grid: ({ as, theme, color, cols, reverse, spacing,
|
|
18
|
+
export declare const Grid: ({ as, size, theme, color, cols, reverse, spacing, className, style, children, }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ as, size, theme, color, cols, reverse, spacing, className, style, children, }: import('./Grid').GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {};
|
|
7
|
+
args: {
|
|
8
|
+
as: "ul";
|
|
9
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Large: Story;
|
|
15
|
+
export declare const Small: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: ({ children, className, spacing, items, ...rest }: import('../List').ListProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {};
|
|
7
|
+
args: {
|
|
8
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const XSmall: Story;
|
|
14
|
+
export declare const Small: Story;
|
|
15
|
+
export declare const Medium: Story;
|
|
16
|
+
export declare const Large: Story;
|
|
17
|
+
export declare const XLarge: Story;
|
|
@@ -3,6 +3,7 @@ import { FlexProps } from '..';
|
|
|
3
3
|
* Section component. Use to divide pages into sections. Should renders a flex column by default.
|
|
4
4
|
*/
|
|
5
5
|
export interface SectionProps extends FlexProps {
|
|
6
|
+
variant?: 'default' | 'subtle' | 'tinted';
|
|
6
7
|
bleed?: boolean;
|
|
7
8
|
}
|
|
8
|
-
export declare const Section: ({ as, direction, children, ...rest }:
|
|
9
|
+
export declare const Section: ({ as, direction, variant, className, children, ...rest }: SectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarProps, IconProps, ListItemBaseProps,
|
|
2
|
+
import { AvatarProps, IconProps, ListItemBaseProps, ListItemLinkProps } from '..';
|
|
3
3
|
export interface SearchCategory {
|
|
4
4
|
name?: string;
|
|
5
5
|
icon?: IconProps;
|
|
6
6
|
}
|
|
7
|
-
export interface SearchItemProps extends ListItemBaseProps,
|
|
7
|
+
export interface SearchItemProps extends ListItemBaseProps, ListItemLinkProps {
|
|
8
8
|
id?: string;
|
|
9
9
|
title?: ReactNode;
|
|
10
10
|
summary?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AutocompleteProps,
|
|
2
|
-
export interface SearchbarProps extends
|
|
1
|
+
import { AutocompleteProps, SearchbarFieldProps } from '..';
|
|
2
|
+
export interface SearchbarProps extends SearchbarFieldProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
autocomplete?: AutocompleteProps;
|
|
5
5
|
expanded?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, FocusEventHandler } from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface SearchbarFieldProps {
|
|
3
3
|
name: string;
|
|
4
4
|
value?: string;
|
|
5
5
|
className?: string;
|
|
@@ -15,4 +15,4 @@ export interface SearchFieldProps {
|
|
|
15
15
|
onEnter?: () => void;
|
|
16
16
|
tabIndex?: number;
|
|
17
17
|
}
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const SearchbarField: ({ className, expanded, name, value, placeholder, closeButtonAltText, clearButtonAltText, onFocus, onBlur, onChange, onClear, onClose, onEnter, tabIndex, }: SearchbarFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ListItemBaseProps, ListItemHeaderProps } from '..';
|
|
1
|
+
import { ListItemBaseProps, ListItemHeaderProps, ListItemLabelProps } from '..';
|
|
2
2
|
export interface SettingsItemProps extends ListItemBaseProps, ListItemHeaderProps {
|
|
3
3
|
id?: string;
|
|
4
4
|
collapsible?: boolean;
|
|
5
5
|
expanded?: boolean;
|
|
6
|
-
icon?: ListItemHeaderProps['icon'];
|
|
7
6
|
label?: ListItemHeaderProps['children'];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
description?:
|
|
7
|
+
title?: ListItemLabelProps['title'];
|
|
8
|
+
value?: ListItemLabelProps['value'];
|
|
9
|
+
description?: ListItemLabelProps['description'];
|
|
11
10
|
}
|
|
12
|
-
export declare const SettingsItem: ({ color, size, expanded, icon, label, title, value, description, children, ...
|
|
11
|
+
export declare const SettingsItem: ({ color, size, expanded, icon, label, title, value, description, children, ...props }: SettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ color, size, expanded, icon, label, title, value, description, children, ...
|
|
4
|
+
component: ({ color, size, expanded, icon, label, title, value, description, children, ...props }: import('./SettingsItem').SettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
|
-
args: {
|
|
7
|
+
args: {
|
|
8
|
+
ariaLabel: string;
|
|
9
|
+
};
|
|
8
10
|
decorators: ((Story: import('@storybook/core/csf').PartialStoryFn<import('@storybook/react').ReactRenderer, {
|
|
9
11
|
id?: string | undefined;
|
|
10
12
|
collapsible?: boolean | undefined;
|
|
11
13
|
expanded?: boolean | undefined;
|
|
12
|
-
icon?: import('..').SvgElement | import('..').IconProps | React.ReactNode | import('..').AvatarProps | import('..').AvatarGroupProps;
|
|
13
14
|
label?: React.ReactNode;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
description?:
|
|
15
|
+
title?: React.ReactNode | import('..').HeadingProps;
|
|
16
|
+
value?: React.ReactNode | import('..').HeadingProps;
|
|
17
|
+
description?: React.ReactNode | import('..').HeadingProps;
|
|
17
18
|
interactive?: boolean | undefined;
|
|
18
19
|
as?: React.ElementType | undefined;
|
|
19
20
|
tabIndex?: number | undefined;
|
|
@@ -32,13 +33,13 @@ declare const meta: {
|
|
|
32
33
|
children?: React.ReactNode;
|
|
33
34
|
select?: import('..').ListItemSelectProps | undefined;
|
|
34
35
|
linkIcon?: boolean | undefined;
|
|
36
|
+
icon?: import('..').SvgElement | import('..').IconProps | React.ReactNode | import('..').AvatarProps | import('..').AvatarGroupProps;
|
|
35
37
|
badge?: React.ReactNode | import('..').BadgeProps;
|
|
36
38
|
controls?: React.ReactNode;
|
|
37
39
|
ariaLabel?: string | undefined;
|
|
38
40
|
href?: string | undefined;
|
|
39
41
|
onClick?: (() => void) | undefined;
|
|
40
42
|
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
41
|
-
describedby?: string | undefined;
|
|
42
43
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
43
44
|
};
|
|
44
45
|
export default meta;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
|
-
import { Toolbar } from '
|
|
2
|
+
import { Toolbar } from '..';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: ({ filters, filterState, onFilterStateChange, search, accountMenu, getFilterLabel, children, showResultsLabel, removeButtonAltText, addFilterButtonLabel, }: import('./Toolbar').ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface ToolbarSearchProps {
|
|
1
|
+
import { SearchFieldProps } from '../';
|
|
2
|
+
export interface ToolbarSearchProps extends SearchFieldProps {
|
|
3
3
|
placeholder?: string;
|
|
4
|
-
clearButtonAltText?: string;
|
|
5
4
|
name: string;
|
|
6
5
|
value?: string;
|
|
7
|
-
onChange?: ChangeEventHandler;
|
|
8
|
-
onClear?: () => void;
|
|
9
6
|
}
|
|
10
7
|
export declare const ToolbarSearch: ({ value, name, placeholder, clearButtonAltText, onChange, onClear, }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -19,7 +19,6 @@ declare const meta: {
|
|
|
19
19
|
children?: React.ReactNode | (() => React.ReactElement);
|
|
20
20
|
border?: import('..').ListItemBorder | undefined;
|
|
21
21
|
loading?: boolean | undefined;
|
|
22
|
-
variant?: import('..').ListItemVariant | undefined;
|
|
23
22
|
size?: import('..').ListItemSize | undefined;
|
|
24
23
|
color?: import('..').ListItemColor | undefined;
|
|
25
24
|
className?: string | undefined;
|
|
@@ -27,6 +26,7 @@ declare const meta: {
|
|
|
27
26
|
as?: React.ElementType | undefined;
|
|
28
27
|
label?: React.ReactNode | (() => React.ReactElement);
|
|
29
28
|
select?: import('..').ListItemSelectProps | undefined;
|
|
29
|
+
variant?: import('..').ListItemVariant | undefined;
|
|
30
30
|
hidden?: boolean | undefined;
|
|
31
31
|
expanded?: boolean | undefined;
|
|
32
32
|
active?: boolean | undefined;
|
|
@@ -34,17 +34,16 @@ declare const meta: {
|
|
|
34
34
|
href?: string | undefined;
|
|
35
35
|
controls?: React.ReactNode;
|
|
36
36
|
selected?: boolean | undefined;
|
|
37
|
-
|
|
37
|
+
tabIndex?: number | undefined;
|
|
38
|
+
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
39
|
+
onClick?: (() => void) | undefined;
|
|
40
|
+
onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
41
|
+
collapsible?: boolean | undefined;
|
|
38
42
|
description?: React.ReactNode | import('..').HeadingProps;
|
|
39
43
|
linkIcon?: boolean | undefined;
|
|
40
44
|
interactive?: boolean | undefined;
|
|
41
|
-
|
|
45
|
+
ariaLabel?: string | undefined;
|
|
42
46
|
shadow?: import('..').Shadow | undefined;
|
|
43
|
-
onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
44
|
-
collapsible?: boolean | undefined;
|
|
45
|
-
onClick?: (() => void) | undefined;
|
|
46
|
-
onKeyPress?: React.KeyboardEventHandler | undefined;
|
|
47
|
-
describedby?: string | undefined;
|
|
48
47
|
};
|
|
49
48
|
};
|
|
50
49
|
export default meta;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { TypographyProps } from '..';
|
|
3
|
-
export type HeadingSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'inherit';
|
|
3
|
+
export type HeadingSize = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'inherit';
|
|
4
4
|
export type HeadingWeight = 'normal' | 'medium' | 'bold';
|
|
5
5
|
export type HeadingLeading = 'none' | 'tight' | 'normal';
|
|
6
6
|
export type HeadingComponent = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from '../types/';
|
|
2
2
|
export * from './Attachment';
|
|
3
3
|
export * from './Avatar';
|
|
4
|
+
export * from './Account';
|
|
4
5
|
export * from './Badge';
|
|
5
6
|
export * from './Bookmarks';
|
|
6
7
|
export * from './Button';
|
|
@@ -18,7 +19,6 @@ export * from './LayoutAction';
|
|
|
18
19
|
export * from './List';
|
|
19
20
|
export * from './Menu';
|
|
20
21
|
export * from './Metadata';
|
|
21
|
-
export * from './Profile';
|
|
22
22
|
export * from './RootProvider';
|
|
23
23
|
export * from './Search';
|
|
24
24
|
export * from './Searchbar';
|
|
@@ -3,17 +3,12 @@ declare const meta: {
|
|
|
3
3
|
title: string;
|
|
4
4
|
tags: string[];
|
|
5
5
|
parameters: {};
|
|
6
|
-
args: {
|
|
7
|
-
items: AccountListItemProps[];
|
|
8
|
-
};
|
|
6
|
+
args: {};
|
|
9
7
|
};
|
|
10
8
|
export default meta;
|
|
11
9
|
export declare const Accounts: () => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const CompanyDetails: () => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare const PersonDetails: () => import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare const GroupDetails: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const AccountDetails: ({ type, ...props }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const AccountToolbar: ({ id, isCurrentEndUser, favourite, onToggleFavourite, }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const CompanyDetails: ({ id, parentId, uniqueId, ...props }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const PersonDetails: ({ id, ...props }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const GroupDetails: ({ accountIds }: AccountListItemProps) => import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._label_1dcj3_1{display:flex;flex-direction:column;padding:0 .25rem}._title_1dcj3_7[data-size=lg]{font-size:1rem;line-height:1.25;font-weight:500}._description_1dcj3_13{font-size:.875rem;color:var(--ds-color-text-subtle)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._button_hmev5_1{display:flex;align-items:center;justify-content:center;border-radius:2px}._button_hmev5_1[data-size=xs]{width:2.25rem;height:2.25rem}._button_hmev5_1[data-size=sm]{width:2.625rem;height:2.625rem}._button_hmev5_1[data-size=md]{width:3rem;height:3rem}._button_hmev5_1[data-size=lg]{width:3.5rem;height:3.5rem}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._base_igy0i_1{padding-left:6px}._base_igy0i_1:hover [data-hover=true]{opacity:1}._label_igy0i_9{display:block;white-space:nowrap;text-overflow:ellipsis;width:max-content;overflow:hidden;max-width:240px}._input_igy0i_18{position:absolute;opacity:0}._icon_igy0i_23{flex-shrink:0;font-size:1rem;display:flex;align-items:center;justify-content:center}._icon_igy0i_23{color:var(--ds-color-base-default)}._icon_igy0i_23 [data-hover=true]{opacity:0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._field_3uyps_1{position:relative}._icon_3uyps_5{position:absolute;top:0;left:0;font-size:1.25rem;color:var(--ds-color-text-subtle);margin:8px}._input_3uyps_14{width:100%;font-size:.875rem;line-height:1rem;font-weight:500;padding:9px 32px;border-radius:2px;border:1px solid;border-color:var(--ds-color-border-default);background-color:var(--ds-color-background-default)}._input_3uyps_14[type=search]::-webkit-search-decoration,._input_3uyps_14[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}._clear_3uyps_31{position:absolute;top:0;right:0;margin:8px;border-radius:100%;width:1.25rem;height:1.25rem}
|