satis 2.1.28 → 2.1.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/satis/dropdown/component.css +4 -4
- data/app/components/satis/page/component.css +36 -9
- data/app/components/satis/page/component.html.slim +6 -31
- data/app/components/satis/sidebar/component.css +11 -21
- data/app/components/satis/sidebar/component.html.slim +3 -1
- data/app/components/satis/sidebar/component_controller.js +41 -0
- data/app/components/satis/sidebar_menu_item/component.css +4 -7
- data/app/javascript/satis/controllers/index.js +3 -0
- data/lib/satis/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87796f0408dfd1f75c4959ac4d84951a10639a7efd9dd1a82c2925fd81007f07
|
4
|
+
data.tar.gz: cb79057144e524bc3784bb7365fe14db89739fd6578520634418d470c1037bda
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80ea589f68b0019214eacf8a60c00dd96b736cfdc32c9b6f1cc732636a4ecbe689c0dfb16483ea05d6701543b94d9c517dcfd6adc5b93a3c49d0056c767a8930
|
7
|
+
data.tar.gz: 3d4081872a67e41a8d412b65e241aa6a19c4cfe52b8fc09cba97cdc4baf11fa8376428154a99c717a708bc5c5c19d8ea368262f9ceff34dca0dd72b9ce9b48e6
|
@@ -24,11 +24,11 @@
|
|
24
24
|
}
|
25
25
|
|
26
26
|
.topbar .satis-dropdown .sts-dropdown{
|
27
|
-
@apply bg-gray-
|
27
|
+
@apply bg-white dark:bg-gray-900 outline dark:outline-none outline-gray-200 outline-1 rounded-md shadow-none shadow-md;
|
28
28
|
}
|
29
29
|
|
30
30
|
.page_body .satis-dropdown .sts-dropdown{
|
31
|
-
@apply bg-white dark:bg-gray-900 outline dark:outline-none outline-gray-300 outline-1 shadow-none;
|
31
|
+
@apply bg-white dark:bg-gray-900 outline dark:outline-none outline-gray-300 outline-1 rounded-md shadow-none;
|
32
32
|
}
|
33
33
|
|
34
34
|
.page_body .satis-dropdown .sts-dropdown-results{
|
@@ -54,11 +54,11 @@
|
|
54
54
|
|
55
55
|
.topbar .satis-dropdown .sts-dropdown-results{
|
56
56
|
overflow-y: scroll;
|
57
|
-
@apply bg-
|
57
|
+
@apply bg-white divide-gray-900 divide-opacity-25 shadow-gray-300 shadow-lg text-gray-900 text-opacity-75 dark:bg-gray-900 dark:shadow-gray-700 dark:shadow-lg dark:bg-opacity-75 dark:divide-gray-50 dark:divide-opacity-25 dark:text-gray-300;
|
58
58
|
}
|
59
59
|
|
60
60
|
.topbar .satis-dropdown .sts-dropdown .sts-dropdown-input{
|
61
|
-
@apply bg-
|
61
|
+
@apply bg-white dark:bg-gray-900 dark:divide-gray-100;
|
62
62
|
}
|
63
63
|
|
64
64
|
.topbar .satis-dropdown .sts-dropdown-results-items{
|
@@ -8,24 +8,54 @@
|
|
8
8
|
background-color: #f3f3f4;
|
9
9
|
}
|
10
10
|
|
11
|
-
.
|
12
|
-
opacity: 0.5;
|
11
|
+
.arrow {
|
12
|
+
opacity: 0.5;
|
13
13
|
display: block;
|
14
14
|
width: 70px;
|
15
15
|
margin-top: 20px;
|
16
|
-
margin-left:
|
16
|
+
margin-left: 220px;
|
17
|
+
transition: 0.3s ease;
|
18
|
+
transition-delay: 0.1s;
|
19
|
+
}
|
20
|
+
|
21
|
+
.sidebar.close .arrow{
|
22
|
+
margin-left: 15px;
|
23
|
+
}
|
24
|
+
|
25
|
+
.sidebar.close .arrow .fa-solid.arrow-left-to-bracket{
|
26
|
+
display: none;
|
27
|
+
}
|
28
|
+
|
29
|
+
.sidebar.close .fa-solid.fa-arrow-right-to-bracket{
|
30
|
+
display: block;
|
31
|
+
}
|
32
|
+
|
33
|
+
.sidebar .fa-solid.fa-arrow-right-to-bracket{
|
34
|
+
display: none;
|
35
|
+
}
|
36
|
+
|
37
|
+
.topbar .account-icon {
|
38
|
+
display: none;
|
39
|
+
}
|
40
|
+
|
41
|
+
.topbar.close .account-icon {
|
42
|
+
display:block;
|
43
|
+
}
|
44
|
+
|
45
|
+
.sidebar .fa-solid.arrow-left-to-bracket{
|
46
|
+
display: block;
|
17
47
|
}
|
18
48
|
|
19
|
-
.
|
49
|
+
.arrow:hover {
|
20
50
|
color: #555555;
|
21
51
|
cursor: pointer;
|
22
52
|
}
|
23
53
|
|
24
|
-
.dark .
|
54
|
+
.dark .arrow:hover {
|
25
55
|
color: #c0c0c0;
|
26
56
|
}
|
27
57
|
|
28
|
-
.dark .
|
58
|
+
.dark .arrow {
|
29
59
|
color: #ffffff;
|
30
60
|
opacity: 1;
|
31
61
|
margin-top: 20px;
|
@@ -37,7 +67,6 @@
|
|
37
67
|
|
38
68
|
.page_body {
|
39
69
|
margin-left: 260px;
|
40
|
-
overflow-y: scroll;
|
41
70
|
max-width: 87%;
|
42
71
|
position: relative;
|
43
72
|
transition: 0.3s ease;
|
@@ -47,13 +76,11 @@
|
|
47
76
|
margin-left: 60px;
|
48
77
|
z-index: 1;
|
49
78
|
position: relative;
|
50
|
-
overflow: visible;
|
51
79
|
}
|
52
80
|
|
53
81
|
.page_bg .page_body.close .flex-1{
|
54
82
|
z-index: 1;
|
55
83
|
position: relative;
|
56
|
-
overflow: visible;
|
57
84
|
}
|
58
85
|
|
59
86
|
.dark .page_body {
|
@@ -10,8 +10,12 @@ html lang="en"
|
|
10
10
|
/ TOPBAR
|
11
11
|
.page_bg
|
12
12
|
.topbar
|
13
|
-
.
|
14
|
-
|
13
|
+
.account-icon
|
14
|
+
- if Current.account.logo.attached?
|
15
|
+
= image_tag url_for(Current.account.logo.variant(resize_to_limit: [nil, 25]).processed)
|
16
|
+
- else
|
17
|
+
.h-8.w-auto
|
18
|
+
= Current.account.name
|
15
19
|
/ NAVBAR
|
16
20
|
.flex-1.px-4.flex.justify-between
|
17
21
|
= navbar
|
@@ -25,32 +29,3 @@ html lang="en"
|
|
25
29
|
.mt-4
|
26
30
|
.max-w.mx-auto.px-4.sm:px-4.md:px-4
|
27
31
|
= body
|
28
|
-
|
29
|
-
|
30
|
-
/ Minimize Sidebar
|
31
|
-
javascript:
|
32
|
-
document.addEventListener("DOMContentLoaded", () => {
|
33
|
-
let sidebar_collapse = document.querySelector(".sidebar");
|
34
|
-
let topbar = document.querySelector(".topbar");
|
35
|
-
let page_body = document.querySelector(".page_body");
|
36
|
-
let sidebarBtn = document.querySelector(".arrow");
|
37
|
-
|
38
|
-
// Check stored state and apply it
|
39
|
-
const isClosed = sessionStorage.getItem('sidebarClosed') === 'true';
|
40
|
-
if (isClosed) {
|
41
|
-
sidebar_collapse.classList.add("close");
|
42
|
-
topbar.classList.add("close");
|
43
|
-
page_body.classList.add("close");
|
44
|
-
}
|
45
|
-
|
46
|
-
sidebarBtn.addEventListener("click", () => {
|
47
|
-
sidebar_collapse.classList.toggle("close");
|
48
|
-
topbar.classList.toggle("close");
|
49
|
-
page_body.classList.toggle("close");
|
50
|
-
|
51
|
-
// Save the current state to sessionStorage
|
52
|
-
const currentState = sidebar_collapse.classList.contains("close");
|
53
|
-
sessionStorage.setItem('sidebarClosed', currentState);
|
54
|
-
});
|
55
|
-
});
|
56
|
-
|
@@ -6,14 +6,12 @@
|
|
6
6
|
background: #ffffff;
|
7
7
|
overflow: visible;
|
8
8
|
scrollbar-width: none;
|
9
|
-
overflow-y: scroll;
|
10
|
-
transition: 0.3s ease;
|
11
|
-
transition-delay: 0.1s;
|
12
9
|
}
|
13
10
|
|
14
11
|
.h-screen.flex .page_bg .sidebar.close{
|
15
12
|
z-index: 1000;
|
16
13
|
position: absolute;
|
14
|
+
margin-top: 4rem;
|
17
15
|
overflow: visible;
|
18
16
|
}
|
19
17
|
|
@@ -32,10 +30,7 @@
|
|
32
30
|
height: 100%;
|
33
31
|
width: 60px;
|
34
32
|
z-index: 1000;
|
35
|
-
overflow-y: scroll;
|
36
33
|
scrollbar-width: none;
|
37
|
-
transition: 0.3s ease;
|
38
|
-
transition-delay: 0.1s;
|
39
34
|
}
|
40
35
|
|
41
36
|
.sidebar::-webkit-scrollbar {
|
@@ -49,29 +44,22 @@
|
|
49
44
|
height: 4rem;
|
50
45
|
max-width: 87%;
|
51
46
|
margin-left: 260px;
|
52
|
-
transition: 0.3s ease;
|
53
|
-
transition-delay: 0.1s;
|
54
47
|
background: white;
|
55
48
|
z-index: 2;
|
56
49
|
}
|
57
50
|
|
58
|
-
.page_bg .topbar.close {
|
59
|
-
max-width:
|
60
|
-
margin-left:
|
61
|
-
transition: 0.3s ease;
|
62
|
-
transition-delay: 0.1s;
|
51
|
+
.h-screen.flex .page_bg .topbar.close {
|
52
|
+
max-width: 100%;
|
53
|
+
margin-left: 0px;
|
63
54
|
}
|
64
55
|
|
65
56
|
.page_body.close {
|
66
57
|
margin-left: 50px;
|
67
58
|
max-width: 97%;
|
68
|
-
transition: 0.3s ease;
|
69
|
-
transition-delay: 0.1s;
|
70
59
|
}
|
71
60
|
|
72
61
|
|
73
62
|
.account-icon {
|
74
|
-
opacity: 0.25;
|
75
63
|
border-radius: 25px;
|
76
64
|
padding: 20px;
|
77
65
|
}
|
@@ -85,12 +73,16 @@
|
|
85
73
|
opacity: 0;
|
86
74
|
}
|
87
75
|
|
88
|
-
.sidebar.close .
|
89
|
-
margin-
|
76
|
+
.sidebar.close .icon-link {
|
77
|
+
margin-top: -40px;
|
78
|
+
transition: 0.3s ease;
|
79
|
+
transition-delay: 0.1s;
|
90
80
|
}
|
91
81
|
|
92
82
|
|
93
|
-
|
83
|
+
.sidebar.close .sts-sidebar-menu-item{
|
84
|
+
margin-left: 2px;
|
85
|
+
}
|
94
86
|
|
95
87
|
.sidebar .boxture-logo {
|
96
88
|
height: 52px;
|
@@ -125,8 +117,6 @@
|
|
125
117
|
|
126
118
|
.dark .sidebar {
|
127
119
|
background: #222836;
|
128
|
-
transition: 0.3s ease;
|
129
|
-
transition-delay: 0.1s;
|
130
120
|
}
|
131
121
|
|
132
122
|
.dark .sidebar .logo_name {
|
@@ -1,8 +1,10 @@
|
|
1
|
-
.sidebar
|
1
|
+
.sidebar data-controller="sidebar-component" data-sidebar-component-target="sidebar"
|
2
2
|
= header
|
3
3
|
.icon-link
|
4
4
|
- @menu.items.each do |item|
|
5
5
|
= render Satis::SidebarMenuItem::Component.new(item: item, menu_options: menu_options)
|
6
|
+
.arrow data-sidebar-component-target="arrow"
|
7
|
+
.fa-solid.fa-arrow-right-to-bracket
|
6
8
|
= footer
|
7
9
|
|
8
10
|
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import ApplicationController from "satis/controllers/application_controller"
|
2
|
+
import { debounce } from "satis/utils"
|
3
|
+
|
4
|
+
export default class SidebarComponentController extends ApplicationController {
|
5
|
+
connect() {
|
6
|
+
super.connect();
|
7
|
+
this.initializeSidebar();
|
8
|
+
}
|
9
|
+
|
10
|
+
initializeSidebar() {
|
11
|
+
let sidebar_collapse = document.querySelector(".sidebar");
|
12
|
+
let topbar = document.querySelector(".topbar");
|
13
|
+
let page_body = document.querySelector(".page_body");
|
14
|
+
let sidebarBtn = document.querySelector(".arrow");
|
15
|
+
|
16
|
+
// Check stored state and apply it
|
17
|
+
const isClosed = sessionStorage.getItem('sidebarClosed') === 'true';
|
18
|
+
if (isClosed) {
|
19
|
+
sidebar_collapse.classList.add("close");
|
20
|
+
topbar.classList.add("close");
|
21
|
+
page_body.classList.add("close");
|
22
|
+
}
|
23
|
+
|
24
|
+
|
25
|
+
sidebarBtn.addEventListener("click", () => {
|
26
|
+
const isClosed = sidebar_collapse.classList.toggle("close");
|
27
|
+
topbar.classList.toggle("close");
|
28
|
+
page_body.classList.toggle("close");
|
29
|
+
|
30
|
+
// Save the current state to sessionStorage
|
31
|
+
sessionStorage.setItem('sidebarClosed', isClosed);
|
32
|
+
});
|
33
|
+
}
|
34
|
+
}
|
35
|
+
|
36
|
+
// Ensure the function runs on every Turbo page load
|
37
|
+
document.addEventListener("turbo:load", () => {
|
38
|
+
const controller = new SidebarComponentController();
|
39
|
+
controller.initializeSidebar();
|
40
|
+
});
|
41
|
+
|
@@ -17,13 +17,13 @@
|
|
17
17
|
@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
|
18
18
|
}
|
19
19
|
&__icon {
|
20
|
-
@apply mr-3 flex-shrink-0 h-6 w-6 text-gray-400 dark:text-gray-
|
20
|
+
@apply mr-3 flex-shrink-0 h-6 w-6 text-gray-400 dark:text-gray-200 group-hover:text-gray-500;
|
21
21
|
}
|
22
22
|
&__no-icon {
|
23
23
|
@apply mr-3 flex-shrink-0 h-6;
|
24
24
|
}
|
25
25
|
&__label {
|
26
|
-
@apply flex-1 text-gray-700;
|
26
|
+
@apply flex-1 text-gray-700 dark:text-gray-300;
|
27
27
|
}
|
28
28
|
&__menu-icon {
|
29
29
|
@apply text-gray-300 ml-3 flex-shrink-0 h-5 w-5 transform group-hover:text-gray-400 transition-colors ease-in-out duration-150;
|
@@ -33,6 +33,7 @@
|
|
33
33
|
|
34
34
|
.page_bg .sidebar.close .sts-sidebar-menu-item__menu-icon {
|
35
35
|
display: none;
|
36
|
+
margin-left: 2px;
|
36
37
|
}
|
37
38
|
|
38
39
|
.page_bg .sidebar.close .sts-sidebar-menu-item__label {
|
@@ -43,7 +44,6 @@
|
|
43
44
|
display: none;
|
44
45
|
visibility: hidden;
|
45
46
|
opacity: 0;
|
46
|
-
transition: visibility 0s linear 1s, opacity 1s linear; /* Ensures it stays visible for 1 second after mouse leaves */
|
47
47
|
}
|
48
48
|
|
49
49
|
.page_bg .sidebar.close .sts-sidebar-menu-item:hover .sts-sidebar-menu-item__label {
|
@@ -52,7 +52,7 @@
|
|
52
52
|
}
|
53
53
|
|
54
54
|
.page_bg .sidebar.close .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] {
|
55
|
-
@apply bg-white dark:bg-gray-900 py-0 px-0;
|
55
|
+
@apply rounded-md bg-white dark:bg-gray-900 py-0 px-0;
|
56
56
|
display: block;
|
57
57
|
visibility: visible;
|
58
58
|
opacity: 1;
|
@@ -62,9 +62,6 @@
|
|
62
62
|
margin-left: 35px;
|
63
63
|
margin-top: -60px;
|
64
64
|
z-index: 1000;
|
65
|
-
overflow: visible;
|
66
|
-
box-shadow: -0.5px 0px 3px 0.3px #aaaaaa;
|
67
|
-
transition: visibility 0s linear 0s, opacity 0.5s linear;
|
68
65
|
}
|
69
66
|
|
70
67
|
.page_bg .sidebar.close .sts-sidebar-menu-item:hover > [data-satis-sidebar-menu-item-target="submenu"] .sts-sidebar-menu-item:hover .sts-sidebar-menu-item__label {
|
@@ -24,6 +24,9 @@ application.register("satis-menu", MenuComponentController);
|
|
24
24
|
import PageComponentController from "satis/components/page/component_controller";
|
25
25
|
application.register("satis-page", PageComponentController);
|
26
26
|
|
27
|
+
import SidebarComponentController from "satis/components/sidebar/component_controller";
|
28
|
+
application.register("satis-sidebar", SidebarComponentController);
|
29
|
+
|
27
30
|
import SidebarMenuComponentController from "satis/components/sidebar_menu/component_controller";
|
28
31
|
application.register("satis-sidebar-menu", SidebarMenuComponentController);
|
29
32
|
|
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.1.
|
4
|
+
version: 2.1.29
|
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: 2024-07-
|
11
|
+
date: 2024-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser
|
@@ -824,6 +824,7 @@ files:
|
|
824
824
|
- app/components/satis/sidebar/component.css
|
825
825
|
- app/components/satis/sidebar/component.html.slim
|
826
826
|
- app/components/satis/sidebar/component.rb
|
827
|
+
- app/components/satis/sidebar/component_controller.js
|
827
828
|
- app/components/satis/sidebar_menu/component.css
|
828
829
|
- app/components/satis/sidebar_menu/component.html.slim
|
829
830
|
- app/components/satis/sidebar_menu/component.rb
|