@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.
- 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/form/combobox/FilteredOptions/NoSearchHitsMessage.js +3 -1
- package/cjs/form/combobox/FilteredOptions/NoSearchHitsMessage.js.map +1 -1
- 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 +2 -4
- package/cjs/util/i18n/locales/en.js +2 -4
- package/cjs/util/i18n/locales/en.js.map +1 -1
- package/cjs/util/i18n/locales/nb.d.ts +4 -6
- package/cjs/util/i18n/locales/nb.js +4 -6
- package/cjs/util/i18n/locales/nb.js.map +1 -1
- package/cjs/util/i18n/locales/nn.d.ts +2 -4
- package/cjs/util/i18n/locales/nn.js +2 -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/form/combobox/FilteredOptions/NoSearchHitsMessage.js +3 -1
- package/esm/form/combobox/FilteredOptions/NoSearchHitsMessage.js.map +1 -1
- 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 +2 -4
- package/esm/util/i18n/locales/en.js +2 -4
- package/esm/util/i18n/locales/en.js.map +1 -1
- package/esm/util/i18n/locales/nb.d.ts +4 -6
- package/esm/util/i18n/locales/nb.js +4 -6
- package/esm/util/i18n/locales/nb.js.map +1 -1
- package/esm/util/i18n/locales/nn.d.ts +2 -4
- package/esm/util/i18n/locales/nn.js +2 -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 +123 -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/form/combobox/FilteredOptions/NoSearchHitsMessage.tsx +4 -1
- 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 +2 -5
- package/src/util/i18n/locales/nb.ts +2 -5
- package/src/util/i18n/locales/nn.ts +2 -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,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BaseAlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Changes the HTML element used for the title.
|
|
6
|
+
* @default "h2"
|
|
7
|
+
*/
|
|
8
|
+
as?: "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Title component for BaseAlert. Remember to use correct heading-level with the `as` prop.
|
|
12
|
+
* @see 🏷️ {@link BaseAlertTitleProps}
|
|
13
|
+
* @example
|
|
14
|
+
* ```jsx
|
|
15
|
+
* <BaseAlert>
|
|
16
|
+
* <BaseAlert.Header>
|
|
17
|
+
* <BaseAlert.Title as="h2">Info title</BaseAlert.Title>
|
|
18
|
+
* </BaseAlert.Header>
|
|
19
|
+
* </BaseAlert>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const BaseAlertTitle: React.ForwardRefExoticComponent<BaseAlertTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
23
|
+
export { BaseAlertTitle };
|
|
24
|
+
export type { BaseAlertTitleProps };
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
47
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
48
|
+
};
|
|
49
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
+
exports.BaseAlertTitle = void 0;
|
|
51
|
+
const clsx_1 = __importDefault(require("clsx"));
|
|
52
|
+
const react_1 = __importStar(require("react"));
|
|
53
|
+
const Theme_1 = require("../../../theme/Theme");
|
|
54
|
+
const typography_1 = require("../../../typography");
|
|
55
|
+
const util_1 = require("../../../util");
|
|
56
|
+
const BaseAlertRoot_context_1 = require("../root/BaseAlertRoot.context");
|
|
57
|
+
/**
|
|
58
|
+
* Title component for BaseAlert. Remember to use correct heading-level with the `as` prop.
|
|
59
|
+
* @see 🏷️ {@link BaseAlertTitleProps}
|
|
60
|
+
* @example
|
|
61
|
+
* ```jsx
|
|
62
|
+
* <BaseAlert>
|
|
63
|
+
* <BaseAlert.Header>
|
|
64
|
+
* <BaseAlert.Title as="h2">Info title</BaseAlert.Title>
|
|
65
|
+
* </BaseAlert.Header>
|
|
66
|
+
* </BaseAlert>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
const BaseAlertTitle = (0, react_1.forwardRef)((_a, forwardedRef) => {
|
|
70
|
+
var { children, className, as = "h2", id: idProp } = _a, restProps = __rest(_a, ["children", "className", "as", "id"]);
|
|
71
|
+
const { cn } = (0, Theme_1.useRenameCSS)();
|
|
72
|
+
const { size, statusId } = (0, BaseAlertRoot_context_1.useBaseAlert)();
|
|
73
|
+
const titleId = (0, util_1.useId)(idProp);
|
|
74
|
+
return (react_1.default.createElement(typography_1.BodyShort, Object.assign({ ref: forwardedRef }, restProps, { as: as, size: size === "medium" ? "large" : "medium", weight: "semibold", className: cn(className, "navds-base-alert__title"), id: titleId, "aria-labelledby": (0, clsx_1.default)(statusId, titleId) }), children));
|
|
75
|
+
});
|
|
76
|
+
exports.BaseAlertTitle = BaseAlertTitle;
|
|
77
|
+
//# sourceMappingURL=BaseAlertTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseAlertTitle.js","sourceRoot":"","sources":["../../../../src/alert/base-alert/title/BaseAlertTitle.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAsB;AACtB,+CAA0C;AAC1C,gDAAoD;AACpD,oDAAgD;AAChD,wCAAsC;AACtC,yEAA6D;AAW7D;;;;;;;;;;;GAWG;AACH,MAAM,cAAc,GAAG,IAAA,kBAAU,EAC/B,CACE,EAMsB,EACtB,YAAY,EACZ,EAAE;QARF,EACE,QAAQ,EACR,SAAS,EACT,EAAE,GAAG,IAAI,EACT,EAAE,EAAE,MAAM,OAEU,EADjB,SAAS,cALd,qCAMC,CADa;IAId,MAAM,EAAE,EAAE,EAAE,GAAG,IAAA,oBAAY,GAAE,CAAC;IAC9B,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,IAAA,oCAAY,GAAE,CAAC;IAE1C,MAAM,OAAO,GAAG,IAAA,YAAK,EAAC,MAAM,CAAC,CAAC;IAE9B,OAAO,CACL,8BAAC,sBAAS,kBACR,GAAG,EAAE,YAAY,IACb,SAAS,IACb,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAC5C,MAAM,EAAC,UAAU,EACjB,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,yBAAyB,CAAC,EACnD,EAAE,EAAE,OAAO,qBACM,IAAA,cAAE,EAAC,QAAQ,EAAE,OAAO,CAAC,KAErC,QAAQ,CACC,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEO,wCAAc"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert";
|
|
2
|
+
type GlobalAlertCloseButtonProps = BaseAlert.CloseButtonProps;
|
|
3
|
+
/**
|
|
4
|
+
* @see 🏷️ {@link GlobalAlertCloseButtonProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <GlobalAlert>
|
|
8
|
+
* <GlobalAlert.Header>
|
|
9
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
10
|
+
* <GlobalAlert.CloseButton onClick={() => alert("Closed!")} />
|
|
11
|
+
* </GlobalAlert.Header>
|
|
12
|
+
* </GlobalAlert>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare const GlobalAlertCloseButton: import("react").ForwardRefExoticComponent<BaseAlert.CloseButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
export { GlobalAlertCloseButton };
|
|
17
|
+
export type { GlobalAlertCloseButtonProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalAlertCloseButton = void 0;
|
|
4
|
+
const base_alert_1 = require("../../base-alert");
|
|
5
|
+
/**
|
|
6
|
+
* @see 🏷️ {@link GlobalAlertCloseButtonProps}
|
|
7
|
+
* @example
|
|
8
|
+
* ```jsx
|
|
9
|
+
* <GlobalAlert>
|
|
10
|
+
* <GlobalAlert.Header>
|
|
11
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
12
|
+
* <GlobalAlert.CloseButton onClick={() => alert("Closed!")} />
|
|
13
|
+
* </GlobalAlert.Header>
|
|
14
|
+
* </GlobalAlert>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
const GlobalAlertCloseButton = base_alert_1.BaseAlert.CloseButton;
|
|
18
|
+
exports.GlobalAlertCloseButton = GlobalAlertCloseButton;
|
|
19
|
+
//# sourceMappingURL=GlobalAlertCloseButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAlertCloseButton.js","sourceRoot":"","sources":["../../../../src/alert/global-alert/close-button/GlobalAlertCloseButton.tsx"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,sBAAsB,GAAG,sBAAS,CAAC,WAAW,CAAC;AAE5C,wDAAsB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert";
|
|
2
|
+
type GlobalAlertContentProps = BaseAlert.ContentProps;
|
|
3
|
+
/**
|
|
4
|
+
* @see 🏷️ {@link GlobalAlertContentProps}
|
|
5
|
+
* @example
|
|
6
|
+
* ```jsx
|
|
7
|
+
* <GlobalAlert>
|
|
8
|
+
* <GlobalAlert.Header>
|
|
9
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
10
|
+
* </GlobalAlert.Header>
|
|
11
|
+
*
|
|
12
|
+
* <GlobalAlert.Content>Content</GlobalAlert.Content>
|
|
13
|
+
* </GlobalAlert>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const GlobalAlertContent: import("react").ForwardRefExoticComponent<BaseAlert.ContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { GlobalAlertContent };
|
|
18
|
+
export type { GlobalAlertContentProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalAlertContent = void 0;
|
|
4
|
+
const base_alert_1 = require("../../base-alert");
|
|
5
|
+
/**
|
|
6
|
+
* @see 🏷️ {@link GlobalAlertContentProps}
|
|
7
|
+
* @example
|
|
8
|
+
* ```jsx
|
|
9
|
+
* <GlobalAlert>
|
|
10
|
+
* <GlobalAlert.Header>
|
|
11
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
12
|
+
* </GlobalAlert.Header>
|
|
13
|
+
*
|
|
14
|
+
* <GlobalAlert.Content>Content</GlobalAlert.Content>
|
|
15
|
+
* </GlobalAlert>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const GlobalAlertContent = base_alert_1.BaseAlert.Content;
|
|
19
|
+
exports.GlobalAlertContent = GlobalAlertContent;
|
|
20
|
+
//# sourceMappingURL=GlobalAlertContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAlertContent.js","sourceRoot":"","sources":["../../../../src/alert/global-alert/content/GlobalAlertContent.tsx"],"names":[],"mappings":";;;AAAA,iDAA6C;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,kBAAkB,GAAG,sBAAS,CAAC,OAAO,CAAC;AAEpC,gDAAkB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert";
|
|
3
|
+
type GlobalAlertHeaderProps = Omit<BaseAlert.HeaderProps, "icon">;
|
|
4
|
+
/**
|
|
5
|
+
* @see 🏷️ {@link GlobalAlertHeaderProps}
|
|
6
|
+
* @example
|
|
7
|
+
* ```jsx
|
|
8
|
+
* <GlobalAlert status="success">
|
|
9
|
+
* <GlobalAlert.Header>
|
|
10
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
11
|
+
* </GlobalAlert.Header>
|
|
12
|
+
* </GlobalAlert>
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare const GlobalAlertHeader: React.ForwardRefExoticComponent<GlobalAlertHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export { GlobalAlertHeader };
|
|
17
|
+
export type { GlobalAlertHeaderProps };
|
|
@@ -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.GlobalAlertHeader = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const base_alert_1 = require("../../base-alert");
|
|
39
|
+
/**
|
|
40
|
+
* @see 🏷️ {@link GlobalAlertHeaderProps}
|
|
41
|
+
* @example
|
|
42
|
+
* ```jsx
|
|
43
|
+
* <GlobalAlert status="success">
|
|
44
|
+
* <GlobalAlert.Header>
|
|
45
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
46
|
+
* </GlobalAlert.Header>
|
|
47
|
+
* </GlobalAlert>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
const GlobalAlertHeader = (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.GlobalAlertHeader = GlobalAlertHeader;
|
|
54
|
+
//# sourceMappingURL=GlobalAlertHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GlobalAlertHeader.js","sourceRoot":"","sources":["../../../../src/alert/global-alert/header/GlobalAlertHeader.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAC1C,iDAA6C;AAI7C;;;;;;;;;;GAUG;AACH,MAAM,iBAAiB,GAAG,IAAA,kBAAU,EAClC,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,8CAAiB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { GlobalAlert, GlobalAlertHeader, GlobalAlertTitle, GlobalAlertContent, GlobalAlertCloseButton, } from "./root/GlobalAlertRoot";
|
|
2
|
+
export type { GlobalAlertProps, GlobalAlertHeaderProps, GlobalAlertTitleProps, GlobalAlertContentProps, GlobalAlertCloseButtonProps, } from "./root/GlobalAlertRoot";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.GlobalAlertCloseButton = exports.GlobalAlertContent = exports.GlobalAlertTitle = exports.GlobalAlertHeader = exports.GlobalAlert = void 0;
|
|
5
|
+
var GlobalAlertRoot_1 = require("./root/GlobalAlertRoot");
|
|
6
|
+
Object.defineProperty(exports, "GlobalAlert", { enumerable: true, get: function () { return GlobalAlertRoot_1.GlobalAlert; } });
|
|
7
|
+
Object.defineProperty(exports, "GlobalAlertHeader", { enumerable: true, get: function () { return GlobalAlertRoot_1.GlobalAlertHeader; } });
|
|
8
|
+
Object.defineProperty(exports, "GlobalAlertTitle", { enumerable: true, get: function () { return GlobalAlertRoot_1.GlobalAlertTitle; } });
|
|
9
|
+
Object.defineProperty(exports, "GlobalAlertContent", { enumerable: true, get: function () { return GlobalAlertRoot_1.GlobalAlertContent; } });
|
|
10
|
+
Object.defineProperty(exports, "GlobalAlertCloseButton", { enumerable: true, get: function () { return GlobalAlertRoot_1.GlobalAlertCloseButton; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/global-alert/index.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AACb,0DAMgC;AAL9B,8GAAA,WAAW,OAAA;AACX,oHAAA,iBAAiB,OAAA;AACjB,mHAAA,gBAAgB,OAAA;AAChB,qHAAA,kBAAkB,OAAA;AAClB,yHAAA,sBAAsB,OAAA"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BaseAlert } from "../../base-alert";
|
|
3
|
+
import { GlobalAlertCloseButton, type GlobalAlertCloseButtonProps } from "../close-button/GlobalAlertCloseButton";
|
|
4
|
+
import { GlobalAlertContent, type GlobalAlertContentProps } from "../content/GlobalAlertContent";
|
|
5
|
+
import { GlobalAlertHeader, type GlobalAlertHeaderProps } from "../header/GlobalAlertHeader";
|
|
6
|
+
import { GlobalAlertTitle, type GlobalAlertTitleProps } from "../title/GlobalAlertTitle";
|
|
7
|
+
interface GlobalAlertProps extends Omit<BaseAlert.RootProps, "type" | "global" | "data-color"> {
|
|
8
|
+
status: Exclude<BaseAlert.RootProps["status"], undefined>;
|
|
9
|
+
}
|
|
10
|
+
interface GlobalAlertComponent extends React.ForwardRefExoticComponent<GlobalAlertProps & React.RefAttributes<HTMLDivElement>> {
|
|
11
|
+
/**
|
|
12
|
+
* @see 🏷️ {@link GlobalAlertHeaderProps}
|
|
13
|
+
* @example
|
|
14
|
+
* ```jsx
|
|
15
|
+
* <GlobalAlert>
|
|
16
|
+
* <GlobalAlert.Header>
|
|
17
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
18
|
+
* </GlobalAlert.Header>
|
|
19
|
+
* </GlobalAlert>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
Header: typeof GlobalAlertHeader;
|
|
23
|
+
/**
|
|
24
|
+
* Title component for GlobalAlert. Remember to use correct heading-level with the `as` prop.
|
|
25
|
+
* @see 🏷️ {@link GlobalAlertTitleProps}
|
|
26
|
+
* @example
|
|
27
|
+
* ```jsx
|
|
28
|
+
* <GlobalAlert>
|
|
29
|
+
* <GlobalAlert.Header>
|
|
30
|
+
* <GlobalAlert.Title as="h2">Info title</GlobalAlert.Title>
|
|
31
|
+
* </GlobalAlert.Header>
|
|
32
|
+
* </GlobalAlert>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
Title: typeof GlobalAlertTitle;
|
|
36
|
+
/**
|
|
37
|
+
* @see 🏷️ {@link GlobalAlertContentProps}
|
|
38
|
+
* @example
|
|
39
|
+
* ```jsx
|
|
40
|
+
* <GlobalAlert>
|
|
41
|
+
* <GlobalAlert.Header>
|
|
42
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
43
|
+
* </GlobalAlert.Header>
|
|
44
|
+
*
|
|
45
|
+
* <GlobalAlert.Content>Content</GlobalAlert.Content>
|
|
46
|
+
* </GlobalAlert>
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
Content: typeof GlobalAlertContent;
|
|
50
|
+
/**
|
|
51
|
+
* @see 🏷️ {@link GlobalAlertCloseProps}
|
|
52
|
+
* @example
|
|
53
|
+
* ```jsx
|
|
54
|
+
* <GlobalAlert>
|
|
55
|
+
* <GlobalAlert.Header>
|
|
56
|
+
* <GlobalAlert.Title>Info title</GlobalAlert.Title>
|
|
57
|
+
* <GlobalAlert.CloseButton onClick={() => alert("Closed!")} />
|
|
58
|
+
* </GlobalAlert.Header>
|
|
59
|
+
* </GlobalAlert>
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
CloseButton: typeof GlobalAlertCloseButton;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A component for displaying alerts about your app.
|
|
66
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/globalalert)
|
|
67
|
+
* @see 🏷️ {@link GlobalAlertProps}
|
|
68
|
+
* @example
|
|
69
|
+
* ```jsx
|
|
70
|
+
* <GlobalAlert status="error">
|
|
71
|
+
* <GlobalAlert.Header>
|
|
72
|
+
* <GlobalAlert.Title>Alert title</GlobalAlert.Title>
|
|
73
|
+
* </GlobalAlert.Header>
|
|
74
|
+
* <GlobalAlert.Content>Content</GlobalAlert.Content>
|
|
75
|
+
* </GlobalAlert>
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
export declare const GlobalAlert: GlobalAlertComponent;
|
|
79
|
+
export default GlobalAlert;
|
|
80
|
+
export { GlobalAlertCloseButton, GlobalAlertContent, GlobalAlertHeader, GlobalAlertTitle, };
|
|
81
|
+
export type { GlobalAlertCloseButtonProps, GlobalAlertContentProps, GlobalAlertHeaderProps, GlobalAlertProps, GlobalAlertTitleProps, };
|
|
@@ -0,0 +1,69 @@
|
|
|
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.GlobalAlertTitle = exports.GlobalAlertHeader = exports.GlobalAlertContent = exports.GlobalAlertCloseButton = exports.GlobalAlert = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const base_alert_1 = require("../../base-alert");
|
|
39
|
+
const GlobalAlertCloseButton_1 = require("../close-button/GlobalAlertCloseButton");
|
|
40
|
+
Object.defineProperty(exports, "GlobalAlertCloseButton", { enumerable: true, get: function () { return GlobalAlertCloseButton_1.GlobalAlertCloseButton; } });
|
|
41
|
+
const GlobalAlertContent_1 = require("../content/GlobalAlertContent");
|
|
42
|
+
Object.defineProperty(exports, "GlobalAlertContent", { enumerable: true, get: function () { return GlobalAlertContent_1.GlobalAlertContent; } });
|
|
43
|
+
const GlobalAlertHeader_1 = require("../header/GlobalAlertHeader");
|
|
44
|
+
Object.defineProperty(exports, "GlobalAlertHeader", { enumerable: true, get: function () { return GlobalAlertHeader_1.GlobalAlertHeader; } });
|
|
45
|
+
const GlobalAlertTitle_1 = require("../title/GlobalAlertTitle");
|
|
46
|
+
Object.defineProperty(exports, "GlobalAlertTitle", { enumerable: true, get: function () { return GlobalAlertTitle_1.GlobalAlertTitle; } });
|
|
47
|
+
/**
|
|
48
|
+
* A component for displaying alerts about your app.
|
|
49
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/globalalert)
|
|
50
|
+
* @see 🏷️ {@link GlobalAlertProps}
|
|
51
|
+
* @example
|
|
52
|
+
* ```jsx
|
|
53
|
+
* <GlobalAlert status="error">
|
|
54
|
+
* <GlobalAlert.Header>
|
|
55
|
+
* <GlobalAlert.Title>Alert title</GlobalAlert.Title>
|
|
56
|
+
* </GlobalAlert.Header>
|
|
57
|
+
* <GlobalAlert.Content>Content</GlobalAlert.Content>
|
|
58
|
+
* </GlobalAlert>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
exports.GlobalAlert = (0, react_1.forwardRef)((props, forwardedRef) => {
|
|
62
|
+
return (react_1.default.createElement(base_alert_1.BaseAlert.Root, Object.assign({ ref: forwardedRef, role: "alert" }, props, { type: "strong", global: true })));
|
|
63
|
+
});
|
|
64
|
+
exports.GlobalAlert.Header = GlobalAlertHeader_1.GlobalAlertHeader;
|
|
65
|
+
exports.GlobalAlert.Title = GlobalAlertTitle_1.GlobalAlertTitle;
|
|
66
|
+
exports.GlobalAlert.Content = GlobalAlertContent_1.GlobalAlertContent;
|
|
67
|
+
exports.GlobalAlert.CloseButton = GlobalAlertCloseButton_1.GlobalAlertCloseButton;
|
|
68
|
+
exports.default = exports.GlobalAlert;
|
|
69
|
+
//# 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,+CAA0C;AAC1C,iDAA6C;AAC7C,mFAGgD;AAmH9C,uGArHA,+CAAsB,OAqHA;AAlHxB,sEAGuC;AAgHrC,mGAlHA,uCAAkB,OAkHA;AA/GpB,mEAGqC;AA6GnC,kGA/GA,qCAAiB,OA+GA;AA5GnB,gEAGmC;AA0GjC,iGA5GA,mCAAgB,OA4GA;AAtClB;;;;;;;;;;;;;GAaG;AACU,QAAA,WAAW,GAAG,IAAA,kBAAU,EACnC,CAAC,KAAuB,EAAE,YAAY,EAAE,EAAE;IACxC,OAAO,CACL,8BAAC,sBAAS,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,mBAAW,CAAC,MAAM,GAAG,qCAAiB,CAAC;AACvC,mBAAW,CAAC,KAAK,GAAG,mCAAgB,CAAC;AACrC,mBAAW,CAAC,OAAO,GAAG,uCAAkB,CAAC;AACzC,mBAAW,CAAC,WAAW,GAAG,+CAAsB,CAAC;AAEjD,kBAAe,mBAAW,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert";
|
|
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,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalAlertTitle = void 0;
|
|
4
|
+
const base_alert_1 = require("../../base-alert");
|
|
5
|
+
/**
|
|
6
|
+
* Title component for GlobalAlert. Remember to use correct heading-level with the `as` prop.
|
|
7
|
+
* @see 🏷️ {@link GlobalAlertTitleProps}
|
|
8
|
+
* @example
|
|
9
|
+
* ```jsx
|
|
10
|
+
* <GlobalAlert>
|
|
11
|
+
* <GlobalAlert.Header>
|
|
12
|
+
* <GlobalAlert.Title as="h2">Info title</GlobalAlert.Title>
|
|
13
|
+
* </GlobalAlert.Header>
|
|
14
|
+
* </GlobalAlert>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
const GlobalAlertTitle = base_alert_1.BaseAlert.Title;
|
|
18
|
+
exports.GlobalAlertTitle = GlobalAlertTitle;
|
|
19
|
+
//# 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,iDAA6C;AAI7C;;;;;;;;;;;GAWG;AACH,MAAM,gBAAgB,GAAG,sBAAS,CAAC,KAAK,CAAC;AAEhC,4CAAgB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert";
|
|
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,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoCardContent = void 0;
|
|
4
|
+
const base_alert_1 = require("../../base-alert");
|
|
5
|
+
/**
|
|
6
|
+
* @see 🏷️ {@link InfoCardContentProps}
|
|
7
|
+
* @example
|
|
8
|
+
* ```jsx
|
|
9
|
+
* <InfoCard>
|
|
10
|
+
* <InfoCard.Header>
|
|
11
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
12
|
+
* </InfoCard.Header>
|
|
13
|
+
*
|
|
14
|
+
* <InfoCard.Content>Content</InfoCard.Content>
|
|
15
|
+
* </InfoCard>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
const InfoCardContent = base_alert_1.BaseAlert.Content;
|
|
19
|
+
exports.InfoCardContent = InfoCardContent;
|
|
20
|
+
//# 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,iDAA6C;AAI7C;;;;;;;;;;;;GAYG;AACH,MAAM,eAAe,GAAG,sBAAS,CAAC,OAAO,CAAC;AAEjC,0CAAe"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseAlert } from "../../base-alert";
|
|
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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InfoCardHeader = void 0;
|
|
4
|
+
const base_alert_1 = require("../../base-alert");
|
|
5
|
+
/**
|
|
6
|
+
* @see 🏷️ {@link InfoCardHeaderProps}
|
|
7
|
+
* @example
|
|
8
|
+
* ```jsx
|
|
9
|
+
* <InfoCard>
|
|
10
|
+
* <InfoCard.Header icon={<InformationSquareIcon aria-hidden />}>
|
|
11
|
+
* <InfoCard.Title>Info title</InfoCard.Title>
|
|
12
|
+
* </InfoCard.Header>
|
|
13
|
+
* </InfoCard>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
const InfoCardHeader = base_alert_1.BaseAlert.Header;
|
|
17
|
+
exports.InfoCardHeader = InfoCardHeader;
|
|
18
|
+
//# 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,iDAA6C;AAI7C;;;;;;;;;;GAUG;AACH,MAAM,cAAc,GAAG,sBAAS,CAAC,MAAM,CAAC;AAE/B,wCAAc"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.InfoCardContent = exports.InfoCardTitle = exports.InfoCardHeader = exports.InfoCard = void 0;
|
|
5
|
+
var InfoCardRoot_1 = require("./root/InfoCardRoot");
|
|
6
|
+
Object.defineProperty(exports, "InfoCard", { enumerable: true, get: function () { return InfoCardRoot_1.InfoCard; } });
|
|
7
|
+
Object.defineProperty(exports, "InfoCardHeader", { enumerable: true, get: function () { return InfoCardRoot_1.InfoCardHeader; } });
|
|
8
|
+
Object.defineProperty(exports, "InfoCardTitle", { enumerable: true, get: function () { return InfoCardRoot_1.InfoCardTitle; } });
|
|
9
|
+
Object.defineProperty(exports, "InfoCardContent", { enumerable: true, get: function () { return InfoCardRoot_1.InfoCardContent; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/info-card/index.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AACb,oDAK6B;AAJ3B,wGAAA,QAAQ,OAAA;AACR,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,+GAAA,eAAe,OAAA"}
|