@telia/teddy 0.7.52 → 0.7.53
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/notification/index.d.ts +1 -1
- package/dist/components/notification/notification-root.cjs +21 -15
- package/dist/components/notification/notification-root.d.ts +2 -2
- package/dist/components/notification/notification-root.js +21 -15
- package/dist/style.css +20 -15
- package/package.json +1 -1
|
@@ -99,7 +99,7 @@ declare const Notification: import('react').ForwardRefExoticComponent<Omit<Omit<
|
|
|
99
99
|
imageGradient?: ("none" | "dark" | "light" | "default") | undefined;
|
|
100
100
|
layout?: import('../card/card').Layout | undefined;
|
|
101
101
|
} & import('react').RefAttributes<HTMLDivElement>, "ref">, "variant" | "layout" | "as"> & {
|
|
102
|
-
variant?: "error" | "warning" | "beige" | "gray" | "teal" | "information" | "success" | undefined;
|
|
102
|
+
variant?: "error" | "warning" | "beige" | "gray" | "teal" | "information" | "success" | "light-purple" | undefined;
|
|
103
103
|
type?: "card" | "tile" | undefined;
|
|
104
104
|
open?: boolean | undefined;
|
|
105
105
|
defaultOpen?: boolean | undefined;
|
|
@@ -24,26 +24,32 @@ function _interopNamespaceDefault(e) {
|
|
|
24
24
|
}
|
|
25
25
|
const CollapsiblePrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(CollapsiblePrimitive);
|
|
26
26
|
const styles = {
|
|
27
|
-
"teddy-notification": "_teddy-
|
|
28
|
-
"teddy-notification--success": "_teddy-notification--
|
|
29
|
-
"teddy-notification--warning": "_teddy-notification--
|
|
30
|
-
"teddy-notification--error": "_teddy-notification--
|
|
31
|
-
"teddy-notification--information": "_teddy-notification--
|
|
32
|
-
"teddy-notification--beige": "_teddy-notification--
|
|
33
|
-
"teddy-notification--teal": "_teddy-notification--
|
|
34
|
-
"teddy-notification--gray": "_teddy-notification--
|
|
35
|
-
"teddy-notification--
|
|
36
|
-
"teddy-
|
|
37
|
-
"teddy-
|
|
38
|
-
"teddy-
|
|
39
|
-
"teddy-
|
|
40
|
-
"teddy-
|
|
27
|
+
"teddy-notification": "_teddy-notification_yr9vf_3",
|
|
28
|
+
"teddy-notification--success": "_teddy-notification--success_yr9vf_11",
|
|
29
|
+
"teddy-notification--warning": "_teddy-notification--warning_yr9vf_16",
|
|
30
|
+
"teddy-notification--error": "_teddy-notification--error_yr9vf_21",
|
|
31
|
+
"teddy-notification--information": "_teddy-notification--information_yr9vf_26",
|
|
32
|
+
"teddy-notification--beige": "_teddy-notification--beige_yr9vf_31",
|
|
33
|
+
"teddy-notification--teal": "_teddy-notification--teal_yr9vf_36",
|
|
34
|
+
"teddy-notification--gray": "_teddy-notification--gray_yr9vf_41",
|
|
35
|
+
"teddy-notification--light-purple": "_teddy-notification--light-purple_yr9vf_46",
|
|
36
|
+
"teddy-notification--tile": "_teddy-notification--tile_yr9vf_51",
|
|
37
|
+
"teddy-notification__text": "_teddy-notification__text_yr9vf_54",
|
|
38
|
+
"teddy-notification__dismiss": "_teddy-notification__dismiss_yr9vf_57",
|
|
39
|
+
"teddy-notification__heading": "_teddy-notification__heading_yr9vf_61",
|
|
40
|
+
"teddy-notification__footer": "_teddy-notification__footer_yr9vf_70",
|
|
41
|
+
"teddy-notification__icon": "_teddy-notification__icon_yr9vf_73"
|
|
41
42
|
};
|
|
42
43
|
const rootClassName = "teddy-notification";
|
|
43
44
|
const NotificationContext = React.createContext(void 0);
|
|
44
45
|
const Root = React.forwardRef(
|
|
45
46
|
({ className, open: openProp, defaultOpen, onOpenChange, variant, type, ...props }, forwardRef) => {
|
|
46
|
-
const classes = clsx(
|
|
47
|
+
const classes = clsx(
|
|
48
|
+
[styles[`${rootClassName}`]],
|
|
49
|
+
styles[`${rootClassName}--${variant}`],
|
|
50
|
+
styles[`${rootClassName}--${type}`],
|
|
51
|
+
className
|
|
52
|
+
);
|
|
47
53
|
const [open = true, setOpen] = reactUseControllableState.useControllableState({
|
|
48
54
|
prop: openProp,
|
|
49
55
|
defaultProp: defaultOpen,
|
|
@@ -7,7 +7,7 @@ export type RootProps = Omit<React.ComponentPropsWithoutRef<typeof Card>, 'varia
|
|
|
7
7
|
* The variant of the notification.
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
|
-
variant?: 'success' | 'error' | 'warning' | 'information' | 'beige' | 'teal' | 'gray';
|
|
10
|
+
variant?: 'success' | 'error' | 'warning' | 'information' | 'beige' | 'teal' | 'gray' | 'light-purple';
|
|
11
11
|
/**
|
|
12
12
|
* The tyoe of the notification.
|
|
13
13
|
*
|
|
@@ -73,7 +73,7 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<R
|
|
|
73
73
|
* The variant of the notification.
|
|
74
74
|
*
|
|
75
75
|
*/
|
|
76
|
-
variant?: "error" | "warning" | "beige" | "gray" | "teal" | "information" | "success" | undefined;
|
|
76
|
+
variant?: "error" | "warning" | "beige" | "gray" | "teal" | "information" | "success" | "light-purple" | undefined;
|
|
77
77
|
/**
|
|
78
78
|
* The tyoe of the notification.
|
|
79
79
|
*
|
|
@@ -5,26 +5,32 @@ import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
|
5
5
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
6
6
|
import { Card } from "../card/index.js";
|
|
7
7
|
const styles = {
|
|
8
|
-
"teddy-notification": "_teddy-
|
|
9
|
-
"teddy-notification--success": "_teddy-notification--
|
|
10
|
-
"teddy-notification--warning": "_teddy-notification--
|
|
11
|
-
"teddy-notification--error": "_teddy-notification--
|
|
12
|
-
"teddy-notification--information": "_teddy-notification--
|
|
13
|
-
"teddy-notification--beige": "_teddy-notification--
|
|
14
|
-
"teddy-notification--teal": "_teddy-notification--
|
|
15
|
-
"teddy-notification--gray": "_teddy-notification--
|
|
16
|
-
"teddy-notification--
|
|
17
|
-
"teddy-
|
|
18
|
-
"teddy-
|
|
19
|
-
"teddy-
|
|
20
|
-
"teddy-
|
|
21
|
-
"teddy-
|
|
8
|
+
"teddy-notification": "_teddy-notification_yr9vf_3",
|
|
9
|
+
"teddy-notification--success": "_teddy-notification--success_yr9vf_11",
|
|
10
|
+
"teddy-notification--warning": "_teddy-notification--warning_yr9vf_16",
|
|
11
|
+
"teddy-notification--error": "_teddy-notification--error_yr9vf_21",
|
|
12
|
+
"teddy-notification--information": "_teddy-notification--information_yr9vf_26",
|
|
13
|
+
"teddy-notification--beige": "_teddy-notification--beige_yr9vf_31",
|
|
14
|
+
"teddy-notification--teal": "_teddy-notification--teal_yr9vf_36",
|
|
15
|
+
"teddy-notification--gray": "_teddy-notification--gray_yr9vf_41",
|
|
16
|
+
"teddy-notification--light-purple": "_teddy-notification--light-purple_yr9vf_46",
|
|
17
|
+
"teddy-notification--tile": "_teddy-notification--tile_yr9vf_51",
|
|
18
|
+
"teddy-notification__text": "_teddy-notification__text_yr9vf_54",
|
|
19
|
+
"teddy-notification__dismiss": "_teddy-notification__dismiss_yr9vf_57",
|
|
20
|
+
"teddy-notification__heading": "_teddy-notification__heading_yr9vf_61",
|
|
21
|
+
"teddy-notification__footer": "_teddy-notification__footer_yr9vf_70",
|
|
22
|
+
"teddy-notification__icon": "_teddy-notification__icon_yr9vf_73"
|
|
22
23
|
};
|
|
23
24
|
const rootClassName = "teddy-notification";
|
|
24
25
|
const NotificationContext = React__default.createContext(void 0);
|
|
25
26
|
const Root = React__default.forwardRef(
|
|
26
27
|
({ className, open: openProp, defaultOpen, onOpenChange, variant, type, ...props }, forwardRef) => {
|
|
27
|
-
const classes = clsx(
|
|
28
|
+
const classes = clsx(
|
|
29
|
+
[styles[`${rootClassName}`]],
|
|
30
|
+
styles[`${rootClassName}--${variant}`],
|
|
31
|
+
styles[`${rootClassName}--${type}`],
|
|
32
|
+
className
|
|
33
|
+
);
|
|
28
34
|
const [open = true, setOpen] = useControllableState({
|
|
29
35
|
prop: openProp,
|
|
30
36
|
defaultProp: defaultOpen,
|
package/dist/style.css
CHANGED
|
@@ -6196,7 +6196,7 @@
|
|
|
6196
6196
|
}
|
|
6197
6197
|
}@layer heading, button, card, notification;
|
|
6198
6198
|
@layer notification {
|
|
6199
|
-
._teddy-
|
|
6199
|
+
._teddy-notification_yr9vf_3 {
|
|
6200
6200
|
--status-background: var(--teddy-color-background-status-success);
|
|
6201
6201
|
--status-color: var(--teddy-color-text-status-success-strong);
|
|
6202
6202
|
--status-icon-color: var(--teddy-color-text-status-success-strong);
|
|
@@ -6204,64 +6204,69 @@
|
|
|
6204
6204
|
background-color: var(--status-background);
|
|
6205
6205
|
gap: var(--teddy-spacing-50);
|
|
6206
6206
|
}
|
|
6207
|
-
._teddy-notification--
|
|
6207
|
+
._teddy-notification--success_yr9vf_11 {
|
|
6208
6208
|
--status-background: var(--teddy-color-background-status-success);
|
|
6209
6209
|
--status-color: var(--teddy-color-text-status-success-strong);
|
|
6210
6210
|
--status-icon-color: var(--teddy-color-text-status-success-strong);
|
|
6211
6211
|
}
|
|
6212
|
-
._teddy-notification--
|
|
6212
|
+
._teddy-notification--warning_yr9vf_16 {
|
|
6213
6213
|
--status-background: var(--teddy-color-background-status-warning);
|
|
6214
6214
|
--status-color: var(--teddy-color-text-status-warning-strong);
|
|
6215
6215
|
--status-icon-color: var(--teddy-color-text-status-warning-strong);
|
|
6216
6216
|
}
|
|
6217
|
-
._teddy-notification--
|
|
6217
|
+
._teddy-notification--error_yr9vf_21 {
|
|
6218
6218
|
--status-background: var(--teddy-color-background-status-error);
|
|
6219
6219
|
--status-color: var(--teddy-color-text-status-error-strong);
|
|
6220
6220
|
--status-icon-color: var(--teddy-color-text-status-error-strong);
|
|
6221
6221
|
}
|
|
6222
|
-
._teddy-notification--
|
|
6222
|
+
._teddy-notification--information_yr9vf_26 {
|
|
6223
6223
|
--status-background: var(--teddy-color-background-status-info);
|
|
6224
6224
|
--status-color: var(--teddy-color-text-status-info-strong);
|
|
6225
6225
|
--status-icon-color: var(--teddy-color-text-status-info-strong);
|
|
6226
6226
|
}
|
|
6227
|
-
._teddy-notification--
|
|
6227
|
+
._teddy-notification--beige_yr9vf_31 {
|
|
6228
6228
|
--status-background: var(--teddy-color-beige-50);
|
|
6229
6229
|
--status-color: var(--teddy-color-beige-700);
|
|
6230
6230
|
--status-icon-color: var(--teddy-color-beige-700e);
|
|
6231
6231
|
}
|
|
6232
|
-
._teddy-notification--
|
|
6232
|
+
._teddy-notification--teal_yr9vf_36 {
|
|
6233
6233
|
--status-background: var(--teddy-color-teal-50);
|
|
6234
6234
|
--status-color: var(--teddy-color-teal-700);
|
|
6235
6235
|
--status-icon-color: var(--teddy-color-teal-700);
|
|
6236
6236
|
}
|
|
6237
|
-
._teddy-notification--
|
|
6237
|
+
._teddy-notification--gray_yr9vf_41 {
|
|
6238
6238
|
--status-background: var(--teddy-color-gray-50);
|
|
6239
6239
|
--status-color: var(--teddy-color-gray-700);
|
|
6240
6240
|
--status-icon-color: var(--teddy-color-gray-700);
|
|
6241
6241
|
}
|
|
6242
|
-
._teddy-notification--
|
|
6242
|
+
._teddy-notification--light-purple_yr9vf_46 {
|
|
6243
|
+
--status-background: var(--teddy-color-purple-50);
|
|
6244
|
+
--status-color: var(--teddy-color-purple-800);
|
|
6245
|
+
--status-icon-color: var(--teddy-color-purple-800);
|
|
6246
|
+
}
|
|
6247
|
+
._teddy-notification--tile_yr9vf_51 {
|
|
6243
6248
|
display: flex !important;
|
|
6244
6249
|
}
|
|
6245
|
-
._teddy-notification--
|
|
6250
|
+
._teddy-notification--tile_yr9vf_51 ._teddy-notification__text_yr9vf_54 {
|
|
6246
6251
|
margin: 0 var(--teddy-spacing-400) 0 var(--teddy-spacing-100) !important;
|
|
6247
6252
|
}
|
|
6248
|
-
._teddy-
|
|
6253
|
+
._teddy-notification__dismiss_yr9vf_57 {
|
|
6249
6254
|
position: absolute;
|
|
6250
6255
|
inset: var(--teddy-spacing-50) var(--teddy-spacing-50) auto auto;
|
|
6251
6256
|
}
|
|
6252
|
-
._teddy-
|
|
6257
|
+
._teddy-notification__heading_yr9vf_61 {
|
|
6253
6258
|
color: var(--status-color);
|
|
6254
6259
|
display: flex;
|
|
6255
6260
|
align-items: center;
|
|
6256
6261
|
}
|
|
6257
|
-
._teddy-
|
|
6262
|
+
._teddy-notification__text_yr9vf_54 {
|
|
6258
6263
|
color: var(--status-color) !important;
|
|
6259
6264
|
margin: 0 var(--teddy-spacing-400) 0 calc(var(--teddy-spacing-400) + var(--teddy-spacing-100)) !important;
|
|
6260
6265
|
}
|
|
6261
|
-
._teddy-
|
|
6266
|
+
._teddy-notification__footer_yr9vf_70 {
|
|
6262
6267
|
margin-left: calc(var(--teddy-spacing-400) + var(--teddy-spacing-100));
|
|
6263
6268
|
}
|
|
6264
|
-
._teddy-
|
|
6269
|
+
._teddy-notification__icon_yr9vf_73 {
|
|
6265
6270
|
color: var(--status-icon-color);
|
|
6266
6271
|
margin-right: var(--teddy-spacing-100);
|
|
6267
6272
|
}
|