best-dialog 1.0.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/README.md +282 -0
- package/dist/module.d.mts +3 -0
- package/dist/module.d.ts +3 -0
- package/dist/module.mjs +31 -0
- package/dist/runtime/index.d.mts +223 -0
- package/dist/runtime/index.d.ts +223 -0
- package/dist/runtime/index.mjs +380 -0
- package/dist/runtime/plugin.d.mts +3 -0
- package/dist/runtime/plugin.d.ts +3 -0
- package/dist/runtime/plugin.mjs +17 -0
- package/dist/runtime/style.css +500 -0
- package/package.json +65 -0
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
/* ────────────────────────────────────────────────────────────
|
|
2
|
+
best-dialog — Styles & Animations
|
|
3
|
+
──────────────────────────────────────────────────────────── */
|
|
4
|
+
|
|
5
|
+
/* ── Theme Variables (兼容 Tailwind CSS) ───────────────────── */
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--bd-overlay-bg: var(--tw-color-black, rgba(0, 0, 0, .45));
|
|
9
|
+
--bd-bg: var(--tw-color-white, #fff);
|
|
10
|
+
--bd-text: var(--tw-color-gray-900, #1d2129);
|
|
11
|
+
--bd-text-secondary: var(--tw-color-gray-500, #4e5969);
|
|
12
|
+
--bd-text-muted: var(--tw-color-gray-400, #86909c);
|
|
13
|
+
--bd-border: var(--tw-color-gray-200, #e5e6eb);
|
|
14
|
+
--bd-border-hover: var(--tw-color-gray-300, #c9cdd4);
|
|
15
|
+
--bd-primary: var(--tw-color-blue-600, #165dff);
|
|
16
|
+
--bd-primary-hover: var(--tw-color-blue-500, #4080ff);
|
|
17
|
+
--bd-primary-active: var(--tw-color-blue-700, #0e42d2);
|
|
18
|
+
--bd-surface-hover: var(--tw-color-gray-100, #f2f3f5);
|
|
19
|
+
--bd-surface-active: var(--tw-color-gray-200, #e5e6eb);
|
|
20
|
+
--bd-surface-subtle: var(--tw-color-gray-50, #f7f8fa);
|
|
21
|
+
--bd-input-focus-ring: rgba(22, 93, 255, .12);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@media (prefers-color-scheme: dark) {
|
|
25
|
+
:root {
|
|
26
|
+
--bd-overlay-bg: var(--tw-color-black, rgba(0, 0, 0, .65));
|
|
27
|
+
--bd-bg: var(--tw-color-gray-800, #232324);
|
|
28
|
+
--bd-text: var(--tw-color-gray-100, rgba(255, 255, 255, .85));
|
|
29
|
+
--bd-text-secondary: var(--tw-color-gray-300, rgba(255, 255, 255, .7));
|
|
30
|
+
--bd-text-muted: var(--tw-color-gray-400, rgba(255, 255, 255, .45));
|
|
31
|
+
--bd-border: var(--tw-color-gray-700, rgba(255, 255, 255, .12));
|
|
32
|
+
--bd-border-hover: var(--tw-color-gray-600, rgba(255, 255, 255, .2));
|
|
33
|
+
--bd-primary: var(--tw-color-blue-500, #3370ff);
|
|
34
|
+
--bd-primary-hover: var(--tw-color-blue-400, #4080ff);
|
|
35
|
+
--bd-primary-active: var(--tw-color-blue-600, #245bdb);
|
|
36
|
+
--bd-surface-hover: rgba(255, 255, 255, .08);
|
|
37
|
+
--bd-surface-active: rgba(255, 255, 255, .12);
|
|
38
|
+
--bd-surface-subtle: rgba(255, 255, 255, .04);
|
|
39
|
+
--bd-input-focus-ring: rgba(51, 112, 255, .2);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* ── Overlay ───────────────────────────────────────────────── */
|
|
44
|
+
|
|
45
|
+
.bd-overlay {
|
|
46
|
+
position: fixed;
|
|
47
|
+
inset: 0;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
z-index: 2000;
|
|
52
|
+
background: var(--bd-overlay-bg);
|
|
53
|
+
backdrop-filter: blur(4px);
|
|
54
|
+
-webkit-backdrop-filter: blur(4px);
|
|
55
|
+
padding: 24px;
|
|
56
|
+
overflow-y: auto;
|
|
57
|
+
overscroll-behavior: contain;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ── Positions ─────────────────────────────────────────────── */
|
|
61
|
+
|
|
62
|
+
.bd-overlay.top { align-items: flex-start; padding-top: 80px }
|
|
63
|
+
.bd-overlay.bottom { align-items: flex-end; padding-bottom: 80px }
|
|
64
|
+
.bd-overlay.left { justify-content: flex-start; padding-left: 48px }
|
|
65
|
+
.bd-overlay.right { justify-content: flex-end; padding-right: 48px }
|
|
66
|
+
.bd-overlay.top-left { align-items: flex-start; justify-content: flex-start; padding: 48px }
|
|
67
|
+
.bd-overlay.top-right { align-items: flex-start; justify-content: flex-end; padding: 48px }
|
|
68
|
+
.bd-overlay.bottom-left { align-items: flex-end; justify-content: flex-start; padding: 48px }
|
|
69
|
+
.bd-overlay.bottom-right { align-items: flex-end; justify-content: flex-end; padding: 48px }
|
|
70
|
+
|
|
71
|
+
/* ── Dialog ────────────────────────────────────────────────── */
|
|
72
|
+
|
|
73
|
+
.bd-dialog {
|
|
74
|
+
position: relative;
|
|
75
|
+
max-width: calc(100vw - 48px);
|
|
76
|
+
max-height: calc(100vh - 48px);
|
|
77
|
+
background: var(--bd-bg);
|
|
78
|
+
border-radius: 14px;
|
|
79
|
+
box-shadow:
|
|
80
|
+
0 0 0 1px rgba(0, 0, 0, .04),
|
|
81
|
+
0 24px 64px rgba(0, 0, 0, .18),
|
|
82
|
+
0 8px 20px rgba(0, 0, 0, .08);
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
line-height: 1.6;
|
|
88
|
+
color: var(--bd-text);
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.bd-dialog--fullscreen {
|
|
93
|
+
width: 100vw !important;
|
|
94
|
+
height: 100vh !important;
|
|
95
|
+
max-width: none;
|
|
96
|
+
max-height: none;
|
|
97
|
+
border-radius: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.bd-overlay.bd-fullscreen {
|
|
101
|
+
padding: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ── Close Button ──────────────────────────────────────────── */
|
|
105
|
+
|
|
106
|
+
.bd-dialog__close {
|
|
107
|
+
position: absolute;
|
|
108
|
+
top: 14px;
|
|
109
|
+
right: 14px;
|
|
110
|
+
display: flex;
|
|
111
|
+
align-items: center;
|
|
112
|
+
justify-content: center;
|
|
113
|
+
width: 30px;
|
|
114
|
+
height: 30px;
|
|
115
|
+
padding: 0;
|
|
116
|
+
border: none;
|
|
117
|
+
border-radius: 8px;
|
|
118
|
+
background: transparent;
|
|
119
|
+
color: var(--bd-text-muted);
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
transition: all .2s cubic-bezier(.4, 0, .2, 1);
|
|
122
|
+
z-index: 2;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.bd-dialog__close:hover {
|
|
126
|
+
background: var(--bd-surface-hover);
|
|
127
|
+
color: var(--bd-text);
|
|
128
|
+
transform: rotate(90deg);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.bd-dialog__close:active {
|
|
132
|
+
background: var(--bd-surface-active);
|
|
133
|
+
transform: rotate(90deg) scale(.92);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* ── Header ────────────────────────────────────────────────── */
|
|
137
|
+
|
|
138
|
+
.bd-dialog__header {
|
|
139
|
+
padding: 20px 52px 0 24px;
|
|
140
|
+
flex-shrink: 0;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.bd-dialog__title {
|
|
144
|
+
font-size: 16px;
|
|
145
|
+
font-weight: 600;
|
|
146
|
+
color: var(--bd-text);
|
|
147
|
+
line-height: 1.5;
|
|
148
|
+
display: block;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ── Body ──────────────────────────────────────────────────── */
|
|
152
|
+
|
|
153
|
+
.bd-dialog__body {
|
|
154
|
+
padding: 16px 24px;
|
|
155
|
+
overflow-y: auto;
|
|
156
|
+
overscroll-behavior: contain;
|
|
157
|
+
flex: 1;
|
|
158
|
+
min-height: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.bd-dialog__body:empty {
|
|
162
|
+
display: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.bd-dialog__text {
|
|
166
|
+
margin: 0;
|
|
167
|
+
color: var(--bd-text-secondary);
|
|
168
|
+
line-height: 1.7;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.bd-dialog__html {
|
|
172
|
+
color: var(--bd-text-secondary);
|
|
173
|
+
line-height: 1.7;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.bd-dialog__iframe {
|
|
177
|
+
width: 100%;
|
|
178
|
+
height: 420px;
|
|
179
|
+
border: none;
|
|
180
|
+
border-radius: 6px;
|
|
181
|
+
display: block;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.bd-dialog__input {
|
|
185
|
+
width: 100%;
|
|
186
|
+
padding: 9px 12px;
|
|
187
|
+
border: 1px solid var(--bd-border);
|
|
188
|
+
border-radius: 8px;
|
|
189
|
+
font-size: 14px;
|
|
190
|
+
line-height: 1.5;
|
|
191
|
+
color: var(--bd-text);
|
|
192
|
+
background: transparent;
|
|
193
|
+
outline: none;
|
|
194
|
+
transition: border-color .2s, box-shadow .2s;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.bd-dialog__input:focus {
|
|
198
|
+
border-color: var(--bd-primary);
|
|
199
|
+
box-shadow: 0 0 0 2px var(--bd-input-focus-ring);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/* ── Footer ────────────────────────────────────────────────── */
|
|
203
|
+
|
|
204
|
+
.bd-dialog__footer {
|
|
205
|
+
padding: 0 24px 20px;
|
|
206
|
+
display: flex;
|
|
207
|
+
justify-content: flex-end;
|
|
208
|
+
gap: 8px;
|
|
209
|
+
flex-shrink: 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* ── Action Buttons ────────────────────────────────────────── */
|
|
213
|
+
|
|
214
|
+
.bd-dialog__btn {
|
|
215
|
+
display: inline-flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: center;
|
|
218
|
+
min-width: 72px;
|
|
219
|
+
height: 36px;
|
|
220
|
+
padding: 0 16px;
|
|
221
|
+
border: 1px solid var(--bd-border);
|
|
222
|
+
border-radius: 8px;
|
|
223
|
+
background: var(--bd-bg);
|
|
224
|
+
color: var(--bd-text-secondary);
|
|
225
|
+
font-size: 14px;
|
|
226
|
+
font-weight: 500;
|
|
227
|
+
line-height: 1;
|
|
228
|
+
cursor: pointer;
|
|
229
|
+
user-select: none;
|
|
230
|
+
text-decoration: none;
|
|
231
|
+
white-space: nowrap;
|
|
232
|
+
transition: all .2s cubic-bezier(.4, 0, .2, 1);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.bd-dialog__btn:hover {
|
|
236
|
+
border-color: var(--bd-border-hover);
|
|
237
|
+
color: var(--bd-text);
|
|
238
|
+
background: var(--bd-surface-subtle);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.bd-dialog__btn:active {
|
|
242
|
+
transform: scale(.96);
|
|
243
|
+
background: var(--bd-surface-hover);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.bd-dialog__btn--primary {
|
|
247
|
+
background: var(--bd-primary);
|
|
248
|
+
border-color: var(--bd-primary);
|
|
249
|
+
color: #fff;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.bd-dialog__btn--primary:hover {
|
|
253
|
+
background: var(--bd-primary-hover);
|
|
254
|
+
border-color: var(--bd-primary-hover);
|
|
255
|
+
color: #fff;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.bd-dialog__btn--primary:active {
|
|
259
|
+
background: var(--bd-primary-active);
|
|
260
|
+
border-color: var(--bd-primary-active);
|
|
261
|
+
color: #fff;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* ── Overlay Transition (fade) ─────────────────────────────── */
|
|
265
|
+
|
|
266
|
+
.bd-overlay-enter-active {
|
|
267
|
+
transition: opacity .25s cubic-bezier(.4, 0, .2, 1);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.bd-overlay-leave-active {
|
|
271
|
+
transition: opacity .2s cubic-bezier(.4, 0, .2, 1);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.bd-overlay-enter-from,
|
|
275
|
+
.bd-overlay-leave-to {
|
|
276
|
+
opacity: 0;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/* ── Zoom Transition (center default) ─────────────────────── */
|
|
280
|
+
|
|
281
|
+
.bd-zoom-enter-active {
|
|
282
|
+
animation: bd-zoom-in .32s cubic-bezier(.34, 1.56, .64, 1) both;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.bd-zoom-leave-active {
|
|
286
|
+
animation: bd-zoom-out .2s cubic-bezier(.4, 0, 1, 1) both;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@keyframes bd-zoom-in {
|
|
290
|
+
from {
|
|
291
|
+
opacity: 0;
|
|
292
|
+
transform: scale(.85) translateY(8px);
|
|
293
|
+
}
|
|
294
|
+
to {
|
|
295
|
+
opacity: 1;
|
|
296
|
+
transform: scale(1) translateY(0);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
@keyframes bd-zoom-out {
|
|
301
|
+
from {
|
|
302
|
+
opacity: 1;
|
|
303
|
+
transform: scale(1) translateY(0);
|
|
304
|
+
}
|
|
305
|
+
to {
|
|
306
|
+
opacity: 0;
|
|
307
|
+
transform: scale(.92) translateY(4px);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/* ── Slide Transition (top/bottom/left/right) ─────────────── */
|
|
312
|
+
|
|
313
|
+
.bd-slide-enter-active {
|
|
314
|
+
animation: var(--bd-slide-in, bd-slide-down-in) .35s cubic-bezier(.34, 1.2, .64, 1) both;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.bd-slide-leave-active {
|
|
318
|
+
animation: var(--bd-slide-out, bd-slide-down-out) .22s cubic-bezier(.4, 0, 1, 1) both;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/* Slide down (top position) */
|
|
322
|
+
@keyframes bd-slide-down-in {
|
|
323
|
+
from {
|
|
324
|
+
opacity: 0;
|
|
325
|
+
transform: translateY(-40px) scale(.98);
|
|
326
|
+
}
|
|
327
|
+
to {
|
|
328
|
+
opacity: 1;
|
|
329
|
+
transform: translateY(0) scale(1);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
@keyframes bd-slide-down-out {
|
|
334
|
+
from {
|
|
335
|
+
opacity: 1;
|
|
336
|
+
transform: translateY(0) scale(1);
|
|
337
|
+
}
|
|
338
|
+
to {
|
|
339
|
+
opacity: 0;
|
|
340
|
+
transform: translateY(-30px) scale(.98);
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* Slide up (bottom position) */
|
|
345
|
+
.bd-overlay.bottom .bd-slide-enter-active {
|
|
346
|
+
--bd-slide-in: bd-slide-up-in;
|
|
347
|
+
}
|
|
348
|
+
.bd-overlay.bottom .bd-slide-leave-active {
|
|
349
|
+
--bd-slide-out: bd-slide-up-out;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@keyframes bd-slide-up-in {
|
|
353
|
+
from {
|
|
354
|
+
opacity: 0;
|
|
355
|
+
transform: translateY(40px) scale(.98);
|
|
356
|
+
}
|
|
357
|
+
to {
|
|
358
|
+
opacity: 1;
|
|
359
|
+
transform: translateY(0) scale(1);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@keyframes bd-slide-up-out {
|
|
364
|
+
from {
|
|
365
|
+
opacity: 1;
|
|
366
|
+
transform: translateY(0) scale(1);
|
|
367
|
+
}
|
|
368
|
+
to {
|
|
369
|
+
opacity: 0;
|
|
370
|
+
transform: translateY(30px) scale(.98);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
/* Slide left (left position) */
|
|
375
|
+
.bd-overlay.left .bd-slide-enter-active,
|
|
376
|
+
.bd-overlay.top-left .bd-slide-enter-active,
|
|
377
|
+
.bd-overlay.bottom-left .bd-slide-enter-active {
|
|
378
|
+
--bd-slide-in: bd-slide-left-in;
|
|
379
|
+
}
|
|
380
|
+
.bd-overlay.left .bd-slide-leave-active,
|
|
381
|
+
.bd-overlay.top-left .bd-slide-leave-active,
|
|
382
|
+
.bd-overlay.bottom-left .bd-slide-leave-active {
|
|
383
|
+
--bd-slide-out: bd-slide-left-out;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
@keyframes bd-slide-left-in {
|
|
387
|
+
from {
|
|
388
|
+
opacity: 0;
|
|
389
|
+
transform: translateX(-40px) scale(.98);
|
|
390
|
+
}
|
|
391
|
+
to {
|
|
392
|
+
opacity: 1;
|
|
393
|
+
transform: translateX(0) scale(1);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
@keyframes bd-slide-left-out {
|
|
398
|
+
from {
|
|
399
|
+
opacity: 1;
|
|
400
|
+
transform: translateX(0) scale(1);
|
|
401
|
+
}
|
|
402
|
+
to {
|
|
403
|
+
opacity: 0;
|
|
404
|
+
transform: translateX(-30px) scale(.98);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/* Slide right (right position) */
|
|
409
|
+
.bd-overlay.right .bd-slide-enter-active,
|
|
410
|
+
.bd-overlay.top-right .bd-slide-enter-active,
|
|
411
|
+
.bd-overlay.bottom-right .bd-slide-enter-active {
|
|
412
|
+
--bd-slide-in: bd-slide-right-in;
|
|
413
|
+
}
|
|
414
|
+
.bd-overlay.right .bd-slide-leave-active,
|
|
415
|
+
.bd-overlay.top-right .bd-slide-leave-active,
|
|
416
|
+
.bd-overlay.bottom-right .bd-slide-leave-active {
|
|
417
|
+
--bd-slide-out: bd-slide-right-out;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@keyframes bd-slide-right-in {
|
|
421
|
+
from {
|
|
422
|
+
opacity: 0;
|
|
423
|
+
transform: translateX(40px) scale(.98);
|
|
424
|
+
}
|
|
425
|
+
to {
|
|
426
|
+
opacity: 1;
|
|
427
|
+
transform: translateX(0) scale(1);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@keyframes bd-slide-right-out {
|
|
432
|
+
from {
|
|
433
|
+
opacity: 1;
|
|
434
|
+
transform: translateX(0) scale(1);
|
|
435
|
+
}
|
|
436
|
+
to {
|
|
437
|
+
opacity: 0;
|
|
438
|
+
transform: translateX(30px) scale(.98);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
/* ── Fade Transition ──────────────────────────────────────── */
|
|
443
|
+
|
|
444
|
+
.bd-fade-enter-active {
|
|
445
|
+
animation: bd-fade-in .28s cubic-bezier(.4, 0, .2, 1) both;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.bd-fade-leave-active {
|
|
449
|
+
animation: bd-fade-out .18s cubic-bezier(.4, 0, 1, 1) both;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
@keyframes bd-fade-in {
|
|
453
|
+
from { opacity: 0; transform: scale(.97); }
|
|
454
|
+
to { opacity: 1; transform: scale(1); }
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@keyframes bd-fade-out {
|
|
458
|
+
from { opacity: 1; transform: scale(1); }
|
|
459
|
+
to { opacity: 0; transform: scale(.97); }
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* ── Responsive ────────────────────────────────────────────── */
|
|
463
|
+
|
|
464
|
+
@media (max-width: 640px) {
|
|
465
|
+
.bd-overlay {
|
|
466
|
+
padding: 16px;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.bd-dialog {
|
|
470
|
+
max-width: calc(100vw - 32px);
|
|
471
|
+
border-radius: 12px;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.bd-dialog__header {
|
|
475
|
+
padding: 16px 44px 0 16px;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
.bd-dialog__body {
|
|
479
|
+
padding: 12px 16px;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.bd-dialog__footer {
|
|
483
|
+
padding: 0 16px 16px;
|
|
484
|
+
flex-wrap: wrap;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.bd-dialog__btn {
|
|
488
|
+
flex: 1;
|
|
489
|
+
min-width: 0;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
.bd-overlay.top { padding-top: 48px }
|
|
493
|
+
.bd-overlay.bottom { padding-bottom: 48px }
|
|
494
|
+
.bd-overlay.left { padding-left: 16px }
|
|
495
|
+
.bd-overlay.right { padding-right: 16px }
|
|
496
|
+
.bd-overlay.top-left,
|
|
497
|
+
.bd-overlay.top-right,
|
|
498
|
+
.bd-overlay.bottom-left,
|
|
499
|
+
.bd-overlay.bottom-right { padding: 24px }
|
|
500
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "best-dialog",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Lightweight, beautiful Vue3 dialog component with Nuxt 3 support. Template / Composable / Functional API with alert, confirm, prompt.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"import": "./dist/module.mjs",
|
|
9
|
+
"types": "./dist/module.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"./runtime": {
|
|
12
|
+
"import": "./dist/runtime/index.mjs",
|
|
13
|
+
"types": "./dist/runtime/index.d.ts"
|
|
14
|
+
},
|
|
15
|
+
"./dist/runtime/style.css": "./dist/runtime/style.css"
|
|
16
|
+
},
|
|
17
|
+
"main": "./dist/module.mjs",
|
|
18
|
+
"module": "./dist/module.mjs",
|
|
19
|
+
"types": "./dist/module.d.ts",
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"keywords": [
|
|
24
|
+
"vue",
|
|
25
|
+
"vue3",
|
|
26
|
+
"nuxt",
|
|
27
|
+
"nuxt3",
|
|
28
|
+
"dialog",
|
|
29
|
+
"modal",
|
|
30
|
+
"alert",
|
|
31
|
+
"confirm",
|
|
32
|
+
"prompt",
|
|
33
|
+
"component",
|
|
34
|
+
"ui"
|
|
35
|
+
],
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/ajaxjs/best-dialog.git"
|
|
40
|
+
},
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/ajaxjs/best-dialog/issues"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/ajaxjs/best-dialog#readme",
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"vue": ">=3.3.0"
|
|
47
|
+
},
|
|
48
|
+
"peerDependenciesMeta": {
|
|
49
|
+
"@nuxt/kit": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@nuxt/kit": "^3.16.0",
|
|
55
|
+
"unbuild": "^3.5.0",
|
|
56
|
+
"vue": "^3.5.0",
|
|
57
|
+
"typescript": "^5.7.0"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "unbuild",
|
|
61
|
+
"pub": "npm version patch && pnpm publish --no-git-checks",
|
|
62
|
+
"pub:minor": "npm version minor && pnpm publish --no-git-checks",
|
|
63
|
+
"pub:major": "npm version major && pnpm publish --no-git-checks"
|
|
64
|
+
}
|
|
65
|
+
}
|