@mattilsynet/design 2.1.12 → 2.2.1

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 (92) hide show
  1. package/mtds/_virtual/client.js +6 -0
  2. package/mtds/_virtual/client.js.map +1 -0
  3. package/mtds/_virtual/client2.js +5 -0
  4. package/mtds/_virtual/client2.js.map +1 -0
  5. package/mtds/_virtual/index.js +5 -0
  6. package/mtds/_virtual/index.js.map +1 -0
  7. package/mtds/_virtual/react-dom-client.development.js +5 -0
  8. package/mtds/_virtual/react-dom-client.development.js.map +1 -0
  9. package/mtds/_virtual/react-dom-client.production.js +5 -0
  10. package/mtds/_virtual/react-dom-client.production.js.map +1 -0
  11. package/mtds/_virtual/scheduler.development.js +5 -0
  12. package/mtds/_virtual/scheduler.development.js.map +1 -0
  13. package/mtds/_virtual/scheduler.production.js +5 -0
  14. package/mtds/_virtual/scheduler.production.js.map +1 -0
  15. package/mtds/analytics/analytics.js +16 -14
  16. package/mtds/analytics/analytics.js.map +1 -1
  17. package/mtds/app/app-observer.js +1 -1
  18. package/mtds/app/app-toggle.js +10 -26
  19. package/mtds/app/app-toggle.js.map +1 -1
  20. package/mtds/app/app-toggle2.js +26 -10
  21. package/mtds/app/app-toggle2.js.map +1 -1
  22. package/mtds/app/app.js +4 -3
  23. package/mtds/app/app.js.map +1 -1
  24. package/mtds/button/button.d.ts +2 -1
  25. package/mtds/button/button.js +12 -12
  26. package/mtds/button/button.js.map +1 -1
  27. package/mtds/chart/chart-element.d.ts +5 -4
  28. package/mtds/chart/chart-element.js +111 -0
  29. package/mtds/chart/chart-element.js.map +1 -0
  30. package/mtds/chart/chart.d.ts +6 -0
  31. package/mtds/chart/chart.module.css.js +325 -0
  32. package/mtds/chart/chart.module.css.js.map +1 -0
  33. package/mtds/chart/chart.stories.d.ts +10 -0
  34. package/mtds/external/@u-elements/u-details/dist/u-details.js +1 -1
  35. package/mtds/external/@u-elements/u-details/dist/u-details.js.map +1 -1
  36. package/mtds/external/react-dom/cjs/react-dom-client.development.js +15323 -0
  37. package/mtds/external/react-dom/cjs/react-dom-client.development.js.map +1 -0
  38. package/mtds/external/react-dom/cjs/react-dom-client.production.js +9409 -0
  39. package/mtds/external/react-dom/cjs/react-dom-client.production.js.map +1 -0
  40. package/mtds/external/react-dom/client.js +24 -0
  41. package/mtds/external/react-dom/client.js.map +1 -0
  42. package/mtds/external/scheduler/cjs/scheduler.development.js +237 -0
  43. package/mtds/external/scheduler/cjs/scheduler.development.js.map +1 -0
  44. package/mtds/external/scheduler/cjs/scheduler.production.js +234 -0
  45. package/mtds/external/scheduler/cjs/scheduler.production.js.map +1 -0
  46. package/mtds/external/scheduler/index.js +11 -0
  47. package/mtds/external/scheduler/index.js.map +1 -0
  48. package/mtds/field/field.js +36 -35
  49. package/mtds/field/field.js.map +1 -1
  50. package/mtds/illustrations/bunny.svg +1 -0
  51. package/mtds/illustrations/eagle.svg +1 -0
  52. package/mtds/illustrations/index.json +22 -2
  53. package/mtds/illustrations/moose.svg +1 -0
  54. package/mtds/illustrations/polarbear.svg +1 -0
  55. package/mtds/illustrations/puppy.svg +1 -0
  56. package/mtds/index.d.ts +7 -5
  57. package/mtds/index.iife.js +335 -15
  58. package/mtds/index.js +19 -15
  59. package/mtds/index.js.map +1 -1
  60. package/mtds/package.json.js +1 -1
  61. package/mtds/pagination/pagination.js +3 -2
  62. package/mtds/pagination/pagination.js.map +1 -1
  63. package/mtds/popover/popover-observer.js +24 -23
  64. package/mtds/popover/popover-observer.js.map +1 -1
  65. package/mtds/react.d.ts +1 -0
  66. package/mtds/react.js +16 -14
  67. package/mtds/react.js.map +1 -1
  68. package/mtds/styles.css +1 -1
  69. package/mtds/styles.json +41 -40
  70. package/mtds/styles.module.css.js +100 -92
  71. package/mtds/styles.module.css.js.map +1 -1
  72. package/mtds/table/table-observer.js +20 -15
  73. package/mtds/table/table-observer.js.map +1 -1
  74. package/mtds/table/table.d.ts +2 -2
  75. package/mtds/table/table.js.map +1 -1
  76. package/mtds/table/table.stories.d.ts +5 -4
  77. package/mtds/tailwind.css +1 -0
  78. package/mtds/toast/toast-helper.d.ts +11 -0
  79. package/mtds/toast/toast-helper.js +14 -0
  80. package/mtds/toast/toast-helper.js.map +1 -0
  81. package/mtds/toast/toast-observer.js +19 -0
  82. package/mtds/toast/toast-observer.js.map +1 -0
  83. package/mtds/toast/toast.d.ts +10 -2
  84. package/mtds/toast/toast.js +39 -0
  85. package/mtds/toast/toast.js.map +1 -0
  86. package/mtds/toast/toast.stories.d.ts +19 -0
  87. package/mtds/utils.d.ts +0 -7
  88. package/mtds/utils.js +36 -37
  89. package/mtds/utils.js.map +1 -1
  90. package/package.json +21 -14
  91. package/mtds/chart/chart-doughnut.d.ts +0 -1
  92. /package/mtds/{chart/chart-axis.d.ts → toast/toast-observer.d.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { jsx as t, Fragment as I, jsxs as j } from "react/jsx-runtime";
2
2
  import { clsx as k } from "../external/clsx/dist/clsx.js";
3
- import { forwardRef as c, useRef as z, useImperativeHandle as K, useEffect as M } from "react";
3
+ import { forwardRef as m, useRef as z, useImperativeHandle as K, useEffect as M } from "react";
4
4
  import "../alert/alert.js";
5
5
  import "../app/app.js";
6
6
  import "../avatar/avatar.js";
@@ -28,16 +28,17 @@ import "../steps/steps.js";
28
28
  import "../table/table.js";
29
29
  import "../tabs/tabs.js";
30
30
  import "../tag/tag.js";
31
+ import "../toast/toast.js";
31
32
  import "../togglegroup/togglegroup.js";
32
33
  import "../typography/typography.js";
33
34
  import "../validation/validation.js";
34
35
  import g from "../styles.module.css.js";
35
36
  import { toCustomElementProps as N } from "../utils.js";
36
- const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = c(function({
37
- "data-size": o,
38
- as: e,
37
+ const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = m(function({
38
+ "data-size": e,
39
+ as: o,
39
40
  className: a,
40
- count: m,
41
+ count: c,
41
42
  description: u,
42
43
  error: F,
43
44
  helpText: y,
@@ -49,16 +50,16 @@ const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = c(functi
49
50
  validation: C,
50
51
  ...r
51
52
  }, v) {
52
- const l = e || "div", E = !!h || !!b, W = C || F, O = {
53
- "data-size": o,
53
+ const l = o || "div", E = !!h || !!b, W = C || F, O = {
54
+ "data-size": e,
54
55
  className: k(g.field, a),
55
56
  style: D
56
57
  };
57
- return e === "select" && !r.children && Object.assign(r, {
58
+ return o === "select" && !r.children && Object.assign(r, {
58
59
  options: void 0,
59
60
  // Ensure options is not passed to DOM
60
61
  children: /* @__PURE__ */ t(I, { children: r.options?.map(P).map(({ label: x, value: p }) => /* @__PURE__ */ t("option", { value: p, children: x }, p)) })
61
- }), e ? /* @__PURE__ */ j("div", { ...O, children: [
62
+ }), o ? /* @__PURE__ */ j("div", { ...O, children: [
62
63
  !!f && /* @__PURE__ */ t("label", { suppressHydrationWarning: !0, children: f }),
63
64
  !!y && /* @__PURE__ */ t(Q, { "aria-label": H, children: y }),
64
65
  !!u && /* @__PURE__ */ t("p", { suppressHydrationWarning: !0, children: u }),
@@ -77,40 +78,40 @@ const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = c(functi
77
78
  ] }) : /* @__PURE__ */ t(
78
79
  l,
79
80
  {
80
- className: typeof e == "string" ? g.input : void 0,
81
+ className: typeof o == "string" ? g.input : void 0,
81
82
  suppressHydrationWarning: !0,
82
83
  ref: v,
83
84
  ...r
84
85
  }
85
86
  ),
86
87
  !!W && /* @__PURE__ */ t("div", { suppressHydrationWarning: !0, className: g.validation, children: W }),
87
- !!m && /* @__PURE__ */ t("p", { suppressHydrationWarning: !0, "data-count": m })
88
+ !!c && /* @__PURE__ */ t("p", { suppressHydrationWarning: !0, "data-count": c })
88
89
  ] }) : /* @__PURE__ */ t("div", { ref: v, ...O, ...r });
89
- }), S = c(
90
- function({ className: o, ...e }, a) {
91
- return /* @__PURE__ */ t("div", { className: k(g.affixes, o), ref: a, ...e });
90
+ }), S = m(
91
+ function({ className: e, ...o }, a) {
92
+ return /* @__PURE__ */ t("div", { className: k(g.affixes, e), ref: a, ...o });
92
93
  }
93
- ), T = c(
94
- function({ "data-nofilter": o, ...e }, a) {
94
+ ), T = m(
95
+ function({ "data-nofilter": e, ...o }, a) {
95
96
  return /* @__PURE__ */ t(
96
97
  "u-datalist",
97
98
  {
98
- "data-nofilter": !!o || void 0,
99
+ "data-nofilter": !!e || void 0,
99
100
  ref: a,
100
- ...N(e)
101
+ ...N(o)
101
102
  }
102
103
  );
103
104
  }
104
- ), q = c(
105
- function(o, e) {
106
- return /* @__PURE__ */ t("u-option", { ref: e, ...N(o) });
105
+ ), q = m(
106
+ function(e, o) {
107
+ return /* @__PURE__ */ t("u-option", { ref: o, ...N(e) });
107
108
  }
108
- ), X = c(
109
+ ), X = m(
109
110
  function({
110
- "data-multiple": o,
111
- "data-nofilter": e,
111
+ "data-multiple": e,
112
+ "data-nofilter": o,
112
113
  "data-position": a,
113
- onAfterChange: m,
114
+ onAfterChange: c,
114
115
  onAfterSelect: u,
115
116
  onBeforeChange: F,
116
117
  onBeforeMatch: y,
@@ -127,7 +128,7 @@ const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = c(functi
127
128
  ...W
128
129
  }, O) {
129
130
  const x = z(null), p = z(f);
130
- return p.current = f, m && (u = m, console.warn(
131
+ return p.current = f, c && (u = c, console.warn(
131
132
  "Combobox onAfterChange is deprecated, use onAfterSelect instead."
132
133
  )), F && (H = F, console.warn(
133
134
  "Combobox onBeforeChange is deprecated, use onBeforeSelect instead."
@@ -137,13 +138,13 @@ const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = c(functi
137
138
  if (!p) return;
138
139
  n.preventDefault();
139
140
  const { isConnected: B, textContent: G, value: w } = n.detail, A = G?.trim() || "", R = l || [];
140
- L?.(B ? R.filter((J) => J.value !== w) : o ? [...R, { value: w, label: A }] : [{ value: w, label: A }]);
141
+ L?.(B ? R.filter((J) => J.value !== w) : e ? [...R, { value: w, label: A }] : [{ value: w, label: A }]);
141
142
  };
142
143
  return d?.addEventListener("comboboxbeforeselect", s), () => d?.removeEventListener("comboboxbeforeselect", s);
143
- }, [o, l]), /* @__PURE__ */ j(
144
+ }, [e, l]), /* @__PURE__ */ j(
144
145
  "u-combobox",
145
146
  {
146
- "data-multiple": o || void 0,
147
+ "data-multiple": e || void 0,
147
148
  ...N({
148
149
  oncomboboxbeforeselect: H,
149
150
  oncomboboxbeforematch: y,
@@ -166,24 +167,24 @@ const P = (i) => typeof i == "string" ? { label: i, value: i } : i, V = c(functi
166
167
  ),
167
168
  /* @__PURE__ */ t("del", { ...N({ "aria-label": "Fjern tekst" }) })
168
169
  ] }),
169
- !!C && /* @__PURE__ */ t(T, { "data-nofilter": e, "data-position": a, children: C.map(P).map(({ children: d, label: s, value: n }) => /* @__PURE__ */ t(q, { value: n, label: s, children: d ?? s }, n)) })
170
+ !!C && /* @__PURE__ */ t(T, { "data-nofilter": o, "data-position": a, children: C.map(P).map(({ children: d, label: s, value: n }) => /* @__PURE__ */ t(q, { value: n, label: s, children: d ?? s }, n)) })
170
171
  ]
171
172
  }
172
173
  );
173
174
  }
174
- ), wt = Object.assign(V, {
175
+ ), At = Object.assign(V, {
175
176
  Affixes: S,
176
177
  Combobox: X,
177
178
  Datalist: T,
178
179
  Option: q,
179
- Label: c(
180
- function(o, e) {
181
- return /* @__PURE__ */ t("label", { suppressHydrationWarning: !0, ref: e, ...o });
180
+ Label: m(
181
+ function(e, o) {
182
+ return /* @__PURE__ */ t("label", { suppressHydrationWarning: !0, ref: o, ...e });
182
183
  }
183
184
  )
184
185
  });
185
186
  export {
186
- wt as Field,
187
+ At as Field,
187
188
  V as FieldComp
188
189
  };
189
190
  //# sourceMappingURL=field.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../designsystem/field/field.tsx"],"sourcesContent":["import type { Placement } from \"@floating-ui/dom\";\nimport type {\n\tReactUcombobox,\n\tUHTMLComboboxElement,\n} from \"@u-elements/u-combobox\";\nimport clsx from \"clsx\";\nimport type { JSX } from \"react\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef } from \"react\";\nimport { HelpText, Input, type InputProps } from \"../react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\ntype FieldBaseProps = {\n\tcount?: number;\n\tdescription?: React.ReactNode;\n\terror?: React.ReactNode; // Kept for backwards compatibility\n\thelpText?: React.ReactNode;\n\thelpTextLabel?: string;\n\tlabel?: React.ReactNode;\n\toptions?: string[] | FieldComboboxSelected;\n\tprefix?: string;\n\treadOnly?: boolean; // Allow readoOnly also on <select>\n\tsuffix?: string;\n\tvalidation?: React.ReactNode;\n\tvalue?: React.ComponentPropsWithRef<\"input\">[\"value\"];\n\tonInput?: (\n\t\te: React.ChangeEvent<\n\t\t\tHTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\t\t>,\n\t) => void;\n};\n\nexport type FieldProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, FieldBaseProps>;\n\ntype FieldComponent = <As extends React.ElementType = \"div\">(\n\tprops: FieldProps<As>,\n) => JSX.Element;\n\nconst toOption = (\n\to: FieldComboboxSelected[number] | string,\n): FieldComboboxSelected[number] =>\n\ttypeof o === \"string\" ? { label: o, value: o } : o;\n\nexport const FieldComp: FieldComponent = forwardRef<null>(function Field<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{\n\t\t\"data-size\": size,\n\t\tas,\n\t\tclassName,\n\t\tcount,\n\t\tdescription,\n\t\terror,\n\t\thelpText,\n\t\thelpTextLabel,\n\t\tlabel,\n\t\tprefix,\n\t\tstyle,\n\t\tsuffix,\n\t\tvalidation,\n\t\t...rest\n\t}: FieldProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\tconst affixes = !!suffix || !!prefix;\n\tconst valid = validation || error; // error kept for backwards compatibility\n\tconst shared = {\n\t\t\"data-size\": size,\n\t\tclassName: clsx(styles.field, className),\n\t\tstyle,\n\t};\n\n\t// Render options if select\n\tif (as === \"select\" && !rest.children)\n\t\tObject.assign(rest, {\n\t\t\toptions: undefined, // Ensure options is not passed to DOM\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{(rest.options as FieldBaseProps[\"options\"])\n\t\t\t\t\t\t?.map(toOption)\n\t\t\t\t\t\t.map(({ label, value }) => (\n\t\t\t\t\t\t\t<option key={value} value={value}>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t</>\n\t\t\t),\n\t\t});\n\n\t// Using suppressHydrationWarning to avoid Next.js vs field-observer.ts hydration conflict\n\treturn as ? (\n\t\t<div {...shared}>\n\t\t\t{!!label && <label suppressHydrationWarning>{label}</label>}\n\t\t\t{!!helpText && <HelpText aria-label={helpTextLabel}>{helpText}</HelpText>}\n\t\t\t{!!description && <p suppressHydrationWarning>{description}</p>}\n\t\t\t{affixes ? (\n\t\t\t\t<FieldAffixes>\n\t\t\t\t\t{!!prefix && <span>{prefix}</span>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t{...rest}\n\t\t\t\t\t/>\n\t\t\t\t\t{!!suffix && <span>{suffix}</span>}\n\t\t\t\t</FieldAffixes>\n\t\t\t) : (\n\t\t\t\t<Tag\n\t\t\t\t\tclassName={typeof as === \"string\" ? styles.input : undefined}\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!valid && (\n\t\t\t\t<div suppressHydrationWarning className={styles.validation}>\n\t\t\t\t\t{valid}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!!count && <p suppressHydrationWarning data-count={count} />}\n\t\t</div>\n\t) : (\n\t\t<div ref={ref} {...shared} {...rest} />\n\t);\n}) as FieldComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type FieldAffixProps = React.ComponentPropsWithoutRef<\"div\">;\nconst FieldAffixes = forwardRef<HTMLDivElement, FieldAffixProps>(\n\tfunction FieldAffixes({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<div className={clsx(styles.affixes, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n\nexport type FieldDatalistProps = React.ComponentPropsWithoutRef<\"datalist\"> & {\n\t\"data-nofilter\"?: boolean;\n\t\"data-position\"?: Placement;\n};\n\nconst FieldDatalist = forwardRef<HTMLDataListElement, FieldDatalistProps>(\n\tfunction FieldDatalist({ \"data-nofilter\": filter, ...rest }, ref) {\n\t\treturn (\n\t\t\t<u-datalist\n\t\t\t\tdata-nofilter={!!filter || undefined} // Ensure data-nofilter is set correctly\n\t\t\t\tref={ref}\n\t\t\t\t{...toCustomElementProps(rest)}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nexport type FieldOptionProps = React.ComponentPropsWithoutRef<\"option\">;\nconst FieldOption = forwardRef<HTMLOptionElement, FieldOptionProps>(\n\tfunction FieldOption(props, ref) {\n\t\treturn <u-option ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldComboboxSelected = {\n\tlabel: string;\n\tvalue: string;\n\tchildren?: React.ReactNode;\n}[];\nexport type FieldComboboxProps = ReactUcombobox & {\n\t\"data-creatable\"?: boolean;\n\t\"data-multiple\"?: boolean;\n\tonAfterChange?: (e: CustomEvent<HTMLDataElement>) => void; // deprecated\n\tonAfterSelect?: (e: CustomEvent<HTMLDataElement>) => void; // Custom event to handle before change\n\tonBeforeChange?: (e: CustomEvent<HTMLDataElement>) => void; // deprecated\n\tonBeforeMatch?: (e: CustomEvent<HTMLOptionElement>) => void; // Custom event to handle before change\n\tonBeforeSelect?: (e: CustomEvent<HTMLDataElement>) => void; // Custom event to handle before change\n\tonSelectedChange?: (selected: FieldComboboxSelected) => void; // Allow onChange to be a function that returns void\n\toptions?: FieldComboboxSelected;\n\tselected?: FieldComboboxSelected; // Allow value to be a string or an array of strings for multiple select\n} & Pick<\n\t\tInputProps,\n\t\t\"disabled\" | \"readOnly\" | \"placeholder\" | \"type\" | \"name\"\n\t> & // Allow input props to be passed down\n\tPick<FieldDatalistProps, \"data-position\" | \"data-nofilter\">; // Allow datalist props to be passed down\n\nconst FieldCombobox = forwardRef<UHTMLComboboxElement, FieldComboboxProps>(\n\tfunction FieldCombobox(\n\t\t{\n\t\t\t\"data-multiple\": multiple,\n\t\t\t\"data-nofilter\": nofilter,\n\t\t\t\"data-position\": position,\n\t\t\tonAfterChange,\n\t\t\tonAfterSelect,\n\t\t\tonBeforeChange,\n\t\t\tonBeforeMatch,\n\t\t\tonBeforeSelect,\n\t\t\tonSelectedChange,\n\t\t\tchildren,\n\t\t\tdisabled,\n\t\t\tname,\n\t\t\toptions,\n\t\t\tplaceholder,\n\t\t\treadOnly,\n\t\t\tselected,\n\t\t\ttype,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst innerRef = useRef<UHTMLComboboxElement>(null);\n\t\tconst onSelected = useRef(onSelectedChange);\n\t\tonSelected.current = onSelectedChange; // Sync the latest onSelectedChange function\n\n\t\t// Deprecated props\n\t\tif (onAfterChange) {\n\t\t\tonAfterSelect = onAfterChange;\n\t\t\tconsole.warn(\n\t\t\t\t`Combobox onAfterChange is deprecated, use onAfterSelect instead.`,\n\t\t\t);\n\t\t}\n\t\tif (onBeforeChange) {\n\t\t\tonBeforeSelect = onBeforeChange;\n\t\t\tconsole.warn(\n\t\t\t\t`Combobox onBeforeChange is deprecated, use onBeforeSelect instead.`,\n\t\t\t);\n\t\t}\n\n\t\t// Using useEffect for React 18 and lower compatibility\n\t\tuseImperativeHandle(ref, () => innerRef.current as UHTMLComboboxElement); // Forward innerRef\n\t\tuseEffect(() => {\n\t\t\tconst self = innerRef.current;\n\t\t\tconst handleChange = (event: CustomEvent<HTMLDataElement>) => {\n\t\t\t\tconst handleSelected = onSelected.current;\n\t\t\t\tif (!onSelected) return; // No onSelectedChange function provided, let u-combobox handle it\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst { isConnected: remove, textContent, value } = event.detail;\n\t\t\t\tconst label = textContent?.trim() || \"\";\n\t\t\t\tconst prev = selected || [];\n\n\t\t\t\tif (remove) handleSelected?.(prev.filter((i) => i.value !== value));\n\t\t\t\telse if (multiple) handleSelected?.([...prev, { value, label }]);\n\t\t\t\telse handleSelected?.([{ value, label }]);\n\t\t\t};\n\n\t\t\tself?.addEventListener(\"comboboxbeforeselect\", handleChange);\n\t\t\treturn () =>\n\t\t\t\tself?.removeEventListener(\"comboboxbeforeselect\", handleChange);\n\t\t}, [multiple, selected]);\n\n\t\treturn (\n\t\t\t<u-combobox\n\t\t\t\tdata-multiple={multiple || undefined}\n\t\t\t\t{...toCustomElementProps({\n\t\t\t\t\toncomboboxbeforeselect: onBeforeSelect,\n\t\t\t\t\toncomboboxbeforematch: onBeforeMatch,\n\t\t\t\t\toncomboboxafterselect: onAfterSelect,\n\t\t\t\t\tref: innerRef,\n\t\t\t\t\t...props,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selected?.map(({ children, label, value }) => (\n\t\t\t\t\t<data key={value} value={value} suppressHydrationWarning>\n\t\t\t\t\t\t{children ?? label}\n\t\t\t\t\t</data>\n\t\t\t\t))}\n\t\t\t\t{children || (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname={name}\n\t\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<del {...toCustomElementProps({ \"aria-label\": \"Fjern tekst\" })} />\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t{!!options && (\n\t\t\t\t\t<FieldDatalist data-nofilter={nofilter} data-position={position}>\n\t\t\t\t\t\t{options.map(toOption).map(({ children, label, value }) => (\n\t\t\t\t\t\t\t<FieldOption key={value} value={value} label={label}>\n\t\t\t\t\t\t\t\t{children ?? label}\n\t\t\t\t\t\t\t</FieldOption>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</FieldDatalist>\n\t\t\t\t)}\n\t\t\t</u-combobox>\n\t\t);\n\t},\n);\n\nexport type FieldLabelProps = React.ComponentPropsWithoutRef<\"label\">;\nexport const Field = Object.assign(FieldComp, {\n\tAffixes: FieldAffixes,\n\tCombobox: FieldCombobox,\n\tDatalist: FieldDatalist,\n\tOption: FieldOption,\n\tLabel: forwardRef<HTMLLabelElement, FieldLabelProps>(\n\t\tfunction FieldLabel(rest, ref) {\n\t\t\treturn <label suppressHydrationWarning ref={ref} {...rest} />;\n\t\t},\n\t),\n});\n"],"names":["toOption","o","FieldComp","forwardRef","size","as","className","count","description","error","helpText","helpTextLabel","label","prefix","style","suffix","validation","rest","ref","Tag","affixes","valid","shared","clsx","styles","value","jsx","jsxs","HelpText","FieldAffixes","FieldDatalist","filter","toCustomElementProps","FieldOption","props","FieldCombobox","multiple","nofilter","position","onAfterChange","onAfterSelect","onBeforeChange","onBeforeMatch","onBeforeSelect","onSelectedChange","children","disabled","name","options","placeholder","readOnly","selected","type","innerRef","useRef","onSelected","useImperativeHandle","useEffect","self","handleChange","event","handleSelected","remove","textContent","prev","i","Fragment","Input","Field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAMA,IAAW,CAChBC,MAEA,OAAOA,KAAM,WAAW,EAAE,OAAOA,GAAG,OAAOA,EAAA,IAAMA,GAErCC,IAA4BC,EAAiB,SAGzD;AAAA,EACC,aAAaC;AAAA,EACb,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,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SAAA,EAAM,0BAAwB,IAAC,KAAAA,GAAW,GAAGD,GAAM;AAAA,IAC5D;AAAA,EAAA;AAEF,CAAC;"}
1
+ {"version":3,"file":"field.js","sources":["../../designsystem/field/field.tsx"],"sourcesContent":["import type { Placement } from \"@floating-ui/dom\";\nimport type {\n\tReactUcombobox,\n\tUHTMLComboboxElement,\n} from \"@u-elements/u-combobox\";\nimport clsx from \"clsx\";\nimport type { JSX } from \"react\";\nimport { forwardRef, useEffect, useImperativeHandle, useRef } from \"react\";\nimport { HelpText, Input, type InputProps } from \"../react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\ntype FieldBaseProps = {\n\tcount?: number;\n\tdescription?: React.ReactNode;\n\terror?: React.ReactNode; // Kept for backwards compatibility\n\thelpText?: React.ReactNode;\n\thelpTextLabel?: string;\n\tlabel?: React.ReactNode;\n\toptions?: string[] | FieldComboboxSelected;\n\tprefix?: string;\n\treadOnly?: boolean; // Allow readoOnly also on <select>\n\tsuffix?: string;\n\tvalidation?: React.ReactNode;\n\tvalue?: React.ComponentPropsWithRef<\"input\">[\"value\"];\n\tonInput?: (\n\t\te: React.ChangeEvent<\n\t\t\tHTMLInputElement | HTMLSelectElement | HTMLTextAreaElement\n\t\t>,\n\t) => void;\n};\n\nexport type FieldProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, FieldBaseProps>;\n\ntype FieldComponent = <As extends React.ElementType = \"div\">(\n\tprops: FieldProps<As>,\n) => JSX.Element;\n\nconst toOption = (\n\to: FieldComboboxSelected[number] | string,\n): FieldComboboxSelected[number] =>\n\ttypeof o === \"string\" ? { label: o, value: o } : o;\n\nexport const FieldComp: FieldComponent = forwardRef<null>(function Field<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{\n\t\t\"data-size\": size,\n\t\tas,\n\t\tclassName,\n\t\tcount,\n\t\tdescription,\n\t\terror,\n\t\thelpText,\n\t\thelpTextLabel,\n\t\tlabel,\n\t\tprefix,\n\t\tstyle,\n\t\tsuffix,\n\t\tvalidation,\n\t\t...rest\n\t}: FieldProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\tconst affixes = !!suffix || !!prefix;\n\tconst valid = validation || error; // error kept for backwards compatibility\n\tconst shared = {\n\t\t\"data-size\": size,\n\t\tclassName: clsx(styles.field, className),\n\t\tstyle,\n\t};\n\n\t// Render options if select\n\tif (as === \"select\" && !rest.children)\n\t\tObject.assign(rest, {\n\t\t\toptions: undefined, // Ensure options is not passed to DOM\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{(rest.options as FieldBaseProps[\"options\"])\n\t\t\t\t\t\t?.map(toOption)\n\t\t\t\t\t\t.map(({ label, value }) => (\n\t\t\t\t\t\t\t<option key={value} value={value}>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t</>\n\t\t\t),\n\t\t});\n\n\t// Using suppressHydrationWarning to avoid Next.js vs field-observer.ts hydration conflict\n\treturn as ? (\n\t\t<div {...shared}>\n\t\t\t{!!label && <label suppressHydrationWarning>{label}</label>}\n\t\t\t{!!helpText && <HelpText aria-label={helpTextLabel}>{helpText}</HelpText>}\n\t\t\t{!!description && <p suppressHydrationWarning>{description}</p>}\n\t\t\t{affixes ? (\n\t\t\t\t<FieldAffixes>\n\t\t\t\t\t{!!prefix && <span>{prefix}</span>}\n\t\t\t\t\t<Tag\n\t\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\t\tref={ref}\n\t\t\t\t\t\t{...rest}\n\t\t\t\t\t/>\n\t\t\t\t\t{!!suffix && <span>{suffix}</span>}\n\t\t\t\t</FieldAffixes>\n\t\t\t) : (\n\t\t\t\t<Tag\n\t\t\t\t\tclassName={typeof as === \"string\" ? styles.input : undefined}\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!valid && (\n\t\t\t\t<div suppressHydrationWarning className={styles.validation}>\n\t\t\t\t\t{valid}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t\t{!!count && <p suppressHydrationWarning data-count={count} />}\n\t\t</div>\n\t) : (\n\t\t<div ref={ref} {...shared} {...rest} />\n\t);\n}) as FieldComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nexport type FieldAffixProps = React.ComponentPropsWithoutRef<\"div\">;\nconst FieldAffixes = forwardRef<HTMLDivElement, FieldAffixProps>(\n\tfunction FieldAffixes({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<div className={clsx(styles.affixes, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n\nexport type FieldDatalistProps = React.ComponentPropsWithoutRef<\"datalist\"> & {\n\t\"data-nofilter\"?: boolean;\n\t\"data-position\"?: Placement;\n};\n\nconst FieldDatalist = forwardRef<HTMLDataListElement, FieldDatalistProps>(\n\tfunction FieldDatalist({ \"data-nofilter\": filter, ...rest }, ref) {\n\t\treturn (\n\t\t\t<u-datalist\n\t\t\t\tdata-nofilter={!!filter || undefined} // Ensure data-nofilter is set correctly\n\t\t\t\tref={ref}\n\t\t\t\t{...toCustomElementProps(rest)}\n\t\t\t/>\n\t\t);\n\t},\n);\n\nexport type FieldOptionProps = React.ComponentPropsWithoutRef<\"option\">;\nconst FieldOption = forwardRef<HTMLOptionElement, FieldOptionProps>(\n\tfunction FieldOption(props, ref) {\n\t\treturn <u-option ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldComboboxSelected = {\n\tlabel: string;\n\tvalue: string;\n\tchildren?: React.ReactNode;\n}[];\nexport type FieldComboboxProps = ReactUcombobox & {\n\t\"data-creatable\"?: boolean;\n\t\"data-multiple\"?: boolean;\n\tonAfterChange?: (e: CustomEvent<HTMLDataElement>) => void; // deprecated\n\tonAfterSelect?: (e: CustomEvent<HTMLDataElement>) => void; // Custom event to handle before change\n\tonBeforeChange?: (e: CustomEvent<HTMLDataElement>) => void; // deprecated\n\tonBeforeMatch?: (e: CustomEvent<HTMLOptionElement>) => void; // Custom event to handle before change\n\tonBeforeSelect?: (e: CustomEvent<HTMLDataElement>) => void; // Custom event to handle before change\n\tonSelectedChange?: (selected: FieldComboboxSelected) => void; // Allow onChange to be a function that returns void\n\toptions?: FieldComboboxSelected;\n\tselected?: FieldComboboxSelected; // Allow value to be a string or an array of strings for multiple select\n} & Pick<\n\t\tInputProps,\n\t\t\"disabled\" | \"readOnly\" | \"placeholder\" | \"type\" | \"name\"\n\t> & // Allow input props to be passed down\n\tPick<FieldDatalistProps, \"data-position\" | \"data-nofilter\">; // Allow datalist props to be passed down\n\nconst FieldCombobox = forwardRef<UHTMLComboboxElement, FieldComboboxProps>(\n\tfunction FieldCombobox(\n\t\t{\n\t\t\t\"data-multiple\": multiple,\n\t\t\t\"data-nofilter\": nofilter,\n\t\t\t\"data-position\": position,\n\t\t\tonAfterChange,\n\t\t\tonAfterSelect,\n\t\t\tonBeforeChange,\n\t\t\tonBeforeMatch,\n\t\t\tonBeforeSelect,\n\t\t\tonSelectedChange,\n\t\t\tchildren,\n\t\t\tdisabled,\n\t\t\tname,\n\t\t\toptions,\n\t\t\tplaceholder,\n\t\t\treadOnly,\n\t\t\tselected,\n\t\t\ttype,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) {\n\t\tconst innerRef = useRef<UHTMLComboboxElement>(null);\n\t\tconst onSelected = useRef(onSelectedChange);\n\t\tonSelected.current = onSelectedChange; // Sync the latest onSelectedChange function\n\n\t\t// Deprecated props\n\t\tif (onAfterChange) {\n\t\t\tonAfterSelect = onAfterChange;\n\t\t\tconsole.warn(\n\t\t\t\t`Combobox onAfterChange is deprecated, use onAfterSelect instead.`,\n\t\t\t);\n\t\t}\n\t\tif (onBeforeChange) {\n\t\t\tonBeforeSelect = onBeforeChange;\n\t\t\tconsole.warn(\n\t\t\t\t`Combobox onBeforeChange is deprecated, use onBeforeSelect instead.`,\n\t\t\t);\n\t\t}\n\n\t\t// Using useEffect for React 18 and lower compatibility\n\t\tuseImperativeHandle(ref, () => innerRef.current as UHTMLComboboxElement); // Forward innerRef\n\t\tuseEffect(() => {\n\t\t\tconst self = innerRef.current;\n\t\t\tconst handleChange = (event: CustomEvent<HTMLDataElement>) => {\n\t\t\t\tconst handleSelected = onSelected.current;\n\t\t\t\tif (!onSelected) return; // No onSelectedChange function provided, let u-combobox handle it\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst { isConnected: remove, textContent, value } = event.detail;\n\t\t\t\tconst label = textContent?.trim() || \"\";\n\t\t\t\tconst prev = selected || [];\n\n\t\t\t\tif (remove) handleSelected?.(prev.filter((i) => i.value !== value));\n\t\t\t\telse if (multiple) handleSelected?.([...prev, { value, label }]);\n\t\t\t\telse handleSelected?.([{ value, label }]);\n\t\t\t};\n\n\t\t\tself?.addEventListener(\"comboboxbeforeselect\", handleChange);\n\t\t\treturn () =>\n\t\t\t\tself?.removeEventListener(\"comboboxbeforeselect\", handleChange);\n\t\t}, [multiple, selected]);\n\n\t\treturn (\n\t\t\t<u-combobox\n\t\t\t\tdata-multiple={multiple || undefined}\n\t\t\t\t{...toCustomElementProps({\n\t\t\t\t\toncomboboxbeforeselect: onBeforeSelect,\n\t\t\t\t\toncomboboxbeforematch: onBeforeMatch,\n\t\t\t\t\toncomboboxafterselect: onAfterSelect,\n\t\t\t\t\tref: innerRef,\n\t\t\t\t\t...props,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selected?.map(({ children, label, value }) => (\n\t\t\t\t\t<data key={value} value={value} suppressHydrationWarning>\n\t\t\t\t\t\t{children ?? label}\n\t\t\t\t\t</data>\n\t\t\t\t))}\n\t\t\t\t{children || (\n\t\t\t\t\t<>\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\tname={name}\n\t\t\t\t\t\t\ttype={type}\n\t\t\t\t\t\t\tdisabled={disabled}\n\t\t\t\t\t\t\treadOnly={readOnly}\n\t\t\t\t\t\t\tplaceholder={placeholder}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<del {...toCustomElementProps({ \"aria-label\": \"Fjern tekst\" })} />\n\t\t\t\t\t</>\n\t\t\t\t)}\n\t\t\t\t{!!options && (\n\t\t\t\t\t<FieldDatalist data-nofilter={nofilter} data-position={position}>\n\t\t\t\t\t\t{options.map(toOption).map(({ children, label, value }) => (\n\t\t\t\t\t\t\t<FieldOption key={value} value={value} label={label}>\n\t\t\t\t\t\t\t\t{children ?? label}\n\t\t\t\t\t\t\t</FieldOption>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</FieldDatalist>\n\t\t\t\t)}\n\t\t\t</u-combobox>\n\t\t);\n\t},\n);\n\nexport type FieldLabelProps = React.ComponentPropsWithoutRef<\"label\">;\nexport const Field = Object.assign(FieldComp, {\n\tAffixes: FieldAffixes,\n\tCombobox: FieldCombobox,\n\tDatalist: FieldDatalist,\n\tOption: FieldOption,\n\tLabel: forwardRef<HTMLLabelElement, FieldLabelProps>(\n\t\tfunction FieldLabel(rest, ref) {\n\t\t\treturn <label suppressHydrationWarning ref={ref} {...rest} />;\n\t\t},\n\t),\n});\n"],"names":["toOption","o","FieldComp","forwardRef","size","as","className","count","description","error","helpText","helpTextLabel","label","prefix","style","suffix","validation","rest","ref","Tag","affixes","valid","shared","clsx","styles","value","jsx","jsxs","HelpText","FieldAffixes","FieldDatalist","filter","toCustomElementProps","FieldOption","props","FieldCombobox","multiple","nofilter","position","onAfterChange","onAfterSelect","onBeforeChange","onBeforeMatch","onBeforeSelect","onSelectedChange","children","disabled","name","options","placeholder","readOnly","selected","type","innerRef","useRef","onSelected","useImperativeHandle","useEffect","self","handleChange","event","handleSelected","remove","textContent","prev","i","Fragment","Input","Field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAMA,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;AAAA,MAAA;AAAA,IAAA;AAAA,EAIJ;AACD,GAGa2C,KAAQ,OAAO,OAAOlE,GAAW;AAAA,EAC7C,SAAS2B;AAAA,EACT,UAAUM;AAAA,EACV,UAAUL;AAAA,EACV,QAAQG;AAAA,EACR,OAAO9B;AAAA,IACN,SAAoBc,GAAMC,GAAK;AAC9B,+BAAQ,SAAA,EAAM,0BAAwB,IAAC,KAAAA,GAAW,GAAGD,GAAM;AAAA,IAC5D;AAAA,EAAA;AAEF,CAAC;"}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="308" height="391" fill="none" viewBox="0 0 308 391"><path fill="#C58F79" d="M175.73 0c33.7 10.8 56.7 55.21 53.6 99.33.5 0 .8.2 1.2.2 16.4 4.1 33.41 4.7 47.01 15.7 6.3 5.3 24.2 29.2 27.9 36.7 12.4 25.11-23.5 35.62-40.6 42.82-.8 25 4.9 52.31-7.2 75.62-3.3 6.4-10.5 12.7-13.3 18.3-4.9 10.1-4.6 63.42-1 74.92 1.4 4.6 3.6 5.6 6.2 6h6.9c6.2 0 11.8 4.5 12.5 10.7.3 3.4-.7 6.5-2.5 8.8-.8 1.3-2.3 1.91-3.8 1.91h-31.7c-1.4-.1-3.1-1.2-3.1-1.2-6.8-3.7-12.1-10.2-15.1-20.2-5.6-18.31-7.6-40.32-10.9-59.32-1.71-1.7-11.71 6.3-13.31 8.1.1.2 9.6 24.4-11.4 44.01h11.4c9.4 0 17.5 7 18 16.3.2 3.5-.5 6.7-2.1 9.5-.8 1.5-2.6 2.5-4.3 2.5H79.01c-7.44 0-19.47-10.69-24.97-15.93A34.53 34.53 0 0 1 34 381.1C15.22 381.1 0 366.32 0 348.09c0-16.14 11.94-29.58 27.71-32.44-4.24-44.81 14.97-90.36 54.7-114 28.3-16.9 61.81-20.4 90.02-34.1 15.2-7.3 17.8-18.61 24.3-45.82-35.9-1-75.01-35.8-85.71-79.32h.6c25.9-4.2 54.8 10.9 75 35.61-12.2-22.2-17.4-50.91-11.3-78.02h.4Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="352" height="477" fill="none" viewBox="0 0 352 477"><path fill="#7F433B" d="M351.87 196.47c-.9 29.53-38.1 128.1-63.4 152.73-17.6 17.11-22.5 10.1-29.2 39.33-1 4.4-5.2 35.73-7.2 44.23-.6 3.5-2 6.81-4.2 9.71-1.4 1.8-3.2 3.1-5.1 4.3-1.4.8-2.9 1.4-4.2 2.2-.6.4-1.4.8-1.7 1.4-.4.7-.3 1.61-.3 2.31 0 .9-.2 5.6.1 6.9.8 2.9 5 3.7 7.5 4.2 3.7.81 18 2.31 26.3 4.21 4.8 1.2 6.4 5 6.4 6.4 0 1.4 0 2.61-2 2.61h-77.9c-3.5-.2-4.1-1.5-4.2-4.5 0-1.8-.6-5.2 4.2-5.5l18.8-2.11v-9.9c0-1.6.4-3.81-.6-5.11-1.3-1.6-3.8-2.2-5.5-3.1-2.3-1.3-4.7-2.7-6.3-4.9-2.6-3.61-4.1-8.01-4.1-12.52 0-4.5 1.4-9.1 0-13.51-2.2-3.7-4.9-4.2-8.9-4.5-4.5-.3-14.1.4-18.6.7-10.1 3.8-5.2 17.41-6.8 25.32-.8 4.2-3.2 8-6.6 10.6-2.5 1.9-6 2.7-8.3 4.81-1.8 1.7-1.2 10-1.2 11.41 2.3.3 13.5 1.7 21.8 3.6 4.8 1.2 6.4 5 6.4 6.4 0 1.4 0 2.61-2 2.61h-73.2c-2 0-1.9-1.2-2-2.6 0-1.4 1.6-5.2 6.4-6.4 8.3-1.9 19.5-3.31 21.8-3.71 0-2.7 0-10.1-.5-10.9-.5-.81-1.4-1.21-2.2-1.51-3-1.4-5.9-3.1-8.2-5.5-4.4-4.7-5.4-11.72-4.9-18.12.3-4 1.5-10.3-2.9-12.51-4.3-2.2-7.7 1.9-9.8 5.1-4.5 6.81-9 13.52-13.5 20.32-4.4 6.6-13.9 20.92-23.9 17.61-1.4-.5-2.7-1.2-3.9-2.2-8-6.3-11.7-22.01-11.8-30.42 0-3.1-.5-13.31 2.2-15.71-10.7 9.7-27.3 16.91-39 8.5-11-7.9-10.6-24.02-8.5-37.33 14.1-89.57 52.2-180.64 107.9-252.2 4.3-5.5 8.8-11.01 14.9-14.41 7-4 43.3-7.51 55.2-19.82 22.8-23.72 27.8-69.26 58.5-85.67 24-12.81 44.8-11.8 69.3-.7 5.4 2.4 32.9 17.51 35.5 20.62 7.8 9.5 5.6 22.21 3.2 33.22h-6.8c-.2-5.7-3.4-8.6-5.8-10-.5-.2-1.1-.3-1.6-.2-12.2 1.7-24.7 7.8-31.5 17.4-8.4 11.82 1.6 41.84 8.6 53.75 4.7 7.9 44.7 31.53 43.4 73.06h-.1Z"/></svg>
@@ -470,7 +470,23 @@
470
470
  },
471
471
  "chicken.svg": {
472
472
  "categories": ["Dyr"],
473
- "tags": ["høne", "høns", "kylling", "dyr", "dyrevelferd"]
473
+ "tags": ["høne", "høns", "fugl", "kylling", "dyr", "dyrevelferd"]
474
+ },
475
+ "eagle.svg": {
476
+ "categories": ["Dyr"],
477
+ "tags": ["ørn", "falk", "fugl", "dyr", "dyrevelferd"]
478
+ },
479
+ "moose.svg": {
480
+ "categories": ["Dyr"],
481
+ "tags": ["elg", "skogens konge", "dyr", "dyrevelferd"]
482
+ },
483
+ "bunny.svg": {
484
+ "categories": ["Dyr"],
485
+ "tags": ["hare", "kanin", "kjæledyr", "dyrevelferd"]
486
+ },
487
+ "polarbear.svg": {
488
+ "categories": ["Dyr"],
489
+ "tags": ["isbjørn", "dyr", "dyrevelferd"]
474
490
  },
475
491
  "heart.svg": {
476
492
  "categories": ["Visjon"],
@@ -538,7 +554,11 @@
538
554
  },
539
555
  "dog.svg": {
540
556
  "categories": ["Dyr"],
541
- "tags": ["hund", "voff"]
557
+ "tags": ["hund", "voff", "kjæledyr", "dyrevelferd"]
558
+ },
559
+ "puppy.svg": {
560
+ "categories": ["Dyr"],
561
+ "tags": ["hund", "valp", "voff", "kjæledyr", "dyrevelferd"]
542
562
  },
543
563
  "postits.svg": {
544
564
  "categories": ["Mennesker"],
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1590" height="1325" fill="none" viewBox="0 0 1590 1325"><path fill="#7F433B" d="M1544.59 888.59c-1.8-9.9-7.69-14.5-7.69-14.5S1387.53 760.1 1387.23 759.9c-9.2-7-25.09-59.89-29.39-74.88-7.6-26.6-15.1-55.9-14.9-84.09 36.39 38.3 87.68 62.59 144.57 62.79h1.7c7.4-58.79-12.8-114.68-49.49-155.67-2.8-4.1-30.19-28.5-41.39-35.4-53.09-35.89-137.97-79.28-181.36-92.78-67.49-21.1-187.66-13.7-259.74-8.2-30.6 2.3-66.99 12.3-97.48 8.9-28.4-3.2-84.68-49.69-115.77-63.58-34.8-15.5-90.58-23.4-144.57-25.3-1.9 0-2.6-2.5-1.1-3.6 15.5-11.6 61.89-54.99 72.58-166.37 2.2-22.4 5.2-105.38-27.39-119.57-13.7-6-45.89-3.1-52.89 56.79-1.7 14.8-3.4 30-9.6 43.59-1.9 4.1-5.1 8.5-10.3 6.9-2-.7-3.7-2.2-4.8-4-12.89-22.4-12.19-109.88-65.08-100.58-31.39 7.2-38.59 82.38-43.49 104.58-.4 1.9-5 12.1-12.1.8-16.4-26.3-11.1-60.4-29.29-85.69-8.9-12.4-25.6-22.4-39.49-16.2-28.9 12.9-28.3 53.4-28.2 62.6v98.27c0 15.9-6.9 31.2-18.69 41.8-31.5 28.1-88.58 14.6-99.88-27-3.5-12.5-10.5-32.6-29.19-32.1-21.2.5-35 52-38.29 68.4-.6 3-4.8 3.3-5.8.4-4.1-11.7-6.5-64.4-43.49-64.7-28.9-.3-30.6 55.1-34.4 66.1-1 2.8-4.99 2.6-5.69-.3-2-8.3-12.5-49-28.4-58-11.2-6.4-29.59-6.4-35.59 6.8-4.1 9.2-22.29 83.69 9.8 122.38 13.4 16.1 32.4 34.7 116.08 35 44.79.2 89.58-.1 134.36-.2 2.8 0 4.1 3.5 1.9 5.3-15.2 12.3-54.58 41.98-118.27 72.98-36.39 17.8-83.48 36.3-97.48 69.29-8.4 19.7-10.1 53.38-9.5 74.88.3 9.9 2.3 38.7 7.9 45.2 10.5 12.19 65.59 10.39 80.79 5.7 13.5-4.2 21.5-15.7 30.99-25.4 8.8-9 24.3-16.8 36.5-8.7 4.79 3.3 91.17 106.48 97.27 113.58 6.9 8.1 12.1 15.9 22.7 18.7 6.2 1.7 12.69 1.2 18.79-.8 23.9-7.9 37.59-67.5 39.29-75.7 1-5 2.6-14.1 8.4-15.89 8.5-2.6 76.58 49.79 79.08 55.19 6.9 14.9 2.3 39.4 3.6 56.19 2.9 37.4 20.9 47.39 38 77.18 15.29 26.7 33.18 63.9 44.98 92.38 1.3 3.1 13.2 132.38 13.2 132.38 0 .8.3 1.7.6 2.4l11.1 26.09c.2.5.3 1 .3 1.6l-.4 166.67-13.1 46.59c-.2.6-.4 1.1-.8 1.5l-45.1 53.19a4 4 0 0 0 3.1 6.6H631c1.9 0 3.3-1.7 3-3.5l-5.5-33.09 17.9-10.4c2.8-1.5 4.5-4.5 4.3-7.6l-7-104.48 2.2-103.38 14-131.67 6.4-29.7 14.6-1.2s14.89 105.58 14.99 105.88l15.8 38.99c.2.4.3.8.3 1.2l9.5 138.48-4.4 62.29c-.9 4.39-2.3 10.29-3.7 16.89-.1.6-.4 1.2-.8 1.7l-44.7 53.09c-2.2 2.6-.3 6.6 3.1 6.6h100.38c1.9 0 3.3-1.7 3-3.5l-5.5-33.09 17.9-10.4c2.8-1.5 4.5-4.5 4.3-7.6l-6.2-91.88-1.7-131.88c0-.5 0-1 .2-1.4l7.5-20.49c.5-1.4.8-2.9.7-4.4l-3.1-143.17c0-3 1-5.9 3-8.2 0 0 32.19-36.6 44.39-50.5 0 0 102.97-1.7 186.35-26.19 1-.3 2.1 0 2.9.8 13.8 13.9 140.27 140.78 157.77 158.87 1.3 1.3 2 3.1 2 4.9 0 15.5.5 90.78.3 99.88 0 .5 0 1.1-.2 1.6l-31.9 126.48-36.29 80.38h.2c0 .1-44.89 53.09-44.89 53.09a4 4 0 0 0 3.1 6.6h103.08c1.9 0 3.3-1.7 3-3.5l-5.5-33.09 19.89-10.4a8 8 0 0 0 3.8-4.3c1-2.5 77.79-241.65 82.68-256.05.5-1.4.7-2.9.7-4.4l.2-83.58c0-1.1-.2-2.1-.6-3.1l-39.99-95.78c0-.9-.1-1.8-.1-2.7 0 0 173.56 96.48 196.06 109.17 1.5.8 2.6 2.1 3.2 3.7l46.19 119.88c.2.5.4 1.1.4 1.7l24.39 194.36-3.8 8.4h.2c0 .1-44.89 53.09-44.89 53.09a4 4 0 0 0 3.1 6.6h103.08c1.9 0 3.3-1.7 3-3.5l-5.5-33.09 17.9-10.4a8.12 8.12 0 0 0 4.29-7.6l-44.99-381.63-.4-.1Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1236" height="628" fill="none" viewBox="0 0 1236 628"><path fill="#F4ECE6" d="M1211.83 283.97c4.9 0-33.8 159.56-33.8 159.56-.3 13.8-1 27.61-3 41.32-4.1 29.3-13.1 57.92-19.2 86.73-2.9 13.8-7.3 39.61-9.5 50.72-.6 3.1-3.3 5.3-6.4 5.3h-165.6c-1.8 0-3.2-1.5-3.2-3.2v-6.7c0-15.51 12-28.41 27.2-29.82 0 0 3.61 0 10.61-3.5.8-.4 19.4-12.5 21.2-24.1 10-66.33-7.2-108.05-7.2-108.05h-10.5s-27.8 103.94-55.3 147.36c-5 7.9-11.3 20.4-19.3 26.3a9.43 9.43 0 0 1-5.7 1.81h-144.3c-1.8 0-3.2-1.5-3.2-3.2v-6.7c0-16.41 13.3-29.91 29.7-30.01 5.6 0 11.1-1.4 15.9-4.4 5.5-3.4 10.2-7 13.3-11.11 9.1-12 11.3-30.81 14-45.62 3.8-20.4 10.4-65.02 11.7-76.53.2-1.6 0-3.3-.3-4.9l-4.4-16.6c-.8-3-3.6-5-6.7-4.8-33.2 2.4-68.2.7-99.5-1.5a3.2 3.2 0 0 0-3.4 2.8c-.4 2.7-.8 5.1-1.1 6.9-10.7 50.92-29.5 102.13-42.9 152.65-1.7 6.5-4.7 28.11-8.7 38.92-.9 2.6-3.4 4.3-6.1 4.3H526.16c-1.8 0-3.2-1.5-3.2-3.2v-10.4c0-14.61 12-26.51 26.6-26.41 4.4 0 8.7-1.3 12.6-3.3 4.7-2.5 9-5.1 12.4-8.2 11.2-10.51 12-37.12 11.5-54.53h-.2l-1.6-49.52c-2.5-3.1-13.6-14.4-18.1-16.3-3.4 15.6-3 30.2-11.3 44.51-16.5 28.41-34.9 47.82-58 69.83-3.9 3.8-7.7 7.9-10.4 12.5-7.2 13.9-9.1 29.01-14 41.02-1 2.5-3.4 4.1-6 4.1h-148.1c-1.8 0-3.2-1.5-3.2-3.2v-6.7a30.1 30.1 0 0 1 30-30.01s10.9.3 18.6-1.9c3.8-1.1 6.8-3.9 8.2-7.6 5.2-14.11 23.6-64.93 26.7-79.74 3.7-17.9 6-37.61 5.4-55.92-.3-8.4-7.7-78.33-8.8-91.03-31.2-5.4-175.09 25.4-211.69 38.21-23.8 8.2-47.5 15.6-72 22.1-82.7 22.12-89.7-6-92.7-9.3-7.4 1.6-16.9-2.4-18.6-10-1.5-6.8 3.7-15.3 6.6-21.2 4.4-8.8 40.5-56.23 45.3-62.23-.5-1.5-.9-2.8-1.1-3.7-1.1-3.3-1.8-9.3-1-12.6 4.4-19.01 44.4-57.03 59.7-69.63-2.4-16.7.4-34.31 9.4-50.12.2 0 .4.2.6.3a80.36 80.36 0 0 1 32.3 24.91c15.3-11.6 49.6-38.71 61.3-43.62 15.3-6.4 72.6-29.7 86.9-34.51 59.6-19.8 106-63.92 168.3-76.63 43.7-8.9 81.19 6.5 121.49 13.1 51.3-15.2 104.8-28.9 157.4-38.9C812.04 5.76 881.43-6.45 947.43 3.86c178.59 27.9 256.09 105.74 273.19 164.56 8.5 29.2 11.1 42.31 14.4 72.42 1 9.5 6.1 43.52-23.1 43.62l-.1-.5Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="374" height="378" fill="none" viewBox="0 0 374 378"><path fill="#C58F79" d="M354.19 43.16c-5.9-.41-14.84-1.06-20.1-3.68-7.6-3.68-12.63-12.08-18.3-17.98-28.22-29.12-72.05-28.89-99.22 2.1-5.96 6.83-10.23 17.22-12.33 28.84-21.74 7.3-38.98 26.5-41.84 50.9a62.24 62.24 0 0 0 43.07-4.91c-21.16 58.54-51.6 73.89-51.6 73.89-22.1 17.45-48.5 30.7-65.57 53.05-21.56 28.25-29.04 66.72-17.47 100.74.93 2.86 4.73 11.97 5.5 13.37-17.48-8.11-33.79-13.54-42.84-28.08-5.79-9.45-8.83-33.85-8.65-50.3 0-3.68-19.87-8.94-23.38 15.46-3.56 24.4-4.44 67.88 44.3 87.08 42.07 16.4 77.55 14.07 86.84 14.3h86.3a5.27 5.27 0 0 0 5.27-5.25v-9.22c0-4.61-1.29-9.05-3.8-12.84-2.63-4.09-6.2-6.19-10-8.64.77.52 13.68-8.64 17.6-11.44l8.59 43.6a5.4 5.4 0 0 0 4.73 3.85h96.54a5.27 5.27 0 0 0 5.26-5.25v-8.93a14.2 14.2 0 0 0-14.2-14.19h-3.28c-4.09-14.82-10.4-38.75-12.85-51.6-6.84-35.6-10-130.9-10.23-134.47-1.28-18.79-7.77-35.07 12.22-46.34 12.32-6.83 26.52-12.08 39.15-18.62 9.99-5.25 17.24-11.79 20.1-23V51.86c0-7.24-14.96-8.4-19.87-8.64l.06-.05Zm-78.54 306.6h-.12a6.08 6.08 0 0 1-1.98-2.75c-1.17-3.39-5.79-33.1-6.55-43.2 2.63-1.98 5.26-3.96 7.6-5.89 1.81 14.83 10.4 51.89 10.4 51.89h-9.35v-.06Z"/></svg>
package/mtds/index.d.ts CHANGED
@@ -22,11 +22,6 @@ errorsummary: string;
22
22
  field: string;
23
23
  affixes: string;
24
24
  fieldset: string;
25
- heading: string;
26
- ingress: string;
27
- muted: string;
28
- info: string;
29
- prose: string;
30
25
  helptext: string;
31
26
  input: string;
32
27
  grid: string;
@@ -42,9 +37,16 @@ steps: string;
42
37
  table: string;
43
38
  tabs: string;
44
39
  tag: string;
40
+ toast: string;
45
41
  togglegroup: string;
42
+ heading: string;
43
+ ingress: string;
44
+ muted: string;
45
+ info: string;
46
+ prose: string;
46
47
  validation: string;
47
48
  body: string;
48
49
  };
50
+ export { toast } from './toast/toast-helper';
49
51
  export type Size = "sm" | "md" | "lg";
50
52
  export type HeadingSize = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";