ariadne_view_components 0.0.94.6 → 0.0.95
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/CHANGELOG.md +7 -0
- data/app/assets/javascripts/ariadne_view_components.js +10 -10
- data/app/assets/javascripts/ariadne_view_components.js.br +0 -0
- data/app/assets/javascripts/ariadne_view_components.js.gz +0 -0
- data/app/assets/javascripts/ariadne_view_components.js.map +1 -1
- data/app/assets/stylesheets/ariadne_view_components.css +1 -1
- data/app/assets/stylesheets/ariadne_view_components.css.br +0 -0
- data/app/assets/stylesheets/ariadne_view_components.css.gz +0 -0
- data/app/components/ariadne/behaviors/tooltipable.rb +62 -36
- data/app/components/ariadne/form/checkbox/component.html.erb +2 -2
- data/app/components/ariadne/form/checkbox/component.rb +17 -17
- data/app/components/ariadne/form/group/component.rb +11 -11
- data/app/components/ariadne/form/radio/component.html.erb +1 -1
- data/app/components/ariadne/form/radio/component.rb +9 -9
- data/app/components/ariadne/form/radio_button/component.html.erb +1 -1
- data/app/components/ariadne/form/radio_button/component.rb +11 -11
- data/app/components/ariadne/form/radio_button_group/component.html.erb +1 -1
- data/app/components/ariadne/form/radio_button_group/component.rb +9 -9
- data/app/components/ariadne/form/select/component.html.erb +1 -1
- data/app/components/ariadne/form/select/component.rb +45 -45
- data/app/components/ariadne/form/text_field/component.html.erb +2 -2
- data/app/components/ariadne/form/text_field/component.rb +55 -55
- data/app/components/ariadne/form/toggle/component.html.erb +1 -1
- data/app/components/ariadne/form/toggle/component.rb +30 -30
- data/app/components/ariadne/form/toggle_group/component.rb +7 -7
- data/app/components/ariadne/form/toggle_group/option/component.rb +7 -7
- data/app/components/ariadne/layout/grid/component.rb +6 -6
- data/app/components/ariadne/layout/grid/item/component.html.erb +2 -2
- data/app/components/ariadne/layout/grid/item/component.rb +6 -6
- data/app/components/ariadne/layout/label_block/component.html.erb +1 -1
- data/app/components/ariadne/layout/label_block/component.rb +2 -2
- data/app/components/ariadne/layout/narrow/component.html.erb +2 -2
- data/app/components/ariadne/layout/narrow/component.rb +8 -8
- data/app/components/ariadne/layout/nav_bar/component.html.erb +7 -7
- data/app/components/ariadne/layout/nav_bar/component.rb +26 -26
- data/app/components/ariadne/layout/section_block/component.html.erb +1 -1
- data/app/components/ariadne/layout/section_block/header/component.html.erb +2 -2
- data/app/components/ariadne/layout/two_panel/component.html.erb +4 -4
- data/app/components/ariadne/layout/two_panel/component.rb +12 -12
- data/app/components/ariadne/layout/wide/component.rb +6 -6
- data/app/components/ariadne/ui/accordion/component.html.erb +1 -1
- data/app/components/ariadne/ui/accordion/component.rb +4 -4
- data/app/components/ariadne/ui/accordion/item/component.html.erb +1 -1
- data/app/components/ariadne/ui/accordion/item/component.rb +12 -12
- data/app/components/ariadne/ui/avatar/component.rb +21 -21
- data/app/components/ariadne/ui/badge/component.rb +31 -31
- data/app/components/ariadne/ui/banner/component.html.erb +8 -8
- data/app/components/ariadne/ui/banner/component.rb +28 -28
- data/app/components/ariadne/ui/blankslate/component.html.erb +4 -4
- data/app/components/ariadne/ui/button/component.rb +80 -78
- data/app/components/ariadne/ui/card/body/component.rb +2 -2
- data/app/components/ariadne/ui/card/component.html.erb +1 -1
- data/app/components/ariadne/ui/card/component.rb +10 -10
- data/app/components/ariadne/ui/card/footer/component.rb +4 -4
- data/app/components/ariadne/ui/card/header/component.rb +8 -8
- data/app/components/ariadne/ui/clipboard_copy/component.html.erb +2 -2
- data/app/components/ariadne/ui/clipboard_copy/component.rb +20 -20
- data/app/components/ariadne/ui/color_dot/component.html.erb +1 -1
- data/app/components/ariadne/ui/color_dot/component.rb +13 -13
- data/app/components/ariadne/ui/combobox/component.html.erb +2 -2
- data/app/components/ariadne/ui/combobox/component.rb +12 -12
- data/app/components/ariadne/ui/dialog/component.html.erb +3 -3
- data/app/components/ariadne/ui/dialog/component.rb +21 -21
- data/app/components/ariadne/ui/dialog/footer/component.rb +5 -5
- data/app/components/ariadne/ui/heroicon/component.rb +5 -5
- data/app/components/ariadne/ui/image/component.rb +6 -6
- data/app/components/ariadne/ui/link/component.rb +35 -35
- data/app/components/ariadne/ui/list/component.html.erb +5 -5
- data/app/components/ariadne/ui/list/component.rb +23 -23
- data/app/components/ariadne/ui/list/component.ts +4 -4
- data/app/components/ariadne/ui/list/item/component.html.erb +1 -1
- data/app/components/ariadne/ui/list/item/component.rb +15 -15
- data/app/components/ariadne/ui/pagination/component.html.erb +1 -1
- data/app/components/ariadne/ui/pagination/component.rb +9 -9
- data/app/components/ariadne/ui/popover/component.rb +6 -6
- data/app/components/ariadne/ui/shortcut/component.html.erb +4 -4
- data/app/components/ariadne/ui/shortcut/component.rb +26 -22
- data/app/components/ariadne/ui/skeleton/component.rb +7 -7
- data/app/components/ariadne/ui/stats_panel/component.rb +6 -6
- data/app/components/ariadne/ui/stats_panel/item/component.html.erb +2 -2
- data/app/components/ariadne/ui/table/cell/component.rb +3 -3
- data/app/components/ariadne/ui/table/component.rb +12 -12
- data/app/components/ariadne/ui/table/footer/component.rb +8 -8
- data/app/components/ariadne/ui/table/header/component.rb +9 -9
- data/app/components/ariadne/ui/table/row/component.rb +4 -4
- data/app/components/ariadne/ui/typography/component.rb +42 -42
- data/app/frontend/controllers/tooltip_controller.ts +28 -11
- data/app/frontend/stylesheets/ariadne_view_components.css +10 -5
- data/app/frontend/stylesheets/scrollbar.css +7 -7
- data/app/frontend/stylesheets/theme.css +110 -74
- data/app/helpers/ariadne/color_helper.rb +104 -104
- data/lib/ariadne/view_components/version.rb +1 -1
- metadata +2 -2
@@ -75,24 +75,24 @@ module Ariadne
|
|
75
75
|
style :popover do
|
76
76
|
base do
|
77
77
|
[
|
78
|
-
"ariadne
|
79
|
-
"ariadne
|
80
|
-
"ariadne
|
78
|
+
"ariadne:fixed",
|
79
|
+
"ariadne:max-w-[90vw]",
|
80
|
+
"ariadne:z-20",
|
81
81
|
"ariadne-scroll",
|
82
82
|
"ariadne-scrollbar-trigger",
|
83
|
-
"ariadne
|
84
|
-
"ariadne
|
85
|
-
"ariadne
|
83
|
+
"ariadne:rounded-lg",
|
84
|
+
"ariadne:shadow-lg",
|
85
|
+
"ariadne:bg-popover",
|
86
86
|
"text-popover-foreground",
|
87
87
|
]
|
88
88
|
end
|
89
89
|
|
90
90
|
variants do
|
91
91
|
size do
|
92
|
-
sm { "ariadne
|
93
|
-
md { "ariadne
|
94
|
-
lg { "ariadne
|
95
|
-
full { "ariadne
|
92
|
+
sm { "ariadne:w-36" }
|
93
|
+
md { "ariadne:w-52" }
|
94
|
+
lg { "ariadne:w-96" }
|
95
|
+
full { "ariadne:w-full" }
|
96
96
|
none {} # let the child decide how big its menu ought to be
|
97
97
|
end
|
98
98
|
end
|
@@ -101,8 +101,8 @@ module Ariadne
|
|
101
101
|
style :options do
|
102
102
|
base do
|
103
103
|
[
|
104
|
-
"ariadne
|
105
|
-
"ariadne
|
104
|
+
"ariadne:overflow-auto",
|
105
|
+
"ariadne:p-2",
|
106
106
|
]
|
107
107
|
end
|
108
108
|
end
|
@@ -6,8 +6,8 @@
|
|
6
6
|
class="<%= html_attrs[:class] %>"
|
7
7
|
data-<%= stimulus_name %>-target="dialog"
|
8
8
|
<%= html_attributes %>>
|
9
|
-
<div class="ariadne
|
10
|
-
<span id="<%= dialog_id %>-title" class="ariadne
|
9
|
+
<div class="ariadne:flex ariadne:flex-col ariadne:space-y-2 ariadne:text-center ariadne:sm:text-left">
|
10
|
+
<span id="<%= dialog_id %>-title" class="ariadne:text-lg ariadne:font-semibold"><%= title %></span>
|
11
11
|
<% if content.present? %>
|
12
12
|
<%= content %>
|
13
13
|
<% else %>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<%= footer %>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
22
|
-
<div class="ariadne
|
22
|
+
<div class="ariadne:absolute ariadne:end-3 ariadne:top-3">
|
23
23
|
<%= render Ariadne::UI::Button::Component.new(
|
24
24
|
scheme: :nude,
|
25
25
|
size: :xs,
|
@@ -85,33 +85,33 @@ module Ariadne
|
|
85
85
|
style do
|
86
86
|
base do
|
87
87
|
[
|
88
|
-
"ariadne
|
89
|
-
"ariadne
|
90
|
-
"ariadne
|
91
|
-
"ariadne
|
92
|
-
"ariadne
|
93
|
-
"ariadne
|
94
|
-
"ariadne
|
95
|
-
"dark:
|
96
|
-
"backdrop:
|
97
|
-
"
|
98
|
-
"ariadne
|
99
|
-
"ariadne
|
100
|
-
"ariadne
|
101
|
-
"ariadne
|
102
|
-
"ariadne
|
103
|
-
"ariadne
|
104
|
-
"ariadne
|
105
|
-
"sm:
|
106
|
-
"sm:
|
107
|
-
"sm:
|
88
|
+
"ariadne:fixed",
|
89
|
+
"ariadne:max-h-[90-vh]",
|
90
|
+
"ariadne:shadow-xl",
|
91
|
+
"ariadne:rounded-2xl",
|
92
|
+
"ariadne:bg-card",
|
93
|
+
"ariadne:text-card-foreground",
|
94
|
+
"ariadne:text-content",
|
95
|
+
"ariadne:dark:text-content-dark",
|
96
|
+
"ariadne:backdrop:bg-zinc-900/20",
|
97
|
+
"ariadne:dark:backdrop:bg-zinc-100/20",
|
98
|
+
"ariadne:relative",
|
99
|
+
"ariadne:px-4",
|
100
|
+
"ariadne:pb-4",
|
101
|
+
"ariadne:pt-5",
|
102
|
+
"ariadne:text-left",
|
103
|
+
"ariadne:shadow-xl",
|
104
|
+
"ariadne:transition-all",
|
105
|
+
"ariadne:sm:w-full",
|
106
|
+
"ariadne:sm:max-w-xl",
|
107
|
+
"ariadne:sm:p-6",
|
108
108
|
]
|
109
109
|
end
|
110
110
|
variants do
|
111
111
|
width do
|
112
112
|
full do
|
113
113
|
[
|
114
|
-
"ariadne
|
114
|
+
"ariadne:w-full",
|
115
115
|
]
|
116
116
|
end
|
117
117
|
end
|
@@ -19,11 +19,11 @@ module Ariadne
|
|
19
19
|
style do
|
20
20
|
base do
|
21
21
|
[
|
22
|
-
"ariadne
|
23
|
-
"ariadne
|
24
|
-
"sm:
|
25
|
-
"sm:
|
26
|
-
"sm:
|
22
|
+
"ariadne:flex",
|
23
|
+
"ariadne:flex-col-reverse",
|
24
|
+
"ariadne:sm:flex-row",
|
25
|
+
"ariadne:sm:justify-end",
|
26
|
+
"ariadne:sm:space-x-2",
|
27
27
|
]
|
28
28
|
end
|
29
29
|
end
|
@@ -57,11 +57,11 @@ module Ariadne
|
|
57
57
|
style do
|
58
58
|
variants do
|
59
59
|
size do
|
60
|
-
xs { ["ariadne
|
61
|
-
sm { ["ariadne
|
62
|
-
md { ["ariadne
|
63
|
-
lg { ["ariadne
|
64
|
-
xl { ["ariadne
|
60
|
+
xs { ["ariadne:w-4", "ariadne:h-4"] }
|
61
|
+
sm { ["ariadne:w-5", "ariadne:h-5"] }
|
62
|
+
md { ["ariadne:w-6", "ariadne:h-6"] }
|
63
|
+
lg { ["ariadne:w-10", "ariadne:h-10"] }
|
64
|
+
xl { ["ariadne:w-12", "ariadne:h-12"] }
|
65
65
|
end
|
66
66
|
end
|
67
67
|
end
|
@@ -34,16 +34,16 @@ module Ariadne
|
|
34
34
|
|
35
35
|
style do
|
36
36
|
base do
|
37
|
-
["ariadne
|
37
|
+
["ariadne:object-cover", "ariadne:object-center"]
|
38
38
|
end
|
39
39
|
|
40
40
|
variants do
|
41
41
|
size do
|
42
|
-
xs { "ariadne
|
43
|
-
sm { "ariadne
|
44
|
-
md { "ariadne
|
45
|
-
lg { "ariadne
|
46
|
-
xl { "ariadne
|
42
|
+
xs { "ariadne:w-4" }
|
43
|
+
sm { "ariadne:w-6" }
|
44
|
+
md { "ariadne:w-8" }
|
45
|
+
lg { "ariadne:w-12" }
|
46
|
+
xl { "ariadne:w-16" }
|
47
47
|
end
|
48
48
|
end
|
49
49
|
end
|
@@ -30,13 +30,13 @@ module Ariadne
|
|
30
30
|
style do
|
31
31
|
base do
|
32
32
|
[
|
33
|
-
"ariadne
|
34
|
-
"ariadne
|
35
|
-
"dark:
|
36
|
-
# "ariadne
|
37
|
-
"ariadne
|
38
|
-
"ariadne
|
39
|
-
"ariadne
|
33
|
+
"ariadne:cursor-pointer",
|
34
|
+
"ariadne:text-content",
|
35
|
+
"ariadne:dark:text-content-dark",
|
36
|
+
# "ariadne:inline-flex",
|
37
|
+
"ariadne:items-center",
|
38
|
+
"ariadne:border-b",
|
39
|
+
"ariadne:border-transparent",
|
40
40
|
]
|
41
41
|
end
|
42
42
|
|
@@ -44,35 +44,35 @@ module Ariadne
|
|
44
44
|
scheme do
|
45
45
|
base do
|
46
46
|
[
|
47
|
-
"ariadne
|
48
|
-
"dark:
|
47
|
+
"ariadne:text-indigo-600",
|
48
|
+
"ariadne:dark:text-indigo-400",
|
49
49
|
|
50
|
-
"[&>svg]:
|
51
|
-
"[&>svg]:
|
50
|
+
"ariadne:[&>svg]:text-zinc-400",
|
51
|
+
"ariadne:dark:[&>svg]:text-zinc-600",
|
52
52
|
|
53
|
-
"hover:
|
54
|
-
"dark:hover:
|
55
|
-
"hover:
|
56
|
-
"dark:hover:
|
57
|
-
"focus:
|
58
|
-
"dark:focus:
|
59
|
-
"focus
|
60
|
-
"active:
|
61
|
-
"
|
53
|
+
"ariadne:hover:text-indigo-500",
|
54
|
+
"ariadne:dark:hover:text-indigo-300",
|
55
|
+
"ariadne:hover:border-indigo-500",
|
56
|
+
"ariadne:dark:hover:border-indigo-300",
|
57
|
+
"ariadne:focus:text-indigo-500",
|
58
|
+
"ariadne:dark:focus:text-indigo-300",
|
59
|
+
"ariadne:focus:border-transparent!",
|
60
|
+
"ariadne:active:bg-indigo-700/10",
|
61
|
+
"ariadne:dark:active:bg-indigo-300/10",
|
62
62
|
]
|
63
63
|
end
|
64
64
|
|
65
65
|
nude do
|
66
66
|
[
|
67
|
-
"hover:
|
68
|
-
"dark:hover:
|
69
|
-
"hover:
|
70
|
-
"dark:hover:
|
71
|
-
"focus:
|
72
|
-
"dark:focus:
|
73
|
-
"focus
|
74
|
-
"active:
|
75
|
-
"
|
67
|
+
"ariadne:hover:text-indigo-600",
|
68
|
+
"ariadne:dark:hover:text-indigo-400",
|
69
|
+
"ariadne:hover:border-indigo-600",
|
70
|
+
"ariadne:dark:hover:border-indigo-400",
|
71
|
+
"ariadne:focus:text-indigo-500",
|
72
|
+
"ariadne:dark:focus:text-indigo-300",
|
73
|
+
"ariadne:focus:border-transparent!",
|
74
|
+
"ariadne:active:bg-indigo-700/10",
|
75
|
+
"ariadne:dark:active:bg-indigo-300/10",
|
76
76
|
]
|
77
77
|
end
|
78
78
|
|
@@ -82,17 +82,17 @@ module Ariadne
|
|
82
82
|
|
83
83
|
thick do
|
84
84
|
[
|
85
|
-
"ariadne
|
85
|
+
"ariadne:font-semibold",
|
86
86
|
]
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
90
|
size do
|
91
|
-
xs { "ariadne
|
92
|
-
sm { "ariadne
|
93
|
-
md { "ariadne
|
94
|
-
lg { "ariadne
|
95
|
-
xl { "ariadne
|
91
|
+
xs { "ariadne:text-xs ariadne:gap-0.5 ariadne:[&>svg]:size-3" }
|
92
|
+
sm { "ariadne:text-sm ariadne:gap-0.5 ariadne:[&>svg]:size-4" }
|
93
|
+
md { "ariadne:text-base ariadne:gap-1 ariadne:[&>svg]:size-4" }
|
94
|
+
lg { "ariadne:text-lg ariadne:gap-1 ariadne:[&>svg]:size-5" }
|
95
|
+
xl { "ariadne:text-xl ariadne:gap-1 ariadne:[&>svg]:size-6" }
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
2
2
|
<% if filter_field? %>
|
3
|
-
<div class="ariadne
|
3
|
+
<div class="ariadne:pb-1.5 ariadne:px-1">
|
4
4
|
<%= render filter_field %>
|
5
5
|
</div>
|
6
6
|
<% end %>
|
@@ -10,19 +10,19 @@
|
|
10
10
|
<% end %>
|
11
11
|
<% checkboxes.each do |checkbox| %>
|
12
12
|
<div class="<%= style(:item) %>" data-<%= stimulus_name %>-target="searchString">
|
13
|
-
<div class="ariadne
|
13
|
+
<div class="ariadne:truncate ariadne:w-full" role="menuitemcheckbox"><%= checkbox %></div>
|
14
14
|
</div>
|
15
15
|
<% end %>
|
16
16
|
<% radio_buttons.each do |radio_button| %>
|
17
17
|
<div class="<%= style(:item) %>" data-<%= stimulus_name %>-target="searchString">
|
18
|
-
<div class="ariadne
|
18
|
+
<div class="ariadne:truncate" role="menuitemradiobutton"><%= radio_button %></div>
|
19
19
|
</div>
|
20
20
|
<% end %>
|
21
21
|
<% items.each do |item| %>
|
22
22
|
<%= item %>
|
23
23
|
<% end %>
|
24
24
|
</div>
|
25
|
-
<div class="ariadne
|
26
|
-
<span class="ariadne
|
25
|
+
<div class="ariadne:text-center ariadne:hidden" data-<%= stimulus_name %>-target="emptyRoot">
|
26
|
+
<span class="ariadne:py-3 ariadne:text-md ariadne:text-zinc-600 ariadne:dark:text-zinc-400"><%= @empty_placeholder %> </span>
|
27
27
|
</div>
|
28
28
|
</div>
|
@@ -60,16 +60,16 @@ module Ariadne
|
|
60
60
|
options[:html_attrs] ||= {}
|
61
61
|
options[:html_attrs][:class] ||= ""
|
62
62
|
options[:html_attrs][:class] = [
|
63
|
-
"ariadne
|
64
|
-
"ariadne
|
65
|
-
"ariadne
|
66
|
-
"ariadne
|
67
|
-
"ariadne
|
68
|
-
"ariadne
|
69
|
-
"ariadne
|
70
|
-
"ariadne
|
71
|
-
"
|
72
|
-
"ariadne
|
63
|
+
"ariadne:truncate",
|
64
|
+
"ariadne:border-b-0",
|
65
|
+
"ariadne:flex",
|
66
|
+
"ariadne:gap-0.5",
|
67
|
+
"ariadne:items-center",
|
68
|
+
"ariadne:ps-2",
|
69
|
+
"ariadne:pe-1",
|
70
|
+
"ariadne:rounded",
|
71
|
+
"ariadne:ring-0!",
|
72
|
+
"ariadne:cursor-pointer",
|
73
73
|
SHARED_BACKGROUND_COLORS,
|
74
74
|
options[:html_attrs][:class],
|
75
75
|
]
|
@@ -91,26 +91,26 @@ module Ariadne
|
|
91
91
|
end
|
92
92
|
|
93
93
|
SHARED_BACKGROUND_COLORS = [
|
94
|
-
"hover:
|
95
|
-
"
|
96
|
-
"focus-within:
|
97
|
-
"focus-within:
|
94
|
+
"ariadne:hover:bg-blue-100",
|
95
|
+
"ariadne:dark:hover:bg-blue-800",
|
96
|
+
"ariadne:focus-within:bg-blue-100",
|
97
|
+
"ariadne:dark:focus-within:bg-blue-800",
|
98
98
|
]
|
99
99
|
|
100
100
|
style do
|
101
101
|
base do
|
102
102
|
[
|
103
|
-
"ariadne
|
104
|
-
"ariadne
|
103
|
+
"ariadne:overflow-y-auto",
|
104
|
+
"ariadne:grow",
|
105
105
|
]
|
106
106
|
end
|
107
107
|
|
108
108
|
variants do
|
109
109
|
size do
|
110
|
-
sm { "ariadne
|
111
|
-
md { "ariadne
|
112
|
-
lg { "ariadne
|
113
|
-
full { "ariadne
|
110
|
+
sm { "ariadne:w-36" }
|
111
|
+
md { "ariadne:w-52" }
|
112
|
+
lg { "ariadne:w-96" }
|
113
|
+
full { "ariadne:w-full" }
|
114
114
|
end
|
115
115
|
end
|
116
116
|
end
|
@@ -118,9 +118,9 @@ module Ariadne
|
|
118
118
|
style :items do
|
119
119
|
base do
|
120
120
|
[
|
121
|
-
"ariadne
|
122
|
-
"ariadne
|
123
|
-
"ariadne
|
121
|
+
"ariadne:flex",
|
122
|
+
"ariadne:flex-col",
|
123
|
+
"ariadne:gap-1",
|
124
124
|
]
|
125
125
|
end
|
126
126
|
end
|
@@ -19,16 +19,16 @@ export default class InputFilterController extends controllerFactory()({
|
|
19
19
|
if (!foundSomething && contains) foundSomething = true
|
20
20
|
|
21
21
|
if (contains) {
|
22
|
-
el.classList.remove('ariadne
|
22
|
+
el.classList.remove('ariadne:hidden')
|
23
23
|
} else {
|
24
|
-
el.classList.add('ariadne
|
24
|
+
el.classList.add('ariadne:hidden')
|
25
25
|
}
|
26
26
|
}
|
27
27
|
|
28
28
|
if (foundSomething) {
|
29
|
-
this.emptyRootTarget.classList.add('ariadne
|
29
|
+
this.emptyRootTarget.classList.add('ariadne:hidden')
|
30
30
|
} else {
|
31
|
-
this.emptyRootTarget.classList.remove('ariadne
|
31
|
+
this.emptyRootTarget.classList.remove('ariadne:hidden')
|
32
32
|
}
|
33
33
|
}
|
34
34
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div
|
2
2
|
<%= 'role="menuitem"' if as_menu %>
|
3
3
|
class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
4
|
-
<div class="ariadne
|
4
|
+
<div class="ariadne:relative ariadne:flex ariadne:w-full"><%= content %></div>
|
5
5
|
</div>
|
@@ -21,21 +21,21 @@ module Ariadne
|
|
21
21
|
style :item do
|
22
22
|
base do
|
23
23
|
[
|
24
|
-
# "ariadne
|
25
|
-
"ariadne
|
26
|
-
"ariadne
|
27
|
-
"
|
28
|
-
"ariadne
|
29
|
-
"ariadne
|
30
|
-
"ariadne
|
31
|
-
"ariadne
|
32
|
-
"ariadne
|
33
|
-
# "ariadne
|
34
|
-
"ariadne
|
35
|
-
"ariadne
|
36
|
-
"ariadne
|
37
|
-
"disabled:
|
38
|
-
"disabled:
|
24
|
+
# "ariadne:gap-0.5",
|
25
|
+
"ariadne:items-center",
|
26
|
+
"ariadne:rounded",
|
27
|
+
"ariadne:ring-0!",
|
28
|
+
"ariadne:cursor-default",
|
29
|
+
"ariadne:select-none",
|
30
|
+
"ariadne:items-center",
|
31
|
+
"ariadne:rounded-sm",
|
32
|
+
"ariadne:px-2",
|
33
|
+
# "ariadne:py-1.5",
|
34
|
+
"ariadne:text-sm",
|
35
|
+
"ariadne:outline-hidden",
|
36
|
+
"ariadne:transition-colors",
|
37
|
+
"ariadne:disabled:pointer-events-none",
|
38
|
+
"ariadne:disabled:opacity-50",
|
39
39
|
].concat(Ariadne::UI::List::Component::SHARED_BACKGROUND_COLORS)
|
40
40
|
end
|
41
41
|
end
|
@@ -40,7 +40,7 @@
|
|
40
40
|
"data-turbo": false,
|
41
41
|
selected: option[:selected]
|
42
42
|
) do %>
|
43
|
-
<span class="
|
43
|
+
<span class="ariadne:text-gray-700! ariadne:dark:text-gray-300!"><%= option[:label].to_s %></span>
|
44
44
|
<% end %>
|
45
45
|
<% end %>
|
46
46
|
<% end %>
|
@@ -49,17 +49,17 @@ module Ariadne
|
|
49
49
|
|
50
50
|
def component_classes
|
51
51
|
merge_tailwind_classes(
|
52
|
-
"ariadne
|
52
|
+
"ariadne:flex ariadne:items-center ariadne:justify-between ariadne:w-full",
|
53
53
|
)
|
54
54
|
end
|
55
55
|
|
56
56
|
def link_classes(is_active = false)
|
57
|
-
base_classes = "ariadne
|
57
|
+
base_classes = "ariadne:inline-flex ariadne:items-center ariadne:justify-center ariadne:min-w-[2rem] ariadne:h-8 ariadne:px-2 ariadne:text-sm ariadne:font-medium ariadne:rounded-md"
|
58
58
|
|
59
59
|
active_classes = if is_active
|
60
|
-
"ariadne
|
60
|
+
"ariadne:bg-gray-100 ariadne:dark:bg-gray-700 ariadne:text-gray-900 ariadne:dark:text-white ariadne:cursor-default"
|
61
61
|
else
|
62
|
-
"ariadne
|
62
|
+
"ariadne:transition-colors ariadne:text-gray-600 ariadne:hover:bg-gray-50 ariadne:dark:text-gray-300 ariadne:dark:hover:bg-gray-700 ariadne:cursor-pointer"
|
63
63
|
end
|
64
64
|
|
65
65
|
merge_tailwind_classes([base_classes, active_classes])
|
@@ -67,25 +67,25 @@ module Ariadne
|
|
67
67
|
|
68
68
|
def disabled_link_classes
|
69
69
|
merge_tailwind_classes(
|
70
|
-
"ariadne
|
70
|
+
"ariadne:inline-flex ariadne:items-center ariadne:justify-center ariadne:min-w-[2rem] ariadne:h-8 ariadne:px-2 ariadne:text-sm ariadne:font-medium ariadne:rounded-md ariadne:text-gray-300 ariadne:dark:text-gray-600 ariadne:cursor-not-allowed",
|
71
71
|
)
|
72
72
|
end
|
73
73
|
|
74
74
|
def ellipsis_classes
|
75
75
|
merge_tailwind_classes(
|
76
|
-
"ariadne
|
76
|
+
"ariadne:inline-flex ariadne:items-center ariadne:justify-center ariadne:min-w-[2rem] ariadne:h-8 ariadne:px-1 ariadne:text-sm ariadne:font-medium ariadne:text-gray-500 ariadne:dark:text-gray-400",
|
77
77
|
)
|
78
78
|
end
|
79
79
|
|
80
80
|
def select_classes
|
81
81
|
merge_tailwind_classes(
|
82
|
-
"ariadne
|
82
|
+
"ariadne:h-8 ariadne:pl-2 ariadne:pr-8 ariadne:text-sm ariadne:font-medium ariadne:rounded-md ariadne:border ariadne:border-gray-300 ariadne:dark:border-gray-600 ariadne:bg-white ariadne:dark:bg-gray-800 ariadne:text-gray-700 ariadne:dark:text-gray-200 ariadne:hover:border-primary-500 ariadne:focus:outline-hidden ariadne:focus:ring-1 ariadne:focus:ring-primary-500 ariadne:focus:border-primary-500",
|
83
83
|
)
|
84
84
|
end
|
85
85
|
|
86
86
|
def counter_classes
|
87
87
|
merge_tailwind_classes(
|
88
|
-
"ariadne
|
88
|
+
"ariadne:text-sm ariadne:text-gray-700 ariadne:dark:text-gray-300 ariadne:font-medium",
|
89
89
|
)
|
90
90
|
end
|
91
91
|
|
@@ -113,7 +113,7 @@ module Ariadne
|
|
113
113
|
|
114
114
|
def nav_section_classes
|
115
115
|
merge_tailwind_classes(
|
116
|
-
"ariadne
|
116
|
+
"ariadne:flex ariadne:items-center ariadne:gap-1 ariadne:justify-center",
|
117
117
|
)
|
118
118
|
end
|
119
119
|
end
|
@@ -79,12 +79,12 @@ module Ariadne
|
|
79
79
|
style do
|
80
80
|
base do
|
81
81
|
[
|
82
|
-
"ariadne
|
83
|
-
"ariadne
|
84
|
-
"ariadne
|
85
|
-
"ariadne
|
86
|
-
"ariadne
|
87
|
-
"dark:
|
82
|
+
"ariadne:fixed",
|
83
|
+
"ariadne:z-20",
|
84
|
+
"ariadne:rounded-lg",
|
85
|
+
"ariadne:shadow-lg",
|
86
|
+
"ariadne:bg-popover",
|
87
|
+
"ariadne:dark:bg-popover-dark",
|
88
88
|
]
|
89
89
|
end
|
90
90
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<span class="ariadne
|
1
|
+
<span class="ariadne:inline-flex ariadne:items-center ariadne:gap-1">
|
2
2
|
<kbd data-controller='<%= stimulus_name %>' <%= html_attributes %>>
|
3
3
|
<% keys.each_with_index do |key, index| %>
|
4
4
|
<% if special_keys.include? key.downcase %>
|
@@ -8,12 +8,12 @@
|
|
8
8
|
<%= key.capitalize %>
|
9
9
|
</kbd>
|
10
10
|
<% elsif key.downcase == 'enter' %>
|
11
|
-
<kbd class="<%= html_attrs[:class] %>
|
11
|
+
<kbd class="<%= html_attrs[:class] %> ariadne:font-fallback!">↵</kbd>
|
12
12
|
<% else %>
|
13
|
-
<kbd class="<%= html_attrs[:class] %>
|
13
|
+
<kbd class="<%= html_attrs[:class] %>"><%= key %></kbd>
|
14
14
|
<% end %>
|
15
15
|
<% if index != keys.size - 1 %>
|
16
|
-
<span class="
|
16
|
+
<span class="ariadne:text-muted-foreground ariadne:mx-0.5">+</span>
|
17
17
|
<% end %>
|
18
18
|
<% end %>
|
19
19
|
</kbd>
|