@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.
Files changed (28) hide show
  1. package/dist/LayoutBase-CAdjuw9Q.js +18 -0
  2. package/dist/assets/Banner.css +1 -1
  3. package/dist/assets/HeaderDrawer.css +1 -1
  4. package/dist/assets/HeaderDropdown.css +1 -1
  5. package/dist/assets/LayoutBase.css +1 -1
  6. package/dist/assets/SettingsListVirtual.css +1 -0
  7. package/dist/components/Banner/Banner.js +34 -34
  8. package/dist/components/GlobalHeader/HeaderDrawer.js +13 -13
  9. package/dist/components/GlobalHeader/HeaderDropdown.js +8 -8
  10. package/dist/components/Layout/Layout.js +63 -40
  11. package/dist/components/Layout/LayoutBase.js +3 -5
  12. package/dist/components/Layout/index.js +9 -9
  13. package/dist/components/Settings/SettingsItemBase.js +31 -30
  14. package/dist/components/Settings/SettingsList.js +34 -25
  15. package/dist/components/Settings/SettingsListVirtual.js +115 -0
  16. package/dist/components/Settings/index.js +10 -8
  17. package/dist/components/index.js +72 -70
  18. package/dist/index.js +86 -84
  19. package/dist/types/lib/components/Banner/Banner.stories.d.ts +1 -0
  20. package/dist/types/lib/components/Layout/Layout.d.ts +14 -1
  21. package/dist/types/lib/components/Layout/Layout.stories.d.ts +3 -1
  22. package/dist/types/lib/components/Layout/LayoutBase.d.ts +2 -1
  23. package/dist/types/lib/components/Settings/SettingsItem.stories.d.ts +1 -0
  24. package/dist/types/lib/components/Settings/SettingsItemBase.d.ts +2 -1
  25. package/dist/types/lib/components/Settings/SettingsList.d.ts +2 -1
  26. package/dist/types/lib/components/Settings/SettingsListVirtual.d.ts +9 -0
  27. package/dist/types/lib/components/Settings/index.d.ts +1 -0
  28. 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 { LayoutBase as ce } from "./components/Layout/LayoutBase.js";
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 { SettingsSection as mp } from "./components/Settings/SettingsSection.js";
174
- import { SettingsModal as pp } from "./components/Settings/SettingsModal.js";
175
- import { UsedByLog as fp } from "./components/Settings/UsedByLog.js";
176
- import { UsedByLogItem as sp } from "./components/Settings/UsedByLogItem.js";
177
- import { DashboardHeader as lp } from "./components/Dashboard/DashboardHeader.js";
178
- import { DashboardCard as up } from "./components/Dashboard/DashboardCard.js";
179
- import { ActivityLog as gp } from "./components/ActivityLog/ActivityLog.js";
180
- import { ActivityLogSegment as Lp } from "./components/ActivityLog/ActivityLogSegment.js";
181
- import { ActivityLogItem as Ip } from "./components/ActivityLog/ActivityLogItem.js";
182
- import { ArticleHeader as bp } from "./components/Article/ArticleHeader.js";
183
- import { ArticleContact as Mp } from "./components/Article/ArticleContact.js";
184
- import { Article as Tp } from "./components/Article/Article.js";
185
- import { ModalBase as hp } from "./components/Modal/ModalBase.js";
186
- import { ModalHeader as Cp } from "./components/Modal/ModalHeader.js";
187
- import { ModalFooter as Hp } from "./components/Modal/ModalFooter.js";
188
- import { ModalIcon as wp } from "./components/Modal/ModalIcon.js";
189
- import { ModalBody as Np } from "./components/Modal/ModalBody.js";
190
- import { Modal as Ep } from "./components/Modal/Modal.js";
191
- import { Tooltip as Vp } from "./components/Tooltip/Tooltip.js";
192
- import { useClickOutside as zp } from "./hooks/useClickOutside.js";
193
- import { useEscapeKey as jp } from "./hooks/useEscapeKey.js";
194
- import { useMenu as qp } from "./hooks/useMenu.js";
195
- import { useAccountSelector as Wp } from "./hooks/useAccountSelector.js";
196
- import { formatDisplayName as Yp } from "./functions/name/name.js";
197
- import { formatDate as _p } from "./functions/date/date.js";
198
- import { formatOrgNo as ox } from "./functions/orgno/orgno.js";
199
- import { A as ex } from "./alert-BzifOfXl.js";
200
- import { B as mx, C as ax, a as px, b as xx, D as fx, L as ix, c as sx, P as nx, d as lx, e as cx, f as ux, S as dx, g as gx, T as Dx, u as Lx } from "./textfield-f4Za2qt6.js";
201
- import { B as Ix, S as Sx } from "./button-BB5sYVKY.js";
202
- import { D as Ax } from "./index-Q0EA2XB0.js";
203
- import { H as yx } from "./heading-C_XYsUfi.js";
204
- import { L as kx } from "./link-D1SA3LCe.js";
205
- import { P as Fx } from "./paragraph-BRiIBpbY.js";
206
- import { V as Px } from "./index-z82sbSVU.js";
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
- gp as ActivityLog,
219
- Ip as ActivityLogItem,
220
- Lp as ActivityLogSegment,
219
+ Lp as ActivityLog,
220
+ bp as ActivityLogItem,
221
+ Ip as ActivityLogSegment,
221
222
  h as Alert,
222
- Tp as Article,
223
- Mp as ArticleContact,
224
- bp as ArticleHeader,
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
- up as DashboardCard,
260
- lp as DashboardHeader,
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
- ex as DsAlert,
292
- mx as DsBadge,
293
- Ix as DsButton,
294
- ax as DsCheckbox,
295
- px as DsChip,
296
- xx as DsCombobox,
297
- Ax as DsDetails,
298
- fx as DsDialog,
299
- yx as DsHeading,
300
- kx as DsLink,
301
- ix as DsListItem,
302
- sx as DsListUnordered,
303
- nx as DsPagination,
304
- Fx as DsParagraph,
305
- lx as DsPopover,
306
- cx as DsSearch,
307
- ux as DsSkeleton,
308
- Sx as DsSpinner,
309
- dx as DsSwitch,
310
- gx as DsTabs,
311
- Dx as DsTextfield,
312
- Px as DsValidationMessage,
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
- Ep as Modal,
371
- hp as ModalBase,
372
- Np as ModalBody,
373
- Hp as ModalFooter,
374
- Cp as ModalHeader,
375
- wp as ModalIcon,
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
- pp as SettingsModal,
411
- mp as SettingsSection,
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
- Vp as Tooltip,
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
- fp as UsedByLog,
446
- sp as UsedByLogItem,
447
+ sp as UsedByLog,
448
+ lp as UsedByLogItem,
447
449
  la as UserListItem,
448
450
  oo as VirtualizedMenuItems,
449
- _p as formatDate,
450
- Yp as formatDisplayName,
451
- ox as formatOrgNo,
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
- Wp as useAccountSelector,
457
- zp as useClickOutside,
458
- Lx as useDsPagination,
459
- jp as useEscapeKey,
458
+ Yp as useAccountSelector,
459
+ jp as useClickOutside,
460
+ Ix as useDsPagination,
461
+ qp as useEscapeKey,
460
462
  Bm as useFilter,
461
- qp as useMenu,
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;
@@ -1,6 +1,7 @@
1
1
  export * from './SettingsItem';
2
2
  export * from './SettingsItemBase';
3
3
  export * from './SettingsList';
4
+ export * from './SettingsListVirtual';
4
5
  export * from './SettingsSection';
5
6
  export * from './SettingsModal';
6
7
  export * from './UsedByLog';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altinn/altinn-components",
3
- "version": "0.61.3",
3
+ "version": "0.63.0",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",