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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c555864ef12ead60d3c49092fd523d24fd5f1778f5c4ad834a12e2bda16d7c67
4
- data.tar.gz: b0347be5e202f0fc3843b994379b42f7f96b3b5ac5f2efef34d5433eba35a959
3
+ metadata.gz: 1d09cda5273cb1d5e0e268b32749f5b808b6e12dd0ded986d9451c8aa2bdaaee
4
+ data.tar.gz: 0ee7375b40b1bf8a4ca55c867c527bea7e88343d02dcf8d6620517e42f8f317e
5
5
  SHA512:
6
- metadata.gz: a5082b696cc734bd44c6f1ad497135d8d64512cd8964fb778dd6377fbea08b62c78be0c42ced5971e9196f1078c8c457154251fcdbd980116f9d98750112e12d
7
- data.tar.gz: c81ac8c1b03041cf1e31464339f98de4dd93783ab3f6d9d1beac95a7dce7516460ac044b14817a2e67d76cd3558fc117fec204410a91ee510e4f004fe9fbffa1
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-300;
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.bg-white.dark:bg-gray-900.opacity-25.flex.border.border-gray-200.opacity-25.dark:border-gray-600.rounded.opacity-75
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.text-gray-800.dark:bg-gray-800.dark:text-gray-300 data-action="input->satis-dropdown#search" data-satis-dropdown-target="searchInput" placeholder=placeholder autofocus=options[:autofocus]
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.border-l.flex.items-center.border-gray-200.dark:border-gray-700
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.shadow.bg-white.border.border-gray-300.dark:text-gray-300.dark:bg-gray-800.dark:border-gray-700.z-10.rounded.max-h-select.overflow-y-auto.w-full data-satis-dropdown-target="results" data-action="scroll->satis-dropdown#scroll" tabindex="-1"
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.dark:border-gray-700.border-b.hover:bg-primary-200
40
- .flex.w-full.items-center.p-2.pl-2.border-transparent.border-l-2.hover:border-teal-2100
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 (this.linkTarget.classList.contains("focus")) {
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.hasLinkTarget) return
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.length === 0 || target.pathname !== window.location.pathname || target.origin !== window.location.origin)
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
@@ -1,3 +1,3 @@
1
1
  module Satis
2
- VERSION = "2.1.10"
2
+ VERSION = "2.1.12"
3
3
  end
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.10
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-04-29 00:00:00.000000000 Z
11
+ date: 2024-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser