@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.
- package/cjs/alert/Alert.js +2 -4
- package/cjs/alert/Alert.js.map +1 -1
- package/cjs/alert/base-alert/close-button/BaseAlertCloseButton.d.ts +17 -0
- package/cjs/alert/base-alert/close-button/BaseAlertCloseButton.js +72 -0
- package/cjs/alert/base-alert/close-button/BaseAlertCloseButton.js.map +1 -0
- package/cjs/alert/base-alert/content/BaseAlertContent.d.ts +20 -0
- package/cjs/alert/base-alert/content/BaseAlertContent.js +70 -0
- package/cjs/alert/base-alert/content/BaseAlertContent.js.map +1 -0
- package/cjs/alert/base-alert/header/BaseAlertHeader.d.ts +22 -0
- package/cjs/alert/base-alert/header/BaseAlertHeader.js +77 -0
- package/cjs/alert/base-alert/header/BaseAlertHeader.js.map +1 -0
- package/cjs/alert/base-alert/index.d.ts +1 -0
- package/cjs/alert/base-alert/index.js +39 -0
- package/cjs/alert/base-alert/index.js.map +1 -0
- package/cjs/alert/base-alert/namespace.d.ts +10 -0
- package/cjs/alert/base-alert/namespace.js +14 -0
- package/cjs/alert/base-alert/namespace.js.map +1 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.context.d.ts +12 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.context.js +11 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.context.js.map +1 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.d.ts +43 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.js +65 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.js.map +1 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.utils.d.ts +9 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.utils.js +48 -0
- package/cjs/alert/base-alert/root/BaseAlertRoot.utils.js.map +1 -0
- package/cjs/alert/base-alert/title/BaseAlertTitle.d.ts +24 -0
- package/cjs/alert/base-alert/title/BaseAlertTitle.js +77 -0
- package/cjs/alert/base-alert/title/BaseAlertTitle.js.map +1 -0
- package/cjs/alert/global-alert/close-button/GlobalAlertCloseButton.d.ts +17 -0
- package/cjs/alert/global-alert/close-button/GlobalAlertCloseButton.js +19 -0
- package/cjs/alert/global-alert/close-button/GlobalAlertCloseButton.js.map +1 -0
- package/cjs/alert/global-alert/content/GlobalAlertContent.d.ts +18 -0
- package/cjs/alert/global-alert/content/GlobalAlertContent.js +20 -0
- package/cjs/alert/global-alert/content/GlobalAlertContent.js.map +1 -0
- package/cjs/alert/global-alert/header/GlobalAlertHeader.d.ts +17 -0
- package/cjs/alert/global-alert/header/GlobalAlertHeader.js +54 -0
- package/cjs/alert/global-alert/header/GlobalAlertHeader.js.map +1 -0
- package/cjs/alert/global-alert/index.d.ts +2 -0
- package/cjs/alert/global-alert/index.js +11 -0
- package/cjs/alert/global-alert/index.js.map +1 -0
- package/cjs/alert/global-alert/root/GlobalAlertRoot.d.ts +81 -0
- package/cjs/alert/global-alert/root/GlobalAlertRoot.js +69 -0
- package/cjs/alert/global-alert/root/GlobalAlertRoot.js.map +1 -0
- package/cjs/alert/global-alert/title/GlobalAlertTitle.d.ts +17 -0
- package/cjs/alert/global-alert/title/GlobalAlertTitle.js +19 -0
- package/cjs/alert/global-alert/title/GlobalAlertTitle.js.map +1 -0
- package/cjs/alert/info-card/content/InfoCardContent.d.ts +18 -0
- package/cjs/alert/info-card/content/InfoCardContent.js +20 -0
- package/cjs/alert/info-card/content/InfoCardContent.js.map +1 -0
- package/cjs/alert/info-card/header/InfoCardHeader.d.ts +16 -0
- package/cjs/alert/info-card/header/InfoCardHeader.js +18 -0
- package/cjs/alert/info-card/header/InfoCardHeader.js.map +1 -0
- package/cjs/alert/info-card/index.d.ts +2 -0
- package/cjs/alert/info-card/index.js +10 -0
- package/cjs/alert/info-card/index.js.map +1 -0
- package/cjs/alert/info-card/root/InfoCardRoot.d.ts +76 -0
- package/cjs/alert/info-card/root/InfoCardRoot.js +78 -0
- package/cjs/alert/info-card/root/InfoCardRoot.js.map +1 -0
- package/cjs/alert/info-card/title/InfoCardTitle.d.ts +17 -0
- package/cjs/alert/info-card/title/InfoCardTitle.js +19 -0
- package/cjs/alert/info-card/title/InfoCardTitle.js.map +1 -0
- package/cjs/alert/local-alert/close-button/LocalAlertCloseButton.d.ts +17 -0
- package/cjs/alert/local-alert/close-button/LocalAlertCloseButton.js +19 -0
- package/cjs/alert/local-alert/close-button/LocalAlertCloseButton.js.map +1 -0
- package/cjs/alert/local-alert/content/LocalAlertContent.d.ts +18 -0
- package/cjs/alert/local-alert/content/LocalAlertContent.js +20 -0
- package/cjs/alert/local-alert/content/LocalAlertContent.js.map +1 -0
- package/cjs/alert/local-alert/header/LocalAlertHeader.d.ts +17 -0
- package/cjs/alert/local-alert/header/LocalAlertHeader.js +54 -0
- package/cjs/alert/local-alert/header/LocalAlertHeader.js.map +1 -0
- package/cjs/alert/local-alert/index.d.ts +2 -0
- package/cjs/alert/local-alert/index.js +11 -0
- package/cjs/alert/local-alert/index.js.map +1 -0
- package/cjs/alert/local-alert/root/LocalAlertRoot.d.ts +81 -0
- package/cjs/alert/local-alert/root/LocalAlertRoot.js +81 -0
- package/cjs/alert/local-alert/root/LocalAlertRoot.js.map +1 -0
- package/cjs/alert/local-alert/title/LocalAlertTitle.d.ts +17 -0
- package/cjs/alert/local-alert/title/LocalAlertTitle.js +19 -0
- package/cjs/alert/local-alert/title/LocalAlertTitle.js.map +1 -0
- package/cjs/date/Date.locale.d.ts +5 -0
- package/cjs/index.d.ts +4 -0
- package/cjs/index.js +9 -1
- package/cjs/index.js.map +1 -1
- package/cjs/inline-message/icon/InlineMessageIcon.d.ts +5 -0
- package/cjs/inline-message/icon/InlineMessageIcon.js +24 -0
- package/cjs/inline-message/icon/InlineMessageIcon.js.map +1 -0
- package/cjs/inline-message/index.d.ts +2 -0
- package/cjs/inline-message/index.js +7 -0
- package/cjs/inline-message/index.js.map +1 -0
- package/cjs/inline-message/root/InlineMessage.d.ts +36 -0
- package/cjs/inline-message/root/InlineMessage.js +91 -0
- package/cjs/inline-message/root/InlineMessage.js.map +1 -0
- package/cjs/timeline/period/ClickablePeriod.js +3 -15
- package/cjs/timeline/period/ClickablePeriod.js.map +1 -1
- package/cjs/timeline/pin/PinInternal.js +3 -15
- package/cjs/timeline/pin/PinInternal.js.map +1 -1
- package/cjs/util/i18n/locales/en.d.ts +1 -4
- package/cjs/util/i18n/locales/en.js +1 -4
- package/cjs/util/i18n/locales/en.js.map +1 -1
- package/cjs/util/i18n/locales/nb.d.ts +2 -6
- package/cjs/util/i18n/locales/nb.js +2 -6
- package/cjs/util/i18n/locales/nb.js.map +1 -1
- package/cjs/util/i18n/locales/nn.d.ts +1 -4
- package/cjs/util/i18n/locales/nn.js +1 -4
- package/cjs/util/i18n/locales/nn.js.map +1 -1
- package/esm/alert/Alert.js +2 -4
- package/esm/alert/Alert.js.map +1 -1
- package/esm/alert/base-alert/close-button/BaseAlertCloseButton.d.ts +17 -0
- package/esm/alert/base-alert/close-button/BaseAlertCloseButton.js +36 -0
- package/esm/alert/base-alert/close-button/BaseAlertCloseButton.js.map +1 -0
- package/esm/alert/base-alert/content/BaseAlertContent.d.ts +20 -0
- package/esm/alert/base-alert/content/BaseAlertContent.js +34 -0
- package/esm/alert/base-alert/content/BaseAlertContent.js.map +1 -0
- package/esm/alert/base-alert/header/BaseAlertHeader.d.ts +22 -0
- package/esm/alert/base-alert/header/BaseAlertHeader.js +41 -0
- package/esm/alert/base-alert/header/BaseAlertHeader.js.map +1 -0
- package/esm/alert/base-alert/index.d.ts +1 -0
- package/esm/alert/base-alert/index.js +3 -0
- package/esm/alert/base-alert/index.js.map +1 -0
- package/esm/alert/base-alert/namespace.d.ts +10 -0
- package/esm/alert/base-alert/namespace.js +6 -0
- package/esm/alert/base-alert/namespace.js.map +1 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.context.d.ts +12 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.context.js +7 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.context.js.map +1 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.d.ts +43 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.js +29 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.js.map +1 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.utils.d.ts +9 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.utils.js +42 -0
- package/esm/alert/base-alert/root/BaseAlertRoot.utils.js.map +1 -0
- package/esm/alert/base-alert/title/BaseAlertTitle.d.ts +24 -0
- package/esm/alert/base-alert/title/BaseAlertTitle.js +38 -0
- package/esm/alert/base-alert/title/BaseAlertTitle.js.map +1 -0
- package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.d.ts +17 -0
- package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.js +16 -0
- package/esm/alert/global-alert/close-button/GlobalAlertCloseButton.js.map +1 -0
- package/esm/alert/global-alert/content/GlobalAlertContent.d.ts +18 -0
- package/esm/alert/global-alert/content/GlobalAlertContent.js +17 -0
- package/esm/alert/global-alert/content/GlobalAlertContent.js.map +1 -0
- package/esm/alert/global-alert/header/GlobalAlertHeader.d.ts +17 -0
- package/esm/alert/global-alert/header/GlobalAlertHeader.js +18 -0
- package/esm/alert/global-alert/header/GlobalAlertHeader.js.map +1 -0
- package/esm/alert/global-alert/index.d.ts +2 -0
- package/esm/alert/global-alert/index.js +3 -0
- package/esm/alert/global-alert/index.js.map +1 -0
- package/esm/alert/global-alert/root/GlobalAlertRoot.d.ts +81 -0
- package/esm/alert/global-alert/root/GlobalAlertRoot.js +30 -0
- package/esm/alert/global-alert/root/GlobalAlertRoot.js.map +1 -0
- package/esm/alert/global-alert/title/GlobalAlertTitle.d.ts +17 -0
- package/esm/alert/global-alert/title/GlobalAlertTitle.js +16 -0
- package/esm/alert/global-alert/title/GlobalAlertTitle.js.map +1 -0
- package/esm/alert/info-card/content/InfoCardContent.d.ts +18 -0
- package/esm/alert/info-card/content/InfoCardContent.js +17 -0
- package/esm/alert/info-card/content/InfoCardContent.js.map +1 -0
- package/esm/alert/info-card/header/InfoCardHeader.d.ts +16 -0
- package/esm/alert/info-card/header/InfoCardHeader.js +15 -0
- package/esm/alert/info-card/header/InfoCardHeader.js.map +1 -0
- package/esm/alert/info-card/index.d.ts +2 -0
- package/esm/alert/info-card/index.js +3 -0
- package/esm/alert/info-card/index.js.map +1 -0
- package/esm/alert/info-card/root/InfoCardRoot.d.ts +76 -0
- package/esm/alert/info-card/root/InfoCardRoot.js +40 -0
- package/esm/alert/info-card/root/InfoCardRoot.js.map +1 -0
- package/esm/alert/info-card/title/InfoCardTitle.d.ts +17 -0
- package/esm/alert/info-card/title/InfoCardTitle.js +16 -0
- package/esm/alert/info-card/title/InfoCardTitle.js.map +1 -0
- package/esm/alert/local-alert/close-button/LocalAlertCloseButton.d.ts +17 -0
- package/esm/alert/local-alert/close-button/LocalAlertCloseButton.js +16 -0
- package/esm/alert/local-alert/close-button/LocalAlertCloseButton.js.map +1 -0
- package/esm/alert/local-alert/content/LocalAlertContent.d.ts +18 -0
- package/esm/alert/local-alert/content/LocalAlertContent.js +17 -0
- package/esm/alert/local-alert/content/LocalAlertContent.js.map +1 -0
- package/esm/alert/local-alert/header/LocalAlertHeader.d.ts +17 -0
- package/esm/alert/local-alert/header/LocalAlertHeader.js +18 -0
- package/esm/alert/local-alert/header/LocalAlertHeader.js.map +1 -0
- package/esm/alert/local-alert/index.d.ts +2 -0
- package/esm/alert/local-alert/index.js +3 -0
- package/esm/alert/local-alert/index.js.map +1 -0
- package/esm/alert/local-alert/root/LocalAlertRoot.d.ts +81 -0
- package/esm/alert/local-alert/root/LocalAlertRoot.js +42 -0
- package/esm/alert/local-alert/root/LocalAlertRoot.js.map +1 -0
- package/esm/alert/local-alert/title/LocalAlertTitle.d.ts +17 -0
- package/esm/alert/local-alert/title/LocalAlertTitle.js +16 -0
- package/esm/alert/local-alert/title/LocalAlertTitle.js.map +1 -0
- package/esm/date/Date.locale.d.ts +5 -0
- package/esm/index.d.ts +4 -0
- package/esm/index.js +4 -0
- package/esm/index.js.map +1 -1
- package/esm/inline-message/icon/InlineMessageIcon.d.ts +5 -0
- package/esm/inline-message/icon/InlineMessageIcon.js +19 -0
- package/esm/inline-message/icon/InlineMessageIcon.js.map +1 -0
- package/esm/inline-message/index.d.ts +2 -0
- package/esm/inline-message/index.js +3 -0
- package/esm/inline-message/index.js.map +1 -0
- package/esm/inline-message/root/InlineMessage.d.ts +36 -0
- package/esm/inline-message/root/InlineMessage.js +52 -0
- package/esm/inline-message/root/InlineMessage.js.map +1 -0
- package/esm/timeline/period/ClickablePeriod.js +6 -18
- package/esm/timeline/period/ClickablePeriod.js.map +1 -1
- package/esm/timeline/pin/PinInternal.js +6 -18
- package/esm/timeline/pin/PinInternal.js.map +1 -1
- package/esm/util/i18n/locales/en.d.ts +1 -4
- package/esm/util/i18n/locales/en.js +1 -4
- package/esm/util/i18n/locales/en.js.map +1 -1
- package/esm/util/i18n/locales/nb.d.ts +2 -6
- package/esm/util/i18n/locales/nb.js +2 -6
- package/esm/util/i18n/locales/nb.js.map +1 -1
- package/esm/util/i18n/locales/nn.d.ts +1 -4
- package/esm/util/i18n/locales/nn.js +1 -4
- package/esm/util/i18n/locales/nn.js.map +1 -1
- package/package.json +45 -4
- package/src/alert/Alert.tsx +2 -10
- package/src/alert/base-alert/close-button/BaseAlertCloseButton.tsx +44 -0
- package/src/alert/base-alert/content/BaseAlertContent.tsx +43 -0
- package/src/alert/base-alert/header/BaseAlertHeader.tsx +61 -0
- package/src/alert/base-alert/index.ts +2 -0
- package/src/alert/base-alert/namespace.ts +11 -0
- package/src/alert/base-alert/root/BaseAlertRoot.context.tsx +17 -0
- package/src/alert/base-alert/root/BaseAlertRoot.tsx +102 -0
- package/src/alert/base-alert/root/BaseAlertRoot.utils.tsx +67 -0
- package/src/alert/base-alert/title/BaseAlertTitle.tsx +63 -0
- package/src/alert/global-alert/close-button/GlobalAlertCloseButton.tsx +20 -0
- package/src/alert/global-alert/content/GlobalAlertContent.tsx +21 -0
- package/src/alert/global-alert/header/GlobalAlertHeader.tsx +24 -0
- package/src/alert/global-alert/index.ts +16 -0
- package/src/alert/global-alert/root/GlobalAlertRoot.tsx +132 -0
- package/src/alert/global-alert/title/GlobalAlertTitle.tsx +20 -0
- package/src/alert/info-card/content/InfoCardContent.tsx +21 -0
- package/src/alert/info-card/header/InfoCardHeader.tsx +19 -0
- package/src/alert/info-card/index.ts +14 -0
- package/src/alert/info-card/root/InfoCardRoot.tsx +120 -0
- package/src/alert/info-card/title/InfoCardTitle.tsx +20 -0
- package/src/alert/local-alert/close-button/LocalAlertCloseButton.tsx +20 -0
- package/src/alert/local-alert/content/LocalAlertContent.tsx +21 -0
- package/src/alert/local-alert/header/LocalAlertHeader.tsx +24 -0
- package/src/alert/local-alert/index.ts +16 -0
- package/src/alert/local-alert/root/LocalAlertRoot.tsx +133 -0
- package/src/alert/local-alert/title/LocalAlertTitle.tsx +20 -0
- package/src/index.ts +24 -0
- package/src/inline-message/icon/InlineMessageIcon.tsx +33 -0
- package/src/inline-message/index.ts +3 -0
- package/src/inline-message/root/InlineMessage.tsx +92 -0
- package/src/timeline/period/ClickablePeriod.tsx +5 -34
- package/src/timeline/pin/PinInternal.tsx +5 -28
- package/src/util/i18n/locales/en.ts +1 -5
- package/src/util/i18n/locales/nb.ts +1 -5
- package/src/util/i18n/locales/nn.ts +1 -5
- package/cjs/util/renderStoriesForChromatic.d.ts +0 -5
- package/cjs/util/renderStoriesForChromatic.js +0 -21
- package/cjs/util/renderStoriesForChromatic.js.map +0 -1
- package/esm/util/renderStoriesForChromatic.d.ts +0 -5
- package/esm/util/renderStoriesForChromatic.js +0 -15
- package/esm/util/renderStoriesForChromatic.js.map +0 -1
- package/src/util/renderStoriesForChromatic.tsx +0 -26
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
3
|
+
import { GlobalAlertCloseButton, } from "../close-button/GlobalAlertCloseButton.js";
|
|
4
|
+
import { GlobalAlertContent, } from "../content/GlobalAlertContent.js";
|
|
5
|
+
import { GlobalAlertHeader, } from "../header/GlobalAlertHeader.js";
|
|
6
|
+
import { GlobalAlertTitle, } from "../title/GlobalAlertTitle.js";
|
|
7
|
+
/**
|
|
8
|
+
* A component for displaying alerts about your app.
|
|
9
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/globalalert)
|
|
10
|
+
* @see 🏷️ {@link GlobalAlertProps}
|
|
11
|
+
* @example
|
|
12
|
+
* ```jsx
|
|
13
|
+
* <GlobalAlert status="error">
|
|
14
|
+
* <GlobalAlert.Header>
|
|
15
|
+
* <GlobalAlert.Title>Alert title</GlobalAlert.Title>
|
|
16
|
+
* </GlobalAlert.Header>
|
|
17
|
+
* <GlobalAlert.Content>Content</GlobalAlert.Content>
|
|
18
|
+
* </GlobalAlert>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export const GlobalAlert = forwardRef((props, forwardedRef) => {
|
|
22
|
+
return (React.createElement(BaseAlert.Root, Object.assign({ ref: forwardedRef, role: "alert" }, props, { type: "strong", global: true })));
|
|
23
|
+
});
|
|
24
|
+
GlobalAlert.Header = GlobalAlertHeader;
|
|
25
|
+
GlobalAlert.Title = GlobalAlertTitle;
|
|
26
|
+
GlobalAlert.Content = GlobalAlertContent;
|
|
27
|
+
GlobalAlert.CloseButton = GlobalAlertCloseButton;
|
|
28
|
+
export default GlobalAlert;
|
|
29
|
+
export { GlobalAlertCloseButton, GlobalAlertContent, GlobalAlertHeader, GlobalAlertTitle, };
|
|
30
|
+
//# sourceMappingURL=GlobalAlertRoot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAlertRoot.js","sourceRoot":"","sources":["../../../../src/alert/global-alert/root/GlobalAlertRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,sBAAsB,GAEvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,kBAAkB,GAEnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,GAElB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,gBAAgB,GAEjB,MAAM,2BAA2B,CAAC;AAoEnC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,UAAU,CACnC,CAAC,KAAuB,EAAE,YAAY,EAAE,EAAE;IACxC,OAAO,CACL,oBAAC,SAAS,CAAC,IAAI,kBACb,GAAG,EAAE,YAAY,EACjB,IAAI,EAAC,OAAO,IACR,KAAK,IACT,IAAI,EAAC,QAAQ,EACb,MAAM,UACN,CACH,CAAC;AACJ,CAAC,CACsB,CAAC;AAE1B,WAAW,CAAC,MAAM,GAAG,iBAAiB,CAAC;AACvC,WAAW,CAAC,KAAK,GAAG,gBAAgB,CAAC;AACrC,WAAW,CAAC,OAAO,GAAG,kBAAkB,CAAC;AACzC,WAAW,CAAC,WAAW,GAAG,sBAAsB,CAAC;AAEjD,eAAe,WAAW,CAAC;AAC3B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,GACjB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
type GlobalAlertTitleProps = BaseAlert.TitleProps;
|
|
3
|
+
/**
|
|
4
|
+
* Title component for GlobalAlert. Remember to use correct heading-level with the `as` prop.
|
|
5
|
+
* @see 🏷️ {@link GlobalAlertTitleProps}
|
|
6
|
+
* @example
|
|
7
|
+
* ```jsx
|
|
8
|
+
* <GlobalAlert>
|
|
9
|
+
* <GlobalAlert.Header>
|
|
10
|
+
* <GlobalAlert.Title as="h2">Info title</GlobalAlert.Title>
|
|
11
|
+
* </GlobalAlert.Header>
|
|
12
|
+
* </GlobalAlert>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare const GlobalAlertTitle: import("react").ForwardRefExoticComponent<BaseAlert.TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
16
|
+
export { GlobalAlertTitle };
|
|
17
|
+
export type { GlobalAlertTitleProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Title component for GlobalAlert. Remember to use correct heading-level with the `as` prop.
|
|
4
|
+
* @see 🏷️ {@link GlobalAlertTitleProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <GlobalAlert>
|
|
8
|
+
* <GlobalAlert.Header>
|
|
9
|
+
* <GlobalAlert.Title as="h2">Info title</GlobalAlert.Title>
|
|
10
|
+
* </GlobalAlert.Header>
|
|
11
|
+
* </GlobalAlert>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
const GlobalAlertTitle = BaseAlert.Title;
|
|
15
|
+
export { GlobalAlertTitle };
|
|
16
|
+
//# sourceMappingURL=GlobalAlertTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAlertTitle.js","sourceRoot":"","sources":["../../../../src/alert/global-alert/title/GlobalAlertTitle.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,gBAAgB,GAAG,SAAS,CAAC,KAAK,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
type InfoCardContentProps = BaseAlert.ContentProps;
|
|
3
|
+
/**
|
|
4
|
+
* @see 🏷️ {@link InfoCardContentProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <InfoCard>
|
|
8
|
+
* <InfoCard.Header>
|
|
9
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
10
|
+
* </InfoCard.Header>
|
|
11
|
+
*
|
|
12
|
+
* <InfoCard.Content>Content</InfoCard.Content>
|
|
13
|
+
* </InfoCard>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const InfoCardContent: import("react").ForwardRefExoticComponent<BaseAlert.ContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { InfoCardContent };
|
|
18
|
+
export type { InfoCardContentProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see 🏷️ {@link InfoCardContentProps}
|
|
4
|
+
* @example
|
|
5
|
+
* ```jsx
|
|
6
|
+
* <InfoCard>
|
|
7
|
+
* <InfoCard.Header>
|
|
8
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
9
|
+
* </InfoCard.Header>
|
|
10
|
+
*
|
|
11
|
+
* <InfoCard.Content>Content</InfoCard.Content>
|
|
12
|
+
* </InfoCard>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
const InfoCardContent = BaseAlert.Content;
|
|
16
|
+
export { InfoCardContent };
|
|
17
|
+
//# sourceMappingURL=InfoCardContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoCardContent.js","sourceRoot":"","sources":["../../../../src/alert/info-card/content/InfoCardContent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC;AAE1C,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
type InfoCardHeaderProps = BaseAlert.HeaderProps;
|
|
3
|
+
/**
|
|
4
|
+
* @see 🏷️ {@link InfoCardHeaderProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <InfoCard>
|
|
8
|
+
* <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
|
|
9
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
10
|
+
* </InfoCard.Header>
|
|
11
|
+
* </InfoCard>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
declare const InfoCardHeader: import("react").ForwardRefExoticComponent<BaseAlert.HeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export { InfoCardHeader };
|
|
16
|
+
export type { InfoCardHeaderProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see 🏷️ {@link InfoCardHeaderProps}
|
|
4
|
+
* @example
|
|
5
|
+
* ```jsx
|
|
6
|
+
* <InfoCard>
|
|
7
|
+
* <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
|
|
8
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
9
|
+
* </InfoCard.Header>
|
|
10
|
+
* </InfoCard>
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
const InfoCardHeader = BaseAlert.Header;
|
|
14
|
+
export { InfoCardHeader };
|
|
15
|
+
//# sourceMappingURL=InfoCardHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoCardHeader.js","sourceRoot":"","sources":["../../../../src/alert/info-card/header/InfoCardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;GAUG;AACH,MAAM,cAAc,GAAG,SAAS,CAAC,MAAM,CAAC;AAExC,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/info-card/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
3
|
+
import { InfoCardContent, type InfoCardContentProps } from "../content/InfoCardContent.js";
|
|
4
|
+
import { InfoCardHeader, type InfoCardHeaderProps } from "../header/InfoCardHeader.js";
|
|
5
|
+
import { InfoCardTitle, type InfoCardTitleProps } from "../title/InfoCardTitle.js";
|
|
6
|
+
type InfoCardProps = Omit<BaseAlert.RootProps, "type" | "global" | "status"> & {
|
|
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,40 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { forwardRef } from "react";
|
|
13
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
14
|
+
import { InfoCardContent, } from "../content/InfoCardContent.js";
|
|
15
|
+
import { InfoCardHeader, } from "../header/InfoCardHeader.js";
|
|
16
|
+
import { InfoCardTitle } from "../title/InfoCardTitle.js";
|
|
17
|
+
/**
|
|
18
|
+
* A component for displaying informational content in a card format.
|
|
19
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard)
|
|
20
|
+
* @see 🏷️ {@link InfoCardProps}
|
|
21
|
+
* @example
|
|
22
|
+
* ```jsx
|
|
23
|
+
* <InfoCard data-color="info">
|
|
24
|
+
* <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
|
|
25
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
26
|
+
* </InfoCard.Header>
|
|
27
|
+
* <InfoCard.Content>Content</InfoCard.Content>
|
|
28
|
+
* </InfoCard>
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export const InfoCard = forwardRef((_a, forwardedRef) => {
|
|
32
|
+
var { "data-color": dataColor = "info", as = "div" } = _a, restProps = __rest(_a, ["data-color", "as"]);
|
|
33
|
+
return (React.createElement(BaseAlert.Root, Object.assign({ ref: forwardedRef, "data-color": dataColor }, restProps, { type: "moderate", global: false, as: as })));
|
|
34
|
+
});
|
|
35
|
+
InfoCard.Header = InfoCardHeader;
|
|
36
|
+
InfoCard.Title = InfoCardTitle;
|
|
37
|
+
InfoCard.Content = InfoCardContent;
|
|
38
|
+
export default InfoCard;
|
|
39
|
+
export { InfoCardContent, InfoCardHeader, InfoCardTitle };
|
|
40
|
+
//# 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,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,cAAc,GAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAA2B,MAAM,wBAAwB,CAAC;AA8DhF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,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,oBAAC,SAAS,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,QAAQ,CAAC,MAAM,GAAG,cAAc,CAAC;AACjC,QAAQ,CAAC,KAAK,GAAG,aAAa,CAAC;AAC/B,QAAQ,CAAC,OAAO,GAAG,eAAe,CAAC;AAEnC,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
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,16 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Title component for InfoCard. Remember to use correct heading-level with the `as` prop.
|
|
4
|
+
* @see 🏷️ {@link InfoCardTitleProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <InfoCard>
|
|
8
|
+
* <InfoCard.Header>
|
|
9
|
+
* <InfoCard.Title as="h2">Info title</InfoCard.Title>
|
|
10
|
+
* </InfoCard.Header>
|
|
11
|
+
* </InfoCard>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
const InfoCardTitle = BaseAlert.Title;
|
|
15
|
+
export { InfoCardTitle };
|
|
16
|
+
//# 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,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC;AAEtC,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
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,16 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see 🏷️ {@link LocalAlertCloseButtonProps}
|
|
4
|
+
* @example
|
|
5
|
+
* ```jsx
|
|
6
|
+
* <LocalAlert>
|
|
7
|
+
* <LocalAlert.Header>
|
|
8
|
+
* <LocalAlert.Title>Info title</LocalAlert.Title>
|
|
9
|
+
* <LocalAlert.CloseButton onClick={() => alert("Closed!")} />
|
|
10
|
+
* </LocalAlert.Header>
|
|
11
|
+
* </LocalAlert>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
const LocalAlertCloseButton = BaseAlert.CloseButton;
|
|
15
|
+
export { LocalAlertCloseButton };
|
|
16
|
+
//# 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,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,qBAAqB,GAAG,SAAS,CAAC,WAAW,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
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,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @see 🏷️ {@link LocalAlertContentProps}
|
|
4
|
+
* @example
|
|
5
|
+
* ```jsx
|
|
6
|
+
* <LocalAlert>
|
|
7
|
+
* <LocalAlert.Header>
|
|
8
|
+
* <LocalAlert.Title>Info title</LocalAlert.Title>
|
|
9
|
+
* </LocalAlert.Header>
|
|
10
|
+
*
|
|
11
|
+
* <LocalAlert.Content>Content</LocalAlert.Content>
|
|
12
|
+
* </LocalAlert>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
const LocalAlertContent = BaseAlert.Content;
|
|
16
|
+
export { LocalAlertContent };
|
|
17
|
+
//# 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,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,iBAAiB,GAAG,SAAS,CAAC,OAAO,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
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,18 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* @see 🏷️ {@link LocalAlertHeaderProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <LocalAlert>
|
|
8
|
+
* <LocalAlert.Header>
|
|
9
|
+
* <LocalAlert.Title>Info title</LocalAlert.Title>
|
|
10
|
+
* </LocalAlert.Header>
|
|
11
|
+
* </LocalAlert>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
const LocalAlertHeader = forwardRef((props, forwardedRef) => {
|
|
15
|
+
return React.createElement(BaseAlert.Header, Object.assign({ ref: forwardedRef }, props));
|
|
16
|
+
});
|
|
17
|
+
export { LocalAlertHeader };
|
|
18
|
+
//# 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,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;GAUG;AACH,MAAM,gBAAgB,GAAG,UAAU,CACjC,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE;IACtB,OAAO,oBAAC,SAAS,CAAC,MAAM,kBAAC,GAAG,EAAE,YAAY,IAAM,KAAK,EAAI,CAAC;AAC5D,CAAC,CACF,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { LocalAlert, LocalAlertHeader, LocalAlertTitle, LocalAlertContent, LocalAlertCloseButton, } from "./root/LocalAlertRoot.js";
|
|
2
|
+
export type { LocalAlertProps, LocalAlertHeaderProps, LocalAlertTitleProps, LocalAlertContentProps, LocalAlertCloseButtonProps, } from "./root/LocalAlertRoot.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/local-alert/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
3
|
+
import { LocalAlertCloseButton, type LocalAlertCloseButtonProps } from "../close-button/LocalAlertCloseButton.js";
|
|
4
|
+
import { LocalAlertContent, type LocalAlertContentProps } from "../content/LocalAlertContent.js";
|
|
5
|
+
import { LocalAlertHeader, type LocalAlertHeaderProps } from "../header/LocalAlertHeader.js";
|
|
6
|
+
import { LocalAlertTitle, type LocalAlertTitleProps } from "../title/LocalAlertTitle.js";
|
|
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,42 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { forwardRef } from "react";
|
|
13
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
14
|
+
import { LocalAlertCloseButton, } from "../close-button/LocalAlertCloseButton.js";
|
|
15
|
+
import { LocalAlertContent, } from "../content/LocalAlertContent.js";
|
|
16
|
+
import { LocalAlertHeader, } from "../header/LocalAlertHeader.js";
|
|
17
|
+
import { LocalAlertTitle, } from "../title/LocalAlertTitle.js";
|
|
18
|
+
/**
|
|
19
|
+
* A component for displaying important messages about a certain part of the page.
|
|
20
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/localalert)
|
|
21
|
+
* @see 🏷️ {@link LocalAlertProps}
|
|
22
|
+
* @example
|
|
23
|
+
* ```jsx
|
|
24
|
+
* <LocalAlert status="error">
|
|
25
|
+
* <LocalAlert.Header>
|
|
26
|
+
* <LocalAlert.Title>Alert title</LocalAlert.Title>
|
|
27
|
+
* </LocalAlert.Header>
|
|
28
|
+
* <LocalAlert.Content>Content</LocalAlert.Content>
|
|
29
|
+
* </LocalAlert>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const LocalAlert = forwardRef((_a, forwardedRef) => {
|
|
33
|
+
var { status } = _a, restProps = __rest(_a, ["status"]);
|
|
34
|
+
return (React.createElement(BaseAlert.Root, Object.assign({ ref: forwardedRef, role: "alert" }, restProps, { type: "strong", global: false, status: status })));
|
|
35
|
+
});
|
|
36
|
+
LocalAlert.Header = LocalAlertHeader;
|
|
37
|
+
LocalAlert.Title = LocalAlertTitle;
|
|
38
|
+
LocalAlert.Content = LocalAlertContent;
|
|
39
|
+
LocalAlert.CloseButton = LocalAlertCloseButton;
|
|
40
|
+
export default LocalAlert;
|
|
41
|
+
export { LocalAlertContent, LocalAlertHeader, LocalAlertTitle, LocalAlertCloseButton, };
|
|
42
|
+
//# 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,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,qBAAqB,GAEtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,iBAAiB,GAElB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,gBAAgB,GAEjB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAoElC;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CAAC,EAAyC,EAAE,YAAY,EAAE,EAAE;QAA3D,EAAE,MAAM,OAAiC,EAA5B,SAAS,cAAtB,UAAwB,CAAF;IACrB,OAAO,CACL,oBAAC,SAAS,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,UAAU,CAAC,MAAM,GAAG,gBAAgB,CAAC;AACrC,UAAU,CAAC,KAAK,GAAG,eAAe,CAAC;AACnC,UAAU,CAAC,OAAO,GAAG,iBAAiB,CAAC;AACvC,UAAU,CAAC,WAAW,GAAG,qBAAqB,CAAC;AAE/C,eAAe,UAAU,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
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,16 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Title component for LocalAlert. Remember to use correct heading-level with the `as` prop.
|
|
4
|
+
* @see 🏷️ {@link LocalAlertTitleProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <LocalAlert>
|
|
8
|
+
* <LocalAlert.Header>
|
|
9
|
+
* <LocalAlert.Title as="h2">Info title</LocalAlert.Title>
|
|
10
|
+
* </LocalAlert.Header>
|
|
11
|
+
* </LocalAlert>
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
const LocalAlertTitle = BaseAlert.Title;
|
|
15
|
+
export { LocalAlertTitle };
|
|
16
|
+
//# 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,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,CAAC"}
|