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
@@ -29,13 +29,13 @@ module Ariadne
|
|
29
29
|
style :tab do
|
30
30
|
base do
|
31
31
|
[
|
32
|
-
"ariadne
|
33
|
-
"ariadne
|
34
|
-
"ariadne
|
35
|
-
"has-
|
36
|
-
"has-
|
37
|
-
"has-
|
38
|
-
"dark:has-
|
32
|
+
"ariadne:px-1.5",
|
33
|
+
"ariadne:rounded-md",
|
34
|
+
"ariadne:opacity-75",
|
35
|
+
"ariadne:has-checked:shadow-sm",
|
36
|
+
"ariadne:has-checked:opacity-100",
|
37
|
+
"ariadne:has-checked:bg-white",
|
38
|
+
"ariadne:dark:has-checked:bg-white/20",
|
39
39
|
]
|
40
40
|
end
|
41
41
|
end
|
@@ -14,12 +14,12 @@ module Ariadne
|
|
14
14
|
style :grid do
|
15
15
|
base do
|
16
16
|
[
|
17
|
-
"ariadne
|
18
|
-
"ariadne
|
19
|
-
"ariadne
|
20
|
-
"sm:
|
21
|
-
"md:
|
22
|
-
"lg:
|
17
|
+
"ariadne:grid",
|
18
|
+
"ariadne:grid-cols-1",
|
19
|
+
"ariadne:gap-6",
|
20
|
+
"ariadne:sm:grid-cols-2",
|
21
|
+
"ariadne:md:grid-cols-3",
|
22
|
+
"ariadne:lg:grid-cols-4",
|
23
23
|
]
|
24
24
|
end
|
25
25
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
|
2
2
|
<% if blank? %>
|
3
|
-
<li class="ariadne
|
3
|
+
<li class="ariadne:contents" <%= html_attributes %>>
|
4
4
|
<%= content %>
|
5
5
|
</li>
|
6
6
|
<% else %>
|
7
|
-
<li class="ariadne
|
7
|
+
<li class="ariadne:contents">
|
8
8
|
<div class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
9
9
|
<%= content %>
|
10
10
|
</div>
|
@@ -19,12 +19,12 @@ module Ariadne
|
|
19
19
|
style :item do
|
20
20
|
base do
|
21
21
|
[
|
22
|
-
"ariadne
|
23
|
-
"ariadne
|
24
|
-
"ariadne
|
25
|
-
"ariadne
|
26
|
-
"ariadne
|
27
|
-
"ariadne
|
22
|
+
"ariadne:flex",
|
23
|
+
"ariadne:flex-col",
|
24
|
+
"ariadne:gap-3",
|
25
|
+
"ariadne:p-3",
|
26
|
+
"ariadne:ps-4",
|
27
|
+
"ariadne:rounded-xl",
|
28
28
|
]
|
29
29
|
end
|
30
30
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
2
|
-
<div class='ariadne
|
2
|
+
<div class='ariadne:py-1 ariadne:mb-1 text-h5-caps ariadne:text-zinc-600 ariadne:dark:text-zinc-400'>
|
3
3
|
<div class="aridne--ml-px aridne-flex aridne-flex-1">
|
4
4
|
<%= label %>
|
5
5
|
<% if trailing_visual? %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<main class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
2
|
-
<div class="ariadne
|
3
|
-
<div class="ariadne
|
2
|
+
<div class="ariadne:mt-10 ariadne:sm:mx-auto ariadne:sm:w-full ariadne:sm:max-w-[480px]">
|
3
|
+
<div class="ariadne:bg-card ariadne:dark:bg-card-dark ariadne:px-6 ariadne:py-12 ariadne:shadow ariadne:sm:rounded-lg ariadne:sm:px-12">
|
4
4
|
<%= content %>
|
5
5
|
</div>
|
6
6
|
<% if footer? %>
|
@@ -14,14 +14,14 @@ module Ariadne
|
|
14
14
|
style(:container) do
|
15
15
|
base do
|
16
16
|
[
|
17
|
-
"ariadne
|
18
|
-
"dark:
|
19
|
-
"ariadne
|
20
|
-
"dark:
|
21
|
-
"ariadne
|
22
|
-
"ariadne
|
23
|
-
"ariadne
|
24
|
-
"ariadne
|
17
|
+
"ariadne:bg-background",
|
18
|
+
"ariadne:dark:bg-background-dark",
|
19
|
+
"ariadne:text-content",
|
20
|
+
"ariadne:dark:text-content-dark",
|
21
|
+
"ariadne:grow",
|
22
|
+
"ariadne:h-screen",
|
23
|
+
"ariadne:py-6",
|
24
|
+
"ariadne:px-1",
|
25
25
|
]
|
26
26
|
end
|
27
27
|
end
|
@@ -1,26 +1,26 @@
|
|
1
1
|
<header class="<%= style %>">
|
2
|
-
<div class="ariadne
|
3
|
-
<nav class="ariadne
|
4
|
-
<div class="ariadne
|
2
|
+
<div class="ariadne:mx-auto ariadne:px-2 ariadne:sm:px-4 ariadne:lg:px-8">
|
3
|
+
<nav class="ariadne:flex ariadne:h-16 ariadne:justify-between">
|
4
|
+
<div class="ariadne:flex ariadne:px-2 ariadne:lg:px-0">
|
5
5
|
<% leading_items.each_with_index do |leading_item, idx| %>
|
6
6
|
<div class="<%= style(:leading_item, initial: initial?(idx)) %>">
|
7
7
|
<%= leading_item %>
|
8
8
|
</div>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
|
-
<div class="ariadne
|
11
|
+
<div class="ariadne:flex ariadne:items-center ariadne:space-x-4 ariadne:lg:space-x-6 ariadne:mx-6">
|
12
12
|
<% @links.each do |link| %>
|
13
13
|
<a
|
14
14
|
aria-current="<%= link[:current] ? "page" : "false" %>"
|
15
15
|
href="<%= link[:href] %>"
|
16
16
|
class="<%= style(:tab, active: link[:current] ? :yes : :no) %>">
|
17
|
-
<span class="ariadne
|
18
|
-
<span class="ariadne
|
17
|
+
<span class="ariadne:inline-block ariadne:rounded-md ariadne:group-hover:bg-zinc-200/20 ariadne:dark:group-hover:bg-zinc-700/20">
|
18
|
+
<span class="ariadne:px-1.5"><%= link[:label] %></span>
|
19
19
|
</span>
|
20
20
|
</a>
|
21
21
|
<% end %>
|
22
22
|
</div>
|
23
|
-
<div class="ariadne
|
23
|
+
<div class="ariadne:hidden ariadne:lg:ml-4 ariadne:lg:flex ariadne:lg:items-center">
|
24
24
|
<% trailing_items.each_with_index do |trailing_item, idx| %>
|
25
25
|
<div class="<%= style(:trailing_item, initial: final?(idx)) %>">
|
26
26
|
<%= trailing_item %>
|
@@ -32,13 +32,13 @@ module Ariadne
|
|
32
32
|
style do
|
33
33
|
base do
|
34
34
|
[
|
35
|
-
"ariadne
|
36
|
-
"dark:
|
37
|
-
"ariadne
|
38
|
-
"ariadne
|
39
|
-
"dark:
|
40
|
-
"ariadne
|
41
|
-
"ariadne
|
35
|
+
"ariadne:bg-panel",
|
36
|
+
"ariadne:dark:bg-panel-dark",
|
37
|
+
"ariadne:border-b",
|
38
|
+
"ariadne:border-zinc-100",
|
39
|
+
"ariadne:dark:border-zinc-900",
|
40
|
+
"ariadne:z-50",
|
41
|
+
"ariadne:overflow-hidden",
|
42
42
|
]
|
43
43
|
end
|
44
44
|
end
|
@@ -52,8 +52,8 @@ module Ariadne
|
|
52
52
|
|
53
53
|
variants do
|
54
54
|
initial do
|
55
|
-
yes { "ariadne
|
56
|
-
no { "ariadne
|
55
|
+
yes { "ariadne:flex ariadne:shrink-0 ariadne:items-center" }
|
56
|
+
no { "ariadne:hidden ariadne:lg:ml-6 ariadne:lg:flex ariadne:lg:space-x-2" }
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -61,28 +61,28 @@ module Ariadne
|
|
61
61
|
style :tab do
|
62
62
|
base do
|
63
63
|
[
|
64
|
-
"ariadne
|
65
|
-
"dark:
|
66
|
-
"ariadne
|
67
|
-
"ariadne
|
68
|
-
"ariadne
|
69
|
-
"ariadne
|
70
|
-
"ariadne
|
64
|
+
"ariadne:text-content",
|
65
|
+
"ariadne:dark:text-content-dark",
|
66
|
+
"ariadne:text-base",
|
67
|
+
"ariadne:font-medium",
|
68
|
+
"ariadne:whitespace-nowrap",
|
69
|
+
"ariadne:border-b-2",
|
70
|
+
"ariadne:py-2",
|
71
71
|
]
|
72
72
|
end
|
73
73
|
variants do
|
74
74
|
active do
|
75
75
|
no do
|
76
76
|
[
|
77
|
-
"ariadne
|
77
|
+
"ariadne:group", "ariadne:border-transparent",
|
78
78
|
]
|
79
79
|
end
|
80
80
|
yes do
|
81
81
|
[
|
82
|
-
"ariadne
|
83
|
-
"ariadne
|
84
|
-
"dark:
|
85
|
-
"dark:
|
82
|
+
"ariadne:border-purple-700",
|
83
|
+
"ariadne:text-purple-700",
|
84
|
+
"ariadne:dark:border-purple-300",
|
85
|
+
"ariadne:dark:text-purple-300",
|
86
86
|
]
|
87
87
|
end
|
88
88
|
end
|
@@ -92,11 +92,11 @@ module Ariadne
|
|
92
92
|
style(:trailing_item) do
|
93
93
|
base do
|
94
94
|
[
|
95
|
-
"ariadne
|
96
|
-
"ariadne
|
97
|
-
"ariadne
|
98
|
-
"ariadne
|
99
|
-
"ariadne
|
95
|
+
"ariadne:flex",
|
96
|
+
"ariadne:flex-1",
|
97
|
+
"ariadne:items-center",
|
98
|
+
"ariadne:justify-end",
|
99
|
+
"ariadne:gap-x-1",
|
100
100
|
]
|
101
101
|
end
|
102
102
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="ariadne
|
2
|
-
<div class="ariadne
|
1
|
+
<div class="ariadne:flex ariadne:justify-between ariadne:items-center ariadne:p-1">
|
2
|
+
<div class="ariadne:uppercase ariadne:text-muted-foreground ariadne:dark:text-muted-foreground-dark ariadne:text-xs"><%= label %></div>
|
3
3
|
<%= content %>
|
4
4
|
</div>
|
@@ -1,11 +1,11 @@
|
|
1
|
-
<main class="ariadne
|
2
|
-
<div class="ariadne
|
1
|
+
<main class="ariadne:grow ariadne:flex">
|
2
|
+
<div class="ariadne:grow">
|
3
3
|
<div class="<%= style %>">
|
4
4
|
<div class="<%= style(:menu) %>">
|
5
5
|
<%= left_panel %>
|
6
6
|
</div>
|
7
|
-
<div class="ariadne
|
8
|
-
<div class="md:
|
7
|
+
<div class="ariadne:grow ariadne:min-w-0 ariadne:w-full">
|
8
|
+
<div class="ariadne:md:w-4/5 ariadne:md:mx-auto ariadne:p-2.5">
|
9
9
|
<%= content %>
|
10
10
|
</div>
|
11
11
|
|
@@ -10,7 +10,7 @@ module Ariadne
|
|
10
10
|
style do
|
11
11
|
base do
|
12
12
|
[
|
13
|
-
"ariadne
|
13
|
+
"ariadne:flex", "ariadne:flex-col", "ariadne:sm:flex-row", "ariadne:h-full",
|
14
14
|
]
|
15
15
|
end
|
16
16
|
end
|
@@ -18,17 +18,17 @@ module Ariadne
|
|
18
18
|
style :menu do
|
19
19
|
base do
|
20
20
|
[
|
21
|
-
"ariadne
|
22
|
-
"ariadne
|
23
|
-
"ariadne
|
24
|
-
"ariadne
|
25
|
-
"sm:
|
26
|
-
"ariadne
|
27
|
-
"dark:
|
28
|
-
"max-sm:
|
29
|
-
"sm:
|
30
|
-
"ariadne
|
31
|
-
"dark:
|
21
|
+
"ariadne:basis-1/4",
|
22
|
+
"ariadne:shrink-0",
|
23
|
+
"ariadne:px-2",
|
24
|
+
"ariadne:pb-2",
|
25
|
+
"ariadne:sm:p-4",
|
26
|
+
"ariadne:bg-zinc-50",
|
27
|
+
"ariadne:dark:bg-zinc-900",
|
28
|
+
"ariadne:max-sm:border-b",
|
29
|
+
"ariadne:sm:border-e",
|
30
|
+
"ariadne:border-black/10",
|
31
|
+
"ariadne:dark:border-white/10",
|
32
32
|
]
|
33
33
|
end
|
34
34
|
end
|
@@ -10,12 +10,12 @@ module Ariadne
|
|
10
10
|
style do
|
11
11
|
base do
|
12
12
|
[
|
13
|
-
"ariadne
|
14
|
-
"ariadne
|
15
|
-
"ariadne
|
16
|
-
"dark:
|
17
|
-
"ariadne
|
18
|
-
"ariadne
|
13
|
+
"ariadne:h-screen",
|
14
|
+
"ariadne:grow",
|
15
|
+
"ariadne:bg-background",
|
16
|
+
"ariadne:dark:bg-background-dark",
|
17
|
+
"ariadne:py-6",
|
18
|
+
"ariadne:px-1",
|
19
19
|
]
|
20
20
|
end
|
21
21
|
end
|
@@ -16,10 +16,10 @@ module Ariadne
|
|
16
16
|
style do
|
17
17
|
base do
|
18
18
|
[
|
19
|
-
"ariadne
|
20
|
-
"ariadne
|
21
|
-
"ariadne
|
22
|
-
"ariadne
|
19
|
+
"ariadne:flex",
|
20
|
+
"ariadne:w-full",
|
21
|
+
"ariadne:justify-center",
|
22
|
+
"ariadne:items-center",
|
23
23
|
]
|
24
24
|
end
|
25
25
|
end
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<% if heroicon? %>
|
6
6
|
<%= heroicon %>
|
7
7
|
<% else %>
|
8
|
-
<%= render Ariadne::UI::Heroicon::Component.new(icon: "chevron-down", size: :sm, variant: :solid, html_attrs: { class: "ariadne
|
8
|
+
<%= render Ariadne::UI::Heroicon::Component.new(icon: "chevron-down", size: :sm, variant: :solid, html_attrs: { class: "ariadne:transition-transform ariadne:duration-200 ariadne:opacity-50" }) %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
11
|
</button>
|
@@ -27,8 +27,8 @@ module Ariadne
|
|
27
27
|
style(:item) do
|
28
28
|
base do
|
29
29
|
[
|
30
|
-
"ariadne
|
31
|
-
"ariadne
|
30
|
+
"ariadne:border-b",
|
31
|
+
"ariadne:cursor-pointer",
|
32
32
|
]
|
33
33
|
end
|
34
34
|
end
|
@@ -36,15 +36,15 @@ module Ariadne
|
|
36
36
|
style(:trigger) do
|
37
37
|
base do
|
38
38
|
[
|
39
|
-
"ariadne
|
40
|
-
"ariadne
|
41
|
-
"ariadne
|
42
|
-
"ariadne
|
43
|
-
"ariadne
|
44
|
-
"ariadne
|
45
|
-
"ariadne
|
46
|
-
"ariadne
|
47
|
-
"hover:
|
39
|
+
"ariadne:flex",
|
40
|
+
"ariadne:flex-1",
|
41
|
+
"ariadne:items-center",
|
42
|
+
"ariadne:justify-between",
|
43
|
+
"ariadne:py-4",
|
44
|
+
"ariadne:font-medium",
|
45
|
+
"ariadne:transition-all",
|
46
|
+
"ariadne:w-full",
|
47
|
+
"ariadne:hover:underline",
|
48
48
|
]
|
49
49
|
end
|
50
50
|
end
|
@@ -52,7 +52,7 @@ module Ariadne
|
|
52
52
|
style(:content) do
|
53
53
|
base do
|
54
54
|
[
|
55
|
-
"ariadne
|
55
|
+
"ariadne:overflow-y-hidden",
|
56
56
|
]
|
57
57
|
end
|
58
58
|
end
|
@@ -36,23 +36,23 @@ module Ariadne
|
|
36
36
|
style do
|
37
37
|
base do
|
38
38
|
[
|
39
|
-
"ariadne
|
40
|
-
"ariadne
|
41
|
-
"ariadne
|
42
|
-
"ariadne
|
43
|
-
"
|
44
|
-
"ariadne
|
45
|
-
"dark:
|
39
|
+
"ariadne:select-none",
|
40
|
+
"ariadne:object-cover",
|
41
|
+
"ariadne:outline",
|
42
|
+
"ariadne:outline-1",
|
43
|
+
"ariadne:-outline-offset-1",
|
44
|
+
"ariadne:outline-black/20",
|
45
|
+
"ariadne:dark:outline-white/20",
|
46
46
|
]
|
47
47
|
end
|
48
48
|
|
49
49
|
variants do
|
50
50
|
size do
|
51
|
-
xs { ["ariadne
|
52
|
-
sm { ["ariadne
|
53
|
-
md { ["ariadne
|
54
|
-
lg { ["ariadne
|
55
|
-
xl { ["ariadne
|
51
|
+
xs { ["ariadne:size-4", "ariadne:text-xs", "ariadne:rounded"] }
|
52
|
+
sm { ["ariadne:size-5", "ariadne:text-sm", "ariadne:rounded-sm"] }
|
53
|
+
md { ["ariadne:size-8", "ariadne:text-md", "ariadne:rounded-md"] }
|
54
|
+
lg { ["ariadne:size-10", "ariadne:text-lg", "ariadne:rounded-lg"] }
|
55
|
+
xl { ["ariadne:size-12", "ariadne:text-xl", "ariadne:rounded-xl"] }
|
56
56
|
end
|
57
57
|
|
58
58
|
shape do
|
@@ -62,8 +62,8 @@ module Ariadne
|
|
62
62
|
|
63
63
|
circle do
|
64
64
|
[
|
65
|
-
"ariadne
|
66
|
-
"
|
65
|
+
"ariadne:rounded-full",
|
66
|
+
"ariadne:*:rounded-full",
|
67
67
|
]
|
68
68
|
end
|
69
69
|
end
|
@@ -71,13 +71,13 @@ module Ariadne
|
|
71
71
|
has_src do
|
72
72
|
no do
|
73
73
|
[
|
74
|
-
"ariadne
|
75
|
-
"ariadne
|
76
|
-
"ariadne
|
77
|
-
"ariadne
|
78
|
-
"dark:
|
79
|
-
"ariadne
|
80
|
-
"dark:
|
74
|
+
"ariadne:inline-flex",
|
75
|
+
"ariadne:items-center",
|
76
|
+
"ariadne:justify-center",
|
77
|
+
"ariadne:bg-violet-200",
|
78
|
+
"ariadne:dark:bg-violet-800",
|
79
|
+
"ariadne:text-violet-600",
|
80
|
+
"ariadne:dark:text-violet-400",
|
81
81
|
]
|
82
82
|
end
|
83
83
|
end
|
@@ -45,22 +45,22 @@ module Ariadne
|
|
45
45
|
style do
|
46
46
|
base do
|
47
47
|
[
|
48
|
-
"ariadne
|
49
|
-
"ariadne
|
50
|
-
"ariadne
|
51
|
-
"ariadne
|
52
|
-
"ariadne
|
53
|
-
"dark:
|
54
|
-
"ariadne
|
55
|
-
"dark:
|
56
|
-
"ariadne
|
57
|
-
"ariadne
|
58
|
-
"focus-visible:
|
59
|
-
"ariadne
|
60
|
-
"dark:
|
61
|
-
"ariadne
|
62
|
-
"ariadne
|
63
|
-
"ariadne
|
48
|
+
"ariadne:truncate",
|
49
|
+
"ariadne:max-w-full",
|
50
|
+
"ariadne:border",
|
51
|
+
"ariadne:border-solid",
|
52
|
+
"ariadne:border-black/10",
|
53
|
+
"ariadne:dark:border-white/10",
|
54
|
+
"ariadne:text-content",
|
55
|
+
"ariadne:dark:text-content-dark",
|
56
|
+
"ariadne:outline-hidden",
|
57
|
+
"ariadne:ring-offset-0",
|
58
|
+
"ariadne:focus-visible:ring-2",
|
59
|
+
"ariadne:ring-blue-400",
|
60
|
+
"ariadne:dark:ring-blue-600",
|
61
|
+
"ariadne:py-1",
|
62
|
+
"ariadne:px-1.5",
|
63
|
+
"ariadne:rounded-md",
|
64
64
|
]
|
65
65
|
end
|
66
66
|
|
@@ -69,31 +69,31 @@ module Ariadne
|
|
69
69
|
include_colors!
|
70
70
|
|
71
71
|
with_leading_item do
|
72
|
-
yes { "ariadne
|
73
|
-
no { "ariadne
|
72
|
+
yes { "ariadne:inline-flex ariadne:items-center" }
|
73
|
+
no { "ariadne:inline-block" }
|
74
74
|
end
|
75
75
|
|
76
76
|
theme do
|
77
|
-
outline { "ariadne
|
78
|
-
ghost { "ariadne
|
77
|
+
outline { "ariadne:bg-transparent ariadne:text-blue-400 ariadne:border-blue-400" }
|
78
|
+
ghost { "ariadne:bg-blue-400 ariadne:text-white ariadne:border-blue-400" }
|
79
79
|
end
|
80
80
|
|
81
81
|
size do
|
82
|
-
xs { "ariadne
|
83
|
-
sm { "ariadne
|
84
|
-
md { "ariadne
|
85
|
-
lg { "ariadne
|
86
|
-
xl { "ariadne
|
82
|
+
xs { "ariadne:text-xs ariadne:leading-3" }
|
83
|
+
sm { "ariadne:text-xs ariadne:leading-4" }
|
84
|
+
md { "ariadne:text-base ariadne:leading-5" }
|
85
|
+
lg { "ariadne:text-lg ariadne:leading-6" }
|
86
|
+
xl { "ariadne:text-xl ariadne:leading-8" }
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
compound(size: :xs, with_leading_item: :yes) { ["ariadne
|
91
|
-
compound(size: :sm, with_leading_item: :yes) { ["ariadne
|
92
|
-
compound(size: :md, with_leading_item: :yes) { ["ariadne
|
90
|
+
compound(size: :xs, with_leading_item: :yes) { ["ariadne:pe-1 ariadne:ps-0.5"] }
|
91
|
+
compound(size: :sm, with_leading_item: :yes) { ["ariadne:pe-1.5 ariadne:ps-0.5"] }
|
92
|
+
compound(size: :md, with_leading_item: :yes) { ["ariadne:pe-1.5 ariadne:ps-0.5"] }
|
93
93
|
|
94
|
-
compound(size: :xs, with_leading_item: :no) { ["ariadne
|
95
|
-
compound(size: :sm, with_leading_item: :no) { ["ariadne
|
96
|
-
compound(size: :md, with_leading_item: :no) { ["ariadne
|
94
|
+
compound(size: :xs, with_leading_item: :no) { ["ariadne:px-1"] }
|
95
|
+
compound(size: :sm, with_leading_item: :no) { ["ariadne:px-1.5"] }
|
96
|
+
compound(size: :md, with_leading_item: :no) { ["ariadne:px-2"] }
|
97
97
|
end
|
98
98
|
end
|
99
99
|
end
|
@@ -1,19 +1,19 @@
|
|
1
1
|
<div class="<%= html_attrs[:class] %>" <%= html_attributes %>>
|
2
|
-
<section aria-labelledby="<%= @header_id %>" class="ariadne
|
3
|
-
<div class="ariadne
|
4
|
-
<div class="ariadne
|
2
|
+
<section aria-labelledby="<%= @header_id %>" class="ariadne:p-4">
|
3
|
+
<div class="ariadne:flex ariadne:items-center">
|
4
|
+
<div class="ariadne:shrink-0 <%= style(:text, scheme:) %>">
|
5
5
|
<%= render heroicon_or_default %>
|
6
6
|
</div>
|
7
|
-
<div class="ariadne
|
8
|
-
<p id="<%= @header_id %>" class="ariadne
|
9
|
-
<p class="ariadne
|
7
|
+
<div class="ariadne:ml-3 ariadne:w-0 ariadne:flex-1 ariadne:pt-0.5 <%= style(:text, scheme:) %>">
|
8
|
+
<p id="<%= @header_id %>" class="ariadne:text-sm ariadne:font-semibold" data-<%= Ariadne::UI::Banner::Component.stimulus_name %>-target="title"><%= title %></p>
|
9
|
+
<p class="ariadne:mt-1 ariadne:text-sm" data-<%= Ariadne::UI::Banner::Component.stimulus_name %>-target="message"><%= content %></p>
|
10
10
|
</div>
|
11
11
|
<% if action %>
|
12
|
-
<div class="ariadne
|
12
|
+
<div class="ariadne:flex">
|
13
13
|
<%= action %>
|
14
14
|
</div>
|
15
15
|
<% end %>
|
16
|
-
<div class="ariadne
|
16
|
+
<div class="ariadne:ml-4 ariadne:flex ariadne:shrink-0 ">
|
17
17
|
<% if @dismissible %>
|
18
18
|
<%= render Ariadne::UI::Button::Component.new(scheme: :nude, html_attrs: { class: style(:dismissable, scheme:), aria: { label: dismiss_label }, data: { action: "click->#{stimulus_name}#dismiss" } }).as_icon(icon: "x-mark", variant: :outline) %>
|
19
19
|
<% end %>
|