@navikt/ds-react 7.33.5 → 7.35.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 (261) 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/form/combobox/FilteredOptions/NoSearchHitsMessage.js +3 -1
  83. package/cjs/form/combobox/FilteredOptions/NoSearchHitsMessage.js.map +1 -1
  84. package/cjs/index.d.ts +4 -0
  85. package/cjs/index.js +9 -1
  86. package/cjs/index.js.map +1 -1
  87. package/cjs/inline-message/icon/InlineMessageIcon.d.ts +5 -0
  88. package/cjs/inline-message/icon/InlineMessageIcon.js +24 -0
  89. package/cjs/inline-message/icon/InlineMessageIcon.js.map +1 -0
  90. package/cjs/inline-message/index.d.ts +2 -0
  91. package/cjs/inline-message/index.js +7 -0
  92. package/cjs/inline-message/index.js.map +1 -0
  93. package/cjs/inline-message/root/InlineMessage.d.ts +36 -0
  94. package/cjs/inline-message/root/InlineMessage.js +91 -0
  95. package/cjs/inline-message/root/InlineMessage.js.map +1 -0
  96. package/cjs/timeline/period/ClickablePeriod.js +3 -15
  97. package/cjs/timeline/period/ClickablePeriod.js.map +1 -1
  98. package/cjs/timeline/pin/PinInternal.js +3 -15
  99. package/cjs/timeline/pin/PinInternal.js.map +1 -1
  100. package/cjs/util/i18n/locales/en.d.ts +2 -4
  101. package/cjs/util/i18n/locales/en.js +2 -4
  102. package/cjs/util/i18n/locales/en.js.map +1 -1
  103. package/cjs/util/i18n/locales/nb.d.ts +4 -6
  104. package/cjs/util/i18n/locales/nb.js +4 -6
  105. package/cjs/util/i18n/locales/nb.js.map +1 -1
  106. package/cjs/util/i18n/locales/nn.d.ts +2 -4
  107. package/cjs/util/i18n/locales/nn.js +2 -4
  108. package/cjs/util/i18n/locales/nn.js.map +1 -1
  109. package/esm/alert/Alert.js +2 -4
  110. package/esm/alert/Alert.js.map +1 -1
  111. package/esm/alert/base-alert/close-button/BaseAlertCloseButton.d.ts +17 -0
  112. package/esm/alert/base-alert/close-button/BaseAlertCloseButton.js +36 -0
  113. package/esm/alert/base-alert/close-button/BaseAlertCloseButton.js.map +1 -0
  114. package/esm/alert/base-alert/content/BaseAlertContent.d.ts +20 -0
  115. package/esm/alert/base-alert/content/BaseAlertContent.js +34 -0
  116. package/esm/alert/base-alert/content/BaseAlertContent.js.map +1 -0
  117. package/esm/alert/base-alert/header/BaseAlertHeader.d.ts +22 -0
  118. package/esm/alert/base-alert/header/BaseAlertHeader.js +41 -0
  119. package/esm/alert/base-alert/header/BaseAlertHeader.js.map +1 -0
  120. package/esm/alert/base-alert/index.d.ts +1 -0
  121. package/esm/alert/base-alert/index.js +3 -0
  122. package/esm/alert/base-alert/index.js.map +1 -0
  123. package/esm/alert/base-alert/namespace.d.ts +10 -0
  124. package/esm/alert/base-alert/namespace.js +6 -0
  125. package/esm/alert/base-alert/namespace.js.map +1 -0
  126. package/esm/alert/base-alert/root/BaseAlertRoot.context.d.ts +12 -0
  127. package/esm/alert/base-alert/root/BaseAlertRoot.context.js +7 -0
  128. package/esm/alert/base-alert/root/BaseAlertRoot.context.js.map +1 -0
  129. package/esm/alert/base-alert/root/BaseAlertRoot.d.ts +43 -0
  130. package/esm/alert/base-alert/root/BaseAlertRoot.js +29 -0
  131. package/esm/alert/base-alert/root/BaseAlertRoot.js.map +1 -0
  132. package/esm/alert/base-alert/root/BaseAlertRoot.utils.d.ts +9 -0
  133. package/esm/alert/base-alert/root/BaseAlertRoot.utils.js +42 -0
  134. package/esm/alert/base-alert/root/BaseAlertRoot.utils.js.map +1 -0
  135. package/esm/alert/base-alert/title/BaseAlertTitle.d.ts +24 -0
  136. package/esm/alert/base-alert/title/BaseAlertTitle.js +38 -0
  137. package/esm/alert/base-alert/title/BaseAlertTitle.js.map +1 -0
  138. package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.d.ts +17 -0
  139. package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.js +16 -0
  140. package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.js.map +1 -0
  141. package/esm/alert/global-alert/content/GlobalAlertContent.d.ts +18 -0
  142. package/esm/alert/global-alert/content/GlobalAlertContent.js +17 -0
  143. package/esm/alert/global-alert/content/GlobalAlertContent.js.map +1 -0
  144. package/esm/alert/global-alert/header/GlobalAlertHeader.d.ts +17 -0
  145. package/esm/alert/global-alert/header/GlobalAlertHeader.js +18 -0
  146. package/esm/alert/global-alert/header/GlobalAlertHeader.js.map +1 -0
  147. package/esm/alert/global-alert/index.d.ts +2 -0
  148. package/esm/alert/global-alert/index.js +3 -0
  149. package/esm/alert/global-alert/index.js.map +1 -0
  150. package/esm/alert/global-alert/root/GlobalAlertRoot.d.ts +81 -0
  151. package/esm/alert/global-alert/root/GlobalAlertRoot.js +30 -0
  152. package/esm/alert/global-alert/root/GlobalAlertRoot.js.map +1 -0
  153. package/esm/alert/global-alert/title/GlobalAlertTitle.d.ts +17 -0
  154. package/esm/alert/global-alert/title/GlobalAlertTitle.js +16 -0
  155. package/esm/alert/global-alert/title/GlobalAlertTitle.js.map +1 -0
  156. package/esm/alert/info-card/content/InfoCardContent.d.ts +18 -0
  157. package/esm/alert/info-card/content/InfoCardContent.js +17 -0
  158. package/esm/alert/info-card/content/InfoCardContent.js.map +1 -0
  159. package/esm/alert/info-card/header/InfoCardHeader.d.ts +16 -0
  160. package/esm/alert/info-card/header/InfoCardHeader.js +15 -0
  161. package/esm/alert/info-card/header/InfoCardHeader.js.map +1 -0
  162. package/esm/alert/info-card/index.d.ts +2 -0
  163. package/esm/alert/info-card/index.js +3 -0
  164. package/esm/alert/info-card/index.js.map +1 -0
  165. package/esm/alert/info-card/root/InfoCardRoot.d.ts +76 -0
  166. package/esm/alert/info-card/root/InfoCardRoot.js +40 -0
  167. package/esm/alert/info-card/root/InfoCardRoot.js.map +1 -0
  168. package/esm/alert/info-card/title/InfoCardTitle.d.ts +17 -0
  169. package/esm/alert/info-card/title/InfoCardTitle.js +16 -0
  170. package/esm/alert/info-card/title/InfoCardTitle.js.map +1 -0
  171. package/esm/alert/local-alert/close-button/LocalAlertCloseButton.d.ts +17 -0
  172. package/esm/alert/local-alert/close-button/LocalAlertCloseButton.js +16 -0
  173. package/esm/alert/local-alert/close-button/LocalAlertCloseButton.js.map +1 -0
  174. package/esm/alert/local-alert/content/LocalAlertContent.d.ts +18 -0
  175. package/esm/alert/local-alert/content/LocalAlertContent.js +17 -0
  176. package/esm/alert/local-alert/content/LocalAlertContent.js.map +1 -0
  177. package/esm/alert/local-alert/header/LocalAlertHeader.d.ts +17 -0
  178. package/esm/alert/local-alert/header/LocalAlertHeader.js +18 -0
  179. package/esm/alert/local-alert/header/LocalAlertHeader.js.map +1 -0
  180. package/esm/alert/local-alert/index.d.ts +2 -0
  181. package/esm/alert/local-alert/index.js +3 -0
  182. package/esm/alert/local-alert/index.js.map +1 -0
  183. package/esm/alert/local-alert/root/LocalAlertRoot.d.ts +81 -0
  184. package/esm/alert/local-alert/root/LocalAlertRoot.js +42 -0
  185. package/esm/alert/local-alert/root/LocalAlertRoot.js.map +1 -0
  186. package/esm/alert/local-alert/title/LocalAlertTitle.d.ts +17 -0
  187. package/esm/alert/local-alert/title/LocalAlertTitle.js +16 -0
  188. package/esm/alert/local-alert/title/LocalAlertTitle.js.map +1 -0
  189. package/esm/date/Date.locale.d.ts +5 -0
  190. package/esm/form/combobox/FilteredOptions/NoSearchHitsMessage.js +3 -1
  191. package/esm/form/combobox/FilteredOptions/NoSearchHitsMessage.js.map +1 -1
  192. package/esm/index.d.ts +4 -0
  193. package/esm/index.js +4 -0
  194. package/esm/index.js.map +1 -1
  195. package/esm/inline-message/icon/InlineMessageIcon.d.ts +5 -0
  196. package/esm/inline-message/icon/InlineMessageIcon.js +19 -0
  197. package/esm/inline-message/icon/InlineMessageIcon.js.map +1 -0
  198. package/esm/inline-message/index.d.ts +2 -0
  199. package/esm/inline-message/index.js +3 -0
  200. package/esm/inline-message/index.js.map +1 -0
  201. package/esm/inline-message/root/InlineMessage.d.ts +36 -0
  202. package/esm/inline-message/root/InlineMessage.js +52 -0
  203. package/esm/inline-message/root/InlineMessage.js.map +1 -0
  204. package/esm/timeline/period/ClickablePeriod.js +6 -18
  205. package/esm/timeline/period/ClickablePeriod.js.map +1 -1
  206. package/esm/timeline/pin/PinInternal.js +6 -18
  207. package/esm/timeline/pin/PinInternal.js.map +1 -1
  208. package/esm/util/i18n/locales/en.d.ts +2 -4
  209. package/esm/util/i18n/locales/en.js +2 -4
  210. package/esm/util/i18n/locales/en.js.map +1 -1
  211. package/esm/util/i18n/locales/nb.d.ts +4 -6
  212. package/esm/util/i18n/locales/nb.js +4 -6
  213. package/esm/util/i18n/locales/nb.js.map +1 -1
  214. package/esm/util/i18n/locales/nn.d.ts +2 -4
  215. package/esm/util/i18n/locales/nn.js +2 -4
  216. package/esm/util/i18n/locales/nn.js.map +1 -1
  217. package/package.json +45 -4
  218. package/src/alert/Alert.tsx +2 -10
  219. package/src/alert/base-alert/close-button/BaseAlertCloseButton.tsx +44 -0
  220. package/src/alert/base-alert/content/BaseAlertContent.tsx +43 -0
  221. package/src/alert/base-alert/header/BaseAlertHeader.tsx +61 -0
  222. package/src/alert/base-alert/index.ts +2 -0
  223. package/src/alert/base-alert/namespace.ts +11 -0
  224. package/src/alert/base-alert/root/BaseAlertRoot.context.tsx +17 -0
  225. package/src/alert/base-alert/root/BaseAlertRoot.tsx +102 -0
  226. package/src/alert/base-alert/root/BaseAlertRoot.utils.tsx +67 -0
  227. package/src/alert/base-alert/title/BaseAlertTitle.tsx +63 -0
  228. package/src/alert/global-alert/close-button/GlobalAlertCloseButton.tsx +20 -0
  229. package/src/alert/global-alert/content/GlobalAlertContent.tsx +21 -0
  230. package/src/alert/global-alert/header/GlobalAlertHeader.tsx +24 -0
  231. package/src/alert/global-alert/index.ts +16 -0
  232. package/src/alert/global-alert/root/GlobalAlertRoot.tsx +132 -0
  233. package/src/alert/global-alert/title/GlobalAlertTitle.tsx +20 -0
  234. package/src/alert/info-card/content/InfoCardContent.tsx +21 -0
  235. package/src/alert/info-card/header/InfoCardHeader.tsx +19 -0
  236. package/src/alert/info-card/index.ts +14 -0
  237. package/src/alert/info-card/root/InfoCardRoot.tsx +123 -0
  238. package/src/alert/info-card/title/InfoCardTitle.tsx +20 -0
  239. package/src/alert/local-alert/close-button/LocalAlertCloseButton.tsx +20 -0
  240. package/src/alert/local-alert/content/LocalAlertContent.tsx +21 -0
  241. package/src/alert/local-alert/header/LocalAlertHeader.tsx +24 -0
  242. package/src/alert/local-alert/index.ts +16 -0
  243. package/src/alert/local-alert/root/LocalAlertRoot.tsx +133 -0
  244. package/src/alert/local-alert/title/LocalAlertTitle.tsx +20 -0
  245. package/src/form/combobox/FilteredOptions/NoSearchHitsMessage.tsx +4 -1
  246. package/src/index.ts +24 -0
  247. package/src/inline-message/icon/InlineMessageIcon.tsx +33 -0
  248. package/src/inline-message/index.ts +3 -0
  249. package/src/inline-message/root/InlineMessage.tsx +92 -0
  250. package/src/timeline/period/ClickablePeriod.tsx +5 -34
  251. package/src/timeline/pin/PinInternal.tsx +5 -28
  252. package/src/util/i18n/locales/en.ts +2 -5
  253. package/src/util/i18n/locales/nb.ts +2 -5
  254. package/src/util/i18n/locales/nn.ts +2 -5
  255. package/cjs/util/renderStoriesForChromatic.d.ts +0 -5
  256. package/cjs/util/renderStoriesForChromatic.js +0 -21
  257. package/cjs/util/renderStoriesForChromatic.js.map +0 -1
  258. package/esm/util/renderStoriesForChromatic.d.ts +0 -5
  259. package/esm/util/renderStoriesForChromatic.js +0 -15
  260. package/esm/util/renderStoriesForChromatic.js.map +0 -1
  261. package/src/util/renderStoriesForChromatic.tsx +0 -26
@@ -0,0 +1,76 @@
1
+ import React from "react";
2
+ import { BaseAlert } from "../../base-alert";
3
+ import { InfoCardContent, type InfoCardContentProps } from "../content/InfoCardContent";
4
+ import { InfoCardHeader, type InfoCardHeaderProps } from "../header/InfoCardHeader";
5
+ import { InfoCardTitle, type InfoCardTitleProps } from "../title/InfoCardTitle";
6
+ type InfoCardProps = Omit<BaseAlert.RootProps, "type" | "global" | "status" | "as"> & {
7
+ /**
8
+ * Changes the HTML element used for the root element.
9
+ *
10
+ * **When using `section`, provide either `aria-label` or `aria-labelledby` for better accessibility.**
11
+ * `axe-core` might warn about unique landmarks if you have multiple InfoCards on page with the same label.
12
+ * In those cases consider updating to unique `aria-label` or `aria-labelledby` props.
13
+ * @see [📝 Landmarks unique](https://dequeuniversity.com/rules/axe/4.6/landmark-unique)
14
+ * @default "div"
15
+ */
16
+ as?: "div" | "section";
17
+ };
18
+ interface InfoCardComponent extends React.ForwardRefExoticComponent<InfoCardProps & React.RefAttributes<HTMLDivElement>> {
19
+ /**
20
+ * @see 🏷️ {@link InfoCardHeaderProps}
21
+ * @example
22
+ * ```jsx
23
+ * <InfoCard>
24
+ * <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
25
+ * <InfoCard.Title>Info title</InfoCard.Title>
26
+ * </InfoCard.Header>
27
+ * </InfoCard>
28
+ * ```
29
+ */
30
+ Header: typeof InfoCardHeader;
31
+ /**
32
+ * Title component for InfoCard. Remember to use correct heading-level with the `as` prop.
33
+ * @see 🏷️ {@link InfoCardTitleProps}
34
+ * @example
35
+ * ```jsx
36
+ * <InfoCard>
37
+ * <InfoCard.Header>
38
+ * <InfoCard.Title as="h2">Info title</InfoCard.Title>
39
+ * </InfoCard.Header>
40
+ * </InfoCard>
41
+ * ```
42
+ */
43
+ Title: typeof InfoCardTitle;
44
+ /**
45
+ * @see 🏷️ {@link InfoCardContentProps}
46
+ * @example
47
+ * ```jsx
48
+ * <InfoCard>
49
+ * <InfoCard.Header>
50
+ * <InfoCard.Title>Info title</InfoCard.Title>
51
+ * </InfoCard.Header>
52
+ *
53
+ * <InfoCard.Content>Content</InfoCard.Content>
54
+ * </InfoCard>
55
+ * ```
56
+ */
57
+ Content: typeof InfoCardContent;
58
+ }
59
+ /**
60
+ * A component for displaying informational content in a card format.
61
+ * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard)
62
+ * @see 🏷️ {@link InfoCardProps}
63
+ * @example
64
+ * ```jsx
65
+ * <InfoCard data-color="info">
66
+ * <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
67
+ * <InfoCard.Title>Info title</InfoCard.Title>
68
+ * </InfoCard.Header>
69
+ * <InfoCard.Content>Content</InfoCard.Content>
70
+ * </InfoCard>
71
+ * ```
72
+ */
73
+ export declare const InfoCard: InfoCardComponent;
74
+ export default InfoCard;
75
+ export { InfoCardContent, InfoCardHeader, InfoCardTitle };
76
+ export type { InfoCardProps, InfoCardHeaderProps, InfoCardTitleProps, InfoCardContentProps, };
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __rest = (this && this.__rest) || function (s, e) {
36
+ var t = {};
37
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
+ t[p] = s[p];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
+ t[p[i]] = s[p[i]];
43
+ }
44
+ return t;
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.InfoCardTitle = exports.InfoCardHeader = exports.InfoCardContent = exports.InfoCard = void 0;
48
+ const react_1 = __importStar(require("react"));
49
+ const base_alert_1 = require("../../base-alert");
50
+ const InfoCardContent_1 = require("../content/InfoCardContent");
51
+ Object.defineProperty(exports, "InfoCardContent", { enumerable: true, get: function () { return InfoCardContent_1.InfoCardContent; } });
52
+ const InfoCardHeader_1 = require("../header/InfoCardHeader");
53
+ Object.defineProperty(exports, "InfoCardHeader", { enumerable: true, get: function () { return InfoCardHeader_1.InfoCardHeader; } });
54
+ const InfoCardTitle_1 = require("../title/InfoCardTitle");
55
+ Object.defineProperty(exports, "InfoCardTitle", { enumerable: true, get: function () { return InfoCardTitle_1.InfoCardTitle; } });
56
+ /**
57
+ * A component for displaying informational content in a card format.
58
+ * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard)
59
+ * @see 🏷️ {@link InfoCardProps}
60
+ * @example
61
+ * ```jsx
62
+ * <InfoCard data-color="info">
63
+ * <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
64
+ * <InfoCard.Title>Info title</InfoCard.Title>
65
+ * </InfoCard.Header>
66
+ * <InfoCard.Content>Content</InfoCard.Content>
67
+ * </InfoCard>
68
+ * ```
69
+ */
70
+ exports.InfoCard = (0, react_1.forwardRef)((_a, forwardedRef) => {
71
+ var { "data-color": dataColor = "info", as = "div" } = _a, restProps = __rest(_a, ["data-color", "as"]);
72
+ return (react_1.default.createElement(base_alert_1.BaseAlert.Root, Object.assign({ ref: forwardedRef, "data-color": dataColor }, restProps, { type: "moderate", global: false, as: as })));
73
+ });
74
+ exports.InfoCard.Header = InfoCardHeader_1.InfoCardHeader;
75
+ exports.InfoCard.Title = InfoCardTitle_1.InfoCardTitle;
76
+ exports.InfoCard.Content = InfoCardContent_1.InfoCardContent;
77
+ exports.default = exports.InfoCard;
78
+ //# sourceMappingURL=InfoCardRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoCardRoot.js","sourceRoot":"","sources":["../../../../src/alert/info-card/root/InfoCardRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,iDAA6C;AAC7C,gEAGoC;AA+G3B,gGAjHP,iCAAe,OAiHO;AA9GxB,6DAGkC;AA2GR,+FA7GxB,+BAAc,OA6GwB;AA1GxC,0DAAgF;AA0GtC,8FA1GjC,6BAAa,OA0GiC;AAzCvD;;;;;;;;;;;;;GAaG;AACU,QAAA,QAAQ,GAAG,IAAA,kBAAU,EAChC,CACE,EAIgB,EAChB,YAAY,EACZ,EAAE;QANF,EACE,YAAY,EAAE,SAAS,GAAG,MAAM,EAChC,EAAE,GAAG,KAAK,OAEI,EADX,SAAS,cAHd,oBAIC,CADa;IAId,OAAO,CACL,8BAAC,sBAAS,CAAC,IAAI,kBACb,GAAG,EAAE,YAAY,gBACL,SAAS,IACjB,SAAS,IACb,IAAI,EAAC,UAAU,EACf,MAAM,EAAE,KAAK,EACb,EAAE,EAAE,EAAE,IACN,CACH,CAAC;AACJ,CAAC,CACmB,CAAC;AAEvB,gBAAQ,CAAC,MAAM,GAAG,+BAAc,CAAC;AACjC,gBAAQ,CAAC,KAAK,GAAG,6BAAa,CAAC;AAC/B,gBAAQ,CAAC,OAAO,GAAG,iCAAe,CAAC;AAEnC,kBAAe,gBAAQ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { BaseAlert } from "../../base-alert";
2
+ type InfoCardTitleProps = BaseAlert.TitleProps;
3
+ /**
4
+ * Title component for InfoCard. Remember to use correct heading-level with the `as` prop.
5
+ * @see 🏷️ {@link InfoCardTitleProps}
6
+ * @example
7
+ * ```jsx
8
+ * <InfoCard>
9
+ * <InfoCard.Header>
10
+ * <InfoCard.Title as="h2">Info title</InfoCard.Title>
11
+ * </InfoCard.Header>
12
+ * </InfoCard>
13
+ * ```
14
+ */
15
+ declare const InfoCardTitle: import("react").ForwardRefExoticComponent<BaseAlert.TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
16
+ export { InfoCardTitle };
17
+ export type { InfoCardTitleProps };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InfoCardTitle = void 0;
4
+ const base_alert_1 = require("../../base-alert");
5
+ /**
6
+ * Title component for InfoCard. Remember to use correct heading-level with the `as` prop.
7
+ * @see 🏷️ {@link InfoCardTitleProps}
8
+ * @example
9
+ * ```jsx
10
+ * <InfoCard>
11
+ * <InfoCard.Header>
12
+ * <InfoCard.Title as="h2">Info title</InfoCard.Title>
13
+ * </InfoCard.Header>
14
+ * </InfoCard>
15
+ * ```
16
+ */
17
+ const InfoCardTitle = base_alert_1.BaseAlert.Title;
18
+ exports.InfoCardTitle = InfoCardTitle;
19
+ //# sourceMappingURL=InfoCardTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoCardTitle.js","sourceRoot":"","sources":["../../../../src/alert/info-card/title/InfoCardTitle.tsx"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,aAAa,GAAG,sBAAS,CAAC,KAAK,CAAC;AAE7B,sCAAa"}
@@ -0,0 +1,17 @@
1
+ import { BaseAlert } from "../../base-alert";
2
+ type LocalAlertCloseButtonProps = BaseAlert.CloseButtonProps;
3
+ /**
4
+ * @see 🏷️ {@link LocalAlertCloseButtonProps}
5
+ * @example
6
+ * ```jsx
7
+ * <LocalAlert>
8
+ * <LocalAlert.Header>
9
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
10
+ * <LocalAlert.CloseButton onClick={() => alert("Closed!")} />
11
+ * </LocalAlert.Header>
12
+ * </LocalAlert>
13
+ * ```
14
+ */
15
+ declare const LocalAlertCloseButton: import("react").ForwardRefExoticComponent<BaseAlert.CloseButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
16
+ export { LocalAlertCloseButton };
17
+ export type { LocalAlertCloseButtonProps };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocalAlertCloseButton = void 0;
4
+ const base_alert_1 = require("../../base-alert");
5
+ /**
6
+ * @see 🏷️ {@link LocalAlertCloseButtonProps}
7
+ * @example
8
+ * ```jsx
9
+ * <LocalAlert>
10
+ * <LocalAlert.Header>
11
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
12
+ * <LocalAlert.CloseButton onClick={() => alert("Closed!")} />
13
+ * </LocalAlert.Header>
14
+ * </LocalAlert>
15
+ * ```
16
+ */
17
+ const LocalAlertCloseButton = base_alert_1.BaseAlert.CloseButton;
18
+ exports.LocalAlertCloseButton = LocalAlertCloseButton;
19
+ //# sourceMappingURL=LocalAlertCloseButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalAlertCloseButton.js","sourceRoot":"","sources":["../../../../src/alert/local-alert/close-button/LocalAlertCloseButton.tsx"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,qBAAqB,GAAG,sBAAS,CAAC,WAAW,CAAC;AAE3C,sDAAqB"}
@@ -0,0 +1,18 @@
1
+ import { BaseAlert } from "../../base-alert";
2
+ type LocalAlertContentProps = BaseAlert.ContentProps;
3
+ /**
4
+ * @see 🏷️ {@link LocalAlertContentProps}
5
+ * @example
6
+ * ```jsx
7
+ * <LocalAlert>
8
+ * <LocalAlert.Header>
9
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
10
+ * </LocalAlert.Header>
11
+ *
12
+ * <LocalAlert.Content>Content</LocalAlert.Content>
13
+ * </LocalAlert>
14
+ * ```
15
+ */
16
+ declare const LocalAlertContent: import("react").ForwardRefExoticComponent<BaseAlert.ContentProps & import("react").RefAttributes<HTMLDivElement>>;
17
+ export { LocalAlertContent };
18
+ export type { LocalAlertContentProps };
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocalAlertContent = void 0;
4
+ const base_alert_1 = require("../../base-alert");
5
+ /**
6
+ * @see 🏷️ {@link LocalAlertContentProps}
7
+ * @example
8
+ * ```jsx
9
+ * <LocalAlert>
10
+ * <LocalAlert.Header>
11
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
12
+ * </LocalAlert.Header>
13
+ *
14
+ * <LocalAlert.Content>Content</LocalAlert.Content>
15
+ * </LocalAlert>
16
+ * ```
17
+ */
18
+ const LocalAlertContent = base_alert_1.BaseAlert.Content;
19
+ exports.LocalAlertContent = LocalAlertContent;
20
+ //# sourceMappingURL=LocalAlertContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalAlertContent.js","sourceRoot":"","sources":["../../../../src/alert/local-alert/content/LocalAlertContent.tsx"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,iBAAiB,GAAG,sBAAS,CAAC,OAAO,CAAC;AAEnC,8CAAiB"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import { BaseAlert } from "../../base-alert";
3
+ type LocalAlertHeaderProps = Omit<BaseAlert.HeaderProps, "icon">;
4
+ /**
5
+ * @see 🏷️ {@link LocalAlertHeaderProps}
6
+ * @example
7
+ * ```jsx
8
+ * <LocalAlert>
9
+ * <LocalAlert.Header>
10
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
11
+ * </LocalAlert.Header>
12
+ * </LocalAlert>
13
+ * ```
14
+ */
15
+ declare const LocalAlertHeader: React.ForwardRefExoticComponent<LocalAlertHeaderProps & React.RefAttributes<HTMLDivElement>>;
16
+ export { LocalAlertHeader };
17
+ export type { LocalAlertHeaderProps };
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.LocalAlertHeader = void 0;
37
+ const react_1 = __importStar(require("react"));
38
+ const base_alert_1 = require("../../base-alert");
39
+ /**
40
+ * @see 🏷️ {@link LocalAlertHeaderProps}
41
+ * @example
42
+ * ```jsx
43
+ * <LocalAlert>
44
+ * <LocalAlert.Header>
45
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
46
+ * </LocalAlert.Header>
47
+ * </LocalAlert>
48
+ * ```
49
+ */
50
+ const LocalAlertHeader = (0, react_1.forwardRef)((props, forwardedRef) => {
51
+ return react_1.default.createElement(base_alert_1.BaseAlert.Header, Object.assign({ ref: forwardedRef }, props));
52
+ });
53
+ exports.LocalAlertHeader = LocalAlertHeader;
54
+ //# sourceMappingURL=LocalAlertHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalAlertHeader.js","sourceRoot":"","sources":["../../../../src/alert/local-alert/header/LocalAlertHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,iDAA6C;AAI7C;;;;;;;;;;GAUG;AACH,MAAM,gBAAgB,GAAG,IAAA,kBAAU,EACjC,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE;IACtB,OAAO,8BAAC,sBAAS,CAAC,MAAM,kBAAC,GAAG,EAAE,YAAY,IAAM,KAAK,EAAI,CAAC;AAC5D,CAAC,CACF,CAAC;AAEO,4CAAgB"}
@@ -0,0 +1,2 @@
1
+ export { LocalAlert, LocalAlertHeader, LocalAlertTitle, LocalAlertContent, LocalAlertCloseButton, } from "./root/LocalAlertRoot";
2
+ export type { LocalAlertProps, LocalAlertHeaderProps, LocalAlertTitleProps, LocalAlertContentProps, LocalAlertCloseButtonProps, } from "./root/LocalAlertRoot";
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ "use client";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.LocalAlertCloseButton = exports.LocalAlertContent = exports.LocalAlertTitle = exports.LocalAlertHeader = exports.LocalAlert = void 0;
5
+ var LocalAlertRoot_1 = require("./root/LocalAlertRoot");
6
+ Object.defineProperty(exports, "LocalAlert", { enumerable: true, get: function () { return LocalAlertRoot_1.LocalAlert; } });
7
+ Object.defineProperty(exports, "LocalAlertHeader", { enumerable: true, get: function () { return LocalAlertRoot_1.LocalAlertHeader; } });
8
+ Object.defineProperty(exports, "LocalAlertTitle", { enumerable: true, get: function () { return LocalAlertRoot_1.LocalAlertTitle; } });
9
+ Object.defineProperty(exports, "LocalAlertContent", { enumerable: true, get: function () { return LocalAlertRoot_1.LocalAlertContent; } });
10
+ Object.defineProperty(exports, "LocalAlertCloseButton", { enumerable: true, get: function () { return LocalAlertRoot_1.LocalAlertCloseButton; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/local-alert/index.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AACb,wDAM+B;AAL7B,4GAAA,UAAU,OAAA;AACV,kHAAA,gBAAgB,OAAA;AAChB,iHAAA,eAAe,OAAA;AACf,mHAAA,iBAAiB,OAAA;AACjB,uHAAA,qBAAqB,OAAA"}
@@ -0,0 +1,81 @@
1
+ import React from "react";
2
+ import { BaseAlert } from "../../base-alert";
3
+ import { LocalAlertCloseButton, type LocalAlertCloseButtonProps } from "../close-button/LocalAlertCloseButton";
4
+ import { LocalAlertContent, type LocalAlertContentProps } from "../content/LocalAlertContent";
5
+ import { LocalAlertHeader, type LocalAlertHeaderProps } from "../header/LocalAlertHeader";
6
+ import { LocalAlertTitle, type LocalAlertTitleProps } from "../title/LocalAlertTitle";
7
+ interface LocalAlertProps extends Omit<BaseAlert.RootProps, "type" | "global" | "data-color"> {
8
+ status: Exclude<BaseAlert.RootProps["status"], undefined>;
9
+ }
10
+ interface LocalAlertComponent extends React.ForwardRefExoticComponent<LocalAlertProps & React.RefAttributes<HTMLDivElement>> {
11
+ /**
12
+ * @see 🏷️ {@link LocalAlertHeaderProps}
13
+ * @example
14
+ * ```jsx
15
+ * <LocalAlert>
16
+ * <LocalAlert.Header>
17
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
18
+ * </LocalAlert.Header>
19
+ * </LocalAlert>
20
+ * ```
21
+ */
22
+ Header: typeof LocalAlertHeader;
23
+ /**
24
+ * Title component for LocalAlert. Remember to use correct heading-level with the `as` prop.
25
+ * @see 🏷️ {@link LocalAlertTitleProps}
26
+ * @example
27
+ * ```jsx
28
+ * <LocalAlert>
29
+ * <LocalAlert.Header>
30
+ * <LocalAlert.Title as="h2">Info title</LocalAlert.Title>
31
+ * </LocalAlert.Header>
32
+ * </LocalAlert>
33
+ * ```
34
+ */
35
+ Title: typeof LocalAlertTitle;
36
+ /**
37
+ * @see 🏷️ {@link LocalAlertContentProps}
38
+ * @example
39
+ * ```jsx
40
+ * <LocalAlert>
41
+ * <LocalAlert.Header>
42
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
43
+ * </LocalAlert.Header>
44
+ *
45
+ * <LocalAlert.Content>Content</LocalAlert.Content>
46
+ * </LocalAlert>
47
+ * ```
48
+ */
49
+ Content: typeof LocalAlertContent;
50
+ /**
51
+ * @see 🏷️ {@link LocalAlertCloseProps}
52
+ * @example
53
+ * ```jsx
54
+ * <LocalAlert>
55
+ * <LocalAlert.Header>
56
+ * <LocalAlert.Title>Info title</LocalAlert.Title>
57
+ * <LocalAlert.CloseButton onClick={() => alert("Closed!")} />
58
+ * </LocalAlert.Header>
59
+ * </LocalAlert>
60
+ * ```
61
+ */
62
+ CloseButton: typeof LocalAlertCloseButton;
63
+ }
64
+ /**
65
+ * A component for displaying important messages about a certain part of the page.
66
+ * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/localalert)
67
+ * @see 🏷️ {@link LocalAlertProps}
68
+ * @example
69
+ * ```jsx
70
+ * <LocalAlert status="error">
71
+ * <LocalAlert.Header>
72
+ * <LocalAlert.Title>Alert title</LocalAlert.Title>
73
+ * </LocalAlert.Header>
74
+ * <LocalAlert.Content>Content</LocalAlert.Content>
75
+ * </LocalAlert>
76
+ * ```
77
+ */
78
+ export declare const LocalAlert: LocalAlertComponent;
79
+ export default LocalAlert;
80
+ export { LocalAlertContent, LocalAlertHeader, LocalAlertTitle, LocalAlertCloseButton, };
81
+ export type { LocalAlertProps, LocalAlertContentProps, LocalAlertHeaderProps, LocalAlertTitleProps, LocalAlertCloseButtonProps, };
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __rest = (this && this.__rest) || function (s, e) {
36
+ var t = {};
37
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
38
+ t[p] = s[p];
39
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
40
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
41
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
42
+ t[p[i]] = s[p[i]];
43
+ }
44
+ return t;
45
+ };
46
+ Object.defineProperty(exports, "__esModule", { value: true });
47
+ exports.LocalAlertCloseButton = exports.LocalAlertTitle = exports.LocalAlertHeader = exports.LocalAlertContent = exports.LocalAlert = void 0;
48
+ const react_1 = __importStar(require("react"));
49
+ const base_alert_1 = require("../../base-alert");
50
+ const LocalAlertCloseButton_1 = require("../close-button/LocalAlertCloseButton");
51
+ Object.defineProperty(exports, "LocalAlertCloseButton", { enumerable: true, get: function () { return LocalAlertCloseButton_1.LocalAlertCloseButton; } });
52
+ const LocalAlertContent_1 = require("../content/LocalAlertContent");
53
+ Object.defineProperty(exports, "LocalAlertContent", { enumerable: true, get: function () { return LocalAlertContent_1.LocalAlertContent; } });
54
+ const LocalAlertHeader_1 = require("../header/LocalAlertHeader");
55
+ Object.defineProperty(exports, "LocalAlertHeader", { enumerable: true, get: function () { return LocalAlertHeader_1.LocalAlertHeader; } });
56
+ const LocalAlertTitle_1 = require("../title/LocalAlertTitle");
57
+ Object.defineProperty(exports, "LocalAlertTitle", { enumerable: true, get: function () { return LocalAlertTitle_1.LocalAlertTitle; } });
58
+ /**
59
+ * A component for displaying important messages about a certain part of the page.
60
+ * @see [📝 Documentation](https://aksel.nav.no/komponenter/core/localalert)
61
+ * @see 🏷️ {@link LocalAlertProps}
62
+ * @example
63
+ * ```jsx
64
+ * <LocalAlert status="error">
65
+ * <LocalAlert.Header>
66
+ * <LocalAlert.Title>Alert title</LocalAlert.Title>
67
+ * </LocalAlert.Header>
68
+ * <LocalAlert.Content>Content</LocalAlert.Content>
69
+ * </LocalAlert>
70
+ * ```
71
+ */
72
+ exports.LocalAlert = (0, react_1.forwardRef)((_a, forwardedRef) => {
73
+ var { status } = _a, restProps = __rest(_a, ["status"]);
74
+ return (react_1.default.createElement(base_alert_1.BaseAlert.Root, Object.assign({ ref: forwardedRef, role: "alert" }, restProps, { type: "strong", global: false, status: status })));
75
+ });
76
+ exports.LocalAlert.Header = LocalAlertHeader_1.LocalAlertHeader;
77
+ exports.LocalAlert.Title = LocalAlertTitle_1.LocalAlertTitle;
78
+ exports.LocalAlert.Content = LocalAlertContent_1.LocalAlertContent;
79
+ exports.LocalAlert.CloseButton = LocalAlertCloseButton_1.LocalAlertCloseButton;
80
+ exports.default = exports.LocalAlert;
81
+ //# sourceMappingURL=LocalAlertRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalAlertRoot.js","sourceRoot":"","sources":["../../../../src/alert/local-alert/root/LocalAlertRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,iDAA6C;AAC7C,iFAG+C;AAuH7C,sGAzHA,6CAAqB,OAyHA;AAtHvB,oEAGsC;AAgHpC,kGAlHA,qCAAiB,OAkHA;AA/GnB,iEAGoC;AA6GlC,iGA/GA,mCAAgB,OA+GA;AA5GlB,8DAGkC;AA0GhC,gGA5GA,iCAAe,OA4GA;AAtCjB;;;;;;;;;;;;;GAaG;AACU,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CAAC,EAAyC,EAAE,YAAY,EAAE,EAAE;QAA3D,EAAE,MAAM,OAAiC,EAA5B,SAAS,cAAtB,UAAwB,CAAF;IACrB,OAAO,CACL,8BAAC,sBAAS,CAAC,IAAI,kBACb,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,OAAO,IACR,SAAS,IACb,IAAI,EAAC,QAAQ,EACb,MAAM,EAAE,KAAK,EACb,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC,CACqB,CAAC;AAEzB,kBAAU,CAAC,MAAM,GAAG,mCAAgB,CAAC;AACrC,kBAAU,CAAC,KAAK,GAAG,iCAAe,CAAC;AACnC,kBAAU,CAAC,OAAO,GAAG,qCAAiB,CAAC;AACvC,kBAAU,CAAC,WAAW,GAAG,6CAAqB,CAAC;AAE/C,kBAAe,kBAAU,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { BaseAlert } from "../../base-alert";
2
+ type LocalAlertTitleProps = BaseAlert.TitleProps;
3
+ /**
4
+ * Title component for LocalAlert. Remember to use correct heading-level with the `as` prop.
5
+ * @see 🏷️ {@link LocalAlertTitleProps}
6
+ * @example
7
+ * ```jsx
8
+ * <LocalAlert>
9
+ * <LocalAlert.Header>
10
+ * <LocalAlert.Title as="h2">Info title</LocalAlert.Title>
11
+ * </LocalAlert.Header>
12
+ * </LocalAlert>
13
+ * ```
14
+ */
15
+ declare const LocalAlertTitle: import("react").ForwardRefExoticComponent<BaseAlert.TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
16
+ export { LocalAlertTitle };
17
+ export type { LocalAlertTitleProps };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocalAlertTitle = void 0;
4
+ const base_alert_1 = require("../../base-alert");
5
+ /**
6
+ * Title component for LocalAlert. Remember to use correct heading-level with the `as` prop.
7
+ * @see 🏷️ {@link LocalAlertTitleProps}
8
+ * @example
9
+ * ```jsx
10
+ * <LocalAlert>
11
+ * <LocalAlert.Header>
12
+ * <LocalAlert.Title as="h2">Info title</LocalAlert.Title>
13
+ * </LocalAlert.Header>
14
+ * </LocalAlert>
15
+ * ```
16
+ */
17
+ const LocalAlertTitle = base_alert_1.BaseAlert.Title;
18
+ exports.LocalAlertTitle = LocalAlertTitle;
19
+ //# sourceMappingURL=LocalAlertTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LocalAlertTitle.js","sourceRoot":"","sources":["../../../../src/alert/local-alert/title/LocalAlertTitle.tsx"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,eAAe,GAAG,sBAAS,CAAC,KAAK,CAAC;AAE/B,0CAAe"}
@@ -34,6 +34,11 @@ export declare const getGlobalTranslations: (locale: string | undefined) => {
34
34
  showLess: string;
35
35
  readOnly: string;
36
36
  close: string;
37
+ error: string;
38
+ info: string;
39
+ success: string;
40
+ warning: string;
41
+ announcement: string;
37
42
  } | undefined;
38
43
  interface DateTranslationContextProps {
39
44
  translate: TFunction<"DatePicker">;
@@ -5,12 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const react_1 = __importDefault(require("react"));
7
7
  const Theme_1 = require("../../../theme/Theme");
8
+ const i18n_hooks_1 = require("../../../util/i18n/i18n.hooks");
8
9
  const Input_context_1 = require("../Input/Input.context");
9
10
  const filtered_options_util_1 = __importDefault(require("./filtered-options-util"));
10
11
  const NoSearchHitsMessage = () => {
11
12
  const { cn } = (0, Theme_1.useRenameCSS)();
13
+ const translate = (0, i18n_hooks_1.useI18n)("Combobox");
12
14
  const { inputProps: { id }, } = (0, Input_context_1.useInputContext)();
13
- return (react_1.default.createElement("div", { className: cn("navds-combobox__list-item--no-options"), id: filtered_options_util_1.default.getNoHitsId(id) }, "Ingen s\u00F8ketreff"));
15
+ return (react_1.default.createElement("div", { className: cn("navds-combobox__list-item--no-options"), id: filtered_options_util_1.default.getNoHitsId(id) }, translate("noMatches")));
14
16
  };
15
17
  exports.default = NoSearchHitsMessage;
16
18
  //# sourceMappingURL=NoSearchHitsMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NoSearchHitsMessage.js","sourceRoot":"","sources":["../../../../src/form/combobox/FilteredOptions/NoSearchHitsMessage.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,gDAAoD;AACpD,0DAAyD;AACzD,oFAA0D;AAE1D,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAA,oBAAY,GAAE,CAAC;IAE9B,MAAM,EACJ,UAAU,EAAE,EAAE,EAAE,EAAE,GACnB,GAAG,IAAA,+BAAe,GAAE,CAAC;IAEtB,OAAO,CACL,uCACE,SAAS,EAAE,EAAE,CAAC,uCAAuC,CAAC,EACtD,EAAE,EAAE,+BAAmB,CAAC,WAAW,CAAC,EAAE,CAAC,2BAGnC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"NoSearchHitsMessage.js","sourceRoot":"","sources":["../../../../src/form/combobox/FilteredOptions/NoSearchHitsMessage.tsx"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,gDAAoD;AACpD,8DAAwD;AACxD,0DAAyD;AACzD,oFAA0D;AAE1D,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAC/B,MAAM,EAAE,EAAE,EAAE,GAAG,IAAA,oBAAY,GAAE,CAAC;IAE9B,MAAM,SAAS,GAAG,IAAA,oBAAO,EAAC,UAAU,CAAC,CAAC;IAEtC,MAAM,EACJ,UAAU,EAAE,EAAE,EAAE,EAAE,GACnB,GAAG,IAAA,+BAAe,GAAE,CAAC;IAEtB,OAAO,CACL,uCACE,SAAS,EAAE,EAAE,CAAC,uCAAuC,CAAC,EACtD,EAAE,EAAE,+BAAmB,CAAC,WAAW,CAAC,EAAE,CAAC,IAEtC,SAAS,CAAC,WAAW,CAAC,CACnB,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,mBAAmB,CAAC"}
package/cjs/index.d.ts CHANGED
@@ -54,6 +54,10 @@ export { Switch, type SwitchProps } from "./form/switch";
54
54
  export { Textarea, type TextareaProps } from "./form/textarea";
55
55
  export { TextField, type TextFieldProps } from "./form/textfield";
56
56
  export { LinkCard, type LinkCardProps, type LinkCardTitleProps, type LinkCardDescriptionProps, type LinkCardFooterProps, type LinkCardAnchorProps, type LinkCardIconProps, type LinkCardImageProps, } from "./link-card";
57
+ export { InlineMessage, type InlineMessageProps } from "./inline-message";
58
+ export { GlobalAlert, type GlobalAlertProps, type GlobalAlertHeaderProps, type GlobalAlertTitleProps, type GlobalAlertContentProps, type GlobalAlertCloseButtonProps, } from "./alert/global-alert";
59
+ export { InfoCard, type InfoCardProps, type InfoCardHeaderProps, type InfoCardTitleProps, type InfoCardContentProps, } from "./alert/info-card";
60
+ export { LocalAlert, type LocalAlertProps, type LocalAlertHeaderProps, type LocalAlertTitleProps, type LocalAlertContentProps, type LocalAlertCloseButtonProps, } from "./alert/local-alert";
57
61
  /**
58
62
  * Theming
59
63
  */