@altinn/altinn-components 0.6.12 → 0.7.1

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 (92) hide show
  1. package/dist/assets/AutocompleteBase.css +1 -1
  2. package/dist/assets/AutocompleteGroup.css +1 -1
  3. package/dist/assets/DialogBorder.css +1 -1
  4. package/dist/assets/DialogHeaderBase.css +1 -1
  5. package/dist/assets/DialogHeadings.css +1 -1
  6. package/dist/assets/DialogListItem.css +1 -1
  7. package/dist/assets/DialogTitle.css +1 -1
  8. package/dist/assets/ListItemBase.css +1 -1
  9. package/dist/assets/ListItemControls.css +1 -0
  10. package/dist/assets/ListItemHeader.css +1 -0
  11. package/dist/assets/ListItemLabel.css +1 -1
  12. package/dist/assets/ListItemMedia.css +1 -1
  13. package/dist/assets/ListItemSelect.css +1 -0
  14. package/dist/assets/MetaItemBase.css +1 -0
  15. package/dist/assets/MetaItemLabel.css +1 -0
  16. package/dist/assets/MetaItemMedia.css +1 -0
  17. package/dist/components/Bookmarks/BookmarksList.d.ts +1 -1
  18. package/dist/components/Bookmarks/BookmarksListItem.d.ts +2 -13
  19. package/dist/components/Bookmarks/BookmarksListItem.js +5 -10
  20. package/dist/components/Button/Button.js +2 -2
  21. package/dist/components/Button/Buttons.stories.js +2 -2
  22. package/dist/components/ContextMenu/ContextMenu.d.ts +2 -1
  23. package/dist/components/ContextMenu/ContextMenu.js +19 -8
  24. package/dist/components/ContextMenu/ContextMenuBase.d.ts +2 -1
  25. package/dist/components/ContextMenu/ContextMenuBase.js +19 -18
  26. package/dist/components/Dialog/Dialog.stories.js +30 -20
  27. package/dist/components/Dialog/DialogBase.d.ts +2 -0
  28. package/dist/components/Dialog/DialogBorder.d.ts +1 -1
  29. package/dist/components/Dialog/DialogBorder.js +5 -5
  30. package/dist/components/Dialog/DialogContent.stories.js +1 -1
  31. package/dist/components/Dialog/DialogGroup.js +5 -5
  32. package/dist/components/Dialog/DialogHeader.d.ts +1 -1
  33. package/dist/components/Dialog/DialogHeader.js +6 -6
  34. package/dist/components/Dialog/DialogHeaderBase.d.ts +3 -1
  35. package/dist/components/Dialog/DialogHeaderBase.js +3 -3
  36. package/dist/components/Dialog/DialogHeadings.d.ts +2 -3
  37. package/dist/components/Dialog/DialogHeadings.js +24 -26
  38. package/dist/components/Dialog/DialogLabel.d.ts +13 -0
  39. package/dist/components/Dialog/DialogLabel.js +17 -0
  40. package/dist/components/Dialog/DialogListItem.d.ts +17 -5
  41. package/dist/components/Dialog/DialogListItem.js +86 -70
  42. package/dist/components/Dialog/DialogListItem.stories.js +117 -68
  43. package/dist/components/Dialog/DialogMetadata.d.ts +9 -1
  44. package/dist/components/Dialog/DialogMetadata.js +25 -21
  45. package/dist/components/Dialog/DialogNav.js +16 -16
  46. package/dist/components/Dialog/DialogTitle.d.ts +7 -9
  47. package/dist/components/Dialog/DialogTitle.js +9 -10
  48. package/dist/components/Dialog/Examples.stories.js +31 -0
  49. package/dist/components/Dialog/index.d.ts +1 -1
  50. package/dist/components/Dialog/index.js +41 -41
  51. package/dist/components/List/ListItem.d.ts +5 -25
  52. package/dist/components/List/ListItem.js +41 -20
  53. package/dist/components/List/ListItem.stories.js +79 -45
  54. package/dist/components/List/ListItemBase.d.ts +8 -10
  55. package/dist/components/List/ListItemBase.js +52 -46
  56. package/dist/components/List/{ListItemAction.d.ts → ListItemControls.d.ts} +3 -3
  57. package/dist/components/List/ListItemControls.js +19 -0
  58. package/dist/components/List/ListItemHeader.d.ts +8 -0
  59. package/dist/components/List/ListItemHeader.js +8 -0
  60. package/dist/components/List/ListItemLabel.js +7 -7
  61. package/dist/components/List/ListItemMedia.js +7 -7
  62. package/dist/components/List/ListItemSelect.d.ts +12 -0
  63. package/dist/components/List/ListItemSelect.js +15 -0
  64. package/dist/components/List/index.d.ts +5 -3
  65. package/dist/components/List/index.js +16 -12
  66. package/dist/components/Meta/MetaItemBase.d.ts +1 -1
  67. package/dist/components/Meta/MetaItemBase.js +21 -20
  68. package/dist/components/Meta/MetaItemLabel.js +5 -4
  69. package/dist/components/Meta/MetaItemMedia.js +9 -8
  70. package/dist/components/Page/PageNav.js +7 -7
  71. package/dist/components/Searchbar/Autocomplete.stories.js +241 -13
  72. package/dist/components/Searchbar/AutocompleteBase.js +5 -5
  73. package/dist/components/Searchbar/AutocompleteGroup.js +9 -12
  74. package/dist/components/Searchbar/AutocompleteItem.d.ts +23 -11
  75. package/dist/components/Searchbar/AutocompleteItem.js +21 -8
  76. package/dist/components/Searchbar/ScopeListItem.d.ts +12 -0
  77. package/dist/components/Searchbar/ScopeListItem.js +12 -0
  78. package/dist/components/Toolbar/ToolbarButton.js +2 -1
  79. package/dist/components/index.js +153 -149
  80. package/dist/hooks/useMenu.js +19 -19
  81. package/dist/index.js +163 -159
  82. package/package.json +1 -1
  83. package/dist/assets/DialogListItemBase.css +0 -1
  84. package/dist/assets/ListItemAction.css +0 -1
  85. package/dist/assets/metaItem.css +0 -1
  86. package/dist/components/Dialog/DialogListItemBase.d.ts +0 -28
  87. package/dist/components/Dialog/DialogListItemBase.js +0 -24
  88. package/dist/components/Dialog/DialogTitle.stories.js +0 -26
  89. package/dist/components/List/ListItemAction.js +0 -19
  90. package/dist/components/List/ListItemAction.stories.js +0 -45
  91. package/dist/metaItem.module-CfNiX769.js +0 -8
  92. /package/dist/assets/{AutocompleteItem.css → ScopeListItem.css} +0 -0
@@ -2,12 +2,12 @@ import { ReactNode } from 'react';
2
2
  import { BadgeProps } from '../Badge';
3
3
  import { ContextMenuProps } from '../ContextMenu';
4
4
  import { IconName } from '../Icon';
5
- interface ListItemActionProps {
5
+ interface ListItemControlsProps {
6
6
  badge?: BadgeProps;
7
- menu?: ContextMenuProps;
8
7
  linkText?: string;
9
8
  linkIcon?: IconName;
9
+ menu?: ContextMenuProps;
10
10
  children?: ReactNode;
11
11
  }
12
- export declare const ListItemAction: ({ linkText, linkIcon, menu, badge, children }: ListItemActionProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const ListItemControls: ({ badge, linkText, linkIcon, menu, children }: ListItemControlsProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as t, jsxs as l, Fragment as m } from "react/jsx-runtime";
2
+ import { Badge as i } from "../Badge/Badge.js";
3
+ import { ContextMenu as a } from "../ContextMenu/ContextMenu.js";
4
+ import { Icon as d } from "../Icon/Icon.js";
5
+ import "../Icon/SvgIcon.js";
6
+ import "../../index-L8X2o7IH.js";
7
+ import '../../assets/ListItemControls.css';const _ = "_controls_dduzt_1", p = "_linkText_dduzt_14", x = "_linkIcon_dduzt_19", o = {
8
+ controls: _,
9
+ linkText: p,
10
+ linkIcon: x
11
+ }, T = ({ badge: s, linkText: r, linkIcon: c, menu: n, children: e }) => /* @__PURE__ */ t("div", { className: o.controls, "data-menu": n && !0, children: e || /* @__PURE__ */ l(m, { children: [
12
+ s && /* @__PURE__ */ t(i, { ...s }),
13
+ r && /* @__PURE__ */ t("span", { className: o.linkText, children: r }),
14
+ c && /* @__PURE__ */ t(d, { name: c, className: o.linkIcon }),
15
+ n && /* @__PURE__ */ t(a, { ...n, className: o.menu })
16
+ ] }) });
17
+ export {
18
+ T as ListItemControls
19
+ };
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { ListItemSize } from './ListItemBase';
3
+ export interface ListItemHeaderProps {
4
+ size?: ListItemSize;
5
+ className?: string;
6
+ children?: ReactNode;
7
+ }
8
+ export declare const ListItemHeader: ({ size, className, children }: ListItemHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { c as t } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/ListItemHeader.css';const o = "_header_70chu_1", c = {
4
+ header: o
5
+ }, h = ({ size: e = "sm", className: r, children: s }) => /* @__PURE__ */ a("header", { className: t(c.header, r), "data-size": e, children: s });
6
+ export {
7
+ h as ListItemHeader
8
+ };
@@ -1,11 +1,11 @@
1
- import { jsx as s, jsxs as n, Fragment as c } from "react/jsx-runtime";
2
- import '../../assets/ListItemLabel.css';const r = "_label_1ajdw_3", d = "_title_1ajdw_33", o = "_description_1ajdw_46", e = {
1
+ import { jsx as a, jsxs as n, Fragment as c } from "react/jsx-runtime";
2
+ import '../../assets/ListItemLabel.css';const r = "_label_1aaut_3", o = "_title_1aaut_33", d = "_description_1aaut_46", s = {
3
3
  label: r,
4
- title: d,
5
- description: o
6
- }, m = ({ size: t = "sm", title: l, description: i, children: a }) => /* @__PURE__ */ s("span", { className: e.label, "data-size": t, children: a || /* @__PURE__ */ n(c, { children: [
7
- /* @__PURE__ */ s("strong", { className: e.title, "data-size": t, children: l }),
8
- /* @__PURE__ */ s("span", { className: e.description, "data-size": t, children: i })
4
+ title: o,
5
+ description: d
6
+ }, m = ({ size: t = "sm", title: l, description: i, children: e }) => /* @__PURE__ */ a("span", { className: s.label, "data-size": t, children: e || /* @__PURE__ */ n(c, { children: [
7
+ /* @__PURE__ */ a("strong", { className: s.title, "data-size": t, children: l }),
8
+ /* @__PURE__ */ a("span", { className: s.description, "data-size": t, children: i })
9
9
  ] }) });
10
10
  export {
11
11
  m as ListItemLabel
@@ -1,12 +1,12 @@
1
1
  import { jsxs as d, jsx as l } from "react/jsx-runtime";
2
2
  import { Avatar as n } from "../Avatar/Avatar.js";
3
3
  import { AvatarGroup as c } from "../Avatar/AvatarGroup.js";
4
- import { Icon as u } from "../Icon/Icon.js";
4
+ import { Icon as x } from "../Icon/Icon.js";
5
5
  import "../Icon/SvgIcon.js";
6
6
  import "../../index-L8X2o7IH.js";
7
- import '../../assets/ListItemMedia.css';const x = "_media_pfuu4_3", f = "_icon_pfuu4_23", s = {
8
- media: x,
9
- icon: f
7
+ import '../../assets/ListItemMedia.css';const f = "_media_14b0z_3", u = "_icon_14b0z_24", s = {
8
+ media: f,
9
+ icon: u
10
10
  }, a = {
11
11
  avatar: {
12
12
  xs: "xs",
@@ -22,7 +22,7 @@ import '../../assets/ListItemMedia.css';const x = "_media_pfuu4_3", f = "_icon_p
22
22
  lg: "md",
23
23
  xl: "lg"
24
24
  }
25
- }, A = ({
25
+ }, j = ({
26
26
  size: t = "sm",
27
27
  color: i = "default",
28
28
  icon: m,
@@ -30,7 +30,7 @@ import '../../assets/ListItemMedia.css';const x = "_media_pfuu4_3", f = "_icon_p
30
30
  avatarGroup: r,
31
31
  children: e
32
32
  }) => !m && !o && !r && !e ? !1 : /* @__PURE__ */ d("div", { className: s.media, "data-size": t, "data-color": m ? i : null, children: [
33
- m && /* @__PURE__ */ l(u, { name: m, variant: "outline", className: s.icon }) || o && /* @__PURE__ */ l(n, { ...o, size: a == null ? void 0 : a.avatar[t], className: s.avatar }) || r && /* @__PURE__ */ l(
33
+ m && /* @__PURE__ */ l(x, { name: m, variant: "outline", className: s.icon }) || o && /* @__PURE__ */ l(n, { ...o, size: a == null ? void 0 : a.avatar[t], className: s.avatar }) || r && /* @__PURE__ */ l(
34
34
  c,
35
35
  {
36
36
  ...r,
@@ -41,5 +41,5 @@ import '../../assets/ListItemMedia.css';const x = "_media_pfuu4_3", f = "_icon_p
41
41
  e
42
42
  ] });
43
43
  export {
44
- A as ListItemMedia
44
+ j as ListItemMedia
45
45
  };
@@ -0,0 +1,12 @@
1
+ import { ChangeEventHandler } from 'react';
2
+ import { ListItemSize } from './ListItemBase';
3
+ export type ListItemSelectProps = {
4
+ size?: ListItemSize;
5
+ checked?: boolean;
6
+ onChange?: ChangeEventHandler;
7
+ className?: string;
8
+ };
9
+ /**
10
+ * Dialog checkbox
11
+ */
12
+ export declare const ListItemSelect: ({ size, checked, onChange, className }: ListItemSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { c as a } from "../../index-L8X2o7IH.js";
3
+ import "../Icon/SvgIcon.js";
4
+ import { CheckboxIcon as i } from "../Icon/CheckboxIcon.js";
5
+ import '../../assets/ListItemSelect.css';const r = "_label_hd89l_1", m = "_input_hd89l_38", p = "_icon_hd89l_43", t = {
6
+ label: r,
7
+ input: m,
8
+ icon: p
9
+ }, h = ({ size: l, checked: e = !1, onChange: s, className: c }) => /* @__PURE__ */ n("label", { className: a(t.label, c), "data-size": l, children: [
10
+ /* @__PURE__ */ o("input", { type: "checkbox", checked: e, onChange: s, className: t.input, tabIndex: -1 }),
11
+ /* @__PURE__ */ o(i, { hover: !0, checked: e, className: t.icon })
12
+ ] });
13
+ export {
14
+ h as ListItemSelect
15
+ };
@@ -1,7 +1,9 @@
1
1
  export * from './ListItemBase';
2
+ export * from './ListItemHeader';
3
+ export * from './ListItemLabel';
4
+ export * from './ListItemMedia';
5
+ export * from './ListItemControls';
6
+ export * from './ListItemSelect';
2
7
  export * from './ListItem';
3
8
  export * from './ListBase';
4
9
  export * from './List';
5
- export * from './ListItemLabel';
6
- export * from './ListItemMedia';
7
- export * from './ListItemAction';
@@ -1,16 +1,20 @@
1
1
  import { ListItemBase as o } from "./ListItemBase.js";
2
- import { ListItem as m } from "./ListItem.js";
3
- import { ListBase as s } from "./ListBase.js";
4
- import { List as f } from "./List.js";
5
- import { ListItemLabel as x } from "./ListItemLabel.js";
6
- import { ListItemMedia as a } from "./ListItemMedia.js";
7
- import { ListItemAction as b } from "./ListItemAction.js";
2
+ import { ListItemHeader as m } from "./ListItemHeader.js";
3
+ import { ListItemLabel as i } from "./ListItemLabel.js";
4
+ import { ListItemMedia as f } from "./ListItemMedia.js";
5
+ import { ListItemControls as x } from "./ListItemControls.js";
6
+ import { ListItemSelect as a } from "./ListItemSelect.js";
7
+ import { ListItem as d } from "./ListItem.js";
8
+ import { ListBase as b } from "./ListBase.js";
9
+ import { List as n } from "./List.js";
8
10
  export {
9
- f as List,
10
- s as ListBase,
11
- m as ListItem,
12
- b as ListItemAction,
11
+ n as List,
12
+ b as ListBase,
13
+ d as ListItem,
13
14
  o as ListItemBase,
14
- x as ListItemLabel,
15
- a as ListItemMedia
15
+ x as ListItemControls,
16
+ m as ListItemHeader,
17
+ i as ListItemLabel,
18
+ f as ListItemMedia,
19
+ a as ListItemSelect
16
20
  };
@@ -1,5 +1,5 @@
1
1
  import { ElementType, ReactNode } from 'react';
2
- export type MetaItemVariant = 'solid' | 'outline' | 'dotted' | 'text';
2
+ export type MetaItemVariant = 'solid' | 'outline' | 'dotted' | 'rounded' | 'text';
3
3
  export type MetaItemSize = 'xs';
4
4
  export type MetaItemColor = 'subtle';
5
5
  export interface MetaItemBaseProps {
@@ -1,29 +1,30 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- import { c } from "../../index-L8X2o7IH.js";
3
- import { s as d } from "../../metaItem.module-CfNiX769.js";
4
- const g = ({
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { c as p } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/MetaItemBase.css';const d = "_item_o4xu8_1", x = {
4
+ item: d
5
+ }, u = ({
5
6
  as: t,
6
- variant: a = "text",
7
- size: o,
8
- color: e,
7
+ variant: e = "text",
8
+ size: a,
9
+ color: o,
9
10
  progress: s,
10
- datetime: r,
11
- className: m,
12
- children: n,
13
- ...p
14
- }) => /* @__PURE__ */ i(
11
+ datetime: m,
12
+ className: n,
13
+ children: r,
14
+ ...i
15
+ }) => /* @__PURE__ */ c(
15
16
  t || "span",
16
17
  {
17
- "data-size": o,
18
- "data-color": e,
19
- "data-variant": a,
18
+ "data-size": a,
19
+ "data-color": o,
20
+ "data-variant": e,
20
21
  "data-progress": s,
21
- dateTime: r,
22
- className: c(d.item, m),
23
- ...p,
24
- children: n
22
+ dateTime: m,
23
+ className: p(x.item, n),
24
+ ...i,
25
+ children: r
25
26
  }
26
27
  );
27
28
  export {
28
- g as MetaItemBase
29
+ u as MetaItemBase
29
30
  };
@@ -1,6 +1,7 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { s as r } from "../../metaItem.module-CfNiX769.js";
3
- const l = ({ size: a = "xs", variant: t = "text", children: s }) => /* @__PURE__ */ e("span", { className: r.label, "data-variant": t, "data-size": a, children: s });
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import '../../assets/MetaItemLabel.css';const s = "_label_8431v_1", n = {
3
+ label: s
4
+ }, r = ({ size: a = "xs", variant: t = "text", children: e }) => /* @__PURE__ */ l("span", { className: n.label, "data-variant": t, "data-size": a, children: e });
4
5
  export {
5
- l as MetaItemLabel
6
+ r as MetaItemLabel
6
7
  };
@@ -1,12 +1,13 @@
1
- import { jsxs as t, jsx as s } from "react/jsx-runtime";
2
- import { Icon as o } from "../Icon/Icon.js";
1
+ import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
+ import { Icon as i } from "../Icon/Icon.js";
3
3
  import "../Icon/SvgIcon.js";
4
- import { ProgressIcon as i } from "../Icon/ProgressIcon.js";
5
- import { s as m } from "../../metaItem.module-CfNiX769.js";
6
- const d = ({ size: r = "xs", icon: e, progress: a }) => !e && typeof a != "number" ? !1 : /* @__PURE__ */ t("span", { className: m.media, "data-size": r, children: [
7
- e && /* @__PURE__ */ s(o, { name: e, className: m.icon }),
8
- a && /* @__PURE__ */ s(i, { value: a, className: m.icon })
4
+ import { ProgressIcon as r } from "../Icon/ProgressIcon.js";
5
+ import '../../assets/MetaItemMedia.css';const n = "_media_m8ywm_1", a = {
6
+ media: n
7
+ }, p = ({ size: t = "xs", icon: e, progress: m }) => !e && typeof m != "number" ? !1 : /* @__PURE__ */ o("span", { className: a.media, "data-size": t, children: [
8
+ e && /* @__PURE__ */ s(i, { name: e, className: a.icon }),
9
+ m && /* @__PURE__ */ s(r, { value: m, className: a.icon })
9
10
  ] });
10
11
  export {
11
- d as MetaItemMedia
12
+ p as MetaItemMedia
12
13
  };
@@ -1,8 +1,8 @@
1
- import { jsxs as s, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as o } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "../Icon/SvgIcon.js";
4
- import { Button as n } from "../Button/Button.js";
5
- import '../../assets/DialogNav.css';const i = "_nav_678a5_1", c = "_action_678a5_8", e = {
4
+ import { Button as e } from "../Button/Button.js";
5
+ import '../../assets/DialogNav.css';const i = "_nav_678a5_1", c = "_action_678a5_8", r = {
6
6
  nav: i,
7
7
  action: c
8
8
  }, _ = ({
@@ -10,10 +10,10 @@ import '../../assets/DialogNav.css';const i = "_nav_678a5_1", c = "_action_678a5
10
10
  as: "a",
11
11
  label: "Back"
12
12
  },
13
- children: o
14
- }) => /* @__PURE__ */ s("nav", { className: e.nav, children: [
15
- /* @__PURE__ */ r(n, { ...a, variant: "text", color: "secondary", icon: "arrow-left", reverse: !0, children: (a == null ? void 0 : a.label) || "Back" }),
16
- /* @__PURE__ */ r("div", { className: e.action, children: o })
13
+ children: n
14
+ }) => /* @__PURE__ */ s("nav", { className: r.nav, children: [
15
+ /* @__PURE__ */ o(e, { ...a, variant: "text", color: "secondary", icon: "arrow-left", children: (a == null ? void 0 : a.label) || "Back" }),
16
+ /* @__PURE__ */ o("div", { className: r.action, children: n })
17
17
  ] });
18
18
  export {
19
19
  _ as PageNav
@@ -1,41 +1,137 @@
1
1
  import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
- import { Autocomplete as r } from "./Autocomplete.js";
3
- const l = {
2
+ import { Autocomplete as l } from "./Autocomplete.js";
3
+ const o = {
4
4
  title: "Header/Autocomplete",
5
- component: r,
5
+ component: l,
6
6
  tags: ["autodocs"],
7
7
  parameters: {},
8
8
  args: {}
9
- }, a = {
9
+ }, p = {
10
10
  args: {
11
11
  groups: {},
12
12
  items: [
13
13
  {
14
14
  id: "1a",
15
- groupId: "1",
15
+ type: "scope",
16
16
  href: "#",
17
17
  label: "Alt i innboks"
18
18
  },
19
19
  {
20
20
  id: "1b",
21
- groupId: "1",
21
+ type: "scope",
22
22
  href: "#",
23
23
  label: "Alt i hele Altinn"
24
24
  }
25
25
  ]
26
26
  }
27
- }, n = {
27
+ }, d = {
28
+ args: {
29
+ items: [
30
+ {
31
+ id: "1a",
32
+ type: "scope",
33
+ href: "#",
34
+ label: "Skriv minst 3 tegn for søke i innboks"
35
+ },
36
+ {
37
+ id: "1b",
38
+ type: "scope",
39
+ href: "#",
40
+ label: () => /* @__PURE__ */ e("span", { children: [
41
+ /* @__PURE__ */ t("mark", { children: "sk" }),
42
+ " i hele Altinn"
43
+ ] })
44
+ }
45
+ ]
46
+ }
47
+ }, a = {
48
+ args: {
49
+ groups: {
50
+ 3: {
51
+ title: "Mest relevante treff"
52
+ }
53
+ },
54
+ items: [
55
+ {
56
+ id: "1a",
57
+ groupId: "1",
58
+ type: "scope",
59
+ href: "#",
60
+ badge: {
61
+ label: "2 treff"
62
+ },
63
+ label: () => /* @__PURE__ */ e("span", { children: [
64
+ /* @__PURE__ */ t("mark", { children: "skatt" }),
65
+ " i innboks"
66
+ ] })
67
+ },
68
+ {
69
+ id: "1b",
70
+ groupId: "1",
71
+ type: "scope",
72
+ href: "#",
73
+ label: () => /* @__PURE__ */ e("span", { children: [
74
+ /* @__PURE__ */ t("mark", { children: "skatt" }),
75
+ " i hele Altinn"
76
+ ] })
77
+ },
78
+ {
79
+ id: "2a",
80
+ groupId: "3",
81
+ type: "dialog",
82
+ href: "#",
83
+ title: "Skattemeldingen 2023",
84
+ summary: "Skattemeldingen er klar for innsending."
85
+ },
86
+ {
87
+ id: "2b",
88
+ groupId: "3",
89
+ type: "dialog",
90
+ href: "#",
91
+ title: "Skatteoppgjør 2022",
92
+ summary: "Skatteoppgjøret ditt er klart."
93
+ }
94
+ ]
95
+ }
96
+ }, r = {
97
+ args: {
98
+ ...a.args,
99
+ items: [
100
+ ...a.args.items,
101
+ {
102
+ id: "2c",
103
+ groupId: "4",
104
+ href: "#",
105
+ icon: "pie-chart",
106
+ title: "Skattemeldingen",
107
+ description: "Slik fyller du ut skattemeldingen din."
108
+ },
109
+ {
110
+ id: "2d",
111
+ groupId: "4",
112
+ icon: "sign-language-two-hands",
113
+ href: "#",
114
+ title: "Alt om skatteoppgjøret",
115
+ description: "Lorem ipsum dolor sit amet."
116
+ }
117
+ ]
118
+ }
119
+ }, i = {
28
120
  args: {
29
121
  groups: {
30
122
  2: {
31
- title: "2 treff i innboksen"
123
+ title: "Søkeforslag"
32
124
  }
33
125
  },
34
126
  items: [
35
127
  {
36
128
  id: "1a",
37
129
  groupId: "1",
130
+ type: "scope",
38
131
  href: "#",
132
+ badge: {
133
+ label: "2 treff"
134
+ },
39
135
  label: () => /* @__PURE__ */ e("span", { children: [
40
136
  /* @__PURE__ */ t("mark", { children: "skatt" }),
41
137
  " i innboks"
@@ -44,6 +140,7 @@ const l = {
44
140
  {
45
141
  id: "1b",
46
142
  groupId: "1",
143
+ type: "scope",
47
144
  href: "#",
48
145
  label: () => /* @__PURE__ */ e("span", { children: [
49
146
  /* @__PURE__ */ t("mark", { children: "skatt" }),
@@ -53,20 +150,151 @@ const l = {
53
150
  {
54
151
  id: "2a",
55
152
  groupId: "2",
153
+ type: "bookmark",
154
+ href: "#",
155
+ label: "Skattemeldingen 2023",
156
+ params: [
157
+ {
158
+ label: "skatt"
159
+ },
160
+ {
161
+ label: "inkasso"
162
+ },
163
+ {
164
+ type: "filter",
165
+ label: "Namsmannen"
166
+ },
167
+ {
168
+ type: "filter",
169
+ label: "Denne uken"
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ id: "2b",
175
+ groupId: "2",
176
+ type: "bookmark",
177
+ href: "#",
178
+ params: [
179
+ {
180
+ type: "filter",
181
+ label: "Skatteetaten"
182
+ },
183
+ {
184
+ type: "filter",
185
+ label: "Denne uken"
186
+ }
187
+ ]
188
+ }
189
+ ]
190
+ }
191
+ }, g = {
192
+ args: {
193
+ ...r.args,
194
+ groups: {
195
+ 2: {
196
+ title: "Søkeforslag"
197
+ },
198
+ 3: {
199
+ title: "Anbefalte treff"
200
+ }
201
+ },
202
+ items: [
203
+ ...r.args.items,
204
+ {
205
+ id: "2a",
206
+ groupId: "2",
207
+ type: "bookmark",
56
208
  href: "#",
57
- label: "Skattemeldingen 2023"
209
+ label: "Skattemeldingen 2023",
210
+ params: [
211
+ {
212
+ label: "skatt"
213
+ },
214
+ {
215
+ label: "inkasso"
216
+ },
217
+ {
218
+ type: "filter",
219
+ label: "Namsmannen"
220
+ },
221
+ {
222
+ type: "filter",
223
+ label: "Denne uken"
224
+ }
225
+ ]
58
226
  },
59
227
  {
60
228
  id: "2b",
61
229
  groupId: "2",
230
+ type: "bookmark",
231
+ href: "#",
232
+ params: [
233
+ {
234
+ type: "filter",
235
+ label: "Skatteetaten"
236
+ },
237
+ {
238
+ type: "filter",
239
+ label: "Denne uken"
240
+ }
241
+ ]
242
+ }
243
+ ]
244
+ }
245
+ }, k = {
246
+ args: {
247
+ ...i.args,
248
+ groups: {
249
+ noHits: {
250
+ title: "Ingen treff"
251
+ }
252
+ },
253
+ items: [
254
+ {
255
+ id: "1a",
256
+ groupId: "1",
257
+ type: "scope",
258
+ href: "#",
259
+ disabled: !0,
260
+ badge: {
261
+ label: "Ingen treff"
262
+ },
263
+ label: () => /* @__PURE__ */ e("span", { children: [
264
+ /* @__PURE__ */ t("mark", { children: "skatt" }),
265
+ " i innboks"
266
+ ] })
267
+ },
268
+ {
269
+ id: "1b",
270
+ groupId: "1",
271
+ type: "scope",
62
272
  href: "#",
63
- label: "Skattemeldingen 2022"
273
+ label: () => /* @__PURE__ */ e("span", { children: [
274
+ /* @__PURE__ */ t("mark", { children: "skatt" }),
275
+ " i hele Altinn"
276
+ ] })
277
+ },
278
+ {
279
+ groupId: "noHits",
280
+ id: "2a",
281
+ type: "information",
282
+ label: () => /* @__PURE__ */ e("span", { children: [
283
+ "Søk etter ",
284
+ /* @__PURE__ */ t("mark", { children: "skatt" }),
285
+ " ga ingen treff."
286
+ ] })
64
287
  }
65
288
  ]
66
289
  }
67
290
  };
68
291
  export {
69
- a as Scopes,
70
- n as ScopesAndSuggestions,
71
- l as default
292
+ k as NoHits,
293
+ p as Scopes,
294
+ r as ScopesAndMixedResults,
295
+ a as ScopesAndResults,
296
+ i as ScopesAndSuggestions,
297
+ g as ScopesResultsAndSuggestions,
298
+ d as TooFewWords,
299
+ o as default
72
300
  };
@@ -1,8 +1,8 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { c as a } from "../../index-L8X2o7IH.js";
3
- import '../../assets/AutocompleteBase.css';const s = "_autocomplete_1ccsg_1", m = {
4
- autocomplete: s
5
- }, l = ({ expanded: o, children: t, className: e }) => /* @__PURE__ */ c("nav", { className: a(m.autocomplete, e), "aria-expanded": o, children: t });
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { c } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/AutocompleteBase.css';const m = "_autocomplete_1yzw8_1", s = {
4
+ autocomplete: m
5
+ }, l = ({ expanded: o, children: t, className: e }) => /* @__PURE__ */ a("nav", { className: c(s.autocomplete, e), "aria-expanded": o, children: t });
6
6
  export {
7
7
  l as AutocompleteBase
8
8
  };