@nmorph/nmorph-ui-kit 2.2.36 → 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 (89) hide show
  1. package/dist/components/basic/nmorph-button/NmorphButton.vue2.js +8 -8
  2. package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
  3. package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +14 -13
  4. package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
  5. package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
  6. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
  7. package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
  8. package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +15 -19
  9. package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
  10. package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +5 -5
  11. package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
  12. package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
  13. package/dist/components/data/nmorph-card/NmorphCard.vue2.js +15 -14
  14. package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
  15. package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
  16. package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
  17. package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
  18. package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
  19. package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
  20. package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
  21. package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +1 -1
  22. package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
  23. package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +20 -19
  24. package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
  25. package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
  26. package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +34 -33
  27. package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
  28. package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
  29. package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
  30. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
  31. package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
  32. package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +22 -21
  33. package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
  34. package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +54 -62
  35. package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +5 -5
  36. package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +5 -5
  37. package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +20 -19
  38. package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +7 -7
  39. package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +2 -2
  40. package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
  41. package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +3 -6
  42. package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +6 -6
  43. package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
  44. package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +65 -73
  45. package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
  46. package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +18 -17
  47. package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
  48. package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +25 -24
  49. package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +23 -22
  50. package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
  51. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +4 -2
  52. package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +17 -19
  53. package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +9 -9
  54. package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +43 -42
  55. package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +1 -1
  56. package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
  57. package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
  58. package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
  59. package/dist/hooks/use-common-styles.js +18 -278
  60. package/dist/hooks/use-virtual-list.js +38 -32
  61. package/dist/index.umd.js +21 -281
  62. package/dist/package.json.js +1 -1
  63. package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +1 -1
  64. package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
  65. package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
  66. package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
  67. package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
  68. package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
  69. package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +1 -1
  70. package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
  71. package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +1 -1
  72. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
  73. package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
  74. package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
  75. package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
  76. package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +1 -1
  77. package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
  78. package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
  79. package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
  80. package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
  81. package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
  82. package/dist/src/hooks/use-virtual-list.d.ts +6 -0
  83. package/dist/src/types/index.d.ts +2 -1
  84. package/dist/src/utils/common.d.ts +5 -0
  85. package/dist/src/utils/create-modifiers.d.ts +4 -2
  86. package/dist/style.css +1 -1
  87. package/dist/utils/common.js +9 -2
  88. package/dist/utils/create-modifiers.js +6 -6
  89. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- import { nmorphCombined as p, nmorphInset as r, nmorphOutset as n, title1 as s, title2 as l, title3 as d, title4 as m, body1 as e, body2 as c, body3 as a, body4 as b } from "../utils/theme-style.js";
2
- const u = {
3
- "nmorph-body-4": b,
4
- "nmorph-body-3": a,
5
- "nmorph-body-2": c,
1
+ import { nmorphCombined as i, nmorphInset as s, nmorphOutset as h, title1 as d, title2 as l, title3 as p, title4 as c, body1 as e, body2 as b, body3 as r, body4 as m } from "../utils/theme-style.js";
2
+ const v = {
3
+ "nmorph-body-4": m,
4
+ "nmorph-body-3": r,
5
+ "nmorph-body-2": b,
6
6
  "nmorph-body-1": e,
7
- "nmorph-title-4": m,
8
- "nmorph-title-3": d,
7
+ "nmorph-title-4": c,
8
+ "nmorph-title-3": p,
9
9
  "nmorph-title-2": l,
10
- "nmorph-title-1": s,
11
- "nmorph--shadow-outset": n,
12
- "nmorph--shadow-inset": r,
13
- "nmorph--shadow-combined": p
14
- }, v = () => {
10
+ "nmorph-title-1": d,
11
+ "nmorph--shadow-outset": h,
12
+ "nmorph--shadow-inset": s,
13
+ "nmorph--shadow-combined": i
14
+ }, u = () => {
15
15
  let t = `
16
16
  :root {
17
17
  --font-size-tiny: 10px;
@@ -284,7 +284,7 @@ const u = {
284
284
  }
285
285
 
286
286
  .nmorph--thin-component.nmorph-native-input {
287
- ${a()}
287
+ ${r()}
288
288
  }
289
289
 
290
290
  .nmorph-native-input:focus {
@@ -316,212 +316,6 @@ const u = {
316
316
  }
317
317
  }
318
318
 
319
- .nmorph-avatar {
320
- position: relative;
321
- overflow: hidden;
322
- display: flex;
323
- align-items: center;
324
- justify-content: center;
325
- }
326
-
327
- .nmorph-avatar--circle {
328
- border-radius: var(--border-radius-circular);
329
- }
330
-
331
- .nmorph-avatar--square {
332
- border-radius: var(--default-border-radius);
333
- }
334
-
335
- .nmorph-avatar > .nmorph-image {
336
- position: absolute;
337
- --width: var(--nmorph-avatar-size);
338
- --height: var(--nmorph-avatar-size);
339
- padding: var(--nmorph-avatar-image-padding);
340
- border-radius: var(--nmorph-avatar-radius);
341
- }
342
-
343
- .nmorph-avatar.nmorph--shadow-combined {
344
- border: var(--nmorph-avatar-frame-border) solid var(--nmorph-main-color);
345
- background: var(--nmorph-main-color);
346
- box-shadow: var(--nmorph-shadow-combined-dark);
347
- }
348
-
349
- .nmorph-avatar > .nmorph-image > img {
350
- border-radius: var(--nmorph-avatar-image-radius);
351
- }
352
-
353
- .nmorph-avatar__initials {
354
- color: var(--nmorph-text-color);
355
- font-weight: 600;
356
- line-height: 1;
357
- }
358
-
359
- .nmorph-avatar--preview {
360
- cursor: pointer;
361
- }
362
-
363
- .nmorph-avatar--preview:hover > .nmorph-image {
364
- filter: brightness(0.8);
365
- }
366
-
367
- .nmorph-image {
368
- --width: auto;
369
- --height: 100%;
370
- width: var(--width);
371
- height: var(--height);
372
- display: flex;
373
- align-items: center;
374
- justify-content: center;
375
- }
376
-
377
- .nmorph-image.nmorph--shadow-combined {
378
- border: var(--nmorph-image-frame-border) solid var(--nmorph-main-color);
379
- }
380
-
381
- .nmorph-image img {
382
- width: 100%;
383
- height: 100%;
384
- object-fit: var(--nmorph-image-fit);
385
- }
386
-
387
- .nmorph-image__loading,
388
- .nmorph-image__load-failed {
389
- padding: 1rem;
390
- }
391
-
392
- .nmorph-image--hide img {
393
- width: 0;
394
- height: 0;
395
- opacity: 0;
396
- }
397
-
398
- .nmorph-text-input {
399
- display: flex;
400
- flex: 1 1 auto;
401
- flex-direction: column;
402
- align-items: flex-start;
403
- min-width: 0;
404
- --prepend-icon-indent: 8px;
405
- --prepend-icon-size: 14px;
406
- }
407
-
408
- .nmorph-text-input__input-side {
409
- position: relative;
410
- display: flex;
411
- align-items: center;
412
- justify-content: flex-end;
413
- width: 100%;
414
- }
415
-
416
- .nmorph-text-input__prepend-icon {
417
- position: absolute;
418
- left: 0;
419
- z-index: 1;
420
- display: flex;
421
- align-items: center;
422
- justify-content: center;
423
- width: var(--prepend-icon-size);
424
- min-width: var(--prepend-icon-size);
425
- height: var(--prepend-icon-size);
426
- min-height: var(--prepend-icon-size);
427
- margin-left: var(--prepend-icon-indent);
428
- pointer-events: none;
429
- }
430
-
431
- .nmorph-text-input__prepend-icon svg,
432
- .nmorph-text-input__prepend-icon .nmorph-icon,
433
- .nmorph-text-input__prepend-icon .nmorph-icon__content {
434
- width: 100%;
435
- min-width: 100%;
436
- height: 100%;
437
- min-height: 100%;
438
- }
439
-
440
- .nmorph-text-input__prepend-icon svg {
441
- fill: var(--nmorph-text-color);
442
- stroke-width: 0;
443
- }
444
-
445
- .nmorph-text-input__prepend-icon path {
446
- stroke: var(--nmorph-text-color);
447
- }
448
-
449
- .nmorph-text-input input {
450
- width: 100%;
451
- height: var(--height);
452
- text-indent: var(--nmorph-text-input-indentation);
453
- border: none;
454
- border-radius: var(--default-border-radius);
455
- ${r()}
456
- }
457
-
458
- .nmorph-text-input--with-action input {
459
- padding-right: calc(var(--height) + var(--indentation-03));
460
- }
461
-
462
- .nmorph-text-input input:focus {
463
- ${n()}
464
- background: var(--nmorph-accent-color);
465
- outline: none;
466
- }
467
-
468
- .nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon svg {
469
- fill: var(--nmorph-focus-text-color);
470
- }
471
-
472
- .nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon path {
473
- stroke: var(--nmorph-focus-text-color);
474
- }
475
-
476
- .nmorph-text-input input:-webkit-autofill,
477
- .nmorph-text-input input:-webkit-autofill:hover,
478
- .nmorph-text-input input:-webkit-autofill:active {
479
- -webkit-text-fill-color: var(--nmorph-text-color);
480
- caret-color: var(--nmorph-text-color);
481
- box-shadow: var(--nmorph-shadow-inset), inset 0 0 0 1000px var(--nmorph-main-color);
482
- }
483
-
484
- .nmorph-text-input input:-webkit-autofill:focus {
485
- -webkit-text-fill-color: var(--nmorph-focus-text-color);
486
- caret-color: var(--nmorph-focus-text-color);
487
- box-shadow: var(--nmorph-shadow-outset), inset 0 0 0 1000px var(--nmorph-accent-color);
488
- outline: none;
489
- }
490
-
491
- .nmorph-text-input input:disabled {
492
- cursor: not-allowed;
493
- opacity: 0.6;
494
- }
495
-
496
- .nmorph-text-input__password-btn {
497
- position: absolute;
498
- right: 0;
499
- height: 100%;
500
- }
501
-
502
- .nmorph-text-input__password-btn .nmorph-button__content {
503
- padding: var(--indentation-03);
504
- }
505
-
506
- .nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn {
507
- margin-top: var(--indentation-00);
508
- }
509
-
510
- .nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn .nmorph-button {
511
- --height: var(--thin-component);
512
- }
513
-
514
- .nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-icon {
515
- --color: var(--nmorph-white-color);
516
- }
517
-
518
- .nmorph-text-input.nmorph-button.nmorph--focused
519
- .nmorph-text-input__password-btn
520
- .nmorph-button:not(:disabled, [loading='true']):hover
521
- .nmorph-icon {
522
- --color: var(--nmorph-white-color);
523
- }
524
-
525
319
  .list-enter-active,
526
320
  .list-leave-active {
527
321
  transition: all var(--transition-02) ease;
@@ -563,74 +357,20 @@ const u = {
563
357
  }
564
358
  }
565
359
 
566
- .nmorph-scroll {
567
- --thumb-color: var(--nmorph-scroll-thumb-color, var(--nmorph-text-color));
568
- color-scheme: var(--nmorph-scroll-color-scheme, light);
569
- }
570
-
571
- @-moz-document url-prefix() {
572
- .nmorph-scroll {
573
- scrollbar-color: var(--thumb-color) transparent;
574
- scrollbar-width: thin;
575
- }
576
- }
577
-
578
- .nmorph-scroll::-webkit-scrollbar {
579
- width: var(--bar-width);
580
- height: var(--bar-height);
581
- background-color: transparent;
582
- cursor: pointer;
583
- transition: width ease-in-out 0.2s;
584
- }
585
-
586
- .nmorph-scroll::-webkit-scrollbar-button,
587
- .nmorph-scroll::-webkit-scrollbar-button:single-button,
588
- .nmorph-scroll::-webkit-scrollbar-button:double-button,
589
- .nmorph-scroll::-webkit-scrollbar-button:vertical:start:decrement,
590
- .nmorph-scroll::-webkit-scrollbar-button:vertical:end:increment,
591
- .nmorph-scroll::-webkit-scrollbar-button:horizontal:start:decrement,
592
- .nmorph-scroll::-webkit-scrollbar-button:horizontal:end:increment {
593
- display: none !important;
594
- width: 0 !important;
595
- min-width: 0 !important;
596
- max-width: 0 !important;
597
- height: 0 !important;
598
- min-height: 0 !important;
599
- max-height: 0 !important;
600
- border: 0 !important;
601
- background: transparent !important;
602
- background-image: none !important;
603
- -webkit-appearance: none;
604
- appearance: none;
605
- }
606
-
607
- .nmorph-scroll::-webkit-scrollbar-track {
608
- border-radius: var(--border-radius-40);
609
- ${r()}
610
- }
611
-
612
- .nmorph-scroll::-webkit-scrollbar-thumb {
613
- background-color: var(--thumb-color);
614
- border-radius: var(--border-radius-40);
615
- }
616
-
617
- .nmorph-scroll::-webkit-scrollbar-corner {
618
- background-color: transparent;
619
- }
620
360
  `;
621
- for (const [i, h] of Object.entries(u))
361
+ for (const [a, n] of Object.entries(v))
622
362
  t += `
623
- .${i} {
624
- ${h()}
363
+ .${a} {
364
+ ${n()}
625
365
  }
626
366
  `;
627
367
  return t;
628
368
  }, g = () => {
629
369
  if (typeof document > "u" || document.getElementById("nmorph-common-styles")) return;
630
370
  const o = document.createElement("style");
631
- o.id = "nmorph-common-styles", o.innerHTML = v(), document.head.appendChild(o);
371
+ o.id = "nmorph-common-styles", o.innerHTML = u(), document.head.appendChild(o);
632
372
  };
633
373
  export {
634
- v as getCommonStyles,
374
+ u as getCommonStyles,
635
375
  g as useCommonStyles
636
376
  };
@@ -1,72 +1,78 @@
1
- import { ref as m, computed as n, onMounted as R, nextTick as M, onUnmounted as V, watch as k } from "vue";
2
- const C = (a, h) => {
3
- const x = m(null), c = m(0), d = m(0), s = n(() => h.enabled?.value ?? !0), i = n(() => Math.max(h.overscan?.value ?? 0, 0)), u = n(() => h.dynamic?.value ?? !1), o = n(() => Math.max(h.itemHeight.value, 1)), g = m({}), p = (e) => u.value && g.value[e] || o.value, f = n(() => {
1
+ import { ref as m, computed as a, onMounted as V, nextTick as M, onUnmounted as $, watch as k } from "vue";
2
+ const C = (n, h) => {
3
+ const x = m(null), c = m(0), d = m(0), s = a(() => h.enabled?.value ?? !0), i = a(() => Math.max(h.overscan?.value ?? 0, 0)), u = a(() => h.dynamic?.value ?? !1), o = a(() => Math.max(h.itemHeight.value, 1)), g = m({}), w = (e) => u.value && g.value[e] || o.value, f = a(() => {
4
4
  const e = [];
5
5
  let t = 0;
6
- for (let l = 0; l < a.value.length; l++)
7
- e[l] = t, t += p(l);
6
+ for (let l = 0; l < n.value.length; l++)
7
+ e[l] = t, t += w(l);
8
8
  return { offsets: e, total: t };
9
- }), w = n(() => s.value ? u.value ? f.value.total : a.value.length * o.value : 0), r = () => {
9
+ }), p = a(() => s.value ? u.value ? f.value.total : n.value.length * o.value : 0), r = () => {
10
10
  const e = x.value;
11
11
  if (!e) return;
12
- const t = Math.max(w.value - e.clientHeight, 0);
12
+ const t = Math.max(p.value - e.clientHeight, 0);
13
13
  e.scrollTop > t && (e.scrollTop = t), c.value = e.scrollTop, d.value = e.clientHeight;
14
- }, I = () => {
14
+ }, y = () => {
15
15
  r();
16
- }, v = n(() => {
16
+ }, v = a(() => {
17
17
  if (!s.value) return 0;
18
18
  if (u.value) {
19
- const e = f.value.offsets.findIndex((t, l) => t + p(l) >= c.value);
19
+ const e = f.value.offsets.findIndex((t, l) => t + w(l) >= c.value);
20
20
  return Math.max(e === -1 ? 0 : e - i.value, 0);
21
21
  }
22
22
  return Math.max(Math.floor(c.value / o.value) - i.value, 0);
23
- }), H = n(() => {
24
- if (!s.value) return a.value.length;
23
+ }), H = a(() => {
24
+ if (!s.value) return n.value.length;
25
25
  if (u.value) {
26
26
  const t = c.value + d.value;
27
27
  let l = v.value;
28
- for (; l < a.value.length && f.value.offsets[l] <= t; )
28
+ for (; l < n.value.length && f.value.offsets[l] <= t; )
29
29
  l++;
30
- return Math.min(l + i.value, a.value.length);
30
+ return Math.min(l + i.value, n.value.length);
31
31
  }
32
32
  const e = Math.ceil((c.value + d.value) / o.value) + i.value;
33
- return Math.min(Math.max(e, v.value + i.value), a.value.length);
34
- }), y = n(
33
+ return Math.min(Math.max(e, v.value + i.value), n.value.length);
34
+ }), T = a(
35
35
  () => u.value ? f.value.offsets[v.value] || 0 : v.value * o.value
36
- ), z = n(() => s.value ? a.value.slice(v.value, H.value).map((e, t) => ({
36
+ ), z = a(() => s.value ? n.value.slice(v.value, H.value).map((e, t) => ({
37
37
  item: e,
38
38
  index: v.value + t
39
- })) : a.value.map((e, t) => ({ item: e, index: t }))), E = (e) => {
39
+ })) : n.value.map((e, t) => ({ item: e, index: t }))), E = a(() => ({
40
+ height: `${p.value}px`
41
+ })), L = a(() => ({
42
+ transform: `translateY(${T.value}px)`
43
+ })), S = (e) => {
40
44
  const t = x.value;
41
45
  if (!t || !s.value) return;
42
- const l = Math.min(Math.max(e, 0), Math.max(a.value.length - 1, 0)), b = u.value ? f.value.offsets[l] || 0 : l * o.value;
43
- t.scrollTop = b, r();
44
- }, L = (e, t) => {
46
+ const l = Math.min(Math.max(e, 0), Math.max(n.value.length - 1, 0)), R = u.value ? f.value.offsets[l] || 0 : l * o.value;
47
+ t.scrollTop = R, r();
48
+ }, b = (e, t) => {
45
49
  if (!u.value || !t) return;
46
50
  const l = Math.ceil(t.getBoundingClientRect().height || t.offsetHeight);
47
51
  !l || g.value[e] === l || (g.value = { ...g.value, [e]: l }, M(r));
48
- }, T = () => {
52
+ }, I = () => {
49
53
  r();
50
54
  };
51
- return R(() => {
52
- M(r), typeof window < "u" && window.addEventListener("resize", T);
53
- }), V(() => {
54
- typeof window < "u" && window.removeEventListener("resize", T);
55
+ return V(() => {
56
+ M(r), typeof window < "u" && window.addEventListener("resize", I);
57
+ }), $(() => {
58
+ typeof window < "u" && window.removeEventListener("resize", I);
55
59
  }), k(
56
- () => [a.value.length, s.value, o.value, u.value],
60
+ () => [n.value.length, s.value, o.value, u.value],
57
61
  () => {
58
62
  M(r);
59
63
  }
60
64
  ), {
61
65
  containerRef: x,
66
+ contentStyle: L,
62
67
  endIndex: H,
63
- offsetTop: y,
68
+ offsetTop: T,
64
69
  refresh: r,
65
- measureElement: L,
66
- scrollHandler: I,
67
- scrollToIndex: E,
70
+ measureElement: b,
71
+ scrollHandler: y,
72
+ scrollToIndex: S,
73
+ spacerStyle: E,
68
74
  startIndex: v,
69
- totalHeight: w,
75
+ totalHeight: p,
70
76
  viewportHeight: d,
71
77
  virtualItems: z
72
78
  };