@altinn/altinn-components 0.61.3 → 0.63.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/LayoutBase-CAdjuw9Q.js +18 -0
- package/dist/assets/Banner.css +1 -1
- package/dist/assets/HeaderDrawer.css +1 -1
- package/dist/assets/HeaderDropdown.css +1 -1
- package/dist/assets/LayoutBase.css +1 -1
- package/dist/assets/SettingsListVirtual.css +1 -0
- package/dist/components/Banner/Banner.js +34 -34
- package/dist/components/GlobalHeader/HeaderDrawer.js +13 -13
- package/dist/components/GlobalHeader/HeaderDropdown.js +8 -8
- package/dist/components/Layout/Layout.js +63 -40
- package/dist/components/Layout/LayoutBase.js +3 -5
- package/dist/components/Layout/index.js +9 -9
- package/dist/components/Settings/SettingsItemBase.js +31 -30
- package/dist/components/Settings/SettingsList.js +34 -25
- package/dist/components/Settings/SettingsListVirtual.js +115 -0
- package/dist/components/Settings/index.js +10 -8
- package/dist/components/index.js +72 -70
- package/dist/index.js +86 -84
- package/dist/types/lib/components/Banner/Banner.stories.d.ts +1 -0
- package/dist/types/lib/components/Layout/Layout.d.ts +14 -1
- package/dist/types/lib/components/Layout/Layout.stories.d.ts +3 -1
- package/dist/types/lib/components/Layout/LayoutBase.d.ts +2 -1
- package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +1 -0
- package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +2 -1
- package/dist/types/lib/components/Settings/SettingsList.d.ts +2 -1
- package/dist/types/lib/components/Settings/SettingsListVirtual.d.ts +9 -0
- package/dist/types/lib/components/Settings/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ import { ItemControls as ae } from "./components/Item/ItemControls.js";
|
|
|
69
69
|
import { ItemSelect as xe } from "./components/Item/ItemSelect.js";
|
|
70
70
|
import { ItemBase as ie } from "./components/Item/ItemBase.js";
|
|
71
71
|
import { ItemLink as ne } from "./components/Item/ItemLink.js";
|
|
72
|
-
import {
|
|
72
|
+
import { L as ce } from "./LayoutBase-CAdjuw9Q.js";
|
|
73
73
|
import { LayoutGrid as de } from "./components/Layout/LayoutGrid.js";
|
|
74
74
|
import { LayoutBody as De } from "./components/Layout/LayoutBody.js";
|
|
75
75
|
import { LayoutContent as Be } from "./components/Layout/LayoutContent.js";
|
|
@@ -170,40 +170,41 @@ import { CheckboxOptions as Ya } from "./components/Forms/CheckboxOptions.js";
|
|
|
170
170
|
import { SettingsItem as _a } from "./components/Settings/SettingsItem.js";
|
|
171
171
|
import { SettingsItemBase as op } from "./components/Settings/SettingsItemBase.js";
|
|
172
172
|
import { SettingsList as ep } from "./components/Settings/SettingsList.js";
|
|
173
|
-
import {
|
|
174
|
-
import {
|
|
175
|
-
import {
|
|
176
|
-
import {
|
|
177
|
-
import {
|
|
178
|
-
import {
|
|
179
|
-
import {
|
|
180
|
-
import {
|
|
181
|
-
import {
|
|
182
|
-
import {
|
|
183
|
-
import {
|
|
184
|
-
import {
|
|
185
|
-
import {
|
|
186
|
-
import {
|
|
187
|
-
import {
|
|
188
|
-
import {
|
|
189
|
-
import {
|
|
190
|
-
import {
|
|
191
|
-
import {
|
|
192
|
-
import {
|
|
193
|
-
import {
|
|
194
|
-
import {
|
|
195
|
-
import {
|
|
196
|
-
import {
|
|
197
|
-
import {
|
|
198
|
-
import {
|
|
199
|
-
import {
|
|
200
|
-
import {
|
|
201
|
-
import { B as
|
|
202
|
-
import {
|
|
203
|
-
import {
|
|
204
|
-
import {
|
|
205
|
-
import {
|
|
206
|
-
import {
|
|
173
|
+
import { SettingsListVirtual as mp } from "./components/Settings/SettingsListVirtual.js";
|
|
174
|
+
import { SettingsSection as pp } from "./components/Settings/SettingsSection.js";
|
|
175
|
+
import { SettingsModal as fp } from "./components/Settings/SettingsModal.js";
|
|
176
|
+
import { UsedByLog as sp } from "./components/Settings/UsedByLog.js";
|
|
177
|
+
import { UsedByLogItem as lp } from "./components/Settings/UsedByLogItem.js";
|
|
178
|
+
import { DashboardHeader as up } from "./components/Dashboard/DashboardHeader.js";
|
|
179
|
+
import { DashboardCard as gp } from "./components/Dashboard/DashboardCard.js";
|
|
180
|
+
import { ActivityLog as Lp } from "./components/ActivityLog/ActivityLog.js";
|
|
181
|
+
import { ActivityLogSegment as Ip } from "./components/ActivityLog/ActivityLogSegment.js";
|
|
182
|
+
import { ActivityLogItem as bp } from "./components/ActivityLog/ActivityLogItem.js";
|
|
183
|
+
import { ArticleHeader as Mp } from "./components/Article/ArticleHeader.js";
|
|
184
|
+
import { ArticleContact as Tp } from "./components/Article/ArticleContact.js";
|
|
185
|
+
import { Article as hp } from "./components/Article/Article.js";
|
|
186
|
+
import { ModalBase as Cp } from "./components/Modal/ModalBase.js";
|
|
187
|
+
import { ModalHeader as Hp } from "./components/Modal/ModalHeader.js";
|
|
188
|
+
import { ModalFooter as wp } from "./components/Modal/ModalFooter.js";
|
|
189
|
+
import { ModalIcon as Np } from "./components/Modal/ModalIcon.js";
|
|
190
|
+
import { ModalBody as Ep } from "./components/Modal/ModalBody.js";
|
|
191
|
+
import { Modal as Vp } from "./components/Modal/Modal.js";
|
|
192
|
+
import { Tooltip as zp } from "./components/Tooltip/Tooltip.js";
|
|
193
|
+
import { useClickOutside as jp } from "./hooks/useClickOutside.js";
|
|
194
|
+
import { useEscapeKey as qp } from "./hooks/useEscapeKey.js";
|
|
195
|
+
import { useMenu as Wp } from "./hooks/useMenu.js";
|
|
196
|
+
import { useAccountSelector as Yp } from "./hooks/useAccountSelector.js";
|
|
197
|
+
import { formatDisplayName as _p } from "./functions/name/name.js";
|
|
198
|
+
import { formatDate as ox } from "./functions/date/date.js";
|
|
199
|
+
import { formatOrgNo as ex } from "./functions/orgno/orgno.js";
|
|
200
|
+
import { A as mx } from "./alert-BzifOfXl.js";
|
|
201
|
+
import { B as px, C as xx, a as fx, b as ix, D as sx, L as nx, c as lx, P as cx, d as ux, e as dx, f as gx, S as Dx, g as Lx, T as Bx, u as Ix } from "./textfield-f4Za2qt6.js";
|
|
202
|
+
import { B as bx, S as Ax } from "./button-BB5sYVKY.js";
|
|
203
|
+
import { D as yx } from "./index-Q0EA2XB0.js";
|
|
204
|
+
import { H as kx } from "./heading-C_XYsUfi.js";
|
|
205
|
+
import { L as Fx } from "./link-D1SA3LCe.js";
|
|
206
|
+
import { P as Px } from "./paragraph-BRiIBpbY.js";
|
|
207
|
+
import { V as vx } from "./index-z82sbSVU.js";
|
|
207
208
|
export {
|
|
208
209
|
fa as AccessAreaListItem,
|
|
209
210
|
sa as AccessPackageListItem,
|
|
@@ -215,13 +216,13 @@ export {
|
|
|
215
216
|
b as AccountNotificationSettings,
|
|
216
217
|
M as AccountOrganization,
|
|
217
218
|
T as AccountSelector,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
219
|
+
Lp as ActivityLog,
|
|
220
|
+
bp as ActivityLogItem,
|
|
221
|
+
Ip as ActivityLogSegment,
|
|
221
222
|
h as Alert,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
223
|
+
hp as Article,
|
|
224
|
+
Tp as ArticleContact,
|
|
225
|
+
Mp as ArticleHeader,
|
|
225
226
|
m as AttachmentLink,
|
|
226
227
|
p as AttachmentList,
|
|
227
228
|
Nt as Autocomplete,
|
|
@@ -256,8 +257,8 @@ export {
|
|
|
256
257
|
Km as ContactButtons,
|
|
257
258
|
Qm as ContactSection,
|
|
258
259
|
Go as ContextMenu,
|
|
259
|
-
|
|
260
|
-
|
|
260
|
+
gp as DashboardCard,
|
|
261
|
+
up as DashboardHeader,
|
|
261
262
|
Ro as Dialog,
|
|
262
263
|
ar as DialogActions,
|
|
263
264
|
xr as DialogActivityLog,
|
|
@@ -288,28 +289,28 @@ export {
|
|
|
288
289
|
Fr as DrawerHeader,
|
|
289
290
|
E as Dropdown,
|
|
290
291
|
Ar as DropdownBase,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
292
|
+
mx as DsAlert,
|
|
293
|
+
px as DsBadge,
|
|
294
|
+
bx as DsButton,
|
|
295
|
+
xx as DsCheckbox,
|
|
296
|
+
fx as DsChip,
|
|
297
|
+
ix as DsCombobox,
|
|
298
|
+
yx as DsDetails,
|
|
299
|
+
sx as DsDialog,
|
|
300
|
+
kx as DsHeading,
|
|
301
|
+
Fx as DsLink,
|
|
302
|
+
nx as DsListItem,
|
|
303
|
+
lx as DsListUnordered,
|
|
304
|
+
cx as DsPagination,
|
|
305
|
+
Px as DsParagraph,
|
|
306
|
+
ux as DsPopover,
|
|
307
|
+
dx as DsSearch,
|
|
308
|
+
gx as DsSkeleton,
|
|
309
|
+
Ax as DsSpinner,
|
|
310
|
+
Dx as DsSwitch,
|
|
311
|
+
Lx as DsTabs,
|
|
312
|
+
Bx as DsTextfield,
|
|
313
|
+
vx as DsValidationMessage,
|
|
313
314
|
ua as Field,
|
|
314
315
|
R as FieldBase,
|
|
315
316
|
ga as Fieldset,
|
|
@@ -367,12 +368,12 @@ export {
|
|
|
367
368
|
X as MetaItemIcon,
|
|
368
369
|
st as MetaTimestamp,
|
|
369
370
|
lt as Metadata,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
371
|
+
Vp as Modal,
|
|
372
|
+
Cp as ModalBase,
|
|
373
|
+
Ep as ModalBody,
|
|
374
|
+
wp as ModalFooter,
|
|
375
|
+
Hp as ModalHeader,
|
|
376
|
+
Np as ModalIcon,
|
|
376
377
|
ut as NotificationItem,
|
|
377
378
|
gt as NotificationItemBase,
|
|
378
379
|
Lt as NotificationItemControls,
|
|
@@ -407,8 +408,9 @@ export {
|
|
|
407
408
|
_a as SettingsItem,
|
|
408
409
|
op as SettingsItemBase,
|
|
409
410
|
ep as SettingsList,
|
|
410
|
-
|
|
411
|
-
|
|
411
|
+
mp as SettingsListVirtual,
|
|
412
|
+
fp as SettingsModal,
|
|
413
|
+
pp as SettingsSection,
|
|
412
414
|
e as SizeEnum,
|
|
413
415
|
Xt as Skeleton,
|
|
414
416
|
Vt as Snackbar,
|
|
@@ -436,29 +438,29 @@ export {
|
|
|
436
438
|
Dm as ToolbarFilterMenu,
|
|
437
439
|
_ as ToolbarMenu,
|
|
438
440
|
$ as ToolbarSearch,
|
|
439
|
-
|
|
441
|
+
zp as Tooltip,
|
|
440
442
|
Xm as Transmission,
|
|
441
443
|
oa as TransmissionList,
|
|
442
444
|
Zm as TransmissionType,
|
|
443
445
|
_m as TransmissionTypeEnum,
|
|
444
446
|
ea as Typography,
|
|
445
|
-
|
|
446
|
-
|
|
447
|
+
sp as UsedByLog,
|
|
448
|
+
lp as UsedByLogItem,
|
|
447
449
|
la as UserListItem,
|
|
448
450
|
oo as VirtualizedMenuItems,
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
451
|
+
ox as formatDate,
|
|
452
|
+
_p as formatDisplayName,
|
|
453
|
+
ex as formatOrgNo,
|
|
452
454
|
l as isAvatarGroupProps,
|
|
453
455
|
i as isAvatarProps,
|
|
454
456
|
Ee as isHeadingProps,
|
|
455
457
|
ro as isIconProps,
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
458
|
+
Yp as useAccountSelector,
|
|
459
|
+
jp as useClickOutside,
|
|
460
|
+
Ix as useDsPagination,
|
|
461
|
+
qp as useEscapeKey,
|
|
460
462
|
Bm as useFilter,
|
|
461
|
-
|
|
463
|
+
Wp as useMenu,
|
|
462
464
|
eo as useRootContext,
|
|
463
465
|
Jt as useSnackbar
|
|
464
466
|
};
|
|
@@ -22,3 +22,4 @@ export declare const InfoExpanded: Story;
|
|
|
22
22
|
export declare const ErrorBanner: Story;
|
|
23
23
|
export declare const ErrorExpanded: Story;
|
|
24
24
|
export declare const Colors: (args: BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const StrongCompany: (args: BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { LayoutColor, LayoutSidebarProps, LayoutTheme } from '.';
|
|
3
|
+
import { BannerColor, BannerVariant } from '../Banner';
|
|
3
4
|
import { BreadcrumbsProps } from '../Breadcrumbs';
|
|
4
5
|
import { FooterProps } from '../Footer';
|
|
5
6
|
import { GlobalHeaderProps } from '../GlobalHeader';
|
|
7
|
+
import { SvgElement } from '../Icon';
|
|
6
8
|
import { MenuProps } from '../Menu';
|
|
7
9
|
import { SkipLinkProps } from '../SkipLink';
|
|
8
10
|
interface SidebarProps extends LayoutSidebarProps {
|
|
@@ -12,7 +14,18 @@ interface SidebarProps extends LayoutSidebarProps {
|
|
|
12
14
|
interface ContentProps {
|
|
13
15
|
color?: LayoutColor;
|
|
14
16
|
}
|
|
17
|
+
export interface LayoutBannerProps {
|
|
18
|
+
title: string;
|
|
19
|
+
link?: {
|
|
20
|
+
label: string;
|
|
21
|
+
href: string;
|
|
22
|
+
};
|
|
23
|
+
color?: BannerColor;
|
|
24
|
+
variant?: BannerVariant;
|
|
25
|
+
icon?: SvgElement;
|
|
26
|
+
}
|
|
15
27
|
export interface LayoutProps {
|
|
28
|
+
banner?: LayoutBannerProps;
|
|
16
29
|
color?: LayoutColor;
|
|
17
30
|
theme?: LayoutTheme;
|
|
18
31
|
header?: GlobalHeaderProps;
|
|
@@ -23,5 +36,5 @@ export interface LayoutProps {
|
|
|
23
36
|
skipLink?: SkipLinkProps;
|
|
24
37
|
breadcrumbs?: BreadcrumbsProps;
|
|
25
38
|
}
|
|
26
|
-
export declare const Layout: ({ color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const Layout: ({ banner, color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
40
|
export {};
|
|
@@ -4,7 +4,7 @@ interface LayoutStoryArgs extends LayoutProps {
|
|
|
4
4
|
}
|
|
5
5
|
declare const meta: {
|
|
6
6
|
title: string;
|
|
7
|
-
component: ({ color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
component: ({ banner, color, theme, header, footer, sidebar, content, children, skipLink, breadcrumbs, }: LayoutProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: string;
|
|
10
10
|
};
|
|
@@ -46,4 +46,6 @@ export declare const HiddenSidebar: (args: LayoutStoryArgs) => import("react/jsx
|
|
|
46
46
|
export declare const Fullscreen: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
47
47
|
export declare const Profile: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
48
48
|
export declare const SidebarReference: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare const WithBanner: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
export declare const WithCustomBanner: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
49
51
|
export declare const InboxLayout: (args: LayoutStoryArgs) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,6 +5,7 @@ export interface LayoutBaseProps {
|
|
|
5
5
|
color?: LayoutColor;
|
|
6
6
|
theme?: LayoutTheme /** TODO: Should be renamed to variant */;
|
|
7
7
|
currentId?: string;
|
|
8
|
+
bannerHeight?: number;
|
|
8
9
|
children?: ReactNode;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
@@ -20,4 +21,4 @@ export interface LayoutBaseProps {
|
|
|
20
21
|
* - Footer
|
|
21
22
|
*
|
|
22
23
|
*/
|
|
23
|
-
export declare const LayoutBase: ({ currentId, color, theme, children }: LayoutBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const LayoutBase: ({ currentId, color, theme, bannerHeight, children }: LayoutBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -37,6 +37,7 @@ declare const meta: {
|
|
|
37
37
|
linkIcon?: boolean | undefined;
|
|
38
38
|
controls?: import('react').ReactNode;
|
|
39
39
|
summary?: import('react').ReactNode;
|
|
40
|
+
containerAs?: "li" | "div" | undefined;
|
|
40
41
|
as?: import('react').ElementType | undefined;
|
|
41
42
|
href?: string | undefined;
|
|
42
43
|
onClick?: (() => void) | undefined;
|
|
@@ -19,5 +19,6 @@ export interface SettingsItemBaseProps extends ItemLinkProps {
|
|
|
19
19
|
controls?: ReactNode;
|
|
20
20
|
children?: ReactNode;
|
|
21
21
|
summary?: ReactNode;
|
|
22
|
+
containerAs?: 'li' | 'div';
|
|
22
23
|
}
|
|
23
|
-
export declare const SettingsItemBase: ({ as, ref, hidden, disabled, loading, color, collapsible, expanded, icon, label, titleProps, descriptionProps, summary, children, highlightWords, badge, linkIcon, controls, ...rest }: SettingsItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const SettingsItemBase: ({ as, ref, hidden, disabled, loading, color, collapsible, expanded, icon, label, titleProps, descriptionProps, summary, children, highlightWords, badge, linkIcon, controls, containerAs: ContainerTag, ...rest }: SettingsItemBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -8,5 +8,6 @@ export interface SettingsListProps {
|
|
|
8
8
|
items: SettingsItemProps[];
|
|
9
9
|
groups?: Record<string, SettingsGroupProps>;
|
|
10
10
|
sortGroupBy?: (a: [string, SettingsItemProps[]], b: [string, SettingsItemProps[]]) => number;
|
|
11
|
+
virtualized?: boolean;
|
|
11
12
|
}
|
|
12
|
-
export declare const SettingsList: ({ items, variant, groups, sortGroupBy }: SettingsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SettingsList: ({ items, variant, groups, sortGroupBy, virtualized, }: SettingsListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SettingsItemProps } from '..';
|
|
2
|
+
import { SettingsGroupProps, SettingsListProps } from './SettingsList';
|
|
3
|
+
export interface SettingsListVirtualProps {
|
|
4
|
+
variant?: SettingsListProps['variant'];
|
|
5
|
+
items: SettingsItemProps[];
|
|
6
|
+
groups?: Record<string, SettingsGroupProps>;
|
|
7
|
+
sortGroupBy?: SettingsListProps['sortGroupBy'];
|
|
8
|
+
}
|
|
9
|
+
export declare const SettingsListVirtual: ({ items, variant, groups, sortGroupBy, }: SettingsListVirtualProps) => import("react/jsx-runtime").JSX.Element;
|