@skyservice-developers/vue-dev-kit 1.5.12 → 2.1.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.
Files changed (57) hide show
  1. package/README.md +105 -15
  2. package/dist/api-CZ2GQABL.js +309 -0
  3. package/dist/api-JFgUnzEe.cjs +1 -0
  4. package/dist/components/BaseTeleport.vue.d.ts +14 -0
  5. package/dist/components/Dialog.vue.d.ts +28 -0
  6. package/dist/components/DialogModal.vue.d.ts +28 -0
  7. package/dist/components/DialogNext.vue.d.ts +28 -0
  8. package/dist/components/Header.vue.d.ts +37 -0
  9. package/dist/components/Modal.vue.d.ts +30 -0
  10. package/dist/components/SkyButton.vue.d.ts +22 -0
  11. package/dist/components/SkySelect.vue.d.ts +16 -0
  12. package/dist/components/index.d.ts +8 -0
  13. package/dist/index.d.ts +3 -0
  14. package/dist/sdk/api.d.ts +78 -0
  15. package/dist/sdk/bridge.d.ts +43 -0
  16. package/dist/sdk/index.d.ts +6 -0
  17. package/dist/sdk/types.d.ts +73 -0
  18. package/dist/sdk/webview.d.ts +16 -0
  19. package/dist/sdk.cjs +1 -0
  20. package/dist/sdk.js +33 -0
  21. package/dist/style.css +1 -0
  22. package/dist/vue-dev-kit.cjs +1 -0
  23. package/dist/vue-dev-kit.js +903 -0
  24. package/package.json +32 -43
  25. package/dist/vue2/style.css +0 -1
  26. package/dist/vue2/vue-dev-kit.cjs +0 -1
  27. package/dist/vue2/vue-dev-kit.js +0 -2622
  28. package/dist/vue3/style.css +0 -1
  29. package/dist/vue3/vue-dev-kit.cjs +0 -1
  30. package/dist/vue3/vue-dev-kit.js +0 -2277
  31. package/src/index.js +0 -9
  32. package/src/shared/index.js +0 -1
  33. package/src/shared/types/index.d.ts +0 -72
  34. package/src/shared/utils/index.js +0 -2
  35. package/src/shared/utils/parentBridge.js +0 -84
  36. package/src/shared/utils/webviewCheck.js +0 -54
  37. package/src/styles/scrollbar.css +0 -17
  38. package/src/vue2/components/BaseTeleport.vue +0 -16
  39. package/src/vue2/components/Dialog.vue +0 -106
  40. package/src/vue2/components/DialogModal.vue +0 -439
  41. package/src/vue2/components/DialogNext.vue +0 -379
  42. package/src/vue2/components/Header.vue +0 -466
  43. package/src/vue2/components/Modal.vue +0 -252
  44. package/src/vue2/components/SkyButton.vue +0 -144
  45. package/src/vue2/components/SkySelect.vue +0 -327
  46. package/src/vue2/components/index.js +0 -6
  47. package/src/vue2/index.js +0 -2
  48. package/src/vue3/components/BaseTeleport.vue +0 -16
  49. package/src/vue3/components/Dialog.vue +0 -97
  50. package/src/vue3/components/DialogModal.vue +0 -458
  51. package/src/vue3/components/DialogNext.vue +0 -427
  52. package/src/vue3/components/Header.vue +0 -505
  53. package/src/vue3/components/Modal.vue +0 -253
  54. package/src/vue3/components/SkyButton.vue +0 -140
  55. package/src/vue3/components/SkySelect.vue +0 -266
  56. package/src/vue3/components/index.js +0 -8
  57. package/src/vue3/index.js +0 -2
@@ -1,439 +0,0 @@
1
- <template>
2
- <div
3
- v-if="modelValue"
4
- class="sky-dialogbox sky-dialogbox-classic"
5
- :style="[zIndex ? { 'z-index': zIndex } : null]"
6
- >
7
- <div
8
- class="sky-dialog-overlay"
9
- >
10
- <div ref="dialogContent" class="sky-dialog-content">
11
- <!-- Header -->
12
- <div
13
- class="sky-dialog-title"
14
- :class="{ 'sky-dialog-title-with-subtitle': subtitle }"
15
- >
16
- {{ title }}
17
- <span v-if="subtitle" class="sky-dialog-subtitle">{{
18
- subtitle
19
- }}</span>
20
- </div>
21
-
22
- <button class="sky-dialog-close" :title="closeText" @click="close">
23
- <svg viewBox="0 0 16 16" width="16" height="16">
24
- <line
25
- x1="1"
26
- y1="15"
27
- x2="15"
28
- y2="1"
29
- stroke="currentColor"
30
- stroke-width="2"
31
- />
32
- <line
33
- x1="1"
34
- y1="1"
35
- x2="15"
36
- y2="15"
37
- stroke="currentColor"
38
- stroke-width="2"
39
- />
40
- </svg>
41
- </button>
42
-
43
- <div class="sky-dialog-clearfix" />
44
-
45
- <!-- Body -->
46
- <div
47
- ref="dialogPaper"
48
- class="sky-dialog-paper"
49
- :class="{ 'sky-dialog-paper-no-footer': !showFooter }"
50
- @touchstart="handleTouchStart"
51
- @touchend="handleTouchEnd"
52
- >
53
- <!-- iOS swipe back area -->
54
- <div v-if="isIos" class="sky-dialog-swipe-area" />
55
- <slot></slot>
56
- </div>
57
-
58
- <!-- Footer -->
59
- <div
60
- v-if="showFooter"
61
- class="sky-dialog-footer"
62
- >
63
- <slot name="buttons"></slot>
64
- </div>
65
- </div>
66
- </div>
67
- </div>
68
- </div>
69
- </template>
70
-
71
- <script>
72
- import {
73
- isIosWebview,
74
- isAndroidWebview,
75
- } from "../../shared/utils/webviewCheck";
76
-
77
- export default {
78
- name: "DialogModal",
79
- props: {
80
- modelValue: {
81
- type: Boolean,
82
- default: false,
83
- },
84
- title: {
85
- type: String,
86
- default: "",
87
- },
88
- subtitle: {
89
- type: String,
90
- default: "",
91
- },
92
- zIndex: {
93
- type: [Number, String],
94
- default: null,
95
- },
96
- closeText: {
97
- type: String,
98
- default: "Закрити",
99
- },
100
- closeOnEsc: {
101
- type: Boolean,
102
- default: true,
103
- },
104
- hasButtons: {
105
- type: Boolean,
106
- default: null,
107
- },
108
- },
109
- data() {
110
- return {
111
- touchStartX: 0,
112
- };
113
- },
114
- computed: {
115
- isIos() {
116
- try {
117
- return isIosWebview();
118
- } catch {
119
- return false;
120
- }
121
- },
122
- isAndroid() {
123
- try {
124
- return isAndroidWebview();
125
- } catch {
126
- return false;
127
- }
128
- },
129
- // Determine if footer should be shown
130
- showFooter() {
131
- // If hasButtons prop is explicitly set, use it
132
- if (this.hasButtons !== null) {
133
- return this.hasButtons;
134
- }
135
- // Fallback to slot check (for direct usage without Dialog wrapper)
136
- return !!this.$slots.buttons;
137
- },
138
- },
139
- watch: {
140
- // Body scroll lock
141
- modelValue(value) {
142
- if (value) {
143
- document.body.style.overflow = "hidden";
144
- this.$nextTick(() => {
145
- this.androidFix();
146
- });
147
- } else {
148
- document.body.style.overflow = "";
149
- }
150
- },
151
- },
152
- mounted() {
153
- document.addEventListener("keydown", this.handleKeydown);
154
- window.addEventListener("resize", this.androidFix);
155
- },
156
- beforeDestroy() {
157
- document.removeEventListener("keydown", this.handleKeydown);
158
- window.removeEventListener("resize", this.androidFix);
159
- document.body.style.overflow = "";
160
- },
161
- methods: {
162
- close() {
163
- this.$emit("update:modelValue", false);
164
- this.$emit("close");
165
- },
166
- handleKeydown(e) {
167
- if (e.key === "Escape" && this.closeOnEsc && this.modelValue) {
168
- this.close();
169
- }
170
- if (e.key === "Enter" && this.modelValue) {
171
- this.$emit("save");
172
- }
173
- },
174
- // Touch handling for iOS swipe back
175
- handleTouchStart(e) {
176
- if (e.touches[0].clientX < 35) {
177
- this.touchStartX = e.touches[0].clientX;
178
- }
179
- },
180
- handleTouchEnd(e) {
181
- if (this.touchStartX > 0 && this.touchStartX < 35) {
182
- const touchEndX = e.changedTouches[0].clientX;
183
- if (touchEndX - this.touchStartX > 50) {
184
- this.close();
185
- }
186
- }
187
- this.touchStartX = 0;
188
- },
189
- // Android notch fix
190
- androidFix() {
191
- if (!this.isAndroid || !this.$refs.dialogContent) return;
192
-
193
- try {
194
- if (typeof Android !== "undefined" && Android.getDisplayCutoutTop) {
195
- const cutoutTop = Android.getDisplayCutoutTop();
196
- if (cutoutTop && window.devicePixelRatio > 1.0) {
197
- const paddingTop = cutoutTop / window.devicePixelRatio;
198
- this.$refs.dialogContent.style.paddingTop = paddingTop + "px";
199
- }
200
- }
201
- } catch (err) {
202
- // Android interface not available
203
- }
204
- },
205
- },
206
- };
207
- </script>
208
-
209
- <style>
210
- /* Global styles (не scoped через баг з Teleport) */
211
- .sky-dialogbox-classic {
212
- display: block;
213
- position: fixed;
214
- padding: 0;
215
- top: 0;
216
- left: 0;
217
- width: 100%;
218
- height: 100%;
219
- z-index: var(--sky-dialog-z-index, 9998);
220
- background: rgba(0, 0, 0, 0.6);
221
- backdrop-filter: blur(2px);
222
- }
223
- </style>
224
-
225
- <style scoped>
226
- .sky-dialog-overlay {
227
- display: flex;
228
- justify-content: center;
229
- align-items: center;
230
- position: fixed;
231
- padding: 0;
232
- top: 0;
233
- left: 0;
234
- width: 100%;
235
- height: 100%;
236
- z-index: 9999;
237
- }
238
-
239
- .sky-dialog-content {
240
- background: var(--sky-dialog-bg, white);
241
- width: 100%;
242
- height: 100%;
243
- border-radius: var(--sky-dialog-radius, 5px);
244
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.24);
245
- }
246
-
247
- .sky-dialog-title {
248
- max-width: calc(100% - 80px);
249
- font-size: var(--sky-dialog-title-size, 13pt);
250
- padding: 24px;
251
- padding-right: 0;
252
- float: left;
253
- white-space: nowrap;
254
- overflow: hidden;
255
- text-overflow: ellipsis;
256
- color: var(--sky-dialog-title-color, #252525);
257
- }
258
-
259
- .sky-dialog-subtitle {
260
- display: block;
261
- font-size: var(--sky-dialog-subtitle-size, 12pt);
262
- line-height: 24px;
263
- color: var(--sky-dialog-subtitle-color, #6c757d);
264
- white-space: nowrap;
265
- overflow: hidden;
266
- text-overflow: ellipsis;
267
- }
268
-
269
- .sky-dialog-close {
270
- cursor: pointer;
271
- font-size: 16pt;
272
- margin: 15px;
273
- padding: 17px;
274
- float: right;
275
- border-radius: 50%;
276
- width: 50px;
277
- height: 50px;
278
- background: transparent;
279
- border: none;
280
- display: flex;
281
- align-items: center;
282
- justify-content: center;
283
- color: var(--sky-dialog-close-color, #333);
284
- transition: background-color 0.2s;
285
- }
286
-
287
- .sky-dialog-close:hover {
288
- background-color: var(--sky-dialog-close-hover-bg, #f0f0f0);
289
- }
290
-
291
- .sky-dialog-clearfix {
292
- clear: both;
293
- }
294
-
295
- .sky-dialog-paper {
296
- height: 100%;
297
- overflow-y: auto;
298
- overflow-x: hidden;
299
- -webkit-overflow-scrolling: touch;
300
- position: relative;
301
- }
302
-
303
- .sky-dialog-swipe-area {
304
- position: absolute;
305
- width: 35px;
306
- height: 100%;
307
- left: 0;
308
- }
309
-
310
- .sky-dialog-footer {
311
- padding: 5px 10px;
312
- display: flex;
313
- justify-content: center;
314
- width: 100%;
315
- transform: translateY(-52px);
316
- }
317
-
318
- .sky-dialog-footer > * + * {
319
- margin-left: 10px;
320
- }
321
-
322
- /* Кнопки в футері: 1 = 100%, 2 = по 50% */
323
- .sky-dialog-footer > :deep(*) {
324
- flex: 1;
325
- min-width: 0;
326
- }
327
-
328
- .sky-dialog-footer:has(> :deep(*:only-child)) > :deep(*) {
329
- max-width: 100%;
330
- }
331
-
332
- .sky-dialog-footer:has(
333
- > :deep(*:nth-child(2)):not(:has(> :deep(*:nth-child(3))))
334
- )
335
- > :deep(*) {
336
- flex: 1 1 50%;
337
- }
338
-
339
- /* Desktop */
340
- @media only screen and (min-width: 1400px) {
341
- .sky-dialog-content {
342
- width: 75%;
343
- margin: 0 auto;
344
- }
345
- }
346
-
347
- /* Tablet and Desktop */
348
- @media screen and (min-width: 710px) {
349
- .sky-dialog-paper {
350
- height: calc(100% - 150px);
351
- max-height: calc(100% - 150px);
352
- background-color: #fff;
353
- margin: 0 10px 60px 10px;
354
- border-radius: 5px;
355
- }
356
-
357
- /* Full height when no footer */
358
- .sky-dialog-paper-no-footer {
359
- height: calc(100% - 70px);
360
- max-height: calc(100% - 70px);
361
- margin-bottom: 10px;
362
- }
363
-
364
- .sky-dialogbox,
365
- .sky-dialog-overlay {
366
- padding: 10px;
367
- }
368
- }
369
-
370
- /* Mobile */
371
- @media screen and (max-width: 709px) {
372
- .sky-dialog-paper {
373
- height: calc(100% - 142px);
374
- max-height: calc(100% - 142px);
375
- background-color: #fff;
376
- margin: 0 10px 10px 10px;
377
- border-radius: 5px;
378
- max-width: 100vw !important;
379
- }
380
-
381
- /* Full height when no footer */
382
- .sky-dialog-paper-no-footer {
383
- height: calc(100% - 60px);
384
- max-height: calc(100% - 60px);
385
- }
386
-
387
- .sky-dialog-footer {
388
- transform: translateY(-6px);
389
- }
390
- }
391
-
392
- @media screen and (max-width: 500px) {
393
- .sky-dialog-subtitle {
394
- display: block;
395
- white-space: nowrap;
396
- overflow: hidden;
397
- text-overflow: ellipsis;
398
- }
399
-
400
- .sky-dialog-title-with-subtitle {
401
- padding: 12px 24px !important;
402
- }
403
- }
404
-
405
- @media screen and (max-width: 374px) {
406
- .sky-dialog-subtitle {
407
- font-size: 9pt;
408
- }
409
- }
410
-
411
- /* iPhone safe area support */
412
- @supports (padding-top: env(safe-area-inset-top)) {
413
- .sky-dialog-paper {
414
- height: calc(100% - 150px - env(safe-area-inset-top));
415
- }
416
-
417
- /* Full height when no footer */
418
- .sky-dialog-paper-no-footer {
419
- height: calc(100% - 60px - env(safe-area-inset-top));
420
- }
421
-
422
- .sky-dialog-footer {
423
- padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
424
- }
425
- }
426
-
427
- /* iOS safe area */
428
- @supports (padding-top: env(safe-area-inset-top)) {
429
- .sky-dialog-title {
430
- padding-top: calc(24px + env(safe-area-inset-top));
431
- }
432
- .sky-dialog-close {
433
- margin-top: calc(15px + env(safe-area-inset-top));
434
- }
435
- .sky-dialog-paper {
436
- padding-bottom: env(safe-area-inset-bottom);
437
- }
438
- }
439
- </style>