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 +4 -4
- data/app/components/satis/card/component.html.slim +5 -5
- data/app/components/satis/menu/component.html.slim +3 -3
- data/app/components/satis/menu/component.scss +9 -0
- data/app/components/satis/menu/component_controller.js +2 -0
- data/app/components/satis/menu_item/component.html.slim +2 -2
- data/app/components/satis/tabs/component.html.slim +2 -2
- data/app/components/satis/tabs/component.scss +19 -1
- data/app/components/satis/tabs/component_controller.js +1 -1
- 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: 404e24e2a10700e57832e51ffbd731c002246a83be939f229d0aaee608ce8186
|
4
|
+
data.tar.gz: e0857255329c7188f5bd9d0ac6dcb6e440c1fe71335a24d9dbcb194775eb3ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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-
|
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
|
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
|
-
|
49
|
-
|
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.
|
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.
|
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
|
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
|
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("
|
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
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.
|
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-
|
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
|