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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7885ed7b46200108d61ff50ce1aa5438b39b8ddd26cb8663448ca64813be9bd5
4
- data.tar.gz: 56587dba2792955e8c125ab8a62980fbeec842266430a6b0429ac1860c60c65f
3
+ metadata.gz: 8e915c4333eb5bdd654d25793bb06ba613fa030324dfabb9c57a7f755e2a0e91
4
+ data.tar.gz: 4d4a29c7d6c3c4564cd8d0b6bc50e5ddd53b60838ba1dbd263cce0548f7312b6
5
5
  SHA512:
6
- metadata.gz: e68940bcedea40093a238b976f115368e029ed67a4799dadb92709a2d5ca49a198c243df0d1ccfd99759d93f4c37036f4b1e45de9a9be0b4188cb35490e966f5
7
- data.tar.gz: 0ef035e0d4d17ea01bb1aaf9ba1e5e55fa309ff172aed3377df6236bee242945e5c54ef3042a1314e4d8a389fd4d71b94c9a49e3a8fb1b1f4dbab71317b1d1b7
6
+ metadata.gz: 5fb5f8f3900fb2ce956f4ce64d2ce0c437151b48856a998f1b2c90c00c4bcaa244d92c2eda507065e3d32f2de3dbdff868db3ea6e84a15efc2facf3cd0b4b8e9
7
+ data.tar.gz: 6d3d214e3091876e7efbb324a0f46c1abedd0e275c64ca73fa57d3729b0044644c0684f349896aa2e7977e7ae4313f6292b6cf6d32866c8de90068af7ccd1849
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.42.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 0099a22: Add back default InputComponent styles to text_area fields.
8
+
3
9
  ## 0.42.1
4
10
 
5
11
  ### Patch Changes
@@ -250,7 +250,7 @@ module Anchor
250
250
  super(
251
251
  attribute,
252
252
  options.merge(
253
- class: "#{Anchor::InputComponent::INPUT_CLASSES} h-[120px]",
253
+ class: Anchor::InputComponent::INPUT_CLASSES + ["h-[120px]"],
254
254
  data: { testid: "text-area-#{attribute.to_s.dasherize}" }
255
255
  )
256
256
  )
@@ -1,5 +1,5 @@
1
1
  module Anchor
2
2
  module ViewComponents
3
- VERSION = "0.42.1".freeze
3
+ VERSION = "0.42.2".freeze
4
4
  end
5
5
  end
@@ -3,4 +3,5 @@
3
3
  <% banner.with_body do %>
4
4
  <%= anchor_text(body) %>
5
5
  <% end %>
6
+ <% banner.with_button(button_text) %>
6
7
  <% end %>
@@ -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
- def link
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.with_item(href: "").with_content("Breadcrumb 3") %>
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.with_item(href: "").with_content("Breadcrumb 3") %>
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.with_item(href: "").with_content("Breadcrumb 2") %>
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.with_item(href: "").with_content("Breadcrumb 2") %>
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.with_item(href: "").with_content("Breadcrumb 3") %>
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.with_item(href: "").with_content("Breadcrumb 2") %>
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.1
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-22 00:00:00.000000000 Z
11
+ date: 2023-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails