@altinn/altinn-components 0.38.0 → 0.38.2

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.
Files changed (34) hide show
  1. package/dist/assets/Byline.css +1 -1
  2. package/dist/assets/FloatingActionButton.css +1 -0
  3. package/dist/assets/ListItemLabel.css +1 -1
  4. package/dist/assets/MenuItemLabel.css +1 -1
  5. package/dist/assets/ModalBase.css +1 -1
  6. package/dist/components/Account/AccountMenu.js +39 -35
  7. package/dist/components/Button/FloatingActionButton.js +36 -0
  8. package/dist/components/Button/index.js +6 -4
  9. package/dist/components/Byline/Byline.js +18 -18
  10. package/dist/components/Dashboard/DashboardHeader.js +6 -6
  11. package/dist/components/Dialog/DialogListItem.js +113 -126
  12. package/dist/components/List/ListItemHeader.js +55 -53
  13. package/dist/components/List/ListItemLabel.js +32 -31
  14. package/dist/components/Menu/MenuItem.js +22 -21
  15. package/dist/components/Menu/MenuItemLabel.js +41 -25
  16. package/dist/components/Modal/ModalBase.js +5 -5
  17. package/dist/components/Typography/Heading.js +26 -24
  18. package/dist/components/Typography/useHighlightedText.js +28 -21
  19. package/dist/components/index.js +402 -400
  20. package/dist/index.js +408 -406
  21. package/dist/types/lib/components/Account/AccountListItem.stories.d.ts +1 -0
  22. package/dist/types/lib/components/Button/FloatingActionButton.d.ts +14 -0
  23. package/dist/types/lib/components/Button/index.d.ts +1 -0
  24. package/dist/types/lib/components/Dashboard/DashboardHeader.stories.d.ts +1 -0
  25. package/dist/types/lib/components/List/ListItemHeader.d.ts +3 -1
  26. package/dist/types/lib/components/List/ListItemLabel.d.ts +2 -1
  27. package/dist/types/lib/components/Menu/MenuItem.d.ts +2 -1
  28. package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +2 -1
  29. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +1 -0
  30. package/dist/types/lib/components/Transmission/Transmission.stories.d.ts +1 -0
  31. package/dist/types/lib/stories/InboxBeta.stories.d.ts +15 -0
  32. package/dist/types/lib/stories/Profile.stories.d.ts +1 -0
  33. package/package.json +1 -1
  34. package/dist/types/lib/stories/Beta.stories.d.ts +0 -11
@@ -48,6 +48,7 @@ declare const meta: {
48
48
  expanded?: boolean | undefined;
49
49
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
50
50
  children?: React.ReactNode;
51
+ highlightWords?: string[] | undefined;
51
52
  select?: import('..').ListItemSelectProps | undefined;
52
53
  collapsible?: boolean | undefined;
53
54
  controls?: React.ReactNode;
@@ -0,0 +1,14 @@
1
+ import { MouseEventHandler } from 'react';
2
+ import { ButtonColor, ButtonIconProps, ButtonSize, ButtonVariant } from '..';
3
+ export interface FloatingActionButtonProps {
4
+ icon: ButtonIconProps['icon'];
5
+ iconSize?: ButtonSize;
6
+ iconAltText: string;
7
+ color?: ButtonColor;
8
+ size?: ButtonSize;
9
+ variant?: ButtonVariant;
10
+ onClick?: MouseEventHandler;
11
+ dataTestId?: string;
12
+ onBlurCapture?: React.FocusEventHandler<HTMLButtonElement>;
13
+ }
14
+ export declare const FloatingActionButton: ({ variant, size, icon, iconSize, iconAltText, color, onClick, dataTestId, onBlurCapture, }: FloatingActionButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,4 +4,5 @@ export * from './ButtonIcon';
4
4
  export * from './Button';
5
5
  export * from './ComboButton';
6
6
  export * from './IconButton';
7
+ export * from './FloatingActionButton';
7
8
  export * from './ButtonGroup';
@@ -10,3 +10,4 @@ export default meta;
10
10
  type Story = StoryObj<typeof meta>;
11
11
  export declare const Company: Story;
12
12
  export declare const Person: Story;
13
+ export declare const LoadingState: Story;
@@ -1,6 +1,8 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { BadgeProps, ListItemColor, ListItemIconProps, ListItemLabelProps, ListItemLinkProps, ListItemSelectProps, ListItemSize } from '..';
3
3
  export interface ListItemHeaderProps extends ListItemLinkProps {
4
+ /** Highlight words, ie. search terms */
5
+ highlightWords?: string[];
4
6
  /** The color of the list item. */
5
7
  color?: ListItemColor;
6
8
  /** Header is loading */
@@ -36,4 +38,4 @@ export interface ListItemHeaderProps extends ListItemLinkProps {
36
38
  /** Used as decerning text for the ListItem without title, defaults to title */
37
39
  ariaLabel?: string;
38
40
  }
39
- export declare const ListItemHeader: ({ as, interactive, color, loading, disabled, collapsible, linkIcon, expanded, select, href, onClick, onKeyPress, tabIndex, size, title, description, icon, active, badge, controls, className, children, ariaLabel, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
41
+ export declare const ListItemHeader: ({ as, highlightWords, interactive, color, loading, disabled, collapsible, linkIcon, expanded, select, href, onClick, onKeyPress, tabIndex, size, title, description, icon, active, badge, controls, className, children, ariaLabel, }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -8,8 +8,9 @@ export interface ListItemLabelProps {
8
8
  title?: HeadingProps | ReactNode | string;
9
9
  value?: HeadingProps | ReactNode | string;
10
10
  description?: HeadingProps | ReactNode | string;
11
+ highlightWords?: string[];
11
12
  children?: ReactNode;
12
13
  className?: string;
13
14
  }
14
15
  export declare const isHeadingProps: (heading: unknown) => heading is HeadingProps;
15
- export declare const ListItemLabel: ({ loading, size, title, value, description, children, id, className, }: ListItemLabelProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const ListItemLabel: ({ loading, highlightWords, size, title, value, description, children, id, className, }: ListItemLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -20,6 +20,7 @@ export interface MenuItemProps {
20
20
  groupId?: string | number;
21
21
  title?: MenuItemLabelProps['title'];
22
22
  description?: MenuItemLabelProps['description'];
23
+ highlightWords?: MenuItemLabelProps['highlightWords'];
23
24
  icon?: MenuItemIconProps['icon'];
24
25
  iconTheme?: MenuItemIconProps['theme'];
25
26
  iconBadge?: MenuItemIconProps['badge'];
@@ -32,4 +33,4 @@ export interface MenuItemProps {
32
33
  items?: MenuItemProps[];
33
34
  onMouseEnter?: MouseEventHandler;
34
35
  }
35
- 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;
36
+ export declare const MenuItem: ({ as, size, color, theme, collapsible, expanded, icon, iconTheme, iconBadge, title, description, highlightWords, badge, controls, linkIcon, label, ...rest }: MenuItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -5,10 +5,11 @@ export interface MenuItemLabelProps {
5
5
  className?: string;
6
6
  size?: MenuItemSize;
7
7
  label?: string;
8
+ highlightWords?: string[];
8
9
  title?: HeadingProps | ReactNode | string;
9
10
  description?: HeadingProps | ReactNode | string;
10
11
  badge?: BadgeProps;
11
12
  children?: ReactNode;
12
13
  }
13
14
  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;
15
+ export declare const MenuItemLabel: ({ className, size, title, badge, description, highlightWords, children, }: MenuItemLabelProps) => import("react/jsx-runtime").JSX.Element;
@@ -32,6 +32,7 @@ declare const meta: {
32
32
  selected?: boolean | undefined;
33
33
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
34
34
  children?: React.ReactNode;
35
+ highlightWords?: string[] | undefined;
35
36
  select?: import('..').ListItemSelectProps | undefined;
36
37
  linkIcon?: boolean | undefined;
37
38
  icon?: import('..').SvgElement | import('..').IconProps | React.ReactNode | import('..').AvatarProps | import('..').AvatarGroupProps;
@@ -42,6 +42,7 @@ declare const meta: {
42
42
  tabIndex?: number | undefined;
43
43
  onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
44
44
  description?: React.ReactNode | import('..').HeadingProps;
45
+ highlightWords?: string[] | undefined;
45
46
  collapsible?: boolean | undefined;
46
47
  linkIcon?: boolean | undefined;
47
48
  ariaLabel?: string | undefined;
@@ -0,0 +1,15 @@
1
+ declare const meta: {
2
+ title: string;
3
+ tags: string[];
4
+ parameters: {
5
+ layout: string;
6
+ };
7
+ args: {};
8
+ };
9
+ export default meta;
10
+ export declare const BetaModal: ({ open }: {
11
+ open?: boolean;
12
+ }) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const BetaText: () => import("react/jsx-runtime").JSX.Element;
14
+ export declare const Inbox: () => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Information: () => import("react/jsx-runtime").JSX.Element;
@@ -9,6 +9,7 @@ declare const meta: {
9
9
  export default meta;
10
10
  export declare const DashboardPage: () => import("react/jsx-runtime").JSX.Element;
11
11
  export declare const AccountsPage: () => import("react/jsx-runtime").JSX.Element;
12
+ export declare const AlertsPage: () => import("react/jsx-runtime").JSX.Element;
12
13
  export declare const UsersPage: () => import("react/jsx-runtime").JSX.Element;
13
14
  export declare const AccessPage: () => import("react/jsx-runtime").JSX.Element;
14
15
  export declare const SettingsPage: () => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.38.0",
3
+ "version": "0.38.2",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",
@@ -1,11 +0,0 @@
1
- declare const meta: {
2
- title: string;
3
- tags: string[];
4
- parameters: {
5
- layout: string;
6
- };
7
- args: {};
8
- };
9
- export default meta;
10
- export declare const InboxBeta: () => import("react/jsx-runtime").JSX.Element;
11
- export declare const AdminBeta: () => import("react/jsx-runtime").JSX.Element;