@nmorph/nmorph-ui-kit 2.2.35 → 2.2.37

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 (176) 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/redo.svg.js +21 -0
  35. package/dist/assets/icons/save.svg.js +25 -0
  36. package/dist/assets/icons/server.svg.js +32 -0
  37. package/dist/assets/icons/shield-check.svg.js +25 -0
  38. package/dist/assets/icons/shield.svg.js +25 -0
  39. package/dist/assets/icons/sliders.svg.js +31 -0
  40. package/dist/assets/icons/stopwatch.svg.js +28 -0
  41. package/dist/assets/icons/suitcase-line.svg.js +22 -0
  42. package/dist/assets/icons/undo.svg.js +21 -0
  43. package/dist/assets/icons/video-camera.svg.js +21 -0
  44. package/dist/components/basic/nmorph-button/NmorphButton.vue.js +10 -10
  45. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +13 -13
  46. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
  47. package/dist/components/basic/nmorph-icon/NmorphIcons.js +617 -529
  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 +29 -0
  51. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
  52. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
  53. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
  54. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
  55. package/dist/components/basic/nmorph-space/NmorphSpace.css +1 -0
  56. package/dist/components/basic/nmorph-space/NmorphSpace.vue.js +21 -0
  57. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +41 -0
  58. package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
  59. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue.js +15 -15
  60. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +6 -6
  61. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
  62. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
  63. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +15 -14
  64. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
  65. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
  66. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
  67. package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
  68. package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
  69. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
  70. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
  71. package/dist/components/data/nmorph-pagination/NmorphPagination.vue.js +31 -31
  72. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +36 -38
  73. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
  74. package/dist/components/data/nmorph-qr-code/NmorphQRCode.css +1 -0
  75. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue.js +59 -0
  76. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +51 -0
  77. package/dist/components/data/nmorph-qr-code/qr-code.js +568 -0
  78. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
  79. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
  80. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.css +1 -0
  81. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue.js +86 -0
  82. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +61 -0
  83. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
  84. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
  85. package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
  86. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
  87. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
  88. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.css +1 -0
  89. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue.js +81 -0
  90. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +48 -0
  91. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
  92. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.js +30 -30
  93. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +59 -64
  94. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +5 -5
  95. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +5 -5
  96. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +20 -19
  97. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.js +13 -13
  98. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue2.js +28 -27
  99. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue.js +16 -16
  100. package/dist/components/form/nmorph-date-picker/inner-components/nmorph-year-month-picker/NmorphYearMonthPicker.vue2.js +20 -17
  101. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +7 -7
  102. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +2 -2
  103. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
  104. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +3 -6
  105. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue.js +21 -21
  106. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +92 -84
  107. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  108. package/dist/components/form/nmorph-select/NmorphSelect.vue.js +5 -5
  109. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +66 -74
  110. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
  111. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +18 -17
  112. package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
  113. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +25 -24
  114. package/dist/components/form/nmorph-switch/NmorphSwitch.vue.js +1 -1
  115. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +22 -21
  116. package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
  117. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +4 -2
  118. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +17 -19
  119. package/dist/components/form/nmorph-textarea/NmorphTextarea.css +1 -0
  120. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +41 -0
  121. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +67 -0
  122. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.css +1 -1
  123. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +43 -42
  124. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +38 -28
  125. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
  126. package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
  127. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
  128. package/dist/hooks/use-common-styles.js +18 -278
  129. package/dist/hooks/use-virtual-list.js +38 -32
  130. package/dist/icons.js +621 -533
  131. package/dist/index.es.js +780 -678
  132. package/dist/index.umd.js +25 -285
  133. package/dist/package.json.js +1 -1
  134. package/dist/src/components/basic/index.d.ts +2 -0
  135. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +1 -1
  136. package/dist/src/components/basic/nmorph-icon/NmorphIcons.d.ts +48 -3
  137. package/dist/src/components/basic/nmorph-layout/NmorphLayout.vue.d.ts +22 -0
  138. package/dist/src/components/basic/nmorph-space/NmorphSpace.vue.d.ts +33 -0
  139. package/dist/src/components/data/index.d.ts +4 -0
  140. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
  141. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
  142. package/dist/src/components/data/nmorph-qr-code/NmorphQRCode.vue.d.ts +34 -0
  143. package/dist/src/components/data/nmorph-qr-code/qr-code.d.ts +12 -0
  144. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
  145. package/dist/src/components/data/nmorph-virtual-list/NmorphVirtualList.vue.d.ts +46 -0
  146. package/dist/src/components/data/nmorph-virtual-list/types.d.ts +4 -0
  147. package/dist/src/components/feedback/index.d.ts +1 -0
  148. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
  149. package/dist/src/components/feedback/nmorph-drawer/NmorphDrawer.vue.d.ts +40 -0
  150. package/dist/src/components/form/index.d.ts +1 -0
  151. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
  152. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +2 -2
  153. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
  154. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +1 -1
  155. package/dist/src/components/form/nmorph-date-picker/inner-components/nmorph-date-picker-content/NmorphDatePickerContent.vue.d.ts +2 -2
  156. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
  157. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
  158. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  159. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
  160. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +2 -2
  161. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
  162. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
  163. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  164. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +48 -0
  165. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
  166. package/dist/src/components/navigation/nmorph-backtop/NmorphBacktop.vue.d.ts +1 -1
  167. package/dist/src/components/navigation/nmorph-context-menu/NmorphContextMenu.vue.d.ts +1 -1
  168. package/dist/src/components/navigation/nmorph-dropdown/NmorphDropdown.vue.d.ts +1 -1
  169. package/dist/src/hooks/use-virtual-list.d.ts +6 -0
  170. package/dist/src/types/index.d.ts +2 -1
  171. package/dist/src/utils/common.d.ts +5 -0
  172. package/dist/src/utils/create-modifiers.d.ts +4 -2
  173. package/dist/style.css +1 -1
  174. package/dist/utils/common.js +9 -2
  175. package/dist/utils/create-modifiers.js +6 -6
  176. 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
+ };
@@ -14,7 +14,7 @@ const f = /* @__PURE__ */ d({
14
14
  n();
15
15
  const e = r, a = o(
16
16
  () => l({
17
- "nmorph-skeleton": [`${e.animated && e.loading && "loading"}`]
17
+ "nmorph-skeleton": [e.animated && e.loading && "loading"]
18
18
  })
19
19
  ), i = o(() => ({
20
20
  ...e.loadingGradient !== void 0 && { "--loading-gradient": e.loadingGradient }
@@ -1,10 +1,10 @@
1
1
  import './NmorphTable.css';
2
- import { defineComponent as P, computed as a, ref as n, provide as M, watch as K, nextTick as Q } from "vue";
3
- import { useModifiers as V } from "../../../utils/create-modifiers.js";
4
- import { generateUUID as Y } from "../../../utils/common.js";
5
- import z from "./inner-components/nmorph-sort-button/NmorphSortButton.vue.js";
6
- import { useVirtualList as F } from "../../../hooks/use-virtual-list.js";
7
- const re = /* @__PURE__ */ P({
2
+ import { defineComponent as K, computed as a, ref as n, provide as B, watch as Q, nextTick as V } from "vue";
3
+ import { useModifiers as z } from "../../../utils/create-modifiers.js";
4
+ import { generateUUID as Y, toCssSize as M, resolveDomElement as $ } from "../../../utils/common.js";
5
+ import F from "./inner-components/nmorph-sort-button/NmorphSortButton.vue.js";
6
+ import { useVirtualList as G } from "../../../hooks/use-virtual-list.js";
7
+ const le = /* @__PURE__ */ K({
8
8
  __name: "NmorphTable",
9
9
  props: {
10
10
  data: { type: Array, required: !1, default: () => [] },
@@ -21,37 +21,37 @@ const re = /* @__PURE__ */ P({
21
21
  cellHeight: { type: [Number, String], required: !1, default: void 0 },
22
22
  rowHoverBackground: { type: String, required: !1, default: void 0 }
23
23
  },
24
- setup(T, { expose: _ }) {
25
- _();
26
- const t = T, I = a(
27
- () => V({
28
- "nmorph-table": [`${t.design}`]
24
+ setup(_, { expose: T }) {
25
+ T();
26
+ const t = _, I = a(
27
+ () => z({
28
+ "nmorph-table": [t.design]
29
29
  })
30
- ), o = n([...t.data]), u = a(() => t.virtual), H = a(() => t.virtualRowHeight), x = a(() => t.virtualOverscan), S = a(() => t.virtualDynamicHeight), r = F(o, {
30
+ ), o = n([...t.data]), u = a(() => t.virtual), b = a(() => t.virtualRowHeight), H = a(() => t.virtualOverscan), S = a(() => t.virtualDynamicHeight), r = G(o, {
31
31
  enabled: u,
32
- itemHeight: H,
33
- overscan: x,
32
+ itemHeight: b,
33
+ overscan: H,
34
34
  dynamic: S
35
- }), C = a(
35
+ }), x = a(
36
36
  () => u.value ? r.virtualItems.value : o.value.map((e, l) => ({ item: e, index: l }))
37
- ), R = a(() => C.value.map((e) => e.item)), s = n(-1), h = n(0), d = n(t.sort), W = (e, l) => {
38
- d.value && (d.value[l] = e, o.value.sort((y, w) => {
39
- const b = String(y[l]).toLowerCase(), i = String(w[l]).toLowerCase();
37
+ ), C = a(() => x.value.map((e) => e.item)), s = n(-1), h = n(0), d = n(t.sort), W = (e, l) => {
38
+ d.value && (d.value[l] = e, o.value.sort((g, y) => {
39
+ const w = String(g[l]).toLowerCase(), i = String(y[l]).toLowerCase();
40
40
  if (!d.value)
41
41
  return 0;
42
42
  const f = d.value[l];
43
- return f === "ascending" ? b.localeCompare(i) : f === "descending" ? i.localeCompare(b) : 0;
43
+ return f === "ascending" ? w.localeCompare(i) : f === "descending" ? i.localeCompare(w) : 0;
44
44
  }));
45
- }, p = n(null), c = n([]);
46
- M("table-data", { rows: R, columns: c });
45
+ }, m = n(null), c = n([]);
46
+ B("table-data", { rows: C, columns: c });
47
47
  const D = a(() => {
48
- const e = c.value.map((i) => i.width).filter((i) => !!i), l = e.length, y = e.reduce((i, f) => (i += Number(f), i), 0), w = c.value.length - l;
49
- return p.value?.clientWidth ? (p.value?.clientWidth - y) / w : 0;
50
- }), N = (e) => e !== "" ? e : D.value, m = n(0);
51
- K(
48
+ const e = c.value.map((i) => i.width).filter((i) => !!i), l = e.length, g = e.reduce((i, f) => (i += Number(f), i), 0), y = c.value.length - l;
49
+ return m.value?.clientWidth ? (m.value?.clientWidth - g) / y : 0;
50
+ }), N = (e) => e !== "" ? e : D.value, p = n(0);
51
+ Q(
52
52
  () => t.data,
53
53
  async () => {
54
- m.value = m.value + 1, o.value = [...t.data], c.value = [], await Q();
54
+ p.value = p.value + 1, o.value = [...t.data], c.value = [], await V();
55
55
  const e = r.containerRef.value;
56
56
  e && (e.scrollTop = Math.min(
57
57
  h.value,
@@ -62,38 +62,34 @@ const re = /* @__PURE__ */ P({
62
62
  immediate: !0
63
63
  }
64
64
  );
65
- const O = (e) => typeof e == "object" ? "" : e, q = Y();
66
- M("table-identifier", q);
67
- const g = (e) => typeof e == "number" ? `${e}px` : e, k = a(() => g(t.virtualHeight)), $ = a(() => ({
65
+ const O = (e) => typeof e == "object" ? "" : e, R = Y();
66
+ B("table-identifier", R);
67
+ const q = a(() => M(t.virtualHeight)), A = a(() => ({
68
68
  ...t.borderColor !== void 0 && { "--border-color": t.borderColor },
69
- ...t.cellHeight !== void 0 && { "--table-cell-height": g(t.cellHeight) },
69
+ ...t.cellHeight !== void 0 && { "--table-cell-height": M(t.cellHeight) },
70
70
  ...t.rowHoverBackground !== void 0 && { "--table-background-row-hover": t.rowHoverBackground }
71
- })), A = a(() => ({
71
+ })), E = a(() => ({
72
72
  "--table-virtual-row-height": `${t.virtualRowHeight}px`,
73
- height: u.value ? k.value : void 0,
73
+ height: u.value ? q.value : void 0,
74
74
  overflowY: u.value ? "auto" : void 0
75
- })), L = a(() => ({
76
- height: `${r.totalHeight.value}px`
77
- })), U = a(() => ({
78
- transform: `translateY(${r.offsetTop.value}px)`
79
- })), j = (e, l) => {
80
- r.measureElement(l, e);
81
- }, E = () => {
75
+ })), L = r.spacerStyle, U = r.contentStyle, j = (e, l) => {
76
+ r.measureElement(l, $(e));
77
+ }, P = () => {
82
78
  r.scrollHandler(), h.value = r.containerRef.value?.scrollTop || 0;
83
79
  }, v = (e) => {
84
80
  if (!o.value.length) return;
85
81
  const l = s.value < 0 ? 0 : Math.min(Math.max(s.value + e, 0), o.value.length - 1);
86
82
  s.value = l, r.scrollToIndex(l);
87
- }, B = { props: t, modifiers: I, rows: o, virtualEnabled: u, virtualRowHeight: H, virtualOverscan: x, virtualDynamicHeight: S, virtualList: r, renderedRows: C, tableRows: R, activeRowIndex: s, lastScrollTop: h, sortData: d, onSort: W, nmorphDOMTable: p, columns: c, defaultColWidth: D, getWidth: N, key: m, tableData: O, tableIdentifier: q, getCssSize: g, virtualHeight: k, tableStyle: $, tableBodyStyle: A, virtualSpacerStyle: L, virtualContentStyle: U, setVirtualRowRef: j, scrollHandler: E, moveActiveRow: v, tableKeydownHandler: (e) => {
83
+ }, k = { props: t, modifiers: I, rows: o, virtualEnabled: u, virtualRowHeight: b, virtualOverscan: H, virtualDynamicHeight: S, virtualList: r, renderedRows: x, tableRows: C, activeRowIndex: s, lastScrollTop: h, sortData: d, onSort: W, nmorphDOMTable: m, columns: c, defaultColWidth: D, getWidth: N, key: p, tableData: O, tableIdentifier: R, virtualHeight: q, tableStyle: A, tableBodyStyle: E, virtualSpacerStyle: L, virtualContentStyle: U, setVirtualRowRef: j, scrollHandler: P, moveActiveRow: v, tableKeydownHandler: (e) => {
88
84
  u.value && (e.key === "ArrowDown" ? (e.preventDefault(), v(1)) : e.key === "ArrowUp" ? (e.preventDefault(), v(-1)) : e.key === "Home" ? (e.preventDefault(), s.value = 0, r.scrollToIndex(0)) : e.key === "End" ? (e.preventDefault(), s.value = o.value.length - 1, r.scrollToIndex(o.value.length - 1)) : e.key === "PageDown" ? (e.preventDefault(), v(
89
85
  Math.max(Math.floor((r.viewportHeight.value || t.virtualRowHeight) / t.virtualRowHeight), 1)
90
86
  )) : e.key === "PageUp" && (e.preventDefault(), v(
91
87
  -Math.max(Math.floor((r.viewportHeight.value || t.virtualRowHeight) / t.virtualRowHeight), 1)
92
88
  )));
93
- }, NmorphSortButton: z };
94
- return Object.defineProperty(B, "__isScriptSetup", { enumerable: !1, value: !0 }), B;
89
+ }, NmorphSortButton: F };
90
+ return Object.defineProperty(k, "__isScriptSetup", { enumerable: !1, value: !0 }), k;
95
91
  }
96
92
  });
97
93
  export {
98
- re as default
94
+ le as default
99
95
  };
@@ -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)}