cynx-lib 1.3.115 → 1.3.117

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 (44) hide show
  1. package/gen.js +77 -77
  2. package/package.json +1 -1
  3. package/ui/components/ActionsMenu.jsx +357 -357
  4. package/ui/components/BrandingCard.jsx +6 -6
  5. package/ui/components/Drawer.jsx +208 -208
  6. package/ui/components/Globe.jsx +764 -764
  7. package/ui/components/HoverCard.jsx +85 -85
  8. package/ui/components/PrivacyBlur.jsx +603 -603
  9. package/utils/index.js +24 -24
  10. package/utils/utils/db.cjs +6 -6
  11. package/utils/utils/db.js +8 -8
  12. package/utils/utils/duration.js +139 -139
  13. package/utils/utils/oidc.js +214 -214
  14. package/utils/utils/realtime.js +1634 -1634
  15. package/utils/utils/server.js +371 -371
  16. package/utils/utils/session.js +131 -131
  17. package/utils/utils/session_manager.js +580 -580
  18. package/utils/utils/sso_manager.js +702 -702
  19. package/utils/utils/storage.js +393 -393
  20. package/utils/utils/ui.js +111 -111
  21. package/vue/components/Badge.vue +79 -79
  22. package/vue/components/Button.vue +209 -209
  23. package/vue/components/Checkbox.vue +103 -103
  24. package/vue/components/CircularProgress.vue +383 -383
  25. package/vue/components/Divider.vue +94 -94
  26. package/vue/components/Drawer.vue +243 -243
  27. package/vue/components/InfoBadge.vue +223 -223
  28. package/vue/components/Input.vue +341 -341
  29. package/vue/components/LinearProgress.vue +268 -268
  30. package/vue/components/Modal.vue +226 -226
  31. package/vue/components/Pagination.vue +199 -199
  32. package/vue/components/Select.vue +713 -713
  33. package/vue/components/Sidebar.vue +955 -955
  34. package/vue/components/Skeleton.vue +91 -91
  35. package/vue/components/Spinner.vue +263 -263
  36. package/vue/components/StatusTag.vue +89 -89
  37. package/vue/components/TabBar.vue +176 -176
  38. package/vue/components/Table.vue +393 -393
  39. package/vue/components/TimePicker.vue +399 -399
  40. package/vue/components/Toggle.vue +115 -115
  41. package/vue/components/XTable.vue +140 -140
  42. package/vue/composables/useAutoSkeletonRows.ts +71 -71
  43. package/vue/index.d.ts +67 -67
  44. package/vue/index.js +86 -86
@@ -1,399 +1,399 @@
1
- <script setup lang="ts">
2
- import { ref, computed, watch, onMounted, onBeforeUnmount, nextTick } from "vue";
3
- import { ChevronDown, Check, X, Clock } from "lucide-vue-next";
4
-
5
- function pad(n: number | string): string {
6
- return String(n).padStart(2, "0");
7
- }
8
-
9
- function parseTime(val?: string, showSeconds = false) {
10
- if (!val || typeof val !== "string") {
11
- return { h: "00", m: "00", s: "00" };
12
- }
13
- const clean = val.trim();
14
- const parts = clean.split(":").map((p) => p.trim());
15
- const hNum = Math.min(23, Math.max(0, parseInt(parts[0], 10) || 0));
16
- const mNum = Math.min(59, Math.max(0, parseInt(parts[1], 10) || 0));
17
- const sNum = Math.min(59, Math.max(0, parseInt(parts[2], 10) || 0));
18
- return {
19
- h: pad(hNum),
20
- m: pad(mNum),
21
- s: pad(sNum),
22
- };
23
- }
24
-
25
- const props = withDefaults(
26
- defineProps<{
27
- modelValue?: string;
28
- value?: string;
29
- showSeconds?: boolean;
30
- disabled?: boolean;
31
- size?: "xs" | "sm" | "md" | "lg";
32
- placeholder?: string;
33
- }>(),
34
- {
35
- modelValue: "",
36
- value: "",
37
- showSeconds: false,
38
- disabled: false,
39
- size: "md",
40
- placeholder: "",
41
- }
42
- );
43
-
44
- const emit = defineEmits<{
45
- (e: "update:modelValue", val: string): void;
46
- (e: "update:value", val: string): void;
47
- (e: "change", val: string): void;
48
- }>();
49
-
50
- const currentVal = computed(() => {
51
- return props.modelValue !== undefined && props.modelValue !== ""
52
- ? props.modelValue
53
- : props.value;
54
- });
55
-
56
- const open = ref(false);
57
- const btnRef = ref<HTMLElement | null>(null);
58
- const dropRef = ref<HTMLElement | null>(null);
59
- const pos = ref({ top: 0, left: 0 });
60
-
61
- const hours = Array.from({ length: 24 }, (_, i) => pad(i));
62
- const minutes = Array.from({ length: 60 }, (_, i) => pad(i));
63
- const seconds = Array.from({ length: 60 }, (_, i) => pad(i));
64
-
65
- const activeTime = ref(parseTime(currentVal.value, props.showSeconds));
66
-
67
- watch(
68
- currentVal,
69
- (newVal) => {
70
- activeTime.value = parseTime(newVal, props.showSeconds);
71
- },
72
- { immediate: true }
73
- );
74
-
75
- const displayLabel = computed(() => {
76
- if (!currentVal.value && props.placeholder) return props.placeholder;
77
- const t = activeTime.value;
78
- return props.showSeconds ? `${t.h}:${t.m}:${t.s}` : `${t.h}:${t.m}`;
79
- });
80
-
81
- function emitTime() {
82
- const t = activeTime.value;
83
- const result = props.showSeconds ? `${t.h}:${t.m}:${t.s}` : `${t.h}:${t.m}`;
84
- emit("update:modelValue", result);
85
- emit("update:value", result);
86
- emit("change", result);
87
- }
88
-
89
- function selectHour(h: string) {
90
- activeTime.value.h = h;
91
- emitTime();
92
- }
93
-
94
- function selectMinute(m: string) {
95
- activeTime.value.m = m;
96
- emitTime();
97
- }
98
-
99
- function selectSecond(s: string) {
100
- activeTime.value.s = s;
101
- emitTime();
102
- }
103
-
104
- function resetTime() {
105
- activeTime.value = { h: "00", m: "00", s: "00" };
106
- emitTime();
107
- }
108
-
109
- function done() {
110
- open.value = false;
111
- }
112
-
113
- const calcPos = () => {
114
- if (!btnRef.value) return;
115
- const r = btnRef.value.getBoundingClientRect();
116
- const dropW = props.showSeconds ? 220 : 160;
117
- const dropH = 220;
118
-
119
- let left = r.left;
120
- if (left + dropW > window.innerWidth - 12) {
121
- left = Math.max(12, window.innerWidth - dropW - 12);
122
- }
123
- if (left < 12) left = 12;
124
-
125
- let top = r.bottom + 4;
126
- if (top + dropH > window.innerHeight - 12 && r.top - dropH - 4 > 12) {
127
- top = r.top - dropH - 4;
128
- } else if (top + dropH > window.innerHeight - 12) {
129
- top = Math.max(12, window.innerHeight - dropH - 12);
130
- }
131
- if (top < 12) top = 12;
132
-
133
- pos.value = { top, left };
134
- };
135
-
136
- const togglePicker = () => {
137
- if (props.disabled) return;
138
- if (!open.value) calcPos();
139
- open.value = !open.value;
140
- };
141
-
142
- const handleWindowClick = (e: MouseEvent) => {
143
- if (!open.value) return;
144
- const target = e.target as Node;
145
- if (btnRef.value?.contains(target)) return;
146
- if (dropRef.value?.contains(target)) return;
147
- open.value = false;
148
- };
149
-
150
- const handleKeyDown = (e: KeyboardEvent) => {
151
- if (e.key === "Escape" && open.value) {
152
- open.value = false;
153
- }
154
- };
155
-
156
- watch(open, (isOpen) => {
157
- if (isOpen) {
158
- calcPos();
159
- window.addEventListener("scroll", calcPos, true);
160
- window.addEventListener("resize", calcPos);
161
- document.addEventListener("mousedown", handleWindowClick, true);
162
- document.addEventListener("keydown", handleKeyDown);
163
- nextTick(calcPos);
164
- } else {
165
- window.removeEventListener("scroll", calcPos, true);
166
- window.removeEventListener("resize", calcPos);
167
- document.removeEventListener("mousedown", handleWindowClick, true);
168
- document.removeEventListener("keydown", handleKeyDown);
169
- }
170
- });
171
-
172
- onBeforeUnmount(() => {
173
- window.removeEventListener("scroll", calcPos, true);
174
- window.removeEventListener("resize", calcPos);
175
- document.removeEventListener("mousedown", handleWindowClick, true);
176
- document.removeEventListener("keydown", handleKeyDown);
177
- });
178
- </script>
179
-
180
- <template>
181
- <div style="position: relative; display: inline-flex;">
182
- <!-- Trigger Button -->
183
- <button
184
- ref="btnRef"
185
- type="button"
186
- :disabled="disabled"
187
- style="
188
- display: inline-flex;
189
- align-items: center;
190
- gap: 6px;
191
- padding: 0 8px;
192
- height: 28px;
193
- font-size: 12px;
194
- font-weight: 600;
195
- border-radius: var(--radxs, 6px);
196
- border: 1px solid var(--border, #e2e8f0);
197
- background: var(--surface, #ffffff);
198
- color: var(--primary-text, #0f172a);
199
- cursor: pointer;
200
- user-select: none;
201
- transition: border-color .14s;
202
- "
203
- :style="{
204
- borderColor: open ? 'var(--accent, #12675D)' : 'var(--border, #e2e8f0)',
205
- opacity: disabled ? 0.45 : 1,
206
- cursor: disabled ? 'not-allowed' : 'pointer',
207
- }"
208
- @click="togglePicker"
209
- >
210
- <span style="font-variant-numeric: tabular-nums;">
211
- {{ displayLabel }}
212
- </span>
213
- <ChevronDown
214
- :size="12"
215
- style="
216
- color: var(--muted, #797b8d);
217
- transition: transform .18s;
218
- "
219
- :style="{
220
- transform: open ? 'rotate(180deg)' : 'none',
221
- }"
222
- />
223
- </button>
224
-
225
- <!-- Dropdown Popup via Teleport -->
226
- <Teleport to="body">
227
- <div
228
- v-if="open"
229
- ref="dropRef"
230
- class="cynx-timepicker-drop"
231
- style="
232
- position: fixed;
233
- z-index: 999999;
234
- background: var(--surface, #ffffff);
235
- border: 1px solid var(--border, #e2e8f0);
236
- border-radius: 10px;
237
- box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,0.15));
238
- padding: 8px;
239
- box-sizing: border-box;
240
- user-select: none;
241
- font-family: var(--sans, inherit);
242
- "
243
- :style="{
244
- top: `${pos.top}px`,
245
- left: `${pos.left}px`,
246
- width: showSeconds ? '220px' : '155px',
247
- }"
248
- >
249
- <!-- Columns Header & Lists -->
250
- <div
251
- style="display: grid; gap: 4px;"
252
- :style="{
253
- gridTemplateColumns: showSeconds ? '1fr 1fr 1fr' : '1fr 1fr',
254
- }"
255
- >
256
- <!-- Hours Column -->
257
- <div>
258
- <div style="font-size: 10.5px; font-weight: 600; color: var(--muted, #797b8d); text-align: center; margin-bottom: 3px;">
259
- Час
260
- </div>
261
- <div class="custom-scrollbar" style="max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px;">
262
- <button
263
- v-for="h in hours"
264
- :key="h"
265
- type="button"
266
- style="
267
- padding: 3px 0;
268
- border-radius: var(--radxs, 4px);
269
- border: none;
270
- font-size: 11.5px;
271
- cursor: pointer;
272
- text-align: center;
273
- transition: background .12s, color .12s;
274
- "
275
- :style="{
276
- fontWeight: activeTime.h === h ? 700 : 400,
277
- background: activeTime.h === h ? 'var(--accent, #12675D)' : 'transparent',
278
- color: activeTime.h === h ? '#ffffff' : 'var(--primary-text, #0f172a)',
279
- }"
280
- @click="selectHour(h)"
281
- >
282
- {{ h }}
283
- </button>
284
- </div>
285
- </div>
286
-
287
- <!-- Minutes Column -->
288
- <div>
289
- <div style="font-size: 10.5px; font-weight: 600; color: var(--muted, #797b8d); text-align: center; margin-bottom: 3px;">
290
- Мин
291
- </div>
292
- <div class="custom-scrollbar" style="max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px;">
293
- <button
294
- v-for="m in minutes"
295
- :key="m"
296
- type="button"
297
- style="
298
- padding: 3px 0;
299
- border-radius: var(--radxs, 4px);
300
- border: none;
301
- font-size: 11.5px;
302
- cursor: pointer;
303
- text-align: center;
304
- transition: background .12s, color .12s;
305
- "
306
- :style="{
307
- fontWeight: activeTime.m === m ? 700 : 400,
308
- background: activeTime.m === m ? 'var(--accent, #12675D)' : 'transparent',
309
- color: activeTime.m === m ? '#ffffff' : 'var(--primary-text, #0f172a)',
310
- }"
311
- @click="selectMinute(m)"
312
- >
313
- {{ m }}
314
- </button>
315
- </div>
316
- </div>
317
-
318
- <!-- Seconds Column -->
319
- <div v-if="showSeconds">
320
- <div style="font-size: 10.5px; font-weight: 600; color: var(--muted, #797b8d); text-align: center; margin-bottom: 3px;">
321
- Сек
322
- </div>
323
- <div class="custom-scrollbar" style="max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px;">
324
- <button
325
- v-for="s in seconds"
326
- :key="s"
327
- type="button"
328
- style="
329
- padding: 3px 0;
330
- border-radius: var(--radxs, 4px);
331
- border: none;
332
- font-size: 11.5px;
333
- cursor: pointer;
334
- text-align: center;
335
- transition: background .12s, color .12s;
336
- "
337
- :style="{
338
- fontWeight: activeTime.s === s ? 700 : 400,
339
- background: activeTime.s === s ? 'var(--accent, #12675D)' : 'transparent',
340
- color: activeTime.s === s ? '#ffffff' : 'var(--primary-text, #0f172a)',
341
- }"
342
- @click="selectSecond(s)"
343
- >
344
- {{ s }}
345
- </button>
346
- </div>
347
- </div>
348
- </div>
349
-
350
- <!-- Footer Actions -->
351
- <div
352
- style="
353
- margin-top: 6px;
354
- padding-top: 5px;
355
- border-top: 1px solid var(--border-light, #ebebf0);
356
- display: flex;
357
- justify-content: space-between;
358
- align-items: center;
359
- "
360
- >
361
- <button
362
- type="button"
363
- style="
364
- background: none;
365
- border: none;
366
- cursor: pointer;
367
- color: var(--danger, #f64747);
368
- font-size: 11px;
369
- font-weight: 500;
370
- padding: 2px 4px;
371
- "
372
- @click="resetTime"
373
- >
374
- Сбросить
375
- </button>
376
- <button
377
- type="button"
378
- style="
379
- background: var(--accent, #12675D);
380
- color: #ffffff;
381
- border: none;
382
- border-radius: var(--radxs, 4px);
383
- padding: 3px 8px;
384
- font-size: 11px;
385
- font-weight: 600;
386
- cursor: pointer;
387
- display: inline-flex;
388
- align-items: center;
389
- gap: 3px;
390
- "
391
- @click="done"
392
- >
393
- <Check :size="12" /> Готово
394
- </button>
395
- </div>
396
- </div>
397
- </Teleport>
398
- </div>
399
- </template>
1
+ <script setup lang="ts">
2
+ import { ref, computed, watch, onMounted, onBeforeUnmount, nextTick } from "vue";
3
+ import { ChevronDown, Check, X, Clock } from "lucide-vue-next";
4
+
5
+ function pad(n: number | string): string {
6
+ return String(n).padStart(2, "0");
7
+ }
8
+
9
+ function parseTime(val?: string, showSeconds = false) {
10
+ if (!val || typeof val !== "string") {
11
+ return { h: "00", m: "00", s: "00" };
12
+ }
13
+ const clean = val.trim();
14
+ const parts = clean.split(":").map((p) => p.trim());
15
+ const hNum = Math.min(23, Math.max(0, parseInt(parts[0], 10) || 0));
16
+ const mNum = Math.min(59, Math.max(0, parseInt(parts[1], 10) || 0));
17
+ const sNum = Math.min(59, Math.max(0, parseInt(parts[2], 10) || 0));
18
+ return {
19
+ h: pad(hNum),
20
+ m: pad(mNum),
21
+ s: pad(sNum),
22
+ };
23
+ }
24
+
25
+ const props = withDefaults(
26
+ defineProps<{
27
+ modelValue?: string;
28
+ value?: string;
29
+ showSeconds?: boolean;
30
+ disabled?: boolean;
31
+ size?: "xs" | "sm" | "md" | "lg";
32
+ placeholder?: string;
33
+ }>(),
34
+ {
35
+ modelValue: "",
36
+ value: "",
37
+ showSeconds: false,
38
+ disabled: false,
39
+ size: "md",
40
+ placeholder: "",
41
+ }
42
+ );
43
+
44
+ const emit = defineEmits<{
45
+ (e: "update:modelValue", val: string): void;
46
+ (e: "update:value", val: string): void;
47
+ (e: "change", val: string): void;
48
+ }>();
49
+
50
+ const currentVal = computed(() => {
51
+ return props.modelValue !== undefined && props.modelValue !== ""
52
+ ? props.modelValue
53
+ : props.value;
54
+ });
55
+
56
+ const open = ref(false);
57
+ const btnRef = ref<HTMLElement | null>(null);
58
+ const dropRef = ref<HTMLElement | null>(null);
59
+ const pos = ref({ top: 0, left: 0 });
60
+
61
+ const hours = Array.from({ length: 24 }, (_, i) => pad(i));
62
+ const minutes = Array.from({ length: 60 }, (_, i) => pad(i));
63
+ const seconds = Array.from({ length: 60 }, (_, i) => pad(i));
64
+
65
+ const activeTime = ref(parseTime(currentVal.value, props.showSeconds));
66
+
67
+ watch(
68
+ currentVal,
69
+ (newVal) => {
70
+ activeTime.value = parseTime(newVal, props.showSeconds);
71
+ },
72
+ { immediate: true }
73
+ );
74
+
75
+ const displayLabel = computed(() => {
76
+ if (!currentVal.value && props.placeholder) return props.placeholder;
77
+ const t = activeTime.value;
78
+ return props.showSeconds ? `${t.h}:${t.m}:${t.s}` : `${t.h}:${t.m}`;
79
+ });
80
+
81
+ function emitTime() {
82
+ const t = activeTime.value;
83
+ const result = props.showSeconds ? `${t.h}:${t.m}:${t.s}` : `${t.h}:${t.m}`;
84
+ emit("update:modelValue", result);
85
+ emit("update:value", result);
86
+ emit("change", result);
87
+ }
88
+
89
+ function selectHour(h: string) {
90
+ activeTime.value.h = h;
91
+ emitTime();
92
+ }
93
+
94
+ function selectMinute(m: string) {
95
+ activeTime.value.m = m;
96
+ emitTime();
97
+ }
98
+
99
+ function selectSecond(s: string) {
100
+ activeTime.value.s = s;
101
+ emitTime();
102
+ }
103
+
104
+ function resetTime() {
105
+ activeTime.value = { h: "00", m: "00", s: "00" };
106
+ emitTime();
107
+ }
108
+
109
+ function done() {
110
+ open.value = false;
111
+ }
112
+
113
+ const calcPos = () => {
114
+ if (!btnRef.value) return;
115
+ const r = btnRef.value.getBoundingClientRect();
116
+ const dropW = props.showSeconds ? 220 : 160;
117
+ const dropH = 220;
118
+
119
+ let left = r.left;
120
+ if (left + dropW > window.innerWidth - 12) {
121
+ left = Math.max(12, window.innerWidth - dropW - 12);
122
+ }
123
+ if (left < 12) left = 12;
124
+
125
+ let top = r.bottom + 4;
126
+ if (top + dropH > window.innerHeight - 12 && r.top - dropH - 4 > 12) {
127
+ top = r.top - dropH - 4;
128
+ } else if (top + dropH > window.innerHeight - 12) {
129
+ top = Math.max(12, window.innerHeight - dropH - 12);
130
+ }
131
+ if (top < 12) top = 12;
132
+
133
+ pos.value = { top, left };
134
+ };
135
+
136
+ const togglePicker = () => {
137
+ if (props.disabled) return;
138
+ if (!open.value) calcPos();
139
+ open.value = !open.value;
140
+ };
141
+
142
+ const handleWindowClick = (e: MouseEvent) => {
143
+ if (!open.value) return;
144
+ const target = e.target as Node;
145
+ if (btnRef.value?.contains(target)) return;
146
+ if (dropRef.value?.contains(target)) return;
147
+ open.value = false;
148
+ };
149
+
150
+ const handleKeyDown = (e: KeyboardEvent) => {
151
+ if (e.key === "Escape" && open.value) {
152
+ open.value = false;
153
+ }
154
+ };
155
+
156
+ watch(open, (isOpen) => {
157
+ if (isOpen) {
158
+ calcPos();
159
+ window.addEventListener("scroll", calcPos, true);
160
+ window.addEventListener("resize", calcPos);
161
+ document.addEventListener("mousedown", handleWindowClick, true);
162
+ document.addEventListener("keydown", handleKeyDown);
163
+ nextTick(calcPos);
164
+ } else {
165
+ window.removeEventListener("scroll", calcPos, true);
166
+ window.removeEventListener("resize", calcPos);
167
+ document.removeEventListener("mousedown", handleWindowClick, true);
168
+ document.removeEventListener("keydown", handleKeyDown);
169
+ }
170
+ });
171
+
172
+ onBeforeUnmount(() => {
173
+ window.removeEventListener("scroll", calcPos, true);
174
+ window.removeEventListener("resize", calcPos);
175
+ document.removeEventListener("mousedown", handleWindowClick, true);
176
+ document.removeEventListener("keydown", handleKeyDown);
177
+ });
178
+ </script>
179
+
180
+ <template>
181
+ <div style="position: relative; display: inline-flex;">
182
+ <!-- Trigger Button -->
183
+ <button
184
+ ref="btnRef"
185
+ type="button"
186
+ :disabled="disabled"
187
+ style="
188
+ display: inline-flex;
189
+ align-items: center;
190
+ gap: 6px;
191
+ padding: 0 8px;
192
+ height: 28px;
193
+ font-size: 12px;
194
+ font-weight: 600;
195
+ border-radius: var(--radxs, 6px);
196
+ border: 1px solid var(--border, #e2e8f0);
197
+ background: var(--surface, #ffffff);
198
+ color: var(--primary-text, #0f172a);
199
+ cursor: pointer;
200
+ user-select: none;
201
+ transition: border-color .14s;
202
+ "
203
+ :style="{
204
+ borderColor: open ? 'var(--accent, #12675D)' : 'var(--border, #e2e8f0)',
205
+ opacity: disabled ? 0.45 : 1,
206
+ cursor: disabled ? 'not-allowed' : 'pointer',
207
+ }"
208
+ @click="togglePicker"
209
+ >
210
+ <span style="font-variant-numeric: tabular-nums;">
211
+ {{ displayLabel }}
212
+ </span>
213
+ <ChevronDown
214
+ :size="12"
215
+ style="
216
+ color: var(--muted, #797b8d);
217
+ transition: transform .18s;
218
+ "
219
+ :style="{
220
+ transform: open ? 'rotate(180deg)' : 'none',
221
+ }"
222
+ />
223
+ </button>
224
+
225
+ <!-- Dropdown Popup via Teleport -->
226
+ <Teleport to="body">
227
+ <div
228
+ v-if="open"
229
+ ref="dropRef"
230
+ class="cynx-timepicker-drop"
231
+ style="
232
+ position: fixed;
233
+ z-index: 999999;
234
+ background: var(--surface, #ffffff);
235
+ border: 1px solid var(--border, #e2e8f0);
236
+ border-radius: 10px;
237
+ box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,0.15));
238
+ padding: 8px;
239
+ box-sizing: border-box;
240
+ user-select: none;
241
+ font-family: var(--sans, inherit);
242
+ "
243
+ :style="{
244
+ top: `${pos.top}px`,
245
+ left: `${pos.left}px`,
246
+ width: showSeconds ? '220px' : '155px',
247
+ }"
248
+ >
249
+ <!-- Columns Header & Lists -->
250
+ <div
251
+ style="display: grid; gap: 4px;"
252
+ :style="{
253
+ gridTemplateColumns: showSeconds ? '1fr 1fr 1fr' : '1fr 1fr',
254
+ }"
255
+ >
256
+ <!-- Hours Column -->
257
+ <div>
258
+ <div style="font-size: 10.5px; font-weight: 600; color: var(--muted, #797b8d); text-align: center; margin-bottom: 3px;">
259
+ Час
260
+ </div>
261
+ <div class="custom-scrollbar" style="max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px;">
262
+ <button
263
+ v-for="h in hours"
264
+ :key="h"
265
+ type="button"
266
+ style="
267
+ padding: 3px 0;
268
+ border-radius: var(--radxs, 4px);
269
+ border: none;
270
+ font-size: 11.5px;
271
+ cursor: pointer;
272
+ text-align: center;
273
+ transition: background .12s, color .12s;
274
+ "
275
+ :style="{
276
+ fontWeight: activeTime.h === h ? 700 : 400,
277
+ background: activeTime.h === h ? 'var(--accent, #12675D)' : 'transparent',
278
+ color: activeTime.h === h ? '#ffffff' : 'var(--primary-text, #0f172a)',
279
+ }"
280
+ @click="selectHour(h)"
281
+ >
282
+ {{ h }}
283
+ </button>
284
+ </div>
285
+ </div>
286
+
287
+ <!-- Minutes Column -->
288
+ <div>
289
+ <div style="font-size: 10.5px; font-weight: 600; color: var(--muted, #797b8d); text-align: center; margin-bottom: 3px;">
290
+ Мин
291
+ </div>
292
+ <div class="custom-scrollbar" style="max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px;">
293
+ <button
294
+ v-for="m in minutes"
295
+ :key="m"
296
+ type="button"
297
+ style="
298
+ padding: 3px 0;
299
+ border-radius: var(--radxs, 4px);
300
+ border: none;
301
+ font-size: 11.5px;
302
+ cursor: pointer;
303
+ text-align: center;
304
+ transition: background .12s, color .12s;
305
+ "
306
+ :style="{
307
+ fontWeight: activeTime.m === m ? 700 : 400,
308
+ background: activeTime.m === m ? 'var(--accent, #12675D)' : 'transparent',
309
+ color: activeTime.m === m ? '#ffffff' : 'var(--primary-text, #0f172a)',
310
+ }"
311
+ @click="selectMinute(m)"
312
+ >
313
+ {{ m }}
314
+ </button>
315
+ </div>
316
+ </div>
317
+
318
+ <!-- Seconds Column -->
319
+ <div v-if="showSeconds">
320
+ <div style="font-size: 10.5px; font-weight: 600; color: var(--muted, #797b8d); text-align: center; margin-bottom: 3px;">
321
+ Сек
322
+ </div>
323
+ <div class="custom-scrollbar" style="max-height: 140px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; padding-right: 2px;">
324
+ <button
325
+ v-for="s in seconds"
326
+ :key="s"
327
+ type="button"
328
+ style="
329
+ padding: 3px 0;
330
+ border-radius: var(--radxs, 4px);
331
+ border: none;
332
+ font-size: 11.5px;
333
+ cursor: pointer;
334
+ text-align: center;
335
+ transition: background .12s, color .12s;
336
+ "
337
+ :style="{
338
+ fontWeight: activeTime.s === s ? 700 : 400,
339
+ background: activeTime.s === s ? 'var(--accent, #12675D)' : 'transparent',
340
+ color: activeTime.s === s ? '#ffffff' : 'var(--primary-text, #0f172a)',
341
+ }"
342
+ @click="selectSecond(s)"
343
+ >
344
+ {{ s }}
345
+ </button>
346
+ </div>
347
+ </div>
348
+ </div>
349
+
350
+ <!-- Footer Actions -->
351
+ <div
352
+ style="
353
+ margin-top: 6px;
354
+ padding-top: 5px;
355
+ border-top: 1px solid var(--border-light, #ebebf0);
356
+ display: flex;
357
+ justify-content: space-between;
358
+ align-items: center;
359
+ "
360
+ >
361
+ <button
362
+ type="button"
363
+ style="
364
+ background: none;
365
+ border: none;
366
+ cursor: pointer;
367
+ color: var(--danger, #f64747);
368
+ font-size: 11px;
369
+ font-weight: 500;
370
+ padding: 2px 4px;
371
+ "
372
+ @click="resetTime"
373
+ >
374
+ Сбросить
375
+ </button>
376
+ <button
377
+ type="button"
378
+ style="
379
+ background: var(--accent, #12675D);
380
+ color: #ffffff;
381
+ border: none;
382
+ border-radius: var(--radxs, 4px);
383
+ padding: 3px 8px;
384
+ font-size: 11px;
385
+ font-weight: 600;
386
+ cursor: pointer;
387
+ display: inline-flex;
388
+ align-items: center;
389
+ gap: 3px;
390
+ "
391
+ @click="done"
392
+ >
393
+ <Check :size="12" /> Готово
394
+ </button>
395
+ </div>
396
+ </div>
397
+ </Teleport>
398
+ </div>
399
+ </template>