Skip to content

Commit 767cecf

Browse files
committed
Changes after pull request
1 parent 5065f0e commit 767cecf

File tree

5 files changed

+9
-129
lines changed

5 files changed

+9
-129
lines changed

elements/pf-alert/demo/Custom-icon.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ <h3 slot="header">Success alert title</h3>
2323
background-color: #fff;
2424
}
2525

26-
/* צבע כחול ל-b */
2726
pf-alert.b::part(container) {
2827
background-color: #f3faf2;
2928
}
3029

3130
.demo-description {
3231
padding: 1cm;
33-
/* שמירה על מרחק של ס"מ אחד מכל הצדדים */
32+
/* Maintain a distance of one centimeter on all sides */
3433
}
3534
</style>
3635
<script type="module">

elements/pf-alert/demo/Inline-plain.html

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -29,63 +29,3 @@ <h3 slot="header">Success alert title</h3>
2929

3030

3131

32-
<!-- <form id="alert-variant-toast">
33-
<fieldset>
34-
<legend>Alert State</legend>
35-
<label><input type="radio" name="state" value="default">Neutral</label>
36-
<label><input type="radio" name="state" value="info">Info</label>
37-
<label><input type="radio" name="state" value="success">Success</label>
38-
<label><input type="radio" name="state" value="warning">Caution</label>
39-
<label><input type="radio" name="state" value="warning">Warning</label>
40-
<label><input type="radio" name="state" value="danger">Danger</label>
41-
</fieldset>
42-
<fieldset>
43-
<legend>Persistence</legend>
44-
<label><input type="checkbox" name="persistent">Persistent</label>
45-
</fieldset>
46-
<fieldset>
47-
<legend>Actions</legend>
48-
<label><input type="radio" name="actions" value="none">No actions</label>
49-
<label><input type="radio" name="actions" value="primary">Single action</label>
50-
<label><input type="radio" name="actions" value="secondary">Secondary action</label>
51-
</fieldset>
52-
<pf-button id="alert-toast">Toast alert</pf-button>
53-
</form>
54-
55-
<style>
56-
#alert-variant-toast {
57-
gap: var(--pf-space-lg, 16px);
58-
padding: var(--pf-space-lg, 16px);
59-
width: max-content;
60-
}
61-
#alert-toast {
62-
margin-top: 0.45cm;
63-
}
64-
</style>
65-
66-
<script type="module">
67-
import { PfAlert } from '@patternfly/elements/pf-alert/pf-alert.js';
68-
import '@patternfly/elements/pf-button/pf-button.js';
69-
70-
let i = 0;
71-
document.addEventListener('close', e => console.log(e.action));
72-
document.getElementById('alert-variant-toast').addEventListener('submit', async function(event) {
73-
event.preventDefault();
74-
const data = new FormData(event.target);
75-
const persistent = data.has('persistent');
76-
const state = data.get('state') ?? 'info';
77-
const [a, ...rest] = state;
78-
await PfAlert.toast({
79-
state,
80-
persistent,
81-
message: `${++i}: Lorem ipsum dolor sit amet, consectetur adipiscing elit.`,
82-
heading: `${a.toUpperCase()}${rest.join('')}${persistent ? ` - persistent` : ''}`,
83-
actions: data.get('actions') === 'primary' ? [
84-
{ action: 'dismiss', text: 'Dismiss' },
85-
] : data.get('actions') === 'secondary' ? [
86-
{ action: 'confirm', text: 'Confirm' },
87-
{ action: 'dismiss', text: 'Dismiss' },
88-
] : undefined,
89-
});
90-
});
91-
</script> -->

elements/pf-alert/pf-alert-toast-styles.css

Lines changed: 0 additions & 48 deletions
This file was deleted.

elements/pf-alert/pf-alert.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
/*
2-
:host {
3-
display: block;
4-
max-width: var(--pf-c-alert--MaxWidth, initial);
5-
}
6-
7-
[hidden] {
8-
display: none !important;
9-
} */
101

112
header {
123
display: flex;

elements/pf-alert/pf-alert.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { classMap } from 'lit/directives/class-map.js';
88
import { getRandomId } from '@patternfly/pfe-core/functions/random.js';
99
import { SlotController } from '@patternfly/pfe-core/controllers/slot-controller.js';
1010
import styles from './pf-alert.css';
11-
import toastStyles from './pf-alert-toast-styles.css';
1211
import '@patternfly/elements/pf-icon/pf-icon.js';
1312
import '@patternfly/elements/pf-button/pf-button.js';
1413

@@ -262,14 +261,14 @@ firstUpdated(): void {
262261
`;
263262
}
264263

265-
async #close() {
266-
await this.updateComplete;
267-
await Promise.all(this.getAnimations().map(x => {
268-
x.finish();
269-
return x.finished;
270-
}));
271-
this.remove();
272-
}
264+
// async #close() {
265+
// await this.updateComplete;
266+
// await Promise.all(this.getAnimations().map(x => {
267+
// x.finish();
268+
// return x.finished;
269+
// }));
270+
// this.remove();
271+
// }
273272

274273
async #onActionsClick(event: MouseEvent) {
275274
if (event.target instanceof HTMLElement
@@ -289,7 +288,6 @@ function initToaster() {
289288
node.classList.add('pf-alert-toast-group');
290289
document.adoptedStyleSheets = [
291290
...document.adoptedStyleSheets ?? [],
292-
(toastStyles as unknown as CSSResult).styleSheet!,
293291
];
294292

295293
document.body.append(node);

0 commit comments

Comments
 (0)