@web-atoms/core 2.4.31 → 2.4.34
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/style/styled.d.ts.map +1 -1
- package/dist/style/styled.js +21 -15
- package/dist/style/styled.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/web/services/NotifcationPopup.global.less.css +13 -0
- package/dist/web/services/NotifcationPopup.global.less.css.map +1 -0
- package/dist/web/services/NotificationPopup.d.ts +1 -0
- package/dist/web/services/NotificationPopup.d.ts.map +1 -1
- package/dist/web/services/NotificationPopup.js +4 -16
- package/dist/web/services/NotificationPopup.js.map +1 -1
- package/dist/web/services/PopupService.d.ts +1 -0
- package/dist/web/services/PopupService.d.ts.map +1 -1
- package/dist/web/services/PopupService.global.less.css +83 -0
- package/dist/web/services/PopupService.global.less.css.map +1 -0
- package/dist/web/services/PopupService.js +4 -98
- package/dist/web/services/PopupService.js.map +1 -1
- package/dist/web/services/PopupWindow.d.ts +1 -0
- package/dist/web/services/PopupWindow.d.ts.map +1 -1
- package/dist/web/services/PopupWindow.global.less.css +148 -0
- package/dist/web/services/PopupWindow.global.less.css.map +1 -0
- package/dist/web/services/PopupWindow.js +3 -161
- package/dist/web/services/PopupWindow.js.map +1 -1
- package/gulpfile.mjs +41 -0
- package/package.json +7 -3
- package/src/index.d.ts +5 -0
- package/src/style/styled.ts +23 -14
- package/src/web/services/NotifcationPopup.global.less +11 -0
- package/src/web/services/NotificationPopup.tsx +3 -12
- package/src/web/services/PopupService.global.less +91 -0
- package/src/web/services/PopupService.tsx +5 -97
- package/src/web/services/PopupWindow.global.less +157 -0
- package/src/web/services/PopupWindow.tsx +2 -160
|
@@ -3,12 +3,13 @@ import { BindableProperty } from "../../core/BindableProperty";
|
|
|
3
3
|
import XNode from "../../core/XNode";
|
|
4
4
|
import sleep from "../../core/sleep";
|
|
5
5
|
import { CancelToken, IClassOf, IDisposable, IRect } from "../../core/types";
|
|
6
|
-
import styled from "../../style/styled";
|
|
7
6
|
import { AtomControl } from "../controls/AtomControl";
|
|
8
7
|
import { ChildEnumerator } from "../core/AtomUI";
|
|
9
8
|
import type PopupService from "./PopupService";
|
|
10
9
|
import type { IDialogOptions } from "./PopupService";
|
|
11
10
|
|
|
11
|
+
import "./PopupWindow.global.less";
|
|
12
|
+
|
|
12
13
|
let popupService: typeof PopupService;
|
|
13
14
|
|
|
14
15
|
const loadPopupService = async () => {
|
|
@@ -52,141 +53,6 @@ const focus = (popup: PopupWindow) => {
|
|
|
52
53
|
(anyAutofocus as HTMLElement).focus?.();
|
|
53
54
|
};
|
|
54
55
|
|
|
55
|
-
styled.css `
|
|
56
|
-
position: absolute;
|
|
57
|
-
border: solid 1px lightgray;
|
|
58
|
-
border-radius: 5px;
|
|
59
|
-
background-color: canvas;
|
|
60
|
-
color: canvastext;
|
|
61
|
-
top: 50%;
|
|
62
|
-
left: 50%;
|
|
63
|
-
transform: translate(-50%, -50%);
|
|
64
|
-
box-shadow: 0 0 20px 1px rgba(0 0 0 / 75%);
|
|
65
|
-
|
|
66
|
-
display: grid;
|
|
67
|
-
align-items: stretch;
|
|
68
|
-
justify-items: stretch;
|
|
69
|
-
grid-template-rows: auto auto 1fr auto;
|
|
70
|
-
grid-template-columns: auto 1fr auto;
|
|
71
|
-
opacity: 0;
|
|
72
|
-
transition: opacity 0.3s cubic-bezier(0.55, 0.09, 0.97, 0.32) ;
|
|
73
|
-
overflow: hidden;
|
|
74
|
-
|
|
75
|
-
[data-window-modal-background=background] {
|
|
76
|
-
position: absolute;
|
|
77
|
-
top: 0;
|
|
78
|
-
left: 0;
|
|
79
|
-
bottom: 0;
|
|
80
|
-
right: 0;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&[data-no-width=true] {
|
|
84
|
-
max-width: 95%;
|
|
85
|
-
min-width: 300px;
|
|
86
|
-
}
|
|
87
|
-
&[data-no-height=true] {
|
|
88
|
-
max-height: 95%;
|
|
89
|
-
min-height: 100px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&[data-maximize=true] {
|
|
93
|
-
width: 90%;
|
|
94
|
-
height: 90%;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
&[data-ready=true] {
|
|
98
|
-
opacity: 1;
|
|
99
|
-
}
|
|
100
|
-
&[data-dragging=true] {
|
|
101
|
-
opacity: 0.5;
|
|
102
|
-
}
|
|
103
|
-
& > [data-window-element=icon] {
|
|
104
|
-
grid-row: 1;
|
|
105
|
-
grid-column: 1;
|
|
106
|
-
z-index: 2;
|
|
107
|
-
}
|
|
108
|
-
& > [data-window-element=title] {
|
|
109
|
-
grid-row: 1;
|
|
110
|
-
grid-column: 2;
|
|
111
|
-
font-size: medium;
|
|
112
|
-
overflow: hidden;
|
|
113
|
-
white-space: nowrap;
|
|
114
|
-
text-overflow: ellipsis;
|
|
115
|
-
cursor: move;
|
|
116
|
-
padding: var(--spacing, 5px);
|
|
117
|
-
color: var(--accent-text-color, #424242);
|
|
118
|
-
z-index: 2;
|
|
119
|
-
}
|
|
120
|
-
& > [data-window-element=close] {
|
|
121
|
-
grid-row: 1;
|
|
122
|
-
grid-column: 3;
|
|
123
|
-
color: white;
|
|
124
|
-
background-color: red;
|
|
125
|
-
border-radius: 9999px;
|
|
126
|
-
border: none;
|
|
127
|
-
outline: none;
|
|
128
|
-
/* padding: 5px; */
|
|
129
|
-
font-family: monospace;
|
|
130
|
-
height: 20px;
|
|
131
|
-
width: 20px;
|
|
132
|
-
margin: 5px;
|
|
133
|
-
cursor: pointer;
|
|
134
|
-
text-transform: capitalize;
|
|
135
|
-
z-index: 2;
|
|
136
|
-
}
|
|
137
|
-
& > [data-window-element=action-bar] {
|
|
138
|
-
grid-row: 1;
|
|
139
|
-
grid-column: 1 / span 3;
|
|
140
|
-
align-self: stretch;
|
|
141
|
-
justify-self: stretch;
|
|
142
|
-
background-color: var(--accent-color, rgba(211, 211, 211, 0.2));
|
|
143
|
-
border-top-left-radius: 5px;
|
|
144
|
-
border-top-right-radius: 5px;
|
|
145
|
-
z-index: 1;
|
|
146
|
-
}
|
|
147
|
-
& > [data-window-element=header] {
|
|
148
|
-
margin-top: 5px;
|
|
149
|
-
grid-row: 2;
|
|
150
|
-
grid-column: 1 / span 3;
|
|
151
|
-
}
|
|
152
|
-
& > [data-window-element=content] {
|
|
153
|
-
margin-top: 5px;
|
|
154
|
-
grid-row: 3;
|
|
155
|
-
grid-column: 1 / span 3;
|
|
156
|
-
position: relative;
|
|
157
|
-
overflow: auto;
|
|
158
|
-
padding: var(--spacing-medium, 7px);
|
|
159
|
-
&[data-maximize=true] {
|
|
160
|
-
width: 90vw;
|
|
161
|
-
height: 90vh;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
& > [data-window-element=footer] {
|
|
165
|
-
margin-top: 5px;
|
|
166
|
-
grid-row: 4;
|
|
167
|
-
grid-column: 1 / span 3;
|
|
168
|
-
padding-top: 5px;
|
|
169
|
-
padding-bottom: 5px;
|
|
170
|
-
background-color: var(--command-bar-color, #80808025);
|
|
171
|
-
|
|
172
|
-
& > button, & > * > button {
|
|
173
|
-
border-radius: 9999px;
|
|
174
|
-
padding: 5px;
|
|
175
|
-
padding-left: 20px;
|
|
176
|
-
padding-right: 20px;
|
|
177
|
-
border-width: 1px;
|
|
178
|
-
border-color: transparent;
|
|
179
|
-
margin: 5px;
|
|
180
|
-
margin-left: 10px;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
`.installGlobal("[data-popup-window=popup-window]")
|
|
185
|
-
|
|
186
|
-
styled.css `
|
|
187
|
-
position: fixed;
|
|
188
|
-
`.installGlobal("body > div[data-popup-window=popup-window], body > div[data-window-modal-background]");
|
|
189
|
-
|
|
190
56
|
export default class PopupWindow extends AtomControl {
|
|
191
57
|
|
|
192
58
|
public static async showWindow<T>(options?: IDialogOptions): Promise<T>;
|
|
@@ -461,30 +327,6 @@ export default class PopupWindow extends AtomControl {
|
|
|
461
327
|
// @ts-ignore
|
|
462
328
|
delete PopupWindow.prototype.init;
|
|
463
329
|
|
|
464
|
-
styled.css `
|
|
465
|
-
& >[data-window-element=content] > [data-element=details] {
|
|
466
|
-
margin-top: 5px;
|
|
467
|
-
overflow: auto;
|
|
468
|
-
max-width: 80vw;
|
|
469
|
-
max-height: 50vh;
|
|
470
|
-
}
|
|
471
|
-
& > [data-window-element=footer] {
|
|
472
|
-
|
|
473
|
-
& > .yes {
|
|
474
|
-
background-color: #01af01;
|
|
475
|
-
color: white;
|
|
476
|
-
}
|
|
477
|
-
& > .no {
|
|
478
|
-
background-color: red;
|
|
479
|
-
color: white;
|
|
480
|
-
}
|
|
481
|
-
& > .cancel {
|
|
482
|
-
background-color: gray;
|
|
483
|
-
color: white;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
`.installGlobal("[data-confirm-popup=confirm-popup]")
|
|
487
|
-
|
|
488
330
|
export class ConfirmPopup extends PopupWindow {
|
|
489
331
|
|
|
490
332
|
public static async confirm({
|