@nmorph/nmorph-ui-kit 2.2.34 → 2.2.36

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 (124) hide show
  1. package/dist/assets/icons/baseball.svg.js +28 -0
  2. package/dist/assets/icons/basketball.svg.js +21 -0
  3. package/dist/assets/icons/bowl.svg.js +21 -0
  4. package/dist/assets/icons/box.svg.js +35 -0
  5. package/dist/assets/icons/briefcase.svg.js +21 -0
  6. package/dist/assets/icons/brush-filled.svg.js +21 -0
  7. package/dist/assets/icons/brush.svg.js +21 -0
  8. package/dist/assets/icons/camera-filled.svg.js +21 -0
  9. package/dist/assets/icons/chevron-double-left.svg.js +28 -0
  10. package/dist/assets/icons/chevron-double-right.svg.js +28 -0
  11. package/dist/assets/icons/chevron-double-up.svg.js +28 -0
  12. package/dist/assets/icons/chevron-left.svg.js +21 -0
  13. package/dist/assets/icons/chevron-right.svg.js +21 -0
  14. package/dist/assets/icons/chevron-up.svg.js +21 -0
  15. package/dist/assets/icons/chicken.svg.js +21 -0
  16. package/dist/assets/icons/clipboard-check.svg.js +25 -0
  17. package/dist/assets/icons/clipboard.svg.js +25 -0
  18. package/dist/assets/icons/close-bold.svg.js +21 -0
  19. package/dist/assets/icons/cold-drink.svg.js +21 -0
  20. package/dist/assets/icons/comment.svg.js +21 -0
  21. package/dist/assets/icons/database.svg.js +25 -0
  22. package/dist/assets/icons/drag-handle.svg.js +21 -0
  23. package/dist/assets/icons/external-link.svg.js +28 -0
  24. package/dist/assets/icons/filter-off.svg.js +28 -0
  25. package/dist/assets/icons/fingerprint.svg.js +44 -0
  26. package/dist/assets/icons/folder-remove.svg.js +21 -0
  27. package/dist/assets/icons/goblet.svg.js +21 -0
  28. package/dist/assets/icons/ice-tea.svg.js +21 -0
  29. package/dist/assets/icons/inbox.svg.js +25 -0
  30. package/dist/assets/icons/mail.svg.js +25 -0
  31. package/dist/assets/icons/odometer.svg.js +35 -0
  32. package/dist/assets/icons/open.svg.js +28 -0
  33. package/dist/assets/icons/pagination.svg.js +8 -0
  34. package/dist/assets/icons/pin.svg.js +21 -0
  35. package/dist/assets/icons/redo.svg.js +21 -0
  36. package/dist/assets/icons/save.svg.js +25 -0
  37. package/dist/assets/icons/server.svg.js +32 -0
  38. package/dist/assets/icons/shield-check.svg.js +25 -0
  39. package/dist/assets/icons/shield.svg.js +25 -0
  40. package/dist/assets/icons/sliders.svg.js +31 -0
  41. package/dist/assets/icons/stopwatch.svg.js +28 -0
  42. package/dist/assets/icons/suitcase-line.svg.js +22 -0
  43. package/dist/assets/icons/undo.svg.js +21 -0
  44. package/dist/assets/icons/video-camera.svg.js +21 -0
  45. package/dist/components/basic/nmorph-button/NmorphButton.vue.js +10 -10
  46. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +5 -5
  47. package/dist/components/basic/nmorph-icon/NmorphIcons.js +617 -527
  48. package/dist/components/basic/nmorph-layout/NmorphLayout.css +1 -0
  49. package/dist/components/basic/nmorph-layout/NmorphLayout.vue.js +50 -0
  50. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +28 -0
  51. package/dist/components/basic/nmorph-space/NmorphSpace.css +1 -0
  52. package/dist/components/basic/nmorph-space/NmorphSpace.vue.js +21 -0
  53. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +45 -0
  54. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +15 -15
  55. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +1 -1
  56. package/dist/components/data/nmorph-empty/NmorphEmpty.css +1 -1
  57. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +31 -31
  58. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +36 -38
  59. package/dist/components/data/nmorph-qr-code/NmorphQRCode.css +1 -0
  60. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue.js +59 -0
  61. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +50 -0
  62. package/dist/components/data/nmorph-qr-code/qr-code.js +568 -0
  63. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.css +1 -0
  64. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue.js +86 -0
  65. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +60 -0
  66. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.css +1 -0
  67. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +81 -0
  68. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +47 -0
  69. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.css +1 -1
  70. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +30 -27
  71. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +75 -63
  72. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js +13 -13
  73. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +28 -27
  74. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.js +16 -16
  75. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue2.js +20 -17
  76. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +34 -30
  77. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +94 -62
  78. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue.js +21 -21
  79. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +92 -84
  80. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +5 -5
  81. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +53 -53
  82. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +24 -21
  83. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +1 -1
  84. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +16 -16
  85. package/dist/components/form/nmorph-textarea/NmorphTextarea.css +1 -0
  86. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +41 -0
  87. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +67 -0
  88. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  89. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +40 -31
  90. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +45 -41
  91. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue.js +20 -25
  92. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +41 -27
  93. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.js +11 -10
  94. package/dist/components/navigation/nmorph-context-menu/NmorphContextMenu.vue2.js +10 -9
  95. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.css +1 -1
  96. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +13 -12
  97. package/dist/hooks/use-common-styles.js +2 -1
  98. package/dist/icons.js +621 -531
  99. package/dist/index.es.js +781 -677
  100. package/dist/index.umd.js +31 -30
  101. package/dist/package.json.js +1 -1
  102. package/dist/src/components/basic/index.d.ts +2 -0
  103. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +49 -3
  104. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +22 -0
  105. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +33 -0
  106. package/dist/src/components/data/index.d.ts +4 -0
  107. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +34 -0
  108. package/dist/src/components/data/nmorph-qr-code/qr-code.d.ts +12 -0
  109. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +46 -0
  110. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +4 -0
  111. package/dist/src/components/feedback/index.d.ts +1 -0
  112. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +40 -0
  113. package/dist/src/components/form/index.d.ts +1 -0
  114. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +1 -1
  115. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +2 -2
  116. package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +2 -2
  117. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +1 -1
  118. package/dist/src/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue.d.ts +0 -1
  119. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +48 -0
  120. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  121. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +3 -1
  122. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +3 -1
  123. package/dist/style.css +1 -1
  124. package/package.json +1 -1
@@ -0,0 +1,568 @@
1
+ const z = {
2
+ low: [
3
+ -1,
4
+ 7,
5
+ 10,
6
+ 15,
7
+ 20,
8
+ 26,
9
+ 18,
10
+ 20,
11
+ 24,
12
+ 30,
13
+ 18,
14
+ 20,
15
+ 24,
16
+ 26,
17
+ 30,
18
+ 22,
19
+ 24,
20
+ 28,
21
+ 30,
22
+ 28,
23
+ 28,
24
+ 28,
25
+ 28,
26
+ 30,
27
+ 30,
28
+ 26,
29
+ 28,
30
+ 30,
31
+ 30,
32
+ 30,
33
+ 30,
34
+ 30,
35
+ 30,
36
+ 30,
37
+ 30,
38
+ 30,
39
+ 30,
40
+ 30,
41
+ 30,
42
+ 30,
43
+ 30
44
+ ],
45
+ medium: [
46
+ -1,
47
+ 10,
48
+ 16,
49
+ 26,
50
+ 18,
51
+ 24,
52
+ 16,
53
+ 18,
54
+ 22,
55
+ 22,
56
+ 26,
57
+ 30,
58
+ 22,
59
+ 22,
60
+ 24,
61
+ 24,
62
+ 28,
63
+ 28,
64
+ 26,
65
+ 26,
66
+ 26,
67
+ 26,
68
+ 28,
69
+ 28,
70
+ 28,
71
+ 28,
72
+ 28,
73
+ 28,
74
+ 28,
75
+ 28,
76
+ 28,
77
+ 28,
78
+ 28,
79
+ 28,
80
+ 28,
81
+ 28,
82
+ 28,
83
+ 28,
84
+ 28,
85
+ 28,
86
+ 28
87
+ ],
88
+ quartile: [
89
+ -1,
90
+ 13,
91
+ 22,
92
+ 18,
93
+ 26,
94
+ 18,
95
+ 24,
96
+ 18,
97
+ 22,
98
+ 20,
99
+ 24,
100
+ 28,
101
+ 26,
102
+ 24,
103
+ 20,
104
+ 30,
105
+ 24,
106
+ 28,
107
+ 28,
108
+ 26,
109
+ 30,
110
+ 28,
111
+ 30,
112
+ 30,
113
+ 30,
114
+ 30,
115
+ 28,
116
+ 30,
117
+ 30,
118
+ 30,
119
+ 30,
120
+ 30,
121
+ 30,
122
+ 30,
123
+ 30,
124
+ 30,
125
+ 30,
126
+ 30,
127
+ 30,
128
+ 30,
129
+ 30
130
+ ],
131
+ high: [
132
+ -1,
133
+ 17,
134
+ 28,
135
+ 22,
136
+ 16,
137
+ 22,
138
+ 28,
139
+ 26,
140
+ 26,
141
+ 24,
142
+ 28,
143
+ 24,
144
+ 28,
145
+ 22,
146
+ 24,
147
+ 24,
148
+ 30,
149
+ 28,
150
+ 28,
151
+ 26,
152
+ 28,
153
+ 30,
154
+ 24,
155
+ 30,
156
+ 30,
157
+ 30,
158
+ 30,
159
+ 30,
160
+ 30,
161
+ 30,
162
+ 30,
163
+ 30,
164
+ 30,
165
+ 30,
166
+ 30,
167
+ 30,
168
+ 30,
169
+ 30,
170
+ 30,
171
+ 30,
172
+ 30
173
+ ]
174
+ }, y = {
175
+ low: [
176
+ -1,
177
+ 1,
178
+ 1,
179
+ 1,
180
+ 1,
181
+ 1,
182
+ 2,
183
+ 2,
184
+ 2,
185
+ 2,
186
+ 4,
187
+ 4,
188
+ 4,
189
+ 4,
190
+ 4,
191
+ 6,
192
+ 6,
193
+ 6,
194
+ 6,
195
+ 7,
196
+ 8,
197
+ 8,
198
+ 9,
199
+ 9,
200
+ 10,
201
+ 12,
202
+ 12,
203
+ 12,
204
+ 13,
205
+ 14,
206
+ 15,
207
+ 16,
208
+ 17,
209
+ 18,
210
+ 19,
211
+ 19,
212
+ 20,
213
+ 21,
214
+ 22,
215
+ 24,
216
+ 25
217
+ ],
218
+ medium: [
219
+ -1,
220
+ 1,
221
+ 1,
222
+ 1,
223
+ 2,
224
+ 2,
225
+ 4,
226
+ 4,
227
+ 4,
228
+ 5,
229
+ 5,
230
+ 5,
231
+ 8,
232
+ 9,
233
+ 9,
234
+ 10,
235
+ 10,
236
+ 11,
237
+ 13,
238
+ 14,
239
+ 16,
240
+ 17,
241
+ 17,
242
+ 18,
243
+ 20,
244
+ 21,
245
+ 23,
246
+ 25,
247
+ 26,
248
+ 28,
249
+ 29,
250
+ 31,
251
+ 33,
252
+ 35,
253
+ 37,
254
+ 38,
255
+ 40,
256
+ 43,
257
+ 45,
258
+ 47,
259
+ 49
260
+ ],
261
+ quartile: [
262
+ -1,
263
+ 1,
264
+ 1,
265
+ 2,
266
+ 2,
267
+ 4,
268
+ 4,
269
+ 6,
270
+ 6,
271
+ 8,
272
+ 8,
273
+ 8,
274
+ 10,
275
+ 12,
276
+ 16,
277
+ 12,
278
+ 17,
279
+ 16,
280
+ 18,
281
+ 21,
282
+ 20,
283
+ 23,
284
+ 23,
285
+ 25,
286
+ 27,
287
+ 29,
288
+ 34,
289
+ 34,
290
+ 35,
291
+ 38,
292
+ 40,
293
+ 43,
294
+ 45,
295
+ 48,
296
+ 51,
297
+ 53,
298
+ 56,
299
+ 59,
300
+ 62,
301
+ 65,
302
+ 68
303
+ ],
304
+ high: [
305
+ -1,
306
+ 1,
307
+ 1,
308
+ 2,
309
+ 4,
310
+ 4,
311
+ 4,
312
+ 5,
313
+ 6,
314
+ 8,
315
+ 8,
316
+ 11,
317
+ 11,
318
+ 16,
319
+ 16,
320
+ 18,
321
+ 16,
322
+ 19,
323
+ 21,
324
+ 25,
325
+ 25,
326
+ 25,
327
+ 34,
328
+ 30,
329
+ 32,
330
+ 35,
331
+ 37,
332
+ 40,
333
+ 42,
334
+ 45,
335
+ 48,
336
+ 51,
337
+ 54,
338
+ 57,
339
+ 60,
340
+ 63,
341
+ 66,
342
+ 70,
343
+ 74,
344
+ 77,
345
+ 81
346
+ ]
347
+ }, x = {
348
+ low: 1,
349
+ medium: 0,
350
+ quartile: 3,
351
+ high: 2
352
+ }, p = (i) => Math.min(Math.max(Math.trunc(i), 1), 40), u = (i, t) => (i >>> t & 1) !== 0, M = (i, t, e) => {
353
+ for (let s = e - 1; s >= 0; s--) i.push(u(t, s));
354
+ }, P = (i) => {
355
+ let t = (16 * i + 128) * i + 64;
356
+ if (i >= 2) {
357
+ const e = Math.floor(i / 7) + 2;
358
+ t -= (25 * e - 10) * e - 55, i >= 7 && (t -= 36);
359
+ }
360
+ return t;
361
+ }, B = (i, t) => Math.floor(P(i) / 8) - z[t][i] * y[t][i], w = (i) => i <= 9 ? 8 : 16, k = (i, t) => 4 + w(t) + i * 8, A = (i) => {
362
+ if (i === 1) return [];
363
+ const t = i * 4 + 17, e = Math.floor(i / 7) + 2, s = i === 32 ? 26 : Math.ceil((i * 4 + 4) / (e * 2 - 2)) * 2, n = [6];
364
+ for (let o = t - 7; n.length < e; o -= s) n.splice(1, 0, o);
365
+ return n;
366
+ }, F = (i, t) => {
367
+ let e = 0;
368
+ for (let s = 7; s >= 0; s--)
369
+ e = e << 1 ^ (e >>> 7) * 285, e ^= (t >>> s & 1) * i;
370
+ return e;
371
+ }, R = (i) => {
372
+ const t = Array(i).fill(0);
373
+ t[i - 1] = 1;
374
+ let e = 1;
375
+ for (let s = 0; s < i; s++) {
376
+ for (let n = 0; n < i; n++)
377
+ t[n] = F(t[n], e), n + 1 < i && (t[n] ^= t[n + 1]);
378
+ e = F(e, 2);
379
+ }
380
+ return t;
381
+ }, b = (i, t) => {
382
+ const e = Array(t.length).fill(0);
383
+ return i.forEach((s) => {
384
+ const n = s ^ (e.shift() || 0);
385
+ e.push(0), t.forEach((o, r) => {
386
+ e[r] ^= F(o, n);
387
+ });
388
+ }), e;
389
+ }, E = (i, t, e) => {
390
+ const s = y[e][t], n = z[e][t], o = Math.floor(P(t) / 8), r = s - o % s, a = Math.floor(o / s), c = R(n), h = [];
391
+ let f = 0;
392
+ for (let l = 0; l < s; l++) {
393
+ const d = a - n + (l < r ? 0 : 1), g = i.slice(f, f + d);
394
+ f += d;
395
+ const C = b(g, c);
396
+ l < r && g.push(0), h.push([...g, ...C]);
397
+ }
398
+ const m = [];
399
+ for (let l = 0; l < h[0].length; l++)
400
+ h.forEach((d, g) => {
401
+ (l !== a - n || g >= r) && m.push(d[l]);
402
+ });
403
+ return m;
404
+ }, L = (i, t, e) => {
405
+ const s = B(t, e) * 8, n = [];
406
+ for (M(n, 4, 4), M(n, i.length, w(t)), i.forEach((r) => M(n, r, 8)), M(n, 0, Math.min(4, s - n.length)); n.length % 8 !== 0; ) n.push(!1);
407
+ const o = [];
408
+ for (let r = 0; r < n.length; r += 8) {
409
+ let a = 0;
410
+ for (let c = 0; c < 8; c++) a = a << 1 | (n[r + c] ? 1 : 0);
411
+ o.push(a);
412
+ }
413
+ for (let r = 236; o.length < s / 8; r ^= 253) o.push(r);
414
+ return o;
415
+ }, S = (i, t, e) => {
416
+ switch (i) {
417
+ case 0:
418
+ return (t + e) % 2 === 0;
419
+ case 1:
420
+ return e % 2 === 0;
421
+ case 2:
422
+ return t % 3 === 0;
423
+ case 3:
424
+ return (t + e) % 3 === 0;
425
+ case 4:
426
+ return (Math.floor(t / 3) + Math.floor(e / 2)) % 2 === 0;
427
+ case 5:
428
+ return t * e % 2 + t * e % 3 === 0;
429
+ case 6:
430
+ return (t * e % 2 + t * e % 3) % 2 === 0;
431
+ default:
432
+ return ((t + e) % 2 + t * e % 3) % 2 === 0;
433
+ }
434
+ };
435
+ class O {
436
+ constructor(t, e) {
437
+ this.version = t, this.level = e, this.size = t * 4 + 17, this.modules = Array.from({ length: this.size }, () => Array(this.size).fill(!1)), this.isFunction = Array.from({ length: this.size }, () => Array(this.size).fill(!1));
438
+ }
439
+ size;
440
+ modules;
441
+ isFunction;
442
+ drawFunctionPatterns() {
443
+ for (let e = 0; e < this.size; e++)
444
+ this.setFunctionModule(6, e, e % 2 === 0), this.setFunctionModule(e, 6, e % 2 === 0);
445
+ this.drawFinderPattern(3, 3), this.drawFinderPattern(this.size - 4, 3), this.drawFinderPattern(3, this.size - 4);
446
+ const t = A(this.version);
447
+ t.forEach((e, s) => {
448
+ t.forEach((n, o) => {
449
+ s === 0 && o === 0 || s === 0 && o === t.length - 1 || s === t.length - 1 && o === 0 || this.drawAlignmentPattern(e, n);
450
+ });
451
+ }), this.drawFormatBits(0), this.drawVersion();
452
+ }
453
+ drawCodewords(t) {
454
+ let e = 0;
455
+ for (let s = this.size - 1; s >= 1; s -= 2) {
456
+ s === 6 && (s = 5);
457
+ for (let n = 0; n < this.size; n++)
458
+ for (let o = 0; o < 2; o++) {
459
+ const r = s - o, c = (s + 1 & 2) === 0 ? this.size - 1 - n : n;
460
+ !this.isFunction[c][r] && e < t.length * 8 && (this.modules[c][r] = u(t[e >>> 3], 7 - (e & 7)), e++);
461
+ }
462
+ }
463
+ }
464
+ applyMask(t) {
465
+ for (let e = 0; e < this.size; e++)
466
+ for (let s = 0; s < this.size; s++)
467
+ !this.isFunction[e][s] && S(t, s, e) && (this.modules[e][s] = !this.modules[e][s]);
468
+ }
469
+ drawFormatBits(t) {
470
+ const e = x[this.level] << 3 | t;
471
+ let s = e;
472
+ for (let o = 0; o < 10; o++) s = s << 1 ^ (s >>> 9) * 1335;
473
+ const n = (e << 10 | s) ^ 21522;
474
+ for (let o = 0; o <= 5; o++) this.setFunctionModule(8, o, u(n, o));
475
+ this.setFunctionModule(8, 7, u(n, 6)), this.setFunctionModule(8, 8, u(n, 7)), this.setFunctionModule(7, 8, u(n, 8));
476
+ for (let o = 9; o < 15; o++) this.setFunctionModule(14 - o, 8, u(n, o));
477
+ for (let o = 0; o < 8; o++) this.setFunctionModule(this.size - 1 - o, 8, u(n, o));
478
+ for (let o = 8; o < 15; o++) this.setFunctionModule(8, this.size - 15 + o, u(n, o));
479
+ this.setFunctionModule(8, this.size - 8, !0);
480
+ }
481
+ getPenaltyScore() {
482
+ let t = 0;
483
+ for (let o = 0; o < this.size; o++) t += this.getRunPenalty(this.modules[o]);
484
+ for (let o = 0; o < this.size; o++) t += this.getRunPenalty(this.modules.map((r) => r[o]));
485
+ for (let o = 0; o < this.size - 1; o++)
486
+ for (let r = 0; r < this.size - 1; r++) {
487
+ const a = this.modules[o][r];
488
+ a === this.modules[o][r + 1] && a === this.modules[o + 1][r] && a === this.modules[o + 1][r + 1] && (t += 3);
489
+ }
490
+ t += this.getFinderPenalty();
491
+ const e = this.modules.flat().filter(Boolean).length;
492
+ let s = 0;
493
+ const n = this.size * this.size;
494
+ for (; e * 20 < (9 - s) * n || e * 20 > (11 + s) * n; )
495
+ s++;
496
+ return t + s * 10;
497
+ }
498
+ drawFinderPattern(t, e) {
499
+ for (let s = -4; s <= 4; s++)
500
+ for (let n = -4; n <= 4; n++) {
501
+ const o = t + n, r = e + s;
502
+ if (o < 0 || o >= this.size || r < 0 || r >= this.size) continue;
503
+ const a = Math.max(Math.abs(n), Math.abs(s));
504
+ this.setFunctionModule(o, r, a !== 2 && a !== 4);
505
+ }
506
+ }
507
+ drawAlignmentPattern(t, e) {
508
+ for (let s = -2; s <= 2; s++)
509
+ for (let n = -2; n <= 2; n++)
510
+ this.setFunctionModule(t + n, e + s, Math.max(Math.abs(n), Math.abs(s)) !== 1);
511
+ }
512
+ drawVersion() {
513
+ if (this.version < 7) return;
514
+ let t = this.version;
515
+ for (let s = 0; s < 12; s++) t = t << 1 ^ (t >>> 11) * 7973;
516
+ const e = this.version << 12 | t;
517
+ for (let s = 0; s < 18; s++) {
518
+ const n = u(e, s), o = this.size - 11 + s % 3, r = Math.floor(s / 3);
519
+ this.setFunctionModule(o, r, n), this.setFunctionModule(r, o, n);
520
+ }
521
+ }
522
+ setFunctionModule(t, e, s) {
523
+ this.modules[e][t] = s, this.isFunction[e][t] = !0;
524
+ }
525
+ getRunPenalty(t) {
526
+ let e = 0, s = t[0], n = 1;
527
+ for (let o = 1; o < t.length; o++)
528
+ t[o] === s ? n++ : (n >= 5 && (e += 3 + n - 5), s = t[o], n = 1);
529
+ return n >= 5 && (e += 3 + n - 5), e;
530
+ }
531
+ getFinderPenalty() {
532
+ let t = 0;
533
+ for (let e = 0; e < this.size; e++) t += this.getFinderPenaltyForLine(this.modules[e]);
534
+ for (let e = 0; e < this.size; e++) t += this.getFinderPenaltyForLine(this.modules.map((s) => s[e]));
535
+ return t;
536
+ }
537
+ getFinderPenaltyForLine(t) {
538
+ let e = 0;
539
+ for (let s = 0; s <= t.length - 7; s++) {
540
+ if (!(t[s] && !t[s + 1] && t[s + 2] && t[s + 3] && t[s + 4] && !t[s + 5] && t[s + 6])) continue;
541
+ const o = s >= 4 && t.slice(s - 4, s).every((a) => !a), r = s + 11 <= t.length && t.slice(s + 7, s + 11).every((a) => !a);
542
+ (o || r) && (e += 40);
543
+ }
544
+ return e;
545
+ }
546
+ }
547
+ const _ = (i) => Array.from(new TextEncoder().encode(i)), D = (i, t = {}) => {
548
+ const e = t.errorCorrectionLevel ?? "medium", s = p(t.minVersion ?? 1), n = p(t.maxVersion ?? 40), o = _(i), r = Array.from({ length: n - s + 1 }, (l, d) => s + d).find(
549
+ (l) => o.length < 1 << w(l) && k(o.length, l) <= B(l, e) * 8
550
+ );
551
+ if (!r) throw new Error("The QR code value is too large for the selected version range.");
552
+ const a = L(o, r, e), c = E(a, r, e), h = new O(r, e);
553
+ h.drawFunctionPatterns(), h.drawCodewords(c);
554
+ let f = 0, m = 1 / 0;
555
+ for (let l = 0; l < 8; l++) {
556
+ h.applyMask(l), h.drawFormatBits(l);
557
+ const d = h.getPenaltyScore();
558
+ d < m && (f = l, m = d), h.applyMask(l);
559
+ }
560
+ return h.applyMask(f), h.drawFormatBits(f), {
561
+ modules: h.modules.map((l) => [...l]),
562
+ size: h.size,
563
+ version: r
564
+ };
565
+ };
566
+ export {
567
+ D as createNmorphQRCode
568
+ };
@@ -0,0 +1 @@
1
+ .nmorph-virtual-list{position:relative;box-sizing:border-box;min-width:0;height:var(--nmorph-virtual-list-height);max-height:var(--nmorph-virtual-list-max-height);overflow:auto;color:var(--nmorph-text-color);background:var(--nmorph-main-color);border-radius:var(--default-border-radius);box-shadow:var(--nmorph-shadow-inset)}.nmorph-virtual-list--disabled{height:auto;overflow:visible}.nmorph-virtual-list .nmorph-virtual-list__spacer{position:relative;min-height:100%}.nmorph-virtual-list .nmorph-virtual-list__content{position:absolute;top:0;right:0;left:0}.nmorph-virtual-list--disabled .nmorph-virtual-list__content{position:static;transform:none}.nmorph-virtual-list .nmorph-virtual-list__item{box-sizing:border-box;min-height:var(--nmorph-virtual-list-item-height)}.nmorph-virtual-list .nmorph-virtual-list__empty{display:flex;justify-content:center;align-items:center;min-height:100%;padding:var(--indentation-04);color:var(--nmorph-semi-contrast-text-color)}
@@ -0,0 +1,86 @@
1
+ import './NmorphVirtualList.css';
2
+ import a from "./NmorphVirtualList.vue2.js";
3
+ import { openBlock as t, createElementBlock as o, normalizeStyle as l, normalizeClass as m, createElementVNode as c, Fragment as d, renderList as p, createBlock as _, resolveDynamicComponent as f, withCtx as y, renderSlot as n, createTextVNode as h, toDisplayString as k } from "vue";
4
+ /* empty css */
5
+ import x from "../../../_virtual/_plugin-vue_export-helper.js";
6
+ const v = {
7
+ key: 1,
8
+ class: "nmorph-virtual-list__empty"
9
+ };
10
+ function S(i, g, u, e, N, V) {
11
+ return t(), o(
12
+ "div",
13
+ {
14
+ ref: "containerRef",
15
+ class: m(e.modifiers),
16
+ style: l(e.styles),
17
+ onScroll: e.scrollHandler
18
+ },
19
+ [
20
+ e.props.items.length ? (t(), o(
21
+ "div",
22
+ {
23
+ key: 0,
24
+ class: "nmorph-virtual-list__spacer",
25
+ style: l(e.spacerStyle)
26
+ },
27
+ [
28
+ c(
29
+ "div",
30
+ {
31
+ class: "nmorph-virtual-list__content",
32
+ style: l(e.contentStyle)
33
+ },
34
+ [
35
+ (t(!0), o(
36
+ d,
37
+ null,
38
+ p(e.renderedItems, (r) => (t(), _(
39
+ f(e.props.itemTag),
40
+ {
41
+ key: e.getItemKey(r.item, r.index),
42
+ ref_for: !0,
43
+ ref: (s) => e.setItemRef(s, r.index),
44
+ class: "nmorph-virtual-list__item"
45
+ },
46
+ {
47
+ default: y(() => [
48
+ n(i.$slots, "default", {
49
+ item: r.item,
50
+ index: r.index
51
+ }, () => [
52
+ h(
53
+ k(r.item),
54
+ 1
55
+ /* TEXT */
56
+ )
57
+ ])
58
+ ]),
59
+ _: 2
60
+ /* DYNAMIC */
61
+ },
62
+ 1024
63
+ /* DYNAMIC_SLOTS */
64
+ ))),
65
+ 128
66
+ /* KEYED_FRAGMENT */
67
+ ))
68
+ ],
69
+ 4
70
+ /* STYLE */
71
+ )
72
+ ],
73
+ 4
74
+ /* STYLE */
75
+ )) : (t(), o("div", v, [
76
+ n(i.$slots, "empty")
77
+ ]))
78
+ ],
79
+ 38
80
+ /* CLASS, STYLE, NEED_HYDRATION */
81
+ );
82
+ }
83
+ const z = /* @__PURE__ */ x(a, [["render", S], ["__file", "/builds/ketjo/nmorph/library/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue"]]);
84
+ export {
85
+ z as default
86
+ };
@@ -0,0 +1,60 @@
1
+ import './NmorphVirtualList.css';
2
+ import { defineComponent as K, computed as r } from "vue";
3
+ import { useModifiers as $ } from "../../../utils/create-modifiers.js";
4
+ import { useVirtualList as N } from "../../../hooks/use-virtual-list.js";
5
+ const j = /* @__PURE__ */ K({
6
+ __name: "NmorphVirtualList",
7
+ props: {
8
+ items: { type: Array, required: !1, default: () => [] },
9
+ height: { type: [Number, String], required: !1, default: "320px" },
10
+ maxHeight: { type: [Number, String], required: !1, default: "none" },
11
+ itemHeight: { type: Number, required: !1, default: 40 },
12
+ overscan: { type: Number, required: !1, default: 5 },
13
+ dynamic: { type: Boolean, required: !1, default: !1 },
14
+ disabled: { type: Boolean, required: !1, default: !1 },
15
+ itemKey: { type: [String, Function], required: !1, default: void 0 },
16
+ itemTag: { type: String, required: !1, default: "div" }
17
+ },
18
+ emits: ["on-scroll"],
19
+ setup(y, { expose: h, emit: g }) {
20
+ const e = y, a = g, l = r(() => e.items), o = r(() => !e.disabled), u = r(() => e.itemHeight), m = r(() => e.overscan), d = r(() => e.dynamic), i = N(l, {
21
+ enabled: o,
22
+ itemHeight: u,
23
+ overscan: m,
24
+ dynamic: d
25
+ }), c = i.containerRef, v = r(
26
+ () => $({
27
+ "nmorph-virtual-list": [`${e.disabled && "disabled"}`, `${e.dynamic && "dynamic"}`]
28
+ })
29
+ ), n = (t) => typeof t == "number" ? `${t}px` : t, b = r(() => ({
30
+ "--nmorph-virtual-list-height": n(e.height),
31
+ "--nmorph-virtual-list-max-height": n(e.maxHeight),
32
+ "--nmorph-virtual-list-item-height": `${e.itemHeight}px`
33
+ })), x = r(() => ({
34
+ transform: o.value ? `translateY(${i.offsetTop.value}px)` : void 0
35
+ })), S = r(() => ({
36
+ height: o.value ? `${i.totalHeight.value}px` : void 0
37
+ })), _ = r(() => i.virtualItems.value), q = (t, s) => {
38
+ if (typeof e.itemKey == "function") return e.itemKey(t, s);
39
+ if (typeof e.itemKey == "string" && t && typeof t == "object") {
40
+ const p = t[e.itemKey];
41
+ return p === void 0 ? s : String(p);
42
+ }
43
+ return s;
44
+ }, H = (t) => {
45
+ i.scrollHandler(), a("on-scroll", t);
46
+ }, I = (t, s) => {
47
+ i.measureElement(s, t);
48
+ };
49
+ h({
50
+ containerRef: c,
51
+ refresh: i.refresh,
52
+ scrollToIndex: i.scrollToIndex
53
+ });
54
+ const f = { props: e, emit: a, items: l, enabled: o, itemHeight: u, overscan: m, dynamic: d, virtualList: i, containerRef: c, modifiers: v, getCssSize: n, styles: b, contentStyle: x, spacerStyle: S, renderedItems: _, getItemKey: q, scrollHandler: H, setItemRef: I };
55
+ return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
56
+ }
57
+ });
58
+ export {
59
+ j as default
60
+ };
@@ -0,0 +1 @@
1
+ .nmorph-drawer{position:fixed;display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;color:var(--nmorph-text-color);background:var(--nmorph-main-color);box-shadow:var(--nmorph-shadow-outset);transition:transform var(--transition-02) ease}.nmorph-drawer--left,.nmorph-drawer--right{top:0;width:min(var(--nmorph-drawer-size),100vw);height:100vh}.nmorph-drawer--top,.nmorph-drawer--bottom{left:0;width:100vw;height:min(var(--nmorph-drawer-size),100vh)}.nmorph-drawer--left{left:0;transform:translate(-110%)}.nmorph-drawer--right{right:0;transform:translate(110%)}.nmorph-drawer--top{top:0;transform:translateY(-110%)}.nmorph-drawer--bottom{bottom:0;transform:translateY(110%)}.nmorph-drawer--open{transform:translate(0)}.nmorph-drawer .nmorph-drawer__header,.nmorph-drawer .nmorph-drawer__footer{flex:0 0 auto;box-sizing:border-box;padding:var(--indentation-04)}.nmorph-drawer .nmorph-drawer__header{display:flex;gap:var(--indentation-03);justify-content:space-between;align-items:center;font-weight:600;font-size:var(--font-size-large);line-height:var(--line-height-loose)}.nmorph-drawer .nmorph-drawer__title{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.nmorph-drawer .nmorph-drawer__close{display:inline-flex;flex:0 0 auto;justify-content:center;align-items:center;width:32px;height:32px;padding:0;color:inherit;background:transparent;border:0;cursor:pointer}.nmorph-drawer .nmorph-drawer__content{flex:1 1 auto;box-sizing:border-box;min-width:0;min-height:0;padding:0 var(--indentation-04) var(--indentation-04);overflow:hidden auto}