@mattilsynet/design 2.1.5 → 2.1.7

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 (37) hide show
  1. package/mtds/alert/alert.js.map +1 -1
  2. package/mtds/button/button.d.ts +0 -1
  3. package/mtds/button/button.js.map +1 -1
  4. package/mtds/details/details.stories.d.ts +1 -1
  5. package/mtds/external/@floating-ui/dom/dist/floating-ui.dom.js +169 -167
  6. package/mtds/external/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
  7. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +159 -146
  8. package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
  9. package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js +43 -45
  10. package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js.map +1 -1
  11. package/mtds/external/@u-elements/u-details/dist/u-details.js +27 -29
  12. package/mtds/external/@u-elements/u-details/dist/u-details.js.map +1 -1
  13. package/mtds/external/@u-elements/u-progress/dist/u-progress.js +42 -45
  14. package/mtds/external/@u-elements/u-progress/dist/u-progress.js.map +1 -1
  15. package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js +57 -56
  16. package/mtds/external/@u-elements/u-tabs/dist/u-tabs.js.map +1 -1
  17. package/mtds/field/field.js +13 -11
  18. package/mtds/field/field.js.map +1 -1
  19. package/mtds/index.iife.js +30 -30
  20. package/mtds/input/input.d.ts +2 -0
  21. package/mtds/input/input.js +14 -9
  22. package/mtds/input/input.js.map +1 -1
  23. package/mtds/input/input.stories.d.ts +2 -1
  24. package/mtds/layout/layout.d.ts +1 -0
  25. package/mtds/layout/layout.js.map +1 -1
  26. package/mtds/package.json.js +1 -1
  27. package/mtds/react.js +37 -36
  28. package/mtds/styles.css +1 -1
  29. package/mtds/styles.json +20 -20
  30. package/mtds/styles.module.css.js +47 -47
  31. package/mtds/table/table-observer.js +13 -17
  32. package/mtds/table/table-observer.js.map +1 -1
  33. package/mtds/tag/tag.d.ts +3 -1
  34. package/mtds/tag/tag.js.map +1 -1
  35. package/mtds/typography/typography.d.ts +3 -1
  36. package/mtds/typography/typography.js.map +1 -1
  37. package/package.json +16 -16
package/mtds/styles.json CHANGED
@@ -1,42 +1,42 @@
1
1
  {
2
- "alert": "_alert_1run0_1 _ds-alert_wy3tx_1",
2
+ "alert": "_alert_1run0_1 _ds-alert_alzsp_1",
3
3
  "app": "_app_1run0_1",
4
4
  "sticky": "_sticky_1run0_1",
5
- "avatar": "_avatar_1run0_1 _ds-avatar_wy3tx_1",
5
+ "avatar": "_avatar_1run0_1 _ds-avatar_alzsp_1",
6
6
  "badge": "_badge_1run0_1",
7
- "breadcrumbs": "_breadcrumbs_1run0_1 _ds-breadcrumbs_wy3tx_1",
8
- "button": "_button_1run0_1 _ds-button_wy3tx_1",
7
+ "breadcrumbs": "_breadcrumbs_1run0_1 _ds-breadcrumbs_alzsp_1",
8
+ "button": "_button_1run0_1 _ds-button_alzsp_1",
9
9
  "card": "_card_1run0_1",
10
10
  "group": "_group_1run0_1",
11
- "chip": "_chip_1run0_1 _ds-chip_wy3tx_1",
12
- "details": "_details_1run0_1 _ds-details_wy3tx_1",
13
- "dialog": "_dialog_1run0_1 _ds-dialog_wy3tx_1",
11
+ "chip": "_chip_1run0_1 _ds-chip_alzsp_1",
12
+ "details": "_details_1run0_1 _ds-details_alzsp_1",
13
+ "dialog": "_dialog_1run0_1 _ds-dialog_alzsp_1",
14
14
  "divider": "_divider_1run0_1",
15
- "errorsummary": "_errorsummary_1run0_1 _ds-error-summary_wy3tx_1",
16
- "field": "_field_1run0_1 _ds-field_wy3tx_1",
17
- "affixes": "_affixes_1run0_1 _ds-field-affixes_wy3tx_1",
18
- "fieldset": "_fieldset_1run0_1 _ds-fieldset_wy3tx_1",
19
- "heading": "_heading_1run0_1 _ds-heading_wy3tx_1",
15
+ "errorsummary": "_errorsummary_1run0_1 _ds-error-summary_alzsp_1",
16
+ "field": "_field_1run0_1 _ds-field_alzsp_1",
17
+ "affixes": "_affixes_1run0_1 _ds-field-affixes_alzsp_1",
18
+ "fieldset": "_fieldset_1run0_1 _ds-fieldset_alzsp_1",
19
+ "heading": "_heading_1run0_1 _ds-heading_alzsp_1",
20
20
  "ingress": "_ingress_1run0_1",
21
21
  "muted": "_muted_1run0_1",
22
22
  "info": "_info_1run0_1",
23
23
  "prose": "_prose_1run0_1",
24
- "helptext": "_helptext_1run0_1 _ds-focus_wy3tx_1",
25
- "input": "_input_1run0_1 _ds-input_wy3tx_1",
24
+ "helptext": "_helptext_1run0_1 _ds-focus_alzsp_1",
25
+ "input": "_input_1run0_1 _ds-input_alzsp_1",
26
26
  "grid": "_grid_1run0_1",
27
27
  "flex": "_flex_1run0_1",
28
28
  "link": "_link_1run0_1",
29
29
  "logo": "_logo_1run0_1",
30
- "pagination": "_pagination_1run0_1 _ds-pagination_wy3tx_1",
30
+ "pagination": "_pagination_1run0_1 _ds-pagination_alzsp_1",
31
31
  "popover": "_popover_1run0_1",
32
32
  "progress": "_progress_1run0_1",
33
- "skeleton": "_skeleton_1run0_1 _ds-skeleton_wy3tx_1",
33
+ "skeleton": "_skeleton_1run0_1 _ds-skeleton_alzsp_1",
34
34
  "spinner": "_spinner_1run0_1",
35
35
  "steps": "_steps_1run0_1",
36
- "table": "_table_1run0_1 _ds-table_wy3tx_1",
37
- "tabs": "_tabs_1run0_1 _ds-tabs_wy3tx_1",
38
- "tag": "_tag_1run0_1 _ds-tag_wy3tx_1",
36
+ "table": "_table_1run0_1 _ds-table_alzsp_1",
37
+ "tabs": "_tabs_1run0_1 _ds-tabs_alzsp_1",
38
+ "tag": "_tag_1run0_1 _ds-tag_alzsp_1",
39
39
  "togglegroup": "_togglegroup_1run0_1",
40
- "validation": "_validation_1run0_1 _ds-validation-message_wy3tx_1",
40
+ "validation": "_validation_1run0_1 _ds-validation-message_alzsp_1",
41
41
  "body": "_body_1run0_153"
42
42
  }
@@ -1,33 +1,33 @@
1
- const _ = "_alert_1run0_1 _ds-alert_wy3tx_1", t = "_app_1run0_1", n = "_sticky_1run0_1", s = "_avatar_1run0_1 _ds-avatar_wy3tx_1", r = "_badge_1run0_1", o = "_breadcrumbs_1run0_1 _ds-breadcrumbs_wy3tx_1", e = "_button_1run0_1 _ds-button_wy3tx_1", a = "_card_1run0_1", d = "_group_1run0_1", i = "_chip_1run0_1 _ds-chip_wy3tx_1", u = "_details_1run0_1 _ds-details_wy3tx_1", c = "_dialog_1run0_1 _ds-dialog_wy3tx_1", l = "__drawer_1run0_1", p = "_divider_1run0_1", g = "_errorsummary_1run0_1 _ds-error-summary_wy3tx_1", y = "__errorsummary_1run0_1", x = "_field_1run0_1 _ds-field_wy3tx_1", b = "__datalist_1run0_1", w = "_affixes_1run0_1 _ds-field-affixes_wy3tx_1", f = "_fieldset_1run0_1 _ds-fieldset_wy3tx_1", m = "_heading_1run0_1 _ds-heading_wy3tx_1", k = "_ingress_1run0_1", h = "_muted_1run0_1", v = "_info_1run0_1", M = "_prose_1run0_1", S = "_helptext_1run0_1 _ds-focus_wy3tx_1", j = "_input_1run0_1 _ds-input_wy3tx_1", q = "_grid_1run0_1", z = "_flex_1run0_1", A = "_link_1run0_1", B = "_logo_1run0_1", C = "_pagination_1run0_1 _ds-pagination_wy3tx_1", D = "_popover_1run0_1", E = "_progress_1run0_1", F = "__indeterminate_1run0_1", G = "_skeleton_1run0_1 _ds-skeleton_wy3tx_1", H = "__skeleton_1run0_1", I = "_spinner_1run0_1", J = "_steps_1run0_1", K = "_table_1run0_1 _ds-table_wy3tx_1", L = "__scrollShadow_1run0_1", N = "_tabs_1run0_1 _ds-tabs_wy3tx_1", O = "__scrollMask_1run0_1", P = "_tag_1run0_1 _ds-tag_wy3tx_1", Q = "_togglegroup_1run0_1", R = "__tooltip_1run0_1", T = "_validation_1run0_1 _ds-validation-message_wy3tx_1", U = "_body_1run0_153", V = "__checked_1run0_1", W = {
1
+ const _ = "_alert_1run0_1 _ds-alert_alzsp_1", s = "_app_1run0_1", n = "_sticky_1run0_1", t = "_avatar_1run0_1 _ds-avatar_alzsp_1", r = "_badge_1run0_1", o = "_breadcrumbs_1run0_1 _ds-breadcrumbs_alzsp_1", a = "_button_1run0_1 _ds-button_alzsp_1", e = "_card_1run0_1", l = "_group_1run0_1", d = "_chip_1run0_1 _ds-chip_alzsp_1", i = "_details_1run0_1 _ds-details_alzsp_1", u = "_dialog_1run0_1 _ds-dialog_alzsp_1", c = "__drawer_1run0_1", p = "_divider_1run0_1", g = "_errorsummary_1run0_1 _ds-error-summary_alzsp_1", b = "__errorsummary_1run0_1", f = "_field_1run0_1 _ds-field_alzsp_1", m = "__datalist_1run0_1", z = "_affixes_1run0_1 _ds-field-affixes_alzsp_1", k = "_fieldset_1run0_1 _ds-fieldset_alzsp_1", h = "_heading_1run0_1 _ds-heading_alzsp_1", v = "_ingress_1run0_1", y = "_muted_1run0_1", x = "_info_1run0_1", w = "_prose_1run0_1", M = "_helptext_1run0_1 _ds-focus_alzsp_1", S = "_input_1run0_1 _ds-input_alzsp_1", j = "_grid_1run0_1", q = "_flex_1run0_1", A = "_link_1run0_1", B = "_logo_1run0_1", C = "_pagination_1run0_1 _ds-pagination_alzsp_1", D = "_popover_1run0_1", E = "_progress_1run0_1", F = "__indeterminate_1run0_1", G = "_skeleton_1run0_1 _ds-skeleton_alzsp_1", H = "__skeleton_1run0_1", I = "_spinner_1run0_1", J = "_steps_1run0_1", K = "_table_1run0_1 _ds-table_alzsp_1", L = "__scrollShadow_1run0_1", N = "_tabs_1run0_1 _ds-tabs_alzsp_1", O = "__scrollMask_1run0_1", P = "_tag_1run0_1 _ds-tag_alzsp_1", Q = "_togglegroup_1run0_1", R = "__tooltip_1run0_1", T = "_validation_1run0_1 _ds-validation-message_alzsp_1", U = "_body_1run0_153", V = "__checked_1run0_1", W = {
2
2
  alert: _,
3
- app: t,
3
+ app: s,
4
4
  sticky: n,
5
- avatar: s,
5
+ avatar: t,
6
6
  badge: r,
7
7
  breadcrumbs: o,
8
- button: e,
9
- card: a,
10
- group: d,
11
- chip: i,
12
- details: u,
13
- dialog: c,
14
- _drawer: l,
8
+ button: a,
9
+ card: e,
10
+ group: l,
11
+ chip: d,
12
+ details: i,
13
+ dialog: u,
14
+ _drawer: c,
15
15
  divider: p,
16
16
  errorsummary: g,
17
- _errorsummary: y,
18
- field: x,
19
- _datalist: b,
20
- affixes: w,
21
- fieldset: f,
22
- heading: m,
23
- ingress: k,
24
- muted: h,
25
- info: v,
26
- prose: M,
27
- helptext: S,
28
- input: j,
29
- grid: q,
30
- flex: z,
17
+ _errorsummary: b,
18
+ field: f,
19
+ _datalist: m,
20
+ affixes: z,
21
+ fieldset: k,
22
+ heading: h,
23
+ ingress: v,
24
+ muted: y,
25
+ info: x,
26
+ prose: w,
27
+ helptext: M,
28
+ input: S,
29
+ grid: j,
30
+ flex: q,
31
31
  link: A,
32
32
  logo: B,
33
33
  pagination: C,
@@ -51,46 +51,46 @@ const _ = "_alert_1run0_1 _ds-alert_wy3tx_1", t = "_app_1run0_1", n = "_sticky_1
51
51
  };
52
52
  export {
53
53
  V as _checked,
54
- b as _datalist,
55
- l as _drawer,
56
- y as _errorsummary,
54
+ m as _datalist,
55
+ c as _drawer,
56
+ b as _errorsummary,
57
57
  F as _indeterminate,
58
58
  O as _scrollMask,
59
59
  L as _scrollShadow,
60
60
  H as _skeleton,
61
61
  R as _tooltip,
62
- w as affixes,
62
+ z as affixes,
63
63
  _ as alert,
64
- t as app,
65
- s as avatar,
64
+ s as app,
65
+ t as avatar,
66
66
  r as badge,
67
67
  U as body,
68
68
  o as breadcrumbs,
69
- e as button,
70
- a as card,
71
- i as chip,
69
+ a as button,
70
+ e as card,
71
+ d as chip,
72
72
  W as default,
73
- u as details,
74
- c as dialog,
73
+ i as details,
74
+ u as dialog,
75
75
  p as divider,
76
76
  g as errorsummary,
77
- x as field,
78
- f as fieldset,
79
- z as flex,
80
- q as grid,
81
- d as group,
82
- m as heading,
83
- S as helptext,
84
- v as info,
85
- k as ingress,
86
- j as input,
77
+ f as field,
78
+ k as fieldset,
79
+ q as flex,
80
+ j as grid,
81
+ l as group,
82
+ h as heading,
83
+ M as helptext,
84
+ x as info,
85
+ v as ingress,
86
+ S as input,
87
87
  A as link,
88
88
  B as logo,
89
- h as muted,
89
+ y as muted,
90
90
  C as pagination,
91
91
  D as popover,
92
92
  E as progress,
93
- M as prose,
93
+ w as prose,
94
94
  G as skeleton,
95
95
  I as spinner,
96
96
  J as steps,
@@ -1,23 +1,19 @@
1
1
  import s from "../styles.module.css.js";
2
- import { onLoaded as i, onMutation as f, attr as o } from "../utils.js";
2
+ import { onLoaded as c, onMutation as a, attr as f } from "../utils.js";
3
3
  const d = s.table.split(" ")[0];
4
- function m(a) {
5
- for (const t of a) {
6
- const n = [];
7
- o(t, "role", "table"), t.caption && o(t.caption, "role", "caption");
8
- for (const r of [t.tHead, t.tFoot, ...t.tBodies])
9
- if (r) {
10
- o(r, "role", "rowgroup");
11
- const l = r.nodeName === "TBODY";
12
- for (const c of r.rows) {
13
- o(c, "role", "row");
14
- for (const e of c.cells)
15
- l ? o(e, "data-th", n[e.cellIndex] || ":empty") : n.push(e.innerText.trim()), e.nodeName === "TD" ? o(e, "role", "cell") : (o(e, "role", l ? "rowheader" : "columnheader"), o(e, "scope", l ? "row" : "col"));
16
- }
17
- }
4
+ function m(n) {
5
+ for (const t of n) {
6
+ const r = Array.from(
7
+ t.tHead?.rows[0]?.cells || [],
8
+ (o) => o.innerText.trim()
9
+ );
10
+ for (const o of t.tBodies)
11
+ for (const l of o.rows)
12
+ for (const e of l.cells)
13
+ f(e, "data-th", r[e.cellIndex] || ":empty");
18
14
  }
19
15
  }
20
- i(
21
- () => f(document.documentElement, d, m)
16
+ c(
17
+ () => a(document.documentElement, d, m)
22
18
  );
23
19
  //# sourceMappingURL=table-observer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-observer.js","sources":["../../designsystem/table/table-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { attr, onLoaded, onMutation } from \"../utils\";\n\nconst CSS_TABLE = styles.table.split(\" \")[0];\n\nfunction handleTableMutation(tables: HTMLCollectionOf<HTMLTableElement>) {\n\tfor (const table of tables) {\n\t\tconst ths: string[] = []; // Add data-th=\"\" to each cell to support data-mobile designs\n\n\t\tattr(table, \"role\", \"table\"); // Add helping role=\"\" to ensure screen readers understand the table regardless of CSS display\n\t\tif (table.caption) attr(table.caption, \"role\", \"caption\");\n\t\tfor (const group of [table.tHead, table.tFoot, ...table.tBodies])\n\t\t\tif (group) {\n\t\t\t\tattr(group, \"role\", \"rowgroup\");\n\t\t\t\tconst isTbody = group.nodeName === \"TBODY\";\n\n\t\t\t\tfor (const row of group.rows) {\n\t\t\t\t\tattr(row, \"role\", \"row\");\n\t\t\t\t\tfor (const cell of row.cells) {\n\t\t\t\t\t\tif (isTbody) attr(cell, \"data-th\", ths[cell.cellIndex] || \":empty\");\n\t\t\t\t\t\telse ths.push(cell.innerText.trim()); // Using innerText to only include visible text\n\t\t\t\t\t\tif (cell.nodeName === \"TD\") attr(cell, \"role\", \"cell\");\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tattr(cell, \"role\", isTbody ? \"rowheader\" : \"columnheader\");\n\t\t\t\t\t\t\tattr(cell, \"scope\", isTbody ? \"row\" : \"col\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t}\n}\n\nonLoaded(() =>\n\tonMutation(document.documentElement, CSS_TABLE, handleTableMutation),\n);\n"],"names":["CSS_TABLE","styles","handleTableMutation","tables","table","ths","attr","group","isTbody","row","cell","onLoaded","onMutation"],"mappings":";;AAGA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC;AAE3C,SAASC,EAAoBC,GAA4C;AACxE,aAAWC,KAASD,GAAQ;AAC3B,UAAME,IAAgB,CAAA;AAEtB,IAAAC,EAAKF,GAAO,QAAQ,OAAO,GACvBA,EAAM,WAASE,EAAKF,EAAM,SAAS,QAAQ,SAAS;AACxD,eAAWG,KAAS,CAACH,EAAM,OAAOA,EAAM,OAAO,GAAGA,EAAM,OAAO;AAC9D,UAAIG,GAAO;AACV,QAAAD,EAAKC,GAAO,QAAQ,UAAU;AAC9B,cAAMC,IAAUD,EAAM,aAAa;AAEnC,mBAAWE,KAAOF,EAAM,MAAM;AAC7B,UAAAD,EAAKG,GAAK,QAAQ,KAAK;AACvB,qBAAWC,KAAQD,EAAI;AACtB,YAAID,MAAcE,GAAM,WAAWL,EAAIK,EAAK,SAAS,KAAK,QAAQ,IAC7DL,EAAI,KAAKK,EAAK,UAAU,MAAM,GAC/BA,EAAK,aAAa,OAAMJ,EAAKI,GAAM,QAAQ,MAAM,KAEpDJ,EAAKI,GAAM,QAAQF,IAAU,cAAc,cAAc,GACzDF,EAAKI,GAAM,SAASF,IAAU,QAAQ,KAAK;AAAA,QAG9C;AAAA,MACD;AAAA,EACF;AACD;AAEAG;AAAA,EAAS,MACRC,EAAW,SAAS,iBAAiBZ,GAAWE,CAAmB;AACpE;"}
1
+ {"version":3,"file":"table-observer.js","sources":["../../designsystem/table/table-observer.ts"],"sourcesContent":["import styles from \"../styles.module.css\";\nimport { attr, onLoaded, onMutation } from \"../utils\";\n\nconst CSS_TABLE = styles.table.split(\" \")[0];\n\nfunction handleTableMutation(tables: HTMLCollectionOf<HTMLTableElement>) {\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\nonLoaded(() =>\n\tonMutation(document.documentElement, CSS_TABLE, handleTableMutation),\n);\n"],"names":["CSS_TABLE","styles","handleTableMutation","tables","table","ths","th","tbody","row","cell","attr","onLoaded","onMutation"],"mappings":";;AAGA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC;AAE3C,SAASC,EAAoBC,GAA4C;AACxE,aAAWC,KAASD,GAAQ;AAC3B,UAAME,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;AAAA,EAAS,MACRC,EAAW,SAAS,iBAAiBZ,GAAWE,CAAmB;AACpE;"}
package/mtds/tag/tag.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { JSX } from 'react';
2
2
  import { PolymorphicComponentPropWithRef } from '../react-types';
3
- export type TagProps<Href, As extends React.ElementType = Href extends string ? "a" : "span"> = PolymorphicComponentPropWithRef<As>;
3
+ export type TagProps<Href, As extends React.ElementType = Href extends string ? "a" : "span"> = PolymorphicComponentPropWithRef<As, {
4
+ 'data-icon'?: 'none';
5
+ }>;
4
6
  type TagComponent = <Href, As extends React.ElementType = Href extends string ? "a" : "span">(props: TagProps<Href, As>) => JSX.Element;
5
7
  export declare const Tag: TagComponent;
6
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"tag.js","sources":["../../designsystem/tag/tag.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type TagProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As>;\n\ntype TagComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: TagProps<Href, As>,\n) => JSX.Element;\n\nexport const Tag: TagComponent = forwardRef<null>(function Tag<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>({ as, className, ...rest }: TagProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn <Tag className={clsx(styles.tag, className)} ref={ref} {...rest} />;\n}) as TagComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Tag","forwardRef","as","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAoBO,MAAMA,IAAoBC,EAAiB,SAGhD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA4BC,GAA0B;AAC3E,QAAML,IAAME,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAE,EAACN,GAAA,EAAI,WAAWO,EAAKC,EAAO,KAAKL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AACzE,CAAC;"}
1
+ {"version":3,"file":"tag.js","sources":["../../designsystem/tag/tag.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type TagProps<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n> = PolymorphicComponentPropWithRef<As, { 'data-icon'?: 'none' }>;\n\ntype TagComponent = <\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>(\n\tprops: TagProps<Href, As>,\n) => JSX.Element;\n\nexport const Tag: TagComponent = forwardRef<null>(function Tag<\n\tHref,\n\tAs extends React.ElementType = Href extends string ? \"a\" : \"span\",\n>({ as, className, ...rest }: TagProps<Href, As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || (rest.href ? \"a\" : \"span\");\n\n\treturn <Tag className={clsx(styles.tag, className)} ref={ref} {...rest} />;\n}) as TagComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Tag","forwardRef","as","className","rest","ref","jsx","clsx","styles"],"mappings":";;;;AAoBO,MAAMA,IAAoBC,EAAiB,SAGhD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA4BC,GAA0B;AAC3E,QAAML,IAAME,MAAOE,EAAK,OAAO,MAAM;AAErC,SAAO,gBAAAE,EAACN,GAAA,EAAI,WAAWO,EAAKC,EAAO,KAAKL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AACzE,CAAC;"}
@@ -13,7 +13,9 @@ export declare const Muted: MutedComponent;
13
13
  export type IngressProps<As extends React.ElementType = "span"> = PolymorphicComponentPropWithRef<As>;
14
14
  type IngressComponent = <As extends React.ElementType = "span">(props: MutedProps<As>) => JSX.Element;
15
15
  export declare const Ingress: IngressComponent;
16
- export type InfoProps<As extends React.ElementType = "span"> = PolymorphicComponentPropWithRef<As>;
16
+ export type InfoProps<As extends React.ElementType = "span"> = PolymorphicComponentPropWithRef<As, {
17
+ "data-variant"?: "regular" | "circle";
18
+ }>;
17
19
  type InfoComponent = <As extends React.ElementType = "span">(props: MutedProps<As>) => JSX.Element;
18
20
  export declare const Info: InfoComponent;
19
21
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"typography.js","sources":["../../designsystem/typography/typography.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type HeadingSizes = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type HeadingProps<As extends React.ElementType = \"h2\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-size\"?: HeadingSizes;\n\t\t\t\"data-justify\"?: \"start\" | \"center\";\n\t\t}\n\t>;\n\ntype HeadingComponent = <As extends React.ElementType = \"h2\">(\n\tprops: HeadingProps<As>,\n) => JSX.Element;\n\nexport const Heading: HeadingComponent = forwardRef<null>(function Heading<\n\tAs extends React.ElementType = \"h2\",\n>({ as, className, ...rest }: HeadingProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"h2\";\n\n\treturn (\n\t\t<Tag className={clsx(styles.heading, className)} ref={ref} {...rest} />\n\t);\n}) as HeadingComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type MutedProps<As extends React.ElementType = \"small\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype MutedComponent = <As extends React.ElementType = \"small\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Muted: MutedComponent = forwardRef<null>(function Muted<\n\tAs extends React.ElementType = \"small\",\n>({ as, className, ...rest }: MutedProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"small\";\n\treturn <Tag className={clsx(styles.muted, className)} ref={ref} {...rest} />;\n}) as MutedComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type IngressProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype IngressComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Ingress: IngressComponent = forwardRef<null>(function Ingress<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: IngressProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn (\n\t\t<Tag className={clsx(styles.ingress, className)} ref={ref} {...rest} />\n\t);\n}) as IngressComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type InfoProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype InfoComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Info: InfoComponent = forwardRef<null>(function Info<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: InfoProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn <Tag className={clsx(styles.info, className)} ref={ref} {...rest} />;\n}) as InfoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Heading","forwardRef","as","className","rest","ref","jsx","clsx","styles","Muted","Ingress","Info"],"mappings":";;;;AAsBO,MAAMA,IAA4BC,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAGzE,SACC,gBAAAC,EAHWJ,KAAM,MAGhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GASYK,IAAwBR,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AAEvE,SAAO,gBAAAC,EADKJ,KAAM,SACV,EAAI,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC,GASYM,IAA4BT,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAEzE,SACC,gBAAAC,EAFWJ,KAAM,QAEhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GASYO,IAAsBV,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAuBC,GAA0B;AAEtE,SAAO,gBAAAC,EADKJ,KAAM,QACV,EAAI,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC;"}
1
+ {"version":3,"file":"typography.js","sources":["../../designsystem/typography/typography.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, type JSX } from \"react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\n\nexport type HeadingSizes = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\nexport type HeadingProps<As extends React.ElementType = \"h2\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{\n\t\t\t\"data-size\"?: HeadingSizes;\n\t\t\t\"data-justify\"?: \"start\" | \"center\";\n\t\t}\n\t>;\n\ntype HeadingComponent = <As extends React.ElementType = \"h2\">(\n\tprops: HeadingProps<As>,\n) => JSX.Element;\n\nexport const Heading: HeadingComponent = forwardRef<null>(function Heading<\n\tAs extends React.ElementType = \"h2\",\n>({ as, className, ...rest }: HeadingProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"h2\";\n\n\treturn (\n\t\t<Tag className={clsx(styles.heading, className)} ref={ref} {...rest} />\n\t);\n}) as HeadingComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type MutedProps<As extends React.ElementType = \"small\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype MutedComponent = <As extends React.ElementType = \"small\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Muted: MutedComponent = forwardRef<null>(function Muted<\n\tAs extends React.ElementType = \"small\",\n>({ as, className, ...rest }: MutedProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"small\";\n\treturn <Tag className={clsx(styles.muted, className)} ref={ref} {...rest} />;\n}) as MutedComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type IngressProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<As>;\n\ntype IngressComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Ingress: IngressComponent = forwardRef<null>(function Ingress<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: IngressProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn (\n\t\t<Tag className={clsx(styles.ingress, className)} ref={ref} {...rest} />\n\t);\n}) as IngressComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type InfoProps<As extends React.ElementType = \"span\"> =\n\tPolymorphicComponentPropWithRef<\n\t\tAs,\n\t\t{ \"data-variant\"?: \"regular\" | \"circle\" }\n\t>;\n\ntype InfoComponent = <As extends React.ElementType = \"span\">(\n\tprops: MutedProps<As>,\n) => JSX.Element;\n\nexport const Info: InfoComponent = forwardRef<null>(function Info<\n\tAs extends React.ElementType = \"span\",\n>({ as, className, ...rest }: InfoProps<As>, ref?: PolymorphicRef<As>) {\n\tconst Tag = as || \"span\";\n\treturn <Tag className={clsx(styles.info, className)} ref={ref} {...rest} />;\n}) as InfoComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n"],"names":["Heading","forwardRef","as","className","rest","ref","jsx","clsx","styles","Muted","Ingress","Info"],"mappings":";;;;AAsBO,MAAMA,IAA4BC,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAGzE,SACC,gBAAAC,EAHWJ,KAAM,MAGhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GASYK,IAAwBR,EAAiB,SAEpD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAwBC,GAA0B;AAEvE,SAAO,gBAAAC,EADKJ,KAAM,SACV,EAAI,WAAWK,EAAKC,EAAO,OAAOL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC3E,CAAC,GASYM,IAA4BT,EAAiB,SAExD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAA0BC,GAA0B;AAEzE,SACC,gBAAAC,EAFWJ,KAAM,QAEhB,EAAI,WAAWK,EAAKC,EAAO,SAASL,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAEvE,CAAC,GAYYO,IAAsBV,EAAiB,SAElD,EAAE,IAAAC,GAAI,WAAAC,GAAW,GAAGC,EAAA,GAAuBC,GAA0B;AAEtE,SAAO,gBAAAC,EADKJ,KAAM,QACV,EAAI,WAAWK,EAAKC,EAAO,MAAML,CAAS,GAAG,KAAAE,GAAW,GAAGD,EAAA,CAAM;AAC1E,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattilsynet/design",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "type": "module",
5
5
  "main": "./mtds/index.js",
6
6
  "types": "./mtds/index.d.ts",
@@ -41,36 +41,36 @@
41
41
  "storybook:build": "npm run build && storybook build"
42
42
  },
43
43
  "devDependencies": {
44
- "@biomejs/biome": "^2.2.0",
45
- "@digdir/designsystemet": "^1.1.10",
46
- "@digdir/designsystemet-css": "^1.1.10",
44
+ "@biomejs/biome": "^2.2.2",
45
+ "@digdir/designsystemet": "^1.3.0",
46
+ "@digdir/designsystemet-css": "^1.2.0",
47
47
  "@phosphor-icons/core": "^2.1.1",
48
48
  "@phosphor-icons/react": "^2.1.10",
49
- "@storybook/addon-docs": "^9.1.2",
50
- "@storybook/addon-themes": "^9.1.2",
51
- "@storybook/react-vite": "^9.1.2",
49
+ "@storybook/addon-docs": "^9.1.3",
50
+ "@storybook/addon-themes": "^9.1.3",
51
+ "@storybook/react-vite": "^9.1.3",
52
52
  "@tanstack/react-table": "^8.21.3",
53
53
  "@types/node": "^24.3.0",
54
- "@types/react": "^19.1.10",
55
- "@types/react-dom": "^19.1.7",
54
+ "@types/react": "^19.1.11",
55
+ "@types/react-dom": "^19.1.8",
56
56
  "@vitejs/plugin-react": "^5.0.1",
57
57
  "fast-glob": "^3.3.3",
58
58
  "postcss": "^8.5.6",
59
59
  "postcss-nesting": "^13.0.2",
60
60
  "react": "^19.1.1",
61
61
  "react-dom": "^19.1.1",
62
- "storybook": "^9.1.2",
62
+ "storybook": "^9.1.3",
63
63
  "typescript": "^5.9.2",
64
64
  "vite": "^7.1.3",
65
65
  "vite-plugin-dts": "^4.5.4"
66
66
  },
67
67
  "dependencies": {
68
- "@floating-ui/dom": "^1.7.3",
69
- "@u-elements/u-combobox": "^1.0.0",
70
- "@u-elements/u-datalist": "^1.0.13",
71
- "@u-elements/u-details": "^0.1.2",
72
- "@u-elements/u-progress": "^0.0.5",
73
- "@u-elements/u-tabs": "^0.0.9",
68
+ "@floating-ui/dom": "^1.7.4",
69
+ "@u-elements/u-combobox": "^1.0.1",
70
+ "@u-elements/u-datalist": "^1.0.14",
71
+ "@u-elements/u-details": "^0.1.3",
72
+ "@u-elements/u-progress": "^0.0.6",
73
+ "@u-elements/u-tabs": "^0.0.12",
74
74
  "clsx": "^2.1.1"
75
75
  },
76
76
  "overrides": {