@smudi/designsystem 1.4.0 → 1.5.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.
- package/@smudi/assets/UDI-red-logo.svg.js +1 -0
- package/@smudi/components/alert/alert.js +5 -4
- package/@smudi/components/avatar/avatar.js +1 -0
- package/@smudi/components/avatar-stack/avatar-stack.js +1 -0
- package/@smudi/components/badge/badge.js +5 -4
- package/@smudi/components/breadcrumbs/breadcrumbs.js +4 -3
- package/@smudi/components/button/button.js +5 -4
- package/@smudi/components/card/card-icon-block.js +6 -5
- package/@smudi/components/card/card.js +1 -0
- package/@smudi/components/checkbox/checkbox.js +1 -0
- package/@smudi/components/chip/chip.js +1 -0
- package/@smudi/components/details/details.js +5 -4
- package/@smudi/components/dialog/dialog-section.js +10 -9
- package/@smudi/components/dialog/dialog.js +1 -0
- package/@smudi/components/divider/divider.js +1 -0
- package/@smudi/components/dropdown/dropdown-button.js +11 -10
- package/@smudi/components/dropdown/dropdown-context.js +4 -3
- package/@smudi/components/dropdown/dropdown-item.js +8 -7
- package/@smudi/components/dropdown/dropdown-list.js +10 -9
- package/@smudi/components/dropdown/dropdown.js +15 -14
- package/@smudi/components/error-summary/error-summary.js +1 -0
- package/@smudi/components/field/field.js +1 -0
- package/@smudi/components/fieldset/fieldset.js +1 -0
- package/@smudi/components/header/header-content.js +4 -3
- package/@smudi/components/header/header-divider.js +1 -0
- package/@smudi/components/header/header-menu/header-menu-button.js +8 -7
- package/@smudi/components/header/header-menu/header-menu-content.js +5 -4
- package/@smudi/components/header/header-menu/header-menu-group.js +11 -10
- package/@smudi/components/header/header-menu/header-menu-item.js +4 -3
- package/@smudi/components/header/header-menu/header-menu.js +6 -5
- package/@smudi/components/header/header-search/header-search-button.js +1 -0
- package/@smudi/components/header/header-search/header-search.js +6 -5
- package/@smudi/components/header/header.js +1 -0
- package/@smudi/components/header/index.js +7 -6
- package/@smudi/components/input/input.js +5 -4
- package/@smudi/components/layout-components/box-layouts/box-layout.js +11 -10
- package/@smudi/components/layout-components/box-layouts/box-layout.module.css.js +2 -1
- package/@smudi/components/layout-components/center-layouts/center-layout.js +9 -8
- package/@smudi/components/layout-components/center-layouts/center-layout.module.css.js +5 -4
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.js +5 -4
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.module.css.js +2 -1
- package/@smudi/components/layout-components/grid-layouts/grid-layout.js +5 -4
- package/@smudi/components/layout-components/grid-layouts/grid-layout.module.css.js +2 -1
- package/@smudi/components/layout-components/stack-layouts/stack-layout.js +5 -4
- package/@smudi/components/layout-components/stack-layouts/stack-layout.module.css.js +2 -1
- package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.js +9 -8
- package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.module.css.js +4 -3
- package/@smudi/components/link/link.js +1 -0
- package/@smudi/components/list/list.js +1 -0
- package/@smudi/components/pagination/pagination.js +5 -4
- package/@smudi/components/popover/popover.js +4 -3
- package/@smudi/components/radio/radio.js +1 -0
- package/@smudi/components/search/search.js +5 -4
- package/@smudi/components/select/select.js +7 -6
- package/@smudi/components/skeleton/skeleton.js +1 -0
- package/@smudi/components/skip-link/skip-link.js +1 -0
- package/@smudi/components/spinner/spinner.js +4 -3
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-context.js +4 -3
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.js +11 -10
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.js +1 -0
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.js +1 -0
- package/@smudi/components/suggestion/suggestion.js +3 -2
- package/@smudi/components/table/table.js +5 -4
- package/@smudi/components/tabs/tabs-content.js +1 -0
- package/@smudi/components/tabs/tabs-list.js +1 -0
- package/@smudi/components/tabs/tabs-trigger.js +1 -0
- package/@smudi/components/tabs/tabs.js +5 -4
- package/@smudi/components/tag/tag.js +1 -0
- package/@smudi/components/textarea/text-area.js +4 -3
- package/@smudi/components/textfield/textfield.js +1 -0
- package/@smudi/components/toast/toast.js +1 -0
- package/@smudi/components/toggle-group/toggle-group.js +1 -0
- package/@smudi/components/tooltip/tooltip.js +4 -3
- package/@smudi/components/typography/heading/heading.js +5 -4
- package/@smudi/components/typography/paragraph/paragraph.js +1 -0
- package/@smudi/components/utils/apply-inert-outside.js +1 -0
- package/@smudi/components/utils/class-names.js +1 -0
- package/@smudi/icons/generated/SmudiBiometryIcon.js +1 -0
- package/@smudi/icons/generated/SmudiFingerprintIcon.js +4 -3
- package/@smudi/icons/generated/SmudiFlagIcon.js +10 -9
- package/@smudi/icons/generated/SmudiScanIcon.js +10 -9
- package/@smudi/react.js +128 -191
- package/@smudi/smudi/react.d.ts +38 -38
- package/@smudi/smudi/react.d.ts.map +1 -1
- package/@smudi/styles.css +1 -1
- package/@smudi/utils/append-class-name.js +4 -3
- package/@smudi/utils/combine-refs.js +4 -3
- package/README.md +6 -3
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as y } from "react/jsx-runtime";
|
|
2
3
|
import { appendClassName as I } from "../../../utils/append-class-name.js";
|
|
3
4
|
import E from "./box-layout.module.css.js";
|
|
@@ -21,33 +22,33 @@ const k = {
|
|
|
21
22
|
xl: "var(--ds-border-radius-xl)"
|
|
22
23
|
}, s = (d) => d ? k[d] : void 0, i = (d) => d ? z[d] : void 0, U = (d) => {
|
|
23
24
|
const {
|
|
24
|
-
as:
|
|
25
|
-
className:
|
|
25
|
+
as: a = "div",
|
|
26
|
+
className: r = "",
|
|
26
27
|
padding: n,
|
|
27
28
|
paddingBlock: t,
|
|
28
29
|
paddingInline: l,
|
|
29
30
|
paddingInlineEnd: m,
|
|
30
31
|
paddingInlineStart: c,
|
|
31
|
-
paddingBlockStart:
|
|
32
|
-
paddingBlockEnd:
|
|
32
|
+
paddingBlockStart: u,
|
|
33
|
+
paddingBlockEnd: v,
|
|
33
34
|
border: o = !1,
|
|
34
|
-
borderRadius:
|
|
35
|
+
borderRadius: e,
|
|
35
36
|
variant: b = "none",
|
|
36
37
|
style: p,
|
|
37
38
|
children: g,
|
|
38
39
|
...x
|
|
39
40
|
} = d, _ = I(
|
|
40
41
|
E["smudi-box"],
|
|
41
|
-
|
|
42
|
-
), B = o ?
|
|
42
|
+
r
|
|
43
|
+
), B = o ? e ? C[e] : "var(--ds-border-radius-md)" : "0", S = s(
|
|
43
44
|
t ?? n
|
|
44
45
|
), L = i(
|
|
45
46
|
l ?? n
|
|
46
47
|
), O = {
|
|
47
48
|
"--smudi-box-padding-block": S,
|
|
48
49
|
"--smudi-box-padding-inline": L,
|
|
49
|
-
"--smudi-box-padding-block-start": s(
|
|
50
|
-
"--smudi-box-padding-block-end": s(
|
|
50
|
+
"--smudi-box-padding-block-start": s(u),
|
|
51
|
+
"--smudi-box-padding-block-end": s(v),
|
|
51
52
|
"--smudi-box-padding-inline-start": i(c),
|
|
52
53
|
"--smudi-box-padding-inline-end": i(m),
|
|
53
54
|
"--smudi-box-border-width": o ? "var(--ds-border-width-default)" : "0",
|
|
@@ -55,7 +56,7 @@ const k = {
|
|
|
55
56
|
...p
|
|
56
57
|
};
|
|
57
58
|
return /* @__PURE__ */ y(
|
|
58
|
-
|
|
59
|
+
a,
|
|
59
60
|
{
|
|
60
61
|
className: _,
|
|
61
62
|
style: O,
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
3
|
import { appendClassName as p } from "../../../utils/append-class-name.js";
|
|
3
4
|
import t from "./center-layout.module.css.js";
|
|
4
5
|
const N = (s) => {
|
|
5
6
|
const {
|
|
6
7
|
as: e = "div",
|
|
7
|
-
className:
|
|
8
|
-
shrinkToContent:
|
|
8
|
+
className: n = "",
|
|
9
|
+
shrinkToContent: a = !1,
|
|
9
10
|
textAlign: o = "start",
|
|
10
|
-
children:
|
|
11
|
-
...
|
|
11
|
+
children: i,
|
|
12
|
+
...r
|
|
12
13
|
} = s, m = {
|
|
13
|
-
[t["smudi-intrinsic"]]: !!
|
|
14
|
+
[t["smudi-intrinsic"]]: !!a
|
|
14
15
|
}, l = p(
|
|
15
16
|
t["smudi-center-layout"],
|
|
16
17
|
m,
|
|
17
|
-
|
|
18
|
+
n
|
|
18
19
|
);
|
|
19
20
|
return /* @__PURE__ */ c(
|
|
20
21
|
e,
|
|
21
22
|
{
|
|
22
23
|
className: l,
|
|
23
24
|
"data-text-align": o,
|
|
24
|
-
...
|
|
25
|
-
children:
|
|
25
|
+
...r,
|
|
26
|
+
children: i
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
29
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"smudi-
|
|
1
|
+
"use client";
|
|
2
|
+
const e = {
|
|
3
|
+
"smudi-center-layout": "_smudi-center-layout_azehf_2",
|
|
4
|
+
"smudi-intrinsic": "_smudi-intrinsic_azehf_10"
|
|
4
5
|
};
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
+
e as default
|
|
7
8
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
3
|
import { appendClassName as c } from "../../../utils/append-class-name.js";
|
|
3
4
|
import p from "./cluster-layout.module.css.js";
|
|
4
5
|
const N = (s) => {
|
|
5
6
|
const {
|
|
6
|
-
as:
|
|
7
|
-
className:
|
|
7
|
+
as: e = "div",
|
|
8
|
+
className: t = "",
|
|
8
9
|
space: a,
|
|
9
10
|
justify: l,
|
|
10
11
|
align: n,
|
|
@@ -13,10 +14,10 @@ const N = (s) => {
|
|
|
13
14
|
...r
|
|
14
15
|
} = s, m = c(
|
|
15
16
|
p["smudi-cluster-layout"],
|
|
16
|
-
|
|
17
|
+
t
|
|
17
18
|
);
|
|
18
19
|
return /* @__PURE__ */ u(
|
|
19
|
-
|
|
20
|
+
e,
|
|
20
21
|
{
|
|
21
22
|
className: m,
|
|
22
23
|
style: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { appendClassName as m } from "../../../utils/append-class-name.js";
|
|
3
4
|
import c from "./grid-layout.module.css.js";
|
|
4
5
|
const p = {
|
|
5
6
|
none: "0",
|
|
@@ -18,14 +19,14 @@ const p = {
|
|
|
18
19
|
space: i,
|
|
19
20
|
children: t,
|
|
20
21
|
...n
|
|
21
|
-
} = s, a =
|
|
22
|
+
} = s, a = m(
|
|
22
23
|
c["smudi-grid-layout"],
|
|
23
24
|
r
|
|
24
25
|
), d = {
|
|
25
26
|
"--min-width": v(o),
|
|
26
27
|
"--flow-space": u(i)
|
|
27
28
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ l(
|
|
29
30
|
e,
|
|
30
31
|
{
|
|
31
32
|
className: a,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
3
|
import { appendClassName as S } from "../../../utils/append-class-name.js";
|
|
3
4
|
import v from "./stack-layout.module.css.js";
|
|
@@ -18,8 +19,8 @@ const p = {
|
|
|
18
19
|
className: t = "",
|
|
19
20
|
space: a,
|
|
20
21
|
align: r,
|
|
21
|
-
children:
|
|
22
|
-
recursive:
|
|
22
|
+
children: n,
|
|
23
|
+
recursive: o,
|
|
23
24
|
style: i,
|
|
24
25
|
...c
|
|
25
26
|
} = s, l = S(
|
|
@@ -35,9 +36,9 @@ const p = {
|
|
|
35
36
|
{
|
|
36
37
|
className: l,
|
|
37
38
|
style: m,
|
|
38
|
-
"data-recursive":
|
|
39
|
+
"data-recursive": o || void 0,
|
|
39
40
|
...c,
|
|
40
|
-
children:
|
|
41
|
+
children: n
|
|
41
42
|
}
|
|
42
43
|
);
|
|
43
44
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
3
|
+
import { appendClassName as y } from "../../../utils/append-class-name.js";
|
|
3
4
|
import v from "./wrapper-layout.module.css.js";
|
|
4
5
|
const x = {
|
|
5
6
|
xs: "var(--ds-size-3)",
|
|
@@ -9,22 +10,22 @@ const x = {
|
|
|
9
10
|
}, W = (e) => e ? x[e] : void 0, L = (e) => {
|
|
10
11
|
const {
|
|
11
12
|
as: a = "div",
|
|
12
|
-
className:
|
|
13
|
-
gutter:
|
|
13
|
+
className: t = "",
|
|
14
|
+
gutter: r,
|
|
14
15
|
maxWidth: s,
|
|
15
16
|
variant: o = "none",
|
|
16
17
|
style: i,
|
|
17
18
|
children: n,
|
|
18
19
|
...m
|
|
19
|
-
} = e, p =
|
|
20
|
+
} = e, p = y(
|
|
20
21
|
v["smudi-wrapper"],
|
|
21
|
-
|
|
22
|
-
), l = W(
|
|
22
|
+
t
|
|
23
|
+
), l = W(r), d = typeof s == "number" ? `${s}px` : s, c = {
|
|
23
24
|
"--gutter": l,
|
|
24
25
|
"--max-width": d,
|
|
25
26
|
...i
|
|
26
27
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ u(
|
|
28
29
|
a,
|
|
29
30
|
{
|
|
30
31
|
className: p,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { Pagination as n } from "@digdir/designsystemet-react";
|
|
3
|
+
const a = n;
|
|
4
|
+
a.displayName = "Pagination";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
a as Pagination
|
|
6
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { Search as e } from "@digdir/designsystemet-react";
|
|
3
|
+
const a = e;
|
|
4
|
+
a.displayName = "Search";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
a as Search
|
|
6
7
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { Select as e } from "@digdir/designsystemet-react";
|
|
3
|
+
const t = Object.assign(e, {
|
|
4
|
+
Option: e.Option,
|
|
5
|
+
Optgroup: e.Optgroup
|
|
5
6
|
});
|
|
6
|
-
|
|
7
|
+
t.displayName = "Select";
|
|
7
8
|
export {
|
|
8
|
-
|
|
9
|
+
t as Select
|
|
9
10
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { createContext as e, useContext as n } from "react";
|
|
2
|
-
const
|
|
3
|
+
const u = e(
|
|
3
4
|
null
|
|
4
5
|
);
|
|
5
6
|
function i() {
|
|
6
|
-
const t = n(
|
|
7
|
+
const t = n(u);
|
|
7
8
|
if (!t)
|
|
8
9
|
throw new Error("useSmudiSuggestion must be used within Suggestion");
|
|
9
10
|
return t;
|
|
10
11
|
}
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
u as SmudiSuggestionContext,
|
|
13
14
|
i as useSmudiSuggestion
|
|
14
15
|
};
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as i, Fragment as c, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { EXPERIMENTAL_Suggestion as o, Divider as a } from "@digdir/designsystemet-react";
|
|
3
4
|
import { forwardRef as d } from "react";
|
|
4
5
|
import { useSmudiSuggestion as u } from "./smudi-suggestion-context.js";
|
|
5
6
|
import { INTERNAL_SELECT_ALL_MARKER_VALUE as p } from "./smudi-suggestion.js";
|
|
6
7
|
const f = d(
|
|
7
|
-
({ children:
|
|
8
|
-
const { isAllSelected: t, toggleSelectAll:
|
|
9
|
-
return /* @__PURE__ */ i(o.List, { ...
|
|
10
|
-
e && /* @__PURE__ */ i(
|
|
8
|
+
({ children: s, ...r }, m) => {
|
|
9
|
+
const { isAllSelected: t, toggleSelectAll: n, showToggleAll: e } = u();
|
|
10
|
+
return /* @__PURE__ */ i(o.List, { ...r, ref: m, children: [
|
|
11
|
+
e && /* @__PURE__ */ i(c, { children: [
|
|
11
12
|
/* @__PURE__ */ l(
|
|
12
13
|
o.Option,
|
|
13
14
|
{
|
|
14
15
|
"aria-selected": t,
|
|
15
16
|
selected: t,
|
|
16
17
|
className: "smudi-select-all",
|
|
17
|
-
onClick: (
|
|
18
|
-
|
|
18
|
+
onClick: (g) => {
|
|
19
|
+
g.preventDefault(), n();
|
|
19
20
|
},
|
|
20
21
|
value: p,
|
|
21
22
|
children: typeof e == "string" ? e : "Velg alle"
|
|
22
23
|
}
|
|
23
24
|
),
|
|
24
|
-
/* @__PURE__ */ l(
|
|
25
|
+
/* @__PURE__ */ l(a, {})
|
|
25
26
|
] }),
|
|
26
|
-
|
|
27
|
+
s
|
|
27
28
|
] });
|
|
28
29
|
}
|
|
29
30
|
);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { EXPERIMENTAL_Suggestion as o } from "@digdir/designsystemet-react";
|
|
2
3
|
import { SmudiSuggestion as i } from "./smudi-suggestion/smudi-suggestion.js";
|
|
3
4
|
import { SmudiSuggestionList as t } from "./smudi-suggestion/smudi-suggestion-list.js";
|
|
4
5
|
import { SuggestionNoChips as s } from "./suggestion-no-chips/suggestion-no-chips.js";
|
|
5
|
-
const
|
|
6
|
+
const u = Object.assign(i, {
|
|
6
7
|
displayName: "Suggestion",
|
|
7
8
|
...o,
|
|
8
9
|
NoChips: s,
|
|
9
10
|
List: t
|
|
10
11
|
});
|
|
11
12
|
export {
|
|
12
|
-
|
|
13
|
+
u as Suggestion
|
|
13
14
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { Table as e } from "@digdir/designsystemet-react";
|
|
3
|
+
const a = e;
|
|
4
|
+
a.displayName = "Table";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
a as Table
|
|
6
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { Heading as e } from "@digdir/designsystemet-react";
|
|
3
|
+
const n = e;
|
|
4
|
+
n.displayName = "Heading";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
n as Heading
|
|
6
7
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as c, jsx as l } from "react/jsx-runtime";
|
|
2
3
|
import { forwardRef as i } from "react";
|
|
3
|
-
const d = ({ title:
|
|
4
|
+
const d = ({ title: e, titleId: a, ...r }, o) => /* @__PURE__ */ c(
|
|
4
5
|
"svg",
|
|
5
6
|
{
|
|
6
7
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -11,10 +12,10 @@ const d = ({ title: a, titleId: e, ...r }, o) => /* @__PURE__ */ c(
|
|
|
11
12
|
focusable: !1,
|
|
12
13
|
role: "img",
|
|
13
14
|
ref: o,
|
|
14
|
-
"aria-labelledby":
|
|
15
|
+
"aria-labelledby": a,
|
|
15
16
|
...r,
|
|
16
17
|
children: [
|
|
17
|
-
|
|
18
|
+
e ? /* @__PURE__ */ l("title", { id: a, children: e }) : null,
|
|
18
19
|
/* @__PURE__ */ l(
|
|
19
20
|
"path",
|
|
20
21
|
{
|