rails_modal_manager 1.0.35 → 1.0.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e33e1757e9bc78d6b4e0b801af55ce709813f195254eb3196b8f8394a6afcce
|
|
4
|
+
data.tar.gz: 81818160c6846429dccc642893a95d2c98f0274406aaae378eff2a6e73ff2163
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2b826a9937d346a5163902fd6d6a47ba22816c99ffdcf52710cbe09f3feca7b2bc571b818eb0229f7092fd2615cda1772f7dd01a8a49bf817e454487179b5790
|
|
7
|
+
data.tar.gz: 05bf7a6f7cdbe61b203a44735b597bcd9a57b5fe9eff65b3779eb332cb63ead249118b4175ef52c1f363e0d68726434cc79225e1a540c5d95e0552c1e1917cbc
|
|
@@ -1561,58 +1561,6 @@
|
|
|
1561
1561
|
}
|
|
1562
1562
|
}
|
|
1563
1563
|
|
|
1564
|
-
/* MD, LG, XL 사이즈는 768px이 아닌 각자의 min-width 기준으로 모바일 스타일 적용
|
|
1565
|
-
- MD: 960px 이상에서는 데스크톱 스타일 유지
|
|
1566
|
-
- LG: 1152px 이상에서는 데스크톱 스타일 유지
|
|
1567
|
-
- XL: 1344px 이상에서는 데스크톱 스타일 유지
|
|
1568
|
-
*/
|
|
1569
|
-
@media (min-width: 769px) {
|
|
1570
|
-
/* MD: 769px ~ 960px 범위에서도 min-width 적용 */
|
|
1571
|
-
.rmm-modal.rmm-size-md {
|
|
1572
|
-
width: 50% !important;
|
|
1573
|
-
min-width: min(960px, calc(100vw - 40px)) !important;
|
|
1574
|
-
max-width: calc(100vw - 40px) !important;
|
|
1575
|
-
left: 50% !important;
|
|
1576
|
-
right: auto !important;
|
|
1577
|
-
}
|
|
1578
|
-
.rmm-modal.rmm-size-md.rmm-position-center {
|
|
1579
|
-
transform: translate(-50%, -50%) !important;
|
|
1580
|
-
}
|
|
1581
|
-
.rmm-modal.rmm-size-md.rmm-position-center.rmm-active {
|
|
1582
|
-
transform: translate(-50%, -50%) scale(1) !important;
|
|
1583
|
-
}
|
|
1584
|
-
|
|
1585
|
-
/* LG: 769px ~ 1152px 범위에서도 min-width 적용 */
|
|
1586
|
-
.rmm-modal.rmm-size-lg {
|
|
1587
|
-
width: 60% !important;
|
|
1588
|
-
min-width: min(1152px, calc(100vw - 40px)) !important;
|
|
1589
|
-
max-width: calc(100vw - 40px) !important;
|
|
1590
|
-
left: 50% !important;
|
|
1591
|
-
right: auto !important;
|
|
1592
|
-
}
|
|
1593
|
-
.rmm-modal.rmm-size-lg.rmm-position-center {
|
|
1594
|
-
transform: translate(-50%, -50%) !important;
|
|
1595
|
-
}
|
|
1596
|
-
.rmm-modal.rmm-size-lg.rmm-position-center.rmm-active {
|
|
1597
|
-
transform: translate(-50%, -50%) scale(1) !important;
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
/* XL: 769px ~ 1344px 범위에서도 min-width 적용 */
|
|
1601
|
-
.rmm-modal.rmm-size-xl {
|
|
1602
|
-
width: 70% !important;
|
|
1603
|
-
min-width: min(1344px, calc(100vw - 40px)) !important;
|
|
1604
|
-
max-width: calc(100vw - 40px) !important;
|
|
1605
|
-
left: 50% !important;
|
|
1606
|
-
right: auto !important;
|
|
1607
|
-
}
|
|
1608
|
-
.rmm-modal.rmm-size-xl.rmm-position-center {
|
|
1609
|
-
transform: translate(-50%, -50%) !important;
|
|
1610
|
-
}
|
|
1611
|
-
.rmm-modal.rmm-size-xl.rmm-position-center.rmm-active {
|
|
1612
|
-
transform: translate(-50%, -50%) scale(1) !important;
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
1564
|
/* ============================================
|
|
1617
1565
|
Drag Handle
|
|
1618
1566
|
============================================ */
|
|
@@ -1732,3 +1680,55 @@
|
|
|
1732
1680
|
opacity: 0.5;
|
|
1733
1681
|
transition: opacity 0.2s ease;
|
|
1734
1682
|
}
|
|
1683
|
+
|
|
1684
|
+
/* ============================================
|
|
1685
|
+
PC Size Fixes (min-width: 769px)
|
|
1686
|
+
- 중간 크기 브라우저에서도 min-width 적용
|
|
1687
|
+
- :not(.rmm-dragging):not(.rmm-custom-position)으로 드래그 중/후 제외
|
|
1688
|
+
============================================ */
|
|
1689
|
+
@media (min-width: 769px) {
|
|
1690
|
+
/* MD: 769px ~ 960px 범위에서도 min-width 적용 */
|
|
1691
|
+
.rmm-modal.rmm-size-md:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1692
|
+
width: 50% !important;
|
|
1693
|
+
min-width: min(960px, calc(100vw - 40px)) !important;
|
|
1694
|
+
max-width: calc(100vw - 40px) !important;
|
|
1695
|
+
left: 50% !important;
|
|
1696
|
+
right: auto !important;
|
|
1697
|
+
}
|
|
1698
|
+
.rmm-modal.rmm-size-md.rmm-position-center:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1699
|
+
transform: translate(-50%, -50%) !important;
|
|
1700
|
+
}
|
|
1701
|
+
.rmm-modal.rmm-size-md.rmm-position-center.rmm-active:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1702
|
+
transform: translate(-50%, -50%) scale(1) !important;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
/* LG: 769px ~ 1152px 범위에서도 min-width 적용 */
|
|
1706
|
+
.rmm-modal.rmm-size-lg:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1707
|
+
width: 60% !important;
|
|
1708
|
+
min-width: min(1152px, calc(100vw - 40px)) !important;
|
|
1709
|
+
max-width: calc(100vw - 40px) !important;
|
|
1710
|
+
left: 50% !important;
|
|
1711
|
+
right: auto !important;
|
|
1712
|
+
}
|
|
1713
|
+
.rmm-modal.rmm-size-lg.rmm-position-center:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1714
|
+
transform: translate(-50%, -50%) !important;
|
|
1715
|
+
}
|
|
1716
|
+
.rmm-modal.rmm-size-lg.rmm-position-center.rmm-active:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1717
|
+
transform: translate(-50%, -50%) scale(1) !important;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
/* XL: 769px ~ 1344px 범위에서도 min-width 적용 */
|
|
1721
|
+
.rmm-modal.rmm-size-xl:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1722
|
+
width: 70% !important;
|
|
1723
|
+
min-width: min(1344px, calc(100vw - 40px)) !important;
|
|
1724
|
+
max-width: calc(100vw - 40px) !important;
|
|
1725
|
+
left: 50% !important;
|
|
1726
|
+
right: auto !important;
|
|
1727
|
+
}
|
|
1728
|
+
.rmm-modal.rmm-size-xl.rmm-position-center:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1729
|
+
transform: translate(-50%, -50%) !important;
|
|
1730
|
+
}
|
|
1731
|
+
.rmm-modal.rmm-size-xl.rmm-position-center.rmm-active:not(.rmm-dragging):not(.rmm-custom-position) {
|
|
1732
|
+
transform: translate(-50%, -50%) scale(1) !important;
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
@@ -394,10 +394,18 @@ export default class extends Controller {
|
|
|
394
394
|
// Reset sidebar and submenu to first item before hiding
|
|
395
395
|
this.resetSidebarAndSubmenu()
|
|
396
396
|
|
|
397
|
+
// 닫기 애니메이션 시작 (현재 위치에서 닫힘)
|
|
397
398
|
modal.classList.remove('rmm-active')
|
|
398
399
|
if (overlay) overlay.classList.remove('rmm-active')
|
|
399
400
|
|
|
400
401
|
setTimeout(() => {
|
|
402
|
+
// 애니메이션 완료 후 드래그로 인한 커스텀 위치 클래스 및 인라인 스타일 제거
|
|
403
|
+
modal.classList.remove('rmm-custom-position')
|
|
404
|
+
modal.classList.remove('rmm-dragging')
|
|
405
|
+
modal.style.top = ''
|
|
406
|
+
modal.style.left = ''
|
|
407
|
+
modal.style.transform = ''
|
|
408
|
+
|
|
401
409
|
// Reset openValue to false so modal can be reopened
|
|
402
410
|
// Use a flag to prevent openValueChanged from triggering close again
|
|
403
411
|
this._closingProgrammatically = true
|
|
@@ -464,17 +472,34 @@ export default class extends Controller {
|
|
|
464
472
|
|
|
465
473
|
// For full size, explicitly set full screen styles
|
|
466
474
|
if (config.size === 'full' || config.isMaximized) {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
modal.style.
|
|
477
|
-
modal.style.
|
|
475
|
+
// 최소화된 모달이 있는지 store에서 확인하여 taskbar 높이 계산
|
|
476
|
+
const minimizedGroups = modalStore.getMinimizedModalGroups()
|
|
477
|
+
const hasMinimizedModals = minimizedGroups.length > 0
|
|
478
|
+
// CSS 변수에서 taskbar 높이 가져오기 (기본값 48px)
|
|
479
|
+
const taskbarHeight = hasMinimizedModals
|
|
480
|
+
? parseInt(getComputedStyle(document.documentElement).getPropertyValue('--rmm-taskbar-height') || '48', 10)
|
|
481
|
+
: 0
|
|
482
|
+
|
|
483
|
+
// CSS !important를 덮어쓰기 위해 setProperty 사용
|
|
484
|
+
modal.style.setProperty('width', '100%', 'important')
|
|
485
|
+
modal.style.setProperty('min-width', '100%', 'important')
|
|
486
|
+
modal.style.setProperty('top', '0', 'important')
|
|
487
|
+
modal.style.setProperty('left', '0', 'important')
|
|
488
|
+
modal.style.setProperty('right', '0', 'important')
|
|
489
|
+
modal.style.setProperty('transform', 'none', 'important')
|
|
490
|
+
modal.style.setProperty('border-radius', '0', 'important')
|
|
491
|
+
modal.style.setProperty('margin', '0', 'important')
|
|
492
|
+
|
|
493
|
+
if (taskbarHeight > 0) {
|
|
494
|
+
// taskbar가 있으면 그 위까지만 표시
|
|
495
|
+
modal.style.setProperty('height', `calc(100% - ${taskbarHeight}px)`, 'important')
|
|
496
|
+
modal.style.setProperty('max-height', `calc(100% - ${taskbarHeight}px)`, 'important')
|
|
497
|
+
modal.style.setProperty('bottom', `${taskbarHeight}px`, 'important')
|
|
498
|
+
} else {
|
|
499
|
+
modal.style.setProperty('height', '100%', 'important')
|
|
500
|
+
modal.style.setProperty('max-height', '100%', 'important')
|
|
501
|
+
modal.style.setProperty('bottom', '0', 'important')
|
|
502
|
+
}
|
|
478
503
|
} else {
|
|
479
504
|
// Reset full-size specific styles
|
|
480
505
|
modal.style.borderRadius = ''
|
|
@@ -595,6 +620,7 @@ export default class extends Controller {
|
|
|
595
620
|
historyStackManager.moveToTop('modal', this.effectiveModalId)
|
|
596
621
|
}
|
|
597
622
|
this.isDragging = true
|
|
623
|
+
this.element.classList.add('rmm-dragging')
|
|
598
624
|
|
|
599
625
|
const clientX = e.type.includes('touch') ? e.touches[0].clientX : e.clientX
|
|
600
626
|
const clientY = e.type.includes('touch') ? e.touches[0].clientY : e.clientY
|
|
@@ -637,6 +663,9 @@ export default class extends Controller {
|
|
|
637
663
|
|
|
638
664
|
handleDragEnd() {
|
|
639
665
|
this.isDragging = false
|
|
666
|
+
this.element.classList.remove('rmm-dragging')
|
|
667
|
+
// 드래그 후 위치 유지를 위해 custom-position 클래스 추가
|
|
668
|
+
this.element.classList.add('rmm-custom-position')
|
|
640
669
|
|
|
641
670
|
this.element.style.transition = ''
|
|
642
671
|
|