@altinn/altinn-components 0.45.2 → 0.45.4

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 +1 @@
1
- ._typography_xs81l_1{width:100%;line-height:1.5}p._typography_xs81l_1{margin:0}._typography_xs81l_1[data-theme=default]{background-color:transparent;color:var(--ds-color-text-default)}._typography_xs81l_1[data-theme=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._typography_xs81l_1[data-size=xs]{font-size:.875rem}._typography_xs81l_1[data-size=sm]{font-size:1rem}._typography_xs81l_1[data-size=md]{font-size:1.125rem}._typography_xs81l_1[data-size=lg]{font-size:1.25rem}._typography_xs81l_1[data-size=xl]{font-size:1.5rem}._typography_xs81l_1>*:first-child{margin-top:0}._typography_xs81l_1>*:last-child{margin-bottom:0}._typography_xs81l_1 strong{font-weight:500}._typography_xs81l_1 a{color:var(--ds-color-base-default)}._typography_xs81l_1 a:hover{color:var(--ds-color-base-hover)}._typography_xs81l_1>p{font-size:1em;margin:1em 0}._typography_xs81l_1>h1{font-size:1.5rem;font-weight:500;margin-top:1.5em;margin-bottom:0}._typography_xs81l_1>h2{font-size:1.25rem;font-weight:600;margin-top:1.5em;margin-bottom:0}._typography_xs81l_1>h3{font-size:1em;font-weight:600;margin:1em 0}._typography_xs81l_1>h4{font-size:1em;font-weight:600;margin:1em 0 0}._typography_xs81l_1>h5,._typography_xs81l_1>h6{font-size:.875rem;margin:1em 0 0}._typography_xs81l_1>h6{font-weight:500;color:var(--ds-color-text-subtle)}._typography_xs81l_1>h6{font-weight:400;color:var(--ds-color-text-subtle)}._typography_xs81l_1>h5+*,._typography_xs81l_1>h6+*{margin-top:0}._typography_xs81l_1>section{margin:1em 0}._typography_xs81l_1 ul:not([class]),._typography_xs81l_1 ol:not([class]){list-style-position:outside;padding-left:1.5em;margin:1.5em 0}._typography_xs81l_1 ul:not([class]) li,._typography_xs81l_1 ol:not([class]) li{padding-left:.5em;margin:.5em 0}._typography_xs81l_1 table{width:100%;font-size:.875em;font-variant-numeric:tabular-nums;border-collapse:collapse;border:1px solid;margin:1.5em 0}._typography_xs81l_1 th,._typography_xs81l_1 td{text-align:left;padding:.25em .5em;vertical-align:top}._typography_xs81l_1 thead+tbody{border-top:1px solid;border-color:var(--ds-color-border-default)}._typography_xs81l_1 tr+tr{border-top:1px solid;border-color:var(--ds-color-border-subtle)}
1
+ ._typography_1h9tz_1{width:100%;line-height:1.5}p._typography_1h9tz_1{margin:0}._typography_1h9tz_1[data-theme=default]{background-color:transparent;color:var(--ds-color-text-default)}._typography_1h9tz_1[data-theme=subtle]{background-color:transparent;color:var(--ds-color-text-subtle)}._typography_1h9tz_1[data-size=xs]{font-size:.875rem}._typography_1h9tz_1[data-size=sm]{font-size:1rem}._typography_1h9tz_1[data-size=md]{font-size:1.125rem}._typography_1h9tz_1[data-size=lg]{font-size:1.25rem}._typography_1h9tz_1[data-size=xl]{font-size:1.5rem}._typography_1h9tz_1>*:first-child{margin-top:0}._typography_1h9tz_1>*:last-child{margin-bottom:0}._typography_1h9tz_1 strong{font-weight:500}._typography_1h9tz_1 a{color:var(--ds-color-base-default)}._typography_1h9tz_1 a:hover{color:var(--ds-color-base-hover)}._typography_1h9tz_1 p{font-size:1em;margin:1em 0}._typography_1h9tz_1 hr{--dsc-divider-border-width: var(--ds-border-width-default);--dsc-divider-border-style: solid;--dsc-divider-border-color: var(--ds-color-border-subtle);border-width:0;border-top-width:var(--dsc-divider-border-width);border-top-style:var(--dsc-divider-border-style);border-color:var(--dsc-divider-border-color);box-sizing:border-box;margin-block:.5em;width:100%}._typography_1h9tz_1 h1{font-size:1.5rem;line-height:1.25;font-weight:500;margin-top:1.5em;margin-bottom:0}._typography_1h9tz_1 h2{font-size:1.25rem;font-weight:600;margin-top:1.5em;margin-bottom:0}._typography_1h9tz_1 h3{font-size:1em;font-weight:600;margin:1em 0}._typography_1h9tz_1 h4{font-size:1em;font-weight:600;margin:1em 0 0}._typography_1h9tz_1 h5,._typography_1h9tz_1 h6{font-size:.875rem;margin:1em 0 0}._typography_1h9tz_1 h6{font-weight:500;color:var(--ds-color-text-subtle)}._typography_1h9tz_1 h6{font-weight:400;color:var(--ds-color-text-subtle)}._typography_1h9tz_1 h5+*,._typography_1h9tz_1 h6+*{margin-top:0}._typography_1h9tz_1 section{margin:1em 0}._typography_1h9tz_1 img{display:block;max-width:100%;width:auto;height:auto}._typography_1h9tz_1 ul:not([class]),._typography_1h9tz_1 ol:not([class]){list-style-position:outside;padding-left:1.5em;margin:1.5em 0}._typography_1h9tz_1 ul:not([class]) li,._typography_1h9tz_1 ol:not([class]) li{padding-left:.5em;margin:.5em 0}._typography_1h9tz_1 table{width:100%;font-size:.875em;font-variant-numeric:tabular-nums;border-collapse:collapse;border:1px solid;margin:1.5em 0}._typography_1h9tz_1 th,._typography_1h9tz_1 td{text-align:left;padding:.25em .5em;vertical-align:top}._typography_1h9tz_1 thead+tbody{border-top:1px solid;border-color:var(--ds-color-border-default)}._typography_1h9tz_1 tr+tr{border-top:1px solid;border-color:var(--ds-color-border-subtle)}
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import { jsx as x } from "react/jsx-runtime";
3
- import { useState as R, useEffect as S } from "react";
2
+ import { jsx as c } from "react/jsx-runtime";
3
+ import { useState as x, useEffect as R } from "react";
4
4
  import "../../index-L8X2o7IH.js";
5
5
  import "../RootProvider/RootProvider.js";
6
- import { Menu as j } from "../Menu/Menu.js";
6
+ import { Menu as S } from "../Menu/Menu.js";
7
7
  import "../Snackbar/useSnackbar.js";
8
- const k = (d) => `${d} hits`, D = ({
8
+ const j = (d) => `${d} hits`, B = ({
9
9
  items: d = [],
10
10
  groups: v = {},
11
- search: l,
11
+ search: t,
12
12
  filterAccount: C,
13
13
  onSelectAccount: u,
14
14
  currentAccount: e,
15
15
  isVirtualized: L,
16
16
  keyboardEvents: w
17
17
  }) => {
18
- var a;
18
+ var r;
19
19
  const p = d.map((o) => ({
20
20
  ...o,
21
21
  title: (o == null ? void 0 : o.title) || o.name,
@@ -24,36 +24,36 @@ const k = (d) => `${d} hits`, D = ({
24
24
  onClick: () => {
25
25
  !o.disabled && (u == null || u(o.id));
26
26
  }
27
- })), [t, i] = R("");
28
- S(() => {
29
- (l == null ? void 0 : l.value) !== void 0 && i(l.value);
30
- }, [l == null ? void 0 : l.value]);
31
- const F = C || ((o, f) => {
32
- var g, r, s;
33
- return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(f.toLowerCase())) || ((s = (r = o == null ? void 0 : o.description) == null ? void 0 : r.toString()) == null ? void 0 : s.toLowerCase().includes(f.toLowerCase()));
34
- }), n = t ? p.filter((o) => F(o, t)).map((o) => ({
27
+ })), [l, i] = x("");
28
+ R(() => {
29
+ (t == null ? void 0 : t.value) !== void 0 && i(t.value);
30
+ }, [t == null ? void 0 : t.value]);
31
+ const F = C || ((o, a) => {
32
+ var g, f, s;
33
+ return ((g = o == null ? void 0 : o.name) == null ? void 0 : g.toLowerCase().includes(a.toLowerCase())) || ((s = (f = o == null ? void 0 : o.description) == null ? void 0 : f.toString()) == null ? void 0 : s.toLowerCase().includes(a.toLowerCase()));
34
+ }), n = l ? p.filter((o) => F(o, l)).map((o) => ({
35
35
  ...o,
36
36
  groupId: "search",
37
37
  title: (o == null ? void 0 : o.title) || o.name,
38
- highlightWords: [t]
39
- })) : p, b = t ? {
38
+ highlightWords: [l]
39
+ })) : p, b = l ? {
40
40
  search: {
41
- title: ((a = l == null ? void 0 : l.getResultsLabel) == null ? void 0 : a.call(l, n.length)) ?? k(n.length)
41
+ title: ((r = t == null ? void 0 : t.getResultsLabel) == null ? void 0 : r.call(t, n.length)) ?? j(n.length)
42
42
  }
43
43
  } : v, I = {
44
44
  name: "account-search",
45
- value: t,
46
- placeholder: (l == null ? void 0 : l.placeholder) ?? "Find account",
45
+ value: l,
46
+ placeholder: (t == null ? void 0 : t.placeholder) ?? "Find account",
47
47
  onChange: (o) => i(o.target.value),
48
48
  onClear: () => i("")
49
49
  }, M = [
50
50
  ...n.length > 0 ? n : [{ id: "search", groupId: "search", hidden: !0 }]
51
51
  ];
52
- return /* @__PURE__ */ x(
53
- j,
52
+ return /* @__PURE__ */ c(
53
+ S,
54
54
  {
55
55
  variant: "default",
56
- search: l && (l == null ? void 0 : l.hidden) === !1 ? I : void 0,
56
+ search: t && !t.hidden ? I : void 0,
57
57
  groups: b,
58
58
  items: M,
59
59
  isVirtualized: L,
@@ -62,5 +62,5 @@ const k = (d) => `${d} hits`, D = ({
62
62
  );
63
63
  };
64
64
  export {
65
- D as AccountMenu
65
+ B as AccountMenu
66
66
  };
@@ -1,14 +1,14 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import "../../index-L8X2o7IH.js";
3
3
  import "react";
4
- import { Heading as t } from "../Typography/Heading.js";
4
+ import { Heading as m } from "../Typography/Heading.js";
5
5
  import "../RootProvider/RootProvider.js";
6
6
  import "../Snackbar/useSnackbar.js";
7
- import { Section as m } from "../Page/Section.js";
8
- const x = ({ title: r, children: i }) => /* @__PURE__ */ o(m, { as: "header", spacing: 2, children: [
9
- /* @__PURE__ */ e(t, { size: "xl", children: r }),
7
+ import { Section as t } from "../Page/Section.js";
8
+ const f = ({ title: r, children: i }) => /* @__PURE__ */ o(t, { as: "header", spacing: 2, children: [
9
+ r && /* @__PURE__ */ e(m, { size: "xl", children: r }),
10
10
  i
11
11
  ] });
12
12
  export {
13
- x as ArticleHeader
13
+ f as ArticleHeader
14
14
  };
@@ -1,10 +1,10 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { c as g } from "../../index-L8X2o7IH.js";
3
- import { Skeleton as h } from "../Skeleton/Skeleton.js";
3
+ import { Skeleton as l } from "../Skeleton/Skeleton.js";
4
4
  import { useHighlightedText as x } from "./useHighlightedText.js";
5
- import '../../assets/Typography.css';const f = "_typography_xs81l_1", T = {
5
+ import '../../assets/Typography.css';const f = "_typography_1h9tz_1", T = {
6
6
  typography: f
7
- }, z = ({
7
+ }, k = ({
8
8
  loading: o,
9
9
  loadingText: _ = "Loading ...",
10
10
  highlightWords: r,
@@ -18,7 +18,7 @@ import '../../assets/Typography.css';const f = "_typography_xs81l_1", T = {
18
18
  children: y,
19
19
  ...m
20
20
  }) => {
21
- const d = a, l = x(y, r || []);
21
+ const d = a, h = x(y, r || []);
22
22
  return /* @__PURE__ */ t(
23
23
  d,
24
24
  {
@@ -31,10 +31,10 @@ import '../../assets/Typography.css';const f = "_typography_xs81l_1", T = {
31
31
  "data-color": n,
32
32
  "data-variant": p,
33
33
  ...m,
34
- children: /* @__PURE__ */ t(h, { loading: o, children: l })
34
+ children: /* @__PURE__ */ t(l, { loading: o, children: h })
35
35
  }
36
36
  );
37
37
  };
38
38
  export {
39
- z as Typography
39
+ k as Typography
40
40
  };
@@ -12,4 +12,6 @@ export default meta;
12
12
  type Story = StoryObj<typeof meta>;
13
13
  export declare const Default: Story;
14
14
  export declare const HighlightWords: Story;
15
+ export declare const Article: Story;
16
+ export declare const Article2: Story;
15
17
  export declare const Tables: Story;
@@ -15,6 +15,7 @@ export * from './Dropdown';
15
15
  export * from './Footer';
16
16
  export * from './GlobalMenu_old';
17
17
  export * from './Header';
18
+ export type { GlobalHeaderProps } from './GlobalHeader';
18
19
  export * from './Icon';
19
20
  export * from './Layout';
20
21
  export * from './LayoutAction';
@@ -12,3 +12,4 @@ export declare const Search: () => import("react/jsx-runtime").JSX.Element;
12
12
  export declare const Category: () => import("react/jsx-runtime").JSX.Element;
13
13
  export declare const Topic: () => import("react/jsx-runtime").JSX.Element;
14
14
  export declare const Service: () => import("react/jsx-runtime").JSX.Element;
15
+ export declare const ArticlePage: () => 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.45.2",
3
+ "version": "0.45.4",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "dist/",