@altinn/altinn-components 0.41.3 → 0.41.5
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/Avatar.css +1 -1
- package/dist/assets/MenuItemIcon.css +1 -1
- package/dist/assets/MenuOption.css +1 -1
- package/dist/components/Account/AccountListItemDetails.js +18 -16
- package/dist/components/Account/AccountOrganization.js +9 -6
- package/dist/components/Avatar/Avatar.js +21 -21
- package/dist/components/Bookmarks/index.js +6 -12
- package/dist/components/Dialog/DialogMetadata.js +56 -39
- package/dist/components/Menu/MenuItem.js +47 -46
- package/dist/components/Menu/MenuItemIcon.js +14 -14
- package/dist/components/Menu/MenuItemLabel.js +36 -42
- package/dist/components/Menu/MenuOption.js +46 -46
- package/dist/components/Settings/BookmarksSettingsItem.js +67 -0
- package/dist/components/Settings/BookmarksSettingsList.js +43 -0
- package/dist/components/Settings/SettingsItem.js +64 -38
- package/dist/components/Settings/SettingsItemBase.js +47 -0
- package/dist/components/Settings/SettingsList.js +4 -4
- package/dist/components/Settings/SettingsSection.js +3 -3
- package/dist/components/Settings/index.js +18 -12
- package/dist/components/Toolbar/ToolbarOptions.js +9 -9
- package/dist/components/Typography/Heading.js +30 -28
- package/dist/components/index.js +371 -371
- package/dist/index.js +376 -376
- package/dist/types/lib/components/Account/AccountListItemDetails.d.ts +3 -1
- package/dist/types/lib/components/Account/AccountListItemDetails.stories.d.ts +1 -1
- package/dist/types/lib/components/Account/AccountMenu.stories.d.ts +2 -0
- package/dist/types/lib/components/Bookmarks/index.d.ts +0 -3
- package/dist/types/lib/components/Menu/MenuItem.d.ts +1 -1
- package/dist/types/lib/components/Menu/MenuItemLabel.d.ts +2 -3
- package/dist/types/lib/components/Menu/MenuOption.d.ts +3 -3
- package/dist/types/lib/components/Settings/BookmarksSettingsItem.d.ts +24 -0
- package/dist/types/lib/components/Settings/BookmarksSettingsList.d.ts +12 -0
- package/dist/types/lib/components/Settings/SettingsItem.d.ts +19 -11
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +20 -10
- package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +13 -0
- package/dist/types/lib/components/Settings/SettingsModal.stories.d.ts +9 -1
- package/dist/types/lib/components/Settings/index.d.ts +4 -1
- package/dist/types/lib/components/Toolbar/ToolbarFilter.stories.d.ts +1 -3
- package/dist/types/lib/components/Typography/Heading.d.ts +3 -2
- package/dist/types/lib/components/Typography/Heading.stories.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Trash-ofRjaQsc.js +0 -24
- package/dist/components/Bookmarks/BookmarksSettingsItem.js +0 -54
- package/dist/components/Bookmarks/BookmarksSettingsModal.js +0 -46
- package/dist/components/Bookmarks/BookmarksSettingsSection.js +0 -64
- package/dist/components/Settings/AddressSettingsModal.js +0 -69
- package/dist/types/lib/components/Bookmarks/BookmarksSettingsItem.d.ts +0 -12
- package/dist/types/lib/components/Bookmarks/BookmarksSettingsModal.d.ts +0 -19
- package/dist/types/lib/components/Bookmarks/BookmarksSettingsSection.d.ts +0 -33
- package/dist/types/lib/components/Settings/AddressSettingsModal.d.ts +0 -5
- /package/dist/assets/{SettingsItem.css → SettingsItemBase.css} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { AccountOrganizationProps, ButtonProps, SectionProps, SettingsItemProps } from '..';
|
|
2
3
|
export interface AccountListItemDetailsProps {
|
|
3
4
|
color?: SectionProps['color'];
|
|
@@ -6,5 +7,6 @@ export interface AccountListItemDetailsProps {
|
|
|
6
7
|
buttons?: ButtonProps[];
|
|
7
8
|
settings?: SettingsItemProps[];
|
|
8
9
|
organization?: AccountOrganizationProps['items'];
|
|
10
|
+
children?: ReactNode;
|
|
9
11
|
}
|
|
10
|
-
export declare const AccountListItemDetails: ({ color, loading, loadingText, buttons, settings, organization, }: AccountListItemDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const AccountListItemDetails: ({ color, loading, loadingText, buttons, settings, organization, children, }: AccountListItemDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ color, loading, loadingText, buttons, settings, organization, }: import('./AccountListItemDetails').AccountListItemDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ color, loading, loadingText, buttons, settings, organization, children, }: import('./AccountListItemDetails').AccountListItemDetailsProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
@@ -10,4 +10,6 @@ export default meta;
|
|
|
10
10
|
export declare const Default: () => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare const WithFavourites: () => import("react/jsx-runtime").JSX.Element;
|
|
12
12
|
export declare const WithGroups: () => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SingleCompany: () => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const TwoCompanies: () => import("react/jsx-runtime").JSX.Element;
|
|
13
15
|
export declare const VirtualizedMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,7 +15,7 @@ export interface MenuItemProps extends MenuItemBaseProps {
|
|
|
15
15
|
icon?: MenuItemIconProps['icon'];
|
|
16
16
|
iconTheme?: MenuItemIconProps['theme'];
|
|
17
17
|
iconBadge?: MenuItemIconProps['badge'];
|
|
18
|
-
badge?: BadgeProps | undefined;
|
|
18
|
+
badge?: BadgeProps | ReactNode | undefined;
|
|
19
19
|
/** Custom controls */
|
|
20
20
|
controls?: ReactNode;
|
|
21
21
|
linkIcon?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { HeadingProps } from '..';
|
|
3
3
|
import { MenuItemSize } from './MenuItemBase';
|
|
4
4
|
export interface MenuItemLabelProps {
|
|
5
5
|
className?: string;
|
|
@@ -9,8 +9,7 @@ export interface MenuItemLabelProps {
|
|
|
9
9
|
highlightWords?: string[];
|
|
10
10
|
title?: HeadingProps | ReactNode | string;
|
|
11
11
|
description?: HeadingProps | ReactNode | string;
|
|
12
|
-
badge?: BadgeProps;
|
|
13
12
|
children?: ReactNode;
|
|
14
13
|
}
|
|
15
14
|
export declare function getAriaLabelFromTitle(title: HeadingProps | ReactNode | string): string | undefined;
|
|
16
|
-
export declare const MenuItemLabel: ({ className, size, title,
|
|
15
|
+
export declare const MenuItemLabel: ({ className, size, title, description, highlightWords, loading, children, }: MenuItemLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MenuItemProps } from '..';
|
|
2
2
|
import { MenuItemBaseProps, MenuItemSize } from './MenuItemBase';
|
|
3
3
|
export type MenuOptionType = 'checkbox' | 'radio';
|
|
4
4
|
export interface MenuOptionProps extends MenuItemBaseProps {
|
|
@@ -10,11 +10,11 @@ export interface MenuOptionProps extends MenuItemBaseProps {
|
|
|
10
10
|
groupId?: string;
|
|
11
11
|
size?: MenuItemSize;
|
|
12
12
|
name?: string;
|
|
13
|
-
|
|
13
|
+
count?: number;
|
|
14
14
|
checked?: boolean;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
type?: MenuOptionType;
|
|
17
17
|
hidden?: boolean;
|
|
18
18
|
role?: string;
|
|
19
19
|
}
|
|
20
|
-
export declare const MenuOption: ({ size, type, name, active, value, label, title, description, icon,
|
|
20
|
+
export declare const MenuOption: ({ size, type, name, active, value, label, title, description, icon, count, checked, disabled, onMouseEnter, onClick, role, ...rest }: MenuOptionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ButtonProps, QueryItemProps, SettingsItemProps, TextFieldProps } from '..';
|
|
2
|
+
export interface BookmarksSettingsItemProps extends SettingsItemProps {
|
|
3
|
+
/** Bookmark id */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Loading */
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
/** Optional title */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** Query params */
|
|
10
|
+
params?: QueryItemProps[];
|
|
11
|
+
/** Input value */
|
|
12
|
+
inputValue?: string;
|
|
13
|
+
/** Title field */
|
|
14
|
+
titleField?: TextFieldProps;
|
|
15
|
+
/** Save button */
|
|
16
|
+
saveButton?: ButtonProps;
|
|
17
|
+
/** Delete button */
|
|
18
|
+
removeButton?: ButtonProps;
|
|
19
|
+
/** Render as **/
|
|
20
|
+
as?: React.ElementType;
|
|
21
|
+
/** Toggle function */
|
|
22
|
+
onToggle?: () => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const BookmarksSettingsItem: ({ id, icon, loading, title, params, controls, inputValue, titleField, saveButton, removeButton, onChange, ...rest }: BookmarksSettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BookmarksSettingsItemProps, TextFieldProps } from '../';
|
|
2
|
+
export interface BookmarksSettingsListProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
items: BookmarksSettingsItemProps[];
|
|
6
|
+
untitled?: string;
|
|
7
|
+
expandedId?: string;
|
|
8
|
+
onToggle?: (id: string) => void;
|
|
9
|
+
loading?: boolean;
|
|
10
|
+
titleField?: TextFieldProps;
|
|
11
|
+
}
|
|
12
|
+
export declare const BookmarksSettingsList: ({ loading, title, description, items, untitled, expandedId, onToggle, }: BookmarksSettingsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
label?: ListItemHeaderProps['children'];
|
|
8
|
-
title?: ListItemLabelProps['title'];
|
|
9
|
-
value?: ListItemLabelProps['value'];
|
|
10
|
-
description?: ListItemLabelProps['description'];
|
|
1
|
+
import { InputProps, SettingsItemBaseProps } from '..';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type SettingsItemVariant = 'default' | 'modal' | 'switch';
|
|
4
|
+
export interface SettingsItemModalProps {
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
11
7
|
}
|
|
12
|
-
export
|
|
8
|
+
export interface SettingsItemProps extends SettingsItemBaseProps {
|
|
9
|
+
variant?: SettingsItemVariant;
|
|
10
|
+
id: string;
|
|
11
|
+
title?: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
name?: InputProps['name'];
|
|
15
|
+
checked?: InputProps['checked'];
|
|
16
|
+
onChange?: InputProps['onChange'];
|
|
17
|
+
modalProps?: SettingsItemModalProps;
|
|
18
|
+
children?: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare const SettingsItem: ({ loading, variant, id, name, checked, onChange, modalProps, children, ...props }: SettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({
|
|
4
|
+
component: ({ loading, variant, id, name, checked, onChange, modalProps, children, ...props }: import('./SettingsItem').SettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
|
8
|
+
id: string;
|
|
9
|
+
variant: "default";
|
|
8
10
|
ariaLabel: string;
|
|
11
|
+
title: string;
|
|
9
12
|
};
|
|
10
13
|
decorators: ((Story: import('storybook/internal/csf').PartialStoryFn<import('@storybook/react-vite').ReactRenderer, {
|
|
11
|
-
|
|
14
|
+
variant?: import('./SettingsItem').SettingsItemVariant | undefined;
|
|
15
|
+
id: string;
|
|
16
|
+
title?: string | undefined;
|
|
17
|
+
value?: string | undefined;
|
|
18
|
+
description?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
checked?: boolean | undefined;
|
|
21
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
22
|
+
modalProps?: import('./SettingsItem').SettingsItemModalProps | undefined;
|
|
23
|
+
children?: React.ReactNode;
|
|
12
24
|
groupId?: string | undefined;
|
|
13
25
|
collapsible?: boolean | undefined;
|
|
14
26
|
expanded?: boolean | undefined;
|
|
27
|
+
icon?: import('..').SvgElement | import('..').IconProps | React.ReactNode | import('..').AvatarProps | import('..').AvatarGroupProps;
|
|
15
28
|
label?: React.ReactNode;
|
|
16
|
-
title?: React.ReactNode | import('..').HeadingProps;
|
|
17
|
-
value?: React.ReactNode | import('..').HeadingProps;
|
|
18
|
-
description?: React.ReactNode | import('..').HeadingProps;
|
|
19
29
|
interactive?: boolean | undefined;
|
|
20
30
|
as?: React.ElementType | undefined;
|
|
21
31
|
tabIndex?: number | undefined;
|
|
22
32
|
color?: import('..').ListItemColor | undefined;
|
|
23
|
-
variant?: string | undefined;
|
|
24
33
|
size?: import('..').ListItemSize | undefined;
|
|
25
34
|
shadow?: import('..').Shadow | undefined;
|
|
26
35
|
border?: import('..').ListItemBorder | undefined;
|
|
@@ -31,11 +40,9 @@ declare const meta: {
|
|
|
31
40
|
active?: boolean | undefined;
|
|
32
41
|
selected?: boolean | undefined;
|
|
33
42
|
onMouseEnter?: React.MouseEventHandler<HTMLDivElement> | undefined;
|
|
34
|
-
children?: React.ReactNode;
|
|
35
43
|
highlightWords?: string[] | undefined;
|
|
36
44
|
select?: import('..').ListItemSelectProps | undefined;
|
|
37
45
|
linkIcon?: boolean | undefined;
|
|
38
|
-
icon?: import('..').SvgElement | import('..').IconProps | React.ReactNode | import('..').AvatarProps | import('..').AvatarGroupProps;
|
|
39
46
|
badge?: React.ReactNode | import('..').BadgeProps;
|
|
40
47
|
controls?: React.ReactNode;
|
|
41
48
|
ariaLabel?: string | undefined;
|
|
@@ -48,7 +55,10 @@ export default meta;
|
|
|
48
55
|
type Story = StoryObj<typeof meta>;
|
|
49
56
|
export declare const Default: Story;
|
|
50
57
|
export declare const Value: Story;
|
|
58
|
+
export declare const Loading: Story;
|
|
59
|
+
export declare const Switch: Story;
|
|
60
|
+
export declare const Modal: Story;
|
|
51
61
|
export declare const Company: Story;
|
|
52
62
|
export declare const Person: Story;
|
|
53
|
-
export declare const
|
|
54
|
-
export declare const
|
|
63
|
+
export declare const Bookmark: () => import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare const BookmarkContextMenu: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ListItemBaseProps, ListItemHeaderProps, ListItemLabelProps } from '..';
|
|
2
|
+
export interface SettingsItemBaseProps extends ListItemBaseProps, ListItemHeaderProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
groupId?: string;
|
|
5
|
+
collapsible?: boolean;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
icon?: ListItemHeaderProps['icon'];
|
|
8
|
+
label?: ListItemHeaderProps['children'];
|
|
9
|
+
title?: ListItemLabelProps['title'];
|
|
10
|
+
value?: ListItemLabelProps['value'];
|
|
11
|
+
description?: ListItemLabelProps['description'];
|
|
12
|
+
}
|
|
13
|
+
export declare const SettingsItemBase: ({ loading, color, size, expanded, icon, label, title, value, description, children, highlightWords, ...props }: SettingsItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,9 +28,17 @@ export interface AccountAlertsModalProps extends SettingsModalProps {
|
|
|
28
28
|
emailLabel?: string;
|
|
29
29
|
smsAlerts?: boolean;
|
|
30
30
|
emailAlerts?: boolean;
|
|
31
|
+
readOnly?: boolean;
|
|
31
32
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
32
33
|
}
|
|
33
|
-
export declare const AccountAlertsModal: ({ open, onClose, icon, title, description, phone, phoneLabel, email, emailLabel, smsAlerts, emailAlerts, onChange, }: AccountAlertsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const AccountAlertsModal: ({ open, onClose, icon, title, description, phone, phoneLabel, email, emailLabel, smsAlerts, emailAlerts, readOnly, onChange, }: AccountAlertsModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare const UserAccountAlertsModal: ({ open, onClose, phone, email, ...props }: {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
open?: boolean | undefined;
|
|
38
|
+
onClose?: (() => void) | undefined;
|
|
39
|
+
phone?: string | undefined;
|
|
40
|
+
email?: string | undefined;
|
|
41
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
34
42
|
interface AccountGroupsModalProps extends SettingsModalProps {
|
|
35
43
|
items?: AccountListItemProps[];
|
|
36
44
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export * from './SettingsSection';
|
|
2
1
|
export * from './SettingsItem';
|
|
2
|
+
export * from './SettingsItemBase';
|
|
3
3
|
export * from './SettingsList';
|
|
4
|
+
export * from './SettingsSection';
|
|
4
5
|
export * from './SettingsModal';
|
|
5
6
|
export * from './UsedByLog';
|
|
6
7
|
export * from './UsedByLogItem';
|
|
8
|
+
export * from './BookmarksSettingsItem';
|
|
9
|
+
export * from './BookmarksSettingsList';
|
|
@@ -3,8 +3,9 @@ import { TypographyProps } from '..';
|
|
|
3
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
|
-
export type HeadingComponent = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span';
|
|
6
|
+
export type HeadingComponent = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'div' | 'span' | 'label';
|
|
7
7
|
export interface HeadingProps {
|
|
8
|
+
id?: string;
|
|
8
9
|
loading?: boolean;
|
|
9
10
|
highlightWords?: string[];
|
|
10
11
|
as?: HeadingComponent;
|
|
@@ -18,4 +19,4 @@ export interface HeadingProps {
|
|
|
18
19
|
style?: CSSProperties;
|
|
19
20
|
children?: ReactNode;
|
|
20
21
|
}
|
|
21
|
-
export declare const Heading: ({ loading, highlightWords, as, size, leading, weight, color, variant, maxRows, className, style, children, }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const Heading: ({ id, loading, highlightWords, as, size, leading, weight, color, variant, maxRows, className, style, children, }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ loading, highlightWords, as, size, leading, weight, color, variant, maxRows, className, style, children, }: import('./Heading').HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
component: ({ id, loading, highlightWords, as, size, leading, weight, color, variant, maxRows, className, style, children, }: import('./Heading').HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
tags: string[];
|
|
6
6
|
parameters: {};
|
|
7
7
|
args: {
|
package/package.json
CHANGED
package/dist/Trash-ofRjaQsc.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import o, { forwardRef as i } from "react";
|
|
3
|
-
import { u as f } from "./useId-BVFxCjkq.js";
|
|
4
|
-
var d = function(t, a) {
|
|
5
|
-
var r = {};
|
|
6
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && a.indexOf(e) < 0 && (r[e] = t[e]);
|
|
7
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
8
|
-
for (var l = 0, e = Object.getOwnPropertySymbols(t); l < e.length; l++)
|
|
9
|
-
a.indexOf(e[l]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[l]) && (r[e[l]] = t[e[l]]);
|
|
10
|
-
return r;
|
|
11
|
-
};
|
|
12
|
-
const u = i((t, a) => {
|
|
13
|
-
var { title: r, titleId: e } = t, l = d(t, ["title", "titleId"]);
|
|
14
|
-
let n = f();
|
|
15
|
-
return n = r ? e || "title-" + n : void 0, o.createElement(
|
|
16
|
-
"svg",
|
|
17
|
-
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: a, "aria-labelledby": n }, l),
|
|
18
|
-
r ? o.createElement("title", { id: n }, r) : null,
|
|
19
|
-
o.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M4.5 6.25a.75.75 0 0 0 0 1.5h.805l.876 11.384a1.75 1.75 0 0 0 1.745 1.616h8.148a1.75 1.75 0 0 0 1.745-1.616l.876-11.384h.805a.75.75 0 0 0 0-1.5h-2.75V6A2.75 2.75 0 0 0 14 3.25h-4A2.75 2.75 0 0 0 7.25 6v.25zm5.5-1.5c-.69 0-1.25.56-1.25 1.25v.25h6.5V6c0-.69-.56-1.25-1.25-1.25zm-3.19 3 .867 11.27c.01.13.118.23.249.23h8.148c.13 0 .24-.1.25-.23l.866-11.27zm3.19 2a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 .75-.75m4 0a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-1.5 0v-6a.75.75 0 0 1 .75-.75", clipRule: "evenodd" })
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
export {
|
|
23
|
-
u as S
|
|
24
|
-
};
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "../../index-L8X2o7IH.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { ContextMenu as S } from "../ContextMenu/ContextMenu.js";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { QueryLabel as n } from "../Searchbar/QueryLabel.js";
|
|
7
|
-
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { SettingsItem as a } from "../Settings/SettingsItem.js";
|
|
9
|
-
import { S as f } from "../../Pencil-BVHLEoQy.js";
|
|
10
|
-
import { S as g } from "../../Trash-ofRjaQsc.js";
|
|
11
|
-
import { S as k } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
12
|
-
const z = ({
|
|
13
|
-
id: i,
|
|
14
|
-
loading: r,
|
|
15
|
-
title: o,
|
|
16
|
-
params: e,
|
|
17
|
-
onEdit: s,
|
|
18
|
-
onDelete: p,
|
|
19
|
-
contextMenu: c,
|
|
20
|
-
...l
|
|
21
|
-
}) => {
|
|
22
|
-
const m = c || {
|
|
23
|
-
id: "context-menu" + i,
|
|
24
|
-
items: [
|
|
25
|
-
{
|
|
26
|
-
icon: f,
|
|
27
|
-
title: "Rediger tittel",
|
|
28
|
-
onClick: s
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
icon: g,
|
|
32
|
-
title: "Slett søk",
|
|
33
|
-
onClick: p
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ t(
|
|
38
|
-
a,
|
|
39
|
-
{
|
|
40
|
-
...l,
|
|
41
|
-
id: i,
|
|
42
|
-
icon: k,
|
|
43
|
-
loading: r,
|
|
44
|
-
title: o,
|
|
45
|
-
description: o && /* @__PURE__ */ t(n, { params: e, size: "xs" }),
|
|
46
|
-
label: !o && !r && /* @__PURE__ */ t(n, { params: e }),
|
|
47
|
-
controls: m && /* @__PURE__ */ t(S, { ...m }),
|
|
48
|
-
linkIcon: !0
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
export {
|
|
53
|
-
z as BookmarksSettingsItem
|
|
54
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as d } from "react";
|
|
3
|
-
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { Button as a } from "../Button/Button.js";
|
|
5
|
-
import "../RootProvider/RootProvider.js";
|
|
6
|
-
import { QueryLabel as S } from "../Searchbar/QueryLabel.js";
|
|
7
|
-
import "../Snackbar/useSnackbar.js";
|
|
8
|
-
import { Flex as u } from "../Page/Flex.js";
|
|
9
|
-
import { TextField as y } from "../Forms/TextField.js";
|
|
10
|
-
import { SettingsModal as z } from "../Settings/SettingsModal.js";
|
|
11
|
-
import { S as M } from "../../MagnifyingGlass-bwVhw07z.js";
|
|
12
|
-
const V = ({
|
|
13
|
-
title: l,
|
|
14
|
-
untitled: f,
|
|
15
|
-
titleField: t,
|
|
16
|
-
inputValue: e,
|
|
17
|
-
onChange: s,
|
|
18
|
-
params: p,
|
|
19
|
-
saveButton: i,
|
|
20
|
-
removeButton: o,
|
|
21
|
-
...c
|
|
22
|
-
}) => {
|
|
23
|
-
const [g, x] = d("");
|
|
24
|
-
return /* @__PURE__ */ n(z, { ...c, icon: M, title: l || f, children: [
|
|
25
|
-
t && /* @__PURE__ */ r(
|
|
26
|
-
y,
|
|
27
|
-
{
|
|
28
|
-
...t,
|
|
29
|
-
size: "sm",
|
|
30
|
-
name: "title",
|
|
31
|
-
value: typeof e == "string" ? e : g,
|
|
32
|
-
onChange: (m) => {
|
|
33
|
-
typeof s == "function" ? s(m) : x(m.target.value);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
/* @__PURE__ */ r(S, { params: p, size: "xs" }),
|
|
38
|
-
(i || o) && /* @__PURE__ */ n(u, { as: "footer", direction: "row", spacing: 2, children: [
|
|
39
|
-
i && /* @__PURE__ */ r(a, { ...i, size: "sm" }),
|
|
40
|
-
o && /* @__PURE__ */ r(a, { ...o, variant: "outline", size: "sm" })
|
|
41
|
-
] })
|
|
42
|
-
] });
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
V as BookmarksSettingsModal
|
|
46
|
-
};
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs as g, Fragment as f, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { createElement as S } from "react";
|
|
3
|
-
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import { Typography as l } from "../Typography/Typography.js";
|
|
5
|
-
import { Heading as v } from "../Typography/Heading.js";
|
|
6
|
-
import { BookmarksSettingsItem as p } from "./BookmarksSettingsItem.js";
|
|
7
|
-
import { BookmarksSettingsModal as x } from "./BookmarksSettingsModal.js";
|
|
8
|
-
import "../RootProvider/RootProvider.js";
|
|
9
|
-
import { Divider as y } from "../Divider/Divider.js";
|
|
10
|
-
import { List as u } from "../List/List.js";
|
|
11
|
-
import "../Snackbar/useSnackbar.js";
|
|
12
|
-
import { Flex as z } from "../Page/Flex.js";
|
|
13
|
-
import { SettingsSection as C } from "../Settings/SettingsSection.js";
|
|
14
|
-
const J = ({
|
|
15
|
-
loading: o,
|
|
16
|
-
title: h,
|
|
17
|
-
description: a,
|
|
18
|
-
items: e,
|
|
19
|
-
untitled: k = "Untitled bookmark",
|
|
20
|
-
titleField: s,
|
|
21
|
-
expandedId: c,
|
|
22
|
-
onEdit: n,
|
|
23
|
-
onDelete: m
|
|
24
|
-
}) => {
|
|
25
|
-
const r = c && (e == null ? void 0 : e.find((i) => i.id === c));
|
|
26
|
-
return /* @__PURE__ */ g(f, { children: [
|
|
27
|
-
/* @__PURE__ */ g(z, { direction: "col", spacing: 2, children: [
|
|
28
|
-
/* @__PURE__ */ t(v, { size: "lg", children: h }),
|
|
29
|
-
/* @__PURE__ */ t(l, { size: "sm", children: a })
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ t(C, { children: o ? /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(p, { title: h, loading: o }) }) : e.length > 0 && /* @__PURE__ */ t(u, { size: "xs", children: e.map((i, B) => /* @__PURE__ */ g(f, { children: [
|
|
32
|
-
B > 0 && /* @__PURE__ */ t(y, {}),
|
|
33
|
-
/* @__PURE__ */ S(
|
|
34
|
-
p,
|
|
35
|
-
{
|
|
36
|
-
...i,
|
|
37
|
-
key: i.id,
|
|
38
|
-
loading: o || i.loading,
|
|
39
|
-
onEdit: () => n == null ? void 0 : n(i.id),
|
|
40
|
-
onDelete: () => m == null ? void 0 : m(i.id),
|
|
41
|
-
expanded: c === i.id
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] })) }) }),
|
|
45
|
-
r && /* @__PURE__ */ t(
|
|
46
|
-
x,
|
|
47
|
-
{
|
|
48
|
-
open: !0,
|
|
49
|
-
onClose: () => n == null ? void 0 : n(""),
|
|
50
|
-
untitled: k,
|
|
51
|
-
titleField: s,
|
|
52
|
-
title: r == null ? void 0 : r.title,
|
|
53
|
-
params: r == null ? void 0 : r.params,
|
|
54
|
-
inputValue: r == null ? void 0 : r.inputValue,
|
|
55
|
-
onChange: r == null ? void 0 : r.onChange,
|
|
56
|
-
saveButton: r == null ? void 0 : r.saveButton,
|
|
57
|
-
removeButton: r == null ? void 0 : r.removeButton
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
] });
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
J as BookmarksSettingsSection
|
|
64
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
3
|
-
import "../../index-L8X2o7IH.js";
|
|
4
|
-
import i, { forwardRef as f } from "react";
|
|
5
|
-
import { Typography as c } from "../Typography/Typography.js";
|
|
6
|
-
import { Button as m } from "../Button/Button.js";
|
|
7
|
-
import { ButtonGroup as p } from "../Button/ButtonGroup.js";
|
|
8
|
-
import "../RootProvider/RootProvider.js";
|
|
9
|
-
import "../Snackbar/useSnackbar.js";
|
|
10
|
-
import { TextareaField as u } from "../Forms/TextareaField.js";
|
|
11
|
-
import { SettingsModal as v } from "./SettingsModal.js";
|
|
12
|
-
import { u as s } from "../../useId-BVFxCjkq.js";
|
|
13
|
-
var h = function(t, n) {
|
|
14
|
-
var l = {};
|
|
15
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (l[e] = t[e]);
|
|
16
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
17
|
-
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
18
|
-
n.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
19
|
-
return l;
|
|
20
|
-
};
|
|
21
|
-
const g = f((t, n) => {
|
|
22
|
-
var { title: l, titleId: e } = t, r = h(t, ["title", "titleId"]);
|
|
23
|
-
let o = s();
|
|
24
|
-
return o = l ? e || "title-" + o : void 0, i.createElement(
|
|
25
|
-
"svg",
|
|
26
|
-
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: n, "aria-labelledby": o }, r),
|
|
27
|
-
l ? i.createElement("title", { id: o }, l) : null,
|
|
28
|
-
i.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M20.532 3.471A.75.75 0 0 1 20.75 4v7.5a.75.75 0 0 1-1.5 0V5.81l-8.72 8.72a.75.75 0 1 1-1.06-1.06l8.72-8.72H12.5a.75.75 0 0 1 0-1.5H20c.206 0 .393.083.529.218l.001.002zM4.75 9A.25.25 0 0 1 5 8.75h7a.75.75 0 0 0 0-1.5H5A1.75 1.75 0 0 0 3.25 9v10c0 .966.784 1.75 1.75 1.75h10A1.75 1.75 0 0 0 16.75 19v-7a.75.75 0 0 0-1.5 0v7a.25.25 0 0 1-.25.25H5a.25.25 0 0 1-.25-.25z", clipRule: "evenodd" })
|
|
29
|
-
);
|
|
30
|
-
});
|
|
31
|
-
var b = function(t, n) {
|
|
32
|
-
var l = {};
|
|
33
|
-
for (var e in t) Object.prototype.hasOwnProperty.call(t, e) && n.indexOf(e) < 0 && (l[e] = t[e]);
|
|
34
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
35
|
-
for (var r = 0, e = Object.getOwnPropertySymbols(t); r < e.length; r++)
|
|
36
|
-
n.indexOf(e[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, e[r]) && (l[e[r]] = t[e[r]]);
|
|
37
|
-
return l;
|
|
38
|
-
};
|
|
39
|
-
const y = f((t, n) => {
|
|
40
|
-
var { title: l, titleId: e } = t, r = b(t, ["title", "titleId"]);
|
|
41
|
-
let o = s();
|
|
42
|
-
return o = l ? e || "title-" + o : void 0, i.createElement(
|
|
43
|
-
"svg",
|
|
44
|
-
Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", fill: "none", viewBox: "0 0 24 24", focusable: !1, role: "img", ref: n, "aria-labelledby": o }, r),
|
|
45
|
-
l ? i.createElement("title", { id: o }, l) : null,
|
|
46
|
-
i.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M12.53 2.47a.75.75 0 0 0-1.06 0l-7 7a.75.75 0 0 0-.22.53v11c0 .414.336.75.75.75h14a.75.75 0 0 0 .75-.75V10a.75.75 0 0 0-.22-.53zM5.75 20.25v-9.94L12 4.06l6.25 6.25v9.94zm4.28-7.22c.26-.26.68-.26.94 0l.5.5a.75.75 0 0 0 1.06 0l.5-.5a.664.664 0 1 1 .94.94L12 15.94l-1.97-1.97a.664.664 0 0 1 0-.94M12 11.94a2.164 2.164 0 0 0-3.03 3.09l2.5 2.5a.75.75 0 0 0 1.06 0l2.5-2.5A2.164 2.164 0 0 0 12 11.94", clipRule: "evenodd" })
|
|
47
|
-
);
|
|
48
|
-
}), H = ({
|
|
49
|
-
title: t = "Endre adresse",
|
|
50
|
-
icon: n = y,
|
|
51
|
-
valueField: l = {
|
|
52
|
-
label: "Adresse",
|
|
53
|
-
value: "Idrettsveien 1, 5025 Bergen",
|
|
54
|
-
readOnly: !0
|
|
55
|
-
},
|
|
56
|
-
open: e,
|
|
57
|
-
onClose: r
|
|
58
|
-
}) => /* @__PURE__ */ d(v, { icon: n, title: t, open: e, onClose: r, children: [
|
|
59
|
-
/* @__PURE__ */ a(u, { ...l, size: "sm", readOnly: !0 }),
|
|
60
|
-
/* @__PURE__ */ a(c, { size: "sm", children: /* @__PURE__ */ d("p", { children: [
|
|
61
|
-
"Altinn bruker adressen din fra ",
|
|
62
|
-
/* @__PURE__ */ a("a", { href: "https://skatteetaten.no/", children: "Folkeregisteret" }),
|
|
63
|
-
"."
|
|
64
|
-
] }) }),
|
|
65
|
-
/* @__PURE__ */ a(p, { size: "md", children: /* @__PURE__ */ a(m, { variant: "outline", icon: g, reverse: !0, children: "Endre adresse" }) })
|
|
66
|
-
] });
|
|
67
|
-
export {
|
|
68
|
-
H as AddressSettingsModal
|
|
69
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ContextMenuProps, QueryItemProps, SettingsItemProps } from '..';
|
|
2
|
-
export interface BookmarksSettingsItemProps extends SettingsItemProps {
|
|
3
|
-
/** Query params */
|
|
4
|
-
params?: QueryItemProps[];
|
|
5
|
-
/** Context menu */
|
|
6
|
-
contextMenu?: ContextMenuProps;
|
|
7
|
-
/** Edit function */
|
|
8
|
-
onEdit?: () => void;
|
|
9
|
-
/** Delete function */
|
|
10
|
-
onDelete?: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare const BookmarksSettingsItem: ({ id, loading, title, params, onEdit, onDelete, contextMenu, ...rest }: BookmarksSettingsItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent } from 'react';
|
|
2
|
-
import { ButtonProps, QueryItemProps, SettingsModalProps, TextFieldProps } from '..';
|
|
3
|
-
export interface BookmarksSettingsModalProps extends SettingsModalProps {
|
|
4
|
-
/** Query params */
|
|
5
|
-
params?: QueryItemProps[];
|
|
6
|
-
/** Untitled bookmark */
|
|
7
|
-
untitled?: string;
|
|
8
|
-
/** Title field */
|
|
9
|
-
titleField?: TextFieldProps;
|
|
10
|
-
/** Save button */
|
|
11
|
-
saveButton?: ButtonProps;
|
|
12
|
-
/** Delete button */
|
|
13
|
-
removeButton?: ButtonProps;
|
|
14
|
-
/** Input value */
|
|
15
|
-
inputValue?: string;
|
|
16
|
-
/** On change */
|
|
17
|
-
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
-
}
|
|
19
|
-
export declare const BookmarksSettingsModal: ({ title, untitled, titleField, inputValue, onChange, params, saveButton, removeButton, ...rest }: BookmarksSettingsModalProps) => import("react/jsx-runtime").JSX.Element;
|