@navikt/ds-react 7.33.5 → 7.34.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 (256) hide show
  1. package/cjs/alert/Alert.js +2 -4
  2. package/cjs/alert/Alert.js.map +1 -1
  3. package/cjs/alert/base-alert/close-button/BaseAlertCloseButton.d.ts +17 -0
  4. package/cjs/alert/base-alert/close-button/BaseAlertCloseButton.js +72 -0
  5. package/cjs/alert/base-alert/close-button/BaseAlertCloseButton.js.map +1 -0
  6. package/cjs/alert/base-alert/content/BaseAlertContent.d.ts +20 -0
  7. package/cjs/alert/base-alert/content/BaseAlertContent.js +70 -0
  8. package/cjs/alert/base-alert/content/BaseAlertContent.js.map +1 -0
  9. package/cjs/alert/base-alert/header/BaseAlertHeader.d.ts +22 -0
  10. package/cjs/alert/base-alert/header/BaseAlertHeader.js +77 -0
  11. package/cjs/alert/base-alert/header/BaseAlertHeader.js.map +1 -0
  12. package/cjs/alert/base-alert/index.d.ts +1 -0
  13. package/cjs/alert/base-alert/index.js +39 -0
  14. package/cjs/alert/base-alert/index.js.map +1 -0
  15. package/cjs/alert/base-alert/namespace.d.ts +10 -0
  16. package/cjs/alert/base-alert/namespace.js +14 -0
  17. package/cjs/alert/base-alert/namespace.js.map +1 -0
  18. package/cjs/alert/base-alert/root/BaseAlertRoot.context.d.ts +12 -0
  19. package/cjs/alert/base-alert/root/BaseAlertRoot.context.js +11 -0
  20. package/cjs/alert/base-alert/root/BaseAlertRoot.context.js.map +1 -0
  21. package/cjs/alert/base-alert/root/BaseAlertRoot.d.ts +43 -0
  22. package/cjs/alert/base-alert/root/BaseAlertRoot.js +65 -0
  23. package/cjs/alert/base-alert/root/BaseAlertRoot.js.map +1 -0
  24. package/cjs/alert/base-alert/root/BaseAlertRoot.utils.d.ts +9 -0
  25. package/cjs/alert/base-alert/root/BaseAlertRoot.utils.js +48 -0
  26. package/cjs/alert/base-alert/root/BaseAlertRoot.utils.js.map +1 -0
  27. package/cjs/alert/base-alert/title/BaseAlertTitle.d.ts +24 -0
  28. package/cjs/alert/base-alert/title/BaseAlertTitle.js +77 -0
  29. package/cjs/alert/base-alert/title/BaseAlertTitle.js.map +1 -0
  30. package/cjs/alert/global-alert/close-button/GlobalAlertCloseButton.d.ts +17 -0
  31. package/cjs/alert/global-alert/close-button/GlobalAlertCloseButton.js +19 -0
  32. package/cjs/alert/global-alert/close-button/GlobalAlertCloseButton.js.map +1 -0
  33. package/cjs/alert/global-alert/content/GlobalAlertContent.d.ts +18 -0
  34. package/cjs/alert/global-alert/content/GlobalAlertContent.js +20 -0
  35. package/cjs/alert/global-alert/content/GlobalAlertContent.js.map +1 -0
  36. package/cjs/alert/global-alert/header/GlobalAlertHeader.d.ts +17 -0
  37. package/cjs/alert/global-alert/header/GlobalAlertHeader.js +54 -0
  38. package/cjs/alert/global-alert/header/GlobalAlertHeader.js.map +1 -0
  39. package/cjs/alert/global-alert/index.d.ts +2 -0
  40. package/cjs/alert/global-alert/index.js +11 -0
  41. package/cjs/alert/global-alert/index.js.map +1 -0
  42. package/cjs/alert/global-alert/root/GlobalAlertRoot.d.ts +81 -0
  43. package/cjs/alert/global-alert/root/GlobalAlertRoot.js +69 -0
  44. package/cjs/alert/global-alert/root/GlobalAlertRoot.js.map +1 -0
  45. package/cjs/alert/global-alert/title/GlobalAlertTitle.d.ts +17 -0
  46. package/cjs/alert/global-alert/title/GlobalAlertTitle.js +19 -0
  47. package/cjs/alert/global-alert/title/GlobalAlertTitle.js.map +1 -0
  48. package/cjs/alert/info-card/content/InfoCardContent.d.ts +18 -0
  49. package/cjs/alert/info-card/content/InfoCardContent.js +20 -0
  50. package/cjs/alert/info-card/content/InfoCardContent.js.map +1 -0
  51. package/cjs/alert/info-card/header/InfoCardHeader.d.ts +16 -0
  52. package/cjs/alert/info-card/header/InfoCardHeader.js +18 -0
  53. package/cjs/alert/info-card/header/InfoCardHeader.js.map +1 -0
  54. package/cjs/alert/info-card/index.d.ts +2 -0
  55. package/cjs/alert/info-card/index.js +10 -0
  56. package/cjs/alert/info-card/index.js.map +1 -0
  57. package/cjs/alert/info-card/root/InfoCardRoot.d.ts +76 -0
  58. package/cjs/alert/info-card/root/InfoCardRoot.js +78 -0
  59. package/cjs/alert/info-card/root/InfoCardRoot.js.map +1 -0
  60. package/cjs/alert/info-card/title/InfoCardTitle.d.ts +17 -0
  61. package/cjs/alert/info-card/title/InfoCardTitle.js +19 -0
  62. package/cjs/alert/info-card/title/InfoCardTitle.js.map +1 -0
  63. package/cjs/alert/local-alert/close-button/LocalAlertCloseButton.d.ts +17 -0
  64. package/cjs/alert/local-alert/close-button/LocalAlertCloseButton.js +19 -0
  65. package/cjs/alert/local-alert/close-button/LocalAlertCloseButton.js.map +1 -0
  66. package/cjs/alert/local-alert/content/LocalAlertContent.d.ts +18 -0
  67. package/cjs/alert/local-alert/content/LocalAlertContent.js +20 -0
  68. package/cjs/alert/local-alert/content/LocalAlertContent.js.map +1 -0
  69. package/cjs/alert/local-alert/header/LocalAlertHeader.d.ts +17 -0
  70. package/cjs/alert/local-alert/header/LocalAlertHeader.js +54 -0
  71. package/cjs/alert/local-alert/header/LocalAlertHeader.js.map +1 -0
  72. package/cjs/alert/local-alert/index.d.ts +2 -0
  73. package/cjs/alert/local-alert/index.js +11 -0
  74. package/cjs/alert/local-alert/index.js.map +1 -0
  75. package/cjs/alert/local-alert/root/LocalAlertRoot.d.ts +81 -0
  76. package/cjs/alert/local-alert/root/LocalAlertRoot.js +81 -0
  77. package/cjs/alert/local-alert/root/LocalAlertRoot.js.map +1 -0
  78. package/cjs/alert/local-alert/title/LocalAlertTitle.d.ts +17 -0
  79. package/cjs/alert/local-alert/title/LocalAlertTitle.js +19 -0
  80. package/cjs/alert/local-alert/title/LocalAlertTitle.js.map +1 -0
  81. package/cjs/date/Date.locale.d.ts +5 -0
  82. package/cjs/index.d.ts +4 -0
  83. package/cjs/index.js +9 -1
  84. package/cjs/index.js.map +1 -1
  85. package/cjs/inline-message/icon/InlineMessageIcon.d.ts +5 -0
  86. package/cjs/inline-message/icon/InlineMessageIcon.js +24 -0
  87. package/cjs/inline-message/icon/InlineMessageIcon.js.map +1 -0
  88. package/cjs/inline-message/index.d.ts +2 -0
  89. package/cjs/inline-message/index.js +7 -0
  90. package/cjs/inline-message/index.js.map +1 -0
  91. package/cjs/inline-message/root/InlineMessage.d.ts +36 -0
  92. package/cjs/inline-message/root/InlineMessage.js +91 -0
  93. package/cjs/inline-message/root/InlineMessage.js.map +1 -0
  94. package/cjs/timeline/period/ClickablePeriod.js +3 -15
  95. package/cjs/timeline/period/ClickablePeriod.js.map +1 -1
  96. package/cjs/timeline/pin/PinInternal.js +3 -15
  97. package/cjs/timeline/pin/PinInternal.js.map +1 -1
  98. package/cjs/util/i18n/locales/en.d.ts +1 -4
  99. package/cjs/util/i18n/locales/en.js +1 -4
  100. package/cjs/util/i18n/locales/en.js.map +1 -1
  101. package/cjs/util/i18n/locales/nb.d.ts +2 -6
  102. package/cjs/util/i18n/locales/nb.js +2 -6
  103. package/cjs/util/i18n/locales/nb.js.map +1 -1
  104. package/cjs/util/i18n/locales/nn.d.ts +1 -4
  105. package/cjs/util/i18n/locales/nn.js +1 -4
  106. package/cjs/util/i18n/locales/nn.js.map +1 -1
  107. package/esm/alert/Alert.js +2 -4
  108. package/esm/alert/Alert.js.map +1 -1
  109. package/esm/alert/base-alert/close-button/BaseAlertCloseButton.d.ts +17 -0
  110. package/esm/alert/base-alert/close-button/BaseAlertCloseButton.js +36 -0
  111. package/esm/alert/base-alert/close-button/BaseAlertCloseButton.js.map +1 -0
  112. package/esm/alert/base-alert/content/BaseAlertContent.d.ts +20 -0
  113. package/esm/alert/base-alert/content/BaseAlertContent.js +34 -0
  114. package/esm/alert/base-alert/content/BaseAlertContent.js.map +1 -0
  115. package/esm/alert/base-alert/header/BaseAlertHeader.d.ts +22 -0
  116. package/esm/alert/base-alert/header/BaseAlertHeader.js +41 -0
  117. package/esm/alert/base-alert/header/BaseAlertHeader.js.map +1 -0
  118. package/esm/alert/base-alert/index.d.ts +1 -0
  119. package/esm/alert/base-alert/index.js +3 -0
  120. package/esm/alert/base-alert/index.js.map +1 -0
  121. package/esm/alert/base-alert/namespace.d.ts +10 -0
  122. package/esm/alert/base-alert/namespace.js +6 -0
  123. package/esm/alert/base-alert/namespace.js.map +1 -0
  124. package/esm/alert/base-alert/root/BaseAlertRoot.context.d.ts +12 -0
  125. package/esm/alert/base-alert/root/BaseAlertRoot.context.js +7 -0
  126. package/esm/alert/base-alert/root/BaseAlertRoot.context.js.map +1 -0
  127. package/esm/alert/base-alert/root/BaseAlertRoot.d.ts +43 -0
  128. package/esm/alert/base-alert/root/BaseAlertRoot.js +29 -0
  129. package/esm/alert/base-alert/root/BaseAlertRoot.js.map +1 -0
  130. package/esm/alert/base-alert/root/BaseAlertRoot.utils.d.ts +9 -0
  131. package/esm/alert/base-alert/root/BaseAlertRoot.utils.js +42 -0
  132. package/esm/alert/base-alert/root/BaseAlertRoot.utils.js.map +1 -0
  133. package/esm/alert/base-alert/title/BaseAlertTitle.d.ts +24 -0
  134. package/esm/alert/base-alert/title/BaseAlertTitle.js +38 -0
  135. package/esm/alert/base-alert/title/BaseAlertTitle.js.map +1 -0
  136. package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.d.ts +17 -0
  137. package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.js +16 -0
  138. package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.js.map +1 -0
  139. package/esm/alert/global-alert/content/GlobalAlertContent.d.ts +18 -0
  140. package/esm/alert/global-alert/content/GlobalAlertContent.js +17 -0
  141. package/esm/alert/global-alert/content/GlobalAlertContent.js.map +1 -0
  142. package/esm/alert/global-alert/header/GlobalAlertHeader.d.ts +17 -0
  143. package/esm/alert/global-alert/header/GlobalAlertHeader.js +18 -0
  144. package/esm/alert/global-alert/header/GlobalAlertHeader.js.map +1 -0
  145. package/esm/alert/global-alert/index.d.ts +2 -0
  146. package/esm/alert/global-alert/index.js +3 -0
  147. package/esm/alert/global-alert/index.js.map +1 -0
  148. package/esm/alert/global-alert/root/GlobalAlertRoot.d.ts +81 -0
  149. package/esm/alert/global-alert/root/GlobalAlertRoot.js +30 -0
  150. package/esm/alert/global-alert/root/GlobalAlertRoot.js.map +1 -0
  151. package/esm/alert/global-alert/title/GlobalAlertTitle.d.ts +17 -0
  152. package/esm/alert/global-alert/title/GlobalAlertTitle.js +16 -0
  153. package/esm/alert/global-alert/title/GlobalAlertTitle.js.map +1 -0
  154. package/esm/alert/info-card/content/InfoCardContent.d.ts +18 -0
  155. package/esm/alert/info-card/content/InfoCardContent.js +17 -0
  156. package/esm/alert/info-card/content/InfoCardContent.js.map +1 -0
  157. package/esm/alert/info-card/header/InfoCardHeader.d.ts +16 -0
  158. package/esm/alert/info-card/header/InfoCardHeader.js +15 -0
  159. package/esm/alert/info-card/header/InfoCardHeader.js.map +1 -0
  160. package/esm/alert/info-card/index.d.ts +2 -0
  161. package/esm/alert/info-card/index.js +3 -0
  162. package/esm/alert/info-card/index.js.map +1 -0
  163. package/esm/alert/info-card/root/InfoCardRoot.d.ts +76 -0
  164. package/esm/alert/info-card/root/InfoCardRoot.js +40 -0
  165. package/esm/alert/info-card/root/InfoCardRoot.js.map +1 -0
  166. package/esm/alert/info-card/title/InfoCardTitle.d.ts +17 -0
  167. package/esm/alert/info-card/title/InfoCardTitle.js +16 -0
  168. package/esm/alert/info-card/title/InfoCardTitle.js.map +1 -0
  169. package/esm/alert/local-alert/close-button/LocalAlertCloseButton.d.ts +17 -0
  170. package/esm/alert/local-alert/close-button/LocalAlertCloseButton.js +16 -0
  171. package/esm/alert/local-alert/close-button/LocalAlertCloseButton.js.map +1 -0
  172. package/esm/alert/local-alert/content/LocalAlertContent.d.ts +18 -0
  173. package/esm/alert/local-alert/content/LocalAlertContent.js +17 -0
  174. package/esm/alert/local-alert/content/LocalAlertContent.js.map +1 -0
  175. package/esm/alert/local-alert/header/LocalAlertHeader.d.ts +17 -0
  176. package/esm/alert/local-alert/header/LocalAlertHeader.js +18 -0
  177. package/esm/alert/local-alert/header/LocalAlertHeader.js.map +1 -0
  178. package/esm/alert/local-alert/index.d.ts +2 -0
  179. package/esm/alert/local-alert/index.js +3 -0
  180. package/esm/alert/local-alert/index.js.map +1 -0
  181. package/esm/alert/local-alert/root/LocalAlertRoot.d.ts +81 -0
  182. package/esm/alert/local-alert/root/LocalAlertRoot.js +42 -0
  183. package/esm/alert/local-alert/root/LocalAlertRoot.js.map +1 -0
  184. package/esm/alert/local-alert/title/LocalAlertTitle.d.ts +17 -0
  185. package/esm/alert/local-alert/title/LocalAlertTitle.js +16 -0
  186. package/esm/alert/local-alert/title/LocalAlertTitle.js.map +1 -0
  187. package/esm/date/Date.locale.d.ts +5 -0
  188. package/esm/index.d.ts +4 -0
  189. package/esm/index.js +4 -0
  190. package/esm/index.js.map +1 -1
  191. package/esm/inline-message/icon/InlineMessageIcon.d.ts +5 -0
  192. package/esm/inline-message/icon/InlineMessageIcon.js +19 -0
  193. package/esm/inline-message/icon/InlineMessageIcon.js.map +1 -0
  194. package/esm/inline-message/index.d.ts +2 -0
  195. package/esm/inline-message/index.js +3 -0
  196. package/esm/inline-message/index.js.map +1 -0
  197. package/esm/inline-message/root/InlineMessage.d.ts +36 -0
  198. package/esm/inline-message/root/InlineMessage.js +52 -0
  199. package/esm/inline-message/root/InlineMessage.js.map +1 -0
  200. package/esm/timeline/period/ClickablePeriod.js +6 -18
  201. package/esm/timeline/period/ClickablePeriod.js.map +1 -1
  202. package/esm/timeline/pin/PinInternal.js +6 -18
  203. package/esm/timeline/pin/PinInternal.js.map +1 -1
  204. package/esm/util/i18n/locales/en.d.ts +1 -4
  205. package/esm/util/i18n/locales/en.js +1 -4
  206. package/esm/util/i18n/locales/en.js.map +1 -1
  207. package/esm/util/i18n/locales/nb.d.ts +2 -6
  208. package/esm/util/i18n/locales/nb.js +2 -6
  209. package/esm/util/i18n/locales/nb.js.map +1 -1
  210. package/esm/util/i18n/locales/nn.d.ts +1 -4
  211. package/esm/util/i18n/locales/nn.js +1 -4
  212. package/esm/util/i18n/locales/nn.js.map +1 -1
  213. package/package.json +45 -4
  214. package/src/alert/Alert.tsx +2 -10
  215. package/src/alert/base-alert/close-button/BaseAlertCloseButton.tsx +44 -0
  216. package/src/alert/base-alert/content/BaseAlertContent.tsx +43 -0
  217. package/src/alert/base-alert/header/BaseAlertHeader.tsx +61 -0
  218. package/src/alert/base-alert/index.ts +2 -0
  219. package/src/alert/base-alert/namespace.ts +11 -0
  220. package/src/alert/base-alert/root/BaseAlertRoot.context.tsx +17 -0
  221. package/src/alert/base-alert/root/BaseAlertRoot.tsx +102 -0
  222. package/src/alert/base-alert/root/BaseAlertRoot.utils.tsx +67 -0
  223. package/src/alert/base-alert/title/BaseAlertTitle.tsx +63 -0
  224. package/src/alert/global-alert/close-button/GlobalAlertCloseButton.tsx +20 -0
  225. package/src/alert/global-alert/content/GlobalAlertContent.tsx +21 -0
  226. package/src/alert/global-alert/header/GlobalAlertHeader.tsx +24 -0
  227. package/src/alert/global-alert/index.ts +16 -0
  228. package/src/alert/global-alert/root/GlobalAlertRoot.tsx +132 -0
  229. package/src/alert/global-alert/title/GlobalAlertTitle.tsx +20 -0
  230. package/src/alert/info-card/content/InfoCardContent.tsx +21 -0
  231. package/src/alert/info-card/header/InfoCardHeader.tsx +19 -0
  232. package/src/alert/info-card/index.ts +14 -0
  233. package/src/alert/info-card/root/InfoCardRoot.tsx +120 -0
  234. package/src/alert/info-card/title/InfoCardTitle.tsx +20 -0
  235. package/src/alert/local-alert/close-button/LocalAlertCloseButton.tsx +20 -0
  236. package/src/alert/local-alert/content/LocalAlertContent.tsx +21 -0
  237. package/src/alert/local-alert/header/LocalAlertHeader.tsx +24 -0
  238. package/src/alert/local-alert/index.ts +16 -0
  239. package/src/alert/local-alert/root/LocalAlertRoot.tsx +133 -0
  240. package/src/alert/local-alert/title/LocalAlertTitle.tsx +20 -0
  241. package/src/index.ts +24 -0
  242. package/src/inline-message/icon/InlineMessageIcon.tsx +33 -0
  243. package/src/inline-message/index.ts +3 -0
  244. package/src/inline-message/root/InlineMessage.tsx +92 -0
  245. package/src/timeline/period/ClickablePeriod.tsx +5 -34
  246. package/src/timeline/pin/PinInternal.tsx +5 -28
  247. package/src/util/i18n/locales/en.ts +1 -5
  248. package/src/util/i18n/locales/nb.ts +1 -5
  249. package/src/util/i18n/locales/nn.ts +1 -5
  250. package/cjs/util/renderStoriesForChromatic.d.ts +0 -5
  251. package/cjs/util/renderStoriesForChromatic.js +0 -21
  252. package/cjs/util/renderStoriesForChromatic.js.map +0 -1
  253. package/esm/util/renderStoriesForChromatic.d.ts +0 -5
  254. package/esm/util/renderStoriesForChromatic.js +0 -15
  255. package/esm/util/renderStoriesForChromatic.js.map +0 -1
  256. package/src/util/renderStoriesForChromatic.tsx +0 -26
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  FloatingFocusManager,
3
3
  autoUpdate,
4
- arrow as flArrow,
5
4
  flip,
6
5
  offset,
7
6
  safePolygon,
@@ -13,8 +12,8 @@ import {
13
12
  useInteractions,
14
13
  } from "@floating-ui/react";
15
14
  import { format } from "date-fns";
16
- import React, { forwardRef, useRef, useState } from "react";
17
- import { useRenameCSS, useThemeInternal } from "../../theme/Theme";
15
+ import React, { forwardRef, useState } from "react";
16
+ import { useRenameCSS } from "../../theme/Theme";
18
17
  import { useMergeRefs } from "../../util/hooks/useMergeRefs";
19
18
  import { useI18n } from "../../util/i18n/i18n.hooks";
20
19
  import { useTimelineContext } from "../hooks/useTimelineContext";
@@ -37,16 +36,13 @@ export const PinInternal = forwardRef<HTMLButtonElement, TimelinePinProps>(
37
36
  const { cn } = useRenameCSS();
38
37
  const { startDate, endDate, direction } = useTimelineContext();
39
38
  const [open, setOpen] = useState(false);
40
- const arrowRef = useRef<HTMLDivElement | null>(null);
41
- const translate = useI18n("Timeline");
42
39
 
43
- const themeContext = useThemeInternal(false);
44
- const showArrow = !themeContext?.isDarkside;
40
+ const translate = useI18n("Timeline");
45
41
 
46
42
  const {
47
43
  context,
48
44
  placement,
49
- middlewareData: { arrow: { x: arrowX, y: arrowY } = {} },
45
+
50
46
  refs,
51
47
  floatingStyles,
52
48
  } = useFloating({
@@ -55,10 +51,9 @@ export const PinInternal = forwardRef<HTMLButtonElement, TimelinePinProps>(
55
51
  onOpenChange: (_open) => setOpen(_open),
56
52
  whileElementsMounted: autoUpdate,
57
53
  middleware: [
58
- offset(showArrow ? 16 : 8),
54
+ offset(8),
59
55
  shift(),
60
56
  flip({ padding: 5, fallbackPlacements: ["bottom", "top"] }),
61
- flArrow({ element: arrowRef, padding: 5 }),
62
57
  ],
63
58
  });
64
59
 
@@ -79,13 +74,6 @@ export const PinInternal = forwardRef<HTMLButtonElement, TimelinePinProps>(
79
74
 
80
75
  const mergedRef = useMergeRefs(refs.setReference, ref);
81
76
 
82
- const staticSide = {
83
- top: "bottom",
84
- right: "left",
85
- bottom: "top",
86
- left: "right",
87
- }[placement.split("-")[0]];
88
-
89
77
  const label = translate("Pin.pin", {
90
78
  date: format(date, translate("dateFormat")),
91
79
  });
@@ -132,17 +120,6 @@ export const PinInternal = forwardRef<HTMLButtonElement, TimelinePinProps>(
132
120
  style={floatingStyles}
133
121
  >
134
122
  {children}
135
- {showArrow && (
136
- <div
137
- ref={arrowRef}
138
- style={{
139
- ...(arrowX != null ? { left: arrowX } : {}),
140
- ...(arrowY != null ? { top: arrowY } : {}),
141
- ...(staticSide ? { [staticSide]: "-0.5rem" } : {}),
142
- }}
143
- className={cn("navds-timeline__popover-arrow")}
144
- />
145
- )}
146
123
  </div>
147
124
  </FloatingFocusManager>
148
125
  )}
@@ -8,15 +8,11 @@ export default {
8
8
  showLess: "Show less",
9
9
  readOnly: "Read-only",
10
10
  close: "Close",
11
- },
12
-
13
- Alert: {
14
- closeAlert: "Close alert",
15
- closeMessage: "Close message",
16
11
  error: "Error",
17
12
  info: "Information",
18
13
  success: "Success",
19
14
  warning: "Warning",
15
+ announcement: "Announcement",
20
16
  },
21
17
  Chips: {
22
18
  Removable: {
@@ -11,15 +11,11 @@ export default {
11
11
  showLess: "Vis mindre",
12
12
  readOnly: "Skrivebeskyttet",
13
13
  close: "Lukk",
14
- },
15
-
16
- Alert: {
17
- closeAlert: "Lukk varsel",
18
- closeMessage: "Lukk melding",
19
14
  error: "Feil",
20
15
  info: "Informasjon",
21
16
  success: "Suksess",
22
17
  warning: "Advarsel",
18
+ announcement: "Kunngjøring",
23
19
  },
24
20
  Chips: {
25
21
  Removable: {
@@ -8,15 +8,11 @@ export default {
8
8
  showLess: "Vis mindre",
9
9
  readOnly: "Skrivebeskytta",
10
10
  close: "Lukk",
11
- },
12
-
13
- Alert: {
14
- closeAlert: "Lukk varsel",
15
- closeMessage: "Lukk melding",
16
11
  error: "Feil",
17
12
  info: "Informasjon",
18
13
  success: "Suksess",
19
14
  warning: "Åtvaring",
15
+ announcement: "Kunngjering",
20
16
  },
21
17
  Chips: {
22
18
  Removable: {
@@ -1,5 +0,0 @@
1
- import { StoryObj } from "@storybook/react-vite";
2
- import React from "react";
3
- export declare function renderStoriesForChromatic(stories: Record<string, {
4
- render?: (...args: any[]) => React.ReactNode;
5
- } | React.FunctionComponent>): StoryObj;
@@ -1,21 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.renderStoriesForChromatic = renderStoriesForChromatic;
7
- const react_1 = __importDefault(require("react"));
8
- function renderStoriesForChromatic(stories) {
9
- return {
10
- render: (...args) => (react_1.default.createElement(react_1.default.Fragment, null, Object.entries(stories).map(([storyName, Story]) => {
11
- var _a;
12
- return (react_1.default.createElement("div", { key: storyName },
13
- react_1.default.createElement("h2", { className: "storyheading" }, storyName),
14
- typeof Story === "function" ? react_1.default.createElement(Story, null) : (_a = Story.render) === null || _a === void 0 ? void 0 : _a.call(Story, ...args)));
15
- }))),
16
- parameters: {
17
- chromatic: { disable: false },
18
- },
19
- };
20
- }
21
- //# sourceMappingURL=renderStoriesForChromatic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderStoriesForChromatic.js","sourceRoot":"","sources":["../../src/util/renderStoriesForChromatic.tsx"],"names":[],"mappings":";;;;;AAIA,8DAqBC;AAxBD,kDAA0B;AAG1B,SAAgB,yBAAyB,CACvC,OAGC;IAED,OAAO;QACL,MAAM,EAAE,CAAC,GAAG,IAA0C,EAAE,EAAE,CAAC,CACzD,8DACG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE;;YAAC,OAAA,CACnD,uCAAK,GAAG,EAAE,SAAS;gBACjB,sCAAI,SAAS,EAAC,cAAc,IAAE,SAAS,CAAM;gBAC5C,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,8BAAC,KAAK,OAAG,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,MAAM,sDAAG,GAAG,IAAI,CAAC,CAC9D,CACP,CAAA;SAAA,CAAC,CACD,CACJ;QACD,UAAU,EAAE;YACV,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAC9B;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +0,0 @@
1
- import { StoryObj } from "@storybook/react-vite";
2
- import React from "react";
3
- export declare function renderStoriesForChromatic(stories: Record<string, {
4
- render?: (...args: any[]) => React.ReactNode;
5
- } | React.FunctionComponent>): StoryObj;
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- export function renderStoriesForChromatic(stories) {
3
- return {
4
- render: (...args) => (React.createElement(React.Fragment, null, Object.entries(stories).map(([storyName, Story]) => {
5
- var _a;
6
- return (React.createElement("div", { key: storyName },
7
- React.createElement("h2", { className: "storyheading" }, storyName),
8
- typeof Story === "function" ? React.createElement(Story, null) : (_a = Story.render) === null || _a === void 0 ? void 0 : _a.call(Story, ...args)));
9
- }))),
10
- parameters: {
11
- chromatic: { disable: false },
12
- },
13
- };
14
- }
15
- //# sourceMappingURL=renderStoriesForChromatic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderStoriesForChromatic.js","sourceRoot":"","sources":["../../src/util/renderStoriesForChromatic.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,yBAAyB,CACvC,OAGC;IAED,OAAO;QACL,MAAM,EAAE,CAAC,GAAG,IAA0C,EAAE,EAAE,CAAC,CACzD,0CACG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,EAAE;;YAAC,OAAA,CACnD,6BAAK,GAAG,EAAE,SAAS;gBACjB,4BAAI,SAAS,EAAC,cAAc,IAAE,SAAS,CAAM;gBAC5C,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,oBAAC,KAAK,OAAG,CAAC,CAAC,CAAC,MAAA,KAAK,CAAC,MAAM,sDAAG,GAAG,IAAI,CAAC,CAC9D,CACP,CAAA;SAAA,CAAC,CACD,CACJ;QACD,UAAU,EAAE;YACV,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE;SAC9B;KACF,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- import { Args, StoryObj } from "@storybook/react-vite";
2
- import React from "react";
3
- import { Renderer, StoryContext } from "storybook/internal/types";
4
-
5
- export function renderStoriesForChromatic(
6
- stories: Record<
7
- string,
8
- { render?: (...args: any[]) => React.ReactNode } | React.FunctionComponent
9
- >,
10
- ): StoryObj {
11
- return {
12
- render: (...args: [Args, StoryContext<Renderer, Args>]) => (
13
- <>
14
- {Object.entries(stories).map(([storyName, Story]) => (
15
- <div key={storyName}>
16
- <h2 className="storyheading">{storyName}</h2>
17
- {typeof Story === "function" ? <Story /> : Story.render?.(...args)}
18
- </div>
19
- ))}
20
- </>
21
- ),
22
- parameters: {
23
- chromatic: { disable: false },
24
- },
25
- };
26
- }