satis 2.1.10 → 2.1.12
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/components/satis/dropdown/component.css +19 -1
- data/app/components/satis/dropdown/component.html.slim +8 -8
- data/app/components/satis/sidebar_menu_item/component_controller.js +8 -6
- data/app/components/satis/tabs/component.html.slim +1 -1
- data/lib/satis/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d09cda5273cb1d5e0e268b32749f5b808b6e12dd0ded986d9451c8aa2bdaaee
|
4
|
+
data.tar.gz: 0ee7375b40b1bf8a4ca55c867c527bea7e88343d02dcf8d6620517e42f8f317e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d50b2ce030af97c86bc441b125031e470b04ff3f5c07d8107ed860aaa431c3e3332f75581c9fcfbe9db251675db663724926fb77eccd3945579d28f9a51cef57
|
7
|
+
data.tar.gz: 0c9267172b2a8ea528efa680ffa050652f2f47d55cfca9dbb1afd315086f622784a724c6ec08a9dac95fea98ec23bf2bec1c0fae9a6fc54934aa5222bd95188d
|
@@ -5,7 +5,7 @@
|
|
5
5
|
}
|
6
6
|
|
7
7
|
input {
|
8
|
-
@apply dark:text-gray-
|
8
|
+
@apply dark:text-gray-100;
|
9
9
|
}
|
10
10
|
|
11
11
|
.warning
|
@@ -22,3 +22,21 @@
|
|
22
22
|
@apply font-bold;
|
23
23
|
}
|
24
24
|
}
|
25
|
+
|
26
|
+
.satis-dropdown .topbar-dropdown{
|
27
|
+
@apply bg-gray-50 rounded-lg shadow dark:bg-gray-900;
|
28
|
+
}
|
29
|
+
|
30
|
+
.satis-dropdown .topbar-dropdown-results{
|
31
|
+
overflow-y: scroll;
|
32
|
+
@apply bg-gray-50 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;
|
33
|
+
}
|
34
|
+
|
35
|
+
.satis-dropdown .topbar-dropdown .topbar-dropdown-input{
|
36
|
+
@apply bg-gray-50 dark:bg-gray-900 dark:divide-gray-100;
|
37
|
+
}
|
38
|
+
|
39
|
+
.satis-dropdown .topbar-dropdown-results-items{
|
40
|
+
@apply dark:border-gray-700 border-b divide-gray-200 divide-opacity-25 hover:bg-gray-200 hover:shadow dark:hover:text-white dark:bg-opacity-75 dark:hover:bg-gray-800 dark:bg-gray-900 dark:divide-gray-100 dark:divide-opacity-5;
|
41
|
+
}
|
42
|
+
|
@@ -8,27 +8,27 @@ div.satis-dropdown data-action="keydown->satis-dropdown#dispatch" data-controlle
|
|
8
8
|
.flex.flex-col
|
9
9
|
div.hidden.py-1 data-satis-dropdown-target="pills"
|
10
10
|
.flex.flex-col.items-center
|
11
|
-
.w-full
|
12
|
-
.h-12.p-1.
|
11
|
+
.w-full.topbar-dropdown
|
12
|
+
.h-12.p-1.flex.rounded
|
13
13
|
.flex.flex-auto.flex-wrap
|
14
14
|
/ Input where you can search
|
15
|
-
input.p-1.px-2.appearance-none.outline-none.w-full.
|
15
|
+
input.p-1.px-2.appearance-none.outline-none.w-full.topbar-dropdown-input.text-gray-800.dark:text-gray-300 data-action="input->satis-dropdown#search" data-satis-dropdown-target="searchInput" placeholder=placeholder autofocus=options[:autofocus]
|
16
16
|
div
|
17
17
|
/ Reset button
|
18
18
|
- unless @reset_button == false
|
19
19
|
button.cursor-pointer.w-6.h-full.flex.items-center.text-gray-400.outline-none.focus:outline-none type="button" data-satis-dropdown-target="resetButton" data-action="click->satis-dropdown#reset focus->satis-dropdown#focus" tabindex="-1"
|
20
20
|
i.fas.fa-xmark
|
21
21
|
- unless @toggle_button == false
|
22
|
-
.text-gray-300.w-8.py-1.pl-2.pr-1.
|
22
|
+
.text-gray-300.w-8.py-1.pl-2.pr-1.flex.items-center.dark:border-gray-700
|
23
23
|
/ Up/down chevrons
|
24
|
-
button.cursor-pointer.w-6.h-6.text-gray-600.outline-none.focus:outline-none type="button" data-action="click->satis-dropdown#toggleResultsList focus->satis-dropdown#focus" data-satis-dropdown-target="toggleButton" tabindex="-1"
|
24
|
+
button.cursor-pointer.w-6.h-6.text-gray-600.outline-none.opacity-50.focus:outline-none type="button" data-action="click->satis-dropdown#toggleResultsList focus->satis-dropdown#focus" data-satis-dropdown-target="toggleButton" tabindex="-1"
|
25
25
|
i.hidden.fas.fa-chevron-up
|
26
26
|
i.fas.fa-chevron-down
|
27
27
|
|
28
28
|
template data-satis-dropdown-target="selectedItemsTemplate"
|
29
29
|
|
30
30
|
/ Container for results
|
31
|
-
.hidden.container.
|
31
|
+
.hidden.container.topbar-dropdown-results.shadow.dark:text-gray-300.z-10.rounded.max-h-select.overflow-y-auto.w-full data-satis-dropdown-target="results" data-action="scroll->satis-dropdown#scroll" tabindex="-1"
|
32
32
|
.flex.flex-col.w-full data-satis-dropdown-target="items"
|
33
33
|
- options[:collection]&.each do |item|
|
34
34
|
- data_attrs = item.try(:third) ? item.third : {}
|
@@ -36,8 +36,8 @@ div.satis-dropdown data-action="keydown->satis-dropdown#dispatch" data-controlle
|
|
36
36
|
- if custom_item_html?
|
37
37
|
= item_html(item)
|
38
38
|
- else
|
39
|
-
.cursor-pointer.w-full.
|
40
|
-
.flex.w-full.items-center.p-2.pl-2.border-transparent.border-l-2
|
39
|
+
.cursor-pointer.w-full.topbar-dropdown-results-items
|
40
|
+
.flex.w-full.items-center.p-2.pl-2.border-transparent.border-l-2
|
41
41
|
.w-full.items-center.flex
|
42
42
|
.mx-2.-mt-1
|
43
43
|
span = item.send(text_method)
|
@@ -36,13 +36,11 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
36
36
|
this.showSubmenu()
|
37
37
|
event.preventDefault()
|
38
38
|
} else {
|
39
|
-
this.hideSubmenu()
|
39
|
+
if(!this.hasLink || this.linkInUrl()) this.hideSubmenu()
|
40
40
|
}
|
41
41
|
|
42
|
-
if
|
42
|
+
if(this.linkInUrl()){
|
43
43
|
event.preventDefault()
|
44
|
-
} else {
|
45
|
-
this.linkTarget.classList.toggle("focus", true)
|
46
44
|
}
|
47
45
|
}
|
48
46
|
}
|
@@ -70,8 +68,12 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
70
68
|
this.element.classList.toggle("active", false)
|
71
69
|
}
|
72
70
|
|
71
|
+
get hasLink(){
|
72
|
+
return this.hasLinkTarget && this.linkTarget.hasAttribute("href")
|
73
|
+
}
|
74
|
+
|
73
75
|
updateFocus(scroll = false) {
|
74
|
-
if (!this.
|
76
|
+
if (!this.hasLink) return
|
75
77
|
const focusedItem = this.element.closest('nav.sidebar').querySelector('a.focus')
|
76
78
|
const linkInUrl = this.linkInUrl()
|
77
79
|
if (linkInUrl && (!focusedItem || linkInUrl > this.linkInUrl(focusedItem))) {
|
@@ -83,7 +85,7 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
|
|
83
85
|
}
|
84
86
|
|
85
87
|
linkInUrl(target = this.linkTarget) {
|
86
|
-
if(!target || target.href
|
88
|
+
if(!target || target.getAttribute('href') === null || target.pathname !== window.location.pathname || target.origin !== window.location.origin)
|
87
89
|
return 0
|
88
90
|
|
89
91
|
let c = 1;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
- tabs.each do |tab|
|
6
6
|
option selected=tab.selected? = ct(".#{tab.name}", scope: :tab)
|
7
7
|
.hidden.sm:block
|
8
|
-
.border-b.border-gray-200
|
8
|
+
.border-b.border-gray-200.dark:border-opacity-25
|
9
9
|
nav.sts-tabs__nav aria-label="Tabs"
|
10
10
|
- tabs.each.with_index do |tab, index|
|
11
11
|
- id = tab.id.present? ? tab.id : tab.name
|
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.12
|
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-
|
11
|
+
date: 2024-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser
|