@altinn/altinn-components 0.43.4 → 0.43.6

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.
@@ -1,50 +1,52 @@
1
1
  import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { Skeleton as g } from "../Skeleton/Skeleton.js";
5
- import { Heading as x } from "../Typography/Heading.js";
6
- import { Badge as j } from "../Badge/Badge.js";
4
+ import { Skeleton as x } from "../Skeleton/Skeleton.js";
5
+ import { Heading as j } from "../Typography/Heading.js";
6
+ import { Badge as D } from "../Badge/Badge.js";
7
7
  import "../RootProvider/RootProvider.js";
8
- import { DialogMetadata as D } from "./DialogMetadata.js";
8
+ import { DialogMetadata as H } from "./DialogMetadata.js";
9
9
  import "../Snackbar/useSnackbar.js";
10
- import { Flex as H } from "../Page/Flex.js";
11
- import { Section as S } from "../Page/Section.js";
12
- const C = ({
10
+ import { Flex as S } from "../Page/Flex.js";
11
+ import { Section as k } from "../Page/Section.js";
12
+ const E = ({
13
13
  loading: i,
14
14
  title: e,
15
15
  badge: o,
16
16
  status: m,
17
- draftsLabel: n,
18
- sentCount: p,
19
- receivedCount: a,
20
- updatedAt: l,
21
- updatedAtLabel: c,
22
- attachmentsCount: s,
23
- dueAt: d,
24
- dueAtLabel: f,
25
- activityLog: h
26
- }) => /* @__PURE__ */ t(S, { as: "header", spacing: 3, align: "start", children: [
27
- /* @__PURE__ */ r(x, { size: "xl", children: /* @__PURE__ */ t(H, { align: "center", children: [
28
- /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(g, { loading: i, children: e }) }),
29
- o && /* @__PURE__ */ r(j, { ...o })
17
+ extendedStatusLabel: n,
18
+ draftsLabel: p,
19
+ sentCount: a,
20
+ receivedCount: l,
21
+ updatedAt: c,
22
+ updatedAtLabel: s,
23
+ attachmentsCount: d,
24
+ dueAt: f,
25
+ dueAtLabel: h,
26
+ activityLog: g
27
+ }) => /* @__PURE__ */ t(k, { as: "header", spacing: 3, align: "start", children: [
28
+ /* @__PURE__ */ r(j, { size: "xl", children: /* @__PURE__ */ t(S, { align: "center", children: [
29
+ /* @__PURE__ */ r("span", { children: /* @__PURE__ */ r(x, { loading: i, children: e }) }),
30
+ o && /* @__PURE__ */ r(D, { ...o })
30
31
  ] }) }),
31
32
  /* @__PURE__ */ r(
32
- D,
33
+ H,
33
34
  {
34
35
  loading: i,
35
36
  status: m,
36
- draftsLabel: n,
37
- sentCount: p,
38
- receivedCount: a,
39
- updatedAt: l,
40
- updatedAtLabel: c,
41
- dueAt: d,
42
- dueAtLabel: f,
43
- attachmentsCount: s,
44
- activityLog: h
37
+ extendedStatusLabel: n,
38
+ draftsLabel: p,
39
+ sentCount: a,
40
+ receivedCount: l,
41
+ updatedAt: c,
42
+ updatedAtLabel: s,
43
+ dueAt: f,
44
+ dueAtLabel: h,
45
+ attachmentsCount: d,
46
+ activityLog: g
45
47
  }
46
48
  )
47
49
  ] });
48
50
  export {
49
- C as DialogHeader
51
+ E as DialogHeader
50
52
  };
@@ -1,44 +1,45 @@
1
- import { jsxs as g, jsx as p } from "react/jsx-runtime";
2
- import { createElement as x } from "react";
1
+ import { jsxs as x, jsx as p } from "react/jsx-runtime";
2
+ import { createElement as b } from "react";
3
3
  import "../../index-L8X2o7IH.js";
4
- import { AccountMenu as b } from "../Account/AccountMenu.js";
5
- import { useRootContext as k } from "../RootProvider/RootProvider.js";
6
- import { DrawerOrDropdown as I } from "../Dropdown/DrawerOrDropdown.js";
7
- import { useIsDesktop as h } from "../../hooks/useIsDesktop.js";
4
+ import { AccountMenu as k } from "../Account/AccountMenu.js";
5
+ import { useRootContext as I } from "../RootProvider/RootProvider.js";
6
+ import { DrawerOrDropdown as h } from "../Dropdown/DrawerOrDropdown.js";
7
+ import { useIsDesktop as w } from "../../hooks/useIsDesktop.js";
8
8
  import "../Snackbar/useSnackbar.js";
9
- import { ToolbarButton as w } from "./ToolbarButton.js";
10
- import { ToolbarFilterBase as B } from "./ToolbarFilterBase.js";
11
- const R = ({
9
+ import { ToolbarButton as B } from "./ToolbarButton.js";
10
+ import { ToolbarFilterBase as C } from "./ToolbarFilterBase.js";
11
+ const q = ({
12
12
  currentAccount: o,
13
- id: a = "toolbar-accounts",
13
+ id: s = "toolbar-accounts",
14
14
  onSelectAccount: t,
15
- buttonTestId: n,
16
- ...d
15
+ buttonTestId: d,
16
+ title: l = "Endre aktør",
17
+ ...n
17
18
  }) => {
18
- const { currentId: i, toggleId: l, closeAll: s } = k(), f = h(), T = () => l(a), e = i === a;
19
- return /* @__PURE__ */ g(B, { expanded: e, onBlurCapture: (r) => {
20
- const m = r.relatedTarget;
21
- (!m || !r.currentTarget.contains(m)) && s();
19
+ const { currentId: i, toggleId: f, closeAll: a } = I(), T = w(), g = () => f(s), r = i === s;
20
+ return /* @__PURE__ */ x(C, { expanded: r, onBlurCapture: (e) => {
21
+ const m = e.relatedTarget;
22
+ (!m || !e.currentTarget.contains(m)) && a();
22
23
  }, dataTestId: "filter-base-accounts", children: [
23
24
  /* @__PURE__ */ p(
24
- w,
25
+ B,
25
26
  {
26
27
  type: "switch",
27
- onToggle: T,
28
+ onToggle: g,
28
29
  active: !!o,
29
- dataTestId: n,
30
- "aria-expanded": e,
30
+ dataTestId: d,
31
+ "aria-expanded": r,
31
32
  children: o == null ? void 0 : o.name
32
33
  }
33
34
  ),
34
- /* @__PURE__ */ p(I, { open: e, size: "lg", drawerTitle: "Endre konto", onClose: s, children: /* @__PURE__ */ x(
35
- b,
35
+ /* @__PURE__ */ p(h, { open: r, size: "lg", drawerTitle: l, onClose: a, children: /* @__PURE__ */ b(
36
+ k,
36
37
  {
37
- ...d,
38
- keyboardEvents: e && f,
38
+ ...n,
39
+ keyboardEvents: r && T,
39
40
  key: i,
40
- onSelectAccount: (r) => {
41
- t == null || t(r), s();
41
+ onSelectAccount: (e) => {
42
+ t == null || t(e), a();
42
43
  },
43
44
  currentAccount: o
44
45
  }
@@ -46,5 +47,5 @@ const R = ({
46
47
  ] });
47
48
  };
48
49
  export {
49
- R as ToolbarAccountMenu
50
+ q as ToolbarAccountMenu
50
51
  };
@@ -8,6 +8,8 @@ export interface DialogHeaderProps extends DialogMetadataProps {
8
8
  badge?: BadgeProps;
9
9
  /** Dialog status */
10
10
  status?: DialogStatusProps;
11
+ /** Extended Status Label */
12
+ extendedStatusLabel?: string;
11
13
  /** Drafts label */
12
14
  draftsLabel?: string;
13
15
  /** Number of submissions sent */
@@ -23,4 +25,4 @@ export interface DialogHeaderProps extends DialogMetadataProps {
23
25
  /** Due date label */
24
26
  dueAtLabel?: string;
25
27
  }
26
- export declare const DialogHeader: ({ loading, title, badge, status, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
28
+ export declare const DialogHeader: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: DialogHeaderProps) => 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, title, badge, status, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
4
+ component: ({ loading, title, badge, status, extendedStatusLabel, draftsLabel, sentCount, receivedCount, updatedAt, updatedAtLabel, attachmentsCount, dueAt, dueAtLabel, activityLog, }: import('./DialogHeader').DialogHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
5
  tags: string[];
6
6
  parameters: {};
7
7
  args: {
@@ -20,3 +20,4 @@ export declare const Default: Story;
20
20
  export declare const InProgress: Story;
21
21
  export declare const Completed: Story;
22
22
  export declare const Loading: Story;
23
+ export declare const WithExtendedStatus: Story;
@@ -3,5 +3,6 @@ export interface ToolbarAccountMenuProps extends AccountMenuProps {
3
3
  id?: string;
4
4
  isVirtualized?: boolean;
5
5
  buttonTestId?: string;
6
+ title?: string;
6
7
  }
7
- export declare const ToolbarAccountMenu: ({ currentAccount, id, onSelectAccount, buttonTestId, ...rest }: ToolbarAccountMenuProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const ToolbarAccountMenu: ({ currentAccount, id, onSelectAccount, buttonTestId, title, ...rest }: ToolbarAccountMenuProps) => 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.43.4",
3
+ "version": "0.43.6",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",