@justeattakeaway/pie-notification 0.9.2 → 0.9.3
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/custom-elements.json +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/react.d.ts +2 -2
- package/package.json +4 -4
- package/src/defs.ts +3 -3
package/custom-elements.json
CHANGED
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"type": {
|
|
83
83
|
"text": "DefaultProps"
|
|
84
84
|
},
|
|
85
|
-
"default": "{\n
|
|
85
|
+
"default": "{\n variant: 'neutral',\n position: 'inline-content',\n isDismissible: true,\n isCompact: false,\n headingLevel: 'h2',\n hideIcon: false,\n isOpen: true,\n hasStackedActions: false,\n}"
|
|
86
86
|
}
|
|
87
87
|
],
|
|
88
88
|
"exports": [
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
import type { CSSResult } from 'lit';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
4
|
import type { nothing } from 'lit';
|
|
@@ -25,7 +25,7 @@ export declare const componentClass = "c-notification";
|
|
|
25
25
|
|
|
26
26
|
export declare const componentSelector = "pie-notification";
|
|
27
27
|
|
|
28
|
-
export declare type DefaultProps =
|
|
28
|
+
export declare type DefaultProps = ComponentDefaultProps<NotificationProps, keyof Omit<NotificationProps, 'heading' | 'aria' | 'leadingAction' | 'supportingAction'>>;
|
|
29
29
|
|
|
30
30
|
export declare const defaultProps: DefaultProps;
|
|
31
31
|
|
package/dist/index.js
CHANGED
|
@@ -11,13 +11,13 @@ import "@justeattakeaway/pie-icons-webc/dist/IconCheckCircle.js";
|
|
|
11
11
|
import "@justeattakeaway/pie-icons-webc/dist/IconClose.js";
|
|
12
12
|
import "@justeattakeaway/pie-icons-webc/dist/IconInfoCircle.js";
|
|
13
13
|
const k = ["neutral", "neutral-alternative", "info", "success", "warning", "error"], w = ["h2", "h3", "h4", "h5", "h6"], A = ["inline-content", "full-width"], t = "pie-notification", h = "c-notification", E = `${t}-close`, z = `${t}-open`, S = `${t}-leading-action-click`, T = `${t}-supporting-action-click`, l = {
|
|
14
|
-
isOpen: !0,
|
|
15
14
|
variant: "neutral",
|
|
16
15
|
position: "inline-content",
|
|
17
16
|
isDismissible: !0,
|
|
18
17
|
isCompact: !1,
|
|
19
18
|
headingLevel: "h2",
|
|
20
19
|
hideIcon: !1,
|
|
20
|
+
isOpen: !0,
|
|
21
21
|
hasStackedActions: !1
|
|
22
22
|
}, B = `*,*:after,*:before{box-sizing:inherit}.c-notification{--notification-border-radius: var(--dt-radius-rounded-c);--notification-background-color: var(--dt-color-container-subtle);--notification-direction: column;--notification-heading-font-size: calc(var(--dt-font-heading-s-size--narrow) * 1px);--notification-heading-line-height: calc(var(--dt-font-heading-s-line-height--narrow) * 1px);--notification-font-size: calc(var(--dt-font-body-l-size) * 1px);--notification-line-height: calc(var(--dt-font-body-l-line-height) * 1px);--notification-close-icon-offset: var(--dt-spacing-b);--notification-icon-fill: var(--dt-color-content-default);--notification-icon-offset: 2px;--icon-size-override: 24px;padding:var(--dt-spacing-d);border-radius:var(--notification-border-radius);background-color:var(--notification-background-color);position:relative;display:flex;flex-direction:var(--notification-direction);gap:var(--dt-spacing-d);font-size:var(--notification-font-size);line-height:var(--notification-line-height)}.c-notification[isCompact]{--notification-direction: row}.c-notification[position=full-width]{--notification-border-radius: var(--dt-radius-rounded-none)}.c-notification[variant=neutral-alternative]{--notification-background-color: var(--dt-color-container-default)}.c-notification[variant=info]{--notification-background-color: var(--dt-color-support-info-02);--notification-icon-fill: var(--dt-color-blue)}.c-notification[variant=success]{--notification-background-color: var(--dt-color-support-positive-02);--notification-icon-fill: var(--dt-color-content-positive)}.c-notification[variant=warning]{--notification-background-color: var(--dt-color-support-warning-02)}.c-notification[variant=error]{--notification-background-color: var(--dt-color-support-error-02);--notification-icon-fill: var(--dt-color-support-error)}.c-notification-heading{margin:0;margin-block-end:var(--dt-spacing-a);font-size:var(--notification-heading-font-size);line-height:var(--notification-heading-line-height)}@media (min-width: 768px){.c-notification-heading{--notification-heading-font-size: calc(var(--dt-font-heading-s-size--wide) * 1px);--notification-heading-line-height: calc(var(--dt-font-heading-s-line-height--wide) * 1px)}}.c-notification-content-section{display:flex;flex-direction:row;gap:var(--dt-spacing-c)}.c-notification-content-section[isDismissible]{max-width:calc(100% - var(--notification-close-icon-offset) - 40px)}.c-notification-icon-close{position:absolute;inset-block-start:var(--notification-close-icon-offset);inset-inline-end:var(--notification-close-icon-offset)}.c-notification-footer{display:flex;flex-direction:row;justify-content:flex-end;gap:var(--dt-spacing-d)}.c-notification-footer[isCompact]{align-self:flex-end}@media (max-width: 768px){.c-notification-footer[isStacked]{flex-direction:column-reverse}}.icon,::slotted([slot=icon]){display:inline-flex;color:var(--notification-icon-fill);margin-block-start:var(--notification-icon-offset)}@media (max-width: 768px){.icon,::slotted([slot=icon]){margin-block-start:0}}
|
|
23
23
|
`;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
import type { CSSResult } from 'lit';
|
|
3
3
|
import type { LitElement } from 'lit';
|
|
4
4
|
import type { nothing } from 'lit';
|
|
@@ -26,7 +26,7 @@ export declare const componentClass = "c-notification";
|
|
|
26
26
|
|
|
27
27
|
export declare const componentSelector = "pie-notification";
|
|
28
28
|
|
|
29
|
-
export declare type DefaultProps =
|
|
29
|
+
export declare type DefaultProps = ComponentDefaultProps<NotificationProps, keyof Omit<NotificationProps, 'heading' | 'aria' | 'leadingAction' | 'supportingAction'>>;
|
|
30
30
|
|
|
31
31
|
export declare const defaultProps: DefaultProps;
|
|
32
32
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justeattakeaway/pie-notification",
|
|
3
3
|
"description": "PIE Design System Notification built using Web Components",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"cem-plugin-module-file-extensions": "0.0.5"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@justeattakeaway/pie-icon-button": "0.28.
|
|
45
|
-
"@justeattakeaway/pie-icons-webc": "0.24.
|
|
46
|
-
"@justeattakeaway/pie-webc-core": "0.
|
|
44
|
+
"@justeattakeaway/pie-icon-button": "0.28.9",
|
|
45
|
+
"@justeattakeaway/pie-icons-webc": "0.24.2",
|
|
46
|
+
"@justeattakeaway/pie-webc-core": "0.24.0"
|
|
47
47
|
},
|
|
48
48
|
"volta": {
|
|
49
49
|
"extends": "../../../package.json"
|
package/src/defs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ComponentDefaultProps } from '@justeattakeaway/pie-webc-core';
|
|
2
2
|
|
|
3
3
|
export const variants = ['neutral', 'neutral-alternative', 'info', 'success', 'warning', 'error'] as const;
|
|
4
4
|
export const headingLevels = ['h2', 'h3', 'h4', 'h5', 'h6'] as const;
|
|
@@ -116,15 +116,15 @@ export const ON_NOTIFICATION_LEADING_ACTION_CLICK_EVENT = `${componentSelector}-
|
|
|
116
116
|
*/
|
|
117
117
|
export const ON_NOTIFICATION_SUPPORTING_ACTION_CLICK_EVENT = `${componentSelector}-supporting-action-click`;
|
|
118
118
|
|
|
119
|
-
export type DefaultProps =
|
|
119
|
+
export type DefaultProps = ComponentDefaultProps<NotificationProps, keyof Omit<NotificationProps, 'heading' | 'aria' | 'leadingAction' | 'supportingAction'>>;
|
|
120
120
|
|
|
121
121
|
export const defaultProps: DefaultProps = {
|
|
122
|
-
isOpen: true,
|
|
123
122
|
variant: 'neutral',
|
|
124
123
|
position: 'inline-content',
|
|
125
124
|
isDismissible: true,
|
|
126
125
|
isCompact: false,
|
|
127
126
|
headingLevel: 'h2',
|
|
128
127
|
hideIcon: false,
|
|
128
|
+
isOpen: true,
|
|
129
129
|
hasStackedActions: false,
|
|
130
130
|
};
|