cynx-lib 1.3.84 → 1.3.86

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 (40) hide show
  1. package/gen.js +77 -77
  2. package/package.json +5 -1
  3. package/ui/components/Drawer.jsx +208 -208
  4. package/ui/components/Pagination.jsx +145 -145
  5. package/ui/components/PrivacyBlur.jsx +603 -603
  6. package/utils/index.cjs +5 -0
  7. package/utils/index.js +22 -20
  8. package/utils/utils/duration.js +139 -139
  9. package/utils/utils/oidc.js +214 -214
  10. package/utils/utils/realtime.js +1634 -1634
  11. package/utils/utils/session.cjs +87 -9
  12. package/utils/utils/session.js +81 -8
  13. package/utils/utils/session_manager.cjs +490 -0
  14. package/utils/utils/session_manager.js +549 -0
  15. package/utils/utils/storage.js +393 -393
  16. package/utils/utils/ui.js +111 -111
  17. package/vue/components/Badge.vue +79 -79
  18. package/vue/components/Button.vue +209 -209
  19. package/vue/components/Checkbox.vue +103 -103
  20. package/vue/components/CircularProgress.vue +383 -383
  21. package/vue/components/Divider.vue +94 -94
  22. package/vue/components/Drawer.vue +243 -243
  23. package/vue/components/InfoBadge.vue +223 -223
  24. package/vue/components/Input.vue +341 -341
  25. package/vue/components/LinearProgress.vue +268 -268
  26. package/vue/components/Modal.vue +226 -226
  27. package/vue/components/Pagination.vue +199 -199
  28. package/vue/components/Select.vue +713 -713
  29. package/vue/components/Sidebar.vue +955 -955
  30. package/vue/components/Skeleton.vue +91 -91
  31. package/vue/components/Spinner.vue +263 -263
  32. package/vue/components/StatusTag.vue +89 -89
  33. package/vue/components/TabBar.vue +176 -176
  34. package/vue/components/Table.vue +388 -388
  35. package/vue/components/TimePicker.vue +399 -399
  36. package/vue/components/Toggle.vue +115 -115
  37. package/vue/components/XTable.vue +119 -119
  38. package/vue/composables/useAutoSkeletonRows.ts +71 -71
  39. package/vue/index.d.ts +67 -67
  40. package/vue/index.js +86 -86
@@ -1,263 +1,263 @@
1
- <script setup lang="ts">
2
- import { computed } from "vue";
3
-
4
- const STYLES = `.spin{animation:cx-spin .7s linear infinite}@keyframes cx-spin{to{transform:rotate(360deg)}}.v-progress-circular--indeterminate>svg{animation:progress-circular-rotate .8s linear infinite;transform-origin:center center;transition:all .2s ease-in-out}.v-progress-circular>svg{width:100%;height:100%;margin:auto;position:absolute;inset:0;z-index:0}@keyframes progress-circular-rotate{100%{transform:rotate(270deg)}}@keyframes progress-circular-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.v-progress-circular--indeterminate .v-progress-circular__overlay{animation:progress-circular-dash 1.4s ease-in-out infinite;stroke-linecap:round}`;
5
-
6
- const _id = "cynx-spinner-styles";
7
- function ensureStyles() {
8
- if (typeof document === "undefined") return;
9
- if (document.getElementById(_id)) return;
10
- const tag = document.createElement("style");
11
- tag.id = _id;
12
- tag.textContent = STYLES;
13
- document.head.appendChild(tag);
14
- }
15
-
16
- if (typeof document !== "undefined") ensureStyles();
17
-
18
- const props = withDefaults(
19
- defineProps<{
20
- size?: number;
21
- inline?: boolean;
22
- color?: string;
23
- fullPage?: boolean;
24
- variant?: "default" | "classic";
25
- }>(),
26
- {
27
- size: undefined,
28
- inline: false,
29
- color: "currentColor",
30
- fullPage: false,
31
- variant: "default",
32
- }
33
- );
34
-
35
- ensureStyles();
36
-
37
- const s = computed(() => {
38
- if (props.size !== undefined && props.size !== null) {
39
- return props.size;
40
- }
41
- return props.inline ? 14 : 20;
42
- });
43
- </script>
44
-
45
- <template>
46
- <!-- Classic Variant -->
47
- <template v-if="variant === 'classic'">
48
- <div
49
- v-if="fullPage"
50
- :style="{
51
- position: 'fixed',
52
- inset: 0,
53
- background: 'var(--bg, #f8fafc)',
54
- display: 'flex',
55
- flexDirection: 'column',
56
- alignItems: 'center',
57
- justifyContent: 'center',
58
- gap: '16px',
59
- zIndex: 9999,
60
- }"
61
- >
62
- <svg
63
- class="spin"
64
- :width="s"
65
- :height="s"
66
- viewBox="0 0 24 24"
67
- fill="none"
68
- :stroke="color"
69
- stroke-width="2.5"
70
- stroke-linecap="round"
71
- >
72
- <path
73
- d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
74
- />
75
- </svg>
76
- <div
77
- :style="{
78
- fontSize: '.75rem',
79
- fontFamily: 'var(--mono, ui-monospace, monospace)',
80
- color: 'var(--muted, #797b8d)',
81
- }"
82
- >
83
- Loading...
84
- </div>
85
- </div>
86
-
87
- <svg
88
- v-else-if="inline"
89
- class="spin"
90
- :width="s"
91
- :height="s"
92
- viewBox="0 0 24 24"
93
- fill="none"
94
- :stroke="color"
95
- stroke-width="2.5"
96
- stroke-linecap="round"
97
- >
98
- <path
99
- d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
100
- />
101
- </svg>
102
-
103
- <div
104
- v-else
105
- :style="{
106
- display: 'flex',
107
- alignItems: 'center',
108
- justifyContent: 'center',
109
- padding: '48px 0',
110
- }"
111
- >
112
- <svg
113
- class="spin"
114
- :width="s"
115
- :height="s"
116
- viewBox="0 0 24 24"
117
- fill="none"
118
- :stroke="color"
119
- stroke-width="2.5"
120
- stroke-linecap="round"
121
- >
122
- <path
123
- d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
124
- />
125
- </svg>
126
- </div>
127
- </template>
128
-
129
- <!-- Circular Variant (Default) -->
130
- <template v-else>
131
- <!-- FullPage Mode -->
132
- <div
133
- v-if="fullPage"
134
- :style="{
135
- position: 'fixed',
136
- inset: 0,
137
- background: 'var(--bg, #f8fafc)',
138
- display: 'flex',
139
- flexDirection: 'column',
140
- alignItems: 'center',
141
- justifyContent: 'center',
142
- gap: '16px',
143
- zIndex: 9999,
144
- }"
145
- >
146
- <div
147
- class="v-progress-circular v-progress-circular--indeterminate"
148
- :style="{ width: `${s}px`, height: `${s}px` }"
149
- >
150
- <svg
151
- xmlns="http://www.w3.org/2000/svg"
152
- viewBox="0 0 42.42 42.42"
153
- :style="{ width: `${s}px`, height: `${s}px`, transform: 'rotate(-90deg)' }"
154
- >
155
- <circle
156
- fill="transparent"
157
- cx="50%"
158
- cy="50%"
159
- r="20"
160
- stroke="var(--grey-2, #e0e0e0)"
161
- stroke-width="2.42"
162
- stroke-dasharray="125.66"
163
- stroke-dashoffset="0"
164
- />
165
- <circle
166
- class="v-progress-circular__overlay"
167
- fill="transparent"
168
- cx="50%"
169
- cy="50%"
170
- r="20"
171
- :stroke="color"
172
- stroke-width="2.42"
173
- stroke-dasharray="125.66"
174
- stroke-dashoffset="125.66"
175
- />
176
- </svg>
177
- </div>
178
- <div
179
- :style="{
180
- fontSize: '.75rem',
181
- fontFamily: 'var(--mono, ui-monospace, monospace)',
182
- color: 'var(--muted, #797b8d)',
183
- }"
184
- >
185
- Loading...
186
- </div>
187
- </div>
188
-
189
- <!-- Inline Mode -->
190
- <div
191
- v-else-if="inline"
192
- class="v-progress-circular v-progress-circular--indeterminate"
193
- :style="{
194
- width: `${s}px`,
195
- height: `${s}px`,
196
- position: 'relative',
197
- display: 'inline-flex',
198
- flexShrink: 0,
199
- }"
200
- >
201
- <svg
202
- viewBox="0 0 42.42 42.42"
203
- :style="{ width: '100%', height: '100%', transform: 'rotate(-90deg)' }"
204
- >
205
- <circle
206
- class="v-progress-circular__overlay"
207
- fill="transparent"
208
- cx="50%"
209
- cy="50%"
210
- r="20"
211
- :stroke="color"
212
- stroke-width="2.42"
213
- stroke-dasharray="125.66"
214
- stroke-dashoffset="125.66"
215
- />
216
- </svg>
217
- </div>
218
-
219
- <!-- Normal Centered Mode -->
220
- <div
221
- v-else
222
- :style="{
223
- display: 'flex',
224
- alignItems: 'center',
225
- justifyContent: 'center',
226
- padding: '48px 0',
227
- }"
228
- >
229
- <div
230
- class="v-progress-circular v-progress-circular--indeterminate"
231
- :style="{ width: `${s}px`, height: `${s}px` }"
232
- >
233
- <svg
234
- xmlns="http://www.w3.org/2000/svg"
235
- viewBox="0 0 42.42 42.42"
236
- :style="{ width: `${s}px`, height: `${s}px`, transform: 'rotate(-90deg)' }"
237
- >
238
- <circle
239
- fill="transparent"
240
- cx="50%"
241
- cy="50%"
242
- r="20"
243
- stroke="var(--grey-2, #e0e0e0)"
244
- stroke-width="2.42"
245
- stroke-dasharray="125.66"
246
- stroke-dashoffset="0"
247
- />
248
- <circle
249
- class="v-progress-circular__overlay"
250
- fill="transparent"
251
- cx="50%"
252
- cy="50%"
253
- r="20"
254
- :stroke="color"
255
- stroke-width="2.42"
256
- stroke-dasharray="125.66"
257
- stroke-dashoffset="125.66"
258
- />
259
- </svg>
260
- </div>
261
- </div>
262
- </template>
263
- </template>
1
+ <script setup lang="ts">
2
+ import { computed } from "vue";
3
+
4
+ const STYLES = `.spin{animation:cx-spin .7s linear infinite}@keyframes cx-spin{to{transform:rotate(360deg)}}.v-progress-circular--indeterminate>svg{animation:progress-circular-rotate .8s linear infinite;transform-origin:center center;transition:all .2s ease-in-out}.v-progress-circular>svg{width:100%;height:100%;margin:auto;position:absolute;inset:0;z-index:0}@keyframes progress-circular-rotate{100%{transform:rotate(270deg)}}@keyframes progress-circular-dash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}.v-progress-circular--indeterminate .v-progress-circular__overlay{animation:progress-circular-dash 1.4s ease-in-out infinite;stroke-linecap:round}`;
5
+
6
+ const _id = "cynx-spinner-styles";
7
+ function ensureStyles() {
8
+ if (typeof document === "undefined") return;
9
+ if (document.getElementById(_id)) return;
10
+ const tag = document.createElement("style");
11
+ tag.id = _id;
12
+ tag.textContent = STYLES;
13
+ document.head.appendChild(tag);
14
+ }
15
+
16
+ if (typeof document !== "undefined") ensureStyles();
17
+
18
+ const props = withDefaults(
19
+ defineProps<{
20
+ size?: number;
21
+ inline?: boolean;
22
+ color?: string;
23
+ fullPage?: boolean;
24
+ variant?: "default" | "classic";
25
+ }>(),
26
+ {
27
+ size: undefined,
28
+ inline: false,
29
+ color: "currentColor",
30
+ fullPage: false,
31
+ variant: "default",
32
+ }
33
+ );
34
+
35
+ ensureStyles();
36
+
37
+ const s = computed(() => {
38
+ if (props.size !== undefined && props.size !== null) {
39
+ return props.size;
40
+ }
41
+ return props.inline ? 14 : 20;
42
+ });
43
+ </script>
44
+
45
+ <template>
46
+ <!-- Classic Variant -->
47
+ <template v-if="variant === 'classic'">
48
+ <div
49
+ v-if="fullPage"
50
+ :style="{
51
+ position: 'fixed',
52
+ inset: 0,
53
+ background: 'var(--bg, #f8fafc)',
54
+ display: 'flex',
55
+ flexDirection: 'column',
56
+ alignItems: 'center',
57
+ justifyContent: 'center',
58
+ gap: '16px',
59
+ zIndex: 9999,
60
+ }"
61
+ >
62
+ <svg
63
+ class="spin"
64
+ :width="s"
65
+ :height="s"
66
+ viewBox="0 0 24 24"
67
+ fill="none"
68
+ :stroke="color"
69
+ stroke-width="2.5"
70
+ stroke-linecap="round"
71
+ >
72
+ <path
73
+ d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
74
+ />
75
+ </svg>
76
+ <div
77
+ :style="{
78
+ fontSize: '.75rem',
79
+ fontFamily: 'var(--mono, ui-monospace, monospace)',
80
+ color: 'var(--muted, #797b8d)',
81
+ }"
82
+ >
83
+ Loading...
84
+ </div>
85
+ </div>
86
+
87
+ <svg
88
+ v-else-if="inline"
89
+ class="spin"
90
+ :width="s"
91
+ :height="s"
92
+ viewBox="0 0 24 24"
93
+ fill="none"
94
+ :stroke="color"
95
+ stroke-width="2.5"
96
+ stroke-linecap="round"
97
+ >
98
+ <path
99
+ d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
100
+ />
101
+ </svg>
102
+
103
+ <div
104
+ v-else
105
+ :style="{
106
+ display: 'flex',
107
+ alignItems: 'center',
108
+ justifyContent: 'center',
109
+ padding: '48px 0',
110
+ }"
111
+ >
112
+ <svg
113
+ class="spin"
114
+ :width="s"
115
+ :height="s"
116
+ viewBox="0 0 24 24"
117
+ fill="none"
118
+ :stroke="color"
119
+ stroke-width="2.5"
120
+ stroke-linecap="round"
121
+ >
122
+ <path
123
+ d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"
124
+ />
125
+ </svg>
126
+ </div>
127
+ </template>
128
+
129
+ <!-- Circular Variant (Default) -->
130
+ <template v-else>
131
+ <!-- FullPage Mode -->
132
+ <div
133
+ v-if="fullPage"
134
+ :style="{
135
+ position: 'fixed',
136
+ inset: 0,
137
+ background: 'var(--bg, #f8fafc)',
138
+ display: 'flex',
139
+ flexDirection: 'column',
140
+ alignItems: 'center',
141
+ justifyContent: 'center',
142
+ gap: '16px',
143
+ zIndex: 9999,
144
+ }"
145
+ >
146
+ <div
147
+ class="v-progress-circular v-progress-circular--indeterminate"
148
+ :style="{ width: `${s}px`, height: `${s}px` }"
149
+ >
150
+ <svg
151
+ xmlns="http://www.w3.org/2000/svg"
152
+ viewBox="0 0 42.42 42.42"
153
+ :style="{ width: `${s}px`, height: `${s}px`, transform: 'rotate(-90deg)' }"
154
+ >
155
+ <circle
156
+ fill="transparent"
157
+ cx="50%"
158
+ cy="50%"
159
+ r="20"
160
+ stroke="var(--grey-2, #e0e0e0)"
161
+ stroke-width="2.42"
162
+ stroke-dasharray="125.66"
163
+ stroke-dashoffset="0"
164
+ />
165
+ <circle
166
+ class="v-progress-circular__overlay"
167
+ fill="transparent"
168
+ cx="50%"
169
+ cy="50%"
170
+ r="20"
171
+ :stroke="color"
172
+ stroke-width="2.42"
173
+ stroke-dasharray="125.66"
174
+ stroke-dashoffset="125.66"
175
+ />
176
+ </svg>
177
+ </div>
178
+ <div
179
+ :style="{
180
+ fontSize: '.75rem',
181
+ fontFamily: 'var(--mono, ui-monospace, monospace)',
182
+ color: 'var(--muted, #797b8d)',
183
+ }"
184
+ >
185
+ Loading...
186
+ </div>
187
+ </div>
188
+
189
+ <!-- Inline Mode -->
190
+ <div
191
+ v-else-if="inline"
192
+ class="v-progress-circular v-progress-circular--indeterminate"
193
+ :style="{
194
+ width: `${s}px`,
195
+ height: `${s}px`,
196
+ position: 'relative',
197
+ display: 'inline-flex',
198
+ flexShrink: 0,
199
+ }"
200
+ >
201
+ <svg
202
+ viewBox="0 0 42.42 42.42"
203
+ :style="{ width: '100%', height: '100%', transform: 'rotate(-90deg)' }"
204
+ >
205
+ <circle
206
+ class="v-progress-circular__overlay"
207
+ fill="transparent"
208
+ cx="50%"
209
+ cy="50%"
210
+ r="20"
211
+ :stroke="color"
212
+ stroke-width="2.42"
213
+ stroke-dasharray="125.66"
214
+ stroke-dashoffset="125.66"
215
+ />
216
+ </svg>
217
+ </div>
218
+
219
+ <!-- Normal Centered Mode -->
220
+ <div
221
+ v-else
222
+ :style="{
223
+ display: 'flex',
224
+ alignItems: 'center',
225
+ justifyContent: 'center',
226
+ padding: '48px 0',
227
+ }"
228
+ >
229
+ <div
230
+ class="v-progress-circular v-progress-circular--indeterminate"
231
+ :style="{ width: `${s}px`, height: `${s}px` }"
232
+ >
233
+ <svg
234
+ xmlns="http://www.w3.org/2000/svg"
235
+ viewBox="0 0 42.42 42.42"
236
+ :style="{ width: `${s}px`, height: `${s}px`, transform: 'rotate(-90deg)' }"
237
+ >
238
+ <circle
239
+ fill="transparent"
240
+ cx="50%"
241
+ cy="50%"
242
+ r="20"
243
+ stroke="var(--grey-2, #e0e0e0)"
244
+ stroke-width="2.42"
245
+ stroke-dasharray="125.66"
246
+ stroke-dashoffset="0"
247
+ />
248
+ <circle
249
+ class="v-progress-circular__overlay"
250
+ fill="transparent"
251
+ cx="50%"
252
+ cy="50%"
253
+ r="20"
254
+ :stroke="color"
255
+ stroke-width="2.42"
256
+ stroke-dasharray="125.66"
257
+ stroke-dashoffset="125.66"
258
+ />
259
+ </svg>
260
+ </div>
261
+ </div>
262
+ </template>
263
+ </template>