@carbon/ibm-products-web-components 0.18.0-rc.0 → 0.19.0-rc.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/custom-elements.json +509 -0
- package/es/components/about-modal/about-modal.scss.js +1 -1
- package/es/components/notification-panel/_story-assets/unread-notification-bell.d.ts +3 -0
- package/es/components/notification-panel/_story-assets/unread-notification-bell.js +45 -0
- package/es/components/notification-panel/_story-assets/unread-notification-bell.js.map +1 -0
- package/es/components/notification-panel/date-time-context.d.ts +9 -0
- package/es/components/notification-panel/date-time-context.js +19 -0
- package/es/components/notification-panel/date-time-context.js.map +1 -0
- package/es/components/notification-panel/defs.d.ts +8 -0
- package/es/components/notification-panel/defs.js +8 -0
- package/es/components/notification-panel/defs.js.map +1 -0
- package/es/components/notification-panel/index.d.ts +11 -0
- package/es/components/notification-panel/index.js +11 -0
- package/es/components/notification-panel/index.js.map +1 -0
- package/es/components/notification-panel/notification-footer.d.ts +389 -0
- package/es/components/notification-panel/notification-footer.js +119 -0
- package/es/components/notification-panel/notification-footer.js.map +1 -0
- package/es/components/notification-panel/notification-footer.scss.js +13 -0
- package/es/components/notification-panel/notification-footer.scss.js.map +1 -0
- package/es/components/notification-panel/notification-panel.d.ts +458 -0
- package/es/components/notification-panel/notification-panel.js +414 -0
- package/es/components/notification-panel/notification-panel.js.map +1 -0
- package/es/components/notification-panel/notification-panel.scss.js +13 -0
- package/es/components/notification-panel/notification-panel.scss.js.map +1 -0
- package/es/components/notification-panel/notification-panel.test.d.ts +7 -0
- package/es/components/notification-panel/notification-panel.test.js +30 -0
- package/es/components/notification-panel/notification-panel.test.js.map +1 -0
- package/es/components/notification-panel/notification.d.ts +405 -0
- package/es/components/notification-panel/notification.js +178 -0
- package/es/components/notification-panel/notification.js.map +1 -0
- package/es/components/notification-panel/notification.scss.js +13 -0
- package/es/components/notification-panel/notification.scss.js.map +1 -0
- package/es/components/page-header/index.d.ts +14 -0
- package/es/components/page-header/index.js +14 -0
- package/es/components/page-header/index.js.map +1 -0
- package/es/components/page-header/page-header-breadcrumb.d.ts +35 -0
- package/es/components/page-header/page-header-breadcrumb.js +94 -0
- package/es/components/page-header/page-header-breadcrumb.js.map +1 -0
- package/es/components/page-header/page-header-content-text.d.ts +22 -0
- package/es/components/page-header/page-header-content-text.js +56 -0
- package/es/components/page-header/page-header-content-text.js.map +1 -0
- package/es/components/page-header/page-header-content.d.ts +41 -0
- package/es/components/page-header/page-header-content.js +131 -0
- package/es/components/page-header/page-header-content.js.map +1 -0
- package/es/components/page-header/page-header-hero-image.d.ts +18 -0
- package/es/components/page-header/page-header-hero-image.js +38 -0
- package/es/components/page-header/page-header-hero-image.js.map +1 -0
- package/es/components/page-header/page-header-tabs.d.ts +18 -0
- package/es/components/page-header/page-header-tabs.js +47 -0
- package/es/components/page-header/page-header-tabs.js.map +1 -0
- package/es/components/page-header/page-header.d.ts +18 -0
- package/es/components/page-header/page-header.js +38 -0
- package/es/components/page-header/page-header.js.map +1 -0
- package/es/components/page-header/page-header.scss.js +13 -0
- package/es/components/page-header/page-header.scss.js.map +1 -0
- package/es/components/page-header/page-header.test.d.ts +1 -0
- package/es/components/page-header/page-header.test.js +207 -0
- package/es/components/page-header/page-header.test.js.map +1 -0
- package/es/components/side-panel/side-panel.d.ts +4 -0
- package/es/components/side-panel/side-panel.js +21 -12
- package/es/components/side-panel/side-panel.js.map +1 -1
- package/es/components/side-panel/side-panel.scss.js +1 -1
- package/es/components/side-panel/side-panel.test.js +21 -0
- package/es/components/side-panel/side-panel.test.js.map +1 -1
- package/es/components/tearsheet/tearsheet.scss.js +1 -1
- package/es/globals/internal/storybook-cdn.js +1 -1
- package/es/globals/js/utils/getSupportedLocale.d.ts +12 -0
- package/es/globals/js/utils/getSupportedLocale.js +35 -0
- package/es/globals/js/utils/getSupportedLocale.js.map +1 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +6 -0
- package/es/index.js.map +1 -1
- package/es/node_modules/@carbon/utilities/es/dateTimeFormat/index.js +13 -0
- package/es/node_modules/@carbon/utilities/es/dateTimeFormat/index.js.map +1 -0
- package/es/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js +11 -0
- package/es/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js.map +1 -0
- package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js +9 -0
- package/es/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +1 -0
- package/es/{package.json.js → packages/ibm-products-web-components/package.json.js} +1 -1
- package/es-custom/components/about-modal/about-modal.scss.js +1 -1
- package/es-custom/components/notification-panel/_story-assets/unread-notification-bell.d.ts +3 -0
- package/es-custom/components/notification-panel/_story-assets/unread-notification-bell.js +45 -0
- package/es-custom/components/notification-panel/_story-assets/unread-notification-bell.js.map +1 -0
- package/es-custom/components/notification-panel/date-time-context.d.ts +9 -0
- package/es-custom/components/notification-panel/date-time-context.js +19 -0
- package/es-custom/components/notification-panel/date-time-context.js.map +1 -0
- package/es-custom/components/notification-panel/defs.d.ts +8 -0
- package/es-custom/components/notification-panel/defs.js +8 -0
- package/es-custom/components/notification-panel/defs.js.map +1 -0
- package/es-custom/components/notification-panel/index.d.ts +11 -0
- package/es-custom/components/notification-panel/index.js +11 -0
- package/es-custom/components/notification-panel/index.js.map +1 -0
- package/es-custom/components/notification-panel/notification-footer.d.ts +389 -0
- package/es-custom/components/notification-panel/notification-footer.js +119 -0
- package/es-custom/components/notification-panel/notification-footer.js.map +1 -0
- package/es-custom/components/notification-panel/notification-footer.scss.js +13 -0
- package/es-custom/components/notification-panel/notification-footer.scss.js.map +1 -0
- package/es-custom/components/notification-panel/notification-panel.d.ts +458 -0
- package/es-custom/components/notification-panel/notification-panel.js +414 -0
- package/es-custom/components/notification-panel/notification-panel.js.map +1 -0
- package/es-custom/components/notification-panel/notification-panel.scss.js +13 -0
- package/es-custom/components/notification-panel/notification-panel.scss.js.map +1 -0
- package/es-custom/components/notification-panel/notification-panel.test.d.ts +7 -0
- package/es-custom/components/notification-panel/notification-panel.test.js +30 -0
- package/es-custom/components/notification-panel/notification-panel.test.js.map +1 -0
- package/es-custom/components/notification-panel/notification.d.ts +405 -0
- package/es-custom/components/notification-panel/notification.js +178 -0
- package/es-custom/components/notification-panel/notification.js.map +1 -0
- package/es-custom/components/notification-panel/notification.scss.js +13 -0
- package/es-custom/components/notification-panel/notification.scss.js.map +1 -0
- package/es-custom/components/page-header/index.d.ts +14 -0
- package/es-custom/components/page-header/index.js +14 -0
- package/es-custom/components/page-header/index.js.map +1 -0
- package/es-custom/components/page-header/page-header-breadcrumb.d.ts +35 -0
- package/es-custom/components/page-header/page-header-breadcrumb.js +94 -0
- package/es-custom/components/page-header/page-header-breadcrumb.js.map +1 -0
- package/es-custom/components/page-header/page-header-content-text.d.ts +22 -0
- package/es-custom/components/page-header/page-header-content-text.js +56 -0
- package/es-custom/components/page-header/page-header-content-text.js.map +1 -0
- package/es-custom/components/page-header/page-header-content.d.ts +41 -0
- package/es-custom/components/page-header/page-header-content.js +131 -0
- package/es-custom/components/page-header/page-header-content.js.map +1 -0
- package/es-custom/components/page-header/page-header-hero-image.d.ts +18 -0
- package/es-custom/components/page-header/page-header-hero-image.js +38 -0
- package/es-custom/components/page-header/page-header-hero-image.js.map +1 -0
- package/es-custom/components/page-header/page-header-tabs.d.ts +18 -0
- package/es-custom/components/page-header/page-header-tabs.js +47 -0
- package/es-custom/components/page-header/page-header-tabs.js.map +1 -0
- package/es-custom/components/page-header/page-header.d.ts +18 -0
- package/es-custom/components/page-header/page-header.js +38 -0
- package/es-custom/components/page-header/page-header.js.map +1 -0
- package/es-custom/components/page-header/page-header.scss.js +13 -0
- package/es-custom/components/page-header/page-header.scss.js.map +1 -0
- package/es-custom/components/page-header/page-header.test.d.ts +1 -0
- package/es-custom/components/page-header/page-header.test.js +207 -0
- package/es-custom/components/page-header/page-header.test.js.map +1 -0
- package/es-custom/components/side-panel/side-panel.d.ts +4 -0
- package/es-custom/components/side-panel/side-panel.js +21 -12
- package/es-custom/components/side-panel/side-panel.js.map +1 -1
- package/es-custom/components/side-panel/side-panel.scss.js +1 -1
- package/es-custom/components/side-panel/side-panel.test.js +21 -0
- package/es-custom/components/side-panel/side-panel.test.js.map +1 -1
- package/es-custom/components/tearsheet/tearsheet.scss.js +1 -1
- package/es-custom/globals/internal/storybook-cdn.js +1 -1
- package/es-custom/globals/js/utils/getSupportedLocale.d.ts +12 -0
- package/es-custom/globals/js/utils/getSupportedLocale.js +35 -0
- package/es-custom/globals/js/utils/getSupportedLocale.js.map +1 -0
- package/es-custom/index.d.ts +6 -0
- package/es-custom/index.js +6 -0
- package/es-custom/index.js.map +1 -1
- package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/index.js +13 -0
- package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/index.js.map +1 -0
- package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js +11 -0
- package/es-custom/node_modules/@carbon/utilities/es/dateTimeFormat/relative.js.map +1 -0
- package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js +9 -0
- package/es-custom/node_modules/@carbon/utilities/es/documentLang/documentLang.js.map +1 -0
- package/es-custom/{package.json.js → packages/ibm-products-web-components/package.json.js} +1 -1
- package/lib/components/notification-panel/_story-assets/unread-notification-bell.d.ts +3 -0
- package/lib/components/notification-panel/date-time-context.d.ts +9 -0
- package/lib/components/notification-panel/defs.d.ts +8 -0
- package/lib/components/notification-panel/defs.js +10 -0
- package/lib/components/notification-panel/defs.js.map +1 -0
- package/lib/components/notification-panel/index.d.ts +11 -0
- package/lib/components/notification-panel/notification-footer.d.ts +389 -0
- package/lib/components/notification-panel/notification-panel.d.ts +458 -0
- package/lib/components/notification-panel/notification-panel.test.d.ts +7 -0
- package/lib/components/notification-panel/notification.d.ts +405 -0
- package/lib/components/page-header/index.d.ts +14 -0
- package/lib/components/page-header/page-header-breadcrumb.d.ts +35 -0
- package/lib/components/page-header/page-header-content-text.d.ts +22 -0
- package/lib/components/page-header/page-header-content.d.ts +41 -0
- package/lib/components/page-header/page-header-hero-image.d.ts +18 -0
- package/lib/components/page-header/page-header-tabs.d.ts +18 -0
- package/lib/components/page-header/page-header.d.ts +18 -0
- package/lib/components/page-header/page-header.test.d.ts +1 -0
- package/lib/components/side-panel/side-panel.d.ts +4 -0
- package/lib/globals/js/utils/getSupportedLocale.d.ts +12 -0
- package/lib/globals/js/utils/getSupportedLocale.js +37 -0
- package/lib/globals/js/utils/getSupportedLocale.js.map +1 -0
- package/lib/index.d.ts +6 -0
- package/package.json +12 -11
- package/scss/components/notification-panel/notification-footer.scss +65 -0
- package/scss/components/notification-panel/notification-panel.scss +59 -0
- package/scss/components/notification-panel/notification.scss +147 -0
- package/scss/components/notification-panel/story-styles.scss +116 -0
- package/scss/components/page-header/page-header.scss +288 -0
- /package/es/{package.json.js.map → packages/ibm-products-web-components/package.json.js.map} +0 -0
- /package/es-custom/{package.json.js.map → packages/ibm-products-web-components/package.json.js.map} +0 -0
@@ -0,0 +1,414 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { __decorate } from 'tslib';
|
9
|
+
import { LitElement, html } from 'lit';
|
10
|
+
import { property, query, state, queryAssignedElements } from 'lit/decorators.js';
|
11
|
+
import { provide } from '@lit/context';
|
12
|
+
import { prefix } from '../../globals/settings.js';
|
13
|
+
import HostListener from '@carbon/web-components/es/globals/decorators/host-listener.js';
|
14
|
+
import HostListenerMixin from '@carbon/web-components/es/globals/mixins/host-listener.js';
|
15
|
+
import styles from './notification-panel.scss.js';
|
16
|
+
import { selectorTabbable } from '@carbon/web-components/es/globals/settings.js';
|
17
|
+
import { carbonElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
18
|
+
import { classMap } from 'lit/directives/class-map.js';
|
19
|
+
import { dateTimeLocaleContext } from './date-time-context.js';
|
20
|
+
import '@carbon/web-components/es-custom/components/button/index.js';
|
21
|
+
import '@carbon/web-components/es-custom/components/toggle/index.js';
|
22
|
+
import '@carbon/web-components/es-custom/components/icon-button/index.js';
|
23
|
+
|
24
|
+
/**
|
25
|
+
* @license
|
26
|
+
*
|
27
|
+
* Copyright IBM Corp. 2023, 2024
|
28
|
+
*
|
29
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
31
|
+
*/
|
32
|
+
const blockClass = `${prefix}--notifications-panel`;
|
33
|
+
/**
|
34
|
+
* NotificationPanel.
|
35
|
+
*
|
36
|
+
* @element c4p-notification-panel
|
37
|
+
* @csspart dialog The dialog.
|
38
|
+
* @slot today - Today Section.
|
39
|
+
* @slot previous - Previous Section.
|
40
|
+
* @slot footer - Footer for the Panel.
|
41
|
+
* @fires c4p-notification-panel-beingclosed - The custom event before notification-panel is closed.
|
42
|
+
* @fires c4p-notification-dismiss-all - The custom event fired after notification-panel is closed upon a user gesture.
|
43
|
+
* @fires c4p-notification-donot-disturb-change - The custom event fired after notification-panel is closed upon a user gesture.
|
44
|
+
* @fires c4p-notification-click-outside - The custom event fired after user clicks outside the panel or Esc key is pressed.
|
45
|
+
*/
|
46
|
+
let CDSNotificationPanel = class CDSNotificationPanel extends HostListenerMixin(LitElement) {
|
47
|
+
constructor() {
|
48
|
+
super(...arguments);
|
49
|
+
/**
|
50
|
+
* Determines whether the notifications panel should render or not
|
51
|
+
*/
|
52
|
+
this.open = false;
|
53
|
+
this._hasTodayContent = true;
|
54
|
+
this._hasPreviousContent = true;
|
55
|
+
this._handleKeydown = ({ key, target }) => {
|
56
|
+
var _a;
|
57
|
+
if (key === 'Escape') {
|
58
|
+
this.open = false;
|
59
|
+
const init = {
|
60
|
+
bubbles: true,
|
61
|
+
cancelable: true,
|
62
|
+
composed: true,
|
63
|
+
detail: {
|
64
|
+
triggeredBy: target,
|
65
|
+
},
|
66
|
+
};
|
67
|
+
this.dispatchEvent(new CustomEvent(this.constructor.eventClickOutside, init));
|
68
|
+
(_a = this.triggerButtonRef) === null || _a === void 0 ? void 0 : _a.focus();
|
69
|
+
}
|
70
|
+
};
|
71
|
+
// Use @HostListener for global document click events
|
72
|
+
this._handleClick = (event) => {
|
73
|
+
var _a, _b;
|
74
|
+
const target = event.target;
|
75
|
+
if (!this.open || this.contains(target)) {
|
76
|
+
return;
|
77
|
+
}
|
78
|
+
// Check if the target is an actionable element
|
79
|
+
const actionableSelectors = [
|
80
|
+
'a',
|
81
|
+
'button',
|
82
|
+
'input',
|
83
|
+
'select',
|
84
|
+
'textarea',
|
85
|
+
'[role="button"]',
|
86
|
+
'[role="link"]',
|
87
|
+
'[tabindex]:not([tabindex="-1"]',
|
88
|
+
'cds-custom-button',
|
89
|
+
'cds-custom-link',
|
90
|
+
'cds-custom-accordion-item',
|
91
|
+
'cds-custom-breadcrumb-item',
|
92
|
+
'cds-custom-icon-button',
|
93
|
+
'cds-custom-checkbox',
|
94
|
+
'cds-custom-dropdown',
|
95
|
+
'cds-custom-dropdown-item',
|
96
|
+
'cds-custom-file-uploader',
|
97
|
+
'cds-custom-file-uploader-button',
|
98
|
+
'cds-custom-menu-button',
|
99
|
+
'cds-custom-menu',
|
100
|
+
'cds-custom-menu-item',
|
101
|
+
'cds-custom-multi-select',
|
102
|
+
'cds-custom-multi-select-item',
|
103
|
+
'cds-custom-number-input',
|
104
|
+
'cds-custom-overflow-menu',
|
105
|
+
'cds-custom-overflow-menu-body',
|
106
|
+
'cds-custom-overflow-menu-item',
|
107
|
+
'cds-custom-pagination',
|
108
|
+
'cds-custom-select-item',
|
109
|
+
'cds-custom-radio-button',
|
110
|
+
'cds-custom-search',
|
111
|
+
'cds-custom-select',
|
112
|
+
'cds-custom-slider',
|
113
|
+
'cds-custom-slider-input',
|
114
|
+
'cds-custom-tabs',
|
115
|
+
'cds-custom-tab',
|
116
|
+
'cds-custom-textarea',
|
117
|
+
'cds-custom-text-input',
|
118
|
+
'cds-custom-time-picker',
|
119
|
+
'cds-custom-time-picker-select',
|
120
|
+
'cds-custom-select-item',
|
121
|
+
'cds-custom-toggle',
|
122
|
+
'cds-custom-toggletip',
|
123
|
+
];
|
124
|
+
const isActionable = actionableSelectors.some((selector) => {
|
125
|
+
if (!(target instanceof Element)) {
|
126
|
+
return false;
|
127
|
+
}
|
128
|
+
if (target.closest(selector)) {
|
129
|
+
return true;
|
130
|
+
}
|
131
|
+
const root = target.getRootNode();
|
132
|
+
return (root instanceof ShadowRoot &&
|
133
|
+
root.host instanceof Element &&
|
134
|
+
root.host.matches(selector));
|
135
|
+
});
|
136
|
+
if (this.open && ((_a = this.triggerButtonRef) === null || _a === void 0 ? void 0 : _a.contains(target))) {
|
137
|
+
return;
|
138
|
+
}
|
139
|
+
const init = {
|
140
|
+
bubbles: true,
|
141
|
+
cancelable: true,
|
142
|
+
composed: true,
|
143
|
+
detail: {
|
144
|
+
triggeredBy: target,
|
145
|
+
},
|
146
|
+
};
|
147
|
+
if (this.dispatchEvent(new CustomEvent(this.constructor.eventBeforeClose, init))) {
|
148
|
+
this.open = false;
|
149
|
+
this.dispatchEvent(new CustomEvent(this.constructor.eventClickOutside, init));
|
150
|
+
if (!isActionable) {
|
151
|
+
(_b = this.triggerButtonRef) === null || _b === void 0 ? void 0 : _b.focus();
|
152
|
+
}
|
153
|
+
}
|
154
|
+
};
|
155
|
+
}
|
156
|
+
willUpdate(changedProperties) {
|
157
|
+
if (changedProperties.has('dateTimeLocale')) {
|
158
|
+
this._providedLocale = this.dateTimeLocale;
|
159
|
+
}
|
160
|
+
if (changedProperties.has('_todayElements') ||
|
161
|
+
changedProperties.has('_previousElements')) {
|
162
|
+
this._hasTodayContent = this._todayElements.length > 0;
|
163
|
+
this._hasPreviousContent = this._previousElements.length > 0;
|
164
|
+
}
|
165
|
+
}
|
166
|
+
firstUpdated() {
|
167
|
+
var _a, _b, _c;
|
168
|
+
(_a = this.todaySlot) === null || _a === void 0 ? void 0 : _a.addEventListener('slotchange', () => this._handleSlotChange('today'));
|
169
|
+
(_b = this.previousSlot) === null || _b === void 0 ? void 0 : _b.addEventListener('slotchange', () => this._handleSlotChange('previous'));
|
170
|
+
this._markFirstNotification();
|
171
|
+
const slot = (_c = this.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector('slot[name="previous"]');
|
172
|
+
const slottedElements = (slot === null || slot === void 0 ? void 0 : slot.assignedElements({ flatten: true })) || [];
|
173
|
+
for (const el of slottedElements) {
|
174
|
+
el.addEventListener('mouseenter', () => {
|
175
|
+
this._handleMouseEnter(el);
|
176
|
+
});
|
177
|
+
el.addEventListener('mouseleave', () => {
|
178
|
+
this._handleMouseLeave(el);
|
179
|
+
});
|
180
|
+
}
|
181
|
+
}
|
182
|
+
updated() {
|
183
|
+
this._markFirstNotification();
|
184
|
+
if (this.open) {
|
185
|
+
requestAnimationFrame(() => this._tryFocusDismissButton());
|
186
|
+
}
|
187
|
+
}
|
188
|
+
render() {
|
189
|
+
const { titleText, todayText, previousText, dismissAllLabel, doNotDisturbLabel, open, _hasTodayContent, _hasPreviousContent, _onDismissAllNotifications: onDismissAllNotifications, _handleToggle: handleToggle, } = this;
|
190
|
+
const classes = classMap({
|
191
|
+
[`${blockClass}__container`]: true,
|
192
|
+
[`${blockClass}__entrance`]: open,
|
193
|
+
[`${blockClass}__exit`]: !open,
|
194
|
+
});
|
195
|
+
return html `
|
196
|
+
<div role="dialog" tabindex="0" class=${classes}>
|
197
|
+
<div class="${blockClass}__header-container">
|
198
|
+
<div class="${blockClass}__header-flex">
|
199
|
+
<h2 class="${blockClass}__header">${titleText}</h2>
|
200
|
+
<cds-custom-button
|
201
|
+
size="sm"
|
202
|
+
kind="ghost"
|
203
|
+
class="${blockClass}__dismiss-button"
|
204
|
+
@click=${onDismissAllNotifications}
|
205
|
+
>
|
206
|
+
${dismissAllLabel}
|
207
|
+
</cds-custom-button>
|
208
|
+
</div>
|
209
|
+
<cds-custom-toggle
|
210
|
+
size="sm"
|
211
|
+
class="${blockClass}__do-not-disturb-toggle"
|
212
|
+
id="${blockClass}__do-not-disturb-toggle-component"
|
213
|
+
label-a=${doNotDisturbLabel}
|
214
|
+
label-b=${doNotDisturbLabel}
|
215
|
+
aria-label=${doNotDisturbLabel}
|
216
|
+
@cds-custom-toggle-changed=${handleToggle}
|
217
|
+
></cds-custom-toggle>
|
218
|
+
</div>
|
219
|
+
<div class="${blockClass}__main-section">
|
220
|
+
${_hasTodayContent
|
221
|
+
? html `
|
222
|
+
<h3 class="${blockClass}__time-section-label">${todayText}</h3>
|
223
|
+
`
|
224
|
+
: ''}
|
225
|
+
<slot name="today"></slot>
|
226
|
+
${_hasPreviousContent
|
227
|
+
? html `
|
228
|
+
<h3 class="${blockClass}__time-section-label">
|
229
|
+
${previousText}
|
230
|
+
</h3>
|
231
|
+
`
|
232
|
+
: ''}
|
233
|
+
<slot name="previous"></slot>
|
234
|
+
</div>
|
235
|
+
<div class="${blockClass}__bottom-actions-container">
|
236
|
+
<slot name="footer"></slot>
|
237
|
+
</div>
|
238
|
+
</div>
|
239
|
+
`;
|
240
|
+
}
|
241
|
+
disconnectedCallback() {
|
242
|
+
var _a;
|
243
|
+
super.disconnectedCallback();
|
244
|
+
(_a = this._mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
245
|
+
}
|
246
|
+
_handleMouseEnter(el) {
|
247
|
+
const next = el.nextElementSibling;
|
248
|
+
if ((next === null || next === void 0 ? void 0 : next.tagName.toLowerCase()) === 'c4p-notification') {
|
249
|
+
next.classList.add(`${blockClass}__notification--next`);
|
250
|
+
}
|
251
|
+
}
|
252
|
+
_handleMouseLeave(el) {
|
253
|
+
const next = el.nextElementSibling;
|
254
|
+
if ((next === null || next === void 0 ? void 0 : next.tagName.toLowerCase()) === 'c4p-notification') {
|
255
|
+
next.classList.remove(`${blockClass}__notification--next`);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
_markFirstNotification() {
|
259
|
+
const notifications = this.querySelectorAll(`${prefix}-notification`);
|
260
|
+
notifications.forEach((el, i) => {
|
261
|
+
el.classList.toggle('first-notification', i === 0);
|
262
|
+
});
|
263
|
+
}
|
264
|
+
_handleSlotChange(slotName) {
|
265
|
+
slotName === 'today'
|
266
|
+
? (this._hasTodayContent = this._todayElements.length > 0)
|
267
|
+
: (this._hasPreviousContent = this._previousElements.length > 0);
|
268
|
+
}
|
269
|
+
_tryFocusDismissButton() {
|
270
|
+
var _a;
|
271
|
+
const button = this.renderRoot.querySelector(`.${blockClass}__dismiss-button`);
|
272
|
+
if (button) {
|
273
|
+
button.focus();
|
274
|
+
}
|
275
|
+
else {
|
276
|
+
(_a = this._mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
277
|
+
this._mutationObserver = new MutationObserver(() => {
|
278
|
+
var _a;
|
279
|
+
const btn = this.renderRoot.querySelector(`.${blockClass}__dismiss-button`);
|
280
|
+
if (btn) {
|
281
|
+
btn.focus();
|
282
|
+
(_a = this._mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
283
|
+
}
|
284
|
+
});
|
285
|
+
this._mutationObserver.observe(this.renderRoot, {
|
286
|
+
childList: true,
|
287
|
+
subtree: true,
|
288
|
+
});
|
289
|
+
}
|
290
|
+
}
|
291
|
+
/**
|
292
|
+
* Handles user-initiated dismiss of all notifications.
|
293
|
+
*
|
294
|
+
* @param event The event that triggered the click.
|
295
|
+
*/
|
296
|
+
_onDismissAllNotifications(event) {
|
297
|
+
const triggeredBy = event.target;
|
298
|
+
event.stopPropagation();
|
299
|
+
const init = {
|
300
|
+
bubbles: true,
|
301
|
+
cancelable: true,
|
302
|
+
composed: true,
|
303
|
+
detail: {
|
304
|
+
triggeredBy,
|
305
|
+
},
|
306
|
+
};
|
307
|
+
this.dispatchEvent(new CustomEvent(this.constructor.eventDismissAll, init));
|
308
|
+
}
|
309
|
+
_handleToggle(event) {
|
310
|
+
const triggeredBy = event.target;
|
311
|
+
const init = {
|
312
|
+
bubbles: true,
|
313
|
+
cancelable: true,
|
314
|
+
composed: true,
|
315
|
+
detail: {
|
316
|
+
triggeredBy,
|
317
|
+
},
|
318
|
+
};
|
319
|
+
this.dispatchEvent(new CustomEvent(this.constructor.eventDonotDisturbChange, init));
|
320
|
+
}
|
321
|
+
/**
|
322
|
+
* A selector selecting tabbable nodes.
|
323
|
+
*/
|
324
|
+
static get selectorTabbable() {
|
325
|
+
return selectorTabbable;
|
326
|
+
}
|
327
|
+
/**
|
328
|
+
* The name of the custom event fired before this notification-panel is being closed upon a user gesture.
|
329
|
+
* Cancellation of this event stops the user-initiated action of closing this notification-panel.
|
330
|
+
*/
|
331
|
+
static get eventBeforeClose() {
|
332
|
+
return `${prefix}-notification-panel-beingclosed`;
|
333
|
+
}
|
334
|
+
/**
|
335
|
+
* The name of the custom event fired after this notification-panel is closed upon a user gesture.
|
336
|
+
*/
|
337
|
+
static get eventClickOutside() {
|
338
|
+
return `${prefix}-notification-click-outside`;
|
339
|
+
}
|
340
|
+
/**
|
341
|
+
* The name of the custom event fired after this notification-panel is closed upon a user gesture.
|
342
|
+
*/
|
343
|
+
static get eventDismissAll() {
|
344
|
+
return `${prefix}-notification-dismiss-all`;
|
345
|
+
}
|
346
|
+
/**
|
347
|
+
* The name of the custom event fired after this do not disturb button toggled.
|
348
|
+
*/
|
349
|
+
static get eventDonotDisturbChange() {
|
350
|
+
return `${prefix}-notification-donot-disturb-change`;
|
351
|
+
}
|
352
|
+
};
|
353
|
+
CDSNotificationPanel.styles = styles; // `styles` here is a `CSSResult` generated by custom WebPack loader
|
354
|
+
__decorate([
|
355
|
+
property({ type: String, attribute: 'title-text' })
|
356
|
+
], CDSNotificationPanel.prototype, "titleText", void 0);
|
357
|
+
__decorate([
|
358
|
+
property({ type: String, attribute: 'today-text' })
|
359
|
+
], CDSNotificationPanel.prototype, "todayText", void 0);
|
360
|
+
__decorate([
|
361
|
+
property({ type: String, attribute: 'previous-text' })
|
362
|
+
], CDSNotificationPanel.prototype, "previousText", void 0);
|
363
|
+
__decorate([
|
364
|
+
property({ reflect: true, type: Boolean })
|
365
|
+
], CDSNotificationPanel.prototype, "open", void 0);
|
366
|
+
__decorate([
|
367
|
+
property({ type: String, attribute: 'dismiss-all-label' })
|
368
|
+
], CDSNotificationPanel.prototype, "dismissAllLabel", void 0);
|
369
|
+
__decorate([
|
370
|
+
property({ type: String, attribute: 'donot-disturb-label' })
|
371
|
+
], CDSNotificationPanel.prototype, "doNotDisturbLabel", void 0);
|
372
|
+
__decorate([
|
373
|
+
property({ type: Object })
|
374
|
+
], CDSNotificationPanel.prototype, "triggerButtonRef", void 0);
|
375
|
+
__decorate([
|
376
|
+
property({ type: String, attribute: 'date-time-locale' })
|
377
|
+
], CDSNotificationPanel.prototype, "dateTimeLocale", void 0);
|
378
|
+
__decorate([
|
379
|
+
provide({ context: dateTimeLocaleContext })
|
380
|
+
// @ts-ignore
|
381
|
+
], CDSNotificationPanel.prototype, "_providedLocale", void 0);
|
382
|
+
__decorate([
|
383
|
+
query('slot[name="today"]')
|
384
|
+
], CDSNotificationPanel.prototype, "todaySlot", void 0);
|
385
|
+
__decorate([
|
386
|
+
query('slot[name="previous"]')
|
387
|
+
], CDSNotificationPanel.prototype, "previousSlot", void 0);
|
388
|
+
__decorate([
|
389
|
+
state() // Use @state decorator
|
390
|
+
], CDSNotificationPanel.prototype, "_hasTodayContent", void 0);
|
391
|
+
__decorate([
|
392
|
+
state() // Use @state decorator
|
393
|
+
], CDSNotificationPanel.prototype, "_hasPreviousContent", void 0);
|
394
|
+
__decorate([
|
395
|
+
queryAssignedElements({ slot: 'today', flatten: true })
|
396
|
+
], CDSNotificationPanel.prototype, "_todayElements", void 0);
|
397
|
+
__decorate([
|
398
|
+
queryAssignedElements({ slot: 'previous', flatten: true })
|
399
|
+
], CDSNotificationPanel.prototype, "_previousElements", void 0);
|
400
|
+
__decorate([
|
401
|
+
HostListener('keydown')
|
402
|
+
// @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to
|
403
|
+
], CDSNotificationPanel.prototype, "_handleKeydown", void 0);
|
404
|
+
__decorate([
|
405
|
+
HostListener('document:click')
|
406
|
+
// @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to
|
407
|
+
], CDSNotificationPanel.prototype, "_handleClick", void 0);
|
408
|
+
CDSNotificationPanel = __decorate([
|
409
|
+
carbonElement(`${prefix}-notification-panel`)
|
410
|
+
], CDSNotificationPanel);
|
411
|
+
var CDSNotificationPanel$1 = CDSNotificationPanel;
|
412
|
+
|
413
|
+
export { CDSNotificationPanel$1 as default };
|
414
|
+
//# sourceMappingURL=notification-panel.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"notification-panel.js","sources":["../../../src/components/notification-panel/notification-panel.ts"],"sourcesContent":[null],"names":["customElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAsBH,MAAM,UAAU,GAAG,CAAG,EAAA,MAAM,uBAAuB;AACnD;;;;;;;;;;;;AAYG;AAEH,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,iBAAiB,CAAC,UAAU,CAAC,CAAA;AAAhE,IAAA,WAAA,GAAA;;AAgBE;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAG,KAAK;QAgCJ,IAAgB,CAAA,gBAAA,GAAG,IAAI;QAGvB,IAAmB,CAAA,mBAAA,GAAG,IAAI;QAuN1B,IAAc,CAAA,cAAA,GAAG,CAAC,EAAE,GAAG,EAAE,MAAM,EAAiB,KAAI;;AAC1D,YAAA,IAAI,GAAG,KAAK,QAAQ,EAAE;AACpB,gBAAA,IAAI,CAAC,IAAI,GAAG,KAAK;AACjB,gBAAA,MAAM,IAAI,GAAG;AACX,oBAAA,OAAO,EAAE,IAAI;AACb,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,IAAI;AACd,oBAAA,MAAM,EAAE;AACN,wBAAA,WAAW,EAAE,MAAM;AACpB,qBAAA;iBACF;AAED,gBAAA,IAAI,CAAC,aAAa,CAChB,I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AAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAE/B,UAAA,CAAA;IADP,KAAK,EAAE;AACwB,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AAGxB,UAAA,CAAA;IADP,KAAK,EAAE;AAC2B,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,qBAAA,EAAA,MAAA,CAAA;AAGnC,UAAA,CAAA;IADC,qBAAqB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACnB,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AAGpC,UAAA,CAAA;IADC,qBAAqB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;AACnB,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,mBAAA,EAAA,MAAA,CAAA;AAiN/B,UAAA,CAAA;IAFP,YAAY,CAAC,SAAS;;AAsBrB,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AAIM,UAAA,CAAA;IAFP,YAAY,CAAC,gBAAgB;;AAkG5B,CAAA,EAAA,oBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAtYE,oBAAoB,GAAA,UAAA,CAAA;AADzB,IAAAA,aAAa,CAAC,CAAA,EAAG,MAAM,CAAA,mBAAA,CAAqB;AACvC,CAAA,EAAA,oBAAoB,CA4azB;AAED,6BAAe,oBAAoB;;;;"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit';
|
9
|
+
|
10
|
+
var styles = css(["a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{border:0;font:inherit;font-feature-settings:\"liga\" 1;font-size:100%;margin:0;padding:0;vertical-align:baseline}button,input,select,textarea{border-radius:0;font-family:inherit}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{background-color:var(--cds-custom-background,#fff);color:var(--cds-custom-text-primary,#161616);line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:none}table{border-collapse:collapse;border-spacing:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{font-size:100%}body{font-family:IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,sans-serif;font-weight:400;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}code{font-family:IBM Plex Mono,system-ui,-apple-system,BlinkMacSystemFont,\\.SFNSText-Regular,monospace}strong{font-weight:600}@media screen and (-ms-high-contrast:active){svg{fill:ButtonText}}h1{font-size:var(--cds-custom-heading-06-font-size,2.625rem);font-weight:var(--cds-custom-heading-06-font-weight,300);letter-spacing:var(--cds-custom-heading-06-letter-spacing,0);line-height:var(--cds-custom-heading-06-line-height,1.199)}h2{font-size:var(--cds-custom-heading-05-font-size,2rem);font-weight:var(--cds-custom-heading-05-font-weight,400);letter-spacing:var(--cds-custom-heading-05-letter-spacing,0);line-height:var(--cds-custom-heading-05-line-height,1.25)}h3{font-size:var(--cds-custom-heading-04-font-size,1.75rem);font-weight:var(--cds-custom-heading-04-font-weight,400);letter-spacing:var(--cds-custom-heading-04-letter-spacing,0);line-height:var(--cds-custom-heading-04-line-height,1.28572)}h4{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4)}h5{font-size:var(--cds-custom-heading-02-font-size,1rem);font-weight:var(--cds-custom-heading-02-font-weight,600);letter-spacing:var(--cds-custom-heading-02-letter-spacing,0);line-height:var(--cds-custom-heading-02-line-height,1.5)}h6{font-size:var(--cds-custom-heading-01-font-size,.875rem);font-weight:var(--cds-custom-heading-01-font-weight,600);letter-spacing:var(--cds-custom-heading-01-letter-spacing,.16px);line-height:var(--cds-custom-heading-01-line-height,1.42857)}p{font-size:var(--cds-custom-body-02-font-size,1rem);font-weight:var(--cds-custom-body-02-font-weight,400);letter-spacing:var(--cds-custom-body-02-letter-spacing,0);line-height:var(--cds-custom-body-02-line-height,1.5)}a{color:var(--cds-custom-link-primary,#0062fe)}em{font-style:italic}@keyframes c4p--hide-feedback{0%{opacity:1;visibility:inherit}to{opacity:0;visibility:hidden}}@keyframes c4p--show-feedback{0%{opacity:0;visibility:hidden}to{opacity:1;visibility:inherit}}@keyframes c4p--skeleton{0%{opacity:.3;transform:scaleX(0);transform-origin:left}20%{opacity:1;transform:scaleX(1);transform-origin:left}28%{transform:scaleX(1);transform-origin:right}51%{transform:scaleX(0);transform-origin:right}58%{transform:scaleX(0);transform-origin:right}82%{transform:scaleX(1);transform-origin:right}83%{transform:scaleX(1);transform-origin:left}96%{transform:scaleX(0);transform-origin:left}to{opacity:.3;transform:scaleX(0);transform-origin:left}}.c4p--layout--size-xs{--c4p-layout-size-height-context:var(--c4p-layout-size-height-xs,1.5rem);--c4p-layout-size-height:var(--c4p-layout-size-height-context)}.c4p--layout-constraint--size__default-xs{--c4p-layout-size-height:var(--c4p-layout-size-height-context,var(--c4p-layout-size-height-xs,1.5rem))}.c4p--layout-constraint--size__min-xs{--c4p-layout-size-height-min:var(--c4p-layout-size-height-xs,1.5rem)}.c4p--layout-constraint--size__max-xs{--c4p-layout-size-height-max:var(--c4p-layout-size-height-xs,1.5rem)}.c4p--layout--size-sm{--c4p-layout-size-height-context:var(--c4p-layout-size-height-sm,2rem);--c4p-layout-size-height:var(--c4p-layout-size-height-context)}.c4p--layout-constraint--size__default-sm{--c4p-layout-size-height:var(--c4p-layout-size-height-context,var(--c4p-layout-size-height-sm,2rem))}.c4p--layout-constraint--size__min-sm{--c4p-layout-size-height-min:var(--c4p-layout-size-height-sm,2rem)}.c4p--layout-constraint--size__max-sm{--c4p-layout-size-height-max:var(--c4p-layout-size-height-sm,2rem)}.c4p--layout--size-md{--c4p-layout-size-height-context:var(--c4p-layout-size-height-md,2.5rem);--c4p-layout-size-height:var(--c4p-layout-size-height-context)}.c4p--layout-constraint--size__default-md{--c4p-layout-size-height:var(--c4p-layout-size-height-context,var(--c4p-layout-size-height-md,2.5rem))}.c4p--layout-constraint--size__min-md{--c4p-layout-size-height-min:var(--c4p-layout-size-height-md,2.5rem)}.c4p--layout-constraint--size__max-md{--c4p-layout-size-height-max:var(--c4p-layout-size-height-md,2.5rem)}.c4p--layout--size-lg{--c4p-layout-size-height-context:var(--c4p-layout-size-height-lg,3rem);--c4p-layout-size-height:var(--c4p-layout-size-height-context)}.c4p--layout-constraint--size__default-lg{--c4p-layout-size-height:var(--c4p-layout-size-height-context,var(--c4p-layout-size-height-lg,3rem))}.c4p--layout-constraint--size__min-lg{--c4p-layout-size-height-min:var(--c4p-layout-size-height-lg,3rem)}.c4p--layout-constraint--size__max-lg{--c4p-layout-size-height-max:var(--c4p-layout-size-height-lg,3rem)}.c4p--layout--size-xl{--c4p-layout-size-height-context:var(--c4p-layout-size-height-xl,4rem);--c4p-layout-size-height:var(--c4p-layout-size-height-context)}.c4p--layout-constraint--size__default-xl{--c4p-layout-size-height:var(--c4p-layout-size-height-context,var(--c4p-layout-size-height-xl,4rem))}.c4p--layout-constraint--size__min-xl{--c4p-layout-size-height-min:var(--c4p-layout-size-height-xl,4rem)}.c4p--layout-constraint--size__max-xl{--c4p-layout-size-height-max:var(--c4p-layout-size-height-xl,4rem)}.c4p--layout--size-2xl{--c4p-layout-size-height-context:var(--c4p-layout-size-height-2xl,5rem);--c4p-layout-size-height:var(--c4p-layout-size-height-context)}.c4p--layout-constraint--size__default-2xl{--c4p-layout-size-height:var(--c4p-layout-size-height-context,var(--c4p-layout-size-height-2xl,5rem))}.c4p--layout-constraint--size__min-2xl{--c4p-layout-size-height-min:var(--c4p-layout-size-height-2xl,5rem)}.c4p--layout-constraint--size__max-2xl{--c4p-layout-size-height-max:var(--c4p-layout-size-height-2xl,5rem)}.c4p--layout--density-condensed{--c4p-layout-density-padding-inline-context:var(--c4p-layout-density-padding-inline-condensed,0.5rem);--c4p-layout-density-padding-inline:var(--c4p-layout-density-padding-inline-context)}.c4p--layout-constraint--density__default-condensed{--c4p-layout-density-padding-inline:var(--c4p-layout-density-padding-inline-context,var(--c4p-layout-density-padding-inline-condensed,0.5rem))}.c4p--layout-constraint--density__min-condensed{--c4p-layout-density-padding-inline-min:var(--c4p-layout-density-padding-inline-condensed,0.5rem)}.c4p--layout-constraint--density__max-condensed{--c4p-layout-density-padding-inline-max:var(--c4p-layout-density-padding-inline-condensed,0.5rem)}.c4p--layout--density-normal{--c4p-layout-density-padding-inline-context:var(--c4p-layout-density-padding-inline-normal,1rem);--c4p-layout-density-padding-inline:var(--c4p-layout-density-padding-inline-context)}.c4p--layout-constraint--density__default-normal{--c4p-layout-density-padding-inline:var(--c4p-layout-density-padding-inline-context,var(--c4p-layout-density-padding-inline-normal,1rem))}.c4p--layout-constraint--density__min-normal{--c4p-layout-density-padding-inline-min:var(--c4p-layout-density-padding-inline-normal,1rem)}.c4p--layout-constraint--density__max-normal{--c4p-layout-density-padding-inline-max:var(--c4p-layout-density-padding-inline-normal,1rem)}:root{--c4p-layout-size-height-xs:1.5rem;--c4p-layout-size-height-sm:2rem;--c4p-layout-size-height-md:2.5rem;--c4p-layout-size-height-lg:3rem;--c4p-layout-size-height-xl:4rem;--c4p-layout-size-height-2xl:5rem;--c4p-layout-size-height-min:0px;--c4p-layout-size-height-max:999999999px;--c4p-layout-density-padding-inline-condensed:0.5rem;--c4p-layout-density-padding-inline-normal:1rem;--c4p-layout-density-padding-inline-min:0px;--c4p-layout-density-padding-inline-max:999999999px}.c4p--assistive-text,.c4p--visually-hidden{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.c4p--empty-state{color:var(--cds-custom-text-primary,#161616);display:flex}.c4p--empty-state .c4p--empty-state__header{font-size:var(--cds-custom-heading-03-font-size,1.25rem);font-weight:var(--cds-custom-heading-03-font-weight,400);letter-spacing:var(--cds-custom-heading-03-letter-spacing,0);line-height:var(--cds-custom-heading-03-line-height,1.4);margin:0;padding-block-end:.5rem}.c4p--empty-state .c4p--empty-state__subtitle{color:var(--cds-custom-text-secondary,#525252);font-size:var(--cds-custom-body-01-font-size,.875rem);font-weight:var(--cds-custom-body-01-font-weight,400);letter-spacing:var(--cds-custom-body-01-letter-spacing,.16px);line-height:var(--cds-custom-body-01-line-height,1.42857);padding-block-end:1rem}.c4p--empty-state .c4p--empty-state__header--small{font-size:var(--cds-custom-body-compact-02-font-size,1rem);font-weight:var(--cds-custom-body-compact-02-font-weight,400);letter-spacing:var(--cds-custom-body-compact-02-letter-spacing,0);line-height:var(--cds-custom-body-compact-02-line-height,1.375);padding-block-end:.5rem}.c4p--empty-state .c4p--empty-state__subtitle--small{font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333)}.c4p--empty-state__illustration{block-size:auto;margin-block-end:1rem}.c4p--empty-state__illustration.c4p--empty-state__illustration--lg{max-inline-size:5rem;min-inline-size:5rem}.c4p--empty-state__illustration.c4p--empty-state__illustration--sm{max-inline-size:4rem;min-inline-size:4rem}.c4p--empty-state-position--top{flex-direction:column}.c4p--empty-state-position--right{flex-direction:row-reverse}.c4p--empty-state-position--bottom{flex-direction:column-reverse}.c4p--empty-state-position--left{flex-direction:row}.c4p--empty-state .c4p--empty-state__action-button{display:block;margin-block-end:1rem}.c4p--empty-state .c4p--empty-state__link{display:inline-block}@keyframes notifications-panel-fade-in{0%{opacity:0;transform:translateY(-38.5rem)}to{opacity:1;transform:translateY(0)}}@keyframes notifications-panel-fade-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-38.5rem)}}@keyframes notifications-panel-entrance-reduced{0%{opacity:0}to{opacity:1}}@keyframes notifications-panel-exit-reduced{0%{opacity:1}to{opacity:0}}.c4p--notifications-panel__entrance{animation:notifications-panel-fade-in .24s cubic-bezier(.2,0,.38,.9)}.c4p--notifications-panel__exit{animation:notifications-panel-fade-out .24s cubic-bezier(.2,0,.38,.9) forwards}@media (prefers-reduced-motion){.c4p--notifications-panel__entrance{animation:notifications-panel-entrance-reduced .15s cubic-bezier(.2,0,1,.9) forwards}.c4p--notifications-panel__exit{animation:notifications-panel-exit-reduced .15s cubic-bezier(.2,0,1,.9) forwards}}.c4p--notifications-panel__container{background-color:var(--cds-custom-layer-01,#f4f4f4);border-block-end:1px solid var(--cds-custom-border-subtle-02,#e0e0e0);border-inline-start:1px solid var(--cds-custom-border-subtle-02,#e0e0e0);box-shadow:0 .125rem .25rem var(--cds-custom-overlay,hsla(0,0%,9%,.5));color:var(--cds-custom-text-primary,#161616);inset-block-start:3rem;inset-inline-end:0;max-block-size:38.5rem;max-inline-size:22.75rem;min-block-size:38.5rem;min-inline-size:20rem;overflow:auto;position:fixed;transition:transform .11s cubic-bezier(.2,0,.38,.9);z-index:2}.c4p--notifications-panel__container .c4p--notifications-panel__header-container{background-color:var(--cds-custom-layer-01,#f4f4f4);border-block-end:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-start:0;padding:.5rem 1rem;position:sticky;z-index:2}.c4p--notifications-panel__container .c4p--notifications-panel__header-container .c4p--notifications-panel__header-flex{align-items:center;display:flex;justify-content:space-between}.c4p--notifications-panel__container .c4p--notifications-panel__header-container .c4p--notifications-panel__do-not-disturb-toggle{padding-block-end:.5rem}.c4p--notifications-panel__container .c4p--notifications-panel__header-container .c4p--notifications-panel__do-not-disturb-toggle .cds-custom--toggle__label-text{block-size:1px;border:0;margin:-1px;overflow:hidden;padding:0;position:absolute;clip:rect(0,0,0,0);inline-size:1px;visibility:inherit;white-space:nowrap}.c4p--notifications-panel__container .c4p--notifications-panel__header-container .c4p--notifications-panel__dismiss-button{color:var(--cds-custom-text-primary,#161616)}.c4p--notifications-panel__container .c4p--notifications-panel__header-container .c4p--notifications-panel__header{font-size:var(--cds-custom-heading-compact-01-font-size,.875rem);font-weight:var(--cds-custom-heading-compact-01-font-weight,600);letter-spacing:var(--cds-custom-heading-compact-01-letter-spacing,.16px);line-height:var(--cds-custom-heading-compact-01-line-height,1.28572);margin:0}.c4p--notifications-panel__container .c4p--notifications-panel__time-section-label{background-color:var(--cds-custom-layer-01,#f4f4f4);color:var(--cds-custom-text-secondary,#525252);font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);font-weight:600;inset-block-start:3.0625rem;letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333);padding:.5rem 1rem;position:sticky;z-index:2}.c4p--notifications-panel__container .c4p--notifications-panel__notification:focus,.c4p--notifications-panel__container .c4p--notifications-panel__notification:hover{background-color:var(--cds-custom-layer-accent-01,#e0e0e0)}.c4p--notifications-panel__container .c4p--notifications-panel__notification:focus .c4p--notifications-panel__dismiss-single-button,.c4p--notifications-panel__container .c4p--notifications-panel__notification:hover .c4p--notifications-panel__dismiss-single-button{opacity:1}.c4p--notifications-panel__container .c4p--notifications-panel__notification:focus{border-color:var(--cds-custom-focus,#0f62fe);box-shadow:inset 0 0 0 2px var(--cds-custom-focus,#0f62fe),inset 0 0 0 2px var(--cds-custom-background,#fff);outline:0}.c4p--notifications-panel__container .c4p--notifications-panel__notification{align-items:flex-start;background-color:var(--cds-custom-layer-01,#f4f4f4);border:0;cursor:pointer;display:flex;inline-size:100%;min-block-size:6.25rem;padding:1rem;position:relative;text-align:start;transition:background-color .24s cubic-bezier(.2,0,.38,.9)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-title{color:var(--cds-custom-text-secondary,#525252);font-size:var(--cds-custom-heading-01-font-size,.875rem);font-weight:var(--cds-custom-heading-01-font-weight,600);font-weight:400;letter-spacing:var(--cds-custom-heading-01-letter-spacing,.16px);line-height:var(--cds-custom-heading-01-line-height,1.42857);margin-block-end:.25rem}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-title.c4p--notifications-panel__notification-title-unread{color:var(--cds-custom-text-secondary,#525252);font-weight:600;margin-block-end:.25rem}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notifications-link{font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-status-icon{margin-inline-end:.5rem;min-inline-size:1rem}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-status-icon.c4p--notifications-panel__notification-status-icon-error{fill:var(--cds-custom-support-error,#da1e28)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-status-icon.c4p--notifications-panel__notification-status-icon-success{fill:var(--cds-custom-support-success,#24a148)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-status-icon.c4p--notifications-panel__notification-status-icon-warning{fill:var(--cds-custom-support-warning,#f1c21b)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-status-icon.c4p--notifications-panel__notification-status-icon-informational{fill:var(--cds-custom-support-info,#0043ce)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-time-label{margin-block-end:.5rem}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-description,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-time-label{color:var(--cds-custom-text-secondary,#525252);font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-description.c4p--notifications-panel__notification-short-description{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-description.c4p--notifications-panel__notification-long-description{display:block;overflow:initial;-webkit-line-clamp:initial;line-clamp:none}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-less-button,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-more-button{align-items:center;display:flex;font-size:var(--cds-custom-label-01-font-size,.75rem);font-weight:var(--cds-custom-label-01-font-weight,400);letter-spacing:var(--cds-custom-label-01-letter-spacing,.32px);line-height:var(--cds-custom-label-01-line-height,1.33333);min-inline-size:5.5rem;padding:0}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-less-button .cds-custom--btn__icon,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-more-button .cds-custom--btn__icon{transition:transform .24s ease}@media (prefers-reduced-motion:reduce){.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-less-button .cds-custom--btn__icon,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-more-button .cds-custom--btn__icon{transition:none}}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-less-button.c4p--notifications-panel__notification-read-more-button .cds-custom--btn__icon,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-more-button.c4p--notifications-panel__notification-read-more-button .cds-custom--btn__icon{transform:rotate(0deg)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-less-button.c4p--notifications-panel__notification-read-less-button .cds-custom--btn__icon,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__notification-content .c4p--notifications-panel__notification-read-more-button.c4p--notifications-panel__notification-read-less-button .cds-custom--btn__icon{transform:rotate(180deg)}.c4p--notifications-panel__container .c4p--notifications-panel__notification .cds-custom--popover-container{position:static}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__dismiss-single-button{align-items:center;color:var(--cds-custom-text-primary,#161616);display:flex;inset-block-start:0;inset-inline-end:0;justify-content:center;min-inline-size:2rem;opacity:0;padding:0;position:absolute}.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__dismiss-single-button:focus,.c4p--notifications-panel__container .c4p--notifications-panel__notification .c4p--notifications-panel__dismiss-single-button:hover{opacity:1}.c4p--notifications-panel__container .c4p--notifications-panel__notification-previous:not(:first-of-type):before,.c4p--notifications-panel__container .c4p--notifications-panel__notification-today:not(:first-of-type):before,.c4p--notifications-panel__container .c4p--notifications-panel__notification-yesterday:not(:first-of-type):before{background-color:var(--cds-custom-border-subtle-01,#c6c6c6);block-size:1px;content:\"\";inline-size:calc(100% - 2rem);inset-block-start:0;margin:0 auto;position:absolute;transition:background-color .24s cubic-bezier(.2,0,.38,.9)}.c4p--notifications-panel__container .c4p--notifications-panel__notification-previous:hover+.c4p--notifications-panel__notification-previous:not(:first-of-type):before,.c4p--notifications-panel__container .c4p--notifications-panel__notification-today:hover+.c4p--notifications-panel__notification-today:not(:first-of-type):before,.c4p--notifications-panel__container .c4p--notifications-panel__notification-yesterday:hover+.c4p--notifications-panel__notification-yesterday:not(:first-of-type):before{background-color:transparent}.c4p--notifications-panel__container .c4p--notifications-panel__main-section-empty.c4p--notifications-panel__main-section{align-items:center;block-size:100%;display:flex;justify-content:center;margin-block-start:10rem;min-block-size:0}.c4p--notifications-panel__container .c4p--notifications-panel__main-section-empty.c4p--notifications-panel__main-section .c4p-subtext{font-size:var(--cds-custom-body-compact-01-font-size,.875rem);font-weight:var(--cds-custom-body-compact-01-font-weight,400);letter-spacing:var(--cds-custom-body-compact-01-letter-spacing,.16px);line-height:var(--cds-custom-body-compact-01-line-height,1.28572)}.c4p--notifications-panel__container .c4p--notifications-panel__main-section{min-block-size:498px}.c4p--notifications-panel__container .c4p--notifications-panel__bottom-actions{align-items:center;background-color:var(--cds-custom-layer-01,#f4f4f4);block-size:2.5rem;border-block-start:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);display:flex;inset-block-end:0;min-block-size:2.5rem;position:sticky;z-index:2}.c4p--notifications-panel__container .c4p--notifications-panel__bottom-actions .c4p--notifications-panel__view-all-button{align-items:center;block-size:2.5rem;border-inline-end:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);color:var(--cds-custom-text-primary,#161616);display:flex;inline-size:100%;max-inline-size:calc(100% - 2.5rem);min-block-size:2.5rem}.c4p--notifications-panel__container .c4p--notifications-panel__bottom-actions .c4p--notifications-panel__settings-button{align-items:center;block-size:2.5rem;color:var(--cds-custom-text-primary,#161616);display:flex;justify-content:center;min-block-size:2.5rem;min-inline-size:2.5rem;padding:0}.c4p--notifications-panel__container .c4p--notifications-panel__bottom-actions .c4p--notifications-panel__settings-button .cds-custom--btn__icon{margin:0}.c4p--notifications-panel__header-container:has(.c4p--notifications-panel__do-not-disturb-toggle)+.c4p--notifications-panel__main-section .c4p--notifications-panel__time-section-label{inset-block-start:4.8125rem}:host(c4p-notification-panel) .c4p--notifications-panel__do-not-disturb-toggle{display:block;margin-block-start:-1rem}:host(c4p-notification-panel) ::slotted(.c4p--notifications-panel__bottom-actions){align-items:center;display:flex}.c4p--notifications-panel__header-container{--cds-custom-heading-06-font-size:--cds-custom-heading-compact-01-font-size;--cds-custom-heading-06-font-weight:--cds-custom-heading-compact-01-font-weight;--cds-custom-heading-06-line-height:--cds-custom-heading-compact-01-line-height;--cds-custom-heading-06-letter-spacing:--cds-custom-heading-compact-01-letter-spacing}.c4p--notifications-panel__dismiss-button{--cds-custom-link-primary:--cds-custom-text-primary;--cds-custom-link-primary-hover:--cds-custom-text-primary}.c4p--notifications-panel__bottom-actions-container{background-color:var(--cds-custom-layer-01,#f4f4f4);block-size:2.5rem;border-block-start:1px solid var(--cds-custom-border-subtle-01,#c6c6c6);inset-block-end:0;min-block-size:2.5rem;position:sticky;z-index:2}"]);
|
11
|
+
|
12
|
+
export { styles as default };
|
13
|
+
//# sourceMappingURL=notification-panel.scss.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"notification-panel.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { describe, it, expect } from 'vitest';
|
9
|
+
import { html } from '@open-wc/testing';
|
10
|
+
import { render } from 'lit';
|
11
|
+
import './notification-panel.js';
|
12
|
+
import './notification.js';
|
13
|
+
import './notification-footer.js';
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Copyright IBM Corp. 2025
|
17
|
+
*
|
18
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
19
|
+
* LICENSE file in the root directory of this source tree.
|
20
|
+
*/
|
21
|
+
const template = () => html `
|
22
|
+
<c4p-notification-panel> </c4p-notification-panel>
|
23
|
+
`;
|
24
|
+
describe('c4p-notification-panel', () => {
|
25
|
+
it('should render notification modal', async () => {
|
26
|
+
const element = render(template(), document.body);
|
27
|
+
expect(element).toBeDefined();
|
28
|
+
});
|
29
|
+
});
|
30
|
+
//# sourceMappingURL=notification-panel.test.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"notification-panel.test.js","sources":["../../../src/components/notification-panel/notification-panel.test.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;AAKG;AAOH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAA;;CAE1B;AAED,QAAQ,CAAC,wBAAwB,EAAE,MAAK;AACtC,IAAA,EAAE,CAAC,kCAAkC,EAAE,YAAW;QAChD,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC;AACjD,QAAA,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,EAAE;AAC/B,KAAC,CAAC;AACJ,CAAC,CAAC"}
|