@mattilsynet/design 2.3.7 → 3.0.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/mtds/analytics/analytics.js +16 -14
- package/mtds/analytics/analytics.js.map +1 -1
- package/mtds/app/app-observer.js +26 -26
- package/mtds/app/app-observer.js.map +1 -1
- package/mtds/atlas/atlas-element.js +3 -3
- package/mtds/atlas/atlas-element.js.map +1 -1
- package/mtds/atlas/atlas-marker.js +2 -2
- package/mtds/atlas/atlas-marker.js.map +1 -1
- package/mtds/atlas.iife.js +4 -4
- package/mtds/breadcrumbs/breadcrumbs.d.ts +9 -8
- package/mtds/breadcrumbs/breadcrumbs.js +8 -10
- package/mtds/breadcrumbs/breadcrumbs.js.map +1 -1
- package/mtds/chart/chart-element.js +41 -37
- package/mtds/chart/chart-element.js.map +1 -1
- package/mtds/chart/chart.js +45 -11
- package/mtds/chart/chart.js.map +1 -1
- package/mtds/deprecations.js +135 -0
- package/mtds/deprecations.js.map +1 -0
- package/mtds/details/details.js +18 -11
- package/mtds/details/details.js.map +1 -1
- package/mtds/errorsummary/errorsummary.d.ts +4 -2
- package/mtds/errorsummary/errorsummary.js +14 -18
- package/mtds/errorsummary/errorsummary.js.map +1 -1
- package/mtds/field/field.d.ts +34 -12
- package/mtds/field/field.js +167 -137
- package/mtds/field/field.js.map +1 -1
- package/mtds/field/field.stories.d.ts +10 -10
- package/mtds/fieldset/fieldset.js +2 -1
- package/mtds/fieldset/fieldset.js.map +1 -1
- package/mtds/icons/cosmetics.svg +1 -1
- package/mtds/icons/megaphone.svg +3 -0
- package/mtds/illustrations/car-logo.svg +1 -0
- package/mtds/illustrations/car.svg +1 -0
- package/mtds/illustrations/cheese.svg +1 -0
- package/mtds/illustrations/cloud-1.svg +1 -0
- package/mtds/illustrations/cloud-2.svg +1 -0
- package/mtds/illustrations/cloud-sun.svg +1 -0
- package/mtds/illustrations/cloud-sunshine.svg +1 -0
- package/mtds/illustrations/egg-boat.svg +1 -0
- package/mtds/illustrations/egg-half.svg +1 -0
- package/mtds/illustrations/foodtruck-logo.svg +1 -0
- package/mtds/illustrations/foodtruck.svg +1 -0
- package/mtds/illustrations/house.svg +1 -0
- package/mtds/illustrations/index.json +104 -11
- package/mtds/illustrations/paragraph.svg +1 -0
- package/mtds/illustrations/person-child-puppy.svg +1 -0
- package/mtds/illustrations/person-family-house.svg +1 -0
- package/mtds/illustrations/person-family.svg +1 -0
- package/mtds/illustrations/person-paragraph.svg +1 -0
- package/mtds/illustrations/plane-solo.svg +1 -0
- package/mtds/illustrations/sunshine.svg +1 -0
- package/mtds/illustrations/tractor.svg +1 -0
- package/mtds/illustrations/wind.svg +1 -0
- package/mtds/index.d.ts +4 -3
- package/mtds/index.iife.js +24 -22
- package/mtds/index.js +23 -37
- package/mtds/index.js.map +1 -1
- package/mtds/input/input.js +30 -24
- package/mtds/input/input.js.map +1 -1
- package/mtds/logo/logo-observer.js +11 -11
- package/mtds/logo/logo-observer.js.map +1 -1
- package/mtds/package.json.js +1 -1
- package/mtds/pagination/pagination.d.ts +19 -2
- package/mtds/pagination/pagination.js +19 -21
- package/mtds/pagination/pagination.js.map +1 -1
- package/mtds/popover/popover.d.ts +4 -0
- package/mtds/popover/popover.js +7 -6
- package/mtds/popover/popover.js.map +1 -1
- package/mtds/react-types.d.ts +1 -2
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +44 -43
- package/mtds/styles.module.css.js +43 -43
- package/mtds/table/table-observer.d.ts +1 -1
- package/mtds/table/table-observer.js +17 -41
- package/mtds/table/table-observer.js.map +1 -1
- package/mtds/tabs/tabs.d.ts +10 -9
- package/mtds/tabs/tabs.js +8 -8
- package/mtds/tabs/tabs.js.map +1 -1
- package/mtds/toast/toast-observer.js +7 -7
- package/mtds/toast/toast-observer.js.map +1 -1
- package/mtds/togglegroup/togglegroup.d.ts +6 -2
- package/mtds/togglegroup/togglegroup.js +20 -19
- package/mtds/togglegroup/togglegroup.js.map +1 -1
- package/mtds/tooltip/tooltip-element.js +7 -0
- package/mtds/tooltip/tooltip-element.js.map +1 -0
- package/mtds/utils.d.ts +13 -32
- package/mtds/utils.js +47 -98
- package/mtds/utils.js.map +1 -1
- package/mtds/validation/validation-observer.js +34 -29
- package/mtds/validation/validation-observer.js.map +1 -1
- package/mtds/validation/validation.js +6 -5
- package/mtds/validation/validation.js.map +1 -1
- package/package.json +15 -14
- package/mtds/breadcrumbs/breadcrumbs-observer.js +0 -12
- package/mtds/breadcrumbs/breadcrumbs-observer.js.map +0 -1
- package/mtds/dialog/dialog-observer.js +0 -65
- package/mtds/dialog/dialog-observer.js.map +0 -1
- package/mtds/errorsummary/errorsummary-observer.d.ts +0 -1
- package/mtds/errorsummary/errorsummary-observer.js +0 -11
- package/mtds/errorsummary/errorsummary-observer.js.map +0 -1
- package/mtds/field/field-observer.d.ts +0 -1
- package/mtds/field/field-observer.js +0 -67
- package/mtds/field/field-observer.js.map +0 -1
- package/mtds/fieldset/fieldset-observer.d.ts +0 -1
- package/mtds/fieldset/fieldset-observer.js +0 -20
- package/mtds/fieldset/fieldset-observer.js.map +0 -1
- package/mtds/pagination/pagination-helper.d.ts +0 -13
- package/mtds/pagination/pagination-helper.js +0 -16
- package/mtds/pagination/pagination-helper.js.map +0 -1
- package/mtds/popover/popover-observer.d.ts +0 -1
- package/mtds/popover/popover-observer.js +0 -46
- package/mtds/popover/popover-observer.js.map +0 -1
- package/mtds/togglegroup/togglegroup-observer.d.ts +0 -1
- package/mtds/togglegroup/togglegroup-observer.js +0 -13
- package/mtds/togglegroup/togglegroup-observer.js.map +0 -1
- package/mtds/tooltip/tooltip-observer.d.ts +0 -1
- package/mtds/tooltip/tooltip-observer.js +0 -43
- package/mtds/tooltip/tooltip-observer.js.map +0 -1
- /package/mtds/{breadcrumbs/breadcrumbs-observer.d.ts → deprecations.d.ts} +0 -0
- /package/mtds/{dialog/dialog-observer.d.ts → tooltip/tooltip-element.d.ts} +0 -0
package/mtds/styles.json
CHANGED
|
@@ -1,45 +1,46 @@
|
|
|
1
1
|
{
|
|
2
|
-
"alert": "
|
|
3
|
-
"app": "
|
|
4
|
-
"sticky": "
|
|
5
|
-
"avatar": "
|
|
6
|
-
"badge": "
|
|
7
|
-
"breadcrumbs": "
|
|
8
|
-
"button": "
|
|
9
|
-
"card": "
|
|
10
|
-
"group": "
|
|
11
|
-
"chip": "
|
|
12
|
-
"details": "
|
|
13
|
-
"dialog": "
|
|
14
|
-
"divider": "
|
|
15
|
-
"errorsummary": "
|
|
16
|
-
"field": "
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
2
|
+
"alert": "_alert_1d3iq_1 _ds-alert_17fn9_3",
|
|
3
|
+
"app": "_app_1d3iq_1",
|
|
4
|
+
"sticky": "_sticky_1d3iq_1",
|
|
5
|
+
"avatar": "_avatar_1d3iq_1 _ds-avatar_17fn9_1",
|
|
6
|
+
"badge": "_badge_1d3iq_1",
|
|
7
|
+
"breadcrumbs": "_breadcrumbs_1d3iq_1 _ds-breadcrumbs_17fn9_5",
|
|
8
|
+
"button": "_button_1d3iq_1 _ds-button_17fn9_1",
|
|
9
|
+
"card": "_card_1d3iq_1",
|
|
10
|
+
"group": "_group_1d3iq_1",
|
|
11
|
+
"chip": "_chip_1d3iq_1 _ds-chip_17fn9_5",
|
|
12
|
+
"details": "_details_1d3iq_1 _ds-details_17fn9_3",
|
|
13
|
+
"dialog": "_dialog_1d3iq_1 _ds-dialog_17fn9_5",
|
|
14
|
+
"divider": "_divider_1d3iq_1",
|
|
15
|
+
"errorsummary": "_errorsummary_1d3iq_1 _ds-error-summary_17fn9_5",
|
|
16
|
+
"field": "_field_1d3iq_1 _ds-field_17fn9_1",
|
|
17
|
+
"suggestion": "_suggestion_1d3iq_1 _ds-suggestion_17fn9_5",
|
|
18
|
+
"affixes": "_affixes_1d3iq_1 _ds-field-affixes_17fn9_3",
|
|
19
|
+
"fieldset": "_fieldset_1d3iq_1 _ds-fieldset_17fn9_3",
|
|
20
|
+
"fileupload": "_fileupload_1d3iq_1",
|
|
21
|
+
"helptext": "_helptext_1d3iq_1 _ds-focus_17fn9_1",
|
|
22
|
+
"input": "_input_1d3iq_1 _ds-input_17fn9_1",
|
|
23
|
+
"law": "_law_1d3iq_1",
|
|
24
|
+
"grid": "_grid_1d3iq_1",
|
|
25
|
+
"flex": "_flex_1d3iq_1",
|
|
26
|
+
"link": "_link_1d3iq_1",
|
|
27
|
+
"logo": "_logo_1d3iq_1",
|
|
28
|
+
"pagination": "_pagination_1d3iq_1 _ds-pagination_17fn9_5",
|
|
29
|
+
"popover": "_popover_1d3iq_1 _ds-popover_17fn9_3",
|
|
30
|
+
"progress": "_progress_1d3iq_1",
|
|
31
|
+
"skeleton": "_skeleton_1d3iq_1 _ds-skeleton_17fn9_5",
|
|
32
|
+
"spinner": "_spinner_1d3iq_1",
|
|
33
|
+
"steps": "_steps_1d3iq_1",
|
|
34
|
+
"table": "_table_1d3iq_1 _ds-table_17fn9_5",
|
|
35
|
+
"tabs": "_tabs_1d3iq_1 _ds-tabs_17fn9_5",
|
|
36
|
+
"tag": "_tag_1d3iq_1 _ds-tag_17fn9_5",
|
|
37
|
+
"toast": "_toast_1d3iq_1",
|
|
38
|
+
"togglegroup": "_togglegroup_1d3iq_1 _ds-toggle-group_17fn9_5",
|
|
39
|
+
"heading": "_heading_1d3iq_1 _ds-heading_17fn9_1",
|
|
40
|
+
"ingress": "_ingress_1d3iq_1",
|
|
41
|
+
"muted": "_muted_1d3iq_1",
|
|
42
|
+
"info": "_info_1d3iq_1",
|
|
43
|
+
"prose": "_prose_1d3iq_1",
|
|
44
|
+
"validation": "_validation_1d3iq_1 _ds-validation-message_17fn9_1",
|
|
45
|
+
"body": "_body_1d3iq_161"
|
|
45
46
|
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
const _ = "
|
|
1
|
+
const _ = "_alert_1d3iq_1 _ds-alert_17fn9_3", t = "_app_1d3iq_1", s = "_sticky_1d3iq_1", o = "_avatar_1d3iq_1 _ds-avatar_17fn9_1", i = "_badge_1d3iq_1", d = "_breadcrumbs_1d3iq_1 _ds-breadcrumbs_17fn9_5", n = "_button_1d3iq_1 _ds-button_17fn9_1", e = "_card_1d3iq_1", a = "_group_1d3iq_1", l = "_chip_1d3iq_1 _ds-chip_17fn9_5", c = "_details_1d3iq_1 _ds-details_17fn9_3", r = "_dialog_1d3iq_1 _ds-dialog_17fn9_5", p = "__drawer_1d3iq_1", g = "_divider_1d3iq_1", q = "_errorsummary_1d3iq_1 _ds-error-summary_17fn9_5", f = "_field_1d3iq_1 _ds-field_17fn9_1", u = "_suggestion_1d3iq_1 _ds-suggestion_17fn9_5", b = "_affixes_1d3iq_1 _ds-field-affixes_17fn9_3", m = "_fieldset_1d3iq_1 _ds-fieldset_17fn9_3", k = "_fileupload_1d3iq_1", h = "_helptext_1d3iq_1 _ds-focus_17fn9_1", v = "_input_1d3iq_1 _ds-input_17fn9_1", x = "_law_1d3iq_1", y = "_grid_1d3iq_1", w = "_flex_1d3iq_1", C = "_link_1d3iq_1", M = "_logo_1d3iq_1", O = "__logo_1d3iq_1", S = "_pagination_1d3iq_1 _ds-pagination_17fn9_5", T = "_popover_1d3iq_1 _ds-popover_17fn9_3", j = "_progress_1d3iq_1", z = "__indeterminate_1d3iq_1", A = "_skeleton_1d3iq_1 _ds-skeleton_17fn9_5", B = "__skeleton_1d3iq_1", D = "_spinner_1d3iq_1", E = "_steps_1d3iq_1", F = "_table_1d3iq_1 _ds-table_17fn9_5", G = "__scrollShadow_1d3iq_1", H = "_tabs_1d3iq_1 _ds-tabs_17fn9_5", I = "__scrollMask_1d3iq_1", J = "_tag_1d3iq_1 _ds-tag_17fn9_5", K = "_toast_1d3iq_1", L = "__toastClose_1d3iq_1", N = "__toastOpen_1d3iq_1", P = "__toastTimeout_1d3iq_1", Q = "_togglegroup_1d3iq_1 _ds-toggle-group_17fn9_5", R = "__tooltip_1d3iq_1 _ds-tooltip_17fn9_5", U = "_heading_1d3iq_1 _ds-heading_17fn9_1", V = "_ingress_1d3iq_1", W = "_muted_1d3iq_1", X = "_info_1d3iq_1", Y = "_prose_1d3iq_1", Z = "_validation_1d3iq_1 _ds-validation-message_17fn9_1", $ = "_body_1d3iq_161", __ = "__checked_1d3iq_1", t_ = {
|
|
2
2
|
alert: _,
|
|
3
3
|
app: t,
|
|
4
4
|
sticky: s,
|
|
5
5
|
avatar: o,
|
|
6
|
-
badge:
|
|
7
|
-
breadcrumbs:
|
|
6
|
+
badge: i,
|
|
7
|
+
breadcrumbs: d,
|
|
8
8
|
button: n,
|
|
9
|
-
card:
|
|
10
|
-
group:
|
|
11
|
-
chip:
|
|
12
|
-
details:
|
|
13
|
-
dialog:
|
|
14
|
-
_drawer:
|
|
9
|
+
card: e,
|
|
10
|
+
group: a,
|
|
11
|
+
chip: l,
|
|
12
|
+
details: c,
|
|
13
|
+
dialog: r,
|
|
14
|
+
_drawer: p,
|
|
15
15
|
divider: g,
|
|
16
|
-
errorsummary:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
input: y,
|
|
16
|
+
errorsummary: q,
|
|
17
|
+
field: f,
|
|
18
|
+
suggestion: u,
|
|
19
|
+
affixes: b,
|
|
20
|
+
fieldset: m,
|
|
21
|
+
fileupload: k,
|
|
22
|
+
helptext: h,
|
|
23
|
+
input: v,
|
|
25
24
|
law: x,
|
|
26
|
-
grid:
|
|
27
|
-
flex:
|
|
28
|
-
link:
|
|
29
|
-
logo:
|
|
25
|
+
grid: y,
|
|
26
|
+
flex: w,
|
|
27
|
+
link: C,
|
|
28
|
+
logo: M,
|
|
29
|
+
_logo: O,
|
|
30
30
|
pagination: S,
|
|
31
31
|
popover: T,
|
|
32
32
|
progress: j,
|
|
@@ -57,10 +57,9 @@ const _ = "_alert_1p489_1 _ds-alert_1331q_3", t = "_app_1p489_1", s = "_sticky_1
|
|
|
57
57
|
};
|
|
58
58
|
export {
|
|
59
59
|
__ as _checked,
|
|
60
|
-
|
|
61
|
-
l as _drawer,
|
|
62
|
-
f as _errorsummary,
|
|
60
|
+
p as _drawer,
|
|
63
61
|
z as _indeterminate,
|
|
62
|
+
O as _logo,
|
|
64
63
|
I as _scrollMask,
|
|
65
64
|
G as _scrollShadow,
|
|
66
65
|
B as _skeleton,
|
|
@@ -68,35 +67,35 @@ export {
|
|
|
68
67
|
N as _toastOpen,
|
|
69
68
|
P as _toastTimeout,
|
|
70
69
|
R as _tooltip,
|
|
71
|
-
|
|
70
|
+
b as affixes,
|
|
72
71
|
_ as alert,
|
|
73
72
|
t as app,
|
|
74
73
|
o as avatar,
|
|
75
|
-
|
|
74
|
+
i as badge,
|
|
76
75
|
$ as body,
|
|
77
|
-
|
|
76
|
+
d as breadcrumbs,
|
|
78
77
|
n as button,
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
e as card,
|
|
79
|
+
l as chip,
|
|
81
80
|
t_ as default,
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
c as details,
|
|
82
|
+
r as dialog,
|
|
84
83
|
g as divider,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
q as errorsummary,
|
|
85
|
+
f as field,
|
|
86
|
+
m as fieldset,
|
|
87
|
+
k as fileupload,
|
|
88
|
+
w as flex,
|
|
89
|
+
y as grid,
|
|
90
|
+
a as group,
|
|
92
91
|
U as heading,
|
|
93
|
-
|
|
92
|
+
h as helptext,
|
|
94
93
|
X as info,
|
|
95
94
|
V as ingress,
|
|
96
|
-
|
|
95
|
+
v as input,
|
|
97
96
|
x as law,
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
C as link,
|
|
98
|
+
M as logo,
|
|
100
99
|
W as muted,
|
|
101
100
|
S as pagination,
|
|
102
101
|
T as popover,
|
|
@@ -106,6 +105,7 @@ export {
|
|
|
106
105
|
D as spinner,
|
|
107
106
|
E as steps,
|
|
108
107
|
s as sticky,
|
|
108
|
+
u as suggestion,
|
|
109
109
|
F as table,
|
|
110
110
|
H as tabs,
|
|
111
111
|
J as tag,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -1,46 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
t.tHead?.rows[0]?.cells || [],
|
|
8
|
-
(c) => c.innerText.trim()
|
|
1
|
+
import { isBrowser as s, onHotReload as a, onMutation as n, debounce as c, attr as i } from "../utils.js";
|
|
2
|
+
const d = s() ? document.getElementsByTagName("table") : [], b = () => {
|
|
3
|
+
for (const e of d) {
|
|
4
|
+
const r = Array.from(
|
|
5
|
+
e.tHead?.rows[0]?.cells || [],
|
|
6
|
+
(t) => t.innerText.trim()
|
|
9
7
|
);
|
|
10
|
-
for (const
|
|
11
|
-
for (const
|
|
12
|
-
for (const
|
|
13
|
-
|
|
8
|
+
for (const t of e.tBodies)
|
|
9
|
+
for (const l of t.rows)
|
|
10
|
+
for (const o of l.cells)
|
|
11
|
+
i(o, "data-th", r[o.cellIndex] || ":empty");
|
|
14
12
|
}
|
|
15
|
-
}
|
|
16
|
-
function p({ target: t }) {
|
|
17
|
-
if (!(t instanceof Element)) return;
|
|
18
|
-
const c = t.closest("tr")?.querySelector('[data-command="row"]');
|
|
19
|
-
c && !t.closest(T) && c.click?.();
|
|
20
|
-
}
|
|
21
|
-
a(() => [
|
|
22
|
-
l(document, "click", p),
|
|
23
|
-
u(E, "data-mobile")
|
|
24
|
-
]);
|
|
25
|
-
const r = "data-clickdelegatefor", k = `[${r}]`, L = 'a,button,label,input,select,textarea,dialog,[role="button"],[popover],[contenteditable]', w = (t) => {
|
|
26
|
-
const o = t.button === 1 || t.metaKey || t.ctrlKey, e = t.isTrusted && t.button < 2 && i(t);
|
|
27
|
-
e instanceof HTMLAnchorElement && o ? window.open(e.href, void 0, e.rel) : e instanceof HTMLElement && !e.contains(t.target) && (t.stopImmediatePropagation(), e.click());
|
|
28
|
-
};
|
|
29
|
-
let n;
|
|
30
|
-
const C = (t) => {
|
|
31
|
-
const o = i(t);
|
|
32
|
-
n !== o && (n && n.classList.remove(":click-delegate-hover"), o && o.classList.add(":click-delegate-hover"), n = o);
|
|
33
|
-
}, i = ({ target: t }) => {
|
|
34
|
-
const c = (t instanceof Element ? t.closest(k) : null)?.getAttribute(r), e = document.getElementById(c || ""), s = e && t.closest(L);
|
|
35
|
-
return (!s || s === e) && e || void 0;
|
|
36
13
|
};
|
|
37
|
-
a(() => [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
a("table", () => [
|
|
15
|
+
n(document, c(b, 200), {
|
|
16
|
+
attributeFilter: ["data-mobile"],
|
|
17
|
+
attributes: !0,
|
|
18
|
+
childList: !0,
|
|
19
|
+
subtree: !0
|
|
20
|
+
})
|
|
42
21
|
]);
|
|
43
|
-
export {
|
|
44
|
-
w as handleClickDelegateFor
|
|
45
|
-
};
|
|
46
22
|
//# sourceMappingURL=table-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table-observer.js","sources":["../../designsystem/table/table-observer.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"table-observer.js","sources":["../../designsystem/table/table-observer.ts"],"sourcesContent":["import { attr, debounce, isBrowser, onHotReload, onMutation } from \"../utils\";\n\nconst TABLES = isBrowser() ? document.getElementsByTagName(\"table\") : [];\nconst handleTableMobile = () => {\n\tfor (const table of TABLES) {\n\t\tconst ths = Array.from(table.tHead?.rows[0]?.cells || [], (th) =>\n\t\t\tth.innerText.trim(),\n\t\t);\n\n\t\tfor (const tbody of table.tBodies)\n\t\t\tfor (const row of tbody.rows)\n\t\t\t\tfor (const cell of row.cells)\n\t\t\t\t\tattr(cell, \"data-th\", ths[cell.cellIndex] || \":empty\");\n\t}\n};\n\nonHotReload(\"table\", () => [\n\tonMutation(document, debounce(handleTableMobile, 200), {\n\t\tattributeFilter: [\"data-mobile\"],\n\t\tattributes: true,\n\t\tchildList: true,\n\t\tsubtree: true,\n\t}),\n]);\n"],"names":["TABLES","isBrowser","handleTableMobile","table","ths","th","tbody","row","cell","attr","onHotReload","onMutation","debounce"],"mappings":";AAEA,MAAMA,IAASC,EAAA,IAAc,SAAS,qBAAqB,OAAO,IAAI,CAAA,GAChEC,IAAoB,MAAM;AAC/B,aAAWC,KAASH,GAAQ;AAC3B,UAAMI,IAAM,MAAM;AAAA,MAAKD,EAAM,OAAO,KAAK,CAAC,GAAG,SAAS,CAAA;AAAA,MAAI,CAACE,MAC1DA,EAAG,UAAU,KAAA;AAAA,IAAK;AAGnB,eAAWC,KAASH,EAAM;AACzB,iBAAWI,KAAOD,EAAM;AACvB,mBAAWE,KAAQD,EAAI;AACtB,UAAAE,EAAKD,GAAM,WAAWJ,EAAII,EAAK,SAAS,KAAK,QAAQ;AAAA,EACzD;AACD;AAEAE,EAAY,SAAS,MAAM;AAAA,EAC1BC,EAAW,UAAUC,EAASV,GAAmB,GAAG,GAAG;AAAA,IACtD,iBAAiB,CAAC,aAAa;AAAA,IAC/B,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,EAAA,CACT;AACF,CAAC;"}
|
package/mtds/tabs/tabs.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export type
|
|
4
|
-
export type
|
|
5
|
-
export type
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { CustomReactElementProps } from '../react-types';
|
|
2
|
+
import type * as DS from "@digdir/designsystemet-web";
|
|
3
|
+
export type TabsProps = CustomReactElementProps<DS.DSTabsElement>;
|
|
4
|
+
export type TabsListProps = CustomReactElementProps<DS.DSTabListElement>;
|
|
5
|
+
export type TabsPanelProps = CustomReactElementProps<DS.DSTabPanelElement>;
|
|
6
|
+
export type TabsTabProps = CustomReactElementProps<DS.DSTabElement>;
|
|
7
|
+
export declare const Tabs: import('react').ForwardRefExoticComponent<Omit<TabsProps, "ref"> & import('react').RefAttributes<DS.DSTabsElement>> & {
|
|
8
|
+
List: import('react').ForwardRefExoticComponent<Omit<TabsListProps, "ref"> & import('react').RefAttributes<DS.DSTabListElement>>;
|
|
9
|
+
Panel: import('react').ForwardRefExoticComponent<Omit<TabsPanelProps, "ref"> & import('react').RefAttributes<DS.DSTabPanelElement>>;
|
|
10
|
+
Tab: import('react').ForwardRefExoticComponent<Omit<TabsTabProps, "ref"> & import('react').RefAttributes<DS.DSTabElement>>;
|
|
10
11
|
};
|
package/mtds/tabs/tabs.js
CHANGED
|
@@ -4,24 +4,24 @@ import b from "../styles.module.css.js";
|
|
|
4
4
|
import { toCustomElementProps as o } from "../utils.js";
|
|
5
5
|
const e = n(
|
|
6
6
|
function(t, s) {
|
|
7
|
-
return /* @__PURE__ */ a("
|
|
7
|
+
return /* @__PURE__ */ a("ds-tabs", { ref: s, ...o(t, b.tabs) });
|
|
8
8
|
}
|
|
9
9
|
), i = n(
|
|
10
10
|
function(t, s) {
|
|
11
|
-
return /* @__PURE__ */ a("
|
|
11
|
+
return /* @__PURE__ */ a("ds-tablist", { ref: s, ...o(t) });
|
|
12
12
|
}
|
|
13
|
-
),
|
|
13
|
+
), T = n(
|
|
14
14
|
function(t, s) {
|
|
15
|
-
return /* @__PURE__ */ a("
|
|
15
|
+
return /* @__PURE__ */ a("ds-tabpanel", { ref: s, ...o(t) });
|
|
16
16
|
}
|
|
17
|
-
),
|
|
17
|
+
), m = n(
|
|
18
18
|
function(t, s) {
|
|
19
|
-
return /* @__PURE__ */ a("
|
|
19
|
+
return /* @__PURE__ */ a("ds-tab", { ref: s, ...o(t) });
|
|
20
20
|
}
|
|
21
21
|
), l = Object.assign(e, {
|
|
22
22
|
List: i,
|
|
23
|
-
Panel:
|
|
24
|
-
Tab:
|
|
23
|
+
Panel: T,
|
|
24
|
+
Tab: m
|
|
25
25
|
});
|
|
26
26
|
export {
|
|
27
27
|
l as Tabs
|
package/mtds/tabs/tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.js","sources":["../../designsystem/tabs/tabs.tsx"],"sourcesContent":["import type * as
|
|
1
|
+
{"version":3,"file":"tabs.js","sources":["../../designsystem/tabs/tabs.tsx"],"sourcesContent":["import type * as DS from \"@digdir/designsystemet-web\";\nimport { forwardRef } from \"react\";\nimport type { CustomReactElementProps } from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\nexport type TabsProps = CustomReactElementProps<DS.DSTabsElement>;\nconst TabsComp = forwardRef<DS.DSTabsElement, TabsProps>(\n\tfunction Tabs(props, ref) {\n\t\treturn <ds-tabs ref={ref} {...toCustomElementProps(props, styles.tabs)} />;\n\t},\n);\n\nexport type TabsListProps = CustomReactElementProps<DS.DSTabListElement>;\nconst TabsList = forwardRef<DS.DSTabListElement, TabsListProps>(\n\tfunction TabsList(props, ref) {\n\t\treturn <ds-tablist ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type TabsPanelProps = CustomReactElementProps<DS.DSTabPanelElement>;\nconst TabsPanel = forwardRef<DS.DSTabPanelElement, TabsPanelProps>(\n\tfunction TabsPanel(props, ref) {\n\t\treturn <ds-tabpanel ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type TabsTabProps = CustomReactElementProps<DS.DSTabElement>;\nconst TabsTab = forwardRef<DS.DSTabElement, TabsTabProps>(\n\tfunction TabsTab(props, ref) {\n\t\treturn <ds-tab ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport const Tabs = Object.assign(TabsComp, {\n\tList: TabsList,\n\tPanel: TabsPanel,\n\tTab: TabsTab,\n});\n"],"names":["TabsComp","forwardRef","props","ref","jsx","toCustomElementProps","styles","TabsList","TabsPanel","TabsTab","Tabs"],"mappings":";;;;AAOA,MAAMA,IAAWC;AAAA,EAChB,SAAcC,GAAOC,GAAK;AACzB,WAAO,gBAAAC,EAAC,aAAQ,KAAAD,GAAW,GAAGE,EAAqBH,GAAOI,EAAO,IAAI,GAAG;AAAA,EACzE;AACD,GAGMC,IAAWN;AAAA,EAChB,SAAkBC,GAAOC,GAAK;AAC7B,6BAAQ,cAAA,EAAW,KAAAA,GAAW,GAAGE,EAAqBH,CAAK,GAAG;AAAA,EAC/D;AACD,GAGMM,IAAYP;AAAA,EACjB,SAAmBC,GAAOC,GAAK;AAC9B,6BAAQ,eAAA,EAAY,KAAAA,GAAW,GAAGE,EAAqBH,CAAK,GAAG;AAAA,EAChE;AACD,GAGMO,IAAUR;AAAA,EACf,SAAiBC,GAAOC,GAAK;AAC5B,6BAAQ,UAAA,EAAO,KAAAA,GAAW,GAAGE,EAAqBH,CAAK,GAAG;AAAA,EAC3D;AACD,GAEaQ,IAAO,OAAO,OAAOV,GAAU;AAAA,EAC3C,MAAMO;AAAA,EACN,OAAOC;AAAA,EACP,KAAKC;AACN,CAAC;"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
const m =
|
|
1
|
+
import a from "../styles.module.css.js";
|
|
2
|
+
import { onHotReload as b, on as u, attr as s } from "../utils.js";
|
|
3
|
+
const m = a.toast.split(" ")[0], l = "data-sort";
|
|
4
4
|
function h({ animationName: t, target: i }) {
|
|
5
5
|
const o = i;
|
|
6
|
-
if (t ===
|
|
6
|
+
if (t === a._toastTimeout && o.close(), t !== a._toastOpen) return;
|
|
7
7
|
const c = Number(s(o, "data-timeout"));
|
|
8
8
|
o.style.setProperty("--mtdsc-toast-timeout", c ? `${c}ms` : null), o.hasAttribute(l) || s(o, l, `${Date.now()}`), s(o, "tabindex", "0"), [...document.querySelectorAll(`.${m}[open]`)].sort((n, e) => Number(s(e, l)) - Number(s(n, l))).reduce((n, e) => (e.style.translate = `0 ${e === i ? 0 : n}px`, n + e.offsetHeight + 5), 0);
|
|
9
9
|
}
|
|
10
10
|
function T({ target: t, clientX: i, clientY: o }) {
|
|
11
11
|
if (t instanceof HTMLDialogElement && t.classList.contains(m) && s(t, "data-closedby") !== "none") {
|
|
12
|
-
const c = t.getBoundingClientRect(), n = window.getComputedStyle(t), e = window.getComputedStyle(t, "::after"),
|
|
13
|
-
|
|
12
|
+
const c = t.getBoundingClientRect(), n = window.getComputedStyle(t), e = window.getComputedStyle(t, "::after"), r = c.top + Number.parseInt(n.paddingTop, 10), p = r + Number.parseInt(e.height, 10), d = c.right - Number.parseInt(n.paddingRight, 10), f = d - Number.parseInt(e.width, 10);
|
|
13
|
+
r <= o && o <= p && f <= i && i <= d && t.close();
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
b(() => [
|
|
16
|
+
b("toast", () => [
|
|
17
17
|
u(document, "animationstart", h),
|
|
18
18
|
u(document, "click", T)
|
|
19
19
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-observer.js","sources":["../../designsystem/toast/toast-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { attr, on,
|
|
1
|
+
{"version":3,"file":"toast-observer.js","sources":["../../designsystem/toast/toast-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { attr, on, onHotReload } from \"../utils\";\n\nconst CSS_TOAST = styles.toast.split(\" \")[0];\nconst ATTR_SORT = \"data-sort\";\n\nfunction handleToastState({ animationName, target }: Partial<AnimationEvent>) {\n\tconst dialog = target as HTMLDialogElement;\n\tif (animationName === styles._toastTimeout) dialog.close();\n\tif (animationName !== styles._toastOpen) return;\n\n\tconst ms = Number(attr(dialog, \"data-timeout\"));\n\tdialog.style.setProperty(\"--mtdsc-toast-timeout\", ms ? `${ms}ms` : null);\n\tdialog.hasAttribute(ATTR_SORT) || attr(dialog, ATTR_SORT, `${Date.now()}`);\n\tattr(dialog, \"tabindex\", \"0\"); // Make focusable\n\n\t// Setup layout\n\t[...document.querySelectorAll<HTMLDialogElement>(`.${CSS_TOAST}[open]`)]\n\t\t.sort((a, b) => Number(attr(b, ATTR_SORT)) - Number(attr(a, ATTR_SORT)))\n\t\t.reduce((top, toast) => {\n\t\t\ttoast.style.translate = `0 ${toast === target ? 0 : top}px`;\n\t\t\treturn top + toast.offsetHeight + 5;\n\t\t}, 0);\n}\n\nfunction handleToastClick({ target, clientX: x, clientY: y }: MouseEvent) {\n\tif (\n\t\ttarget instanceof HTMLDialogElement &&\n\t\ttarget.classList.contains(CSS_TOAST) &&\n\t\tattr(target, \"data-closedby\") !== \"none\"\n\t) {\n\t\tconst rect = target.getBoundingClientRect();\n\t\tconst toast = window.getComputedStyle(target);\n\t\tconst close = window.getComputedStyle(target, \"::after\");\n\t\tconst top = rect.top + Number.parseInt(toast.paddingTop, 10);\n\t\tconst bottom = top + Number.parseInt(close.height, 10);\n\t\tconst right = rect.right - Number.parseInt(toast.paddingRight, 10);\n\t\tconst left = right - Number.parseInt(close.width, 10);\n\t\tconst isClose = top <= y && y <= bottom && left <= x && x <= right;\n\n\t\tif (isClose) target.close(); // Click is on ::after element\n\t}\n}\n\nonHotReload(\"toast\", () => [\n\ton(document, \"animationstart\", handleToastState),\n\ton(document, \"click\", handleToastClick as EventListener),\n]);\n"],"names":["CSS_TOAST","styles","ATTR_SORT","handleToastState","animationName","target","dialog","ms","attr","a","b","top","toast","handleToastClick","x","y","rect","close","bottom","right","left","onHotReload","on"],"mappings":";;AAGA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,IAAY;AAElB,SAASC,EAAiB,EAAE,eAAAC,GAAe,QAAAC,KAAmC;AAC7E,QAAMC,IAASD;AAEf,MADID,MAAkBH,EAAO,iBAAeK,EAAO,MAAA,GAC/CF,MAAkBH,EAAO,WAAY;AAEzC,QAAMM,IAAK,OAAOC,EAAKF,GAAQ,cAAc,CAAC;AAC9C,EAAAA,EAAO,MAAM,YAAY,yBAAyBC,IAAK,GAAGA,CAAE,OAAO,IAAI,GACvED,EAAO,aAAaJ,CAAS,KAAKM,EAAKF,GAAQJ,GAAW,GAAG,KAAK,IAAA,CAAK,EAAE,GACzEM,EAAKF,GAAQ,YAAY,GAAG,GAG5B,CAAC,GAAG,SAAS,iBAAoC,IAAIN,CAAS,QAAQ,CAAC,EACrE,KAAK,CAACS,GAAGC,MAAM,OAAOF,EAAKE,GAAGR,CAAS,CAAC,IAAI,OAAOM,EAAKC,GAAGP,CAAS,CAAC,CAAC,EACtE,OAAO,CAACS,GAAKC,OACbA,EAAM,MAAM,YAAY,KAAKA,MAAUP,IAAS,IAAIM,CAAG,MAChDA,IAAMC,EAAM,eAAe,IAChC,CAAC;AACN;AAEA,SAASC,EAAiB,EAAE,QAAAR,GAAQ,SAASS,GAAG,SAASC,KAAiB;AACzE,MACCV,aAAkB,qBAClBA,EAAO,UAAU,SAASL,CAAS,KACnCQ,EAAKH,GAAQ,eAAe,MAAM,QACjC;AACD,UAAMW,IAAOX,EAAO,sBAAA,GACdO,IAAQ,OAAO,iBAAiBP,CAAM,GACtCY,IAAQ,OAAO,iBAAiBZ,GAAQ,SAAS,GACjDM,IAAMK,EAAK,MAAM,OAAO,SAASJ,EAAM,YAAY,EAAE,GACrDM,IAASP,IAAM,OAAO,SAASM,EAAM,QAAQ,EAAE,GAC/CE,IAAQH,EAAK,QAAQ,OAAO,SAASJ,EAAM,cAAc,EAAE,GAC3DQ,IAAOD,IAAQ,OAAO,SAASF,EAAM,OAAO,EAAE;AAGpD,IAFgBN,KAAOI,KAAKA,KAAKG,KAAUE,KAAQN,KAAKA,KAAKK,OAEzC,MAAA;AAAA,EACrB;AACD;AAEAE,EAAY,SAAS,MAAM;AAAA,EAC1BC,EAAG,UAAU,kBAAkBnB,CAAgB;AAAA,EAC/CmB,EAAG,UAAU,SAAST,CAAiC;AACxD,CAAC;"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { InputProps } from '../react';
|
|
2
|
-
export type TogglegroupProps = React.ComponentPropsWithoutRef<"fieldset"
|
|
2
|
+
export type TogglegroupProps = React.ComponentPropsWithoutRef<"fieldset"> & {
|
|
3
|
+
"data-toggle-group"?: string;
|
|
4
|
+
};
|
|
3
5
|
export type TogglegroupItemProps = Omit<React.ComponentPropsWithoutRef<"label">, "onChange"> & Pick<InputProps, "defaultChecked" | "checked" | "onChange" | "value"> & Required<Pick<InputProps, "name">>;
|
|
4
|
-
export declare const Togglegroup: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref"> &
|
|
6
|
+
export declare const Togglegroup: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref"> & {
|
|
7
|
+
"data-toggle-group"?: string;
|
|
8
|
+
} & import('react').RefAttributes<HTMLFieldSetElement>> & {
|
|
5
9
|
Item: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref">, "onChange"> & Pick<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "defaultChecked" | "onChange" | "checked"> & Required<Pick<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "name">> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
6
10
|
};
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
function({
|
|
7
|
-
return /* @__PURE__ */
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import i from "clsx";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
4
|
+
import c from "../styles.module.css.js";
|
|
5
|
+
const f = p(
|
|
6
|
+
function({ "data-toggle-group": o, className: g, ...r }, t) {
|
|
7
|
+
return /* @__PURE__ */ e(
|
|
8
8
|
"fieldset",
|
|
9
9
|
{
|
|
10
|
-
className: c
|
|
11
|
-
|
|
10
|
+
className: i(c.togglegroup, g),
|
|
11
|
+
"data-toggle-group": o || "Valgknapper",
|
|
12
|
+
ref: t,
|
|
12
13
|
...r
|
|
13
14
|
}
|
|
14
15
|
);
|
|
15
16
|
}
|
|
16
|
-
),
|
|
17
|
-
function({ children: o, checked:
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
17
|
+
), d = p(
|
|
18
|
+
function({ children: o, checked: g, defaultChecked: r, value: t, name: s, onChange: m, ...n }, u) {
|
|
19
|
+
return /* @__PURE__ */ a("label", { ref: u, ...n, children: [
|
|
20
|
+
/* @__PURE__ */ e(
|
|
20
21
|
"input",
|
|
21
22
|
{
|
|
22
23
|
type: "radio",
|
|
23
|
-
checked:
|
|
24
|
-
defaultChecked:
|
|
25
|
-
value:
|
|
26
|
-
name:
|
|
24
|
+
checked: g,
|
|
25
|
+
defaultChecked: r,
|
|
26
|
+
value: t,
|
|
27
|
+
name: s,
|
|
27
28
|
onChange: m
|
|
28
29
|
}
|
|
29
30
|
),
|
|
30
31
|
o
|
|
31
32
|
] });
|
|
32
33
|
}
|
|
33
|
-
), b = Object.assign(
|
|
34
|
-
Item:
|
|
34
|
+
), b = Object.assign(f, {
|
|
35
|
+
Item: d
|
|
35
36
|
});
|
|
36
37
|
export {
|
|
37
38
|
b as Togglegroup
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"togglegroup.js","sources":["../../designsystem/togglegroup/togglegroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type { InputProps } from \"../react\";\nimport styles from \"../styles.module.css\";\n\nexport type TogglegroupProps = React.ComponentPropsWithoutRef<\"fieldset\"
|
|
1
|
+
{"version":3,"file":"togglegroup.js","sources":["../../designsystem/togglegroup/togglegroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type { InputProps } from \"../react\";\nimport styles from \"../styles.module.css\";\n\nexport type TogglegroupProps = React.ComponentPropsWithoutRef<\"fieldset\"> & {\n\t\"data-toggle-group\"?: string;\n};\nexport type TogglegroupItemProps = Omit<\n\tReact.ComponentPropsWithoutRef<\"label\">,\n\t\"onChange\"\n> &\n\tPick<InputProps, \"defaultChecked\" | \"checked\" | \"onChange\" | \"value\"> &\n\tRequired<Pick<InputProps, \"name\">>; // Make name required\n\nconst TogglegroupComp = forwardRef<HTMLFieldSetElement, TogglegroupProps>(\n\tfunction Togglegroup(\n\t\t{ \"data-toggle-group\": label, className, ...rest },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<fieldset\n\t\t\t\tclassName={clsx(styles.togglegroup, className)}\n\t\t\t\tdata-toggle-group={label || \"Valgknapper\"}\n\t\t\t\tref={ref}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t);\n\t},\n);\nconst TogglegroupItem = forwardRef<HTMLLabelElement, TogglegroupItemProps>(\n\tfunction TogglegroupItem(\n\t\t{ children, checked, defaultChecked, value, name, onChange, ...rest },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<label ref={ref} {...rest}>\n\t\t\t\t<input\n\t\t\t\t\t{...{ type: \"radio\", checked, defaultChecked, value, name, onChange }}\n\t\t\t\t/>\n\t\t\t\t{children}\n\t\t\t</label>\n\t\t);\n\t},\n);\n\nexport const Togglegroup = Object.assign(TogglegroupComp, {\n\tItem: TogglegroupItem,\n});\n"],"names":["TogglegroupComp","forwardRef","label","className","rest","ref","jsx","clsx","styles","TogglegroupItem","children","checked","defaultChecked","value","name","onChange","jsxs","Togglegroup"],"mappings":";;;;AAeA,MAAMA,IAAkBC;AAAA,EACvB,SACC,EAAE,qBAAqBC,GAAO,WAAAC,GAAW,GAAGC,EAAA,GAC5CC,GACC;AACD,WACC,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,WAAWC,EAAKC,EAAO,aAAaL,CAAS;AAAA,QAC7C,qBAAmBD,KAAS;AAAA,QAC5B,KAAAG;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACD,GACMK,IAAkBR;AAAA,EACvB,SACC,EAAE,UAAAS,GAAU,SAAAC,GAAS,gBAAAC,GAAgB,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,GAAGX,EAAA,GAC/DC,GACC;AACD,WACC,gBAAAW,EAAC,SAAA,EAAM,KAAAX,GAAW,GAAGD,GACpB,UAAA;AAAA,MAAA,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACM,MAAM;AAAA,UAAS,SAAAK;AAAA,UAAS,gBAAAC;AAAA,UAAgB,OAAAC;AAAA,UAAO,MAAAC;AAAA,UAAM,UAAAC;AAAA,QAAS;AAAA,MAAA;AAAA,MAEpEL;AAAA,IAAA,GACF;AAAA,EAEF;AACD,GAEaO,IAAc,OAAO,OAAOjB,GAAiB;AAAA,EACzD,MAAMS;AACP,CAAC;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { setTooltipElement as t } from "@digdir/designsystemet-web";
|
|
2
|
+
import o from "../styles.module.css.js";
|
|
3
|
+
import { isBrowser as i, tag as m } from "../utils.js";
|
|
4
|
+
i() && t(
|
|
5
|
+
document.getElementById("mtds-tooltip") || m("div", { class: o._tooltip, id: "mtds-tooltip" })
|
|
6
|
+
);
|
|
7
|
+
//# sourceMappingURL=tooltip-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-element.js","sources":["../../designsystem/tooltip/tooltip-element.ts"],"sourcesContent":["import { setTooltipElement } from \"@digdir/designsystemet-web\";\nimport styles from \"../styles.module.css\";\nimport { isBrowser, tag } from \"../utils\";\n\n// Set custom tooltip element for designsystemet-web\nif (isBrowser())\n\tsetTooltipElement(\n\t\tdocument.getElementById(\"mtds-tooltip\") ||\n\t\t\ttag(\"div\", { class: styles._tooltip, id: \"mtds-tooltip\" }),\n\t);\n"],"names":["isBrowser","setTooltipElement","tag","styles"],"mappings":";;;AAKIA,EAAA,KACHC;AAAA,EACC,SAAS,eAAe,cAAc,KACrCC,EAAI,OAAO,EAAE,OAAOC,EAAO,UAAU,IAAI,eAAA,CAAgB;AAAA;"}
|