satis 2.2.2 → 2.3.0
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/README.md +1 -1
- data/app/components/satis/card/component.css +0 -8
- data/app/components/satis/card/component.html.slim +13 -20
- data/app/components/satis/card/component.rb +2 -49
- data/app/components/satis/dropdown/component.html.slim +3 -3
- data/app/components/satis/dropdown/component.rb +1 -31
- data/app/components/satis/dropdown/component_controller.js +15 -21
- data/app/components/satis/sidebar/component.css +74 -52
- data/app/components/satis/sidebar_menu_item/component.css +115 -94
- data/app/components/satis/sidebar_menu_item/component_controller.js +9 -113
- data/app/javascript/satis/controllers/fields_for_controller.js +1 -1
- data/app/javascript/satis/controllers/index.js +0 -3
- data/app/javascript/satis/utility_controllers/show_hide_controller.js +1 -1
- data/lib/satis/version.rb +1 -1
- metadata +2 -6
- data/app/assets/fontawesome/regular.js +0 -6
- data/app/components/satis/card/component_controller.js +0 -78
- data/flake.lock +0 -109
- data/flake.nix +0 -98
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/* ── Base menu item ── */
|
|
2
1
|
.sts-sidebar-menu-item {
|
|
3
2
|
@apply pt-1;
|
|
4
|
-
position: relative;
|
|
5
|
-
|
|
6
3
|
& a.focus {
|
|
7
4
|
background: rgba(1, 1, 1, 0.1);
|
|
8
5
|
|
|
@@ -18,8 +15,9 @@
|
|
|
18
15
|
@apply rotate-90;
|
|
19
16
|
}
|
|
20
17
|
|
|
18
|
+
|
|
21
19
|
&__link {
|
|
22
|
-
@apply text-gray-800 dark:text-gray-300 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500
|
|
20
|
+
@apply text-gray-800 dark:text-gray-300 hover:bg-gray-50 dark:text-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 w-full flex items-center pl-2 pr-1 py-2 text-left text-sm font-medium rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
&__icon {
|
|
@@ -36,143 +34,166 @@
|
|
|
36
34
|
}
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
.sidebar .sts-sidebar-menu-
|
|
37
|
+
|
|
38
|
+
.sidebar.close .sts-sidebar-menu-item__label {
|
|
41
39
|
display: none;
|
|
42
40
|
}
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
.sidebar.close .sts-sidebar-menu-item:hover > .sts-sidebar-menu-item__link {
|
|
43
|
+
width: 40px;
|
|
44
|
+
}
|
|
45
|
+
|
|
47
46
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
.sidebar.close .sts-sidebar-menu-item [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item{
|
|
48
|
+
display: none;
|
|
49
|
+
visibility: hidden;
|
|
50
|
+
opacity: 0;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
.sidebar.close .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item > [data-satis-sidebar-menu-item-target="submenu"]{
|
|
54
|
+
opacity: 0;
|
|
55
55
|
display: none;
|
|
56
|
+
visibility: hidden;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
|
|
60
|
+
.sidebar.close .sts-sidebar-menu-item .sts-sidebar-menu-item__link .sts-sidebar-menu-item__menu-icon{
|
|
59
61
|
display: none;
|
|
62
|
+
visibility: hidden;
|
|
63
|
+
opacity: 0;
|
|
60
64
|
}
|
|
61
65
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
display: block
|
|
66
|
+
.sidebar.close .icon-link > .sts-sidebar-menu-item:hover:not(:has([data-satis-sidebar-menu-item-target="submenu"])) .sts-sidebar-menu-item__label {
|
|
67
|
+
@apply rounded-md bg-gray-50 dark:bg-gray-900 shadow-md py-2;
|
|
68
|
+
text-decoration-thickness: 2px;
|
|
69
|
+
display: block;
|
|
66
70
|
position: absolute;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
z-index: 1100;
|
|
71
|
-
border-radius: 0 0.5rem 0.5rem 0.5rem;
|
|
71
|
+
padding-right: 20px;
|
|
72
|
+
padding-left: 20px;
|
|
73
|
+
margin-left: 40px;
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
.sidebar.close .icon-link > .sts-sidebar-menu-item:has([data-satis-sidebar-menu-item-target="submenu"]):hover > .sts-sidebar-menu-item__link > .sts-sidebar-menu-item__label {
|
|
77
|
+
@apply text-white dark:bg-gray-600;
|
|
78
|
+
display: block;
|
|
77
79
|
position: absolute;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
background-color: rgba(0, 0, 0, 1);
|
|
81
|
+
padding: 5px 10px;
|
|
82
|
+
border-radius: 4px;
|
|
83
|
+
width: 220px;
|
|
84
|
+
margin-left: 22px;
|
|
85
|
+
margin-bottom: 80px;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
.sidebar.close .icon-link > .sts-sidebar-menu-item:has([data-satis-sidebar-menu-item-target="submenu"]):last-child:hover > .sts-sidebar-menu-item__link > .sts-sidebar-menu-item__label {
|
|
90
|
+
margin-top: -760px;
|
|
91
|
+
margin-left: 20px;
|
|
82
92
|
}
|
|
83
93
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
94
|
+
.fontawesome-i2svg-active .h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] {
|
|
95
|
+
@apply rounded-md bg-white dark:bg-gray-900 py-0 px-0 shadow-lg;
|
|
96
|
+
display: block;
|
|
97
|
+
visibility: visible;
|
|
98
|
+
opacity: 1;
|
|
88
99
|
position: absolute;
|
|
89
|
-
left:
|
|
100
|
+
margin-left: 30px;
|
|
101
|
+
margin-top: -45px;
|
|
102
|
+
|
|
90
103
|
width: 220px;
|
|
91
|
-
|
|
92
|
-
z-index: 1100;
|
|
104
|
+
|
|
93
105
|
}
|
|
94
106
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
width:
|
|
102
|
-
|
|
107
|
+
.fontawesome-i2svg-active .h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:only-child {
|
|
108
|
+
@apply rounded-md bg-white dark:bg-gray-900 py-0 px-0 shadow-lg;
|
|
109
|
+
display: block;
|
|
110
|
+
visibility: visible;
|
|
111
|
+
opacity: 1;
|
|
112
|
+
position: fixed;
|
|
113
|
+
width: 220px;
|
|
114
|
+
margin-left: 0;
|
|
115
|
+
|
|
103
116
|
}
|
|
104
117
|
|
|
105
|
-
|
|
106
|
-
.sidebar.close [data-satis-sidebar-menu-item-target="submenu"].flyout-visible > .sts-sidebar-menu-item {
|
|
118
|
+
.fontawesome-i2svg-active .h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item {
|
|
107
119
|
@apply py-0 px-0;
|
|
108
|
-
display: block;
|
|
109
120
|
margin-left: 0;
|
|
110
121
|
}
|
|
111
122
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
@apply rounded-none px-3 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 hover:text-gray-900 dark:hover:text-white;
|
|
123
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item a.focus{
|
|
124
|
+
@apply bg-white dark:bg-gray-900;
|
|
115
125
|
}
|
|
116
126
|
|
|
117
|
-
|
|
118
|
-
|
|
127
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item a.focus{
|
|
128
|
+
@apply bg-white dark:bg-gray-900;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item.pl-4 {
|
|
132
|
+
@apply py-0 px-0 ;
|
|
119
133
|
display: block;
|
|
134
|
+
visibility: visible;
|
|
135
|
+
opacity: 100;
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.sidebar.close .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item .sts-sidebar-menu-item__label {
|
|
120
140
|
background: none;
|
|
141
|
+
display:block;
|
|
142
|
+
overflow: visible;
|
|
121
143
|
padding: 0;
|
|
122
144
|
}
|
|
123
145
|
|
|
124
|
-
|
|
125
|
-
.sidebar.close .icon-link .sts-sidebar-menu-item
|
|
126
|
-
|
|
146
|
+
|
|
147
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:last-child:hover > [data-satis-sidebar-menu-item-target="submenu"] {
|
|
148
|
+
margin-top: -425px;
|
|
127
149
|
}
|
|
128
150
|
|
|
129
|
-
.sidebar.close [data-satis-sidebar-menu-item-target="submenu"]
|
|
130
|
-
|
|
151
|
+
.h-screen.flex .sidebar.close .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] {
|
|
152
|
+
position: fixed;
|
|
153
|
+
margin-left: 185px;
|
|
154
|
+
margin-top: -80px;
|
|
131
155
|
}
|
|
132
156
|
|
|
133
|
-
|
|
134
|
-
.sidebar.close .sts-sidebar-menu-
|
|
135
|
-
|
|
136
|
-
display: block !important;
|
|
137
|
-
position: absolute;
|
|
138
|
-
left: 54px;
|
|
139
|
-
padding: 6px 12px;
|
|
140
|
-
white-space: nowrap;
|
|
141
|
-
z-index: 1100;
|
|
157
|
+
|
|
158
|
+
.sidebar.close .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"]::-webkit-scrollbar {
|
|
159
|
+
display: none;
|
|
142
160
|
}
|
|
143
161
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
width: 20px;
|
|
151
|
-
bottom: 0;
|
|
162
|
+
.h-screen.flex .sidebar .icon-link .sts-sidebar-menu-item .submenu-label {
|
|
163
|
+
display: none;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item .submenu-label {
|
|
167
|
+
display: none;
|
|
152
168
|
}
|
|
153
169
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
display: block !important;
|
|
170
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:hover .submenu-label {
|
|
171
|
+
@apply text-white dark:bg-gray-600;
|
|
172
|
+
display: block;
|
|
158
173
|
position: absolute;
|
|
159
|
-
|
|
160
|
-
padding:
|
|
161
|
-
|
|
162
|
-
z-index:
|
|
174
|
+
background-color: rgba(0, 0, 0, 1);
|
|
175
|
+
padding: 5px 10px;
|
|
176
|
+
border-radius: 4px;
|
|
177
|
+
z-index: 10;
|
|
163
178
|
width: 220px;
|
|
164
|
-
|
|
179
|
+
margin-left: 177px;
|
|
180
|
+
margin-top: 0;
|
|
181
|
+
margin-bottom: 150px;
|
|
165
182
|
}
|
|
166
183
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
@apply rounded-lg;
|
|
170
|
-
left: 100%;
|
|
171
|
-
width: max-content;
|
|
172
|
-
max-width: 220px;
|
|
184
|
+
.h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item .submenu-label {
|
|
185
|
+
display: none;
|
|
173
186
|
}
|
|
174
187
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
display:
|
|
188
|
+
.fontawesome-i2svg-active .h-screen.flex .sidebar.close .icon-link .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:hover .submenu-label {
|
|
189
|
+
@apply text-white dark:bg-gray-600;
|
|
190
|
+
display: block;
|
|
191
|
+
position: absolute;
|
|
192
|
+
background-color: rgba(0, 0, 0, 1);
|
|
193
|
+
padding: 5px 10px;
|
|
194
|
+
border-radius: 4px;
|
|
195
|
+
z-index: 10;
|
|
196
|
+
width: 220px;
|
|
197
|
+
margin-left: 177px;
|
|
198
|
+
margin-bottom: 150px;
|
|
178
199
|
}
|
|
@@ -15,131 +15,18 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
|
15
15
|
|
|
16
16
|
this.boundUpdateFocus = this.updateFocus.bind(this)
|
|
17
17
|
this.boundOpenListener = this.openListener.bind(this)
|
|
18
|
-
this.boundShowFlyout = this.showFlyout.bind(this)
|
|
19
|
-
this.boundHideFlyout = this.hideFlyout.bind(this)
|
|
20
|
-
this.hideTimer = null
|
|
21
18
|
|
|
22
19
|
this.updateFocus(true)
|
|
23
20
|
this.element.addEventListener('sts-sidebar-menu-item:open', this.boundOpenListener)
|
|
24
|
-
this.element.addEventListener('mouseenter', this.boundShowFlyout)
|
|
25
|
-
this.element.addEventListener('mouseleave', this.boundHideFlyout)
|
|
26
21
|
window.addEventListener('popstate', debounce(this.boundUpdateFocus, 200))
|
|
27
22
|
}
|
|
28
23
|
|
|
29
24
|
disconnect() {
|
|
30
25
|
super.disconnect()
|
|
31
|
-
clearTimeout(this.hideTimer)
|
|
32
26
|
this.element.removeEventListener('sts-sidebar-menu-item:open', this.boundOpenListener)
|
|
33
|
-
this.element.removeEventListener('mouseenter', this.boundShowFlyout)
|
|
34
|
-
this.element.removeEventListener('mouseleave', this.boundHideFlyout)
|
|
35
27
|
window.removeEventListener('popstate', debounce(this.boundUpdateFocus, 200))
|
|
36
28
|
}
|
|
37
29
|
|
|
38
|
-
// ── Collapsed sidebar flyout logic ──
|
|
39
|
-
|
|
40
|
-
get isSidebarClosed() {
|
|
41
|
-
const sidebar = this.element.closest('.sidebar')
|
|
42
|
-
return sidebar?.classList.contains('close')
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
get isInsideFlyout() {
|
|
46
|
-
return !!this.element.closest('[data-satis-sidebar-menu-item-target="submenu"].flyout-visible')
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
showFlyout() {
|
|
50
|
-
if (!this.isSidebarClosed) return
|
|
51
|
-
|
|
52
|
-
// Cancel any pending hide
|
|
53
|
-
clearTimeout(this.hideTimer)
|
|
54
|
-
|
|
55
|
-
if (this.hasSubmenuTarget) {
|
|
56
|
-
const submenuLabel = this.element.querySelector(':scope > .sts-sidebar-menu-item__link > .submenu-label')
|
|
57
|
-
|
|
58
|
-
this.submenuTarget.classList.add('flyout-visible')
|
|
59
|
-
if (submenuLabel) submenuLabel.classList.add('tooltip-visible')
|
|
60
|
-
|
|
61
|
-
this.positionFlyout(this.submenuTarget, submenuLabel)
|
|
62
|
-
} else if (!this.isInsideFlyout) {
|
|
63
|
-
const label = this.element.querySelector(':scope > .sts-sidebar-menu-item__link > .sts-sidebar-menu-item__label:not(.submenu-label)')
|
|
64
|
-
if (label) {
|
|
65
|
-
label.classList.add('tooltip-visible')
|
|
66
|
-
this.positionWithinViewport(label)
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
hideFlyout() {
|
|
72
|
-
if (!this.isSidebarClosed) return
|
|
73
|
-
|
|
74
|
-
// Delay hiding so the user can move to the flyout without it disappearing
|
|
75
|
-
this.hideTimer = setTimeout(() => {
|
|
76
|
-
if (this.hasSubmenuTarget) {
|
|
77
|
-
this.submenuTarget.classList.remove('flyout-visible')
|
|
78
|
-
this.submenuTarget.style.top = ''
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
this.element.querySelectorAll('.tooltip-visible').forEach(el => {
|
|
82
|
-
el.classList.remove('tooltip-visible')
|
|
83
|
-
el.style.top = ''
|
|
84
|
-
})
|
|
85
|
-
}, 150)
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
positionFlyout(flyout, label) {
|
|
89
|
-
requestAnimationFrame(() => {
|
|
90
|
-
const flyoutRect = flyout.getBoundingClientRect()
|
|
91
|
-
if (flyoutRect.height === 0) return
|
|
92
|
-
|
|
93
|
-
const viewportHeight = window.innerHeight
|
|
94
|
-
const margin = 8
|
|
95
|
-
const labelHeight = label ? label.getBoundingClientRect().height : 0
|
|
96
|
-
|
|
97
|
-
let flyoutTop = parseFloat(getComputedStyle(flyout).top) || 0
|
|
98
|
-
|
|
99
|
-
// Check if flyout overflows bottom
|
|
100
|
-
if (flyoutRect.bottom > viewportHeight - margin) {
|
|
101
|
-
const overflow = flyoutRect.bottom - viewportHeight + margin
|
|
102
|
-
flyoutTop -= overflow
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
// Check if label above flyout would overflow top
|
|
106
|
-
const parentRect = flyout.offsetParent?.getBoundingClientRect()
|
|
107
|
-
const parentTop = parentRect?.top || 0
|
|
108
|
-
if (parentTop + flyoutTop - labelHeight < margin) {
|
|
109
|
-
flyoutTop = margin - parentTop + labelHeight
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
flyout.style.top = `${flyoutTop}px`
|
|
113
|
-
|
|
114
|
-
// Position label flush against the top of the flyout panel (no gap)
|
|
115
|
-
if (label) {
|
|
116
|
-
label.style.top = `${flyoutTop - labelHeight}px`
|
|
117
|
-
}
|
|
118
|
-
})
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
positionWithinViewport(el) {
|
|
122
|
-
requestAnimationFrame(() => {
|
|
123
|
-
const rect = el.getBoundingClientRect()
|
|
124
|
-
if (rect.height === 0) return
|
|
125
|
-
|
|
126
|
-
const viewportHeight = window.innerHeight
|
|
127
|
-
const margin = 8
|
|
128
|
-
|
|
129
|
-
if (rect.bottom > viewportHeight - margin) {
|
|
130
|
-
const overflow = rect.bottom - viewportHeight + margin
|
|
131
|
-
const currentTop = parseFloat(getComputedStyle(el).top) || 0
|
|
132
|
-
el.style.top = `${currentTop - overflow}px`
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (rect.top < margin) {
|
|
136
|
-
el.style.top = `${margin - el.parentElement.getBoundingClientRect().top}px`
|
|
137
|
-
}
|
|
138
|
-
})
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// ── Submenu expand/collapse (expanded sidebar) ──
|
|
142
|
-
|
|
143
30
|
open(event) {
|
|
144
31
|
if (this.hasSubmenuTarget) {
|
|
145
32
|
const sidebar = this.element.closest('.sidebar')
|
|
@@ -156,6 +43,8 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
|
156
43
|
event.preventDefault()
|
|
157
44
|
}
|
|
158
45
|
}
|
|
46
|
+
// This breaks turbo, so we need to keep the propagation.
|
|
47
|
+
// event.stopPropagation();
|
|
159
48
|
}
|
|
160
49
|
|
|
161
50
|
openListener(event) {
|
|
@@ -165,6 +54,7 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
|
165
54
|
}
|
|
166
55
|
}
|
|
167
56
|
|
|
57
|
+
// This method is used to show the submenu
|
|
168
58
|
showSubmenu() {
|
|
169
59
|
if (!this.hasSubmenuTarget || this.isSubmenuVisible) return
|
|
170
60
|
|
|
@@ -172,6 +62,7 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
|
172
62
|
this.element.classList.toggle("active", true)
|
|
173
63
|
}
|
|
174
64
|
|
|
65
|
+
// This method is used to hide the submenu
|
|
175
66
|
hideSubmenu() {
|
|
176
67
|
if (!this.hasSubmenuTarget || !this.isSubmenuVisible) return
|
|
177
68
|
|
|
@@ -219,7 +110,12 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
|
219
110
|
return this.openSubmenus.length > 0
|
|
220
111
|
}
|
|
221
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Get a list of all open submenus
|
|
115
|
+
* @returns {NodeListOf<Element>}
|
|
116
|
+
*/
|
|
222
117
|
get openSubmenus() {
|
|
118
|
+
// scope to first match. check if there are any submenus that are not hidden
|
|
223
119
|
return this.element.querySelectorAll('[data-satis-sidebar-menu-item-target="submenu"]:not([class*="hidden"])')
|
|
224
120
|
}
|
|
225
121
|
|
|
@@ -132,7 +132,7 @@ export default class FieldsForController extends ApplicationController {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
monitorChanges(event) {
|
|
135
|
-
if (event?.detail?.src == "satis-dropdown"
|
|
135
|
+
if (event?.detail?.src == "satis-dropdown") {
|
|
136
136
|
// Skip events caused by the initial load of a satis-dropdown
|
|
137
137
|
return
|
|
138
138
|
}
|
|
@@ -6,9 +6,6 @@ application.register("satis-appearance-switcher", AppearanceSwitcherComponentCon
|
|
|
6
6
|
import DateTimePickerComponentController from "satis/components/date_time_picker/component_controller";
|
|
7
7
|
application.register("satis-date-time-picker", DateTimePickerComponentController);
|
|
8
8
|
|
|
9
|
-
import CardComponentController from "satis/components/card/component_controller";
|
|
10
|
-
application.register("satis-card", CardComponentController);
|
|
11
|
-
|
|
12
9
|
import DropdownComponentController from "satis/components/dropdown/component_controller";
|
|
13
10
|
application.register("satis-dropdown", DropdownComponentController);
|
|
14
11
|
|
|
@@ -20,7 +20,7 @@ export default class extends ApplicationController {
|
|
|
20
20
|
this.boundUpdate = this.update.bind(this)
|
|
21
21
|
|
|
22
22
|
this.watchOn = "input"
|
|
23
|
-
if (this.inputTarget.type == "hidden"
|
|
23
|
+
if (this.inputTarget.type == "hidden") {
|
|
24
24
|
this.watchOn = "change"
|
|
25
25
|
}
|
|
26
26
|
|
data/lib/satis/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: satis
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom de Grunt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: browser
|
|
@@ -196,7 +196,6 @@ files:
|
|
|
196
196
|
- Rakefile
|
|
197
197
|
- TODO.md
|
|
198
198
|
- app/assets/config/satis_manifest.js
|
|
199
|
-
- app/assets/fontawesome/regular.js
|
|
200
199
|
- app/assets/images/satis/.keep
|
|
201
200
|
- app/assets/images/satis/flags/1x1/ac.svg
|
|
202
201
|
- app/assets/images/satis/flags/1x1/ad.svg
|
|
@@ -767,7 +766,6 @@ files:
|
|
|
767
766
|
- app/components/satis/card/component.css
|
|
768
767
|
- app/components/satis/card/component.html.slim
|
|
769
768
|
- app/components/satis/card/component.rb
|
|
770
|
-
- app/components/satis/card/component_controller.js
|
|
771
769
|
- app/components/satis/color_picker/component.css
|
|
772
770
|
- app/components/satis/color_picker/component.rb
|
|
773
771
|
- app/components/satis/color_picker/component.slim
|
|
@@ -910,8 +908,6 @@ files:
|
|
|
910
908
|
- db/migrate/20220929142147_create_satis_user_data.rb
|
|
911
909
|
- db/migrate/20221212083110_change_satis_user_data.rb
|
|
912
910
|
- db/migrate/20230918115448_add_type_to_satis_user_data.rb
|
|
913
|
-
- flake.lock
|
|
914
|
-
- flake.nix
|
|
915
911
|
- lib/generators/satis/install_generator.rb
|
|
916
912
|
- lib/generators/satis/tailwind_config_generator.rb
|
|
917
913
|
- lib/generators/satis/templates/config/initializers/satis.rb
|