rails_modal_manager 1.0.50 → 1.0.52
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 +4 -4
- data/app/assets/stylesheets/rails_modal_manager.css +6 -5
- data/app/javascript/rails_modal_manager/controllers/rmm_sidebar_controller.js +9 -5
- data/app/javascript/rails_modal_manager/footer_renderer.js +3 -0
- data/app/views/rails_modal_manager/_submenu.html.erb +2 -1
- data/lib/rails_modal_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f0c284c73e8a2d5bf8c4a04293332dce7bc16a61cc53279e99dfa1c133e0894
|
|
4
|
+
data.tar.gz: 5215a66e121f1057d17420ce7407c7d4961f8cd1a21d16cf9303a3989abe7892
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13644c5657a20e5baa80b1304344cf9dcd411856f641e924882a657fed63ca67116a0e61603aa01ca0cf93bb49a3a5724a7117bf1bd797ec79d38348020ebdb7
|
|
7
|
+
data.tar.gz: a2af506573c6b393eb1fa10cfd4246d90a71bdd3d8235fa5e4728cb381d9923dad06aeaed870abf2c4dfb34e083fbe7adfb56a8f900800a73b8a2318a4cc731a
|
|
@@ -2082,8 +2082,9 @@
|
|
|
2082
2082
|
}
|
|
2083
2083
|
|
|
2084
2084
|
@media (max-width: 768px) {
|
|
2085
|
-
/* ── peek 중인 사이드바: 얇은 폭(아이콘 너비) + 오버레이 + 1회 animation ──
|
|
2086
|
-
|
|
2085
|
+
/* ── peek 중인 사이드바: 얇은 폭(아이콘 너비) + 오버레이 + 1회 animation ──
|
|
2086
|
+
v1.0.50 개선: size-full 조건 제거. 모바일 + 사이드바 있는 모든 모달에 작동. */
|
|
2087
|
+
.rmm-modal .rmm-sidebar[data-peek="true"] {
|
|
2087
2088
|
position: absolute !important;
|
|
2088
2089
|
top: var(--rmm-header-height) !important;
|
|
2089
2090
|
left: 0 !important;
|
|
@@ -2097,11 +2098,11 @@
|
|
|
2097
2098
|
animation: rmm-sidebar-peek 1000ms var(--rmm-ease-out) forwards;
|
|
2098
2099
|
transition: none !important; /* animation 과 transition 충돌 방지 */
|
|
2099
2100
|
}
|
|
2100
|
-
.rmm-modal
|
|
2101
|
-
.rmm-modal
|
|
2101
|
+
.rmm-modal .rmm-sidebar[data-peek="true"] .rmm-sidebar-item-label,
|
|
2102
|
+
.rmm-modal .rmm-sidebar[data-peek="true"] .rmm-sidebar-item-badge {
|
|
2102
2103
|
display: none;
|
|
2103
2104
|
}
|
|
2104
|
-
.rmm-modal
|
|
2105
|
+
.rmm-modal .rmm-sidebar[data-peek="true"] .rmm-sidebar-item {
|
|
2105
2106
|
justify-content: center;
|
|
2106
2107
|
padding: 10px 8px;
|
|
2107
2108
|
}
|
|
@@ -93,16 +93,20 @@ export default class extends Controller {
|
|
|
93
93
|
_runPeekIfReady() {
|
|
94
94
|
if (this._peekDone) return true
|
|
95
95
|
if (window.innerWidth >= 768) return false
|
|
96
|
-
if (!this.isMobileMaximized()) return false
|
|
97
96
|
const modal = this.element.closest('.rmm-modal')
|
|
98
97
|
if (!modal) return false
|
|
99
98
|
// rmm-active 가 붙은(= 실제로 보이는) 타이밍까지 기다린다
|
|
100
99
|
if (!modal.classList.contains('rmm-active')) return false
|
|
101
100
|
|
|
102
|
-
//
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
// v1.0.50+ (개선): size-full 이 아니어도 모바일이고 사이드바가 있으면 peek.
|
|
102
|
+
// - size-full: 기존처럼 legacy collapsed 제거 후 hidden 으로 진입 (2상태 토글 용)
|
|
103
|
+
// - size-md 등 일반: collapsed 를 그대로 유지 (기본 drawer 상태)
|
|
104
|
+
const isFullSize = modal.classList.contains('rmm-size-full')
|
|
105
|
+
if (isFullSize) {
|
|
106
|
+
this.element.classList.remove('rmm-sidebar-collapsed')
|
|
107
|
+
this.sidebarModeValue = 'hidden'
|
|
108
|
+
this.applySidebarMode()
|
|
109
|
+
}
|
|
106
110
|
this._triggerMobilePeek()
|
|
107
111
|
this._peekDone = true
|
|
108
112
|
this._peekObserver?.disconnect()
|
|
@@ -26,6 +26,9 @@ function renderButtonHtml(btn) {
|
|
|
26
26
|
const attrs = [`class="${classes.join(" ")}"`]
|
|
27
27
|
if (btn.disabled || btn.loading) attrs.push("disabled")
|
|
28
28
|
if (btn.action) attrs.push(`data-action="${escapeHtml(btn.action)}"`)
|
|
29
|
+
// v1.0.52+: onclick 지원 — Stimulus 컨트롤러 scope 밖(footer 는 panel 밖에 있음)에서
|
|
30
|
+
// 본문의 저장 버튼을 프로그래밍적으로 클릭하거나 form.requestSubmit() 호출하는 용도.
|
|
31
|
+
if (btn.onclick) attrs.push(`onclick="${escapeHtml(btn.onclick)}"`)
|
|
29
32
|
if (btn.id) attrs.push(`data-button-id="${escapeHtml(btn.id)}"`)
|
|
30
33
|
|
|
31
34
|
return `<button type="button" ${attrs.join(" ")}>${escapeHtml(btn.label || "")}</button>`
|