@mattilsynet/design 3.1.2 → 3.1.4

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.
@@ -16,7 +16,7 @@ const f = p(
16
16
  }
17
17
  ), d = p(
18
18
  function({ children: o, checked: t, defaultChecked: g, value: r, name: a, onChange: m, ...n }, u) {
19
- return /* @__PURE__ */ i("label", { ref: u, ...n, className: l.button, children: [
19
+ return /* @__PURE__ */ i("label", { className: l.button, ref: u, ...n, children: [
20
20
  /* @__PURE__ */ e(
21
21
  "input",
22
22
  {
@@ -1 +1 @@
1
- {"version":3,"file":"togglegroup.js","sources":["../../designsystem/togglegroup/togglegroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type { InputProps } from \"../react\";\nimport styles from \"../styles.module.css\";\n\nexport type TogglegroupProps = React.ComponentPropsWithoutRef<\"fieldset\"> & {\n\t\"data-toggle-group\"?: string;\n};\nexport type TogglegroupItemProps = Omit<\n\tReact.ComponentPropsWithoutRef<\"label\">,\n\t\"onChange\"\n> &\n\tPick<InputProps, \"defaultChecked\" | \"checked\" | \"onChange\" | \"value\"> &\n\tRequired<Pick<InputProps, \"name\">>; // Make name required\n\nconst TogglegroupComp = forwardRef<HTMLFieldSetElement, TogglegroupProps>(\n\tfunction Togglegroup(\n\t\t{ \"data-toggle-group\": label, className, ...rest },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<fieldset\n\t\t\t\tclassName={clsx(styles.togglegroup, className)}\n\t\t\t\tdata-toggle-group={label || \"Valgknapper\"}\n\t\t\t\tref={ref}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t);\n\t},\n);\nconst TogglegroupItem = forwardRef<HTMLLabelElement, TogglegroupItemProps>(\n\tfunction TogglegroupItem(\n\t\t{ children, checked, defaultChecked, value, name, onChange, ...rest },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<label ref={ref} {...rest} className={styles.button}>\n\t\t\t\t<input\n\t\t\t\t\t{...{ type: \"radio\", checked, defaultChecked, value, name, onChange }}\n\t\t\t\t/>\n\t\t\t\t{children}\n\t\t\t</label>\n\t\t);\n\t},\n);\n\nexport const Togglegroup = Object.assign(TogglegroupComp, {\n\tItem: TogglegroupItem,\n});\n"],"names":["TogglegroupComp","forwardRef","label","className","rest","ref","jsx","clsx","styles","TogglegroupItem","children","checked","defaultChecked","value","name","onChange","Togglegroup"],"mappings":";;;;AAeA,MAAMA,IAAkBC;AAAA,EACvB,SACC,EAAE,qBAAqBC,GAAO,WAAAC,GAAW,GAAGC,EAAA,GAC5CC,GACC;AACD,WACC,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,WAAWC,EAAKC,EAAO,aAAaL,CAAS;AAAA,QAC7C,qBAAmBD,KAAS;AAAA,QAC5B,KAAAG;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACD,GACMK,IAAkBR;AAAA,EACvB,SACC,EAAE,UAAAS,GAAU,SAAAC,GAAS,gBAAAC,GAAgB,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,GAAGX,EAAA,GAC/DC,GACC;AACD,6BACE,SAAA,EAAM,KAAAA,GAAW,GAAGD,GAAM,WAAWI,EAAO,QAC5C,UAAA;AAAA,MAAA,gBAAAF;AAAA,QAAC;AAAA,QAAA;AAAA,UACM,MAAM;AAAA,UAAS,SAAAK;AAAA,UAAS,gBAAAC;AAAA,UAAgB,OAAAC;AAAA,UAAO,MAAAC;AAAA,UAAM,UAAAC;AAAA,QAAS;AAAA,MAAA;AAAA,MAEpEL;AAAA,IAAA,GACF;AAAA,EAEF;AACD,GAEaM,IAAc,OAAO,OAAOhB,GAAiB;AAAA,EACzD,MAAMS;AACP,CAAC;"}
1
+ {"version":3,"file":"togglegroup.js","sources":["../../designsystem/togglegroup/togglegroup.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef } from \"react\";\nimport type { InputProps } from \"../react\";\nimport styles from \"../styles.module.css\";\n\nexport type TogglegroupProps = React.ComponentPropsWithoutRef<\"fieldset\"> & {\n\t\"data-toggle-group\"?: string;\n};\nexport type TogglegroupItemProps = Omit<\n\tReact.ComponentPropsWithoutRef<\"label\">,\n\t\"onChange\"\n> &\n\tPick<InputProps, \"defaultChecked\" | \"checked\" | \"onChange\" | \"value\"> &\n\tRequired<Pick<InputProps, \"name\">>; // Make name required\n\nconst TogglegroupComp = forwardRef<HTMLFieldSetElement, TogglegroupProps>(\n\tfunction Togglegroup(\n\t\t{ \"data-toggle-group\": label, className, ...rest },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<fieldset\n\t\t\t\tclassName={clsx(styles.togglegroup, className)}\n\t\t\t\tdata-toggle-group={label || \"Valgknapper\"}\n\t\t\t\tref={ref}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t);\n\t},\n);\nconst TogglegroupItem = forwardRef<HTMLLabelElement, TogglegroupItemProps>(\n\tfunction TogglegroupItem(\n\t\t{ children, checked, defaultChecked, value, name, onChange, ...rest },\n\t\tref,\n\t) {\n\t\treturn (\n\t\t\t<label className={styles.button} ref={ref} {...rest}>\n\t\t\t\t<input\n\t\t\t\t\t{...{ type: \"radio\", checked, defaultChecked, value, name, onChange }}\n\t\t\t\t/>\n\t\t\t\t{children}\n\t\t\t</label>\n\t\t);\n\t},\n);\n\nexport const Togglegroup = Object.assign(TogglegroupComp, {\n\tItem: TogglegroupItem,\n});\n"],"names":["TogglegroupComp","forwardRef","label","className","rest","ref","jsx","clsx","styles","TogglegroupItem","children","checked","defaultChecked","value","name","onChange","Togglegroup"],"mappings":";;;;AAeA,MAAMA,IAAkBC;AAAA,EACvB,SACC,EAAE,qBAAqBC,GAAO,WAAAC,GAAW,GAAGC,EAAA,GAC5CC,GACC;AACD,WACC,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,WAAWC,EAAKC,EAAO,aAAaL,CAAS;AAAA,QAC7C,qBAAmBD,KAAS;AAAA,QAC5B,KAAAG;AAAA,QACC,GAAGD;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AACD,GACMK,IAAkBR;AAAA,EACvB,SACC,EAAE,UAAAS,GAAU,SAAAC,GAAS,gBAAAC,GAAgB,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,GAAGX,EAAA,GAC/DC,GACC;AACD,6BACE,SAAA,EAAM,WAAWG,EAAO,QAAQ,KAAAH,GAAW,GAAGD,GAC9C,UAAA;AAAA,MAAA,gBAAAE;AAAA,QAAC;AAAA,QAAA;AAAA,UACM,MAAM;AAAA,UAAS,SAAAK;AAAA,UAAS,gBAAAC;AAAA,UAAgB,OAAAC;AAAA,UAAO,MAAAC;AAAA,UAAM,UAAAC;AAAA,QAAS;AAAA,MAAA;AAAA,MAEpEL;AAAA,IAAA,GACF;AAAA,EAEF;AACD,GAEaM,IAAc,OAAO,OAAOhB,GAAiB;AAAA,EACzD,MAAMS;AACP,CAAC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mattilsynet/design",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,7 +54,7 @@
54
54
  "storybook:build": "npm run build && storybook build"
55
55
  },
56
56
  "devDependencies": {
57
- "@biomejs/biome": "2.3.15",
57
+ "@biomejs/biome": "2.4.0",
58
58
  "@digdir/designsystemet-css": "^0.0.0-fix-designsystemet-web-20260213102609",
59
59
  "@digdir/designsystemet-types": "^0.0.0-fix-designsystemet-web-20260213102609",
60
60
  "@handsontable/react-wrapper": "^16.2.0",