satis 1.0.70 → 1.0.74

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03c106e3c85f9b929d8857c93d5b3453f306f0c9557d1cc084dd763dd2bd849b
4
- data.tar.gz: e0e8799e598ac7e0f8825a88194125df5ff140c425c751438f7971f1bb7857d9
3
+ metadata.gz: 404e24e2a10700e57832e51ffbd731c002246a83be939f229d0aaee608ce8186
4
+ data.tar.gz: e0857255329c7188f5bd9d0ac6dcb6e440c1fe71335a24d9dbcb194775eb3ef4
5
5
  SHA512:
6
- metadata.gz: 73c6b212d40768e612fba5f20870fc99fdb0c544095d8aee622ae76ea0addb833ce361404e2be1c2bd74e288afd50ca8f1f9318cb0ce3bef992c90c7004975e3
7
- data.tar.gz: '08a42c0b640f4f6fe1223d7e1ec046b91ae0cdae1fcf98146efbf6e82b0e180e011c0962d617ace24162cd46225a671ab06e955e6eb062eb47092a3b7eb5480d'
6
+ metadata.gz: f83789748c40028061efeec2bb6f44ba60c5efe589b72d2901c5b96431fd9b42d5934ad5d454c7da8e996312df81e50faf6075246e027e2cece69cb35f66c968
7
+ data.tar.gz: d8185f8522dec022da35450865ffd0675b7c768ce976e6d1bbd8b63b02bdd5a716f59f2442a4f73b5c72afb81187994e0c7018c39fd36d5a72f2f15c90e964d4
@@ -32,11 +32,11 @@
32
32
  - tabs.each do |tab|
33
33
  option selected=tab.selected? = t(tab.name, scope: [:tabs])
34
34
  .hidden.sm:block
35
- nav.-mb-px.flex.space-x-8.overflow-x-auto aria-label="Tabs"
35
+ nav.-mb-px.flex.space-x-4.overflow-x-auto aria-label="Tabs"
36
36
  - tabs.each_with_index do |tab, index|
37
37
  - id = tab.id.present? ? tab.id : tab.name
38
- .flex
39
- a.tab id="#{id}" class="#{index == (tab.selected_tab_index) ? 'selected' : ''}" href="#" aria-current="#{tab.selected? ? "page" : ''}" data-satis-tabs-target="tab" data-action="click->satis-tabs#select"
38
+ .flex.tab class="#{index == (tab.selected_tab_index) ? 'selected' : ''}" data-satis-tabs-target="tab" data-action="click->satis-tabs#select" id="#{id}" href="#" aria-current="#{tab.selected? ? "page" : ''}"
39
+ a
40
40
  - if tab.icon
41
41
  i.mr-2 class=tab.icon
42
42
  span id="tab_label_#{tab.id}"
@@ -45,8 +45,8 @@
45
45
  - if tab.badge
46
46
  span.badge id="tab_badge_#{tab.id}"
47
47
  = tab.badge
48
- - if tab.tab_menu
49
- = render(Satis::Menu::Component.new(tab.tab_menu, icon: 'fa-thin fa-square-chevron-down'))
48
+ - if tab.tab_menu
49
+ = render(Satis::Menu::Component.new(tab.tab_menu, icon: 'fa-thin fa-chevron-down'))
50
50
  - if custom_tabs_link_html.present?
51
51
  = custom_tabs_link_html
52
52
 
@@ -1,13 +1,13 @@
1
- div data-controller="satis-menu" data-action="#{menu.event}->satis-menu#show mouseleave->satis-menu#hide"
1
+ div.sts-menu data-controller="satis-menu" data-action="#{menu.event}->satis-menu#show mouseleave->satis-menu#hide"
2
2
  - if content
3
3
  = content
4
4
  - else
5
- button.inline-flex.items-center.justify-center.h-8.w-8.rounded-full.focus:outline-none.focus:ring-2.focus:ring-offset-2.focus:ring-primary-500.dark:text-gray-500 aria-expanded="false" aria-haspopup="true" type="button"
5
+ button.sts-menu__button aria-expanded="false" aria-haspopup="true" type="button"
6
6
  span.font-semibold.flex-1 id="#{icon_id}" class="#{menu.items.present? ? '' : 'text-gray-200'}"
7
7
  i class=icon
8
8
 
9
9
  - if menu.items.present?
10
- ul.hidden.z-10.bg-white.dark:bg-gray-400.border.dark:border-gray-800.rounded-md.shadow-lg.min-w-max data-satis-menu-target="submenu" data-satis-menu-submenu-placement="bottom"
10
+ ul.sts-menu__items.hidden data-satis-menu-target="submenu" data-satis-menu-submenu-placement="bottom"
11
11
  - menu.items.each do |item|
12
12
  = render(Satis::MenuItem::Component.new(item: item))
13
13
 
@@ -0,0 +1,9 @@
1
+ .sts-menu {
2
+ &__button {
3
+ @apply h-8 w-8 inline-flex items-center justify-center rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:text-gray-500;
4
+ }
5
+
6
+ &__items {
7
+ @apply z-10 bg-white dark:bg-gray-400 border dark:border-gray-800 rounded-md shadow-lg min-w-max;
8
+ }
9
+ }
@@ -35,6 +35,7 @@ export default class extends ApplicationController {
35
35
  this.submenuTarget.setAttribute("data-show", "")
36
36
  this.popperInstance.update()
37
37
  }
38
+ event.stopPropagation()
38
39
  }
39
40
 
40
41
  hide(event) {
@@ -42,6 +43,7 @@ export default class extends ApplicationController {
42
43
  this.submenuTarget.classList.add("hidden")
43
44
  this.submenuTarget.removeAttribute("data-show")
44
45
  }
46
+ event.stopPropagation()
45
47
  }
46
48
 
47
49
  toggle(event) {
@@ -2,10 +2,10 @@ li.rounded-sm.px-3.py-1.hover:bg-gray-100.dark:hover:bg-gray-200.flex.items-cent
2
2
  a.cursor-pointer.py-1.w-full.text-left.flex.items-center.outline-none.focus:outline-none href=item.link *item.link_attributes
3
3
  - if item.type == :custom
4
4
  = render(partial: item.link_attributes[:data][:path], locals: item.link_attributes[:data][:parameters])
5
- span.pr-1.flex-shrink-0.w-6
5
+ span.pr-1.flex-shrink-0.w-6.text-gray-500
6
6
  - if item.icon.present?
7
7
  i class=item.icon
8
- span.pr-1.flex-1
8
+ span.pr-1.flex-1.text-gray-500
9
9
  - unless item.type == :custom
10
10
  = item.label
11
11
  span.pr-1.flex-shrink-0.w-6
@@ -6,7 +6,7 @@
6
6
  option selected=tab.selected? = ct(".#{tab.name}", scope: [group.to_sym], default: tab.name.to_s.humanize)
7
7
  .hidden.sm:block
8
8
  .border-b.border-gray-200
9
- nav.-mb-px.flex.space-x-8.overflow-x-auto aria-label="Tabs"
9
+ nav.sts-tabs__nav aria-label="Tabs"
10
10
  - tabs.each do |tab|
11
11
  a.tab id="#{tab.name}" href="#" aria-current="#{tab.selected? ? "page" : ''}" data-satis-tabs-target="tab" data-action="click->satis-tabs#select"
12
12
  - if tab.icon
@@ -20,4 +20,4 @@
20
20
  div
21
21
  - tabs.each do |tab|
22
22
  div id="#{tab.name}-content" class="tab-content #{tab.options[:padding] == false ? '' : 'mt-4'}" data-satis-tabs-target="content"
23
- = tab.to_s
23
+ = tab.to_s
@@ -1,6 +1,14 @@
1
1
  .sts-tabs {
2
+ &__nav {
3
+ @apply -mb-px flex space-x-4 overflow-x-auto;
4
+ }
5
+
2
6
  .tab {
3
- @apply border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap pb-4 px-1 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300;
7
+ @apply border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap px-1 pb-4 border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 cursor-pointer;
8
+
9
+ a {
10
+ @apply no-underline text-gray-500 hover:text-gray-700;
11
+ }
4
12
 
5
13
  .badge {
6
14
  @apply bg-gray-100 text-gray-600 hidden ml-3 rounded-full text-xs font-medium md:inline-block py-0.5 px-2.5;
@@ -12,6 +20,16 @@
12
20
  .badge {
13
21
  @apply bg-primary-100 text-primary-600;
14
22
  }
23
+
24
+ a {
25
+ @apply text-primary-600;
26
+ }
27
+ }
28
+
29
+ .sts-menu {
30
+ &__button {
31
+ @apply h-0 w-0 pl-4;
32
+ }
15
33
  }
16
34
 
17
35
  &.is-invalid {
@@ -48,7 +48,7 @@ export default class extends ApplicationController {
48
48
  if (event.srcElement.tagName == "SELECT") {
49
49
  index = event.srcElement.selectedIndex
50
50
  } else {
51
- let clickedTab = event.srcElement.closest("a")
51
+ let clickedTab = event.srcElement.closest(".tab")
52
52
  index = this.tabTargets.findIndex((el) => {
53
53
  return el.attributes["id"] === clickedTab.attributes["id"]
54
54
  })
data/lib/satis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Satis
2
- VERSION = "1.0.70"
2
+ VERSION = "1.0.74"
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: 1.0.70
4
+ version: 1.0.74
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: 2023-01-06 00:00:00.000000000 Z
11
+ date: 2023-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser
@@ -150,6 +150,7 @@ files:
150
150
  - app/components/satis/menu/component.html.slim
151
151
  - app/components/satis/menu/component.md
152
152
  - app/components/satis/menu/component.rb
153
+ - app/components/satis/menu/component.scss
153
154
  - app/components/satis/menu/component_controller.js
154
155
  - app/components/satis/menu_item/component.html.slim
155
156
  - app/components/satis/menu_item/component.rb