@altinn/altinn-components 0.7.1 → 0.7.2

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 (68) hide show
  1. package/dist/assets/DialogBorder.css +1 -1
  2. package/dist/assets/DialogHeadings.css +1 -1
  3. package/dist/assets/DialogListItem.css +1 -1
  4. package/dist/assets/DialogSummary.css +1 -0
  5. package/dist/assets/HeaderButton.css +1 -1
  6. package/dist/assets/ListItemBase.css +1 -1
  7. package/dist/assets/ListItemLabel.css +1 -1
  8. package/dist/assets/MenuItemBase.css +1 -1
  9. package/dist/assets/MenuSearch.css +1 -1
  10. package/dist/assets/Skeleton.css +1 -0
  11. package/dist/assets/ToolbarSearch.css +1 -1
  12. package/dist/components/Dialog/DialogActions.d.ts +1 -2
  13. package/dist/components/Dialog/DialogBorder.d.ts +2 -1
  14. package/dist/components/Dialog/DialogBorder.js +6 -6
  15. package/dist/components/Dialog/DialogHeadings.d.ts +2 -1
  16. package/dist/components/Dialog/DialogHeadings.js +37 -32
  17. package/dist/components/Dialog/DialogListItem.d.ts +3 -1
  18. package/dist/components/Dialog/DialogListItem.js +72 -68
  19. package/dist/components/Dialog/DialogListItem.stories.js +40 -34
  20. package/dist/components/Dialog/DialogMetadata.d.ts +3 -1
  21. package/dist/components/Dialog/DialogMetadata.js +26 -25
  22. package/dist/components/Dialog/DialogStatus.d.ts +2 -1
  23. package/dist/components/Dialog/DialogStatus.js +11 -9
  24. package/dist/components/Dialog/DialogSummary.d.ts +12 -0
  25. package/dist/components/Dialog/DialogSummary.js +8 -0
  26. package/dist/components/Dialog/DialogTitle.d.ts +2 -1
  27. package/dist/components/Dialog/DialogTitle.js +10 -9
  28. package/dist/components/Dialog/DialogTouchedBy.d.ts +2 -1
  29. package/dist/components/Dialog/DialogTouchedBy.js +4 -4
  30. package/dist/components/GlobalMenu/AccountButton.js +1 -1
  31. package/dist/components/GlobalMenu/AccountMenu.js +16 -15
  32. package/dist/components/Header/Header.d.ts +3 -1
  33. package/dist/components/Header/Header.js +30 -29
  34. package/dist/components/Header/HeaderButton.d.ts +3 -1
  35. package/dist/components/Header/HeaderButton.js +37 -29
  36. package/dist/components/Header/HeaderButton.stories.js +10 -6
  37. package/dist/components/List/ListItem.js +32 -36
  38. package/dist/components/List/ListItem.stories.js +41 -36
  39. package/dist/components/List/ListItemBase.d.ts +12 -12
  40. package/dist/components/List/ListItemBase.js +45 -43
  41. package/dist/components/List/ListItemHeader.d.ts +14 -2
  42. package/dist/components/List/ListItemHeader.js +29 -6
  43. package/dist/components/List/ListItemLabel.d.ts +2 -1
  44. package/dist/components/List/ListItemLabel.js +10 -9
  45. package/dist/components/List/ListItemMedia.d.ts +2 -1
  46. package/dist/components/List/ListItemMedia.js +23 -21
  47. package/dist/components/Menu/MenuItem.d.ts +7 -8
  48. package/dist/components/Menu/MenuItem.js +35 -21
  49. package/dist/components/Menu/MenuItem.stories.js +37 -35
  50. package/dist/components/Menu/MenuItemBase.d.ts +15 -13
  51. package/dist/components/Menu/MenuItemBase.js +59 -57
  52. package/dist/components/Menu/MenuSearch.d.ts +2 -1
  53. package/dist/components/Menu/MenuSearch.js +39 -19
  54. package/dist/components/Menu/MenuSearch.stories.js +10 -7
  55. package/dist/components/Meta/MetaItem.d.ts +2 -1
  56. package/dist/components/Meta/MetaItem.js +9 -8
  57. package/dist/components/Meta/MetaTimestamp.d.ts +2 -1
  58. package/dist/components/Meta/MetaTimestamp.js +14 -6
  59. package/dist/components/Searchbar/AutocompleteItem.js +10 -10
  60. package/dist/components/Skeleton/Skeleton.d.ts +11 -0
  61. package/dist/components/Skeleton/Skeleton.js +9 -0
  62. package/dist/components/Skeleton/index.d.ts +1 -0
  63. package/dist/components/Skeleton/index.js +4 -0
  64. package/dist/components/Toolbar/Toolbar.js +1 -1
  65. package/dist/components/Toolbar/ToolbarSearch.d.ts +2 -1
  66. package/dist/components/Toolbar/ToolbarSearch.js +38 -18
  67. package/dist/components/Toolbar/ToolbarSearch.stories.js +8 -5
  68. package/package.json +1 -1
@@ -1,26 +1,28 @@
1
- import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
- import { LayoutBase as i } from "../Layout/LayoutBase.js";
1
+ import { jsx as n, jsxs as s } from "react/jsx-runtime";
2
+ import { fn as i } from "@storybook/test";
3
+ import { LayoutBase as l } from "../Layout/LayoutBase.js";
3
4
  import "../../index-L8X2o7IH.js";
4
5
  import "react";
5
6
  import "../Icon/SvgIcon.js";
6
7
  import "../RootProvider/RootProvider.js";
7
- import { MetaItem as l } from "../Meta/MetaItem.js";
8
+ import { MetaItem as p } from "../Meta/MetaItem.js";
8
9
  import { MenuItem as o } from "./MenuItem.js";
9
- import { MenuBase as p } from "./MenuBase.js";
10
- const h = {
10
+ import { MenuBase as m } from "./MenuBase.js";
11
+ const v = {
11
12
  title: "Menu/MenuItem",
12
13
  component: o,
13
14
  tags: ["autodocs"],
14
15
  parameters: {},
15
16
  args: {
16
- id: "inbox"
17
+ id: "inbox",
18
+ onClick: i()
17
19
  }
18
- }, B = {
20
+ }, I = {
19
21
  args: {
20
22
  icon: "inbox",
21
23
  title: "Innboks"
22
24
  }
23
- }, v = {
25
+ }, A = {
24
26
  args: {
25
27
  icon: "inbox",
26
28
  title: "Innboks",
@@ -28,14 +30,14 @@ const h = {
28
30
  label: "4"
29
31
  }
30
32
  }
31
- }, I = {
33
+ }, C = {
32
34
  args: {
33
35
  size: "lg",
34
36
  icon: "inbox",
35
37
  title: "Innboks",
36
38
  color: "strong"
37
39
  }
38
- }, A = {
40
+ }, G = {
39
41
  args: {
40
42
  size: "lg",
41
43
  icon: "inbox",
@@ -46,7 +48,7 @@ const h = {
46
48
  label: "4"
47
49
  }
48
50
  }
49
- }, m = {
51
+ }, c = {
50
52
  args: {
51
53
  avatar: {
52
54
  type: "person",
@@ -54,7 +56,7 @@ const h = {
54
56
  },
55
57
  title: "Eirik Horneland"
56
58
  }
57
- }, G = {
59
+ }, M = {
58
60
  args: {
59
61
  avatarGroup: {
60
62
  items: [
@@ -74,7 +76,7 @@ const h = {
74
76
  },
75
77
  title: "3 personer"
76
78
  }
77
- }, c = {
79
+ }, g = {
78
80
  args: {
79
81
  avatar: {
80
82
  type: "company",
@@ -82,7 +84,7 @@ const h = {
82
84
  },
83
85
  title: "Sportsklubben Brann"
84
86
  }
85
- }, M = {
87
+ }, z = {
86
88
  args: {
87
89
  avatarGroup: {
88
90
  defaultType: "company",
@@ -100,36 +102,36 @@ const h = {
100
102
  },
101
103
  title: "3 virksomheter"
102
104
  }
103
- }, z = {
105
+ }, H = {
104
106
  args: {
105
- ...m.args,
107
+ ...c.args,
106
108
  size: "lg",
107
109
  description: "Født: XX.XX.XXXX"
108
110
  }
109
- }, C = {
111
+ }, S = {
110
112
  args: {
111
- ...c.args,
113
+ ...g.args,
112
114
  size: "lg",
113
115
  description: "Org nr.: XX.XX.XXXX"
114
116
  }
115
- }, H = () => {
117
+ }, E = () => {
116
118
  const t = ["global", "neutral", "company", "person", "global-dark"], a = ["neutral", "subtle", "strong", "company", "person"];
117
- return /* @__PURE__ */ e("div", { style: { display: "flex", width: "100%" }, children: t.map((n) => /* @__PURE__ */ e("div", { style: { flexGrow: 1 }, children: /* @__PURE__ */ e(i, { theme: n, children: /* @__PURE__ */ e(p, { children: a.map((r) => /* @__PURE__ */ s("div", { children: [
118
- /* @__PURE__ */ e(o, { icon: "inbox", title: "Title", color: r, id: "inbox" }),
119
- /* @__PURE__ */ e(l, { children: n + "/" + r })
120
- ] }, r)) }) }) }, n)) });
119
+ return /* @__PURE__ */ n("div", { style: { display: "flex", width: "100%" }, children: t.map((e) => /* @__PURE__ */ n("div", { style: { flexGrow: 1 }, children: /* @__PURE__ */ n(l, { theme: e, children: /* @__PURE__ */ n(m, { children: a.map((r) => /* @__PURE__ */ s("div", { children: [
120
+ /* @__PURE__ */ n(o, { icon: "inbox", title: "Title", color: r, id: "inbox" }),
121
+ /* @__PURE__ */ n(p, { children: e + "/" + r })
122
+ ] }, r)) }) }) }, e)) });
121
123
  };
122
124
  export {
123
- A as AlertBadge,
124
- c as Company,
125
- C as CompanyAccount,
126
- M as CompanyGroup,
127
- B as Default,
128
- v as DefaultBadge,
129
- I as Large,
130
- m as Person,
131
- z as PersonAccount,
132
- G as PersonGroup,
133
- H as ThemesAndColors,
134
- h as default
125
+ G as AlertBadge,
126
+ g as Company,
127
+ S as CompanyAccount,
128
+ z as CompanyGroup,
129
+ I as Default,
130
+ A as DefaultBadge,
131
+ C as Large,
132
+ c as Person,
133
+ H as PersonAccount,
134
+ M as PersonGroup,
135
+ E as ThemesAndColors,
136
+ v as default
135
137
  };
@@ -1,23 +1,25 @@
1
- import { ElementType, MouseEventHandler, ReactNode } from 'react';
1
+ import { ElementType, KeyboardEventHandler, ReactNode } from 'react';
2
2
  import { BadgeProps } from '../Badge';
3
3
  import { IconName } from '../Icon';
4
- export type MenuItemColor = 'neutral' | 'subtle' | 'strong' | 'company' | 'person';
5
4
  export type MenuItemSize = 'sm' | 'md' | 'lg';
5
+ export type MenuItemColor = 'neutral' | 'subtle' | 'strong' | 'company' | 'person';
6
6
  export interface MenuItemBaseProps {
7
7
  as?: ElementType;
8
- onClick?: MouseEventHandler;
8
+ size?: MenuItemSize;
9
9
  color?: MenuItemColor;
10
- children?: ReactNode;
10
+ className?: string;
11
+ href?: string;
12
+ onClick?: () => void;
13
+ onKeyPress?: KeyboardEventHandler;
11
14
  tabIndex?: number;
12
- size?: MenuItemSize;
13
- linkIcon?: IconName;
14
- linkText?: string;
15
- badge?: BadgeProps;
16
- collapsible?: boolean;
15
+ hidden?: boolean;
16
+ disabled?: boolean;
17
17
  active?: boolean;
18
- expanded?: boolean;
19
18
  selected?: boolean;
20
- disabled?: boolean;
21
- className?: string;
19
+ expanded?: boolean;
20
+ children?: ReactNode;
21
+ badge?: BadgeProps;
22
+ linkIcon?: IconName;
23
+ linkText?: string;
22
24
  }
23
- export declare const MenuItemBase: ({ as, onClick, size, color, linkIcon, linkText, badge, tabIndex, active, collapsible, expanded, selected, disabled, className, children, ...rest }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const MenuItemBase: ({ as, size, color, className, href, onClick, onKeyPress, tabIndex, hidden, disabled, active, selected, expanded, linkIcon, linkText, badge, children, }: MenuItemBaseProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,61 +1,63 @@
1
- import { jsxs as t, jsx as a } from "react/jsx-runtime";
2
- import { c as v } from "../../index-L8X2o7IH.js";
3
- import { Badge as N } from "../Badge/Badge.js";
4
- import { Icon as T } from "../Icon/Icon.js";
1
+ import { jsxs as i, jsx as c } from "react/jsx-runtime";
2
+ import { c as N } from "../../index-L8X2o7IH.js";
3
+ import { Badge as u } from "../Badge/Badge.js";
4
+ import { Icon as v } from "../Icon/Icon.js";
5
5
  import "../Icon/SvgIcon.js";
6
- import '../../assets/MenuItemBase.css';const B = "_item_16huj_1", g = "_content_16huj_36", w = "_action_16huj_44", y = "_linkText_16huj_51", z = "_linkIcon_16huj_56", C = "_media_16huj_76", n = {
7
- item: B,
8
- content: g,
9
- action: w,
10
- linkText: y,
6
+ import '../../assets/MenuItemBase.css';const T = "_item_y1gbn_1", j = "_content_y1gbn_37", B = "_action_y1gbn_45", k = "_linkText_y1gbn_52", z = "_linkIcon_y1gbn_57", E = "_media_y1gbn_77", t = {
7
+ item: T,
8
+ content: j,
9
+ action: B,
10
+ linkText: k,
11
11
  linkIcon: z,
12
- media: C
13
- }, E = ({
14
- as: l,
15
- onClick: _,
16
- size: d,
17
- color: h,
18
- linkIcon: o,
19
- linkText: c,
20
- badge: i,
21
- tabIndex: p = 0,
22
- active: u = !1,
23
- collapsible: s = !1,
24
- expanded: m = !1,
25
- selected: f = !1,
26
- disabled: r = !1,
27
- className: j,
28
- children: x,
29
- ...I
30
- }) => {
31
- const k = l || "a", e = s && m ? "chevron-up" : s ? "chevron-down" : o && "chevron-right";
32
- return /* @__PURE__ */ t(
33
- k,
34
- {
35
- role: "menuitem",
36
- tabIndex: r ? "-1" : p ?? 0,
37
- "data-size": d,
38
- "data-color": h,
39
- "data-active": u,
40
- "aria-expanded": m,
41
- "aria-disabled": r,
42
- "aria-selected": f,
43
- onClick: _,
44
- className: v(n.item, j),
45
- ...I,
46
- children: [
47
- /* @__PURE__ */ t("div", { className: n.content, children: [
48
- x,
49
- i && /* @__PURE__ */ a(N, { ...i })
50
- ] }),
51
- e && /* @__PURE__ */ t("div", { className: n.action, children: [
52
- c && /* @__PURE__ */ a("span", { className: n.linkText, children: c }),
53
- e && /* @__PURE__ */ a(T, { name: e, className: n.linkIcon })
54
- ] })
55
- ]
56
- }
57
- );
58
- };
12
+ media: E
13
+ }, G = ({
14
+ as: d,
15
+ size: _,
16
+ color: l,
17
+ className: p,
18
+ href: x,
19
+ onClick: n,
20
+ onKeyPress: a,
21
+ tabIndex: f = 0,
22
+ hidden: b,
23
+ disabled: o = !1,
24
+ active: g = !1,
25
+ selected: h = !1,
26
+ expanded: y = !1,
27
+ linkIcon: e,
28
+ linkText: m,
29
+ badge: s,
30
+ children: I
31
+ }) => /* @__PURE__ */ i(
32
+ d || "a",
33
+ {
34
+ role: "menuitem",
35
+ tabIndex: o ? "-1" : f ?? 0,
36
+ className: N(t.item, p),
37
+ "data-size": _,
38
+ "data-color": l,
39
+ "data-active": g,
40
+ "aria-hidden": b,
41
+ "aria-expanded": y,
42
+ "aria-disabled": o,
43
+ "aria-selected": h,
44
+ href: x,
45
+ onKeyPress: (r) => {
46
+ r.key === "Enter" && (n == null || n()), a == null || a(r);
47
+ },
48
+ onClick: n,
49
+ children: [
50
+ /* @__PURE__ */ i("div", { className: t.content, children: [
51
+ I,
52
+ s && /* @__PURE__ */ c(u, { ...s })
53
+ ] }),
54
+ e && /* @__PURE__ */ i("div", { className: t.action, children: [
55
+ m && /* @__PURE__ */ c("span", { className: t.linkText, children: m }),
56
+ e && /* @__PURE__ */ c(v, { name: e, className: t.linkIcon })
57
+ ] })
58
+ ]
59
+ }
60
+ );
59
61
  export {
60
- E as MenuItemBase
62
+ G as MenuItemBase
61
63
  };
@@ -4,5 +4,6 @@ export interface MenuSearchProps {
4
4
  name: string;
5
5
  value: string;
6
6
  onChange: ChangeEventHandler;
7
+ onClear?: () => void;
7
8
  }
8
- export declare const MenuSearch: ({ value, name, placeholder, onChange }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const MenuSearch: ({ value, name, placeholder, onChange, onClear }: MenuSearchProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,41 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/MenuSearch.css';const i = "_input_73dww_1", _ = "_button_73dww_13", u = "_close_73dww_18", l = "_icon_73dww_22", o = {
3
- input: i,
4
- button: _,
5
- close: u,
6
- icon: l
7
- }, r = ({ value: n, name: c, placeholder: s = "Søk", onChange: e }) => /* @__PURE__ */ t("div", { className: o.field, children: /* @__PURE__ */ t(
8
- "input",
9
- {
10
- type: "search",
11
- value: n,
12
- name: c,
13
- placeholder: s,
14
- className: o.input,
15
- onChange: e,
16
- autoComplete: "off"
17
- }
18
- ) });
1
+ import { jsxs as m, jsx as i } from "react/jsx-runtime";
2
+ import { Icon as r } from "../Icon/Icon.js";
3
+ import "../Icon/SvgIcon.js";
4
+ import "../../index-L8X2o7IH.js";
5
+ import "react";
6
+ import { IconButton as a } from "../Button/IconButton.js";
7
+ import "../RootProvider/RootProvider.js";
8
+ import '../../assets/MenuSearch.css';const l = "_field_mo7y9_1", p = "_icon_mo7y9_5", _ = "_input_mo7y9_14", f = "_clear_mo7y9_31", o = {
9
+ field: l,
10
+ icon: p,
11
+ input: _,
12
+ clear: f
13
+ }, k = ({ value: t, name: n, placeholder: s = "Søk", onChange: e, onClear: c }) => /* @__PURE__ */ m("div", { className: o.field, children: [
14
+ /* @__PURE__ */ i(
15
+ "input",
16
+ {
17
+ type: "search",
18
+ value: t,
19
+ name: n,
20
+ placeholder: s,
21
+ className: o.input,
22
+ onChange: e,
23
+ autoComplete: "off"
24
+ }
25
+ ),
26
+ /* @__PURE__ */ i(r, { name: "magnifying-glass", className: o.icon }),
27
+ c && /* @__PURE__ */ i(
28
+ a,
29
+ {
30
+ icon: "x-mark",
31
+ color: "secondary",
32
+ variant: "solid",
33
+ size: "custom",
34
+ className: o.clear,
35
+ onClick: c
36
+ }
37
+ )
38
+ ] });
19
39
  export {
20
- r as MenuSearch
40
+ k as MenuSearch
21
41
  };
@@ -1,14 +1,17 @@
1
- import { MenuSearch as e } from "./MenuSearch.js";
2
- const a = {
1
+ import { fn as e } from "@storybook/test";
2
+ import { MenuSearch as t } from "./MenuSearch.js";
3
+ const r = {
3
4
  title: "Menu/MenuSearch",
4
- component: e,
5
+ component: t,
5
6
  tags: ["autodocs"],
6
7
  parameters: {},
7
8
  args: {}
8
- }, o = {
9
- args: {}
9
+ }, n = {
10
+ args: {
11
+ onClear: e()
12
+ }
10
13
  };
11
14
  export {
12
- o as Default,
13
- a as default
15
+ n as Default,
16
+ r as default
14
17
  };
@@ -2,6 +2,7 @@ import { ElementType, ReactNode } from 'react';
2
2
  import { IconName } from '../Icon';
3
3
  import { MetaItemSize, MetaItemVariant } from './MetaItemBase';
4
4
  export interface MetaItemProps {
5
+ loading?: boolean;
5
6
  /** Render as element */
6
7
  as?: ElementType;
7
8
  /** Meta size */
@@ -15,4 +16,4 @@ export interface MetaItemProps {
15
16
  /** classname */
16
17
  className?: string;
17
18
  }
18
- export declare const MetaItem: ({ size, variant, icon, children, ...rest }: MetaItemProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const MetaItem: ({ loading, size, variant, icon, children, ...rest }: MetaItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,12 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { MetaItemBase as x } from "./MetaItemBase.js";
3
- import { MetaItemLabel as M } from "./MetaItemLabel.js";
4
- import { MetaItemMedia as f } from "./MetaItemMedia.js";
5
- const j = ({ size: t = "xs", variant: e = "text", icon: m, children: o, ...a }) => /* @__PURE__ */ p(x, { variant: e, size: t, ...a, children: [
6
- m && /* @__PURE__ */ r(f, { icon: m, size: t }),
7
- /* @__PURE__ */ r(M, { variant: e, size: t, children: o })
8
- ] });
1
+ import { jsx as e, jsxs as x } from "react/jsx-runtime";
2
+ import { Skeleton as M } from "../Skeleton/Skeleton.js";
3
+ import { MetaItemBase as a } from "./MetaItemBase.js";
4
+ import { MetaItemLabel as s } from "./MetaItemLabel.js";
5
+ import { MetaItemMedia as I } from "./MetaItemMedia.js";
6
+ const j = ({ loading: m, size: t = "xs", variant: r = "text", icon: o, children: p, ...f }) => /* @__PURE__ */ e(a, { variant: r, size: t, ...f, children: /* @__PURE__ */ x(M, { loading: m, children: [
7
+ !m && o && /* @__PURE__ */ e(I, { size: t, icon: o }),
8
+ /* @__PURE__ */ e(s, { variant: r, size: t, children: p })
9
+ ] }) });
9
10
  export {
10
11
  j as MetaItem
11
12
  };
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { IconName } from '../Icon';
3
3
  import { MetaItemSize, MetaItemVariant } from './MetaItemBase';
4
4
  export interface MetaTimestampProps {
5
+ loading?: boolean;
5
6
  /** Meta size */
6
7
  size?: MetaItemSize;
7
8
  /** Variant */
@@ -13,4 +14,4 @@ export interface MetaTimestampProps {
13
14
  /** Label */
14
15
  children?: ReactNode;
15
16
  }
16
- export declare const MetaTimestamp: ({ size, variant, datetime, icon, children }: MetaTimestampProps) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const MetaTimestamp: ({ loading, size, variant, datetime, icon, children, }: MetaTimestampProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,11 +1,19 @@
1
- import { jsxs as p, jsx as r } from "react/jsx-runtime";
2
- import { MetaItemBase as s } from "./MetaItemBase.js";
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { Skeleton as f } from "../Skeleton/Skeleton.js";
3
+ import { MetaItemBase as i } from "./MetaItemBase.js";
3
4
  import { MetaItemLabel as x } from "./MetaItemLabel.js";
4
5
  import { MetaItemMedia as M } from "./MetaItemMedia.js";
5
- const j = ({ size: t = "xs", variant: e = "text", datetime: o, icon: m, children: a }) => /* @__PURE__ */ p(s, { as: "time", variant: e, datetime: o, size: t, children: [
6
- m && /* @__PURE__ */ r(M, { size: t, icon: m }),
7
- /* @__PURE__ */ r(x, { variant: e, size: t, children: a })
8
- ] });
6
+ const j = ({
7
+ loading: m,
8
+ size: t = "xs",
9
+ variant: r = "text",
10
+ datetime: p,
11
+ icon: o,
12
+ children: a
13
+ }) => /* @__PURE__ */ e(i, { as: "time", variant: r, datetime: p, size: t, children: /* @__PURE__ */ s(f, { loading: m, children: [
14
+ !m && o && /* @__PURE__ */ e(M, { size: t, icon: o }),
15
+ /* @__PURE__ */ e(x, { variant: r, size: t, children: a })
16
+ ] }) });
9
17
  export {
10
18
  j as MetaTimestamp
11
19
  };
@@ -1,26 +1,26 @@
1
- import { jsx as t } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import "../../index-L8X2o7IH.js";
4
4
  import "../Icon/SvgIcon.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import { DialogListItem as r } from "../Dialog/DialogListItem.js";
7
- import { ListItem as i } from "../List/ListItem.js";
8
- import { BookmarksListItem as s } from "../Bookmarks/BookmarksListItem.js";
7
+ import { ListItem as n } from "../List/ListItem.js";
8
+ import { BookmarksListItem as i } from "../Bookmarks/BookmarksListItem.js";
9
9
  import { ScopeListItem as e } from "./ScopeListItem.js";
10
- const I = ({ type: m, ...o }) => {
10
+ const h = ({ type: m, ...t }) => {
11
11
  switch (m) {
12
12
  case "scope":
13
- return /* @__PURE__ */ t(e, { ...o, shadow: "none" });
13
+ return /* @__PURE__ */ o(e, { ...t, shadow: "none", tabIndex: -1 });
14
14
  case "information":
15
- return /* @__PURE__ */ t(e, { ...o, shadow: "none" });
15
+ return /* @__PURE__ */ o(e, { ...t, shadow: "none", tabIndex: -1 });
16
16
  case "bookmark":
17
- return /* @__PURE__ */ t(s, { ...o, shadow: "none", size: "sm" });
17
+ return /* @__PURE__ */ o(i, { ...t, shadow: "none", size: "sm", tabIndex: -1 });
18
18
  case "dialog":
19
- return /* @__PURE__ */ t(r, { ...o, shadow: "none", size: "sm" });
19
+ return /* @__PURE__ */ o(r, { ...t, shadow: "none", size: "sm", tabIndex: -1 });
20
20
  default:
21
- return /* @__PURE__ */ t(i, { ...o, shadow: "none", size: "sm" });
21
+ return /* @__PURE__ */ o(n, { ...t, shadow: "none", size: "sm", tabIndex: -1 });
22
22
  }
23
23
  };
24
24
  export {
25
- I as AutocompleteItem
25
+ h as AutocompleteItem
26
26
  };
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ export type SkeletonVariant = 'circle' | 'text';
3
+ interface SkeletonProps {
4
+ loading?: boolean;
5
+ variant?: SkeletonVariant;
6
+ size?: string;
7
+ children?: ReactNode;
8
+ className?: string;
9
+ }
10
+ export declare const Skeleton: ({ loading, size, variant, className, children }: SkeletonProps) => string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { c as r } from "../../index-L8X2o7IH.js";
3
+ import '../../assets/Skeleton.css';const f = "_skelaton_10sb8_1", l = "_fade_10sb8_1", c = {
4
+ skelaton: f,
5
+ fade: l
6
+ }, k = ({ loading: t = !1, size: s, variant: e = "text", className: o, children: a }) => t ? /* @__PURE__ */ n("span", { className: r(c.skelaton, o), "data-size": s, "data-loading": t, "data-variant": e, children: a }) : a;
7
+ export {
8
+ k as Skeleton
9
+ };
@@ -0,0 +1 @@
1
+ export * from './Skeleton';
@@ -0,0 +1,4 @@
1
+ import { Skeleton as r } from "./Skeleton.js";
2
+ export {
3
+ r as Skeleton
4
+ };
@@ -48,6 +48,7 @@ const Y = ({
48
48
  };
49
49
  return /* @__PURE__ */ V(z, { open: i === "toolbar", onClose: M, children: [
50
50
  F && /* @__PURE__ */ c(G, { onToggle: () => t("menu", ""), expanded: (e == null ? void 0 : e.type) === "menu", ...F }),
51
+ T && /* @__PURE__ */ c(H, { ...T }),
51
52
  L.map((o) => /* @__PURE__ */ c(
52
53
  D,
53
54
  {
@@ -84,7 +85,6 @@ const Y = ({
84
85
  }))
85
86
  }
86
87
  ),
87
- T && /* @__PURE__ */ c(H, { ...T }),
88
88
  N
89
89
  ] });
90
90
  };
@@ -4,5 +4,6 @@ export interface ToolbarSearchProps {
4
4
  name: string;
5
5
  value: string;
6
6
  onChange: ChangeEventHandler;
7
+ onClear?: () => void;
7
8
  }
8
- export declare const ToolbarSearch: ({ value, name, placeholder, onChange }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ToolbarSearch: ({ value, name, placeholder, onChange, onClear }: ToolbarSearchProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,40 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import '../../assets/ToolbarSearch.css';const i = "_input_cwjz7_1", _ = "_button_cwjz7_11", l = "_close_cwjz7_16", r = "_icon_cwjz7_20", c = {
3
- input: i,
4
- button: _,
5
- close: l,
6
- icon: r
7
- }, p = ({ value: o, name: n, placeholder: s = "Søk", onChange: e }) => /* @__PURE__ */ t("div", { className: c.field, children: /* @__PURE__ */ t(
8
- "input",
9
- {
10
- type: "search",
11
- value: o,
12
- name: n,
13
- placeholder: s,
14
- className: c.input,
15
- onChange: e
16
- }
17
- ) });
1
+ import { jsxs as r, jsx as c } from "react/jsx-runtime";
2
+ import { Icon as a } from "../Icon/Icon.js";
3
+ import "../Icon/SvgIcon.js";
4
+ import "../../index-L8X2o7IH.js";
5
+ import "react";
6
+ import { IconButton as l } from "../Button/IconButton.js";
7
+ import "../RootProvider/RootProvider.js";
8
+ import '../../assets/ToolbarSearch.css';const m = "_field_dvezx_1", p = "_icon_dvezx_5", d = "_input_dvezx_14", _ = "_clear_dvezx_30", o = {
9
+ field: m,
10
+ icon: p,
11
+ input: d,
12
+ clear: _
13
+ }, N = ({ value: e, name: n, placeholder: s = "Search", onChange: t, onClear: i }) => /* @__PURE__ */ r("div", { className: o.field, children: [
14
+ /* @__PURE__ */ c(
15
+ "input",
16
+ {
17
+ type: "search",
18
+ value: e,
19
+ name: n,
20
+ placeholder: s,
21
+ className: o.input,
22
+ onChange: t
23
+ }
24
+ ),
25
+ /* @__PURE__ */ c(a, { name: "magnifying-glass", className: o.icon }),
26
+ i && /* @__PURE__ */ c(
27
+ l,
28
+ {
29
+ icon: "x-mark",
30
+ color: "secondary",
31
+ variant: "solid",
32
+ size: "custom",
33
+ className: o.clear,
34
+ onClick: i
35
+ }
36
+ )
37
+ ] });
18
38
  export {
19
- p as ToolbarSearch
39
+ N as ToolbarSearch
20
40
  };