@telia/teddy 0.3.0 → 0.3.1
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/dist/components/index.cjs +2 -2
- package/dist/components/index.js +1 -1
- package/dist/components/modal/modal.cjs +1 -1
- package/dist/components/modal/modal.js +1 -1
- package/dist/components/navigation-menu/navigation-menu.cjs +1 -1
- package/dist/components/navigation-menu/navigation-menu.js +1 -1
- package/dist/components/notabene/index.cjs +5 -10
- package/dist/components/notabene/index.d.ts +52 -9
- package/dist/components/notabene/index.js +5 -10
- package/dist/components/notabene/notabene-icon.cjs +1 -1
- package/dist/components/notabene/notabene-icon.js +1 -1
- package/dist/components/notification/index.cjs +13 -2
- package/dist/components/notification/index.d.ts +132 -2
- package/dist/components/notification/index.js +12 -1
- package/dist/components/notification/notification-dismiss.cjs +46 -0
- package/dist/components/notification/notification-dismiss.d.ts +5 -0
- package/dist/components/notification/notification-dismiss.js +29 -0
- package/dist/components/notification/notification-footer.cjs +18 -0
- package/dist/components/notification/notification-footer.d.ts +5 -0
- package/dist/components/notification/notification-footer.js +18 -0
- package/dist/components/notification/notification-heading.cjs +18 -0
- package/dist/components/notification/notification-heading.d.ts +5 -0
- package/dist/components/notification/notification-heading.js +18 -0
- package/dist/components/notification/notification-icon.cjs +32 -0
- package/dist/components/notification/notification-icon.d.ts +9 -0
- package/dist/components/notification/notification-icon.js +32 -0
- package/dist/components/notification/notification-root.cjs +59 -0
- package/dist/components/notification/notification-root.d.ts +86 -0
- package/dist/components/notification/notification-root.js +42 -0
- package/dist/components/notification/notification-text.cjs +15 -0
- package/dist/components/notification/notification-text.d.ts +5 -0
- package/dist/components/notification/notification-text.js +15 -0
- package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -1
- package/dist/components/radio-card-group/radio-card-group-content.js +1 -1
- package/dist/components/radio-card-group/radio-card-group-item-title.cjs +1 -1
- package/dist/components/radio-card-group/radio-card-group-item-title.js +1 -1
- package/dist/components/radio-card-group/radio-card-group-item.cjs +1 -1
- package/dist/components/radio-card-group/radio-card-group-item.js +1 -1
- package/dist/main.cjs +2 -2
- package/dist/main.js +1 -1
- package/dist/style.css +52 -24
- package/package.json +16 -16
- package/dist/components/notification/notification.cjs +0 -116
- package/dist/components/notification/notification.d.ts +0 -106
- package/dist/components/notification/notification.js +0 -99
- /package/dist/components/notabene/{notabene.content.cjs → notabene-content.cjs} +0 -0
- /package/dist/components/notabene/{notabene.content.d.ts → notabene-content.d.ts} +0 -0
- /package/dist/components/notabene/{notabene.content.js → notabene-content.js} +0 -0
|
@@ -22,7 +22,7 @@ const components_image_image = require("./image/image.cjs");
|
|
|
22
22
|
const components_chip_index = require("./chip/index.cjs");
|
|
23
23
|
const components_datePicker_datePicker = require("./date-picker/date-picker.cjs");
|
|
24
24
|
const components_metricmeter_metricmeter = require("./metricmeter/metricmeter.cjs");
|
|
25
|
-
const
|
|
25
|
+
const components_notification_index = require("./notification/index.cjs");
|
|
26
26
|
const components_radioGroup_index = require("./radio-group/index.cjs");
|
|
27
27
|
const components_box_box = require("./box/box.cjs");
|
|
28
28
|
const components_flex_flex = require("./flex/flex.cjs");
|
|
@@ -80,7 +80,7 @@ exports.Image = components_image_image.Image;
|
|
|
80
80
|
exports.Chip = components_chip_index.Chip;
|
|
81
81
|
exports.DatePicker = components_datePicker_datePicker.DatePicker;
|
|
82
82
|
exports.MetricMeter = components_metricmeter_metricmeter.MetricMeter;
|
|
83
|
-
exports.Notification =
|
|
83
|
+
exports.Notification = components_notification_index.Notification;
|
|
84
84
|
exports.RadioGroup = components_radioGroup_index.RadioGroup;
|
|
85
85
|
exports.Box = components_box_box.Box;
|
|
86
86
|
exports.Flex = components_flex_flex.Flex;
|
package/dist/components/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { Image } from "./image/image.js";
|
|
|
20
20
|
import { Chip } from "./chip/index.js";
|
|
21
21
|
import { DatePicker } from "./date-picker/date-picker.js";
|
|
22
22
|
import { MetricMeter } from "./metricmeter/metricmeter.js";
|
|
23
|
-
import { Notification } from "./notification/
|
|
23
|
+
import { Notification } from "./notification/index.js";
|
|
24
24
|
import { RadioGroup } from "./radio-group/index.js";
|
|
25
25
|
import { Box } from "./box/box.js";
|
|
26
26
|
import { Flex } from "./flex/flex.js";
|
|
@@ -27,7 +27,7 @@ require("../chip/index.cjs");
|
|
|
27
27
|
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
28
28
|
require("../icon/icon.cjs");
|
|
29
29
|
require("clsx");
|
|
30
|
-
require("../notification/
|
|
30
|
+
require("../notification/index.cjs");
|
|
31
31
|
require("../radio-group/index.cjs");
|
|
32
32
|
require("../box/box.cjs");
|
|
33
33
|
require("../flex/flex.cjs");
|
|
@@ -25,7 +25,7 @@ import "../chip/index.js";
|
|
|
25
25
|
import "../../assets/sprite.1321fab0-teddy.svg";
|
|
26
26
|
import "../icon/icon.js";
|
|
27
27
|
import "clsx";
|
|
28
|
-
import "../notification/
|
|
28
|
+
import "../notification/index.js";
|
|
29
29
|
import "../radio-group/index.js";
|
|
30
30
|
import "../box/box.js";
|
|
31
31
|
import "../flex/flex.js";
|
|
@@ -33,7 +33,7 @@ require("../drawer/index.cjs");
|
|
|
33
33
|
require("../image/image.cjs");
|
|
34
34
|
require("../chip/index.cjs");
|
|
35
35
|
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
36
|
-
require("../notification/
|
|
36
|
+
require("../notification/index.cjs");
|
|
37
37
|
require("../radio-group/index.cjs");
|
|
38
38
|
require("../box/box.cjs");
|
|
39
39
|
require("../flex/flex.cjs");
|
|
@@ -31,7 +31,7 @@ import "../drawer/index.js";
|
|
|
31
31
|
import "../image/image.js";
|
|
32
32
|
import "../chip/index.js";
|
|
33
33
|
import "../../assets/sprite.1321fab0-teddy.svg";
|
|
34
|
-
import "../notification/
|
|
34
|
+
import "../notification/index.js";
|
|
35
35
|
import "../radio-group/index.js";
|
|
36
36
|
import "../box/box.js";
|
|
37
37
|
import "../flex/flex.js";
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
3
|
+
const components_notabene_notabeneContent = require("./notabene-content.cjs");
|
|
4
4
|
const components_notabene_notabeneHeading = require("./notabene-heading.cjs");
|
|
5
5
|
const components_notabene_notabeneIcon = require("./notabene-icon.cjs");
|
|
6
6
|
const components_notabene_notabeneRoot = require("./notabene-root.cjs");
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const Notabene = Object.assign(components_notabene_notabeneRoot.Root, {
|
|
12
|
-
Content: components_notabene_notabene_content.Content,
|
|
13
|
-
Heading: components_notabene_notabeneHeading.Heading,
|
|
14
|
-
Icon: components_notabene_notabeneIcon.Icon
|
|
15
|
-
});
|
|
7
|
+
const Notabene = components_notabene_notabeneRoot.Root;
|
|
8
|
+
Notabene.Content = components_notabene_notabeneContent.Content;
|
|
9
|
+
Notabene.Heading = components_notabene_notabeneHeading.Heading;
|
|
10
|
+
Notabene.Icon = components_notabene_notabeneIcon.Icon;
|
|
16
11
|
exports.Notabene = Notabene;
|
|
@@ -1,16 +1,59 @@
|
|
|
1
|
-
import { Content, ContentProps } from './notabene
|
|
1
|
+
import { Content, ContentProps } from './notabene-content';
|
|
2
2
|
import { Heading, HeadingProps } from './notabene-heading';
|
|
3
3
|
import { Icon, IconProps } from './notabene-icon';
|
|
4
|
-
import {
|
|
4
|
+
import { RootProps } from './notabene-root';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Heading: typeof Heading;
|
|
9
|
-
Icon: typeof Icon;
|
|
10
|
-
};
|
|
11
|
-
export type NotabeneProps = {
|
|
6
|
+
type NotabeneProps = {
|
|
7
|
+
Root: RootProps;
|
|
12
8
|
Content: ContentProps;
|
|
13
9
|
Heading: HeadingProps;
|
|
14
10
|
Icon: IconProps;
|
|
15
|
-
Root: RootProps;
|
|
16
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* The Notabene Card is a component that is used to attract special attention to a message, where it would otherwise be lost in neighbouring content.
|
|
14
|
+
*
|
|
15
|
+
* @component
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <Notabene>
|
|
19
|
+
* <Notabene.Icon name="bulb" />
|
|
20
|
+
* <Notabene.Content>
|
|
21
|
+
* <Notabene.Heading>Good to know!</Notabene.Heading>
|
|
22
|
+
* <Text mb="50">Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur, provident!</Text>
|
|
23
|
+
* <Link variant="standalone" href="https://www.example.com" target="_blank">
|
|
24
|
+
* Do not click me <Icon name="arrow-right" />
|
|
25
|
+
* </Link>
|
|
26
|
+
* </Notabene.Content>
|
|
27
|
+
* </Notabene>
|
|
28
|
+
*/
|
|
29
|
+
declare const Notabene: import('react').ForwardRefExoticComponent<RootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
30
|
+
/**
|
|
31
|
+
* Content component displays the detailed message.
|
|
32
|
+
*
|
|
33
|
+
* @component
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* <Notabene.Content>This is the detailed message of the notabene.</Notabene.Content>
|
|
37
|
+
*/
|
|
38
|
+
Content: typeof Content;
|
|
39
|
+
/**
|
|
40
|
+
* Heading component displays the title of the notabene.
|
|
41
|
+
*
|
|
42
|
+
* @component
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* <Notabene.Heading as="h3">Notabene Title</Notabene.Heading>
|
|
46
|
+
*/
|
|
47
|
+
Heading: typeof Heading;
|
|
48
|
+
/**
|
|
49
|
+
* Icon component displays an icon in the notabene.
|
|
50
|
+
*
|
|
51
|
+
* @component
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* <Notabene.Icon name="info" />
|
|
55
|
+
*/
|
|
56
|
+
Icon: typeof Icon;
|
|
57
|
+
};
|
|
58
|
+
export { Notabene };
|
|
59
|
+
export type { NotabeneProps };
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { Content } from "./notabene
|
|
1
|
+
import { Content } from "./notabene-content.js";
|
|
2
2
|
import { Heading } from "./notabene-heading.js";
|
|
3
3
|
import { Icon } from "./notabene-icon.js";
|
|
4
4
|
import { Root } from "./notabene-root.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const Notabene = Object.assign(Root, {
|
|
10
|
-
Content,
|
|
11
|
-
Heading,
|
|
12
|
-
Icon
|
|
13
|
-
});
|
|
5
|
+
const Notabene = Root;
|
|
6
|
+
Notabene.Content = Content;
|
|
7
|
+
Notabene.Heading = Heading;
|
|
8
|
+
Notabene.Icon = Icon;
|
|
14
9
|
export {
|
|
15
10
|
Notabene
|
|
16
11
|
};
|
|
@@ -14,5 +14,5 @@ const Icon = React.forwardRef(
|
|
|
14
14
|
return /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { size: "lg", ...props, name, ref: forwardRef, className: classes });
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
|
-
Icon.displayName = "
|
|
17
|
+
Icon.displayName = "Icon";
|
|
18
18
|
exports.Icon = Icon;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const components_notification_notificationDismiss = require("./notification-dismiss.cjs");
|
|
4
|
+
const components_notification_notificationHeading = require("./notification-heading.cjs");
|
|
5
|
+
const components_notification_notificationIcon = require("./notification-icon.cjs");
|
|
6
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
7
|
+
const components_notification_notificationText = require("./notification-text.cjs");
|
|
8
|
+
const components_notification_notificationFooter = require("./notification-footer.cjs");
|
|
9
|
+
const Notification = components_notification_notificationRoot.Root;
|
|
10
|
+
Notification.Text = components_notification_notificationText.Text;
|
|
11
|
+
Notification.Heading = components_notification_notificationHeading.Heading;
|
|
12
|
+
Notification.Footer = components_notification_notificationFooter.Footer;
|
|
13
|
+
Notification.Icon = components_notification_notificationIcon.Icon;
|
|
14
|
+
Notification.Dismiss = components_notification_notificationDismiss.Dismiss;
|
|
15
|
+
exports.Notification = Notification;
|
|
@@ -1,2 +1,132 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Dismiss, DismissProps } from './notification-dismiss';
|
|
2
|
+
import { Heading, HeadingProps } from './notification-heading';
|
|
3
|
+
import { Icon, IconProps } from './notification-icon';
|
|
4
|
+
import { RootProps } from './notification-root';
|
|
5
|
+
import { TextProps, Text } from './notification-text';
|
|
6
|
+
import { FooterProps, Footer } from './notification-footer';
|
|
7
|
+
|
|
8
|
+
type NotificationProps = {
|
|
9
|
+
Root: RootProps;
|
|
10
|
+
Text: TextProps;
|
|
11
|
+
Heading: HeadingProps;
|
|
12
|
+
Footer: FooterProps;
|
|
13
|
+
Icon: IconProps;
|
|
14
|
+
Dismiss: DismissProps;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Notifications are messages that communicate information or feedback to the user.
|
|
18
|
+
*
|
|
19
|
+
* @component
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Notification variant="success">
|
|
23
|
+
* <Notification.Dismiss />
|
|
24
|
+
* <Notification.Heading as="h3">
|
|
25
|
+
* <Notification.Icon /> Notification Title</Notification.Heading>
|
|
26
|
+
* <Notification.Text>This is the detailed message of the notification.</Notification.Text>
|
|
27
|
+
* </Notification>
|
|
28
|
+
*/
|
|
29
|
+
declare const Notification: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/radius').RadiusProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
30
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
31
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
32
|
+
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
33
|
+
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
34
|
+
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
35
|
+
asChild: true;
|
|
36
|
+
as?: undefined;
|
|
37
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
38
|
+
asChild?: boolean | undefined;
|
|
39
|
+
variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | "beige-light" | undefined;
|
|
40
|
+
bordered?: boolean | undefined;
|
|
41
|
+
shadow?: boolean | undefined;
|
|
42
|
+
backgroundImageSrc?: string | undefined;
|
|
43
|
+
imageGradient?: ("default" | "dark" | "light") | undefined;
|
|
44
|
+
layout?: import('../card/card').Layout | undefined;
|
|
45
|
+
} & import('react').RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/radius').RadiusProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
46
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
47
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
48
|
+
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
49
|
+
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
50
|
+
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
51
|
+
as?: "span" | undefined;
|
|
52
|
+
asChild?: false | undefined;
|
|
53
|
+
} & Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
54
|
+
asChild?: boolean | undefined;
|
|
55
|
+
variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | "beige-light" | undefined;
|
|
56
|
+
bordered?: boolean | undefined;
|
|
57
|
+
shadow?: boolean | undefined;
|
|
58
|
+
backgroundImageSrc?: string | undefined;
|
|
59
|
+
imageGradient?: ("default" | "dark" | "light") | undefined;
|
|
60
|
+
layout?: import('../card/card').Layout | undefined;
|
|
61
|
+
} & import('react').RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/radius').RadiusProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
62
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
63
|
+
} & import('../../utils/generate-styling/gap').GapProps & {
|
|
64
|
+
align?: import('../../utils/generate-styling/align').Align | undefined;
|
|
65
|
+
justify?: import('../../utils/generate-styling/justify').Justify | undefined;
|
|
66
|
+
} & import('../../utils/generate-styling/grid').GridLayout & {
|
|
67
|
+
as: "div";
|
|
68
|
+
asChild?: false | undefined;
|
|
69
|
+
} & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
|
|
70
|
+
asChild?: boolean | undefined;
|
|
71
|
+
variant?: "beige" | "gray" | "white" | "purple-light" | "purple-dark" | "beige-light" | undefined;
|
|
72
|
+
bordered?: boolean | undefined;
|
|
73
|
+
shadow?: boolean | undefined;
|
|
74
|
+
backgroundImageSrc?: string | undefined;
|
|
75
|
+
imageGradient?: ("default" | "dark" | "light") | undefined;
|
|
76
|
+
layout?: import('../card/card').Layout | undefined;
|
|
77
|
+
} & import('react').RefAttributes<HTMLDivElement>, "ref">, "as" | "layout" | "variant"> & {
|
|
78
|
+
variant?: "beige" | "gray" | "teal" | "error" | "warning" | "information" | "success" | undefined;
|
|
79
|
+
type?: "card" | "tile" | undefined;
|
|
80
|
+
open?: boolean | undefined;
|
|
81
|
+
defaultOpen?: boolean | undefined;
|
|
82
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
83
|
+
role?: "alert" | undefined;
|
|
84
|
+
} & import('react').RefAttributes<HTMLDivElement>> & {
|
|
85
|
+
/**
|
|
86
|
+
* Text component displays the detailed message.
|
|
87
|
+
*
|
|
88
|
+
* @component
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* <Notification.Text>This is the detailed message of the notification.</Notification.Text>
|
|
92
|
+
*/
|
|
93
|
+
Text: typeof Text;
|
|
94
|
+
/**
|
|
95
|
+
* Heading component displays the title of the notification.
|
|
96
|
+
*
|
|
97
|
+
* @component
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* <Notification.Heading as="h3">Notification Title</Notification.Heading>
|
|
101
|
+
*/
|
|
102
|
+
Heading: typeof Heading;
|
|
103
|
+
/**
|
|
104
|
+
* Footer component displays the footer of the notification.
|
|
105
|
+
*
|
|
106
|
+
* @component
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* <Notification.Footer">Notification Footer</Notification.Footer>
|
|
110
|
+
*/
|
|
111
|
+
Footer: typeof Footer;
|
|
112
|
+
/**
|
|
113
|
+
* Icon component displays an icon in the notification. The icon is automatically determined based on the variant, but can be overridden.
|
|
114
|
+
*
|
|
115
|
+
* @component
|
|
116
|
+
*
|
|
117
|
+
* @example
|
|
118
|
+
* <Notification.Icon name="info" />
|
|
119
|
+
*/
|
|
120
|
+
Icon: typeof Icon;
|
|
121
|
+
/**
|
|
122
|
+
* Dismiss component provides a button to dismiss the notification.
|
|
123
|
+
*
|
|
124
|
+
* @component
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* <Notification.Dismiss />
|
|
128
|
+
*/
|
|
129
|
+
Dismiss: typeof Dismiss;
|
|
130
|
+
};
|
|
131
|
+
export { Notification };
|
|
132
|
+
export type { NotificationProps };
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Dismiss } from "./notification-dismiss.js";
|
|
2
|
+
import { Heading } from "./notification-heading.js";
|
|
3
|
+
import { Icon } from "./notification-icon.js";
|
|
4
|
+
import { Root } from "./notification-root.js";
|
|
5
|
+
import { Text } from "./notification-text.js";
|
|
6
|
+
import { Footer } from "./notification-footer.js";
|
|
7
|
+
const Notification = Root;
|
|
8
|
+
Notification.Text = Text;
|
|
9
|
+
Notification.Heading = Heading;
|
|
10
|
+
Notification.Footer = Footer;
|
|
11
|
+
Notification.Icon = Icon;
|
|
12
|
+
Notification.Dismiss = Dismiss;
|
|
2
13
|
export {
|
|
3
14
|
Notification
|
|
4
15
|
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const CollapsiblePrimitive = require("@radix-ui/react-collapsible");
|
|
7
|
+
const components_button_button = require("../button/button.cjs");
|
|
8
|
+
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
9
|
+
const components_icon_icon = require("../icon/icon.cjs");
|
|
10
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
11
|
+
function _interopNamespaceDefault(e) {
|
|
12
|
+
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
13
|
+
if (e) {
|
|
14
|
+
for (const k in e) {
|
|
15
|
+
if (k !== "default") {
|
|
16
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: () => e[k]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
const CollapsiblePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CollapsiblePrimitive);
|
|
28
|
+
const Dismiss = React.forwardRef(
|
|
29
|
+
({ className, children, ...props }, forwardRef) => {
|
|
30
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__dismiss`]], className);
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePrimitive__namespace.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
+
components_button_button.Button,
|
|
33
|
+
{
|
|
34
|
+
iconOnly: true,
|
|
35
|
+
"aria-label": "Lukk",
|
|
36
|
+
variant: "tertiary-purple",
|
|
37
|
+
...props,
|
|
38
|
+
ref: forwardRef,
|
|
39
|
+
className: classes,
|
|
40
|
+
children: children || /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { size: "sm", name: "close" })
|
|
41
|
+
}
|
|
42
|
+
) });
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
Dismiss.displayName = "Dismiss";
|
|
46
|
+
exports.Dismiss = Dismiss;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Button as ButtonPrimitives } from '../button';
|
|
3
|
+
|
|
4
|
+
export type DismissProps = Omit<React.ComponentPropsWithoutRef<typeof ButtonPrimitives>, 'variant'>;
|
|
5
|
+
export declare const Dismiss: React.ForwardRefExoticComponent<DismissProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
5
|
+
import { Button } from "../button/button.js";
|
|
6
|
+
import "../../assets/sprite.1321fab0-teddy.svg";
|
|
7
|
+
import { Icon } from "../icon/icon.js";
|
|
8
|
+
import { s as styles, rootClassName } from "./notification-root.js";
|
|
9
|
+
const Dismiss = React__default.forwardRef(
|
|
10
|
+
({ className, children, ...props }, forwardRef) => {
|
|
11
|
+
const classes = clsx([styles[`${rootClassName}__dismiss`]], className);
|
|
12
|
+
return /* @__PURE__ */ jsx(CollapsiblePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
13
|
+
Button,
|
|
14
|
+
{
|
|
15
|
+
iconOnly: true,
|
|
16
|
+
"aria-label": "Lukk",
|
|
17
|
+
variant: "tertiary-purple",
|
|
18
|
+
...props,
|
|
19
|
+
ref: forwardRef,
|
|
20
|
+
className: classes,
|
|
21
|
+
children: children || /* @__PURE__ */ jsx(Icon, { size: "sm", name: "close" })
|
|
22
|
+
}
|
|
23
|
+
) });
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
Dismiss.displayName = "Dismiss";
|
|
27
|
+
export {
|
|
28
|
+
Dismiss
|
|
29
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const clsx = require("clsx");
|
|
6
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
7
|
+
const components_box_box = require("../box/box.cjs");
|
|
8
|
+
const Footer = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__footer`]], className);
|
|
11
|
+
const context = React.useContext(components_notification_notificationRoot.NotificationContext);
|
|
12
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
13
|
+
return null;
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { ...props, ref: forwardRef, className: classes });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
Footer.displayName = "Notification.Footer";
|
|
18
|
+
exports.Footer = Footer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { s as styles, rootClassName, NotificationContext } from "./notification-root.js";
|
|
5
|
+
import { Box } from "../box/box.js";
|
|
6
|
+
const Footer = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__footer`]], className);
|
|
9
|
+
const context = React__default.useContext(NotificationContext);
|
|
10
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
11
|
+
return null;
|
|
12
|
+
return /* @__PURE__ */ jsx(Box, { ...props, ref: forwardRef, className: classes });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Footer.displayName = "Notification.Footer";
|
|
16
|
+
export {
|
|
17
|
+
Footer
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const components_heading_heading = require("../heading/heading.cjs");
|
|
6
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
7
|
+
const clsx = require("clsx");
|
|
8
|
+
const Heading = React.forwardRef(
|
|
9
|
+
({ className, ...props }, forwardRef) => {
|
|
10
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__heading`]], className);
|
|
11
|
+
const context = React.useContext(components_notification_notificationRoot.NotificationContext);
|
|
12
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
13
|
+
return null;
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_heading_heading.Heading, { ...props, variant: "subsection-100", asChild: false, ref: forwardRef, className: classes });
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
Heading.displayName = "Heading";
|
|
18
|
+
exports.Heading = Heading;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Heading as HeadingPrimitives } from '../heading';
|
|
3
|
+
|
|
4
|
+
export type HeadingProps = Omit<React.ComponentPropsWithoutRef<typeof HeadingPrimitives>, 'asChild' | 'variant'>;
|
|
5
|
+
export declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React__default from "react";
|
|
3
|
+
import { Heading as Heading$1 } from "../heading/heading.js";
|
|
4
|
+
import { s as styles, rootClassName, NotificationContext } from "./notification-root.js";
|
|
5
|
+
import clsx from "clsx";
|
|
6
|
+
const Heading = React__default.forwardRef(
|
|
7
|
+
({ className, ...props }, forwardRef) => {
|
|
8
|
+
const classes = clsx([styles[`${rootClassName}__heading`]], className);
|
|
9
|
+
const context = React__default.useContext(NotificationContext);
|
|
10
|
+
if ((context == null ? void 0 : context.type) === "tile")
|
|
11
|
+
return null;
|
|
12
|
+
return /* @__PURE__ */ jsx(Heading$1, { ...props, variant: "subsection-100", asChild: false, ref: forwardRef, className: classes });
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
Heading.displayName = "Heading";
|
|
16
|
+
export {
|
|
17
|
+
Heading
|
|
18
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
require("../../assets/sprite.1321fab0-teddy.svg");
|
|
6
|
+
const components_icon_icon = require("../icon/icon.cjs");
|
|
7
|
+
const components_notification_notificationRoot = require("./notification-root.cjs");
|
|
8
|
+
const clsx = require("clsx");
|
|
9
|
+
function getVariantIcon(variant) {
|
|
10
|
+
switch (variant) {
|
|
11
|
+
case "success":
|
|
12
|
+
return "check-circle-filled";
|
|
13
|
+
case "error":
|
|
14
|
+
return "error-filled";
|
|
15
|
+
case "warning":
|
|
16
|
+
return "alert-filled";
|
|
17
|
+
case "information":
|
|
18
|
+
return "info-filled";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
const Icon = React.forwardRef(
|
|
22
|
+
({ className, ...props }, forwardRef) => {
|
|
23
|
+
const classes = clsx([components_notification_notificationRoot.styles[`${components_notification_notificationRoot.rootClassName}__icon`]], className);
|
|
24
|
+
const context = React.useContext(components_notification_notificationRoot.NotificationContext);
|
|
25
|
+
const name = props.name || getVariantIcon(context == null ? void 0 : context.variant);
|
|
26
|
+
if (!name)
|
|
27
|
+
return props.children;
|
|
28
|
+
return /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { size: "md", ...props, name, ref: forwardRef, className: classes });
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
Icon.displayName = "Icon";
|
|
32
|
+
exports.Icon = Icon;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Icon as IconPrimitives } from '../icon';
|
|
3
|
+
|
|
4
|
+
export type IconProps = Partial<React.ComponentPropsWithoutRef<typeof IconPrimitives>>;
|
|
5
|
+
export declare const Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
|
|
6
|
+
name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "help" | "zoom-out" | "present" | "add" | "reverse" | "infinite" | "visible" | "zoom" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "youtube" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
|
|
7
|
+
size?: ("sm" | "md" | "lg" | "xl" | "xs" | "font" | "xxs") | undefined;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|