baldur 0.2.3 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 78855406a91b2417ca33ff60e13c9b7c11f14b8304fd345dda2712498e92ea1f
4
- data.tar.gz: e4271f4e6e56175c8c537ecbd039f28c86e9b402fe3dfaa48f6b15dcf91e1c48
3
+ metadata.gz: ae0f6c5a19b35179f7ad5b086be6579586be84c99d58bb9337ec0136fa869934
4
+ data.tar.gz: 58f7a99208005b98c8cdcc4917c01541b3bf0cdf7a1e091419650d2ae8e5947c
5
5
  SHA512:
6
- metadata.gz: 79de8f945a7e8abc81fb08ec45231be9d844c7ba4d6351365db3230e0a71b1e46e4e04b64d9df812d120fcd3a54f25f3db6be642a528eda987b6a90acd59251a
7
- data.tar.gz: bf09d3939dce71f98dd77f68d3351ff4cf99ebc6daaa17f1dee2ecced26bd5f862cb2744a961af1c5cbc1924025356a9e6f2a51ac2a1fc475161315e1ca180cb
6
+ metadata.gz: fdf6563345728f209401476fbd221ddbcdd8bc6e0d97afbcb9593165944beefc9024914f2f3437ed127eeb41b76269baa22b86e4ba8262fea976cad070464ebd
7
+ data.tar.gz: c9c4024b45bac97751c24b87770321ef2ad58f79720864a89334f91e9821261653048dcb5d183d00b5213fcfb281d78332da2eb12d57b5ebbfbd8e8e2f654bd9
@@ -2,10 +2,4 @@
2
2
  .confirmation-modal__input-wrapper {
3
3
  margin-top: var(--space-4);
4
4
  }
5
-
6
- [data-confirmation] .text-field__control:focus {
7
- border-color: var(--color-primary);
8
- outline: none;
9
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-primary) 24%, transparent);
10
- }
11
5
  }
@@ -68,19 +68,19 @@
68
68
  <% end %>
69
69
  <% if has_type_to_confirm %>
70
70
  <div class="mt-4 space-y-2">
71
- <% if confirm_input_label.present? %>
72
- <label for="<%= confirm_input_id %>" class="field__label text-sm font-medium text-[color:var(--color-on-surface)]"><%= confirm_input_label %></label>
73
- <% end %>
74
- <div class="text-field__input">
75
- <input id="<%= confirm_input_id %>"
76
- type="text"
77
- autocomplete="off"
78
- class="text-field__control"
79
- data-confirmation-target="input"
80
- data-action="input->confirmation#validate"
81
- <%= confirm_input_placeholder.present? ? "placeholder=\"#{confirm_input_placeholder}\"".html_safe : "" %>
82
- data-modal-autofocus="true" />
83
- </div>
71
+ <%= ui_text_field_tag(nil, nil,
72
+ label: confirm_input_label,
73
+ placeholder: confirm_input_placeholder,
74
+ input_options: {
75
+ id: confirm_input_id,
76
+ autocomplete: "off",
77
+ data: {
78
+ confirmation_target: "input",
79
+ action: "input->confirmation#validate",
80
+ modal_autofocus: true
81
+ }
82
+ }
83
+ ) %>
84
84
  <% if confirm_input_hint.present? %>
85
85
  <p class="text-sm text-muted"><%= confirm_input_hint %></p>
86
86
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module Baldur
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '0.2.4'.freeze
3
3
  end
@@ -158,6 +158,8 @@ class BaldurConfirmationModalHelperTest < Minitest::Test
158
158
  assert_includes html, 'This permanently removes all data.'
159
159
  assert_includes html, 'Flush All Data'
160
160
  assert_includes html, 'Confirm'
161
+ assert_includes html, 'field text-field'
162
+ assert_includes html, 'field__label'
161
163
  end
162
164
 
163
165
  def test_ui_confirmation_modal_type_to_confirm_disables_submit
@@ -215,6 +217,7 @@ class BaldurConfirmationModalHelperTest < Minitest::Test
215
217
 
216
218
  assert_includes html, 'data-controller="modal"'
217
219
  refute_includes html, 'confirmation'
220
+ refute_includes html, 'field text-field'
218
221
  end
219
222
 
220
223
  def test_ui_confirmation_modal_custom_labels
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baldur
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Varun Murkar