@mattilsynet/design 2.2.3 → 2.2.5

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 (58) hide show
  1. package/mtds/app/app-observer.js +1 -1
  2. package/mtds/app/app-toggle.js +26 -10
  3. package/mtds/app/app-toggle.js.map +1 -1
  4. package/mtds/app/app-toggle2.js +10 -26
  5. package/mtds/app/app-toggle2.js.map +1 -1
  6. package/mtds/app/app.js +4 -3
  7. package/mtds/app/app.js.map +1 -1
  8. package/mtds/chart/chart-element.js +18 -18
  9. package/mtds/chart/chart-element.js.map +1 -1
  10. package/mtds/chart/chart.css.js +5 -16
  11. package/mtds/chart/chart.css.js.map +1 -1
  12. package/mtds/chart/chart.d.ts +2 -0
  13. package/mtds/chart/chart.js +11 -0
  14. package/mtds/chart/chart.js.map +1 -0
  15. package/mtds/field/field.js +16 -14
  16. package/mtds/field/field.js.map +1 -1
  17. package/mtds/index.iife.js +20 -31
  18. package/mtds/map/map.d.ts +4 -0
  19. package/mtds/package.json.js +1 -1
  20. package/mtds/pagination/pagination.js +3 -2
  21. package/mtds/pagination/pagination.js.map +1 -1
  22. package/mtds/react.d.ts +1 -0
  23. package/mtds/react.js +60 -58
  24. package/mtds/react.js.map +1 -1
  25. package/mtds/styles.css +1 -1
  26. package/mtds/styles.json +41 -41
  27. package/mtds/styles.module.css.js +39 -39
  28. package/mtds/toast/toast.js +8 -7
  29. package/mtds/toast/toast.js.map +1 -1
  30. package/mtds/tooltip/tooltip-observer.js +1 -1
  31. package/mtds/tooltip/tooltip-observer.js.map +1 -1
  32. package/package.json +1 -1
  33. package/mtds/_virtual/client.js +0 -6
  34. package/mtds/_virtual/client.js.map +0 -1
  35. package/mtds/_virtual/client2.js +0 -5
  36. package/mtds/_virtual/client2.js.map +0 -1
  37. package/mtds/_virtual/index.js +0 -5
  38. package/mtds/_virtual/index.js.map +0 -1
  39. package/mtds/_virtual/react-dom-client.development.js +0 -5
  40. package/mtds/_virtual/react-dom-client.development.js.map +0 -1
  41. package/mtds/_virtual/react-dom-client.production.js +0 -5
  42. package/mtds/_virtual/react-dom-client.production.js.map +0 -1
  43. package/mtds/_virtual/scheduler.development.js +0 -5
  44. package/mtds/_virtual/scheduler.development.js.map +0 -1
  45. package/mtds/_virtual/scheduler.production.js +0 -5
  46. package/mtds/_virtual/scheduler.production.js.map +0 -1
  47. package/mtds/external/react-dom/cjs/react-dom-client.development.js +0 -15323
  48. package/mtds/external/react-dom/cjs/react-dom-client.development.js.map +0 -1
  49. package/mtds/external/react-dom/cjs/react-dom-client.production.js +0 -9409
  50. package/mtds/external/react-dom/cjs/react-dom-client.production.js.map +0 -1
  51. package/mtds/external/react-dom/client.js +0 -24
  52. package/mtds/external/react-dom/client.js.map +0 -1
  53. package/mtds/external/scheduler/cjs/scheduler.development.js +0 -237
  54. package/mtds/external/scheduler/cjs/scheduler.development.js.map +0 -1
  55. package/mtds/external/scheduler/cjs/scheduler.production.js +0 -234
  56. package/mtds/external/scheduler/cjs/scheduler.production.js.map +0 -1
  57. package/mtds/external/scheduler/index.js +0 -11
  58. package/mtds/external/scheduler/index.js.map +0 -1
package/mtds/styles.json CHANGED
@@ -1,43 +1,43 @@
1
1
  {
2
- "alert": "_alert_gzx53_1 _ds-alert_nwz76_3",
3
- "app": "_app_gzx53_1",
4
- "sticky": "_sticky_gzx53_1",
5
- "avatar": "_avatar_gzx53_1 _ds-avatar_nwz76_1",
6
- "badge": "_badge_gzx53_1",
7
- "breadcrumbs": "_breadcrumbs_gzx53_1 _ds-breadcrumbs_nwz76_5",
8
- "button": "_button_gzx53_1 _ds-button_nwz76_1",
9
- "card": "_card_gzx53_1",
10
- "group": "_group_gzx53_1",
11
- "chip": "_chip_gzx53_1 _ds-chip_nwz76_5",
12
- "details": "_details_gzx53_1 _ds-details_nwz76_3",
13
- "dialog": "_dialog_gzx53_1 _ds-dialog_nwz76_5",
14
- "divider": "_divider_gzx53_1",
15
- "errorsummary": "_errorsummary_gzx53_1 _ds-error-summary_nwz76_5",
16
- "field": "_field_gzx53_1 _ds-field_nwz76_1",
17
- "affixes": "_affixes_gzx53_1 _ds-field-affixes_nwz76_3",
18
- "fieldset": "_fieldset_gzx53_1 _ds-fieldset_nwz76_3",
19
- "helptext": "_helptext_gzx53_1 _ds-focus_nwz76_1",
20
- "input": "_input_gzx53_1 _ds-input_nwz76_1",
21
- "grid": "_grid_gzx53_1",
22
- "flex": "_flex_gzx53_1",
23
- "link": "_link_gzx53_1",
24
- "logo": "_logo_gzx53_1",
25
- "pagination": "_pagination_gzx53_1 _ds-pagination_nwz76_5",
26
- "popover": "_popover_gzx53_1",
27
- "progress": "_progress_gzx53_1",
28
- "skeleton": "_skeleton_gzx53_1 _ds-skeleton_nwz76_5",
29
- "spinner": "_spinner_gzx53_1",
30
- "steps": "_steps_gzx53_1",
31
- "table": "_table_gzx53_1 _ds-table_nwz76_5",
32
- "tabs": "_tabs_gzx53_1 _ds-tabs_nwz76_5",
33
- "tag": "_tag_gzx53_1 _ds-tag_nwz76_5",
34
- "toast": "_toast_gzx53_1",
35
- "togglegroup": "_togglegroup_gzx53_1",
36
- "heading": "_heading_gzx53_1 _ds-heading_nwz76_1",
37
- "ingress": "_ingress_gzx53_1",
38
- "muted": "_muted_gzx53_1",
39
- "info": "_info_gzx53_1",
40
- "prose": "_prose_gzx53_1",
41
- "validation": "_validation_gzx53_1 _ds-validation-message_nwz76_1",
42
- "body": "_body_gzx53_171"
2
+ "alert": "_alert_1nshl_1 _ds-alert_nwz76_3",
3
+ "app": "_app_1nshl_1",
4
+ "sticky": "_sticky_1nshl_1",
5
+ "avatar": "_avatar_1nshl_1 _ds-avatar_nwz76_1",
6
+ "badge": "_badge_1nshl_1",
7
+ "breadcrumbs": "_breadcrumbs_1nshl_1 _ds-breadcrumbs_nwz76_5",
8
+ "button": "_button_1nshl_1 _ds-button_nwz76_1",
9
+ "card": "_card_1nshl_1",
10
+ "group": "_group_1nshl_1",
11
+ "chip": "_chip_1nshl_1 _ds-chip_nwz76_5",
12
+ "details": "_details_1nshl_1 _ds-details_nwz76_3",
13
+ "dialog": "_dialog_1nshl_1 _ds-dialog_nwz76_5",
14
+ "divider": "_divider_1nshl_1",
15
+ "errorsummary": "_errorsummary_1nshl_1 _ds-error-summary_nwz76_5",
16
+ "field": "_field_1nshl_1 _ds-field_nwz76_1",
17
+ "affixes": "_affixes_1nshl_1 _ds-field-affixes_nwz76_3",
18
+ "fieldset": "_fieldset_1nshl_1 _ds-fieldset_nwz76_3",
19
+ "helptext": "_helptext_1nshl_1 _ds-focus_nwz76_1",
20
+ "input": "_input_1nshl_1 _ds-input_nwz76_1",
21
+ "grid": "_grid_1nshl_1",
22
+ "flex": "_flex_1nshl_1",
23
+ "link": "_link_1nshl_1",
24
+ "logo": "_logo_1nshl_1",
25
+ "pagination": "_pagination_1nshl_1 _ds-pagination_nwz76_5",
26
+ "popover": "_popover_1nshl_1",
27
+ "progress": "_progress_1nshl_1",
28
+ "skeleton": "_skeleton_1nshl_1 _ds-skeleton_nwz76_5",
29
+ "spinner": "_spinner_1nshl_1",
30
+ "steps": "_steps_1nshl_1",
31
+ "table": "_table_1nshl_1 _ds-table_nwz76_5",
32
+ "tabs": "_tabs_1nshl_1 _ds-tabs_nwz76_5",
33
+ "tag": "_tag_1nshl_1 _ds-tag_nwz76_5",
34
+ "toast": "_toast_1nshl_1",
35
+ "togglegroup": "_togglegroup_1nshl_1",
36
+ "heading": "_heading_1nshl_1 _ds-heading_nwz76_1",
37
+ "ingress": "_ingress_1nshl_1",
38
+ "muted": "_muted_1nshl_1",
39
+ "info": "_info_1nshl_1",
40
+ "prose": "_prose_1nshl_1",
41
+ "validation": "_validation_1nshl_1 _ds-validation-message_nwz76_1",
42
+ "body": "_body_1nshl_172"
43
43
  }
@@ -1,29 +1,29 @@
1
- const _ = "_alert_gzx53_1 _ds-alert_nwz76_3", t = "_app_gzx53_1", s = "_sticky_gzx53_1", o = "_avatar_gzx53_1 _ds-avatar_nwz76_1", e = "_badge_gzx53_1", n = "_breadcrumbs_gzx53_1 _ds-breadcrumbs_nwz76_5", a = "_button_gzx53_1 _ds-button_nwz76_1", g = "_card_gzx53_1", r = "_group_gzx53_1", i = "_chip_gzx53_1 _ds-chip_nwz76_5", d = "_details_gzx53_1 _ds-details_nwz76_3", c = "_dialog_gzx53_1 _ds-dialog_nwz76_5", l = "__drawer_gzx53_1", z = "_divider_gzx53_1", x = "_errorsummary_gzx53_1 _ds-error-summary_nwz76_5", p = "__errorsummary_gzx53_1", u = "_field_gzx53_1 _ds-field_nwz76_1", m = "__datalist_gzx53_1", b = "_affixes_gzx53_1 _ds-field-affixes_nwz76_3", w = "_fieldset_gzx53_1 _ds-fieldset_nwz76_3", f = "_helptext_gzx53_1 _ds-focus_nwz76_1", k = "_input_gzx53_1 _ds-input_nwz76_1", h = "_grid_gzx53_1", v = "_flex_gzx53_1", y = "_link_gzx53_1", C = "_logo_gzx53_1", M = "_pagination_gzx53_1 _ds-pagination_nwz76_5", O = "_popover_gzx53_1", S = "_progress_gzx53_1", T = "__indeterminate_gzx53_1", j = "_skeleton_gzx53_1 _ds-skeleton_nwz76_5", q = "__skeleton_gzx53_1", A = "_spinner_gzx53_1", B = "_steps_gzx53_1", D = "_table_gzx53_1 _ds-table_nwz76_5", E = "__scrollShadow_gzx53_1", F = "_tabs_gzx53_1 _ds-tabs_nwz76_5", G = "__scrollMask_gzx53_1", H = "_tag_gzx53_1 _ds-tag_nwz76_5", I = "_toast_gzx53_1", J = "__toastClose_gzx53_1", K = "__toastOpen_gzx53_1", L = "__toastTimeout_gzx53_1", N = "_togglegroup_gzx53_1", P = "__tooltip_gzx53_1", Q = "_heading_gzx53_1 _ds-heading_nwz76_1", R = "_ingress_gzx53_1", U = "_muted_gzx53_1", V = "_info_gzx53_1", W = "_prose_gzx53_1", X = "_validation_gzx53_1 _ds-validation-message_nwz76_1", Y = "_body_gzx53_171", Z = "__checked_gzx53_1", $ = {
1
+ const _ = "_alert_1nshl_1 _ds-alert_nwz76_3", s = "_app_1nshl_1", n = "_sticky_1nshl_1", t = "_avatar_1nshl_1 _ds-avatar_nwz76_1", o = "_badge_1nshl_1", e = "_breadcrumbs_1nshl_1 _ds-breadcrumbs_nwz76_5", l = "_button_1nshl_1 _ds-button_nwz76_1", a = "_card_1nshl_1", r = "_group_1nshl_1", i = "_chip_1nshl_1 _ds-chip_nwz76_5", d = "_details_1nshl_1 _ds-details_nwz76_3", c = "_dialog_1nshl_1 _ds-dialog_nwz76_5", h = "__drawer_1nshl_1", p = "_divider_1nshl_1", g = "_errorsummary_1nshl_1 _ds-error-summary_nwz76_5", u = "__errorsummary_1nshl_1", m = "_field_1nshl_1 _ds-field_nwz76_1", b = "__datalist_1nshl_1", w = "_affixes_1nshl_1 _ds-field-affixes_nwz76_3", f = "_fieldset_1nshl_1 _ds-fieldset_nwz76_3", z = "_helptext_1nshl_1 _ds-focus_nwz76_1", k = "_input_1nshl_1 _ds-input_nwz76_1", v = "_grid_1nshl_1", y = "_flex_1nshl_1", x = "_link_1nshl_1", C = "_logo_1nshl_1", M = "_pagination_1nshl_1 _ds-pagination_nwz76_5", O = "_popover_1nshl_1", S = "_progress_1nshl_1", T = "__indeterminate_1nshl_1", j = "_skeleton_1nshl_1 _ds-skeleton_nwz76_5", q = "__skeleton_1nshl_1", A = "_spinner_1nshl_1", B = "_steps_1nshl_1", D = "_table_1nshl_1 _ds-table_nwz76_5", E = "__scrollShadow_1nshl_1", F = "_tabs_1nshl_1 _ds-tabs_nwz76_5", G = "__scrollMask_1nshl_1", H = "_tag_1nshl_1 _ds-tag_nwz76_5", I = "_toast_1nshl_1", J = "__toastClose_1nshl_1", K = "__toastOpen_1nshl_1", L = "__toastTimeout_1nshl_1", N = "_togglegroup_1nshl_1", P = "__tooltip_1nshl_1", Q = "_heading_1nshl_1 _ds-heading_nwz76_1", R = "_ingress_1nshl_1", U = "_muted_1nshl_1", V = "_info_1nshl_1", W = "_prose_1nshl_1", X = "_validation_1nshl_1 _ds-validation-message_nwz76_1", Y = "_body_1nshl_172", Z = "__checked_1nshl_1", $ = {
2
2
  alert: _,
3
- app: t,
4
- sticky: s,
5
- avatar: o,
6
- badge: e,
7
- breadcrumbs: n,
8
- button: a,
9
- card: g,
3
+ app: s,
4
+ sticky: n,
5
+ avatar: t,
6
+ badge: o,
7
+ breadcrumbs: e,
8
+ button: l,
9
+ card: a,
10
10
  group: r,
11
11
  chip: i,
12
12
  details: d,
13
13
  dialog: c,
14
- _drawer: l,
15
- divider: z,
16
- errorsummary: x,
17
- _errorsummary: p,
18
- field: u,
19
- _datalist: m,
20
- affixes: b,
21
- fieldset: w,
22
- helptext: f,
14
+ _drawer: h,
15
+ divider: p,
16
+ errorsummary: g,
17
+ _errorsummary: u,
18
+ field: m,
19
+ _datalist: b,
20
+ affixes: w,
21
+ fieldset: f,
22
+ helptext: z,
23
23
  input: k,
24
- grid: h,
25
- flex: v,
26
- link: y,
24
+ grid: v,
25
+ flex: y,
26
+ link: x,
27
27
  logo: C,
28
28
  pagination: M,
29
29
  popover: O,
@@ -55,9 +55,9 @@ const _ = "_alert_gzx53_1 _ds-alert_nwz76_3", t = "_app_gzx53_1", s = "_sticky_g
55
55
  };
56
56
  export {
57
57
  Z as _checked,
58
- m as _datalist,
59
- l as _drawer,
60
- p as _errorsummary,
58
+ b as _datalist,
59
+ h as _drawer,
60
+ u as _errorsummary,
61
61
  T as _indeterminate,
62
62
  G as _scrollMask,
63
63
  E as _scrollShadow,
@@ -66,32 +66,32 @@ export {
66
66
  K as _toastOpen,
67
67
  L as _toastTimeout,
68
68
  P as _tooltip,
69
- b as affixes,
69
+ w as affixes,
70
70
  _ as alert,
71
- t as app,
72
- o as avatar,
73
- e as badge,
71
+ s as app,
72
+ t as avatar,
73
+ o as badge,
74
74
  Y as body,
75
- n as breadcrumbs,
76
- a as button,
77
- g as card,
75
+ e as breadcrumbs,
76
+ l as button,
77
+ a as card,
78
78
  i as chip,
79
79
  $ as default,
80
80
  d as details,
81
81
  c as dialog,
82
- z as divider,
83
- x as errorsummary,
84
- u as field,
85
- w as fieldset,
86
- v as flex,
87
- h as grid,
82
+ p as divider,
83
+ g as errorsummary,
84
+ m as field,
85
+ f as fieldset,
86
+ y as flex,
87
+ v as grid,
88
88
  r as group,
89
89
  Q as heading,
90
- f as helptext,
90
+ z as helptext,
91
91
  V as info,
92
92
  R as ingress,
93
93
  k as input,
94
- y as link,
94
+ x as link,
95
95
  C as logo,
96
96
  U as muted,
97
97
  M as pagination,
@@ -101,7 +101,7 @@ export {
101
101
  j as skeleton,
102
102
  A as spinner,
103
103
  B as steps,
104
- s as sticky,
104
+ n as sticky,
105
105
  D as table,
106
106
  F as tabs,
107
107
  H as tag,
@@ -1,14 +1,15 @@
1
+ 'use client';
1
2
  import { jsx as m } from "react/jsx-runtime";
2
3
  import { clsx as u } from "../external/clsx/dist/clsx.js";
3
- import { c as f } from "../_virtual/client.js";
4
- import i from "../styles.module.css.js";
4
+ import { createRoot as f } from "react-dom/client";
5
+ import d from "../styles.module.css.js";
5
6
  import { IS_BROWSER as w, tag as y } from "../utils.js";
6
7
  if (w && !window._mtdsReactToasts) {
7
- const t = f.createRoot(document.body.appendChild(y("div"))), o = /* @__PURE__ */ new Map(), e = () => t.render(Array.from(o.values() || []));
8
+ const t = f(document.body.appendChild(y("div"))), o = /* @__PURE__ */ new Map(), e = () => t.render(Array.from(o.values() || []));
8
9
  window._mtdsReactToasts = {
9
10
  set: (r, a) => o.set(r, a) && e(),
10
11
  delete: ({ animationName: r, currentTarget: a }) => {
11
- r === i._toastClose && (o.delete(a.id), e());
12
+ r === d._toastClose && (o.delete(a.id), e());
12
13
  }
13
14
  };
14
15
  }
@@ -20,7 +21,7 @@ function s(t, o = {}) {
20
21
  "dialog",
21
22
  {
22
23
  "aria-busy": o.busy,
23
- className: u(i.toast, o.className),
24
+ className: u(d.toast, o.className),
24
25
  "data-closedby": o.closedby,
25
26
  "data-color": o.color,
26
27
  "data-timeout": o.timeout,
@@ -39,12 +40,12 @@ s.info = (t, o) => s(t, { color: "info", ...o });
39
40
  s.warning = (t, o) => s(t, { color: "warning", ...o });
40
41
  s.neutral = (t, o) => s(t, { color: "neutral", ...o });
41
42
  s.promise = async function(o, e) {
42
- const { loading: r, success: a, error: d, ...l } = e, c = s(r, { busy: !0, ...l });
43
+ const { loading: r, success: a, error: i, ...l } = e, c = s(r, { busy: !0, ...l });
43
44
  try {
44
45
  const n = await o();
45
46
  return s.success(a, { id: c, busy: !1 }), n;
46
47
  } catch (n) {
47
- throw s.danger(d, { id: c, busy: !1 }), n;
48
+ throw s.danger(i, { id: c, busy: !1 }), n;
48
49
  }
49
50
  };
50
51
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"toast.js","sources":["../../designsystem/toast/toast.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { createRoot } from \"react-dom/client\";\nimport styles from \"../styles.module.css\";\nimport { IS_BROWSER, tag } from \"../utils\";\nimport type { ToastOptions } from \"./toast-helper\";\n\ndeclare global {\n\tinterface Window {\n\t\t_mtdsReactToasts?: {\n\t\t\tset: (id: string, jsx: React.ReactNode) => void;\n\t\t\tdelete: (event: React.AnimationEvent<HTMLDialogElement>) => void;\n\t\t};\n\t}\n}\n\n// Ensure only a single toast master is created\nif (IS_BROWSER && !window._mtdsReactToasts) {\n\tconst root = createRoot(document.body.appendChild(tag(\"div\")));\n\tconst toasts = new Map<string, React.ReactNode>();\n\tconst render = () => root.render(Array.from(toasts.values() || []));\n\n\t// Expose methods to add/remove toasts from the root container\n\twindow._mtdsReactToasts = {\n\t\tset: (id, jsx) => toasts.set(id, jsx) && render(),\n\t\tdelete: ({ animationName, currentTarget }) => {\n\t\t\tif (animationName !== styles._toastClose) return;\n\t\t\ttoasts.delete(currentTarget.id);\n\t\t\trender();\n\t\t},\n\t};\n}\n\nexport function toast(content: React.ReactNode, opt: ToastOptions = {}) {\n\tconst id = opt.id || `${Date.now()}`;\n\twindow._mtdsReactToasts?.set(\n\t\tid,\n\t\t<dialog\n\t\t\taria-busy={opt.busy}\n\t\t\tclassName={clsx(styles.toast, opt.className)}\n\t\t\tdata-closedby={opt.closedby}\n\t\t\tdata-color={opt.color}\n\t\t\tdata-timeout={opt.timeout}\n\t\t\tid={id}\n\t\t\tkey={id}\n\t\t\tonAnimationEnd={window._mtdsReactToasts.delete}\n\t\t\topen={opt.open ?? true}\n\t\t>\n\t\t\t{content}\n\t\t</dialog>,\n\t);\n\n\treturn id;\n}\n\n// Expose toast.danger, toast.info, toast.success etc.\ntoast.success = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"success\", ...opt });\ntoast.danger = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"danger\", ...opt });\ntoast.info = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"info\", ...opt });\ntoast.warning = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"warning\", ...opt });\ntoast.neutral = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"neutral\", ...opt });\ntoast.promise = async function promise<T>(\n\taction: () => Promise<T>,\n\tprops: ToastOptions & {\n\t\tloading: React.ReactNode;\n\t\tsuccess: React.ReactNode;\n\t\terror: React.ReactNode;\n\t},\n): Promise<T> {\n\tconst { loading, success, error, ...opt } = props;\n\tconst id = toast(loading, { busy: true, ...opt });\n\ttry {\n\t\tconst result = await action();\n\t\ttoast.success(success, { id, busy: false });\n\t\treturn result;\n\t} catch (_error) {\n\t\ttoast.danger(error, { id, busy: false });\n\t\tthrow _error;\n\t}\n};\n"],"names":["IS_BROWSER","root","createRoot","tag","toasts","render","id","jsx","animationName","currentTarget","styles","toast","content","opt","clsx","action","props","loading","success","error","result","_error"],"mappings":";;;;;AAgBA,IAAIA,KAAc,CAAC,OAAO,kBAAkB;AAC3C,QAAMC,IAAOC,EAAAA,WAAW,SAAS,KAAK,YAAYC,EAAI,KAAK,CAAC,CAAC,GACvDC,wBAAa,IAAA,GACbC,IAAS,MAAMJ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,WAAW,GAAGC,GAAK;AAC5CF,EAAM,UAAU,eACfI,GACAC,GAKa;AACb,QAAM,EAAE,SAAAC,GAAS,SAAAC,GAAS,OAAAC,GAAO,GAAGN,MAAQG,GACtCV,IAAKK,EAAMM,GAAS,EAAE,MAAM,IAAM,GAAGJ,GAAK;AAChD,MAAI;AACH,UAAMO,IAAS,MAAML,EAAA;AACrB,WAAAJ,EAAM,QAAQO,GAAS,EAAE,IAAAZ,GAAI,MAAM,IAAO,GACnCc;AAAA,EACR,SAASC,GAAQ;AAChB,UAAAV,EAAM,OAAOQ,GAAO,EAAE,IAAAb,GAAI,MAAM,IAAO,GACjCe;AAAA,EACP;AACD;"}
1
+ {"version":3,"file":"toast.js","sources":["../../designsystem/toast/toast.tsx"],"sourcesContent":["\"use client\";\nimport clsx from \"clsx\";\nimport { createRoot } from \"react-dom/client\";\nimport styles from \"../styles.module.css\";\nimport { IS_BROWSER, tag } from \"../utils\";\nimport type { ToastOptions } from \"./toast-helper\";\n\ndeclare global {\n\tinterface Window {\n\t\t_mtdsReactToasts?: {\n\t\t\tset: (id: string, jsx: React.ReactNode) => void;\n\t\t\tdelete: (event: React.AnimationEvent<HTMLDialogElement>) => void;\n\t\t};\n\t}\n}\n\n// Ensure only a single toast master is created\nif (IS_BROWSER && !window._mtdsReactToasts) {\n\tconst root = createRoot(document.body.appendChild(tag(\"div\")));\n\tconst toasts = new Map<string, React.ReactNode>();\n\tconst render = () => root.render(Array.from(toasts.values() || []));\n\n\t// Expose methods to add/remove toasts from the root container\n\twindow._mtdsReactToasts = {\n\t\tset: (id, jsx) => toasts.set(id, jsx) && render(),\n\t\tdelete: ({ animationName, currentTarget }) => {\n\t\t\tif (animationName !== styles._toastClose) return;\n\t\t\ttoasts.delete(currentTarget.id);\n\t\t\trender();\n\t\t},\n\t};\n}\n\nexport function toast(content: React.ReactNode, opt: ToastOptions = {}) {\n\tconst id = opt.id || `${Date.now()}`;\n\twindow._mtdsReactToasts?.set(\n\t\tid,\n\t\t<dialog\n\t\t\taria-busy={opt.busy}\n\t\t\tclassName={clsx(styles.toast, opt.className)}\n\t\t\tdata-closedby={opt.closedby}\n\t\t\tdata-color={opt.color}\n\t\t\tdata-timeout={opt.timeout}\n\t\t\tid={id}\n\t\t\tkey={id}\n\t\t\tonAnimationEnd={window._mtdsReactToasts.delete}\n\t\t\topen={opt.open ?? true}\n\t\t>\n\t\t\t{content}\n\t\t</dialog>,\n\t);\n\n\treturn id;\n}\n\n// Expose toast.danger, toast.info, toast.success etc.\ntoast.success = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"success\", ...opt });\ntoast.danger = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"danger\", ...opt });\ntoast.info = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"info\", ...opt });\ntoast.warning = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"warning\", ...opt });\ntoast.neutral = (content: React.ReactNode, opt?: ToastOptions) =>\n\ttoast(content, { color: \"neutral\", ...opt });\ntoast.promise = async function promise<T>(\n\taction: () => Promise<T>,\n\tprops: ToastOptions & {\n\t\tloading: React.ReactNode;\n\t\tsuccess: React.ReactNode;\n\t\terror: React.ReactNode;\n\t},\n): Promise<T> {\n\tconst { loading, success, error, ...opt } = props;\n\tconst id = toast(loading, { busy: true, ...opt });\n\ttry {\n\t\tconst result = await action();\n\t\ttoast.success(success, { id, busy: false });\n\t\treturn result;\n\t} catch (_error) {\n\t\ttoast.danger(error, { id, busy: false });\n\t\tthrow _error;\n\t}\n};\n"],"names":["IS_BROWSER","root","createRoot","tag","toasts","render","id","jsx","animationName","currentTarget","styles","toast","content","opt","clsx","action","props","loading","success","error","result","_error"],"mappings":";;;;;AAiBA,IAAIA,KAAc,CAAC,OAAO,kBAAkB;AAC3C,QAAMC,IAAOC,EAAW,SAAS,KAAK,YAAYC,EAAI,KAAK,CAAC,CAAC,GACvDC,wBAAa,IAAA,GACbC,IAA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AE,OAAO,WAAW,GAAGC,GAAK;AAC5CF,EAAM,UAAU,eACfI,GACAC,GAKa;AACb,QAAM,EAAE,SAAAC,GAAS,SAAAC,GAAS,OAAAC,GAAO,GAAGN,MAAQG,GACtCV,IAAKK,EAAMM,GAAS,EAAE,MAAM,IAAM,GAAGJ,GAAK;AAChD,MAAI;AACH,UAAMO,IAAS,MAAML,EAAA;AACrB,WAAAJ,EAAM,QAAQO,GAAS,EAAE,IAAAZ,GAAI,MAAM,IAAO,GACnCc;AAAA,EACR,SAASC,GAAQ;AAChB,UAAAV,EAAM,OAAOQ,GAAO,EAAE,IAAAb,GAAI,MAAM,IAAO,GACjCe;AAAA,EACP;AACD;"}
@@ -2,7 +2,7 @@ import { flip as I, shift as h } from "../external/@floating-ui/dom/dist/floatin
2
2
  import w from "../styles.module.css.js";
3
3
  import { IS_BROWSER as C, tag as O, onLoaded as y, on as s, QUICK_EVENT as r, attr as a, anchorPosition as u } from "../utils.js";
4
4
  const m = "aria-describedby", p = "Escape", d = "aria-labelledby", A = "--mtds-tooltip-position", P = 300, T = "mtds-tooltip", o = C ? document.getElementById(T) || O("div", {
5
- className: w._tooltip,
5
+ class: w._tooltip,
6
6
  id: T,
7
7
  popover: "manual"
8
8
  }) : null;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-observer.js","sources":["../../designsystem/tooltip/tooltip-observer.ts"],"sourcesContent":["import { flip, type Placement, shift } from \"@floating-ui/dom\";\nimport styles from \"../styles.module.css\";\nimport {\n\tanchorPosition,\n\tattr,\n\tIS_BROWSER,\n\ton,\n\tonLoaded,\n\tQUICK_EVENT,\n\ttag,\n} from \"../utils\";\n\nconst DESCRIBEDBY = \"aria-describedby\";\nconst ESC = \"Escape\";\nconst LABELLEDBY = \"aria-labelledby\";\nconst POSITION_CSS_PROPERTY = \"--mtds-tooltip-position\";\nconst THROTTLE_DELAY = 300;\nconst TOOLTIP_ID = \"mtds-tooltip\";\nconst TOOLTIP = IS_BROWSER\n\t? document.getElementById(TOOLTIP_ID) ||\n\t\ttag(\"div\", {\n\t\t\tclassName: styles._tooltip,\n\t\t\tid: TOOLTIP_ID,\n\t\t\tpopover: \"manual\",\n\t\t})\n\t: null;\n\nlet ANCHOR: Element | null = null;\nlet LAST_CALL = Number.NEGATIVE_INFINITY;\nlet THROTTLE: number | ReturnType<typeof setTimeout> = 0;\n\nfunction handleTooltipMove({ target, type, key }: Event & { key?: string }) {\n\tif (type === \"keydown\" && key !== ESC) return; // Allow ESC dismiss to follow https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/\n\tconst wait = LAST_CALL + THROTTLE_DELAY - Date.now();\n\tclearTimeout(THROTTLE);\n\tTHROTTLE = setTimeout(\n\t\thandleTooltipMoveThrottled,\n\t\tMath.max(wait, 0),\n\t\tkey === ESC ? null : target,\n\t);\n}\n\n// Using a throttled function to avoid performance issues\nfunction handleTooltipMoveThrottled(target: Element | null) {\n\tLAST_CALL = Date.now();\n\n\t// Build and append tooltip if not existing\n\tif (!TOOLTIP || target === TOOLTIP) return; // Allow tooltip to be hovered, following https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus\n\tif (!TOOLTIP?.isConnected) document.body.append(TOOLTIP); // Ensure connected\n\tlet anchor = target?.closest?.<Element>(\"[data-tooltip]\") || null;\n\n\t// No need to update\n\tif (anchor === ANCHOR) return;\n\n\tconst content = (anchor && attr(anchor, \"data-tooltip\")) || \"\";\n\tconst position =\n\t\t(anchor && attr(anchor, \"data-tooltip-position\")) ||\n\t\twindow\n\t\t\t.getComputedStyle(anchor || document.body)\n\t\t\t.getPropertyValue(POSITION_CSS_PROPERTY)\n\t\t\t?.trim() ||\n\t\t\"top\";\n\n\tconst isHidden =\n\t\t!content ||\n\t\tcontent === \"false\" ||\n\t\tcontent === \"true\" ||\n\t\tposition === \"none\";\n\n\tif (isHidden) anchor = null; // Do not show tooltip if boolish value\n\tif (anchor) TOOLTIP.textContent = content; // Only update content if new anchor\n\n\tconst hadLabel = ANCHOR && attr(ANCHOR, LABELLEDBY) === TOOLTIP?.id;\n\tconst hasLabel =\n\t\t(anchor instanceof HTMLElement\n\t\t\t? anchor.innerText\n\t\t\t: anchor?.textContent\n\t\t)?.trim() ||\n\t\tanchor?.hasAttribute(LABELLEDBY) ||\n\t\tanchor?.hasAttribute(\"aria-label\");\n\n\tANCHOR?.removeAttribute(hadLabel ? LABELLEDBY : DESCRIBEDBY); // Unlink previous anchor\n\tanchorPosition(TOOLTIP, false); // Reset anchor position\n\n\tANCHOR = anchor; // Store new anchor - might be null if no new anchor\n\tif (ANCHOR) attr(ANCHOR, hasLabel ? DESCRIBEDBY : LABELLEDBY, TOOLTIP?.id); // Use tooltip as description if allready has label\n\tif (ANCHOR?.isConnected) TOOLTIP.hidePopover(); // Hide tooltip so it can be placed on top-layer on next show\n\tTOOLTIP.togglePopover(!!anchor);\n\tanchorPosition(TOOLTIP, anchor || false, {\n\t\tplacement: position as Placement,\n\t\tmiddleware: [flip(), shift({ padding: 10 })],\n\t});\n}\n\nonLoaded(() => {\n\ton(document, \"blur,focus,mouseout,mouseover\", handleTooltipMove, QUICK_EVENT);\n\ton(window, \"keydown\", handleTooltipMove, QUICK_EVENT);\n\ton(window, \"blur\", handleTooltipMove, QUICK_EVENT);\n});\n"],"names":["DESCRIBEDBY","ESC","LABELLEDBY","POSITION_CSS_PROPERTY","THROTTLE_DELAY","TOOLTIP_ID","TOOLTIP","IS_BROWSER","tag","styles","ANCHOR","LAST_CALL","THROTTLE","handleTooltipMove","target","type","key","wait","handleTooltipMoveThrottled","anchor","content","attr","position","hadLabel","hasLabel","anchorPosition","flip","shift","onLoaded","on","QUICK_EVENT"],"mappings":";;;AAYA,MAAMA,IAAc,oBACdC,IAAM,UACNC,IAAa,mBACbC,IAAwB,2BACxBC,IAAiB,KACjBC,IAAa,gBACbC,IAAUC,IACb,SAAS,eAAeF,CAAU,KACnCG,EAAI,OAAO;AAAA,EACV,WAAWC,EAAO;AAAA,EAClB,IAAIJ;AAAA,EACJ,SAAS;AACV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c,CAAC,CAACa,CAAM,GAC9BM,EAAenB,GAASa,KAAU,IAAO;AAAA,IACxC,WAAWG;AAAA,IACX,YAAY,CAACI,EAAA,GAAQC,EAAM,EAAE,SAAS,IAAI,CAAC;AAAA,EAAA,CAC3C;AACF;AAEAC,EAAS,MAAM;AACd,EAAAC,EAAG,UAAU,iCAAiChB,GAAmBiB,CAAW,GAC5ED,EAAG,QAAQ,WAAWhB,GAAmBiB,CAAW,GACpDD,EAAG,QAAQ,QAAQhB,GAAmBiB,CAAW;AAClD,CAAC;"}
1
+ {"version":3,"file":"tooltip-observer.js","sources":["../../designsystem/tooltip/tooltip-observer.ts"],"sourcesContent":["import { flip, type Placement, shift } from \"@floating-ui/dom\";\nimport styles from \"../styles.module.css\";\nimport {\n\tanchorPosition,\n\tattr,\n\tIS_BROWSER,\n\ton,\n\tonLoaded,\n\tQUICK_EVENT,\n\ttag,\n} from \"../utils\";\n\nconst DESCRIBEDBY = \"aria-describedby\";\nconst ESC = \"Escape\";\nconst LABELLEDBY = \"aria-labelledby\";\nconst POSITION_CSS_PROPERTY = \"--mtds-tooltip-position\";\nconst THROTTLE_DELAY = 300;\nconst TOOLTIP_ID = \"mtds-tooltip\";\nconst TOOLTIP = IS_BROWSER\n\t? document.getElementById(TOOLTIP_ID) ||\n\t\ttag(\"div\", {\n\t\t\tclass: styles._tooltip,\n\t\t\tid: TOOLTIP_ID,\n\t\t\tpopover: \"manual\",\n\t\t})\n\t: null;\n\nlet ANCHOR: Element | null = null;\nlet LAST_CALL = Number.NEGATIVE_INFINITY;\nlet THROTTLE: number | ReturnType<typeof setTimeout> = 0;\n\nfunction handleTooltipMove({ target, type, key }: Event & { key?: string }) {\n\tif (type === \"keydown\" && key !== ESC) return; // Allow ESC dismiss to follow https://www.w3.org/WAI/ARIA/apg/patterns/tooltip/\n\tconst wait = LAST_CALL + THROTTLE_DELAY - Date.now();\n\tclearTimeout(THROTTLE);\n\tTHROTTLE = setTimeout(\n\t\thandleTooltipMoveThrottled,\n\t\tMath.max(wait, 0),\n\t\tkey === ESC ? null : target,\n\t);\n}\n\n// Using a throttled function to avoid performance issues\nfunction handleTooltipMoveThrottled(target: Element | null) {\n\tLAST_CALL = Date.now();\n\n\t// Build and append tooltip if not existing\n\tif (!TOOLTIP || target === TOOLTIP) return; // Allow tooltip to be hovered, following https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus\n\tif (!TOOLTIP?.isConnected) document.body.append(TOOLTIP); // Ensure connected\n\tlet anchor = target?.closest?.<Element>(\"[data-tooltip]\") || null;\n\n\t// No need to update\n\tif (anchor === ANCHOR) return;\n\n\tconst content = (anchor && attr(anchor, \"data-tooltip\")) || \"\";\n\tconst position =\n\t\t(anchor && attr(anchor, \"data-tooltip-position\")) ||\n\t\twindow\n\t\t\t.getComputedStyle(anchor || document.body)\n\t\t\t.getPropertyValue(POSITION_CSS_PROPERTY)\n\t\t\t?.trim() ||\n\t\t\"top\";\n\n\tconst isHidden =\n\t\t!content ||\n\t\tcontent === \"false\" ||\n\t\tcontent === \"true\" ||\n\t\tposition === \"none\";\n\n\tif (isHidden) anchor = null; // Do not show tooltip if boolish value\n\tif (anchor) TOOLTIP.textContent = content; // Only update content if new anchor\n\n\tconst hadLabel = ANCHOR && attr(ANCHOR, LABELLEDBY) === TOOLTIP?.id;\n\tconst hasLabel =\n\t\t(anchor instanceof HTMLElement\n\t\t\t? anchor.innerText\n\t\t\t: anchor?.textContent\n\t\t)?.trim() ||\n\t\tanchor?.hasAttribute(LABELLEDBY) ||\n\t\tanchor?.hasAttribute(\"aria-label\");\n\n\tANCHOR?.removeAttribute(hadLabel ? LABELLEDBY : DESCRIBEDBY); // Unlink previous anchor\n\tanchorPosition(TOOLTIP, false); // Reset anchor position\n\n\tANCHOR = anchor; // Store new anchor - might be null if no new anchor\n\tif (ANCHOR) attr(ANCHOR, hasLabel ? DESCRIBEDBY : LABELLEDBY, TOOLTIP?.id); // Use tooltip as description if allready has label\n\tif (ANCHOR?.isConnected) TOOLTIP.hidePopover(); // Hide tooltip so it can be placed on top-layer on next show\n\tTOOLTIP.togglePopover(!!anchor);\n\tanchorPosition(TOOLTIP, anchor || false, {\n\t\tplacement: position as Placement,\n\t\tmiddleware: [flip(), shift({ padding: 10 })],\n\t});\n}\n\nonLoaded(() => {\n\ton(document, \"blur,focus,mouseout,mouseover\", handleTooltipMove, QUICK_EVENT);\n\ton(window, \"keydown\", handleTooltipMove, QUICK_EVENT);\n\ton(window, \"blur\", handleTooltipMove, QUICK_EVENT);\n});\n"],"names":["DESCRIBEDBY","ESC","LABELLEDBY","POSITION_CSS_PROPERTY","THROTTLE_DELAY","TOOLTIP_ID","TOOLTIP","IS_BROWSER","tag","styles","ANCHOR","LAST_CALL","THROTTLE","handleTooltipMove","target","type","key","wait","handleTooltipMoveThrottled","anchor","content","attr","position","hadLabel","hasLabel","anchorPosition","flip","shift","onLoaded","on","QUICK_EVENT"],"mappings":";;;AAYA,MAAMA,IAAc,oBACdC,IAAM,UACNC,IAAa,mBACbC,IAAwB,2BACxBC,IAAiB,KACjBC,IAAa,gBACbC,IAAUC,IACb,SAAS,eAAeF,CAAU,KACnCG,EAAI,OAAO;AAAA,EACV,OAAOC,EAAO;AAAA,EACd,IAAIJ;AAAA,EACJ,SAAS;AACV,CAAC,IACA;AAEH,IAAIK,IAAyB,MACzBC,IAAY,OAAO,mBACnBC,IAAmD;AAEvD,SAASC,EAAkB,EAAE,QAAAC,GAAQ,MAAAC,GAAM,KAAAC,KAAiC;AAC3E,MAAID,MAAS,aAAaC,MAAQf,EAAK;AACvC,QAAMgB,IAAON,IAAYP,IAAiB,KAAK,IAAA;AAC/C,eAAaQ,CAAQ,GACrBA,IAAW;AAAA,IACVM;AAAA,IACA,KAAK,IAAID,GAAM,CAAC;AAAA,IAChBD,MAAQf,IAAM,OAAOa;AAAA,EAAA;AAEvB;AAGA,SAASI,EAA2BJ,GAAwB;AAI3D,MAHAH,IAAY,KAAK,IAAA,GAGb,CAACL,KAAWQ,MAAWR,EAAS;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
5
  "main": "./mtds/index.js",
6
6
  "types": "./mtds/index.d.ts",
@@ -1,6 +0,0 @@
1
- import { __require as r } from "../external/react-dom/client.js";
2
- var i = r();
3
- export {
4
- i as c
5
- };
6
- //# sourceMappingURL=client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -1,5 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
5
- //# sourceMappingURL=client2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
5
- //# sourceMappingURL=react-dom-client.development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-dom-client.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- var o = {};
2
- export {
3
- o as __exports
4
- };
5
- //# sourceMappingURL=react-dom-client.production.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"react-dom-client.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- var e = {};
2
- export {
3
- e as __exports
4
- };
5
- //# sourceMappingURL=scheduler.development.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scheduler.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,5 +0,0 @@
1
- var r = {};
2
- export {
3
- r as __exports
4
- };
5
- //# sourceMappingURL=scheduler.production.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scheduler.production.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}