anchor_view_components 0.42.1 → 0.42.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/helpers/anchor/form_builder.rb +1 -1
- data/lib/anchor/view_components/version.rb +1 -1
- data/previews/anchor/banner_component_preview/playground.html.erb +1 -0
- data/previews/anchor/banner_component_preview.rb +3 -0
- data/previews/anchor/button_component_preview.rb +17 -1
- data/previews/anchor/page_component_preview/kitchen_sink.html.erb +1 -1
- data/previews/anchor/page_component_preview/with_breadcrumbs.html.erb +1 -1
- data/previews/anchor/page_component_preview/with_cancel_and_save_buttons.html.erb +1 -1
- data/previews/anchor/page_component_preview/with_done_button.html.erb +1 -1
- data/previews/anchor/page_component_preview/with_page_header_custom_content.html.erb +1 -1
- data/previews/anchor/page_component_preview/with_search.html.erb +1 -1
- data/previews/forms/default.html.erb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e915c4333eb5bdd654d25793bb06ba613fa030324dfabb9c57a7f755e2a0e91
|
4
|
+
data.tar.gz: 4d4a29c7d6c3c4564cd8d0b6bc50e5ddd53b60838ba1dbd263cce0548f7312b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5fb5f8f3900fb2ce956f4ce64d2ce0c437151b48856a998f1b2c90c00c4bcaa244d92c2eda507065e3d32f2de3dbdff868db3ea6e84a15efc2facf3cd0b4b8e9
|
7
|
+
data.tar.gz: 6d3d214e3091876e7efbb324a0f46c1abedd0e275c64ca73fa57d3729b0044644c0684f349896aa2e7977e7ae4313f6292b6cf6d32866c8de90068af7ccd1849
|
data/CHANGELOG.md
CHANGED
@@ -250,7 +250,7 @@ module Anchor
|
|
250
250
|
super(
|
251
251
|
attribute,
|
252
252
|
options.merge(
|
253
|
-
class:
|
253
|
+
class: Anchor::InputComponent::INPUT_CLASSES + ["h-[120px]"],
|
254
254
|
data: { testid: "text-area-#{attribute.to_s.dasherize}" }
|
255
255
|
)
|
256
256
|
)
|
@@ -2,16 +2,19 @@ module Anchor
|
|
2
2
|
class BannerComponentPreview < Preview
|
3
3
|
# @param title text
|
4
4
|
# @param body text
|
5
|
+
# @param button_text text
|
5
6
|
# @param variant select {{ Anchor::BannerComponent::VARIANT_OPTIONS }}
|
6
7
|
def playground(
|
7
8
|
title: "This is a Banner",
|
8
9
|
body: "Body text.",
|
10
|
+
button_text: "Action",
|
9
11
|
variant: Anchor::BannerComponent::VARIANT_DEFAULT
|
10
12
|
)
|
11
13
|
render_with_template(
|
12
14
|
locals: {
|
13
15
|
title:,
|
14
16
|
body:,
|
17
|
+
button_text:,
|
15
18
|
variant:,
|
16
19
|
}
|
17
20
|
)
|
@@ -117,9 +117,25 @@ module Anchor
|
|
117
117
|
end
|
118
118
|
end
|
119
119
|
|
120
|
+
def small_with_starting_icon
|
121
|
+
anchor_button(size: :small) do |c|
|
122
|
+
c.with_starting_icon(icon: "nav-arrow-left")
|
123
|
+
"Button"
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
def small_with_ending_icon
|
128
|
+
anchor_button(size: :small) do |c|
|
129
|
+
c.with_ending_icon(icon: "nav-arrow-right")
|
130
|
+
"Button"
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
120
134
|
# @!endgroup
|
121
135
|
|
122
|
-
|
136
|
+
# Buttons render as a `<button>` element by default, but can be rendered as
|
137
|
+
# an anchor (`<a>`) element by passing an `href`.
|
138
|
+
def as_an_anchor
|
123
139
|
anchor_button("Button", href: "#")
|
124
140
|
end
|
125
141
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% header.with_breadcrumbs do |breadcrumbs| %>
|
4
4
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 1") %>
|
5
5
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 2") %>
|
6
|
-
<% breadcrumbs.
|
6
|
+
<% breadcrumbs.with_item_content("Breadcrumb 3") %>
|
7
7
|
<% end %>
|
8
8
|
<% header.with_title("Page title") %>
|
9
9
|
<% header.with_subtitle("Optional subtitle") %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% header.with_breadcrumbs do |breadcrumbs| %>
|
4
4
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 1") %>
|
5
5
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 2") %>
|
6
|
-
<% breadcrumbs.
|
6
|
+
<% breadcrumbs.with_item_content("Breadcrumb 3") %>
|
7
7
|
<% end %>
|
8
8
|
<% header.with_title("Page title") %>
|
9
9
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% page.with_header do |header| %>
|
3
3
|
<% header.with_breadcrumbs do |breadcrumbs| %>
|
4
4
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 1") %>
|
5
|
-
<% breadcrumbs.
|
5
|
+
<% breadcrumbs.with_item_content("Breadcrumb 2") %>
|
6
6
|
<% end %>
|
7
7
|
<% header.with_title("Page title") %>
|
8
8
|
<% end %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% page.with_header do |header| %>
|
3
3
|
<% header.with_breadcrumbs do |breadcrumbs| %>
|
4
4
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 1") %>
|
5
|
-
<% breadcrumbs.
|
5
|
+
<% breadcrumbs.with_item_content("Breadcrumb 2") %>
|
6
6
|
<% end %>
|
7
7
|
<% header.with_title("Page title") %>
|
8
8
|
<% end %>
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<% header.with_breadcrumbs do |breadcrumbs| %>
|
4
4
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 1") %>
|
5
5
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 2") %>
|
6
|
-
<% breadcrumbs.
|
6
|
+
<% breadcrumbs.with_item_content("Breadcrumb 3") %>
|
7
7
|
<% end %>
|
8
8
|
<% header.with_tab_bar(label: "Donor tabs") do |tab_bar| %>
|
9
9
|
<% 5.times.each_with_index do |i| %>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<% page.with_header do |header| %>
|
3
3
|
<% header.with_breadcrumbs do |breadcrumbs| %>
|
4
4
|
<% breadcrumbs.with_item(href: "#").with_content("Breadcrumb 1") %>
|
5
|
-
<% breadcrumbs.
|
5
|
+
<% breadcrumbs.with_item_content("Breadcrumb 2") %>
|
6
6
|
<% end %>
|
7
7
|
<% header.with_title("Page title") %>
|
8
8
|
<% header.with_search do %>
|
@@ -84,4 +84,10 @@
|
|
84
84
|
<%= form.label :months %>
|
85
85
|
<%= form.autocomplete_field :months, src: months_path %>
|
86
86
|
<% end %>
|
87
|
+
|
88
|
+
<%= tag.div do %>
|
89
|
+
<%= form.label :comments %>
|
90
|
+
<%= form.text_area :comments %>
|
91
|
+
<%= form.error_message_for :comments %>
|
92
|
+
<% end %>
|
87
93
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anchor_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.42.
|
4
|
+
version: 0.42.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Buoy Software
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|