@helsenorge/designsystem-react 15.5.1 → 15.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/lib/CHANGELOG.md +19 -0
  2. package/lib/Checkbox.js +1 -1
  3. package/lib/Checkbox.js.map +1 -1
  4. package/lib/FormGroup.js +9 -2
  5. package/lib/FormGroup.js.map +1 -1
  6. package/lib/FormLayout.js +9 -1
  7. package/lib/FormLayout.js.map +1 -1
  8. package/lib/LazyIcon.js +5 -0
  9. package/lib/LazyIcon.js.map +1 -1
  10. package/lib/Toggle.js +176 -0
  11. package/lib/Toggle.js.map +1 -0
  12. package/lib/components/Close/styles.module.scss +2 -2
  13. package/lib/components/FormGroup/styles.module.scss +15 -3
  14. package/lib/components/FormGroup/styles.module.scss.d.ts +2 -0
  15. package/lib/components/FormLayout/styles.module.scss +9 -1
  16. package/lib/components/FormLayout/styles.module.scss.d.ts +2 -0
  17. package/lib/components/HelpPanel/HelpPanel.d.ts +2 -2
  18. package/lib/components/HelpPanel/index.js +49 -9
  19. package/lib/components/HelpPanel/index.js.map +1 -1
  20. package/lib/components/HelpPanel/styles.module.scss +66 -2
  21. package/lib/components/HelpPanel/styles.module.scss.d.ts +8 -0
  22. package/lib/components/HelpTeaser/HelpTeaser.d.ts +5 -2
  23. package/lib/components/HelpTeaser/index.js +59 -14
  24. package/lib/components/HelpTeaser/index.js.map +1 -1
  25. package/lib/components/HelpTeaser/styles.module.scss +105 -2
  26. package/lib/components/HelpTeaser/styles.module.scss.d.ts +6 -0
  27. package/lib/components/HighlightPanel/index.js +79 -1
  28. package/lib/components/HighlightPanel/index.js.map +1 -0
  29. package/lib/components/Icons/AdditionalIconInformation.d.ts +20 -0
  30. package/lib/components/Icons/AdditionalIconInformation.js +20 -0
  31. package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
  32. package/lib/components/Icons/ConsentDocument.d.ts +3 -0
  33. package/lib/components/Icons/ConsentDocument.js +53 -0
  34. package/lib/components/Icons/ConsentDocument.js.map +1 -0
  35. package/lib/components/Icons/HealthCarePersonnelSecurity.d.ts +3 -0
  36. package/lib/components/Icons/HealthCarePersonnelSecurity.js +65 -0
  37. package/lib/components/Icons/HealthCarePersonnelSecurity.js.map +1 -0
  38. package/lib/components/Icons/HistoryDocument.d.ts +3 -0
  39. package/lib/components/Icons/HistoryDocument.js +50 -0
  40. package/lib/components/Icons/HistoryDocument.js.map +1 -0
  41. package/lib/components/Icons/IconNames.d.ts +1 -1
  42. package/lib/components/Icons/IconNames.js +5 -0
  43. package/lib/components/Icons/IconNames.js.map +1 -1
  44. package/lib/components/Icons/PersonCommunication.d.ts +3 -0
  45. package/lib/components/Icons/PersonCommunication.js +69 -0
  46. package/lib/components/Icons/PersonCommunication.js.map +1 -0
  47. package/lib/components/Icons/PersonDocument.d.ts +3 -0
  48. package/lib/components/Icons/PersonDocument.js +65 -0
  49. package/lib/components/Icons/PersonDocument.js.map +1 -0
  50. package/lib/components/InfoTeaser/index.js +71 -1
  51. package/lib/components/InfoTeaser/index.js.map +1 -0
  52. package/lib/components/RadioButton/styles.module.scss +6 -6
  53. package/lib/components/Toggle/index.js +1 -175
  54. package/lib/resourceHelper2.js +22 -0
  55. package/lib/resourceHelper2.js.map +1 -0
  56. package/lib/utils/formSpacing.d.ts +3 -0
  57. package/lib/utils/formSpacing.js +16 -0
  58. package/lib/utils/formSpacing.js.map +1 -0
  59. package/package.json +1 -1
  60. package/lib/HighlightPanel.js +0 -80
  61. package/lib/HighlightPanel.js.map +0 -1
  62. package/lib/InfoTeaser.js +0 -89
  63. package/lib/InfoTeaser.js.map +0 -1
  64. package/lib/components/Toggle/index.js.map +0 -1
@@ -0,0 +1,3 @@
1
+ import { SvgPathProps } from '../Icon';
2
+ declare const PersonCommunication: React.FC<SvgPathProps>;
3
+ export default PersonCommunication;
@@ -0,0 +1,69 @@
1
+ import { t as getIcon } from "../../utils.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/components/Icons/PersonCommunication.tsx
4
+ var PersonCommunication = ({ size, isHovered }) => {
5
+ return getIcon({
6
+ size,
7
+ isHovered,
8
+ normal: /* @__PURE__ */ jsxs(Fragment, { children: [
9
+ /* @__PURE__ */ jsx("path", { d: "M33.033 33.408a7.465 7.465 0 0 1 5.063 7.067v1.08h-1.1v-1.08a6.363 6.363 0 0 0-3.941-5.883 6.701 6.701 0 0 1-2.423.456 6.707 6.707 0 0 1-2.425-.456 6.389 6.389 0 0 0-3.337 3.178 8.887 8.887 0 0 0-.527-1.313 7.486 7.486 0 0 1 3.886-3.049c.74.347 1.551.54 2.403.54a5.63 5.63 0 0 0 2.401-.54Zm-14.095 0a7.466 7.466 0 0 1 5.063 7.067v1.079h-1.1v-1.08a6.364 6.364 0 0 0-3.941-5.882 6.7 6.7 0 0 1-2.423.456c-.85 0-1.667-.163-2.425-.456a6.364 6.364 0 0 0-3.94 5.883v1.079H9.074v-1.08a7.465 7.465 0 0 1 5.062-7.066 5.63 5.63 0 0 0 2.402.54 5.63 5.63 0 0 0 2.401-.54Z" }),
10
+ /* @__PURE__ */ jsx("path", {
11
+ "fill-rule": "evenodd",
12
+ "clip-rule": "evenodd",
13
+ d: "M16.536 21.436a4.764 4.764 0 0 1 4.764 4.762v1.81l-.007.246a4.763 4.763 0 0 1-9.514 0l-.006-.245v-1.81a4.763 4.763 0 0 1 4.763-4.764Zm-1.276 4.536c-.236.32-.534.553-.86.715-.477.238-1.017.333-1.527.364v.958a3.664 3.664 0 0 0 7.326 0v-.954h-2.232c-.34 0-1.131.015-1.837-.338a2.301 2.301 0 0 1-.87-.745Zm1.276-3.437a3.663 3.663 0 0 0-3.66 3.512c.398-.029.77-.102 1.077-.255.243-.121.44-.29.578-.526.14-.24.241-.582.241-1.078h1c0 .53.11.885.252 1.127.141.239.334.398.553.507.463.232 1.018.233 1.39.233h2.228a3.663 3.663 0 0 0-3.659-3.52Zm14.096-1.099a4.764 4.764 0 0 1 4.763 4.762v1.81l-.007.246a4.763 4.763 0 0 1-9.513 0l-.006-.245v-1.81a4.763 4.763 0 0 1 4.763-4.764Zm1.301 4.536a2.304 2.304 0 0 1-.87.745c-.705.353-1.497.338-1.837.338H26.97v.954a3.664 3.664 0 0 0 7.326 0v-.96c-.503-.032-1.033-.128-1.501-.361a2.365 2.365 0 0 1-.86-.716Zm-1.301-3.437a3.663 3.663 0 0 0-3.66 3.52h2.254c.372 0 .927-.001 1.39-.233.22-.11.412-.268.553-.508.142-.241.252-.597.252-1.127h1c0 .497.1.84.241 1.079.139.236.335.405.578.526.3.15.663.223 1.05.253a3.662 3.662 0 0 0-3.658-3.51Z"
14
+ }),
15
+ /* @__PURE__ */ jsx("path", { d: "M27.543 13.701h-7.206v-1.1h7.206v1.1Zm4.388-3.326H20.337v-1.1h11.595v1.1Z" }),
16
+ /* @__PURE__ */ jsx("path", {
17
+ "fill-rule": "evenodd",
18
+ "clip-rule": "evenodd",
19
+ d: "M33.178 5.785a2.55 2.55 0 0 1 2.55 2.55v6.903a2.55 2.55 0 0 1-2.55 2.55h-7.69l-4.768 3.213v-3.213h-1.628a2.55 2.55 0 0 1-2.55-2.55V8.335a2.55 2.55 0 0 1 2.55-2.55h14.086Zm-14.086 1.1c-.801 0-1.45.65-1.45 1.45v6.903c0 .801.649 1.45 1.45 1.45h2.727v2.245l3.193-2.15.14-.095h8.026l.148-.007a1.45 1.45 0 0 0 1.302-1.443V8.335c0-.75-.57-1.368-1.302-1.442l-.148-.008H19.092Z"
20
+ })
21
+ ] }),
22
+ normalHover: /* @__PURE__ */ jsxs(Fragment, { children: [
23
+ /* @__PURE__ */ jsx("path", { d: "M28.23 33.41a7.486 7.486 0 0 0-3.887 3.049c.162.325.364.785.527 1.313a6.39 6.39 0 0 1 3.337-3.178 6.704 6.704 0 0 0 2.425.456c.85 0 1.666-.163 2.423-.456a6.363 6.363 0 0 1 3.941 5.883v1.08h1.1v-1.08a7.465 7.465 0 0 0-5.063-7.067 5.63 5.63 0 0 1-2.401.54 5.63 5.63 0 0 1-2.402-.54Zm-14.095 0a7.465 7.465 0 0 0-5.062 7.067v1.079h1.1v-1.08a6.364 6.364 0 0 1 3.94-5.882 6.704 6.704 0 0 0 2.424.456c.85 0 1.666-.163 2.423-.456a6.364 6.364 0 0 1 3.941 5.883v1.079h1.1v-1.08a7.466 7.466 0 0 0-5.063-7.066 5.63 5.63 0 0 1-2.4.54 5.63 5.63 0 0 1-2.403-.54Z" }),
24
+ /* @__PURE__ */ jsx("path", {
25
+ "fill-rule": "evenodd",
26
+ "clip-rule": "evenodd",
27
+ d: "M30.632 21.438a4.763 4.763 0 0 0-4.763 4.762v1.81l.006.246a4.763 4.763 0 0 0 9.514 0l.006-.245V26.2a4.764 4.764 0 0 0-4.763-4.764Zm1.3 4.536c.236.32.535.553.861.715.468.234 1 .33 1.502.362v.96a3.663 3.663 0 0 1-7.326 0v-.954h2.257c.339 0 1.13.014 1.837-.338.32-.16.628-.4.87-.745Zm-1.3-3.437a3.663 3.663 0 0 1 3.659 3.51c-.388-.03-.752-.103-1.052-.253a1.339 1.339 0 0 1-.578-.526c-.14-.24-.241-.582-.241-1.079h-1c0 .53-.11.886-.252 1.127-.141.24-.334.399-.553.508-.463.231-1.018.233-1.39.233h-2.252a3.663 3.663 0 0 1 3.659-3.52Zm-14.096-1.099a4.763 4.763 0 0 0-4.763 4.762v1.81l.006.246a4.763 4.763 0 0 0 9.514 0l.007-.245V26.2a4.764 4.764 0 0 0-4.764-4.764Zm-1.276 4.536c.241.346.549.584.87.745.706.352 1.497.338 1.837.338h2.232v.954a3.663 3.663 0 0 1-7.326 0v-.958c.51-.031 1.05-.126 1.526-.364.327-.162.625-.395.86-.715Zm1.276-3.437a3.662 3.662 0 0 1 3.66 3.52h-2.23c-.37 0-.926-.001-1.389-.233a1.293 1.293 0 0 1-.553-.508c-.142-.241-.252-.597-.252-1.127h-1c0 .497-.1.839-.24 1.079a1.337 1.337 0 0 1-.579.526c-.306.153-.678.226-1.075.255a3.662 3.662 0 0 1 3.658-3.512Z"
28
+ }),
29
+ /* @__PURE__ */ jsx("path", { d: "M20.18 13.703h7.207v-1.1H20.18v1.1Zm-4.388-3.326h11.595v-1.1H15.792v1.1Z" }),
30
+ /* @__PURE__ */ jsx("path", {
31
+ "fill-rule": "evenodd",
32
+ "clip-rule": "evenodd",
33
+ d: "M14.546 5.787a2.55 2.55 0 0 0-2.55 2.55v6.903a2.55 2.55 0 0 0 2.55 2.55h7.69l4.768 3.213V17.79h1.628a2.55 2.55 0 0 0 2.55-2.55V8.337a2.55 2.55 0 0 0-2.55-2.55H14.546Zm14.086 1.1c.8 0 1.45.65 1.45 1.45v6.903c0 .801-.65 1.45-1.45 1.45h-2.728v2.245l-3.192-2.15-.14-.095h-8.026l-.148-.007a1.45 1.45 0 0 1-1.302-1.443V8.337c0-.75.57-1.368 1.302-1.442l.148-.008h14.086Z"
34
+ })
35
+ ] }),
36
+ xSmall: /* @__PURE__ */ jsxs(Fragment, { children: [
37
+ /* @__PURE__ */ jsx("path", { d: "M18.937 33.407A7.467 7.467 0 0 1 24 40.477v1.08h-1.264v-1.08a6.201 6.201 0 0 0-3.78-5.71 6.862 6.862 0 0 1-2.42.445 6.862 6.862 0 0 1-2.422-.444 6.202 6.202 0 0 0-3.779 5.709v1.08H9.072v-1.08a7.467 7.467 0 0 1 5.062-7.069 5.63 5.63 0 0 0 2.401.54 5.63 5.63 0 0 0 2.402-.54Zm14.096 0a7.467 7.467 0 0 1 5.062 7.069v1.08h-1.263v-1.08a6.201 6.201 0 0 0-3.78-5.71 6.857 6.857 0 0 1-2.42.445 6.86 6.86 0 0 1-2.421-.445 6.222 6.222 0 0 0-3.27 3.251 8.685 8.685 0 0 0-.6-1.558 7.486 7.486 0 0 1 3.888-3.052 5.62 5.62 0 0 0 4.803 0Z" }),
38
+ /* @__PURE__ */ jsx("path", {
39
+ "fill-rule": "evenodd",
40
+ "clip-rule": "evenodd",
41
+ d: "M16.537 21.437a4.763 4.763 0 0 1 4.762 4.763v1.81l-.006.245a4.764 4.764 0 0 1-4.756 4.518l-.246-.006a4.764 4.764 0 0 1-4.511-4.512l-.006-.244V26.2a4.763 4.763 0 0 1 4.763-4.763Zm-1.278 4.546c-.236.318-.532.55-.857.712-.426.212-.904.308-1.365.349v.967a3.5 3.5 0 0 0 7 0v-.949h-2.07c-.34 0-1.133.015-1.84-.338a2.306 2.306 0 0 1-.868-.741Zm1.277-3.283a3.497 3.497 0 0 0-3.492 3.328c.334-.036.645-.107.907-.238.243-.12.438-.288.576-.524.14-.238.24-.58.24-1.076h1.01c0 .53.11.883.252 1.124.141.238.332.397.55.506.462.23 1.016.232 1.387.232h2.063a3.497 3.497 0 0 0-3.492-3.352Zm14.095-1.263a4.763 4.763 0 0 1 4.763 4.763v1.81l-.006.245a4.763 4.763 0 0 1-4.757 4.518l-.245-.006a4.764 4.764 0 0 1-4.511-4.512l-.007-.244V26.2a4.763 4.763 0 0 1 4.763-4.763Zm1.303 4.546a2.308 2.308 0 0 1-.869.741c-.707.353-1.5.338-1.839.338h-2.095v.949a3.5 3.5 0 0 0 7 0v-.969c-.454-.042-.923-.139-1.341-.348a2.368 2.368 0 0 1-.856-.711ZM30.63 22.7a3.497 3.497 0 0 0-3.492 3.352h2.087c.372 0 .925-.002 1.387-.232.218-.11.41-.268.55-.506.142-.24.251-.595.251-1.124h1.01c0 .496.101.837.241 1.076.138.236.334.403.576.524.256.128.557.2.881.237a3.496 3.496 0 0 0-3.49-3.327Z"
42
+ }),
43
+ /* @__PURE__ */ jsx("path", { d: "M27.542 13.783h-7.205V12.52h7.205v1.263Zm4.389-3.326H20.337V9.194h11.594v1.263Z" }),
44
+ /* @__PURE__ */ jsx("path", {
45
+ "fill-rule": "evenodd",
46
+ "clip-rule": "evenodd",
47
+ d: "M32.65 5.703a3.158 3.158 0 0 1 3.158 3.158v5.85a3.158 3.158 0 0 1-3.158 3.159h-7.136l-4.877 3.285V17.87h-1.02a3.158 3.158 0 0 1-3.157-3.158V8.86a3.158 3.158 0 0 1 3.158-3.158H32.65ZM19.618 6.966a1.895 1.895 0 0 0-1.895 1.895v5.85c0 1.047.849 1.896 1.895 1.896H21.9v2.173l3.068-2.066.16-.107h7.522a1.895 1.895 0 0 0 1.895-1.895V8.86a1.895 1.895 0 0 0-1.895-1.895H19.618Z"
48
+ })
49
+ ] }),
50
+ xSmallHover: /* @__PURE__ */ jsxs(Fragment, { children: [
51
+ /* @__PURE__ */ jsx("path", { d: "M28.229 33.404a7.487 7.487 0 0 0-3.888 3.052c.187.375.427.927.6 1.558a6.223 6.223 0 0 1 3.27-3.252 6.863 6.863 0 0 0 2.42.446c.849 0 1.663-.16 2.42-.444a6.201 6.201 0 0 1 3.78 5.709v1.08h1.264v-1.08a7.466 7.466 0 0 0-5.063-7.069c-.738.347-1.55.54-2.4.54a5.631 5.631 0 0 1-2.403-.54Zm-14.096 0a7.468 7.468 0 0 0-5.061 7.069v1.08h1.263v-1.08a6.203 6.203 0 0 1 3.778-5.71 6.867 6.867 0 0 0 2.422.445c.848 0 1.663-.16 2.42-.444a6.2 6.2 0 0 1 3.78 5.709v1.08H24v-1.08a7.466 7.466 0 0 0-5.063-7.069 5.63 5.63 0 0 1-2.401.54 5.629 5.629 0 0 1-2.402-.54Z" }),
52
+ /* @__PURE__ */ jsx("path", {
53
+ "fill-rule": "evenodd",
54
+ "clip-rule": "evenodd",
55
+ d: "M30.632 21.434a4.763 4.763 0 0 0-4.763 4.763v1.81l.006.245a4.764 4.764 0 0 0 4.511 4.512l.246.006a4.764 4.764 0 0 0 4.756-4.518l.007-.244v-1.811a4.763 4.763 0 0 0-4.763-4.763Zm1.302 4.546c.236.317.532.55.857.711.418.21.887.306 1.34.348v.968a3.5 3.5 0 0 1-6.999 0v-.948h2.095c.34 0 1.133.015 1.839-.338.32-.16.627-.397.868-.741Zm-1.302-3.283a3.496 3.496 0 0 1 3.49 3.328 2.668 2.668 0 0 1-.88-.238 1.333 1.333 0 0 1-.576-.524c-.14-.239-.24-.58-.24-1.076h-1.01c0 .529-.11.883-.253 1.124-.14.238-.332.397-.55.506-.461.23-1.015.232-1.386.232H27.14a3.496 3.496 0 0 1 3.492-3.352Zm-14.096-1.263a4.763 4.763 0 0 0-4.763 4.763v1.81l.006.245a4.764 4.764 0 0 0 4.512 4.512l.245.006a4.763 4.763 0 0 0 4.757-4.518l.006-.244v-1.811a4.763 4.763 0 0 0-4.763-4.763Zm-1.278 4.546c.241.344.549.58.869.74.706.354 1.499.339 1.839.339h2.07v.948a3.5 3.5 0 0 1-7 0v-.967c.462-.04.94-.136 1.366-.349.325-.162.62-.394.856-.711Zm1.278-3.283a3.496 3.496 0 0 1 3.492 3.352h-2.062c-.372 0-.925-.002-1.387-.232a1.288 1.288 0 0 1-.55-.506c-.142-.24-.252-.595-.252-1.124h-1.01c0 .496-.1.837-.24 1.076a1.333 1.333 0 0 1-.576.524 2.72 2.72 0 0 1-.905.24 3.495 3.495 0 0 1 3.49-3.33Z"
56
+ }),
57
+ /* @__PURE__ */ jsx("path", { d: "M15.792 12.518v1.263h7.205v-1.263h-7.205Zm0-2.063h11.594V9.192H15.792v1.263Z" }),
58
+ /* @__PURE__ */ jsx("path", {
59
+ "fill-rule": "evenodd",
60
+ "clip-rule": "evenodd",
61
+ d: "M15.073 5.701a3.158 3.158 0 0 0-3.158 3.158v5.85a3.158 3.158 0 0 0 3.158 3.159h7.136l4.878 3.285v-3.285h1.018a3.158 3.158 0 0 0 3.158-3.158V8.86a3.158 3.158 0 0 0-3.158-3.16H15.073Zm13.032 1.263c1.047 0 1.895.849 1.895 1.895v5.85a1.895 1.895 0 0 1-1.895 1.896h-2.282v2.173l-3.067-2.066-.16-.107h-7.523a1.895 1.895 0 0 1-1.895-1.895V8.86c0-1.047.849-1.896 1.895-1.896h13.032Z"
62
+ })
63
+ ] })
64
+ });
65
+ };
66
+ //#endregion
67
+ export { PersonCommunication as default };
68
+
69
+ //# sourceMappingURL=PersonCommunication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersonCommunication.js","names":[],"sources":["../../../src/components/Icons/PersonCommunication.tsx"],"sourcesContent":["import type { SvgPathProps } from '../Icon';\n\nimport { getIcon } from '../Icon/utils';\n\nconst PersonCommunication: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): React.ReactElement => {\n const small = (\n <>\n <path d=\"M33.033 33.408a7.465 7.465 0 0 1 5.063 7.067v1.08h-1.1v-1.08a6.363 6.363 0 0 0-3.941-5.883 6.701 6.701 0 0 1-2.423.456 6.707 6.707 0 0 1-2.425-.456 6.389 6.389 0 0 0-3.337 3.178 8.887 8.887 0 0 0-.527-1.313 7.486 7.486 0 0 1 3.886-3.049c.74.347 1.551.54 2.403.54a5.63 5.63 0 0 0 2.401-.54Zm-14.095 0a7.466 7.466 0 0 1 5.063 7.067v1.079h-1.1v-1.08a6.364 6.364 0 0 0-3.941-5.882 6.7 6.7 0 0 1-2.423.456c-.85 0-1.667-.163-2.425-.456a6.364 6.364 0 0 0-3.94 5.883v1.079H9.074v-1.08a7.465 7.465 0 0 1 5.062-7.066 5.63 5.63 0 0 0 2.402.54 5.63 5.63 0 0 0 2.401-.54Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M16.536 21.436a4.764 4.764 0 0 1 4.764 4.762v1.81l-.007.246a4.763 4.763 0 0 1-9.514 0l-.006-.245v-1.81a4.763 4.763 0 0 1 4.763-4.764Zm-1.276 4.536c-.236.32-.534.553-.86.715-.477.238-1.017.333-1.527.364v.958a3.664 3.664 0 0 0 7.326 0v-.954h-2.232c-.34 0-1.131.015-1.837-.338a2.301 2.301 0 0 1-.87-.745Zm1.276-3.437a3.663 3.663 0 0 0-3.66 3.512c.398-.029.77-.102 1.077-.255.243-.121.44-.29.578-.526.14-.24.241-.582.241-1.078h1c0 .53.11.885.252 1.127.141.239.334.398.553.507.463.232 1.018.233 1.39.233h2.228a3.663 3.663 0 0 0-3.659-3.52Zm14.096-1.099a4.764 4.764 0 0 1 4.763 4.762v1.81l-.007.246a4.763 4.763 0 0 1-9.513 0l-.006-.245v-1.81a4.763 4.763 0 0 1 4.763-4.764Zm1.301 4.536a2.304 2.304 0 0 1-.87.745c-.705.353-1.497.338-1.837.338H26.97v.954a3.664 3.664 0 0 0 7.326 0v-.96c-.503-.032-1.033-.128-1.501-.361a2.365 2.365 0 0 1-.86-.716Zm-1.301-3.437a3.663 3.663 0 0 0-3.66 3.52h2.254c.372 0 .927-.001 1.39-.233.22-.11.412-.268.553-.508.142-.241.252-.597.252-1.127h1c0 .497.1.84.241 1.079.139.236.335.405.578.526.3.15.663.223 1.05.253a3.662 3.662 0 0 0-3.658-3.51Z\"\n />\n <path d=\"M27.543 13.701h-7.206v-1.1h7.206v1.1Zm4.388-3.326H20.337v-1.1h11.595v1.1Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M33.178 5.785a2.55 2.55 0 0 1 2.55 2.55v6.903a2.55 2.55 0 0 1-2.55 2.55h-7.69l-4.768 3.213v-3.213h-1.628a2.55 2.55 0 0 1-2.55-2.55V8.335a2.55 2.55 0 0 1 2.55-2.55h14.086Zm-14.086 1.1c-.801 0-1.45.65-1.45 1.45v6.903c0 .801.649 1.45 1.45 1.45h2.727v2.245l3.193-2.15.14-.095h8.026l.148-.007a1.45 1.45 0 0 0 1.302-1.443V8.335c0-.75-.57-1.368-1.302-1.442l-.148-.008H19.092Z\"\n />\n </>\n );\n\n const smallHover = (\n <>\n <path d=\"M28.23 33.41a7.486 7.486 0 0 0-3.887 3.049c.162.325.364.785.527 1.313a6.39 6.39 0 0 1 3.337-3.178 6.704 6.704 0 0 0 2.425.456c.85 0 1.666-.163 2.423-.456a6.363 6.363 0 0 1 3.941 5.883v1.08h1.1v-1.08a7.465 7.465 0 0 0-5.063-7.067 5.63 5.63 0 0 1-2.401.54 5.63 5.63 0 0 1-2.402-.54Zm-14.095 0a7.465 7.465 0 0 0-5.062 7.067v1.079h1.1v-1.08a6.364 6.364 0 0 1 3.94-5.882 6.704 6.704 0 0 0 2.424.456c.85 0 1.666-.163 2.423-.456a6.364 6.364 0 0 1 3.941 5.883v1.079h1.1v-1.08a7.466 7.466 0 0 0-5.063-7.066 5.63 5.63 0 0 1-2.4.54 5.63 5.63 0 0 1-2.403-.54Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M30.632 21.438a4.763 4.763 0 0 0-4.763 4.762v1.81l.006.246a4.763 4.763 0 0 0 9.514 0l.006-.245V26.2a4.764 4.764 0 0 0-4.763-4.764Zm1.3 4.536c.236.32.535.553.861.715.468.234 1 .33 1.502.362v.96a3.663 3.663 0 0 1-7.326 0v-.954h2.257c.339 0 1.13.014 1.837-.338.32-.16.628-.4.87-.745Zm-1.3-3.437a3.663 3.663 0 0 1 3.659 3.51c-.388-.03-.752-.103-1.052-.253a1.339 1.339 0 0 1-.578-.526c-.14-.24-.241-.582-.241-1.079h-1c0 .53-.11.886-.252 1.127-.141.24-.334.399-.553.508-.463.231-1.018.233-1.39.233h-2.252a3.663 3.663 0 0 1 3.659-3.52Zm-14.096-1.099a4.763 4.763 0 0 0-4.763 4.762v1.81l.006.246a4.763 4.763 0 0 0 9.514 0l.007-.245V26.2a4.764 4.764 0 0 0-4.764-4.764Zm-1.276 4.536c.241.346.549.584.87.745.706.352 1.497.338 1.837.338h2.232v.954a3.663 3.663 0 0 1-7.326 0v-.958c.51-.031 1.05-.126 1.526-.364.327-.162.625-.395.86-.715Zm1.276-3.437a3.662 3.662 0 0 1 3.66 3.52h-2.23c-.37 0-.926-.001-1.389-.233a1.293 1.293 0 0 1-.553-.508c-.142-.241-.252-.597-.252-1.127h-1c0 .497-.1.839-.24 1.079a1.337 1.337 0 0 1-.579.526c-.306.153-.678.226-1.075.255a3.662 3.662 0 0 1 3.658-3.512Z\"\n />\n <path d=\"M20.18 13.703h7.207v-1.1H20.18v1.1Zm-4.388-3.326h11.595v-1.1H15.792v1.1Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M14.546 5.787a2.55 2.55 0 0 0-2.55 2.55v6.903a2.55 2.55 0 0 0 2.55 2.55h7.69l4.768 3.213V17.79h1.628a2.55 2.55 0 0 0 2.55-2.55V8.337a2.55 2.55 0 0 0-2.55-2.55H14.546Zm14.086 1.1c.8 0 1.45.65 1.45 1.45v6.903c0 .801-.65 1.45-1.45 1.45h-2.728v2.245l-3.192-2.15-.14-.095h-8.026l-.148-.007a1.45 1.45 0 0 1-1.302-1.443V8.337c0-.75.57-1.368 1.302-1.442l.148-.008h14.086Z\"\n />\n </>\n );\n\n const xSmall = (\n <>\n <path d=\"M18.937 33.407A7.467 7.467 0 0 1 24 40.477v1.08h-1.264v-1.08a6.201 6.201 0 0 0-3.78-5.71 6.862 6.862 0 0 1-2.42.445 6.862 6.862 0 0 1-2.422-.444 6.202 6.202 0 0 0-3.779 5.709v1.08H9.072v-1.08a7.467 7.467 0 0 1 5.062-7.069 5.63 5.63 0 0 0 2.401.54 5.63 5.63 0 0 0 2.402-.54Zm14.096 0a7.467 7.467 0 0 1 5.062 7.069v1.08h-1.263v-1.08a6.201 6.201 0 0 0-3.78-5.71 6.857 6.857 0 0 1-2.42.445 6.86 6.86 0 0 1-2.421-.445 6.222 6.222 0 0 0-3.27 3.251 8.685 8.685 0 0 0-.6-1.558 7.486 7.486 0 0 1 3.888-3.052 5.62 5.62 0 0 0 4.803 0Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M16.537 21.437a4.763 4.763 0 0 1 4.762 4.763v1.81l-.006.245a4.764 4.764 0 0 1-4.756 4.518l-.246-.006a4.764 4.764 0 0 1-4.511-4.512l-.006-.244V26.2a4.763 4.763 0 0 1 4.763-4.763Zm-1.278 4.546c-.236.318-.532.55-.857.712-.426.212-.904.308-1.365.349v.967a3.5 3.5 0 0 0 7 0v-.949h-2.07c-.34 0-1.133.015-1.84-.338a2.306 2.306 0 0 1-.868-.741Zm1.277-3.283a3.497 3.497 0 0 0-3.492 3.328c.334-.036.645-.107.907-.238.243-.12.438-.288.576-.524.14-.238.24-.58.24-1.076h1.01c0 .53.11.883.252 1.124.141.238.332.397.55.506.462.23 1.016.232 1.387.232h2.063a3.497 3.497 0 0 0-3.492-3.352Zm14.095-1.263a4.763 4.763 0 0 1 4.763 4.763v1.81l-.006.245a4.763 4.763 0 0 1-4.757 4.518l-.245-.006a4.764 4.764 0 0 1-4.511-4.512l-.007-.244V26.2a4.763 4.763 0 0 1 4.763-4.763Zm1.303 4.546a2.308 2.308 0 0 1-.869.741c-.707.353-1.5.338-1.839.338h-2.095v.949a3.5 3.5 0 0 0 7 0v-.969c-.454-.042-.923-.139-1.341-.348a2.368 2.368 0 0 1-.856-.711ZM30.63 22.7a3.497 3.497 0 0 0-3.492 3.352h2.087c.372 0 .925-.002 1.387-.232.218-.11.41-.268.55-.506.142-.24.251-.595.251-1.124h1.01c0 .496.101.837.241 1.076.138.236.334.403.576.524.256.128.557.2.881.237a3.496 3.496 0 0 0-3.49-3.327Z\"\n />\n <path d=\"M27.542 13.783h-7.205V12.52h7.205v1.263Zm4.389-3.326H20.337V9.194h11.594v1.263Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M32.65 5.703a3.158 3.158 0 0 1 3.158 3.158v5.85a3.158 3.158 0 0 1-3.158 3.159h-7.136l-4.877 3.285V17.87h-1.02a3.158 3.158 0 0 1-3.157-3.158V8.86a3.158 3.158 0 0 1 3.158-3.158H32.65ZM19.618 6.966a1.895 1.895 0 0 0-1.895 1.895v5.85c0 1.047.849 1.896 1.895 1.896H21.9v2.173l3.068-2.066.16-.107h7.522a1.895 1.895 0 0 0 1.895-1.895V8.86a1.895 1.895 0 0 0-1.895-1.895H19.618Z\"\n />\n </>\n );\n\n const xSmallHover = (\n <>\n <path d=\"M28.229 33.404a7.487 7.487 0 0 0-3.888 3.052c.187.375.427.927.6 1.558a6.223 6.223 0 0 1 3.27-3.252 6.863 6.863 0 0 0 2.42.446c.849 0 1.663-.16 2.42-.444a6.201 6.201 0 0 1 3.78 5.709v1.08h1.264v-1.08a7.466 7.466 0 0 0-5.063-7.069c-.738.347-1.55.54-2.4.54a5.631 5.631 0 0 1-2.403-.54Zm-14.096 0a7.468 7.468 0 0 0-5.061 7.069v1.08h1.263v-1.08a6.203 6.203 0 0 1 3.778-5.71 6.867 6.867 0 0 0 2.422.445c.848 0 1.663-.16 2.42-.444a6.2 6.2 0 0 1 3.78 5.709v1.08H24v-1.08a7.466 7.466 0 0 0-5.063-7.069 5.63 5.63 0 0 1-2.401.54 5.629 5.629 0 0 1-2.402-.54Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M30.632 21.434a4.763 4.763 0 0 0-4.763 4.763v1.81l.006.245a4.764 4.764 0 0 0 4.511 4.512l.246.006a4.764 4.764 0 0 0 4.756-4.518l.007-.244v-1.811a4.763 4.763 0 0 0-4.763-4.763Zm1.302 4.546c.236.317.532.55.857.711.418.21.887.306 1.34.348v.968a3.5 3.5 0 0 1-6.999 0v-.948h2.095c.34 0 1.133.015 1.839-.338.32-.16.627-.397.868-.741Zm-1.302-3.283a3.496 3.496 0 0 1 3.49 3.328 2.668 2.668 0 0 1-.88-.238 1.333 1.333 0 0 1-.576-.524c-.14-.239-.24-.58-.24-1.076h-1.01c0 .529-.11.883-.253 1.124-.14.238-.332.397-.55.506-.461.23-1.015.232-1.386.232H27.14a3.496 3.496 0 0 1 3.492-3.352Zm-14.096-1.263a4.763 4.763 0 0 0-4.763 4.763v1.81l.006.245a4.764 4.764 0 0 0 4.512 4.512l.245.006a4.763 4.763 0 0 0 4.757-4.518l.006-.244v-1.811a4.763 4.763 0 0 0-4.763-4.763Zm-1.278 4.546c.241.344.549.58.869.74.706.354 1.499.339 1.839.339h2.07v.948a3.5 3.5 0 0 1-7 0v-.967c.462-.04.94-.136 1.366-.349.325-.162.62-.394.856-.711Zm1.278-3.283a3.496 3.496 0 0 1 3.492 3.352h-2.062c-.372 0-.925-.002-1.387-.232a1.288 1.288 0 0 1-.55-.506c-.142-.24-.252-.595-.252-1.124h-1.01c0 .496-.1.837-.24 1.076a1.333 1.333 0 0 1-.576.524 2.72 2.72 0 0 1-.905.24 3.495 3.495 0 0 1 3.49-3.33Z\"\n />\n <path d=\"M15.792 12.518v1.263h7.205v-1.263h-7.205Zm0-2.063h11.594V9.192H15.792v1.263Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M15.073 5.701a3.158 3.158 0 0 0-3.158 3.158v5.85a3.158 3.158 0 0 0 3.158 3.159h7.136l4.878 3.285v-3.285h1.018a3.158 3.158 0 0 0 3.158-3.158V8.86a3.158 3.158 0 0 0-3.158-3.16H15.073Zm13.032 1.263c1.047 0 1.895.849 1.895 1.895v5.85a1.895 1.895 0 0 1-1.895 1.896h-2.282v2.173l-3.067-2.066-.16-.107h-7.523a1.895 1.895 0 0 1-1.895-1.895V8.86c0-1.047.849-1.896 1.895-1.896h13.032Z\"\n />\n </>\n );\n\n return getIcon({ size, isHovered, normal: small, normalHover: smallHover, xSmall, xSmallHover });\n};\n\nexport default PersonCommunication;\n"],"mappings":";;;AAIA,IAAM,uBAA+C,EAAE,MAAM,gBAAkD;CAqE7G,OAAO,QAAQ;EAAE;EAAM;EAAW,QAnEhC,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,ijBAAkjB,CAAA;GAC1jB,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD,EAAM,GAAE,4EAA6E,CAAA;GACrF,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAsDsC;EAAO,aAlD/C,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,siBAAuiB,CAAA;GAC/iB,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD,EAAM,GAAE,2EAA4E,CAAA;GACpF,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAqC0D;EAAY,QAjCxE,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,8gBAA+gB,CAAA;GACvhB,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD,EAAM,GAAE,kFAAmF,CAAA;GAC3F,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAoBsE;EAAQ,aAhBhF,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,qiBAAsiB,CAAA;GAC9iB,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD,EAAM,GAAE,+EAAgF,CAAA;GACxF,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAG8E;CAAY,CAAC;AACjG"}
@@ -0,0 +1,3 @@
1
+ import { SvgPathProps } from '../Icon';
2
+ declare const PersonDocument: React.FC<SvgPathProps>;
3
+ export default PersonDocument;
@@ -0,0 +1,65 @@
1
+ import { t as getIcon } from "../../utils.js";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/components/Icons/PersonDocument.tsx
4
+ var PersonDocument = ({ size, isHovered }) => {
5
+ return getIcon({
6
+ size,
7
+ isHovered,
8
+ normal: /* @__PURE__ */ jsxs(Fragment, { children: [
9
+ /* @__PURE__ */ jsx("path", { d: "M26.543 30.268a7.9 7.9 0 0 1 5.318 6.75h-1.306a6.6 6.6 0 0 0-3.992-5.352 7.234 7.234 0 0 1-2.153.461l-.41.012a7.229 7.229 0 0 1-2.565-.473 6.6 6.6 0 0 0-3.99 5.353h-1.307a7.9 7.9 0 0 1 5.318-6.751 5.953 5.953 0 0 0 5.087 0Zm-4.275-5.704a.4.4 0 1 1 0 .8.4.4 0 0 1 0-.8Zm3.517 0a.4.4 0 1 1-.001.8.4.4 0 0 1 0-.8Z" }),
10
+ /* @__PURE__ */ jsx("path", {
11
+ "fill-rule": "evenodd",
12
+ "clip-rule": "evenodd",
13
+ d: "M24.258 17.616a5.038 5.038 0 0 1 4.78 5.032v1.915l-.007.258A5.038 5.038 0 0 1 24 29.601l-.26-.007a5.039 5.039 0 0 1-4.772-4.773l-.007-.259v-1.915A5.038 5.038 0 0 1 24 17.61l.258.007Zm-1.61 4.83c-.248.329-.559.57-.898.739-.527.262-1.129.359-1.689.387v.99a3.939 3.939 0 0 0 7.877 0v-.987h-2.425c-.358 0-1.201.017-1.953-.36a2.456 2.456 0 0 1-.911-.77ZM24 18.708a3.939 3.939 0 0 0-3.935 3.764c.442-.027.856-.105 1.193-.273.255-.127.458-.302.603-.549.146-.25.252-.607.252-1.13h1.1l.005.2c.024.448.128.76.258.981.147.25.348.415.576.53.485.242 1.068.244 1.461.244h2.421A3.939 3.939 0 0 0 24 18.709Z"
14
+ }),
15
+ /* @__PURE__ */ jsx("path", {
16
+ "fill-rule": "evenodd",
17
+ "clip-rule": "evenodd",
18
+ d: "M37.263 41.685H10.737v-26.92h.002l8.447-8.447v-.002h18.077v35.369ZM19.186 14.768h-7.15v25.617h23.927V7.616H19.186v7.152Zm-5.552-1.2h4.352V9.215l-4.352 4.351Z"
19
+ })
20
+ ] }),
21
+ normalHover: /* @__PURE__ */ jsxs(Fragment, { children: [
22
+ /* @__PURE__ */ jsx("path", { d: "M26.543 30.268a7.9 7.9 0 0 1 5.318 6.75h-1.306a6.6 6.6 0 0 0-3.992-5.352 7.234 7.234 0 0 1-2.153.461l-.41.012a7.229 7.229 0 0 1-2.565-.473 6.6 6.6 0 0 0-3.99 5.353h-1.307a7.9 7.9 0 0 1 5.318-6.751 5.953 5.953 0 0 0 5.087 0Zm-4.275-5.704a.4.4 0 1 1 0 .8.4.4 0 0 1 0-.8Zm3.517 0a.4.4 0 1 1-.001.8.4.4 0 0 1 0-.8Z" }),
23
+ /* @__PURE__ */ jsx("path", {
24
+ "fill-rule": "evenodd",
25
+ "clip-rule": "evenodd",
26
+ d: "M24.258 17.616a5.038 5.038 0 0 1 4.78 5.032v1.915l-.007.258A5.038 5.038 0 0 1 24 29.601l-.26-.007a5.039 5.039 0 0 1-4.772-4.773l-.007-.259v-1.915A5.038 5.038 0 0 1 24 17.61l.258.007Zm-1.61 4.83c-.248.329-.559.57-.898.739-.527.262-1.129.359-1.689.387v.99a3.939 3.939 0 0 0 7.877 0v-.987h-2.425c-.358 0-1.201.017-1.953-.36a2.456 2.456 0 0 1-.911-.77ZM24 18.708a3.939 3.939 0 0 0-3.935 3.764c.442-.027.856-.105 1.193-.273.255-.127.458-.302.603-.549.146-.25.252-.607.252-1.13h1.1l.005.2c.024.448.128.76.258.981.147.25.348.415.576.53.485.242 1.068.244 1.461.244h2.421A3.939 3.939 0 0 0 24 18.709Z"
27
+ }),
28
+ /* @__PURE__ */ jsx("path", {
29
+ "fill-rule": "evenodd",
30
+ "clip-rule": "evenodd",
31
+ d: "M37.263 41.685H10.737V6.316h26.526v35.369Zm-25.226-1.3h23.926V7.616H12.037v32.769Z"
32
+ })
33
+ ] }),
34
+ xSmall: /* @__PURE__ */ jsxs(Fragment, { children: [
35
+ /* @__PURE__ */ jsx("path", { d: "M26.541 30.268a7.898 7.898 0 0 1 5.32 6.75h-1.654a6.252 6.252 0 0 0-3.659-4.982c-.672.24-1.382.39-2.119.431L24 32.48c-.89 0-1.747-.158-2.55-.444a6.253 6.253 0 0 0-3.657 4.982H16.14a7.899 7.899 0 0 1 5.319-6.75 5.951 5.951 0 0 0 5.082 0Zm-4.31-5.708a.363.363 0 1 1-.002.726.363.363 0 0 1 .002-.726Zm3.516 0Z" }),
36
+ /* @__PURE__ */ jsx("path", {
37
+ "fill-rule": "evenodd",
38
+ "clip-rule": "evenodd",
39
+ d: "M24 17.606a5.038 5.038 0 0 1 5.038 5.037v1.915A5.039 5.039 0 0 1 24 29.597l-.26-.007a5.038 5.038 0 0 1-4.778-5.032v-1.915A5.038 5.038 0 0 1 24 17.607Zm-1.35 4.97a2.628 2.628 0 0 1-.864.678c-.49.244-1.04.347-1.56.386v.918a3.776 3.776 0 1 0 7.549 0v-.904h-2.261c-.356 0-1.219.016-1.99-.369a2.553 2.553 0 0 1-.875-.71ZM24 18.869a3.775 3.775 0 0 0-3.765 3.503c.367-.035.707-.108.987-.248.242-.12.433-.287.569-.518.137-.234.241-.577.241-1.088h1.264l.005.196c.023.437.124.737.246.944.138.233.325.389.542.497.465.232 1.029.236 1.425.236h2.25A3.774 3.774 0 0 0 24 18.869Z"
40
+ }),
41
+ /* @__PURE__ */ jsx("path", {
42
+ "fill-rule": "evenodd",
43
+ "clip-rule": "evenodd",
44
+ d: "M37.263 41.682H10.737v-26.92l8.448-8.448 18.078-.002v35.37Zm-18.078-26.92h-6.87v25.341h23.37V7.893h-16.5v6.87ZM13.786 13.5h4.136V9.363L13.786 13.5Z"
45
+ })
46
+ ] }),
47
+ xSmallHover: /* @__PURE__ */ jsxs(Fragment, { children: [
48
+ /* @__PURE__ */ jsx("path", { d: "M26.541 30.27a7.898 7.898 0 0 1 5.32 6.75h-1.654a6.252 6.252 0 0 0-3.659-4.982 7.57 7.57 0 0 1-2.119.432l-.429.013c-.89 0-1.747-.158-2.55-.445a6.253 6.253 0 0 0-3.657 4.983H16.14a7.899 7.899 0 0 1 5.319-6.75 5.953 5.953 0 0 0 5.082 0Zm-4.31-5.707a.363.363 0 1 1-.002.725.363.363 0 0 1 .002-.725Zm3.516 0Z" }),
49
+ /* @__PURE__ */ jsx("path", {
50
+ "fill-rule": "evenodd",
51
+ "clip-rule": "evenodd",
52
+ d: "M24 17.608a5.038 5.038 0 0 1 5.038 5.038v1.915A5.039 5.039 0 0 1 24 29.6l-.26-.008a5.038 5.038 0 0 1-4.778-5.031v-1.915A5.038 5.038 0 0 1 24 17.608Zm-1.35 4.97a2.628 2.628 0 0 1-.864.679c-.49.244-1.04.347-1.56.386v.918a3.776 3.776 0 1 0 7.549 0v-.904h-2.261c-.356 0-1.219.016-1.99-.37a2.552 2.552 0 0 1-.875-.709ZM24 18.872a3.775 3.775 0 0 0-3.765 3.503c.367-.035.707-.108.987-.248.242-.121.433-.287.569-.518.137-.235.241-.578.241-1.088h1.264l.005.196c.023.437.124.737.246.944.138.233.325.388.542.497.465.232 1.029.235 1.425.235h2.25A3.774 3.774 0 0 0 24 18.872Z"
53
+ }),
54
+ /* @__PURE__ */ jsx("path", {
55
+ "fill-rule": "evenodd",
56
+ "clip-rule": "evenodd",
57
+ d: "M37.263 41.685H10.737V6.316h26.526v35.369Zm-24.947-1.58h23.368V7.896H12.316v32.21Z"
58
+ })
59
+ ] })
60
+ });
61
+ };
62
+ //#endregion
63
+ export { PersonDocument as default };
64
+
65
+ //# sourceMappingURL=PersonDocument.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PersonDocument.js","names":[],"sources":["../../../src/components/Icons/PersonDocument.tsx"],"sourcesContent":["import type { SvgPathProps } from '../Icon';\n\nimport { getIcon } from '../Icon/utils';\n\nconst PersonDocument: React.FC<SvgPathProps> = ({ size, isHovered }: SvgPathProps): React.ReactElement => {\n const small = (\n <>\n <path d=\"M26.543 30.268a7.9 7.9 0 0 1 5.318 6.75h-1.306a6.6 6.6 0 0 0-3.992-5.352 7.234 7.234 0 0 1-2.153.461l-.41.012a7.229 7.229 0 0 1-2.565-.473 6.6 6.6 0 0 0-3.99 5.353h-1.307a7.9 7.9 0 0 1 5.318-6.751 5.953 5.953 0 0 0 5.087 0Zm-4.275-5.704a.4.4 0 1 1 0 .8.4.4 0 0 1 0-.8Zm3.517 0a.4.4 0 1 1-.001.8.4.4 0 0 1 0-.8Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M24.258 17.616a5.038 5.038 0 0 1 4.78 5.032v1.915l-.007.258A5.038 5.038 0 0 1 24 29.601l-.26-.007a5.039 5.039 0 0 1-4.772-4.773l-.007-.259v-1.915A5.038 5.038 0 0 1 24 17.61l.258.007Zm-1.61 4.83c-.248.329-.559.57-.898.739-.527.262-1.129.359-1.689.387v.99a3.939 3.939 0 0 0 7.877 0v-.987h-2.425c-.358 0-1.201.017-1.953-.36a2.456 2.456 0 0 1-.911-.77ZM24 18.708a3.939 3.939 0 0 0-3.935 3.764c.442-.027.856-.105 1.193-.273.255-.127.458-.302.603-.549.146-.25.252-.607.252-1.13h1.1l.005.2c.024.448.128.76.258.981.147.25.348.415.576.53.485.242 1.068.244 1.461.244h2.421A3.939 3.939 0 0 0 24 18.709Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M37.263 41.685H10.737v-26.92h.002l8.447-8.447v-.002h18.077v35.369ZM19.186 14.768h-7.15v25.617h23.927V7.616H19.186v7.152Zm-5.552-1.2h4.352V9.215l-4.352 4.351Z\"\n />\n </>\n );\n\n const smallHover = (\n <>\n <path d=\"M26.543 30.268a7.9 7.9 0 0 1 5.318 6.75h-1.306a6.6 6.6 0 0 0-3.992-5.352 7.234 7.234 0 0 1-2.153.461l-.41.012a7.229 7.229 0 0 1-2.565-.473 6.6 6.6 0 0 0-3.99 5.353h-1.307a7.9 7.9 0 0 1 5.318-6.751 5.953 5.953 0 0 0 5.087 0Zm-4.275-5.704a.4.4 0 1 1 0 .8.4.4 0 0 1 0-.8Zm3.517 0a.4.4 0 1 1-.001.8.4.4 0 0 1 0-.8Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M24.258 17.616a5.038 5.038 0 0 1 4.78 5.032v1.915l-.007.258A5.038 5.038 0 0 1 24 29.601l-.26-.007a5.039 5.039 0 0 1-4.772-4.773l-.007-.259v-1.915A5.038 5.038 0 0 1 24 17.61l.258.007Zm-1.61 4.83c-.248.329-.559.57-.898.739-.527.262-1.129.359-1.689.387v.99a3.939 3.939 0 0 0 7.877 0v-.987h-2.425c-.358 0-1.201.017-1.953-.36a2.456 2.456 0 0 1-.911-.77ZM24 18.708a3.939 3.939 0 0 0-3.935 3.764c.442-.027.856-.105 1.193-.273.255-.127.458-.302.603-.549.146-.25.252-.607.252-1.13h1.1l.005.2c.024.448.128.76.258.981.147.25.348.415.576.53.485.242 1.068.244 1.461.244h2.421A3.939 3.939 0 0 0 24 18.709Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M37.263 41.685H10.737V6.316h26.526v35.369Zm-25.226-1.3h23.926V7.616H12.037v32.769Z\"\n />\n </>\n );\n\n const xSmall = (\n <>\n <path d=\"M26.541 30.268a7.898 7.898 0 0 1 5.32 6.75h-1.654a6.252 6.252 0 0 0-3.659-4.982c-.672.24-1.382.39-2.119.431L24 32.48c-.89 0-1.747-.158-2.55-.444a6.253 6.253 0 0 0-3.657 4.982H16.14a7.899 7.899 0 0 1 5.319-6.75 5.951 5.951 0 0 0 5.082 0Zm-4.31-5.708a.363.363 0 1 1-.002.726.363.363 0 0 1 .002-.726Zm3.516 0Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M24 17.606a5.038 5.038 0 0 1 5.038 5.037v1.915A5.039 5.039 0 0 1 24 29.597l-.26-.007a5.038 5.038 0 0 1-4.778-5.032v-1.915A5.038 5.038 0 0 1 24 17.607Zm-1.35 4.97a2.628 2.628 0 0 1-.864.678c-.49.244-1.04.347-1.56.386v.918a3.776 3.776 0 1 0 7.549 0v-.904h-2.261c-.356 0-1.219.016-1.99-.369a2.553 2.553 0 0 1-.875-.71ZM24 18.869a3.775 3.775 0 0 0-3.765 3.503c.367-.035.707-.108.987-.248.242-.12.433-.287.569-.518.137-.234.241-.577.241-1.088h1.264l.005.196c.023.437.124.737.246.944.138.233.325.389.542.497.465.232 1.029.236 1.425.236h2.25A3.774 3.774 0 0 0 24 18.869Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M37.263 41.682H10.737v-26.92l8.448-8.448 18.078-.002v35.37Zm-18.078-26.92h-6.87v25.341h23.37V7.893h-16.5v6.87ZM13.786 13.5h4.136V9.363L13.786 13.5Z\"\n />\n </>\n );\n\n const xSmallHover = (\n <>\n <path d=\"M26.541 30.27a7.898 7.898 0 0 1 5.32 6.75h-1.654a6.252 6.252 0 0 0-3.659-4.982 7.57 7.57 0 0 1-2.119.432l-.429.013c-.89 0-1.747-.158-2.55-.445a6.253 6.253 0 0 0-3.657 4.983H16.14a7.899 7.899 0 0 1 5.319-6.75 5.953 5.953 0 0 0 5.082 0Zm-4.31-5.707a.363.363 0 1 1-.002.725.363.363 0 0 1 .002-.725Zm3.516 0Z\" />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M24 17.608a5.038 5.038 0 0 1 5.038 5.038v1.915A5.039 5.039 0 0 1 24 29.6l-.26-.008a5.038 5.038 0 0 1-4.778-5.031v-1.915A5.038 5.038 0 0 1 24 17.608Zm-1.35 4.97a2.628 2.628 0 0 1-.864.679c-.49.244-1.04.347-1.56.386v.918a3.776 3.776 0 1 0 7.549 0v-.904h-2.261c-.356 0-1.219.016-1.99-.37a2.552 2.552 0 0 1-.875-.709ZM24 18.872a3.775 3.775 0 0 0-3.765 3.503c.367-.035.707-.108.987-.248.242-.121.433-.287.569-.518.137-.235.241-.578.241-1.088h1.264l.005.196c.023.437.124.737.246.944.138.233.325.388.542.497.465.232 1.029.235 1.425.235h2.25A3.774 3.774 0 0 0 24 18.872Z\"\n />\n <path\n fill-rule=\"evenodd\"\n clip-rule=\"evenodd\"\n d=\"M37.263 41.685H10.737V6.316h26.526v35.369Zm-24.947-1.58h23.368V7.896H12.316v32.21Z\"\n />\n </>\n );\n\n return getIcon({ size, isHovered, normal: small, normalHover: smallHover, xSmall, xSmallHover });\n};\n\nexport default PersonDocument;\n"],"mappings":";;;AAIA,IAAM,kBAA0C,EAAE,MAAM,gBAAkD;CAiExG,OAAO,QAAQ;EAAE;EAAM;EAAW,QA/DhC,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,yTAA0T,CAAA;GAClU,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAmDsC;EAAO,aA/C/C,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,yTAA0T,CAAA;GAClU,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAmC0D;EAAY,QA/BxE,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,qTAAsT,CAAA;GAC9T,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAmBsE;EAAQ,aAfhF,qBAAA,UAAA,EAAA,UAAA;GACE,oBAAC,QAAD,EAAM,GAAE,mTAAoT,CAAA;GAC5T,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;GACD,oBAAC,QAAD;IACE,aAAU;IACV,aAAU;IACV,GAAE;GACH,CAAA;EACD,EAAA,CAG8E;CAAY,CAAC;AACjG"}
@@ -1,2 +1,72 @@
1
- import { t as InfoTeaser_default } from "../../InfoTeaser.js";
1
+ import { AnalyticsId, IconSize, LanguageLocales } from "../../constants.js";
2
+ import { t as Icon_default } from "../../Icon.js";
3
+ import { useLanguage } from "../../hooks/useLanguage.js";
4
+ import { t as LazyIcon_default } from "../../LazyIcon.js";
5
+ import Title_default from "../Title/index.js";
6
+ import { useExpand } from "../../hooks/useExpand.js";
7
+ import { t as getResources } from "../../resourceHelper2.js";
8
+ import classNames from "classnames";
9
+ import { useId } from "react";
10
+ import { jsx, jsxs } from "react/jsx-runtime";
11
+ import styles from "./styles.module.scss";
12
+ //#region src/components/InfoTeaser/InfoTeaser.tsx
13
+ var InfoTeaser = (props) => {
14
+ const { buttonClassName, children, className, expanded = false, htmlMarkup = "div", onExpand, resources, svgIcon, testId, title, titleHtmlMarkup = "h2", collapsedMaxHeight } = props;
15
+ const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);
16
+ const { language } = useLanguage(LanguageLocales.NORWEGIAN);
17
+ const defaultResources = getResources(language);
18
+ const infoteaserTextId = useId();
19
+ const mergedResources = {
20
+ ...defaultResources,
21
+ ...resources
22
+ };
23
+ return /* @__PURE__ */ jsxs(htmlMarkup, {
24
+ className: styles.wrapper,
25
+ "data-testid": testId,
26
+ "data-analyticsid": AnalyticsId.InfoTeaser,
27
+ children: [/* @__PURE__ */ jsxs("div", {
28
+ className: classNames(styles.infoteaser, className, { [styles["infoteaser--collapsed"]]: !isExpanded }),
29
+ style: { maxHeight: !isExpanded ? collapsedMaxHeight ? collapsedMaxHeight : "12.25rem" : void 0 },
30
+ children: [
31
+ svgIcon && (typeof svgIcon === "string" ? /* @__PURE__ */ jsx(LazyIcon_default, {
32
+ iconName: svgIcon,
33
+ size: IconSize.Small,
34
+ className: styles.infoteaser__icon
35
+ }) : /* @__PURE__ */ jsx(Icon_default, {
36
+ svgIcon,
37
+ size: IconSize.Small,
38
+ className: styles.infoteaser__icon
39
+ })),
40
+ title && typeof title !== "undefined" && /* @__PURE__ */ jsx(Title_default, {
41
+ testId: "titleId",
42
+ htmlMarkup: titleHtmlMarkup,
43
+ appearance: "title4",
44
+ className: styles.infoteaser__title,
45
+ children: title
46
+ }),
47
+ /* @__PURE__ */ jsx("div", {
48
+ className: styles.infoteaser__text,
49
+ "aria-hidden": isExpanded ? false : true,
50
+ id: infoteaserTextId,
51
+ children
52
+ })
53
+ ]
54
+ }), /* @__PURE__ */ jsx("button", {
55
+ type: "button",
56
+ className: classNames(styles.infoteaser__button, buttonClassName),
57
+ onClick: () => {
58
+ setIsExpanded(!isExpanded);
59
+ },
60
+ "aria-expanded": isExpanded,
61
+ "aria-controls": infoteaserTextId,
62
+ children: isExpanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose
63
+ })]
64
+ });
65
+ };
66
+ //#endregion
67
+ //#region src/components/InfoTeaser/index.ts
68
+ var InfoTeaser_default = InfoTeaser;
69
+ //#endregion
2
70
  export { InfoTeaser_default as default };
71
+
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/InfoTeaser/InfoTeaser.tsx","../../../src/components/InfoTeaser/index.ts"],"sourcesContent":["import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\nimport type { SvgIcon } from '../Icon';\nimport type { IconName } from '../Icons/IconNames';\nimport type { TitleTags } from '../Title';\n\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport Icon, { IconSize } from '../Icon';\nimport LazyIcon from '../LazyIcon';\nimport Title from '../Title';\nimport { getResources } from './resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport type InfoTeaserTags = 'div' | 'section' | 'aside' | 'article';\n\nexport interface InfoTeaserProps {\n /** For overriding styling on the button */\n buttonClassName?: string;\n /** What's in the box? */\n children: React.ReactNode;\n /** Override the default max height for collapsed teaser. Default is 12.25rem */\n collapsedMaxHeight?: string;\n /** For overriding styling on infoteaser box */\n className?: string;\n /** Opens or closes the teaser */\n expanded?: boolean;\n /** Changes the underlying element of the wrapper */\n htmlMarkup?: InfoTeaserTags;\n /** Called when the teaser is expanded/collapsed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInfoTeaser>;\n /** Adds an icon */\n svgIcon?: SvgIcon | IconName;\n /** Sets the data-testid attribute */\n testId?: string;\n /** Title on top of the component */\n title?: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\nconst InfoTeaser: React.FC<InfoTeaserProps> = props => {\n const {\n buttonClassName,\n children,\n className,\n expanded = false,\n htmlMarkup = 'div',\n onExpand,\n resources,\n svgIcon,\n testId,\n title,\n titleHtmlMarkup = 'h2',\n collapsedMaxHeight,\n } = props;\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const infoteaserTextId = useId();\n\n const mergedResources: HNDesignsystemInfoTeaser = {\n ...defaultResources,\n ...resources,\n };\n\n const WrapperTag = htmlMarkup;\n\n return (\n <WrapperTag className={styles.wrapper} data-testid={testId} data-analyticsid={AnalyticsId.InfoTeaser}>\n <div\n className={classNames(styles.infoteaser, className, {\n [styles['infoteaser--collapsed']]: !isExpanded,\n })}\n style={{ maxHeight: !isExpanded ? (collapsedMaxHeight ? collapsedMaxHeight : '12.25rem') : undefined }}\n >\n {svgIcon &&\n (typeof svgIcon === 'string' ? (\n <LazyIcon iconName={svgIcon} size={IconSize.Small} className={styles.infoteaser__icon} />\n ) : (\n <Icon svgIcon={svgIcon} size={IconSize.Small} className={styles.infoteaser__icon} />\n ))}\n {title && typeof title !== 'undefined' && (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup} appearance=\"title4\" className={styles.infoteaser__title}>\n {title}\n </Title>\n )}\n <div className={styles.infoteaser__text} aria-hidden={isExpanded ? false : true} id={infoteaserTextId}>\n {children}\n </div>\n </div>\n <button\n type=\"button\"\n className={classNames(styles.infoteaser__button, buttonClassName)}\n onClick={() => {\n setIsExpanded(!isExpanded);\n }}\n aria-expanded={isExpanded}\n aria-controls={infoteaserTextId}\n >\n {isExpanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose}\n </button>\n </WrapperTag>\n );\n};\n\nexport default InfoTeaser;\n","import InfoTeaser from './InfoTeaser';\nexport * from './InfoTeaser';\nexport default InfoTeaser;\n"],"mappings":";;;;;;;;;;;;AAgDA,IAAM,cAAwC,UAAS;CACrD,MAAM,EACJ,iBACA,UACA,WACA,WAAW,OACX,aAAa,OACb,UACA,WACA,SACA,QACA,OACA,kBAAkB,MAClB,uBACE;CACJ,MAAM,CAAC,YAAY,iBAAiB,UAAU,UAAU,QAAQ;CAChE,MAAM,EAAE,aAAa,YAA6B,gBAAgB,SAAS;CAC3E,MAAM,mBAAmB,aAAa,QAAQ;CAC9C,MAAM,mBAAmB,MAAM;CAE/B,MAAM,kBAA4C;EAChD,GAAG;EACH,GAAG;CACL;CAIA,OACE,qBAAC,YAAD;EAAY,WAAW,OAAO;EAAS,eAAa;EAAQ,oBAAkB,YAAY;EAA1F,UAAA,CACE,qBAAC,OAAD;GACE,WAAW,WAAW,OAAO,YAAY,WAAW,GACjD,OAAO,2BAA2B,CAAC,WACtC,CAAC;GACD,OAAO,EAAE,WAAW,CAAC,aAAc,qBAAqB,qBAAqB,aAAc,KAAA,EAAU;GAJvG,UAAA;IAMG,YACE,OAAO,YAAY,WAClB,oBAAC,kBAAD;KAAU,UAAU;KAAS,MAAM,SAAS;KAAO,WAAW,OAAO;IAAmB,CAAA,IAExF,oBAAC,cAAD;KAAe;KAAS,MAAM,SAAS;KAAO,WAAW,OAAO;IAAmB,CAAA;IAEtF,SAAS,OAAO,UAAU,eACzB,oBAAC,eAAD;KAAO,QAAO;KAAU,YAAY;KAAiB,YAAW;KAAS,WAAW,OAAO;KACxF,UAAA;IACI,CAAA;IAET,oBAAC,OAAD;KAAK,WAAW,OAAO;KAAkB,eAAa,aAAa,QAAQ;KAAM,IAAI;KAClF;IACE,CAAA;GACF;EACL,CAAA,GAAA,oBAAC,UAAD;GACE,MAAK;GACL,WAAW,WAAW,OAAO,oBAAoB,eAAe;GAChE,eAAe;IACb,cAAc,CAAC,UAAU;GAC3B;GACA,iBAAe;GACf,iBAAe;GAEd,UAAA,aAAa,gBAAgB,mBAAmB,gBAAgB;EAC3D,CAAA,CACE;;AAEhB;;;AC7GA,IAAA,qBAAe"}
@@ -1,9 +1,9 @@
1
1
  @use 'sass:map';
2
- @use '../../scss/spacers' as spacers;
3
2
  @use '../../scss/palette' as palette;
4
3
  @use '../../scss/font-settings' as font-settings;
5
4
  @use '../../scss/breakpoints' as breakpoints;
6
5
  @use '../../scss/screen-reader' as *;
6
+ @import '../../scss/supernova/styles/spacers';
7
7
 
8
8
  $padding-clickable-area-top-bottom: 8px;
9
9
  $padding-clickable-area-left: 8px;
@@ -19,10 +19,10 @@ $padding-clickable-area-left: 8px;
19
19
  margin-left: -$padding-clickable-area-left;
20
20
 
21
21
  &__large {
22
- margin: spacers.getSpacer(2xs) 0;
22
+ margin-bottom: var(--core-space-2xs);
23
23
 
24
24
  &:has(input:focus-visible) {
25
- box-shadow: 0 0 0 spacers.getSpacer(3xs);
25
+ box-shadow: 0 0 0 var(--core-space-3xs);
26
26
  color: palette.$neutral500;
27
27
  }
28
28
 
@@ -62,7 +62,7 @@ $padding-clickable-area-left: 8px;
62
62
  }
63
63
 
64
64
  &__large {
65
- padding: spacers.getSpacer(s);
65
+ padding: var(--core-space-s);
66
66
  background-color: palette.$neutral50;
67
67
  border: 1px solid transparent;
68
68
 
@@ -168,7 +168,7 @@ $padding-clickable-area-left: 8px;
168
168
 
169
169
  @media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
170
170
  &__large {
171
- padding: 1.68rem spacers.getSpacer(l);
171
+ padding: 1.68rem var(--core-space-l);
172
172
  }
173
173
  }
174
174
  }
@@ -178,7 +178,7 @@ $padding-clickable-area-left: 8px;
178
178
  }
179
179
 
180
180
  .radio-button__marker-wrapper {
181
- margin-right: spacers.getSpacer(s);
181
+ margin-right: var(--core-space-s);
182
182
  }
183
183
 
184
184
  .radiobutton-sublabel-wrapper {
@@ -1,176 +1,2 @@
1
- import { AnalyticsId } from "../../constants.js";
2
- import { usePseudoClasses } from "../../hooks/usePseudoClasses.js";
3
- import classNames from "classnames";
4
- import React, { useEffect, useId, useState } from "react";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { useAnimate } from "motion/react";
7
- import styles from "./styles.module.scss";
8
- //#region src/components/Toggle/constants.ts
9
- var TogglePosition = /* @__PURE__ */ function(TogglePosition) {
10
- TogglePosition["left"] = "left";
11
- TogglePosition["right"] = "right";
12
- return TogglePosition;
13
- }({});
14
- var ToggleOnColor = /* @__PURE__ */ function(ToggleOnColor) {
15
- ToggleOnColor["onwhite"] = "onwhite";
16
- ToggleOnColor["onneutral"] = "onneutral";
17
- ToggleOnColor["onblueberry"] = "onblueberry";
18
- return ToggleOnColor;
19
- }({});
20
- //#endregion
21
- //#region src/components/Toggle/Toggle.tsx
22
- var Toggle = ({ checked = false, disabled, label, onChange, onColor = ToggleOnColor.onwhite, statusText, subLabel, togglePosition = TogglePosition.left, testId }) => {
23
- const [checkedControlledState, setCheckedControlledState] = useState(checked);
24
- const [checkedState, setCheckedState] = useState(checked);
25
- const [showToggleAnimation, setShowToggleAnimation] = useState(false);
26
- const [scope, animate] = useAnimate();
27
- const baseId = useId();
28
- const toggleId = "toggle-" + baseId;
29
- const inputId = "input-" + baseId;
30
- const labelId = "label-" + baseId;
31
- const subLabelId = "sublabel-" + baseId;
32
- const toggleRef = React.useRef(null);
33
- const toggleDotRef = React.useRef(null);
34
- const { refObject, isHovered, isActive } = usePseudoClasses(scope);
35
- const showHoveredStyling = isHovered && !showToggleAnimation;
36
- const isOnWhite = onColor === ToggleOnColor.onwhite;
37
- const animationDuration = disabled ? 0 : .2;
38
- const dotBackgroundColor = disabled ? "var(--color-disabled-graphics)" : checkedState ? "var(--color-action-graphics-ondark)" : "var(--core-color-neutral-700)";
39
- if (checked !== checkedControlledState && typeof checked !== "undefined") {
40
- setCheckedControlledState(checked);
41
- if (typeof checked !== "undefined") setCheckedState(checked);
42
- }
43
- const getBackgroundColor = () => {
44
- if (disabled) return "transparent";
45
- else if (checkedState && isActive) return "var(--core-color-blueberry-800)";
46
- else if (checkedState) return showHoveredStyling ? "var(--color-action-graphics-onlight-hover)" : "var(--color-action-graphics-onlight)";
47
- else if (isOnWhite && isActive) return "var(--core-color-neutral-400)";
48
- else if (isOnWhite) return showHoveredStyling ? "var(--core-color-neutral-200)" : "var(--core-color-neutral-50)";
49
- else if (isActive) return "var(--core-color-neutral-200)";
50
- else return showHoveredStyling ? "var(--core-color-neutral-50)" : "var(--core-color-white)";
51
- };
52
- useEffect(() => {
53
- if (showToggleAnimation) {
54
- const timer = setTimeout(() => setShowToggleAnimation(false), 300);
55
- return () => clearTimeout(timer);
56
- }
57
- }, [showToggleAnimation]);
58
- useEffect(() => {
59
- if (!toggleRef.current || !toggleDotRef.current) return;
60
- animate(toggleRef.current, { background: getBackgroundColor() }, {
61
- duration: animationDuration,
62
- ease: "easeInOut"
63
- });
64
- animate(toggleDotRef.current, { background: dotBackgroundColor }, {
65
- duration: animationDuration,
66
- ease: "easeInOut"
67
- });
68
- animate(toggleDotRef.current, { x: checkedState ? 16 : 0 }, {
69
- duration: animationDuration,
70
- ease: "easeInOut"
71
- });
72
- animate("svg", { opacity: checkedState ? 1 : 0 }, {
73
- duration: animationDuration,
74
- ease: "easeInOut"
75
- });
76
- }, [
77
- checkedState,
78
- showHoveredStyling,
79
- isActive,
80
- disabled
81
- ]);
82
- const handleChange = (event) => {
83
- setCheckedState(event.target.checked);
84
- setShowToggleAnimation(true);
85
- onChange?.(event);
86
- };
87
- const toggleContainerClassNames = classNames(styles["toggle-container"], {
88
- [styles["toggle-container--position-right"]]: togglePosition === TogglePosition.right,
89
- [styles["toggle-container--with-status"]]: statusText !== void 0 && statusText !== null,
90
- [styles["toggle-container--disabled"]]: disabled
91
- });
92
- const subLabelClassNames = classNames(styles["toggle-container__sublabel"]);
93
- const statusTextClassNames = classNames(styles["toggle-container__status"], { [styles["toggle-container__status--checked"]]: checkedState });
94
- const toggleClassNames = classNames(styles["toggle-container__toggle"], {
95
- [styles["toggle-container__toggle--ignore-hover"]]: showToggleAnimation,
96
- [styles["toggle-container__toggle--on-white"]]: onColor === ToggleOnColor.onwhite
97
- });
98
- const toggleDotClassNames = classNames(styles["toggle-container__toggle__dot"], { [styles["toggle-container__toggle__dot--ignore-hover"]]: showToggleAnimation });
99
- const renderToggle = () => /* @__PURE__ */ jsxs("div", {
100
- className: styles["toggle-container__outer-toggle"],
101
- children: [/* @__PURE__ */ jsxs("label", {
102
- ref: refObject,
103
- className: styles["toggle-container__toggle-group"],
104
- children: [/* @__PURE__ */ jsx("input", {
105
- disabled,
106
- id: inputId,
107
- type: "checkbox",
108
- checked: checkedState,
109
- onChange: handleChange,
110
- className: styles["toggle-container__input"],
111
- "aria-label": label.map((l) => l.text).join(" "),
112
- "aria-describedby": [subLabel ? subLabelId : null, statusText ? toggleId + "-status" : null].filter(Boolean).join(" ") || void 0,
113
- role: "switch"
114
- }), /* @__PURE__ */ jsx("span", {
115
- id: toggleId,
116
- ref: toggleRef,
117
- className: toggleClassNames,
118
- "aria-hidden": "true",
119
- children: /* @__PURE__ */ jsx("span", {
120
- ref: toggleDotRef,
121
- className: toggleDotClassNames,
122
- "aria-hidden": "true",
123
- children: /* @__PURE__ */ jsx("svg", {
124
- width: "12",
125
- height: "12",
126
- viewBox: "0 0 12 12",
127
- fill: "none",
128
- xmlns: "http://www.w3.org/2000/svg",
129
- className: styles["toggle-container__toggle__dot__icon"],
130
- children: /* @__PURE__ */ jsx("path", {
131
- d: "M11 2.65247L4.69877 9.34741L1 5.41836",
132
- strokeWidth: "2.2"
133
- })
134
- })
135
- })
136
- })]
137
- }), statusText && /* @__PURE__ */ jsx("span", {
138
- className: statusTextClassNames,
139
- id: toggleId + "-status",
140
- children: checkedState ? statusText.checked : statusText.unchecked
141
- })]
142
- });
143
- const renderLabelText = () => {
144
- return /* @__PURE__ */ jsxs("div", {
145
- className: styles["toggle-container__outer-label"],
146
- children: [/* @__PURE__ */ jsx("span", {
147
- id: labelId,
148
- className: styles["toggle-container__label"],
149
- children: label.map((labelText) => {
150
- const labelClassNames = classNames({ [styles["toggle-container__label__text--subdued"]]: labelText.type === "subdued" });
151
- return /* @__PURE__ */ jsx("span", {
152
- className: labelClassNames,
153
- children: labelText.text
154
- }, labelId + labelText.text);
155
- })
156
- }), subLabel && /* @__PURE__ */ jsx("div", {
157
- id: subLabelId,
158
- className: subLabelClassNames,
159
- children: subLabel
160
- })]
161
- });
162
- };
163
- return /* @__PURE__ */ jsxs("div", {
164
- className: toggleContainerClassNames,
165
- "data-testid": testId,
166
- "data-analyticsid": AnalyticsId.Toggle,
167
- children: [togglePosition === TogglePosition.left && /* @__PURE__ */ jsxs(Fragment, { children: [renderToggle(), renderLabelText()] }), togglePosition === TogglePosition.right && /* @__PURE__ */ jsxs(Fragment, { children: [renderLabelText(), renderToggle()] })]
168
- });
169
- };
170
- //#endregion
171
- //#region src/components/Toggle/index.ts
172
- var Toggle_default = Toggle;
173
- //#endregion
1
+ import { n as ToggleOnColor, r as TogglePosition, t as Toggle_default } from "../../Toggle.js";
174
2
  export { ToggleOnColor, TogglePosition, Toggle_default as default };
175
-
176
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,22 @@
1
+ import { LanguageLocales } from "./constants.js";
2
+ var HN_Designsystem_InfoTeaser_en_GB_default = {
3
+ expandButtonOpen: "Show less",
4
+ expandButtonClose: "Show more"
5
+ };
6
+ var HN_Designsystem_InfoTeaser_nb_NO_default = {
7
+ expandButtonOpen: "Vis mindre",
8
+ expandButtonClose: "Vis mer"
9
+ };
10
+ //#endregion
11
+ //#region src/components/InfoTeaser/resourceHelper.ts
12
+ var getResources = (language) => {
13
+ switch (language) {
14
+ case LanguageLocales.ENGLISH: return HN_Designsystem_InfoTeaser_en_GB_default;
15
+ case LanguageLocales.NORWEGIAN:
16
+ default: return HN_Designsystem_InfoTeaser_nb_NO_default;
17
+ }
18
+ };
19
+ //#endregion
20
+ export { getResources as t };
21
+
22
+ //# sourceMappingURL=resourceHelper2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceHelper2.js","names":[],"sources":["../src/resources/HN.Designsystem.InfoTeaser.en-GB.json","../src/resources/HN.Designsystem.InfoTeaser.nb-NO.json","../src/components/InfoTeaser/resourceHelper.ts"],"sourcesContent":["{\n \"expandButtonOpen\": \"Show less\",\n \"expandButtonClose\": \"Show more\"\n}\n","{\n \"expandButtonOpen\": \"Vis mindre\",\n \"expandButtonClose\": \"Vis mer\"\n}\n","import type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.InfoTeaser.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.InfoTeaser.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemInfoTeaser => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n"],"mappings":";;;;;;;;;;;AEMA,IAAa,gBAAgB,aAAwD;CACnF,QAAQ,UAAR;EACE,KAAK,gBAAgB,SACnB,OAAO;EACT,KAAK,gBAAgB;EACrB,SACE,OAAO;CACX;AACF"}
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare const isCompactComponent: (child: React.ReactNode) => boolean;
3
+ export declare const hasSublabel: (child: React.ReactNode) => boolean;
@@ -0,0 +1,16 @@
1
+ import { isComponent } from "./component.js";
2
+ import { t as Checkbox } from "../Checkbox.js";
3
+ import { t as RadioButton } from "../RadioButton.js";
4
+ import { t as Toggle_default } from "../Toggle.js";
5
+ import React from "react";
6
+ //#region src/utils/formSpacing.ts
7
+ var isCompactComponent = (child) => isComponent(child, Checkbox) || isComponent(child, RadioButton) || isComponent(child, Toggle_default);
8
+ var hasSublabel = (child) => {
9
+ if (isComponent(child, Checkbox) || isComponent(child, RadioButton)) return React.isValidElement(child.props.label) && !!child.props.label.props.sublabel;
10
+ if (isComponent(child, Toggle_default)) return !!child.props.subLabel;
11
+ return false;
12
+ };
13
+ //#endregion
14
+ export { hasSublabel, isCompactComponent };
15
+
16
+ //# sourceMappingURL=formSpacing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formSpacing.js","names":[],"sources":["../../src/utils/formSpacing.ts"],"sourcesContent":["import React from 'react';\n\nimport type { CheckboxProps } from '../components/Checkbox/Checkbox';\nimport type { LabelProps } from '../components/Label';\nimport type { RadioButtonProps } from '../components/RadioButton/RadioButton';\nimport type { ToggleProps } from '../components/Toggle';\n\nimport { isComponent } from './component';\nimport Checkbox from '../components/Checkbox/Checkbox';\nimport RadioButton from '../components/RadioButton/RadioButton';\nimport Toggle from '../components/Toggle';\n\nexport const isCompactComponent = (child: React.ReactNode): boolean =>\n isComponent<CheckboxProps>(child, Checkbox) ||\n isComponent<RadioButtonProps>(child, RadioButton) ||\n isComponent<ToggleProps>(child, Toggle);\n\nexport const hasSublabel = (child: React.ReactNode): boolean => {\n if (isComponent<CheckboxProps>(child, Checkbox) || isComponent<RadioButtonProps>(child, RadioButton)) {\n return React.isValidElement<LabelProps>(child.props.label) && !!child.props.label.props.sublabel;\n }\n if (isComponent<ToggleProps>(child, Toggle)) {\n return !!child.props.subLabel;\n }\n return false;\n};\n"],"mappings":";;;;;;AAYA,IAAa,sBAAsB,UACjC,YAA2B,OAAO,QAAQ,KAC1C,YAA8B,OAAO,WAAW,KAChD,YAAyB,OAAO,cAAM;AAExC,IAAa,eAAe,UAAoC;CAC9D,IAAI,YAA2B,OAAO,QAAQ,KAAK,YAA8B,OAAO,WAAW,GACjG,OAAO,MAAM,eAA2B,MAAM,MAAM,KAAK,KAAK,CAAC,CAAC,MAAM,MAAM,MAAM,MAAM;CAE1F,IAAI,YAAyB,OAAO,cAAM,GACxC,OAAO,CAAC,CAAC,MAAM,MAAM;CAEvB,OAAO;AACT"}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@helsenorge/designsystem-react",
3
3
  "sideEffects": false,
4
4
  "private": false,
5
- "version": "15.5.1",
5
+ "version": "15.7.0",
6
6
  "description": "The official design system for Helsenorge built with React.",
7
7
  "repository": {
8
8
  "type": "git",