@helsenorge/designsystem-react 4.3.0 → 4.4.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 (125) hide show
  1. package/CHANGELOG.md +28 -3
  2. package/Close.js +1 -1
  3. package/Close.js.map +1 -1
  4. package/ListHeader.js +1 -1
  5. package/ListHeader.js.map +1 -1
  6. package/Panel.js +1 -1
  7. package/Panel.js.map +1 -1
  8. package/Table.js +1 -1
  9. package/Table.js.map +1 -1
  10. package/TableBody.js +1 -1
  11. package/TableBody.js.map +1 -1
  12. package/TableExpandedRow.js +1 -1
  13. package/TableExpandedRow.js.map +1 -1
  14. package/TableHead.js +1 -1
  15. package/TableHead.js.map +1 -1
  16. package/TableRow.js +1 -1
  17. package/TableRow.js.map +1 -1
  18. package/Textarea.js +1 -1
  19. package/Textarea.js.map +1 -1
  20. package/Trigger.js +2 -0
  21. package/Trigger.js.map +1 -0
  22. package/components/AnchorLink/index.js +1 -1
  23. package/components/Button/index.js +1 -1
  24. package/components/ButtonWithModal/index.js +1 -1
  25. package/components/ButtonWithModal/index.js.map +1 -1
  26. package/components/Checkbox/styles.module.scss +13 -0
  27. package/components/Close/Close.d.ts +0 -2
  28. package/components/Close/Close.d.ts.map +1 -1
  29. package/components/Close/componentdata.json +1 -1
  30. package/components/Close/index.js +1 -1
  31. package/components/Dropdown/index.js +1 -1
  32. package/components/Dropdown/index.js.map +1 -1
  33. package/components/Dropdown/styles.module.scss +1 -0
  34. package/components/Expander/index.js +1 -1
  35. package/components/Expander/index.js.map +1 -1
  36. package/components/ExpanderHierarchy/ExpanderButton.d.ts.map +1 -1
  37. package/components/ExpanderHierarchy/expander.module.scss +14 -7
  38. package/components/ExpanderHierarchy/expander.module.scss.d.ts +2 -0
  39. package/components/ExpanderHierarchy/index.js +1 -1
  40. package/components/ExpanderHierarchy/index.js.map +1 -1
  41. package/components/ExpanderList/index.js +1 -1
  42. package/components/ExpanderList/index.js.map +1 -1
  43. package/components/FormExample/index.js +1 -1
  44. package/components/HelpBubble/index.js +1 -1
  45. package/components/HelpBubbleExample/index.js +1 -1
  46. package/components/HelpBubbleExample/index.js.map +1 -1
  47. package/components/HelpQuestion/HelpQuestion.d.ts +22 -0
  48. package/components/HelpQuestion/HelpQuestion.d.ts.map +1 -0
  49. package/components/HelpQuestion/componentdata.json +1 -0
  50. package/components/HelpQuestion/index.d.ts +4 -0
  51. package/components/HelpQuestion/index.d.ts.map +1 -0
  52. package/components/HelpQuestion/index.js +2 -0
  53. package/components/HelpQuestion/index.js.map +1 -0
  54. package/components/HelpQuestion/styles.module.scss +49 -0
  55. package/components/HelpQuestion/styles.module.scss.d.ts +10 -0
  56. package/components/Label/componentdata.json +1 -1
  57. package/components/LinkList/index.js +1 -1
  58. package/components/Logo/Logo.d.ts +2 -2
  59. package/components/Logo/Logo.d.ts.map +1 -1
  60. package/components/Logo/componentdata.json +1 -1
  61. package/components/Logo/index.js +1 -1
  62. package/components/Logo/index.js.map +1 -1
  63. package/components/Modal/index.js +1 -1
  64. package/components/Modal/styles.module.scss +1 -0
  65. package/components/NotificationPanel/index.js +1 -1
  66. package/components/NotificationPanel/index.js.map +1 -1
  67. package/components/Panel/Panel.d.ts +2 -2
  68. package/components/Panel/Panel.d.ts.map +1 -1
  69. package/components/Panel/componentdata.json +1 -1
  70. package/components/Panel/index.js +1 -1
  71. package/components/Panel/styles.module.scss +1 -0
  72. package/components/PanelList/index.js +1 -1
  73. package/components/PanelList/index.js.map +1 -1
  74. package/components/PopMenu/PopMenu.d.ts.map +1 -1
  75. package/components/PopMenu/index.js +1 -1
  76. package/components/PopMenu/index.js.map +1 -1
  77. package/components/RadioButton/styles.module.scss +13 -0
  78. package/components/ServiceMessage/ServiceMessage.d.ts +6 -3
  79. package/components/ServiceMessage/ServiceMessage.d.ts.map +1 -1
  80. package/components/ServiceMessage/componentdata.json +1 -1
  81. package/components/ServiceMessage/index.js +1 -1
  82. package/components/ServiceMessage/index.js.map +1 -1
  83. package/components/ServiceMessage/styles.module.scss +139 -238
  84. package/components/ServiceMessage/styles.module.scss.d.ts +17 -34
  85. package/components/Step/Step.d.ts +2 -0
  86. package/components/Step/Step.d.ts.map +1 -1
  87. package/components/Step/componentdata.json +1 -1
  88. package/components/Step/index.js +1 -1
  89. package/components/Step/index.js.map +1 -1
  90. package/components/Step/styles.module.scss +23 -1
  91. package/components/Step/styles.module.scss.d.ts +5 -1
  92. package/components/Table/TableExpandedRow/TableExpandedRow.d.ts +3 -1
  93. package/components/Table/TableExpandedRow/TableExpandedRow.d.ts.map +1 -1
  94. package/components/Table/TableExpandedRow/componentdata.json +1 -1
  95. package/components/Table/TableExpandedRow/index.js +1 -1
  96. package/components/Table/TableExpanderCell/index.js +1 -1
  97. package/components/Table/TableRow/index.js +1 -1
  98. package/components/Table/index.js +1 -1
  99. package/components/Tag/index.js +1 -1
  100. package/components/Tag/index.js.map +1 -1
  101. package/components/Tile/index.js +1 -1
  102. package/components/Tile/index.js.map +1 -1
  103. package/components/Tooltip/index.js +1 -1
  104. package/components/TooltipExample/index.js +1 -1
  105. package/components/TooltipExample/index.js.map +1 -1
  106. package/components/Trigger/Trigger.d.ts +9 -0
  107. package/components/Trigger/Trigger.d.ts.map +1 -1
  108. package/components/Trigger/componentdata.json +1 -1
  109. package/components/Trigger/index.js +1 -1
  110. package/components/Trigger/index.js.map +1 -1
  111. package/components/Trigger/styles.module.scss +23 -20
  112. package/components/Trigger/styles.module.scss.d.ts +2 -0
  113. package/constants.d.ts +4 -3
  114. package/constants.d.ts.map +1 -1
  115. package/constants.js +1 -1
  116. package/constants.js.map +1 -1
  117. package/hooks/useHover.d.ts.map +1 -1
  118. package/hooks/useHover.js +1 -1
  119. package/hooks/useHover.js.map +1 -1
  120. package/hooks/useSticky.d.ts +5 -4
  121. package/hooks/useSticky.d.ts.map +1 -1
  122. package/hooks/useSticky.js +1 -1
  123. package/hooks/useSticky.js.map +1 -1
  124. package/index.js +1 -1
  125. package/package.json +4 -1
@@ -1 +1 @@
1
- {"props":{"title":{"defaultValue":null,"description":"Title of the panel","name":"title","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"titleHtmlMarkup":{"defaultValue":null,"description":"Changes the underlying element of the title. Default: h2","name":"titleHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"TitleTags","value":[{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"span\""}]}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"status":{"defaultValue":null,"description":"Displays a status on the left side: defualt normal","name":"status","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"normal\" | \"new\" | \"error\" | \"draft\"","value":[{"value":"\"normal\""},{"value":"\"new\""},{"value":"\"error\""},{"value":"\"draft\""}]}},"statusMessage":{"defaultValue":null,"description":"Displayed on top of the panel with a status icon","name":"statusMessage","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":null,"description":"Changes the visual representation of the panel.","name":"variant","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"fill\" | \"white\" | \"stroke\" | \"line\"","value":[{"value":"\"fill\""},{"value":"\"white\""},{"value":"\"stroke\""},{"value":"\"line\""}]}},"url":{"defaultValue":null,"description":"Url to details, renders as a button with anchor tag","name":"url","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"target used in the button: default is _self","name":"target","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"AnchorTarget","value":[{"value":"\"_self\""},{"value":"\"_blank\""},{"value":"\"_parent\""},{"value":"\"_top\""}]}},"icon":{"defaultValue":null,"description":"Icon displayed in title","name":"icon","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"iconRight":{"defaultValue":null,"description":"Display icon on right","name":"iconRight","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"contentA":{"defaultValue":null,"description":"Panel section A content","name":"contentA","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"contentB":{"defaultValue":null,"description":"Panel section B content","name":"contentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"prioritiseMetaDataInContentB":{"defaultValue":null,"description":"A version of panel that prioritises content-B visually and audibly","name":"prioritiseMetaDataInContentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"buttonText":{"defaultValue":null,"description":"Panel button text","name":"buttonText","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonTextClose":{"defaultValue":null,"description":"Panel button close text","name":"buttonTextClose","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonHtmlMarkup":{"defaultValue":null,"description":"HTML markup for panel button. Default: a","name":"buttonHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"ButtonTags","value":[{"value":"\"button\""},{"value":"\"a\""}]}},"buttonOnClick":{"defaultValue":null,"description":"Callback when panel button is clicked","name":"buttonOnClick","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((e?: MouseEvent<HTMLElement, MouseEvent> | FormEvent<{}> | KeyboardEvent<HTMLUListElement> | null) => void)"}},"buttonAriaLabelledById":{"defaultValue":null,"description":"Panel button is aria-labelledby the text in the button itself + the element set in buttonAriaLabelledById. Default: auto-generated id for title (if title is set).","name":"buttonAriaLabelledById","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonAriaLabel":{"defaultValue":null,"description":"Panel button aria label","name":"buttonAriaLabel","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"showCloseButtonInExpand":{"defaultValue":null,"description":"@deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0","name":"showCloseButtonInExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"layout":{"defaultValue":null,"description":"Layout (see description)","name":"layout","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"layout1\" | \"layout2\" | \"layout3a\" | \"layout3b\" | \"layout3c\"","value":[{"value":"\"layout1\""},{"value":"\"layout2\""},{"value":"\"layout3a\""},{"value":"\"layout3b\""},{"value":"\"layout3c\""}]}},"containerAsButton":{"defaultValue":null,"description":"Clicking anywhere on the container will trigger a click on the panel's button","name":"containerAsButton","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"time":{"defaultValue":null,"description":"Displays time with icon","name":"time","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"date":{"defaultValue":null,"description":"Displays date with icon","name":"date","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"noTopBorder":{"defaultValue":null,"description":"Removes top border when variant is \"line\"","name":"noTopBorder","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Opens or closes the panel","name":"expanded","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"onExpand":{"defaultValue":null,"description":"Called when panel is open/closed.","name":"onExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((isExpanded: boolean) => void)"}},"renderChildrenWhenClosed":{"defaultValue":null,"description":"Whether to render children when closed (in which case they are hidden with CSS). Default: false","name":"renderChildrenWhenClosed","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"focusable":{"defaultValue":null,"description":"Whether panel is focusable or not","name":"focusable","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":true,"type":{"name":"boolean"}}}}
1
+ {"props":{"title":{"defaultValue":null,"description":"Title of the panel","name":"title","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"titleHtmlMarkup":{"defaultValue":null,"description":"Changes the underlying element of the title. Default: h2","name":"titleHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"TitleTags","value":[{"value":"\"h1\""},{"value":"\"h2\""},{"value":"\"h3\""},{"value":"\"h4\""},{"value":"\"h5\""},{"value":"\"span\""}]}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"status":{"defaultValue":null,"description":"Displays a status on the left side: defualt normal","name":"status","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"normal\" | \"new\" | \"error\" | \"draft\"","value":[{"value":"\"normal\""},{"value":"\"new\""},{"value":"\"error\""},{"value":"\"draft\""}]}},"statusMessage":{"defaultValue":null,"description":"Displayed on top of the panel with a status icon","name":"statusMessage","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":null,"description":"Changes the visual representation of the panel.","name":"variant","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"fill\" | \"white\" | \"stroke\" | \"line\"","value":[{"value":"\"fill\""},{"value":"\"white\""},{"value":"\"stroke\""},{"value":"\"line\""}]}},"url":{"defaultValue":null,"description":"Url to details, renders as a button with anchor tag","name":"url","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":null,"description":"target used in the button: default is _self","name":"target","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"AnchorTarget","value":[{"value":"\"_self\""},{"value":"\"_blank\""},{"value":"\"_parent\""},{"value":"\"_top\""}]}},"icon":{"defaultValue":null,"description":"Icon displayed in title","name":"icon","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"iconRight":{"defaultValue":null,"description":"Display icon on right","name":"iconRight","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"contentA":{"defaultValue":null,"description":"Panel section A content","name":"contentA","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"contentB":{"defaultValue":null,"description":"Panel section B content","name":"contentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"ReactNode"}},"prioritiseMetaDataInContentB":{"defaultValue":null,"description":"A version of panel that prioritises content-B visually and audibly","name":"prioritiseMetaDataInContentB","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"buttonText":{"defaultValue":null,"description":"Panel button text","name":"buttonText","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonTextClose":{"defaultValue":null,"description":"Panel button close text","name":"buttonTextClose","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonHtmlMarkup":{"defaultValue":null,"description":"HTML markup for panel button. Default: a","name":"buttonHtmlMarkup","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"ButtonTags","value":[{"value":"\"button\""},{"value":"\"a\""}]}},"buttonOnClick":{"defaultValue":null,"description":"Callback when panel button is clicked","name":"buttonOnClick","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((e?: MouseEvent<HTMLElement, MouseEvent> | FormEvent<{}> | KeyboardEvent<HTMLUListElement> | null) => void)"}},"buttonAriaLabelledById":{"defaultValue":null,"description":"Panel button is aria-labelledby the text in the button itself + the element set in buttonAriaLabelledById. Default: auto-generated id for title (if title is set).","name":"buttonAriaLabelledById","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"buttonAriaLabel":{"defaultValue":null,"description":"Panel button aria label","name":"buttonAriaLabel","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"showCloseButtonInExpand":{"defaultValue":null,"description":"@deprecated Has no effect anymore due to accessbility reasons. No close button is shown in expanded content. Will be removed in 2.0.0","name":"showCloseButtonInExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"layout":{"defaultValue":null,"description":"Layout (see description)","name":"layout","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"enum","raw":"\"layout1\" | \"layout2\" | \"layout3a\" | \"layout3b\" | \"layout3c\"","value":[{"value":"\"layout1\""},{"value":"\"layout2\""},{"value":"\"layout3a\""},{"value":"\"layout3b\""},{"value":"\"layout3c\""}]}},"containerAsButton":{"defaultValue":null,"description":"Clicking anywhere on the container will trigger a click on the panel's button","name":"containerAsButton","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"time":{"defaultValue":null,"description":"Displays time with icon","name":"time","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"date":{"defaultValue":null,"description":"Displays date with icon","name":"date","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"string"}},"noTopBorder":{"defaultValue":null,"description":"Removes top border when variant is \"line\"","name":"noTopBorder","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"expanded":{"defaultValue":null,"description":"Opens or closes the panel","name":"expanded","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"onExpand":{"defaultValue":null,"description":"Called when panel is open/closed.","name":"onExpand","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"((isExpanded: boolean) => void)"}},"renderChildrenWhenClosed":{"defaultValue":null,"description":"Whether to render children when closed (in which case they are hidden with CSS). Default: false","name":"renderChildrenWhenClosed","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}},"focusable":{"defaultValue":null,"description":"Whether panel is focusable or not","name":"focusable","parent":{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"},"declarations":[{"fileName":"src/components/Panel/Panel.tsx","name":"PanelProps"}],"required":false,"type":{"name":"boolean"}}}}
@@ -1,2 +1,2 @@
1
- import{P as o}from"../../Panel.js";import{c as I,a as J,b as K}from"../../Panel.js";import"react";import"classnames";import"../../constants.js";import"../../hooks/useExpand.js";import"../../hooks/usePrevious.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/palette.js";import"../../utils/accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";import"../../Button.js";import"../Icons/Icon.js";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";import"../Icons/AlertSignFill.js";import"../Icons/Calendar.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/Pencil.js";import"../Icons/Watch.js";import"../../Title.js";import"../Title/styles.module.scss";import"./styles.module.scss";export{I as PanelLayout,J as PanelStatus,K as PanelVariant,o as default};
1
+ import{P as o}from"../../Panel.js";import{c as J,a as K,b as M}from"../../Panel.js";import"react";import"classnames";import"../../constants.js";import"../../hooks/useExpand.js";import"../../hooks/usePrevious.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/palette.js";import"../../utils/accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";import"../../Button.js";import"../Icons/Icon.js";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../../hooks/usePseudoClasses.js";import"../../hooks/useIcons.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";import"../Icons/AlertSignFill.js";import"../Icons/Calendar.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/Pencil.js";import"../Icons/Watch.js";import"../../Title.js";import"../Title/styles.module.scss";import"./styles.module.scss";export{J as PanelLayout,K as PanelStatus,M as PanelVariant,o as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -6,6 +6,7 @@
6
6
 
7
7
  .panel-wrapper {
8
8
  width: 100%;
9
+ outline: none;
9
10
  }
10
11
 
11
12
  @mixin panel-padding {
@@ -1,2 +1,2 @@
1
- import r from"react";import c from"classnames";import{AnalyticsId as f}from"../../constants.js";import{b as p,P}from"../../Panel.js";import a from"./styles.module.scss";import"../../hooks/useExpand.js";import"../../hooks/usePrevious.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/palette.js";import"../../utils/accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";import"../../Button.js";import"../Icons/Icon.js";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";import"../Icons/AlertSignFill.js";import"../Icons/Calendar.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/Pencil.js";import"../Icons/Watch.js";import"../../Title.js";import"../Title/styles.module.scss";import"../Panel/styles.module.scss";const y=o=>r.isValidElement(o)&&o.type===P,N=r.forwardRef(function(e,n){const{testId:s,children:l,variant:i=p.fill}=e,d=(t,m)=>r.cloneElement(t,{variant:i,noTopBorder:i===p.line&&!m,className:c(t.props.className,i!==p.line&&a["panel-list__panel"])});return r.createElement("div",{ref:n,"data-testid":s,className:a["panel-list"],"data-analyticsid":f.PanelList},r.Children.map(l,(t,m)=>y(t)?d(t,m===0):t))}),Z=N;export{Z as default};
1
+ import r from"react";import c from"classnames";import{AnalyticsId as f}from"../../constants.js";import{b as p,P}from"../../Panel.js";import a from"./styles.module.scss";import"../../hooks/useExpand.js";import"../../hooks/usePrevious.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/palette.js";import"../../utils/accessibility.js";import"../../Badge.js";import"../Badge/styles.module.scss";import"../../Button.js";import"../Icons/Icon.js";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../../hooks/usePseudoClasses.js";import"../../hooks/useIcons.js";import"../../hooks/useSize.js";import"../../utils/debounce.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../Icons/ArrowRight.js";import"../Button/styles.module.scss";import"../Icons/AlertSignFill.js";import"../Icons/Calendar.js";import"../Icons/ChevronDown.js";import"../Icons/ChevronUp.js";import"../Icons/Pencil.js";import"../Icons/Watch.js";import"../../Title.js";import"../Title/styles.module.scss";import"../Panel/styles.module.scss";const y=o=>r.isValidElement(o)&&o.type===P,N=r.forwardRef(function(e,n){const{testId:s,children:l,variant:i=p.fill}=e,d=(t,m)=>r.cloneElement(t,{variant:i,noTopBorder:i===p.line&&!m,className:c(t.props.className,i!==p.line&&a["panel-list__panel"])});return r.createElement("div",{ref:n,"data-testid":s,className:a["panel-list"],"data-analyticsid":f.PanelList},r.Children.map(l,(t,m)=>y(t)?d(t,m===0):t))}),tt=N;export{tt as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PanelList/PanelList.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport Panel, { PanelProps, PanelVariant } from '../Panel';\n\nimport styles from './styles.module.scss';\n\ninterface PanelListProps {\n /** Panels to render inside the PanelList */\n children?: React.ReactNode;\n /** Changes the visual representation of the panel. Default: fill */\n variant?: keyof typeof PanelVariant;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst isPanelComponent = (element: {} | null | undefined): element is React.ReactElement<PanelProps> =>\n React.isValidElement<PanelProps>(element) && (element as React.ReactElement).type === Panel;\n\nconst PanelList = React.forwardRef(function BadgeForwardedRef(props: PanelListProps, ref: React.ForwardedRef<HTMLDivElement>) {\n const { testId, children, variant = PanelVariant.fill } = props;\n\n const renderPanel = (panel: React.ReactElement<PanelProps>, firstChild: boolean) =>\n React.cloneElement(panel, {\n variant: variant,\n noTopBorder: variant === PanelVariant.line && !firstChild,\n className: classNames(panel.props.className, variant !== PanelVariant.line && styles['panel-list__panel']),\n });\n\n return (\n <div ref={ref} data-testid={testId} className={styles['panel-list']} data-analyticsid={AnalyticsId.PanelList}>\n {React.Children.map(children, (child, index) => (isPanelComponent(child) ? renderPanel(child, index === 0) : child))}\n </div>\n );\n});\n\nexport default PanelList;\n"],"names":["isPanelComponent","element","React","Panel","PanelList","props","ref","testId","children","variant","PanelVariant","renderPanel","panel","firstChild","classNames","styles","AnalyticsId","child","index","PanelList$1"],"mappings":"0mCAkBA,MAAMA,EAAoBC,GACxBC,EAAM,eAA2BD,CAAO,GAAMA,EAA+B,OAASE,EAElFC,EAAYF,EAAM,WAAW,SAA2BG,EAAuBC,EAAyC,CAC5H,KAAM,CAAE,OAAAC,EAAQ,SAAAC,EAAU,QAAAC,EAAUC,EAAa,IAAS,EAAAL,EAEpDM,EAAc,CAACC,EAAuCC,IAC1DX,EAAM,aAAaU,EAAO,CACxB,QAAAH,EACA,YAAaA,IAAYC,EAAa,MAAQ,CAACG,EAC/C,UAAWC,EAAWF,EAAM,MAAM,UAAWH,IAAYC,EAAa,MAAQK,EAAO,mBAAmB,CAAC,CAAA,CAC1G,EAEH,OACGb,EAAA,cAAA,MAAA,CAAI,IAAAI,EAAU,cAAaC,EAAQ,UAAWQ,EAAO,YAAY,EAAG,mBAAkBC,EAAY,SAAA,EAChGd,EAAM,SAAS,IAAIM,EAAU,CAACS,EAAOC,IAAWlB,EAAiBiB,CAAK,EAAIN,EAAYM,EAAOC,IAAU,CAAC,EAAID,CAAM,CACrH,CAEJ,CAAC,EAEDE,EAAef"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PanelList/PanelList.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport Panel, { PanelProps, PanelVariant } from '../Panel';\n\nimport styles from './styles.module.scss';\n\ninterface PanelListProps {\n /** Panels to render inside the PanelList */\n children?: React.ReactNode;\n /** Changes the visual representation of the panel. Default: fill */\n variant?: keyof typeof PanelVariant;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst isPanelComponent = (element: {} | null | undefined): element is React.ReactElement<PanelProps> =>\n React.isValidElement<PanelProps>(element) && (element as React.ReactElement).type === Panel;\n\nconst PanelList = React.forwardRef(function BadgeForwardedRef(props: PanelListProps, ref: React.ForwardedRef<HTMLDivElement>) {\n const { testId, children, variant = PanelVariant.fill } = props;\n\n const renderPanel = (panel: React.ReactElement<PanelProps>, firstChild: boolean) =>\n React.cloneElement(panel, {\n variant: variant,\n noTopBorder: variant === PanelVariant.line && !firstChild,\n className: classNames(panel.props.className, variant !== PanelVariant.line && styles['panel-list__panel']),\n });\n\n return (\n <div ref={ref} data-testid={testId} className={styles['panel-list']} data-analyticsid={AnalyticsId.PanelList}>\n {React.Children.map(children, (child, index) => (isPanelComponent(child) ? renderPanel(child, index === 0) : child))}\n </div>\n );\n});\n\nexport default PanelList;\n"],"names":["isPanelComponent","element","React","Panel","PanelList","props","ref","testId","children","variant","PanelVariant","renderPanel","panel","firstChild","classNames","styles","AnalyticsId","child","index","PanelList$1"],"mappings":"kpCAkBA,MAAMA,EAAoBC,GACxBC,EAAM,eAA2BD,CAAO,GAAMA,EAA+B,OAASE,EAElFC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IAC3B,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA2E1C,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"PopMenu.d.ts","sourceRoot":"","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAchD,OAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAKtD,oBAAY,cAAc;IACxB,OAAO,aAAa;IACpB,MAAM,YAAY;IAClB,WAAW,iBAAiB;CAC7B;AAED,MAAM,WAAW,YAAY;IAC3B,2DAA2D;IAC3D,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAC5C,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yDAAyD;IACzD,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,0DAA0D;IAC1D,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAwE1C,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1,2 +1,2 @@
1
- import t,{useRef as s,useState as S}from"react";import i from"classnames";import{AnalyticsId as h,IconSize as b}from"../../constants.js";import{useBreakpoint as w}from"../../hooks/useBreakpoint.js";import{useHover as v}from"../../hooks/useHover.js";import{useOutsideEvent as _}from"../../hooks/useOutsideEvent.js";import{getColor as g}from"../../theme/currys/color.js";import{breakpoints as z}from"../../theme/grid.js";import{isComponent as A}from"../../utils/component.js";import{C as M}from"../../Close.js";import{Icon as T}from"../Icons/Icon.js";import P from"../Icons/VerticalDots.js";import{L as $}from"../../LinkList.js";import{a as x}from"../../PopOver.js";import e from"./styles.module.scss";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../Icons/X.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Close/styles.module.scss";import"../Icons/ChevronRight.js";import"../../ListHeader.js";import"../../ListHeaderText.js";import"../../StatusDot.js";import"../Icons/Attachment.js";import"../Icons/Group.js";import"../Icons/NoAccess.js";import"../Icons/Undo.js";import"../StatusDot/styles.module.scss";import"../ListHeader/styles.module.scss";import"../../Avatar.js";import"../Icons/Check.js";import"../Avatar/styles.module.scss";import"../../Badge.js";import"../Badge/styles.module.scss";import"../LinkList/styles.module.scss";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../PopOver/styles.module.scss";var D=(o=>(o.onWhite="on-white",o.onGray="on-gray",o.onBlueberry="on-blueberry",o))(D||{});const G=o=>{const r=s(null),a=s(null),l=s(null),[m,p]=S(!1),{children:c,popOverClassName:I,popMenuClassName:C,openButtonTestId:k,closeButtonTestId:B,popOverTestId:N,popMenuVariant:u="on-white",openButtonAriaLabel:y,closeButtonAriaLabel:H}=o,f=i(e["pop-menu-button"],{[e[`pop-menu-button--${u}`]]:u}),d=w()<z.md;_(l,()=>p(!m));const O=()=>{if(A(c,$))return t.createElement(x,{testId:N,className:i(e["pop-menu__pop-over"],I),arrowClassName:e["pop-menu__pop-over-arrow"],controllerRef:r,popOverRef:l},c)},E=()=>{const n=v(a).isHovered,R=d?b.XSmall:b.Small;return t.createElement("button",{ref:a,"data-testid":k,className:f,"aria-label":y||"Se mer",onClick:()=>p(!0),type:"button"},t.createElement(T,{svgIcon:P,className:"test",color:g("black"),size:R,isHovered:n}))},L=()=>{const n=v(r).isHovered;return t.createElement(M,{ariaLabel:H,color:"black",className:f,testId:B,ref:r,onClick:()=>p(!1),small:d,isHovered:n})};return t.createElement("div",{className:i(e["pop-menu-button"],C),"data-analyticsid":h.PopMenu},m?L():E(),m&&O())},Po=G;export{G as PopMenu,D as PopMenuVariant,Po as default};
1
+ import t,{useRef as p,useState as S}from"react";import i from"classnames";import{IconSize as b,AnalyticsId as h}from"../../constants.js";import{useBreakpoint as w}from"../../hooks/useBreakpoint.js";import{useHover as H}from"../../hooks/useHover.js";import{useOutsideEvent as _}from"../../hooks/useOutsideEvent.js";import{getColor as g}from"../../theme/currys/color.js";import{breakpoints as z}from"../../theme/grid.js";import{isComponent as A}from"../../utils/component.js";import{C as M}from"../../Close.js";import{Icon as T}from"../Icons/Icon.js";import P from"../Icons/VerticalDots.js";import{L as $}from"../../LinkList.js";import{a as x}from"../../PopOver.js";import e from"./styles.module.scss";import"../../hooks/usePseudoClasses.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../utils/refs.js";import"../Icons/X.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Close/styles.module.scss";import"../Icons/ChevronRight.js";import"../../ListHeader.js";import"../../ListHeaderText.js";import"../../StatusDot.js";import"../Icons/Attachment.js";import"../Icons/Group.js";import"../Icons/NoAccess.js";import"../Icons/Undo.js";import"../StatusDot/styles.module.scss";import"../ListHeader/styles.module.scss";import"../../Avatar.js";import"../Icons/Check.js";import"../Avatar/styles.module.scss";import"../../Badge.js";import"../Badge/styles.module.scss";import"../LinkList/styles.module.scss";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../PopOver/styles.module.scss";var D=(o=>(o.onWhite="on-white",o.onGray="on-gray",o.onBlueberry="on-blueberry",o))(D||{});const G=o=>{const n=p(null),s=p(null),a=p(null),[r,m]=S(!1),{children:l,popOverClassName:d,popMenuClassName:v,openButtonTestId:I,closeButtonTestId:C,popOverTestId:k,popMenuVariant:c="on-white",openButtonAriaLabel:B,closeButtonAriaLabel:N}=o,u=i(e["pop-menu-button"],{[e[`pop-menu-button--${c}`]]:c}),f=w()<z.md;_(a,()=>m(!r));const{isHovered:y}=H(s),O=f?b.XSmall:b.Small,E=()=>{if(A(l,$))return t.createElement(x,{testId:k,className:i(e["pop-menu__pop-over"],d),arrowClassName:e["pop-menu__pop-over-arrow"],controllerRef:n,popOverRef:a},l)},L=t.createElement("button",{ref:s,"data-testid":I,className:u,"aria-label":B||"Se mer",onClick:()=>m(!0),type:"button"},t.createElement(T,{svgIcon:P,className:"test",color:g("black"),size:O,isHovered:y})),R=t.createElement(M,{ariaLabel:N,color:"black",className:u,testId:C,ref:n,onClick:()=>m(!1),small:f});return t.createElement("div",{className:i(e["pop-menu-button"],v),"data-analyticsid":h.PopMenu},r?R:L,r&&E())},$o=G;export{G as PopMenu,D as PopMenuVariant,$o as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Close from '../Close';\nimport Icon from '../Icons';\nimport VerticalDots from '../Icons/VerticalDots';\nimport LinkList, { LinkListProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const closeRef = useRef<HTMLButtonElement>(null);\n const openRef = useRef<HTMLButtonElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n useOutsideEvent(popOverRef, () => setIsOpen(!isOpen));\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={closeRef}\n popOverRef={popOverRef}\n >\n {children}\n </PopOver>\n );\n }\n };\n const openButton = () => {\n const openButtonIsHovered = useHover(openRef).isHovered;\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n return (\n <button\n ref={openRef}\n data-testid={openButtonTestId}\n className={buttonClasses}\n aria-label={openButtonAriaLabel || 'Se mer'}\n onClick={() => setIsOpen(true)}\n type=\"button\"\n >\n <Icon svgIcon={VerticalDots} className=\"test\" color={getColor('black')} size={mobileIconSize} isHovered={openButtonIsHovered} />\n </button>\n );\n };\n const closeButton = () => {\n const closeIsHovered = useHover(closeRef).isHovered;\n return (\n <Close\n ariaLabel={closeButtonAriaLabel}\n color=\"black\"\n className={buttonClasses}\n testId={closeButtonTestId}\n ref={closeRef}\n onClick={() => setIsOpen(false)}\n small={mobile}\n isHovered={closeIsHovered}\n />\n );\n };\n return (\n <div className={classNames(styles['pop-menu-button'], popMenuClassName)} data-analyticsid={AnalyticsId.PopMenu}>\n {!isOpen ? openButton() : closeButton()}\n {isOpen && renderChildren()}\n </div>\n );\n};\n\nexport default PopMenu;\n"],"names":["PopMenuVariant","PopMenu","props","closeRef","useRef","openRef","popOverRef","isOpen","setIsOpen","useState","children","popOverClassName","popMenuClassName","openButtonTestId","closeButtonTestId","popOverTestId","popMenuVariant","openButtonAriaLabel","closeButtonAriaLabel","buttonClasses","classNames","styles","mobile","useBreakpoint","breakpoints","useOutsideEvent","renderChildren","isComponent","LinkList","React","PopOver","openButton","openButtonIsHovered","useHover","mobileIconSize","IconSize","Icon","VerticalDots","getColor","closeButton","closeIsHovered","Close","AnalyticsId","PopMenu$1"],"mappings":"urDAmBY,IAAAA,GAAAA,IACVA,EAAA,QAAU,WACVA,EAAA,OAAS,UACTA,EAAA,YAAc,eAHJA,IAAAA,GAAA,CAAA,CAAA,EA2BC,MAAAC,EAAmCC,GAAwB,CAChE,MAAAC,EAAWC,EAA0B,IAAI,EACzCC,EAAUD,EAA0B,IAAI,EACxCE,EAAaF,EAAuB,IAAI,EACxC,CAACG,EAAQC,CAAS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EAAO,iBAAiB,EAAGT,CAAgB,EAAG,mBAAkB8B,EAAY,SACnGnC,EAAwBgC,IAAfR,IACVxB,GAAUmB,GACb,CAEJ,EAEAiB,GAAe1C"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Close from '../Close';\nimport Icon from '../Icons';\nimport VerticalDots from '../Icons/VerticalDots';\nimport LinkList, { LinkListProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const closeRef = useRef<HTMLButtonElement>(null);\n const openRef = useRef<HTMLButtonElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n useOutsideEvent(popOverRef, () => setIsOpen(!isOpen));\n const { isHovered: openButtonIsHovered } = useHover(openRef);\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={closeRef}\n popOverRef={popOverRef}\n >\n {children}\n </PopOver>\n );\n }\n };\n\n const openButton = (\n <button\n ref={openRef}\n data-testid={openButtonTestId}\n className={buttonClasses}\n aria-label={openButtonAriaLabel || 'Se mer'}\n onClick={(): void => setIsOpen(true)}\n type=\"button\"\n >\n <Icon svgIcon={VerticalDots} className=\"test\" color={getColor('black')} size={mobileIconSize} isHovered={openButtonIsHovered} />\n </button>\n );\n\n const closeButton = (\n <Close\n ariaLabel={closeButtonAriaLabel}\n color=\"black\"\n className={buttonClasses}\n testId={closeButtonTestId}\n ref={closeRef}\n onClick={(): void => setIsOpen(false)}\n small={mobile}\n />\n );\n\n return (\n <div className={classNames(styles['pop-menu-button'], popMenuClassName)} data-analyticsid={AnalyticsId.PopMenu}>\n {!isOpen ? openButton : closeButton}\n {isOpen && renderChildren()}\n </div>\n );\n};\n\nexport default PopMenu;\n"],"names":["PopMenuVariant","PopMenu","props","closeRef","useRef","openRef","popOverRef","isOpen","setIsOpen","useState","children","popOverClassName","popMenuClassName","openButtonTestId","closeButtonTestId","popOverTestId","popMenuVariant","openButtonAriaLabel","closeButtonAriaLabel","buttonClasses","classNames","styles","mobile","useBreakpoint","breakpoints","useOutsideEvent","openButtonIsHovered","useHover","mobileIconSize","IconSize","renderChildren","isComponent","LinkList","React","PopOver","openButton","Icon","VerticalDots","getColor","closeButton","Close","AnalyticsId","PopMenu$1"],"mappings":"+tDAmBY,IAAAA,GAAAA,IACVA,EAAA,QAAU,WACVA,EAAA,OAAS,UACTA,EAAA,YAAc,eAHJA,IAAAA,GAAA,CAAA,CAAA,EA2BC,MAAAC,EAAmCC,GAAwB,CAChE,MAAAC,EAAWC,EAA0B,IAAI,EACzCC,EAAUD,EAA0B,IAAI,EACxCE,EAAaF,EAAuB,IAAI,EACxC,CAACG,EAAQC,CAAS,EAAIC,EAAS,EAAK,EACpC,CACJ,SAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,kBAAAC,EACA,cAAAC,EACA,eAAAC,EAAiB,WACjB,oBAAAC,EACA,qBAAAC,CACE,EAAAhB,EACEiB,EAAgBC,EAAWC,EAAO,iBAAiB,EAAG,CAC1D,CAACA,EAAO,oBAAoBL,GAAgB,CAAC,EAAGA,CAAA,CACjD,EAEKM,EADaC,IACSC,EAAY,GACxCC,EAAgBnB,EAAY,IAAME,EAAU,CAACD,CAAM,CAAC,EACpD,KAAM,CAAE,UAAWmB,CAAoB,EAAIC,EAAStB,CAAO,EACrDuB,EAAiBN,EAASO,EAAS,OAASA,EAAS,MAErDC,EAAiB,IAAM,CACvB,GAAAC,EAA2BrB,EAAUsB,CAAQ,EAE7C,OAAAC,EAAA,cAACC,EAAA,CACC,OAAQnB,EACR,UAAWK,EAAWC,EAAO,oBAAoB,EAAGV,CAAgB,EACpE,eAAgBU,EAAO,0BAA0B,EACjD,cAAelB,EACf,WAAAG,CAAA,EAECI,CAAA,CAGP,EAGIyB,EACJF,EAAA,cAAC,SAAA,CACC,IAAK5B,EACL,cAAaQ,EACb,UAAWM,EACX,aAAYF,GAAuB,SACnC,QAAS,IAAYT,EAAU,EAAI,EACnC,KAAK,QAAA,EAEJyB,EAAA,cAAAG,EAAA,CAAK,QAASC,EAAc,UAAU,OAAO,MAAOC,EAAS,OAAO,EAAG,KAAMV,EAAgB,UAAWF,EAAqB,CAAA,EAI5Ha,EACJN,EAAA,cAACO,EAAA,CACC,UAAWtB,EACX,MAAM,QACN,UAAWC,EACX,OAAQL,EACR,IAAKX,EACL,QAAS,IAAYK,EAAU,EAAK,EACpC,MAAOc,CAAA,CAAA,EAIX,uBACG,MAAI,CAAA,UAAWF,EAAWC,EAAO,iBAAiB,EAAGT,CAAgB,EAAG,mBAAkB6B,EAAY,SACnGlC,EAAsBgC,EAAbJ,EACV5B,GAAUuB,GACb,CAEJ,EAEAY,GAAezC"}
@@ -324,6 +324,12 @@
324
324
  width: 0.875rem;
325
325
  height: 0.875rem;
326
326
  border-radius: 10rem;
327
+
328
+ // Vi overstyrer farger satt ved high-contrast mode i nettleser/os
329
+ @media (forced-colors: active) {
330
+ forced-color-adjust: none;
331
+ background-color: #fff !important;
332
+ }
327
333
  }
328
334
 
329
335
  &--on-dark:checked::before {
@@ -405,6 +411,13 @@
405
411
  }
406
412
  }
407
413
  }
414
+
415
+ // Vi overstyrer farger satt ved high-contrast mode i nettleser/os
416
+ @media (forced-colors: active) {
417
+ forced-color-adjust: none;
418
+ color: #fff !important;
419
+ background-color: transparent !important;
420
+ }
408
421
  }
409
422
 
410
423
  .radiobutton-sublabel-wrapper {
@@ -4,9 +4,9 @@ import { NotificationPanelVariants } from '../NotificationPanel';
4
4
  export interface ServiceMessageProps {
5
5
  /** Sets a label for the notification panel. */
6
6
  label: string;
7
- /** String displayed in service-message when expended*/
7
+ /** String displayed in service-message when expanded */
8
8
  info?: string;
9
- /** String displayed in service-message when expended, with a smaller font*/
9
+ /** String displayed in service-message when expanded, with a smaller font */
10
10
  extraInfo?: string;
11
11
  /** function that runs on dismiss */
12
12
  onDismiss?: () => void;
@@ -26,7 +26,10 @@ export interface ServiceMessageProps {
26
26
  variant?: NotificationPanelVariants;
27
27
  /** Sets the data-testid attribute. */
28
28
  testId?: string;
29
- /** First of its type. Used to remove border-top */
29
+ /**
30
+ * First of its type. Used to remove border-top
31
+ * @deprecated Har ingen effekt på komponenten
32
+ */
30
33
  first?: boolean;
31
34
  }
32
35
  declare const ServiceMessage: React.FC<ServiceMessageProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAIjE,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AACD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAuIjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ServiceMessage.d.ts","sourceRoot":"","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAWhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAWlD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAsHjE,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA2DjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"props":{"label":{"defaultValue":null,"description":"Sets a label for the notification panel.","name":"label","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":true,"type":{"name":"string"}},"info":{"defaultValue":null,"description":"String displayed in service-message when expended","name":"info","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"extraInfo":{"defaultValue":null,"description":"String displayed in service-message when expended, with a smaller font","name":"extraInfo","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"onDismiss":{"defaultValue":null,"description":"function that runs on dismiss","name":"onDismiss","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"(() => void)"}},"dismissable":{"defaultValue":{"value":"true"},"description":"Allows for dismiss to be an option, also for ServiceMessage with only label as content","name":"dismissable","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"boolean"}},"expanderOpenFromStart":{"defaultValue":{"value":"false"},"description":"Makes expander be open from start.","name":"expanderOpenFromStart","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"boolean"}},"urlTitle":{"defaultValue":null,"description":"Name that describes a url-link for the user","name":"urlTitle","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"url":{"defaultValue":null,"description":"Url for further information","name":"url","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":{"value":"_self"},"description":"Sets target for the anchorlink to the url","name":"target","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"enum","raw":"AnchorLinkTargets","value":[{"value":"\"_self\""},{"value":"\"_blank\""},{"value":"\"_parent\""}]}},"closeBtnText":{"defaultValue":{"value":"fjern melding"},"description":"Text on close-button in service messages.","name":"closeBtnText","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":{"value":"alert"},"description":"Changes the visual representation.","name":"variant","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"enum","raw":"NotificationPanelVariants","value":[{"value":"\"info\""},{"value":"\"warn\""},{"value":"\"alert\""},{"value":"\"success\""}]}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"first":{"defaultValue":{"value":"false"},"description":"First of its type. Used to remove border-top","name":"first","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"boolean"}}}}
1
+ {"props":{"label":{"defaultValue":null,"description":"Sets a label for the notification panel.","name":"label","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":true,"type":{"name":"string"}},"info":{"defaultValue":null,"description":"String displayed in service-message when expanded","name":"info","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"extraInfo":{"defaultValue":null,"description":"String displayed in service-message when expanded, with a smaller font","name":"extraInfo","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"onDismiss":{"defaultValue":null,"description":"function that runs on dismiss","name":"onDismiss","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"(() => void)"}},"dismissable":{"defaultValue":{"value":"true"},"description":"Allows for dismiss to be an option, also for ServiceMessage with only label as content","name":"dismissable","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"boolean"}},"expanderOpenFromStart":{"defaultValue":{"value":"false"},"description":"Makes expander be open from start.","name":"expanderOpenFromStart","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"boolean"}},"urlTitle":{"defaultValue":null,"description":"Name that describes a url-link for the user","name":"urlTitle","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"url":{"defaultValue":null,"description":"Url for further information","name":"url","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"target":{"defaultValue":{"value":"_self"},"description":"Sets target for the anchorlink to the url","name":"target","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"enum","raw":"AnchorLinkTargets","value":[{"value":"\"_self\""},{"value":"\"_blank\""},{"value":"\"_parent\""}]}},"closeBtnText":{"defaultValue":{"value":"fjern melding"},"description":"Text on close-button in service messages.","name":"closeBtnText","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":{"value":"alert"},"description":"Changes the visual representation.","name":"variant","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"enum","raw":"NotificationPanelVariants","value":[{"value":"\"info\""},{"value":"\"warn\""},{"value":"\"alert\""},{"value":"\"success\""}]}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"string"}},"first":{"defaultValue":null,"description":"First of its type. Used to remove border-top\n@deprecated Har ingen effekt på komponenten","name":"first","parent":{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"},"declarations":[{"fileName":"src/components/ServiceMessage/ServiceMessage.tsx","name":"ServiceMessageProps"}],"required":false,"type":{"name":"boolean"}}}}
@@ -1,2 +1,2 @@
1
- import e,{useState as V,useRef as f}from"react";import o from"classnames";import{useBreakpoint as Y}from"../../hooks/useBreakpoint.js";import{useHover as _}from"../../hooks/useHover.js";import{useUuid as Z}from"../../hooks/useUuid.js";import{getColor as w}from"../../theme/currys/color.js";import{breakpoints as ee}from"../../theme/grid.js";import{palette as t}from"../../theme/palette.js";import{getAriaLabelAttributes as se}from"../../utils/accessibility.js";import{Icon as a}from"../Icons/Icon.js";import{IconSize as v}from"../../constants.js";import re from"../Icons/CheckFill.js";import oe from"../Icons/ChevronDown.js";import te from"../Icons/ChevronUp.js";import ae from"../Icons/ErrorSignFill.js";import ne from"../Icons/Forward.js";import ce from"../Icons/InfoSignFill.js";import me from"../Icons/TriangleX.js";import S from"../Icons/X.js";import s from"./styles.module.scss";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/index.js";import"../../theme/spacers.js";const le=({label:E,dismissable:C=!0,onDismiss:N,info:g,extraInfo:d,urlTitle:h,url:k,target:z="_self",closeBtnText:b="fjern melding",first:I=!1,expanderOpenFromStart:y=!1,variant:r="alert",testId:x})=>{const n=!!g||!!d,F=n?"button":"span",c=Y()<ee.lg?v.XSmall:v.Small,R=Z(),M=r==="alert"?"alert":"region",X=se({label:E,id:R}),[m,$]=V(y),A={info:e.createElement(a,{svgIcon:ce,color:t.blueberry700,hoverColor:t.blueberry700,size:c}),warn:e.createElement(a,{svgIcon:ae,color:t.banana700,hoverColor:t.banana700,size:c}),alert:e.createElement(a,{svgIcon:me,color:t.cherry700,hoverColor:t.cherry700,size:c}),success:e.createElement(a,{svgIcon:re,color:t.kiwi900,hoverColor:t.kiwi900,size:c})},B=o(s["service-message__top-row--container"],s["service-message__wrapper--inner"]),T=o(s["service-message__bottom-row__button"],s["service-message__bottom-row__close-button--top"]),j=()=>{const l=_(),{isHovered:u,hoverRef:i}=l,p=f(null),{isHovered:Q}=_(p);return e.createElement("span",{className:B,ref:i},e.createElement("span",{className:s["service-message__icon--signal"]},A[r]),e.createElement("h1",{className:s["service-message__label"],id:R},E),n&&e.createElement("span",{className:s["service-message__icon--expander"]},e.createElement(a,{size:c,svgIcon:m?te:oe,isHovered:u})),!n&&C&&e.createElement("button",{ref:p,className:T,"aria-label":b,onClick:N},e.createElement(a,{size:c,svgIcon:S,color:w("blueberry",700),isHovered:Q})))},L=()=>{n&&$(!m)},U=o(s["service-message__bottom-row__button"]),H=!!k&&!!h,O=o(s["service-message__bottom-row__button"]),W=o(s["service-message__bottom-row"],{[s["service-message__bottom-row--only-close-button"]]:!H}),q=()=>{const l=f(null),{isHovered:u}=_(l),i=f(null),{isHovered:p}=_(i);return e.createElement("div",{className:W},H&&e.createElement("a",{className:U,href:k,ref:l,target:z},h,e.createElement(a,{size:v.XSmall,svgIcon:ne,color:w("blueberry",700),isHovered:u})),C&&e.createElement("button",{ref:i,className:O,"aria-label":b,onClick:N},b,e.createElement(a,{size:v.XSmall,svgIcon:S,color:w("blueberry",700),isHovered:p})))},D=()=>e.createElement("span",{className:s["service-message__content"]},!!g&&e.createElement("span",{className:s["service-message__content__info"]},g),!!d&&e.createElement("span",{className:s["service-message__content__info--smaller"]},d),e.createElement(q,null)),G=o({[s[`service-message__outer-wrapper--${r}`]]:r}),J=o({[s[`service-message__wrapper--${r}`]]:r,[s[`service-message__wrapper--${r}--expanded`]]:m&&r}),K=o(s["service-message__wrapper--inner"],s["service-message__content__wrapper"]),P=o(s["service-message__wrapper"],s["service-message__wrapper__btn"],{[s["service-message__wrapper__btn--width"]]:n,[s[`service-message__wrapper__border--${r}`]]:r,[s["service-message__wrapper__btn--expanded"]]:m,[s["service-message__wrapper__btn--first"]]:I,[s["service-message__wrapper__btn--not-first"]]:!I});return e.createElement("div",{className:G},e.createElement("div",{className:J,role:M,...X},e.createElement(F,{className:P,onClick:L,"aria-expanded":n&&m,"data-testid":x},e.createElement(j,null)),n&&m&&e.createElement("div",{className:s["service-message__content--spacing"]},e.createElement("div",{className:K},e.createElement(D,null)))))},Ae=le;export{Ae as default};
1
+ import e,{useState as R}from"react";import u from"classnames";import{useBreakpoint as w}from"../../hooks/useBreakpoint.js";import{useHover as h}from"../../hooks/useHover.js";import{useUuid as y}from"../../hooks/useUuid.js";import{getColor as I}from"../../theme/currys/color.js";import{breakpoints as M}from"../../theme/grid.js";import{palette as c}from"../../theme/palette.js";import{getAriaLabelAttributes as X}from"../../utils/accessibility.js";import{C as F}from"../../Close.js";import{Icon as n}from"../Icons/Icon.js";import{IconSize as N}from"../../constants.js";import L from"../Icons/CheckFill.js";import A from"../Icons/ChevronDown.js";import U from"../Icons/ChevronUp.js";import $ from"../Icons/ErrorSignFill.js";import j from"../Icons/Forward.js";import B from"../Icons/InfoSignFill.js";import q from"../Icons/TriangleX.js";import D from"../Icons/X.js";import r from"./styles.module.scss";import"../../hooks/usePseudoClasses.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../../utils/refs.js";import"../Close/styles.module.scss";const G=({label:m,variant:t,id:i,hasExpander:s,isExpanded:l,dismissable:_,onExpand:v,onDismiss:p,closeBtnText:g})=>{const f=w(),{isHovered:a,hoverRef:d}=h(),o=f<M.lg?N.XSmall:N.Small,C={info:e.createElement(n,{svgIcon:B,color:c.blueberry700,hoverColor:c.blueberry700,size:o,isHovered:a}),warn:e.createElement(n,{svgIcon:$,color:c.banana700,hoverColor:c.banana700,size:o,isHovered:a}),alert:e.createElement(n,{svgIcon:q,color:c.cherry700,hoverColor:c.cherry700,size:o,isHovered:a}),success:e.createElement(n,{svgIcon:L,color:c.kiwi900,hoverColor:c.kiwi900,size:o,isHovered:a})},b=s?"button":"span",E=u(r["service-message__label-container"],r[`service-message__label-container--${t}`],s&&r["service-message__label-container--has-expander"]);return e.createElement("div",{className:E,ref:d},e.createElement("div",{className:r["service-message__container"]},e.createElement("div",{className:r["service-message__row"]},e.createElement("div",{className:r["service-message__col"]},e.createElement("div",{className:r["service-message__label"]},C[t],e.createElement("h1",{className:r["service-message__title"],id:i},e.createElement(b,{className:r["service-message__toggle"],onClick:s?v:void 0,"aria-expanded":s?l:void 0},m)),s&&e.createElement(n,{size:o,svgIcon:l?U:A,isHovered:a}),!s&&_&&e.createElement(F,{onClick:p,ariaLabel:g,className:r["service-message__close"]}))))))},J=({info:m,extraInfo:t,urlTitle:i,url:s,target:l,dismissable:_,closeBtnText:v,onDismiss:p})=>{const{hoverRef:g,isHovered:f}=h(),{hoverRef:a,isHovered:d}=h(),o=s&&i;return e.createElement("div",{className:r["service-message__container"]},e.createElement("div",{className:r["service-message__row"]},e.createElement("div",{className:r["service-message__col"]},e.createElement("div",{className:r["service-message__content"]},m&&e.createElement("p",{className:r["service-message__info"]},m),t&&e.createElement("p",{className:u(r["service-message__info"],r["service-message__info--extra"])},t),e.createElement("div",{className:r["service-message__actions"]},o&&e.createElement("a",{className:r["service-message__action"],href:s,ref:g,target:l},i,e.createElement(n,{size:N.XSmall,svgIcon:j,color:I("blueberry",700),isHovered:f})),_&&e.createElement("button",{ref:a,className:u(r["service-message__action"],r["service-message__action--close"]),"aria-label":v,onClick:p},v,e.createElement(n,{size:N.XSmall,svgIcon:D,color:I("blueberry",700),isHovered:d})))))))},K=({label:m,dismissable:t=!0,onDismiss:i,info:s,extraInfo:l,urlTitle:_,url:v,target:p="_self",closeBtnText:g="fjern melding",expanderOpenFromStart:f=!1,variant:a="alert",testId:d})=>{const[o,C]=R(f),b=y(),E=!!s||!!l,S=a==="alert"?"alert":"region",k=X({label:m,id:b}),z=()=>{E&&C(!o)},H=u(r["service-message"],r[`service-message--${a}`],o&&r["service-message--expanded"]);return e.createElement("div",{className:H,role:S,...k,"data-testid":d},e.createElement(G,{label:m,variant:a,id:b,hasExpander:E,isExpanded:o,dismissable:t,onExpand:z,onDismiss:i,closeBtnText:g}),E&&o&&e.createElement(J,{info:s,extraInfo:l,urlTitle:_,url:v,target:p,dismissable:t,onDismiss:i,closeBtnText:g}))},ue=K;export{ue as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"sourcesContent":["import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { palette } from '../../theme/palette';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnchorLinkTargets } from '../AnchorLink';\nimport Icon, { IconSize } from '../Icons';\nimport CheckFill from '../Icons/CheckFill';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport ErrorSignFill from '../Icons/ErrorSignFill';\nimport Forward from '../Icons/Forward';\nimport InfoSignFill from '../Icons/InfoSignFill';\nimport TriangleX from '../Icons/TriangleX';\nimport X from '../Icons/X';\nimport { NotificationPanelVariants } from '../NotificationPanel';\n\nimport styles from './styles.module.scss';\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expended*/\n info?: string;\n /** String displayed in service-message when expended, with a smaller font*/\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** First of its type. Used to remove border-top */\n first?: boolean;\n}\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n first = false,\n expanderOpenFromStart = false,\n variant = 'alert',\n testId,\n}: ServiceMessageProps) => {\n const hasExpander = !!info || !!extraInfo;\n\n const CustomTag = hasExpander ? 'button' : 'span';\n const breakpoint = useBreakpoint();\n const desktop = breakpoint < breakpoints.lg;\n const iconSize = desktop ? IconSize.XSmall : IconSize.Small;\n const uuid = useUuid();\n const ariaRole = variant === 'alert' ? 'alert' : 'region';\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: uuid });\n\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const variantToIconMap = {\n info: <Icon svgIcon={InfoSignFill} color={palette.blueberry700} hoverColor={palette.blueberry700} size={iconSize} />,\n warn: <Icon svgIcon={ErrorSignFill} color={palette.banana700} hoverColor={palette.banana700} size={iconSize} />,\n alert: <Icon svgIcon={TriangleX} color={palette.cherry700} hoverColor={palette.cherry700} size={iconSize} />,\n success: <Icon svgIcon={CheckFill} color={palette.kiwi900} hoverColor={palette.kiwi900} size={iconSize} />,\n };\n const topTowClasses = classNames(styles['service-message__top-row--container'], styles['service-message__wrapper--inner']);\n const topTowCloseButtonClasses = classNames(\n styles['service-message__bottom-row__button'],\n styles['service-message__bottom-row__close-button--top']\n );\n const TopRow = (): JSX.Element => {\n const hoverRefObject = useHover<HTMLButtonElement>();\n const { isHovered, hoverRef } = hoverRefObject;\n const xRef = useRef<HTMLButtonElement>(null);\n const { isHovered: xRefIsHovered } = useHover(xRef);\n return (\n <span className={topTowClasses} ref={hoverRef}>\n <span className={styles['service-message__icon--signal']}>{variantToIconMap[variant]}</span>\n <h1 className={styles['service-message__label']} id={uuid}>\n {label}\n </h1>\n {hasExpander && (\n <span className={styles['service-message__icon--expander']}>\n <Icon size={iconSize} svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} />\n </span>\n )}\n {!hasExpander && dismissable && (\n <button ref={xRef} className={topTowCloseButtonClasses} aria-label={closeBtnText} onClick={onDismiss}>\n <Icon size={iconSize} svgIcon={X} color={getColor('blueberry', 700)} isHovered={xRefIsHovered} />\n </button>\n )}\n </span>\n );\n };\n const tagClicked = (): void => {\n hasExpander && setIsExpanded(!isExpanded);\n };\n\n const anchorlinkClasses = classNames(styles['service-message__bottom-row__button']);\n const urlField = !!url && !!urlTitle;\n const closeButtonClasses = classNames(styles['service-message__bottom-row__button']);\n const bottomRowClasses = classNames(styles['service-message__bottom-row'], {\n [styles['service-message__bottom-row--only-close-button']]: !urlField,\n });\n const ButtonRow = (): JSX.Element => {\n const readMoreRef = useRef<HTMLAnchorElement>(null);\n const { isHovered: readMoreHoverRefIsHovered } = useHover(readMoreRef);\n const xRef = useRef<HTMLButtonElement>(null);\n const { isHovered: xRefIsHovered } = useHover(xRef);\n return (\n <div className={bottomRowClasses}>\n {urlField && (\n <a className={anchorlinkClasses} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button ref={xRef} className={closeButtonClasses} aria-label={closeBtnText} onClick={onDismiss}>\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={xRefIsHovered} />\n </button>\n )}\n </div>\n );\n };\n const Content = (): JSX.Element => {\n return (\n <span className={styles['service-message__content']}>\n {!!info && <span className={styles['service-message__content__info']}>{info}</span>}\n {!!extraInfo && <span className={styles['service-message__content__info--smaller']}>{extraInfo}</span>}\n <ButtonRow />\n </span>\n );\n };\n const outerBackgroundClass = classNames({\n [styles[`service-message__outer-wrapper--${variant}`]]: variant,\n });\n const backgroundClass = classNames({\n [styles[`service-message__wrapper--${variant}`]]: variant,\n [styles[`service-message__wrapper--${variant}--expanded`]]: isExpanded && variant,\n });\n const contentWrapperClasses = classNames(styles['service-message__wrapper--inner'], styles['service-message__content__wrapper']);\n const wrapperClasses = classNames(styles['service-message__wrapper'], styles['service-message__wrapper__btn'], {\n [styles['service-message__wrapper__btn--width']]: hasExpander,\n [styles[`service-message__wrapper__border--${variant}`]]: variant,\n [styles['service-message__wrapper__btn--expanded']]: isExpanded,\n [styles['service-message__wrapper__btn--first']]: first,\n [styles['service-message__wrapper__btn--not-first']]: !first,\n });\n return (\n <div className={outerBackgroundClass}>\n <div className={backgroundClass} role={ariaRole} {...ariaLabelAttributes}>\n <CustomTag className={wrapperClasses} onClick={tagClicked} aria-expanded={hasExpander && isExpanded} data-testid={testId}>\n <TopRow />\n </CustomTag>\n {hasExpander && isExpanded && (\n <div className={styles['service-message__content--spacing']}>\n <div className={contentWrapperClasses}>\n <Content />\n </div>\n </div>\n )}\n </div>\n </div>\n );\n};\n\nexport default ServiceMessage;\n"],"names":["ServiceMessage","label","dismissable","onDismiss","info","extraInfo","urlTitle","url","target","closeBtnText","first","expanderOpenFromStart","variant","testId","hasExpander","CustomTag","iconSize","useBreakpoint","breakpoints","IconSize","uuid","useUuid","ariaRole","ariaLabelAttributes","getAriaLabelAttributes","isExpanded","setIsExpanded","useState","variantToIconMap","React","Icon","InfoSignFill","palette","ErrorSignFill","TriangleX","CheckFill","topTowClasses","classNames","styles","topTowCloseButtonClasses","TopRow","hoverRefObject","useHover","isHovered","hoverRef","xRef","useRef","xRefIsHovered","ChevronUp","ChevronDown","X","getColor","tagClicked","anchorlinkClasses","urlField","closeButtonClasses","bottomRowClasses","ButtonRow","readMoreRef","readMoreHoverRefIsHovered","Forward","Content","outerBackgroundClass","backgroundClass","contentWrapperClasses","wrapperClasses","ServiceMessage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CAAC,EAAG5B,EAClD,CAAC4B,EAAO,0CAA0C,CAAC,EAAG,CAAC5B,CAAA,CACxD,EAEC,OAAAmB,EAAA,cAAC,OAAI,UAAWiC,CAAA,kBACb,MAAI,CAAA,UAAWC,EAAiB,KAAMzC,EAAW,GAAGC,CACnD,EAAAM,EAAA,cAACd,GAAU,UAAWkD,EAAgB,QAASb,EAAY,gBAAetC,GAAeW,EAAY,cAAaZ,GAC/GgB,EAAA,cAAAW,EAAA,IAAO,CACV,EACC1B,GAAeW,GACbI,EAAA,cAAA,MAAA,CAAI,UAAWS,EAAO,mCAAmC,GACvDT,EAAA,cAAA,MAAA,CAAI,UAAWmC,CACd,EAAAnC,EAAA,cAACgC,MAAQ,CACX,CACF,CAEJ,CACF,CAEJ,EAEAK,GAAelE"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"sourcesContent":["import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { palette } from '../../theme/palette';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnchorLinkTargets } from '../AnchorLink';\nimport Close from '../Close';\nimport Icon, { IconSize } from '../Icons';\nimport CheckFill from '../Icons/CheckFill';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport ErrorSignFill from '../Icons/ErrorSignFill';\nimport Forward from '../Icons/Forward';\nimport InfoSignFill from '../Icons/InfoSignFill';\nimport TriangleX from '../Icons/TriangleX';\nimport X from '../Icons/X';\nimport { NotificationPanelVariants } from '../NotificationPanel';\n\nimport styles from './styles.module.scss';\n\ninterface LabelProps {\n label: string;\n variant: NotificationPanelVariants;\n id: string;\n hasExpander: boolean;\n isExpanded: boolean;\n dismissable: boolean;\n onExpand: () => void;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Label: React.FC<LabelProps> = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {\n const breakpoint = useBreakpoint();\n const { isHovered, hoverRef } = useHover<HTMLDivElement>();\n\n const iconSize = breakpoint < breakpoints.lg ? IconSize.XSmall : IconSize.Small;\n const variantToIconMap = {\n info: (\n <Icon svgIcon={InfoSignFill} color={palette.blueberry700} hoverColor={palette.blueberry700} size={iconSize} isHovered={isHovered} />\n ),\n warn: <Icon svgIcon={ErrorSignFill} color={palette.banana700} hoverColor={palette.banana700} size={iconSize} isHovered={isHovered} />,\n alert: <Icon svgIcon={TriangleX} color={palette.cherry700} hoverColor={palette.cherry700} size={iconSize} isHovered={isHovered} />,\n success: <Icon svgIcon={CheckFill} color={palette.kiwi900} hoverColor={palette.kiwi900} size={iconSize} isHovered={isHovered} />,\n };\n const CustomTag = hasExpander ? 'button' : 'span';\n\n const labelContainerClasses = classNames(\n styles['service-message__label-container'],\n styles[`service-message__label-container--${variant}`],\n hasExpander && styles[`service-message__label-container--has-expander`]\n );\n\n return (\n <div className={labelContainerClasses} ref={hoverRef}>\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__label']}>\n {variantToIconMap[variant]}\n <h1 className={styles['service-message__title']} id={id}>\n <CustomTag\n className={styles['service-message__toggle']}\n onClick={hasExpander ? onExpand : undefined}\n aria-expanded={hasExpander ? isExpanded : undefined}\n >\n {label}\n </CustomTag>\n </h1>\n {hasExpander && <Icon size={iconSize} svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} />}\n {!hasExpander && dismissable && (\n <Close onClick={onDismiss} ariaLabel={closeBtnText} className={styles['service-message__close']} />\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface ContentProps {\n info?: string;\n extraInfo?: string;\n urlTitle?: string;\n url?: string;\n target?: AnchorLinkTargets;\n dismissable: boolean;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Content: React.FC<ContentProps> = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnText, onDismiss }) => {\n const { hoverRef: readMoreRef, isHovered: readMoreHoverRefIsHovered } = useHover<HTMLAnchorElement>();\n const { hoverRef: closeButtonRef, isHovered: closeButtonIsHovered } = useHover<HTMLButtonElement>();\n\n const hasUrl = url && urlTitle;\n\n return (\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__content']}>\n {info && <p className={styles['service-message__info']}>{info}</p>}\n {extraInfo && (\n <p className={classNames(styles['service-message__info'], styles['service-message__info--extra'])}>{extraInfo}</p>\n )}\n <div className={styles['service-message__actions']}>\n {hasUrl && (\n <a className={styles['service-message__action']} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button\n ref={closeButtonRef}\n className={classNames(styles['service-message__action'], styles['service-message__action--close'])}\n aria-label={closeBtnText}\n onClick={onDismiss}\n >\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={closeButtonIsHovered} />\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expanded */\n info?: string;\n /** String displayed in service-message when expanded, with a smaller font */\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n /**\n * First of its type. Used to remove border-top\n * @deprecated Har ingen effekt på komponenten\n */\n first?: boolean;\n}\n\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n expanderOpenFromStart = false,\n variant = 'alert',\n testId,\n}) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const labelId = useUuid();\n const hasExpander = !!info || !!extraInfo;\n\n const ariaRole = variant === 'alert' ? 'alert' : 'region';\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: labelId });\n\n const handleClick = (): void => {\n hasExpander && setIsExpanded(!isExpanded);\n };\n\n const classes = classNames(\n styles['service-message'],\n styles[`service-message--${variant}`],\n isExpanded && styles[`service-message--expanded`]\n );\n\n return (\n <div className={classes} role={ariaRole} {...ariaLabelAttributes} data-testid={testId}>\n <Label\n label={label}\n variant={variant}\n id={labelId}\n hasExpander={hasExpander}\n isExpanded={isExpanded}\n dismissable={dismissable}\n onExpand={handleClick}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n {hasExpander && isExpanded && (\n <Content\n info={info}\n extraInfo={extraInfo}\n urlTitle={urlTitle}\n url={url}\n target={target}\n dismissable={dismissable}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n )}\n </div>\n );\n};\n\nexport default ServiceMessage;\n"],"names":["Label","label","variant","id","hasExpander","isExpanded","dismissable","onExpand","onDismiss","closeBtnText","breakpoint","useBreakpoint","isHovered","hoverRef","useHover","iconSize","breakpoints","IconSize","variantToIconMap","React","Icon","InfoSignFill","palette","ErrorSignFill","TriangleX","CheckFill","CustomTag","labelContainerClasses","classNames","styles","ChevronUp","ChevronDown","Close","Content","info","extraInfo","urlTitle","url","target","readMoreRef","readMoreHoverRefIsHovered","closeButtonRef","closeButtonIsHovered","hasUrl","Forward","getColor","X","ServiceMessage","expanderOpenFromStart","testId","setIsExpanded","useState","labelId","useUuid","ariaRole","ariaLabelAttributes","getAriaLabelAttributes","handleClick","classes","ServiceMessage$1"],"mappings":"gmCAsCA,MAAMA,EAA8B,CAAC,CAAE,MAAAC,EAAO,QAAAC,EAAS,GAAAC,EAAI,YAAAC,EAAa,WAAAC,EAAY,YAAAC,EAAa,SAAAC,EAAU,UAAAC,EAAW,aAAAC,CAAA,IAAmB,CACvI,MAAMC,EAAaC,IACb,CAAE,UAAAC,EAAW,SAAAC,CAAS,EAAIC,EAAyB,EAEnDC,EAAWL,EAAaM,EAAY,GAAKC,EAAS,OAASA,EAAS,MACpEC,EAAmB,CACvB,KACEC,EAAA,cAACC,EAAK,CAAA,QAASC,EAAc,MAAOC,EAAQ,aAAc,WAAYA,EAAQ,aAAc,KAAMP,EAAU,UAAAH,EAAsB,EAEpI,KAAMO,EAAA,cAACC,EAAK,CAAA,QAASG,EAAe,MAAOD,EAAQ,UAAW,WAAYA,EAAQ,UAAW,KAAMP,EAAU,UAAAH,EAAsB,EACnI,MAAOO,EAAA,cAACC,EAAK,CAAA,QAASI,EAAW,MAAOF,EAAQ,UAAW,WAAYA,EAAQ,UAAW,KAAMP,EAAU,UAAAH,EAAsB,EAChI,QAASO,EAAA,cAACC,EAAK,CAAA,QAASK,EAAW,MAAOH,EAAQ,QAAS,WAAYA,EAAQ,QAAS,KAAMP,EAAU,UAAAH,EAAsB,CAAA,EAE1Hc,EAAYtB,EAAc,SAAW,OAErCuB,EAAwBC,EAC5BC,EAAO,kCAAkC,EACzCA,EAAO,qCAAqC3B,GAAS,EACrDE,GAAeyB,EAAO,gDAAgD,CAAA,EAGxE,uBACG,MAAI,CAAA,UAAWF,EAAuB,IAAKd,GACzCM,EAAA,cAAA,MAAA,CAAI,UAAWU,EAAO,4BAA4B,GACjDV,EAAA,cAAC,OAAI,UAAWU,EAAO,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