@altinn/altinn-components 0.15.5 → 0.17.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/README.md +23 -19
- package/dist/ArrowLeft-C91mClJx.js +25 -0
- package/dist/ArrowRedo-BYz1MHxK.js +25 -0
- package/dist/ArrowRight-OLgmLkGy.js +25 -0
- package/dist/Bookmark-85oKfr9m.js +25 -0
- package/dist/Buildings2-DO6ftvL7.js +25 -0
- package/dist/ChevronDown-CRAwzuD3.js +25 -0
- package/dist/ChevronRight-DUaHaWi-.js +25 -0
- package/dist/ChevronUp-H8Nuww4h.js +25 -0
- package/dist/ClockDashed-PQgzLSPC.js +25 -0
- package/dist/DocPencil-CVby07uu.js +25 -0
- package/dist/Eye-CMPIjkcy.js +25 -0
- package/dist/Handshake-Bz9FuL-x.js +25 -0
- package/dist/Inbox-z7qqLz8Y.js +25 -0
- package/dist/ListItemBase-BVx5MDhO.js +83 -0
- package/dist/MagnifyingGlass-DWIcpwS4.js +25 -0
- package/dist/Package-ASRzCHA7.js +25 -0
- package/dist/PadlockLocked-xJsxvaHH.js +25 -0
- package/dist/Plus-B6MBOAcH.js +25 -0
- package/dist/Trash-DMlYh49i.js +44 -0
- package/dist/XMark-Bv1I87Ev.js +25 -0
- package/dist/assets/Flex.css +1 -1
- package/dist/assets/ListItemBase.css +1 -1
- package/dist/assets/ListItemIcon.css +1 -1
- package/dist/companyAccess-DVKbpCnw.js +626 -0
- package/dist/companyMenuItems-E0wNQAfZ.js +105 -0
- package/dist/components/AccessAreaList/AccessAreaList.js +4 -5
- package/dist/components/AccessAreaList/AccessAreaListItem.js +22 -27
- package/dist/components/AccessPackageList/AccessPackageList.js +2 -3
- package/dist/components/AccessPackageList/AccessPackageListItem.js +2 -3
- package/dist/components/Attachment/AttachmentLink.js +30 -11
- package/dist/components/Bookmarks/BookmarksListItem.js +2 -3
- package/dist/components/Bookmarks/BookmarksSection.js +21 -22
- package/dist/components/Bookmarks/EditableBookmark.js +39 -28
- package/dist/components/Button/Button.js +13 -11
- package/dist/components/Button/ButtonBase.js +22 -20
- package/dist/components/Button/ButtonIcon.js +5 -6
- package/dist/components/Button/ComboButton.js +27 -25
- package/dist/components/Button/IconButton.js +17 -15
- package/dist/components/Byline/Byline.js +7 -8
- package/dist/components/ContextMenu/ContextMenu.js +51 -32
- package/dist/components/Datepicker/DatepickerHeader.js +34 -14
- package/dist/components/Datepicker/DatepickerTable.js +10 -11
- package/dist/components/Dialog/ActivityItem.js +6 -7
- package/dist/components/Dialog/ActivityItemDetails.js +9 -10
- package/dist/components/Dialog/ActivityLog.js +2 -3
- package/dist/components/Dialog/Dialog.js +2 -3
- package/dist/components/Dialog/DialogActions.js +25 -23
- package/dist/components/Dialog/DialogActivityLog.js +3 -3
- package/dist/components/Dialog/DialogAttachments.js +2 -3
- package/dist/components/Dialog/DialogBody.js +2 -3
- package/dist/components/Dialog/DialogByline.js +8 -9
- package/dist/components/Dialog/DialogContent.js +2 -3
- package/dist/components/Dialog/DialogHeader.js +4 -5
- package/dist/components/Dialog/DialogHeading.js +4 -5
- package/dist/components/Dialog/DialogHistory.js +61 -25
- package/dist/components/Dialog/DialogLabel.js +8 -8
- package/dist/components/Dialog/DialogList.js +2 -3
- package/dist/components/Dialog/DialogListGroup.js +33 -14
- package/dist/components/Dialog/DialogListItem.js +27 -29
- package/dist/components/Dialog/DialogMetadata.js +79 -40
- package/dist/components/Dialog/DialogSection.js +2 -3
- package/dist/components/Dialog/DialogSeenBy.js +33 -13
- package/dist/components/Dialog/DialogSelect.js +4 -5
- package/dist/components/Dialog/DialogStatus.js +7 -8
- package/dist/components/Dialog/DialogTimeline.js +6 -7
- package/dist/components/Dialog/DialogTimelineItem.js +4 -5
- package/dist/components/Dialog/DialogTransmissions.js +2 -3
- package/dist/components/Dialog/SeenByLog.js +5 -7
- package/dist/components/Dropdown/DrawerButton.js +2 -3
- package/dist/components/Dropdown/DrawerHeader.js +19 -9
- package/dist/components/Dropdown/DrawerOrDropdown.js +2 -3
- package/dist/components/GlobalMenu/AccountButton.js +3 -3
- package/dist/components/GlobalMenu/AccountMenu.js +9 -10
- package/dist/components/GlobalMenu/BackButton.js +5 -5
- package/dist/components/GlobalMenu/GlobalMenu.js +14 -15
- package/dist/components/GlobalMenu/LogoutButton.js +2 -3
- package/dist/components/Header/Header.js +2 -3
- package/dist/components/Header/HeaderBase.js +2 -3
- package/dist/components/Header/HeaderButton.js +35 -34
- package/dist/components/Header/HeaderLogo.js +4 -5
- package/dist/components/Icon/Icon.js +7 -13
- package/dist/components/Icon/IconOrAvatar.js +14 -16
- package/dist/components/Icon/index.js +8 -12
- package/dist/components/Layout/Layout.js +6 -7
- package/dist/components/LayoutAction/ActionHeader.js +25 -14
- package/dist/components/LayoutAction/LayoutAction.js +2 -3
- package/dist/components/List/List.js +5 -6
- package/dist/components/List/ListBase.js +1 -2
- package/dist/components/List/ListItem.js +85 -82
- package/dist/components/List/ListItemBase.js +4 -78
- package/dist/components/List/ListItemHeader.js +57 -58
- package/dist/components/List/ListItemIcon.js +6 -6
- package/dist/components/List/ListItemSelect.js +4 -5
- package/dist/components/List/index.js +1 -1
- package/dist/components/Menu/MenuItem.js +32 -31
- package/dist/components/Menu/MenuItemBase.js +22 -23
- package/dist/components/Menu/MenuItemIcon.js +2 -3
- package/dist/components/Menu/MenuItems.js +20 -21
- package/dist/components/Menu/MenuOption.js +5 -6
- package/dist/components/Menu/MenuSearch.js +32 -14
- package/dist/components/Meta/MetaItemMedia.js +7 -8
- package/dist/components/Page/Breadcrumbs.js +11 -11
- package/dist/components/Page/BreadcrumbsLink.js +9 -11
- package/dist/components/Page/ContactSection.js +4 -5
- package/dist/components/Page/Flex.js +7 -7
- package/dist/components/Page/PageHeader.js +8 -9
- package/dist/components/Page/PageMenu.js +6 -7
- package/dist/components/Page/PageNav.js +13 -13
- package/dist/components/Page/PageTabs.js +2 -3
- package/dist/components/Page/Section.js +2 -3
- package/dist/components/ResourceList/ResourceList.js +2 -3
- package/dist/components/ResourceList/ResourceListItem.js +2 -3
- package/dist/components/Search/Autocomplete.js +25 -23
- package/dist/components/Search/AutocompleteItem.js +2 -3
- package/dist/components/Search/ScopeListItem.js +2 -3
- package/dist/components/Search/SearchField.js +48 -43
- package/dist/components/Search/Searchbar.js +2 -3
- package/dist/components/Search/SuggestListItem.js +2 -3
- package/dist/components/Snackbar/SnackbarItem.js +57 -27
- package/dist/components/Timeline/TimelineSection.js +6 -7
- package/dist/components/Toolbar/Toolbar.js +36 -34
- package/dist/components/Toolbar/ToolbarAccountMenu.js +4 -5
- package/dist/components/Toolbar/ToolbarAdd.js +5 -6
- package/dist/components/Toolbar/ToolbarButton.js +66 -31
- package/dist/components/Toolbar/ToolbarDaterange.js +11 -12
- package/dist/components/Toolbar/ToolbarFilter.js +30 -29
- package/dist/components/Toolbar/ToolbarMenu.js +4 -5
- package/dist/components/Toolbar/ToolbarOptions.js +15 -16
- package/dist/components/Toolbar/ToolbarSearch.js +37 -19
- package/dist/components/Transmission/TransmissionItem.js +67 -48
- package/dist/components/Transmission/TransmissionList.js +2 -3
- package/dist/components/index.js +198 -202
- package/dist/globalMenu-CtokaeGw.js +124 -0
- package/dist/index.js +204 -208
- package/dist/types/lib/components/AccessAreaList/AccessAreaListItem.d.ts +2 -1
- package/dist/types/lib/components/AccessAreaList/AccessAreaListItem.stories.d.ts +2 -1
- package/dist/types/lib/components/Attachment/AttachmentLink.d.ts +5 -3
- package/dist/types/lib/components/Attachment/AttachmentLink.stories.d.ts +1 -1
- package/dist/types/lib/components/Bookmarks/BookmarksSection.stories.d.ts +3 -0
- package/dist/types/lib/components/Bookmarks/EditableBookmark.d.ts +4 -1
- package/dist/types/lib/components/Button/Button.d.ts +4 -3
- package/dist/types/lib/components/Button/Button.stories.d.ts +1 -1
- package/dist/types/lib/components/Button/ButtonBase.d.ts +2 -1
- package/dist/types/lib/components/Button/ButtonIcon.d.ts +4 -3
- package/dist/types/lib/components/Button/ComboButton.d.ts +5 -3
- package/dist/types/lib/components/Button/IconButton.d.ts +4 -3
- package/dist/types/lib/components/Dialog/DialogListItem.stories.d.ts +4 -3
- package/dist/types/lib/components/Dialog/DialogSeenBy.d.ts +2 -0
- package/dist/types/lib/components/Dropdown/DrawerHeader.d.ts +2 -1
- package/dist/types/lib/components/Header/HeaderButton.d.ts +2 -2
- package/dist/types/lib/components/Icon/Icon.d.ts +5 -5
- package/dist/types/lib/components/Icon/IconOrAvatar.d.ts +3 -3
- package/dist/types/lib/components/Icon/index.d.ts +0 -2
- package/dist/types/lib/components/LayoutAction/ActionHeader.d.ts +2 -1
- package/dist/types/lib/components/List/ListBase.stories.d.ts +3 -4
- package/dist/types/lib/components/List/ListItem.d.ts +4 -2
- package/dist/types/lib/components/List/ListItemBase.d.ts +24 -2
- package/dist/types/lib/components/List/ListItemHeader.d.ts +8 -7
- package/dist/types/lib/components/List/Patterns.stories.d.ts +0 -1
- package/dist/types/lib/components/List/Specimens.stories.d.ts +2 -2
- package/dist/types/lib/components/Menu/MenuItem.d.ts +3 -3
- package/dist/types/lib/components/Menu/MenuItemBase.d.ts +2 -2
- package/dist/types/lib/components/Menu/MenuSearch.d.ts +2 -1
- package/dist/types/lib/components/Menu/MenuSearch.stories.d.ts +1 -1
- package/dist/types/lib/components/Meta/MetaItem.d.ts +2 -2
- package/dist/types/lib/components/Meta/MetaItemMedia.d.ts +2 -2
- package/dist/types/lib/components/Meta/MetaTimestamp.d.ts +2 -2
- 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/PageHeader.d.ts +2 -2
- package/dist/types/lib/components/Search/SearchField.d.ts +3 -1
- package/dist/types/lib/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/types/lib/components/Snackbar/SnackbarItem.d.ts +4 -3
- package/dist/types/lib/components/Snackbar/SnackbarItem.stories.d.ts +1 -1
- package/dist/types/lib/components/Snackbar/useSnackbar.d.ts +2 -2
- package/dist/types/lib/components/Timeline/TimelineSection.d.ts +2 -2
- package/dist/types/lib/components/Toolbar/Toolbar.d.ts +2 -1
- package/dist/types/lib/components/Toolbar/Toolbar.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarButton.d.ts +2 -2
- package/dist/types/lib/components/Toolbar/ToolbarButton.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarDate.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilter.d.ts +2 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +1 -1
- package/dist/types/lib/components/Toolbar/ToolbarSearch.d.ts +2 -1
- package/dist/types/lib/components/Toolbar/ToolbarSearch.stories.d.ts +1 -1
- package/dist/types/lib/components/Transmission/TransmissionItem.stories.d.ts +1 -1
- package/dist/useId-CsCRkvK3.js +16 -0
- package/dist/userMenuItems-vSWEGGu2.js +84 -0
- package/package.json +3 -3
- package/dist/components/Icon/SvgIcon.js +0 -6
- package/dist/components/Icon/iconsMap.js +0 -17395
- package/dist/globalMenu-C6osDiF4.js +0 -80
- package/dist/types/lib/components/Button/ComboButton.stories.d.ts +0 -19
- package/dist/types/lib/components/Button/IconButton.stories.d.ts +0 -16
- package/dist/types/lib/components/ContextMenu/ContextMenu.stories.d.ts +0 -19
- package/dist/types/lib/components/Icon/SvgIcon.d.ts +0 -9
- package/dist/types/lib/components/Icon/iconsMap.d.ts +0 -1911
- package/dist/types/lib/components/LayoutAction/LayoutAction.stories.d.ts +0 -19
- package/dist/types/lib/components/Page/ContactSection.stories.d.ts +0 -25
- package/dist/types/lib/components/Page/PageMenu.stories.d.ts +0 -18
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvgElement } from '../Icon';
|
|
2
2
|
import { ButtonSize } from './ButtonBase';
|
|
3
3
|
export interface ButtonIconProps {
|
|
4
|
-
icon:
|
|
4
|
+
icon: SvgElement;
|
|
5
|
+
iconAltText?: string;
|
|
5
6
|
size: ButtonSize;
|
|
6
7
|
}
|
|
7
|
-
export declare const ButtonIcon: ({ size, icon }: ButtonIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ButtonIcon: ({ size, icon, iconAltText }: ButtonIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgElement } from '../Icon';
|
|
3
3
|
import { ButtonBaseProps } from './ButtonBase';
|
|
4
4
|
export interface ComboButtonProps extends Omit<ButtonBaseProps, 'onClick'> {
|
|
5
|
-
icon:
|
|
5
|
+
icon: SvgElement;
|
|
6
|
+
iconAltText?: string;
|
|
7
|
+
ariaLabel?: string;
|
|
6
8
|
onIconClick?: MouseEventHandler<HTMLButtonElement>;
|
|
7
9
|
onLabelClick?: MouseEventHandler<HTMLButtonElement>;
|
|
8
10
|
disabled?: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare const ComboButton: ({ variant, color, size, selected, icon, children, className, onLabelClick, onIconClick, }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const ComboButton: ({ variant, color, size, selected, icon, children, className, ariaLabel, onLabelClick, onIconClick, }: ComboButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgElement } from '../Icon';
|
|
3
3
|
import { ButtonColor, ButtonSize, ButtonVariant } from './ButtonBase';
|
|
4
4
|
export interface IconButtonProps {
|
|
5
|
-
icon:
|
|
5
|
+
icon: SvgElement;
|
|
6
|
+
iconAltText: string;
|
|
6
7
|
color?: ButtonColor;
|
|
7
8
|
size?: ButtonSize;
|
|
8
9
|
iconSize?: ButtonSize;
|
|
@@ -11,4 +12,4 @@ export interface IconButtonProps {
|
|
|
11
12
|
onClick?: MouseEventHandler;
|
|
12
13
|
dataTestId?: string;
|
|
13
14
|
}
|
|
14
|
-
export declare const IconButton: ({ variant, size, icon, color, iconSize, className, onClick, dataTestId, }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const IconButton: ({ variant, size, icon, color, iconSize, className, onClick, dataTestId, iconAltText, }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { DialogListItem, DialogListItemProps } from './DialogListItem';
|
|
|
3
3
|
declare const meta: Meta<typeof DialogListItem>;
|
|
4
4
|
export default meta;
|
|
5
5
|
export declare const Default: {
|
|
6
|
+
render: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
args: {};
|
|
7
8
|
};
|
|
8
9
|
export declare const GroupedAvatars: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,7 +12,7 @@ export declare const SeenBy: (args: DialogListItemProps) => import("react/jsx-ru
|
|
|
11
12
|
export declare const InboxStatuses: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export declare const DraftAndSent: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export declare const ArchivedAndTrashed: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare const Statuses: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Statuses: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
15
16
|
declare const Loading: {
|
|
16
17
|
(args: DialogListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
parameters: {
|
|
@@ -24,5 +25,5 @@ export declare const DueAt: (args: DialogListItemProps) => import("react/jsx-run
|
|
|
24
25
|
export declare const Attachments: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
26
|
export declare const TouchedBy: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
export declare const TextLength: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export declare const Selectable: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare const Sizes: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const Selectable: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
29
|
+
export declare const Sizes: (args: DialogListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -11,7 +11,9 @@ export interface DialogSeenByProps {
|
|
|
11
11
|
label: string;
|
|
12
12
|
/** Render element as a link or button to display more informastion */
|
|
13
13
|
as?: ElementType;
|
|
14
|
+
/** OnClick handler */
|
|
14
15
|
onClick?: MouseEventHandler;
|
|
16
|
+
/** Optional link url */
|
|
15
17
|
href?: string;
|
|
16
18
|
}
|
|
17
19
|
/**
|
|
@@ -2,6 +2,7 @@ import { MouseEventHandler } from 'react';
|
|
|
2
2
|
export interface DrawerHeaderProps {
|
|
3
3
|
className?: string;
|
|
4
4
|
title?: string;
|
|
5
|
+
closeIconAltText?: string;
|
|
5
6
|
onClose?: MouseEventHandler;
|
|
6
7
|
}
|
|
7
|
-
export declare const DrawerHeader: ({ className, title, onClose }: DrawerHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const DrawerHeader: ({ className, title, onClose, closeIconAltText }: DrawerHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { ElementType } from 'react';
|
|
|
2
2
|
import { AvatarProps, AvatarGroupProps } from '../Avatar';
|
|
3
3
|
import { BadgeProps } from '../Badge';
|
|
4
4
|
import { ButtonProps } from '../Button';
|
|
5
|
-
import {
|
|
5
|
+
import { SvgElement } from '../Icon';
|
|
6
6
|
export interface HeaderButtonProps extends ButtonProps {
|
|
7
7
|
label?: string;
|
|
8
8
|
avatar?: AvatarProps;
|
|
@@ -10,7 +10,7 @@ export interface HeaderButtonProps extends ButtonProps {
|
|
|
10
10
|
as?: ElementType;
|
|
11
11
|
className?: string;
|
|
12
12
|
expanded?: boolean;
|
|
13
|
-
icon?:
|
|
13
|
+
icon?: SvgElement;
|
|
14
14
|
badge?: BadgeProps | undefined;
|
|
15
15
|
tabIndex?: number;
|
|
16
16
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Color,
|
|
2
|
-
export type
|
|
1
|
+
import { Color, Size, Theme } from '..';
|
|
2
|
+
export type SvgElement = React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
3
3
|
export type IconSize = Size | undefined;
|
|
4
4
|
export type IconColor = Color;
|
|
5
5
|
export type IconTheme = Theme;
|
|
6
6
|
export interface IconProps {
|
|
7
|
-
|
|
7
|
+
svgElement: SvgElement | undefined | null | string;
|
|
8
|
+
altText?: string;
|
|
8
9
|
loading?: boolean;
|
|
9
10
|
size?: IconSize;
|
|
10
11
|
color?: IconColor;
|
|
11
12
|
theme?: IconTheme;
|
|
12
|
-
variant?: IconVariant;
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
|
-
export declare const Icon: ({ loading,
|
|
15
|
+
export declare const Icon: ({ loading, altText, svgElement: SvgElement, size, color, theme, className }: IconProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarGroupProps, AvatarProps, BadgeProps,
|
|
2
|
+
import { AvatarGroupProps, AvatarProps, BadgeProps, IconProps, IconTheme, SvgElement } from '..';
|
|
3
3
|
export type IconOrAvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export interface IconOrAvatarProps {
|
|
5
5
|
size?: IconOrAvatarSize;
|
|
6
|
-
icon?: IconProps |
|
|
6
|
+
icon?: IconProps | SvgElement | ReactNode;
|
|
7
7
|
iconTheme?: IconTheme;
|
|
8
8
|
avatar?: AvatarProps;
|
|
9
9
|
avatarGroup?: AvatarGroupProps;
|
|
10
10
|
badge?: BadgeProps | undefined;
|
|
11
11
|
}
|
|
12
|
-
export declare const IconOrAvatar: ({ size, icon, iconTheme, avatar, avatarGroup }: IconOrAvatarProps) => import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
12
|
+
export declare const IconOrAvatar: ({ size, icon, iconTheme, avatar, avatarGroup }: IconOrAvatarProps) => string | number | true | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
@@ -2,9 +2,10 @@ import { LayoutActionColor, LayoutActionTheme } from './LayoutAction';
|
|
|
2
2
|
export interface ActionHeaderProps {
|
|
3
3
|
color?: LayoutActionColor;
|
|
4
4
|
theme?: LayoutActionTheme;
|
|
5
|
+
dismissIconAltText?: string;
|
|
5
6
|
title: string;
|
|
6
7
|
hidden?: boolean;
|
|
7
8
|
dismissable?: boolean;
|
|
8
9
|
onDismiss?: () => void;
|
|
9
10
|
}
|
|
10
|
-
export declare const ActionHeader: ({ color, theme, hidden, title, dismissable, onDismiss, }: ActionHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const ActionHeader: ({ color, theme, hidden, title, dismissable, dismissIconAltText, onDismiss, }: ActionHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,10 +4,9 @@ declare const meta: {
|
|
|
4
4
|
component: ({ spacing, children, ...rest }: import('./ListBase').ListBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
|
-
args: {
|
|
8
|
-
children: import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
};
|
|
7
|
+
args: {};
|
|
10
8
|
};
|
|
11
9
|
export default meta;
|
|
12
10
|
type Story = StoryObj<typeof meta>;
|
|
13
|
-
export declare const
|
|
11
|
+
export declare const Interactive: Story;
|
|
12
|
+
export declare const NonIteractive: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { AvatarGroupProps, AvatarProps } from '../Avatar';
|
|
3
3
|
import { BadgeProps } from '../Badge';
|
|
4
|
-
import {
|
|
4
|
+
import { IconProps, SvgElement } from '../Icon';
|
|
5
5
|
import { ListItemBaseProps } from './ListItemBase';
|
|
6
6
|
import { ListItemHeaderProps } from './ListItemHeader';
|
|
7
7
|
export interface ListItemProps extends ListItemBaseProps, ListItemHeaderProps {
|
|
@@ -16,7 +16,7 @@ export interface ListItemProps extends ListItemBaseProps, ListItemHeaderProps {
|
|
|
16
16
|
/** Optional description */
|
|
17
17
|
description?: string;
|
|
18
18
|
/** List item icon */
|
|
19
|
-
icon?:
|
|
19
|
+
icon?: SvgElement | IconProps | ReactNode | undefined;
|
|
20
20
|
/** List item avatar */
|
|
21
21
|
avatar?: AvatarProps;
|
|
22
22
|
/** List item avatarGroup */
|
|
@@ -25,6 +25,8 @@ export interface ListItemProps extends ListItemBaseProps, ListItemHeaderProps {
|
|
|
25
25
|
label?: ReactNode | (() => ReactElement);
|
|
26
26
|
/** Optional badge */
|
|
27
27
|
badge?: BadgeProps | ReactNode | undefined;
|
|
28
|
+
/** Whether to display the item with a link icon */
|
|
29
|
+
linkIcon?: boolean;
|
|
28
30
|
}
|
|
29
31
|
export interface ListItemInputProps extends ListItemProps {
|
|
30
32
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
|
|
1
|
+
import { ElementType, HTMLProps, KeyboardEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { Color } from '..';
|
|
3
3
|
export type ListItemSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
export type ListItemVariant = 'solid' | 'dotted';
|
|
@@ -6,25 +6,47 @@ export type ListItemShadow = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
6
6
|
export type ListItemColor = Color;
|
|
7
7
|
export type ListItemTheme = 'transparent' | 'default' | 'subtle' | 'surface' | 'base';
|
|
8
8
|
export interface ListItemBaseProps {
|
|
9
|
+
/** The title of the list item. */
|
|
9
10
|
title?: string;
|
|
11
|
+
/** If true, the list item is interactive and has a hover state. */
|
|
10
12
|
interactive?: boolean;
|
|
13
|
+
/** The element type to render as. */
|
|
11
14
|
as?: ElementType;
|
|
15
|
+
/** The URL to link to if the list item is a link. */
|
|
12
16
|
href?: string;
|
|
17
|
+
/** Click event handler. */
|
|
13
18
|
onClick?: () => void;
|
|
19
|
+
/** Key press event handler. */
|
|
14
20
|
onKeyPress?: KeyboardEventHandler;
|
|
21
|
+
/** The tab index of the list item. */
|
|
15
22
|
tabIndex?: number;
|
|
23
|
+
/** The color of the list item. */
|
|
16
24
|
color?: ListItemColor;
|
|
25
|
+
/** The theme of the list item. */
|
|
17
26
|
theme?: ListItemTheme;
|
|
27
|
+
/** The variant of the list item. */
|
|
18
28
|
variant?: ListItemVariant;
|
|
29
|
+
/** The size of the list item. */
|
|
19
30
|
size?: ListItemSize;
|
|
31
|
+
/** The shadow style of the list item. */
|
|
20
32
|
shadow?: ListItemShadow;
|
|
33
|
+
/** Additional class names for the list item. */
|
|
21
34
|
className?: string;
|
|
35
|
+
/** If true, the list item shows a loading state. */
|
|
22
36
|
loading?: boolean;
|
|
37
|
+
/** If true, the list item is disabled. */
|
|
23
38
|
disabled?: boolean;
|
|
39
|
+
/** If true, the list item is hidden. */
|
|
24
40
|
hidden?: boolean;
|
|
41
|
+
/** If true, the list item is active. */
|
|
25
42
|
active?: boolean;
|
|
43
|
+
/** If true, the list item is selected. */
|
|
26
44
|
selected?: boolean;
|
|
45
|
+
/** If true, the list item is expanded. */
|
|
27
46
|
expanded?: boolean;
|
|
47
|
+
/** Mouse enter event handler. */
|
|
48
|
+
onMouseEnter?: HTMLProps<HTMLDivElement>['onMouseEnter'];
|
|
49
|
+
/** The children elements of the list item. */
|
|
28
50
|
children?: ReactNode;
|
|
29
51
|
}
|
|
30
|
-
export declare const ListItemBase: ({ title, interactive, as, href, onClick, onKeyPress, tabIndex, size, variant, color, theme, shadow, loading, disabled, hidden, active, selected, className, children, }: ListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare const ListItemBase: ({ title, interactive, as, href, onClick, onKeyPress, tabIndex, size, variant, color, theme, shadow, loading, disabled, hidden, active, selected, className, onMouseEnter, children, }: ListItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { ChevronDownIcon } from '@navikt/aksel-icons';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarGroupProps, AvatarProps, BadgeProps,
|
|
3
|
+
import { AvatarGroupProps, AvatarProps, BadgeProps, IconProps, ListItemLinkProps, ListItemSelectProps, ListItemSize, SvgElement } from '..';
|
|
3
4
|
export interface ListItemHeaderProps extends ListItemLinkProps {
|
|
4
5
|
/** Header is loading */
|
|
5
6
|
loading?: boolean;
|
|
@@ -9,22 +10,22 @@ export interface ListItemHeaderProps extends ListItemLinkProps {
|
|
|
9
10
|
className?: string;
|
|
10
11
|
/** Select controls */
|
|
11
12
|
select?: ListItemSelectProps;
|
|
12
|
-
/** Collapsible item
|
|
13
|
+
/** Collapsible item */
|
|
13
14
|
collapsible?: boolean;
|
|
14
|
-
/** Item is expanded
|
|
15
|
+
/** Item is expanded */
|
|
15
16
|
expanded?: boolean;
|
|
16
17
|
/** Title */
|
|
17
18
|
title?: string;
|
|
18
19
|
/** Description */
|
|
19
20
|
description?: string;
|
|
20
21
|
/** List item icon */
|
|
21
|
-
icon?:
|
|
22
|
+
icon?: SvgElement | IconProps | ReactNode | undefined;
|
|
22
23
|
/** List item avatar */
|
|
23
24
|
avatar?: AvatarProps;
|
|
24
25
|
/** List item avatarGroup */
|
|
25
26
|
avatarGroup?: AvatarGroupProps;
|
|
26
|
-
/** Optional icon indicating behaviour */
|
|
27
|
-
|
|
27
|
+
/** Optional chevron icon indicating behaviour */
|
|
28
|
+
chevron?: typeof ChevronDownIcon;
|
|
28
29
|
/** Optional badge */
|
|
29
30
|
badge?: BadgeProps | ReactNode | undefined;
|
|
30
31
|
/** Custom controls */
|
|
@@ -32,4 +33,4 @@ export interface ListItemHeaderProps extends ListItemLinkProps {
|
|
|
32
33
|
/** Custom label */
|
|
33
34
|
children?: ReactNode;
|
|
34
35
|
}
|
|
35
|
-
export declare const ListItemHeader: ({ as, loading, disabled, select, href, onClick, onKeyPress, tabIndex, size, title, description, icon, avatar, avatarGroup,
|
|
36
|
+
export declare const ListItemHeader: ({ as, loading, disabled, select, href, onClick, onKeyPress, tabIndex, size, title, description, icon, avatar, avatarGroup, chevron, badge, controls, className, children, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,5 +5,4 @@ export default meta;
|
|
|
5
5
|
export declare const ListOfPeople: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare const ListOfServices: () => import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const ListOfCategories: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const CategoryGrid: () => import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
export declare const MultilevelList: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,5 +9,5 @@ declare const meta: {
|
|
|
9
9
|
};
|
|
10
10
|
};
|
|
11
11
|
export default meta;
|
|
12
|
-
export declare const Theme: (args: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const Size: (args: ListItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Theme: (args: ListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
13
|
+
export declare const Size: (args: ListItemProps) => import("react/jsx-runtime").JSX.Element[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
import { AvatarGroupProps, AvatarProps, BadgeProps,
|
|
2
|
+
import { AvatarGroupProps, AvatarProps, BadgeProps, IconProps, IconTheme, SvgElement } from '..';
|
|
3
3
|
import { MenuItemColor, MenuItemSize, MenuItemTheme } from './';
|
|
4
4
|
export interface MenuItemProps {
|
|
5
5
|
id: string;
|
|
@@ -20,13 +20,13 @@ export interface MenuItemProps {
|
|
|
20
20
|
groupId?: string | number;
|
|
21
21
|
title?: string;
|
|
22
22
|
description?: string;
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: SvgElement | IconProps | ReactNode;
|
|
24
24
|
iconTheme?: IconTheme;
|
|
25
25
|
iconBadge?: BadgeProps | undefined;
|
|
26
26
|
avatar?: AvatarProps;
|
|
27
27
|
avatarGroup?: AvatarGroupProps;
|
|
28
28
|
badge?: BadgeProps | undefined;
|
|
29
|
-
linkIcon?:
|
|
29
|
+
linkIcon?: SvgElement;
|
|
30
30
|
linkText?: string;
|
|
31
31
|
className?: string;
|
|
32
32
|
label?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
|
|
2
|
-
import { BadgeProps, Color,
|
|
2
|
+
import { BadgeProps, Color, SvgElement } from '..';
|
|
3
3
|
export type MenuItemColor = Color;
|
|
4
4
|
export type MenuItemSize = 'xs' | 'sm' | 'md' | 'lg';
|
|
5
5
|
export type MenuItemTheme = 'default' | 'subtle' | 'surface' | 'base';
|
|
@@ -20,7 +20,7 @@ export interface MenuItemBaseProps {
|
|
|
20
20
|
expanded?: boolean;
|
|
21
21
|
children?: ReactNode;
|
|
22
22
|
badge?: BadgeProps | undefined;
|
|
23
|
-
linkIcon?:
|
|
23
|
+
linkIcon?: SvgElement;
|
|
24
24
|
linkText?: string;
|
|
25
25
|
}
|
|
26
26
|
export declare const MenuItemBase: ({ as, color, theme, size, className, href, onClick, onKeyPress, tabIndex, hidden, disabled, linkIcon, linkText, badge, children, }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,8 +2,9 @@ import { ChangeEventHandler } from 'react';
|
|
|
2
2
|
export interface MenuSearchProps {
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
name: string;
|
|
5
|
+
clearButtonAltText?: string;
|
|
5
6
|
value?: string;
|
|
6
7
|
onChange?: ChangeEventHandler;
|
|
7
8
|
onClear?: () => void;
|
|
8
9
|
}
|
|
9
|
-
export declare const MenuSearch: ({ value, name, placeholder, onChange, onClear }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const MenuSearch: ({ value, name, placeholder, clearButtonAltText, onChange, onClear, }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ value, name, placeholder, onChange, onClear }: import('./MenuSearch').MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ value, name, placeholder, clearButtonAltText, onChange, onClear, }: import('./MenuSearch').MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgElement } from '../Icon';
|
|
3
3
|
import { MetaItemSize, MetaItemVariant } from './MetaItemBase';
|
|
4
4
|
export interface MetaItemProps {
|
|
5
5
|
loading?: boolean;
|
|
@@ -11,7 +11,7 @@ export interface MetaItemProps {
|
|
|
11
11
|
/** Variant */
|
|
12
12
|
variant?: MetaItemVariant;
|
|
13
13
|
/** Icon name */
|
|
14
|
-
icon?:
|
|
14
|
+
icon?: SvgElement;
|
|
15
15
|
/** Label */
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
/** classname */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SvgElement } from '../Icon';
|
|
2
2
|
import { MetaItemSize } from './MetaItemBase';
|
|
3
3
|
interface MetaItemMediaProps {
|
|
4
4
|
size?: MetaItemSize;
|
|
5
5
|
progress?: number;
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: SvgElement;
|
|
7
7
|
}
|
|
8
8
|
export declare const MetaItemMedia: ({ size, icon, progress }: MetaItemMediaProps) => false | import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgElement } from '../Icon';
|
|
3
3
|
import { MetaItemSize, MetaItemVariant } from './MetaItemBase';
|
|
4
4
|
export interface MetaTimestampProps {
|
|
5
5
|
loading?: boolean;
|
|
@@ -10,7 +10,7 @@ export interface MetaTimestampProps {
|
|
|
10
10
|
/** Datetime in ISO format */
|
|
11
11
|
datetime?: string;
|
|
12
12
|
/** Icon name */
|
|
13
|
-
icon?:
|
|
13
|
+
icon?: SvgElement;
|
|
14
14
|
/** Label */
|
|
15
15
|
children?: ReactNode;
|
|
16
16
|
}
|
|
@@ -8,4 +8,4 @@ export interface BreadcrumbsLinkProps extends React.HTMLAttributes<HTMLButtonEle
|
|
|
8
8
|
className?: string;
|
|
9
9
|
children?: ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare const BreadcrumbsLink: ({ as, className, disabled, selected, tabIndex, label, children,
|
|
11
|
+
export declare const BreadcrumbsLink: ({ as, className, disabled, selected, tabIndex, label, children, }: BreadcrumbsLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Color, Range, Shadow, Theme } from '..';
|
|
3
|
-
export type FlexElement = 'div' | 'section' | 'article' | 'header' | 'footer' | 'nav';
|
|
3
|
+
export type FlexElement = 'div' | 'section' | 'article' | 'header' | 'footer' | 'nav' | 'ul';
|
|
4
4
|
export type FlexDirection = 'col' | 'row';
|
|
5
5
|
export type FlexAlign = 'initial' | 'start' | 'end' | 'center' | 'stretch';
|
|
6
6
|
export type FlexJustify = 'initial' | 'start' | 'end' | 'center' | 'between';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarGroupProps, AvatarProps, BackButtonProps, BreadcrumbsLinkProps,
|
|
2
|
+
import { AvatarGroupProps, AvatarProps, BackButtonProps, BreadcrumbsLinkProps, IconProps, PageTabsProps, SectionProps, SvgElement } from '..';
|
|
3
3
|
export type PageHeaderVariant = 'card' | undefined;
|
|
4
4
|
export type PageHeaderSize = 'lg' | 'xl';
|
|
5
5
|
export interface PageHeaderProps extends SectionProps {
|
|
@@ -7,7 +7,7 @@ export interface PageHeaderProps extends SectionProps {
|
|
|
7
7
|
size?: PageHeaderSize;
|
|
8
8
|
title?: string;
|
|
9
9
|
description?: string;
|
|
10
|
-
icon?:
|
|
10
|
+
icon?: SvgElement | IconProps;
|
|
11
11
|
avatar?: AvatarProps;
|
|
12
12
|
avatarGroup?: AvatarGroupProps;
|
|
13
13
|
tabs?: PageTabsProps;
|
|
@@ -4,6 +4,8 @@ export interface SearchFieldProps {
|
|
|
4
4
|
value?: string;
|
|
5
5
|
className?: string;
|
|
6
6
|
expanded?: boolean;
|
|
7
|
+
closeButtonAltText?: string;
|
|
8
|
+
clearButtonAltText?: string;
|
|
7
9
|
placeholder?: string;
|
|
8
10
|
onFocus?: FocusEventHandler;
|
|
9
11
|
onBlur?: FocusEventHandler;
|
|
@@ -13,4 +15,4 @@ export interface SearchFieldProps {
|
|
|
13
15
|
onEnter?: () => void;
|
|
14
16
|
tabIndex?: number;
|
|
15
17
|
}
|
|
16
|
-
export declare const SearchField: ({ className, expanded, name, value, placeholder, onFocus, onBlur, onChange, onClear, onClose, onEnter, tabIndex, }: SearchFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const SearchField: ({ className, expanded, name, value, placeholder, closeButtonAltText, clearButtonAltText, onFocus, onBlur, onChange, onClear, onClose, onEnter, tabIndex, }: SearchFieldProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,5 +7,5 @@ interface SkeletonProps {
|
|
|
7
7
|
children?: ReactNode;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const Skeleton: ({ loading, size, variant, className, children }: SkeletonProps) => string | number | boolean |
|
|
10
|
+
export declare const Skeleton: ({ loading, size, variant, className, children }: SkeletonProps) => string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
11
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgElement } from '..';
|
|
3
3
|
export declare enum SnackbarColorEnum {
|
|
4
4
|
accent = "accent",
|
|
5
5
|
neutral = "neutral",
|
|
@@ -13,12 +13,13 @@ export type SnackbarColor = keyof typeof SnackbarColorEnum;
|
|
|
13
13
|
export interface SnackbarItemProps {
|
|
14
14
|
as?: ElementType;
|
|
15
15
|
color?: SnackbarColor;
|
|
16
|
-
icon?:
|
|
16
|
+
icon?: SvgElement;
|
|
17
17
|
message: string | ReactNode;
|
|
18
|
+
iconAltText?: string;
|
|
18
19
|
href?: string;
|
|
19
20
|
className?: string;
|
|
20
21
|
dismissable?: boolean;
|
|
21
22
|
onDismiss?: () => void;
|
|
22
23
|
children?: ReactNode;
|
|
23
24
|
}
|
|
24
|
-
export declare const SnackbarItem: ({ as, message, className, color, icon, dismissable, onDismiss, ...rest }: SnackbarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const SnackbarItem: ({ as, message, className, color, icon, iconAltText, dismissable, onDismiss, ...rest }: SnackbarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { SnackbarItemProps } from '..';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ as, message, className, color, icon, dismissable, onDismiss, ...rest }: SnackbarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ as, message, className, color, icon, iconAltText, dismissable, onDismiss, ...rest }: SnackbarItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {};
|
|
8
8
|
args: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { SvgElement } from '../Icon';
|
|
3
3
|
import { SnackbarColor } from './SnackbarItem.tsx';
|
|
4
4
|
export declare enum SnackbarDuration {
|
|
5
5
|
infinite = 0,
|
|
@@ -14,7 +14,7 @@ export interface SnackbarQueueItem extends SnackbarItemProps {
|
|
|
14
14
|
message: string;
|
|
15
15
|
color: SnackbarColor;
|
|
16
16
|
duration?: number;
|
|
17
|
-
icon?:
|
|
17
|
+
icon?: SvgElement;
|
|
18
18
|
}
|
|
19
19
|
interface SnackbarItemProps {
|
|
20
20
|
as?: ElementType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { AvatarProps, Color,
|
|
2
|
+
import { AvatarProps, Color, SvgElement } from '..';
|
|
3
3
|
export type TimelineSectionSize = 'xs' | 'sm' | 'lg';
|
|
4
4
|
export interface TimelineSectionProps {
|
|
5
5
|
loading?: boolean;
|
|
@@ -9,7 +9,7 @@ export interface TimelineSectionProps {
|
|
|
9
9
|
dateline?: string;
|
|
10
10
|
byline?: ReactNode;
|
|
11
11
|
avatar?: AvatarProps;
|
|
12
|
-
icon?:
|
|
12
|
+
icon?: SvgElement;
|
|
13
13
|
children?: ReactNode;
|
|
14
14
|
}
|
|
15
15
|
export declare const TimelineSection: ({ loading, color, size, datetime, dateline, byline, avatar, children, }: TimelineSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,6 +11,7 @@ export interface ToolbarProps {
|
|
|
11
11
|
getFilterLabel?: (name: string, value: ToolbarFilterProps['value']) => string;
|
|
12
12
|
onFilterStateChange?: (state: FilterState) => void;
|
|
13
13
|
showResultsLabel?: string;
|
|
14
|
+
removeButtonAltText?: string;
|
|
14
15
|
children?: ReactNode;
|
|
15
16
|
}
|
|
16
|
-
export declare const Toolbar: ({ filters, filterState, onFilterStateChange, search, accountMenu, getFilterLabel, children, showResultsLabel, }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const Toolbar: ({ filters, filterState, onFilterStateChange, search, accountMenu, getFilterLabel, children, showResultsLabel, removeButtonAltText, }: ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { StoryObj } from '@storybook/react';
|
|
|
2
2
|
import { Toolbar } from './Toolbar';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
-
component: ({ filters, filterState, onFilterStateChange, search, accountMenu, getFilterLabel, children, showResultsLabel, }: import('./Toolbar').ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
component: ({ filters, filterState, onFilterStateChange, search, accountMenu, getFilterLabel, children, showResultsLabel, removeButtonAltText, }: import('./Toolbar').ToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
tags: string[];
|
|
7
7
|
parameters: {};
|
|
8
8
|
args: {
|
|
@@ -3,12 +3,12 @@ export type ToolbarButtonType = 'add' | 'select' | 'switch';
|
|
|
3
3
|
export interface ToolbarButtonProps {
|
|
4
4
|
as?: ElementType;
|
|
5
5
|
type?: ToolbarButtonType;
|
|
6
|
+
ariaLabel?: string;
|
|
6
7
|
removable?: boolean;
|
|
7
8
|
selected?: boolean;
|
|
8
|
-
icon?: string;
|
|
9
9
|
active?: boolean;
|
|
10
10
|
children?: ReactNode;
|
|
11
11
|
onToggle?: MouseEventHandler;
|
|
12
12
|
onRemove?: MouseEventHandler;
|
|
13
13
|
}
|
|
14
|
-
export declare const ToolbarButton: ({ type, selected, removable, active, children, onToggle, onRemove, }: ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const ToolbarButton: ({ type, selected, removable, ariaLabel, active, children, onToggle, onRemove, }: ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ type, selected, removable, active, children, onToggle, onRemove, }: import('./ToolbarButton').ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ type, selected, removable, ariaLabel, active, children, onToggle, onRemove, }: import('./ToolbarButton').ToolbarButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ removable, label, name, value, options, optionGroups, onChange, onRemove, getSelectedLabel, showResultsLabel, optionType, id, }: import('./ToolbarFilter').ToolbarFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ removable, label, name, value, options, optionGroups, onChange, onRemove, buttonAltText, getSelectedLabel, showResultsLabel, optionType, id, }: import('./ToolbarFilter').ToolbarFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|