dialtone_rails 0.1.0 → 0.2.0

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: 79eb721d3fcb6710c389165928dbd3a79c663955fb80e94820e95844f503f5c0
4
- data.tar.gz: ab6ad1cd95a740cb5d9a46eff88e0306a820ca9102a43375f9efbebf36d724ea
3
+ metadata.gz: 6fadfd1b0e14f6e619a597da3f8455c318269999a0e4ce32446e9a4f685da8e1
4
+ data.tar.gz: a0e1c2e7d8ca71e932f9d74a5fff2de6d0b42df11e584a0056fe35cded05b45a
5
5
  SHA512:
6
- metadata.gz: fafd6fb010948ed5e6f192a06a8ad905a852ae1ebae44241f76843fc501e50ba5a5a77f97ec31eed391ae121cc8652bc0962dae3d16051ead21fc4798e569885
7
- data.tar.gz: 4926f5f13543c29c316b432d67b8dcd354af1631a7e5ee6b69cd36e1f4a7fc2083ec5bd8312f1cb4593833a9083c65719687053428168e376e15f6c09eb76b49
6
+ metadata.gz: ab18cf9518bcc1417f31d3b55e74db4d9f8551c62d62291fcc64fefd7a3988b288c3040ff913349ce2e2723af69553533a22a49382c58bbb45b7192694829728
7
+ data.tar.gz: 69d6635a104b5d9e6ad6009e71409381fd6b6da8dc2032797e77878f01858c22dbe628f8e5a770960976d17d055b6432daf08314a55e0049ed80c3504013653f
data/README.md CHANGED
@@ -6,7 +6,7 @@ for international phone fields with a country picker and number formatting.
6
6
  The Ruby gem is **`dialtone_rails`**; its companion npm package is **`dialtone-rails`**.
7
7
 
8
8
  ```erb
9
- <%= form.intl_tel_field :phone_number,
9
+ <%= form.dialtone_field :phone_number,
10
10
  initial_country: "ba",
11
11
  class_names: {
12
12
  input: "input",
@@ -58,7 +58,7 @@ Use it with standard Rails forms and labels:
58
58
  ```erb
59
59
  <%= form_with model: @contact do |form| %>
60
60
  <%= form.label :phone_number %>
61
- <%= form.intl_tel_field :phone_number,
61
+ <%= form.dialtone_field :phone_number,
62
62
  initial_country: "ba",
63
63
  required: true,
64
64
  autocomplete: "tel",
@@ -81,7 +81,7 @@ Use it with standard Rails forms and labels:
81
81
  For example:
82
82
 
83
83
  ```erb
84
- <%= form.intl_tel_field :phone_number,
84
+ <%= form.dialtone_field :phone_number,
85
85
  initial_country: "ba",
86
86
  options: {
87
87
  only_countries: %w[ba hr rs me],
@@ -1,6 +1,6 @@
1
1
  module DialtoneRails
2
2
  module FormBuilder
3
- def intl_tel_field(method, initial_country: "", class_names: {}, options: {}, **html_options)
3
+ def dialtone_field(method, initial_country: "", class_names: {}, options: {}, **html_options)
4
4
  classes = class_names.transform_keys { |key| key.to_s.camelize(:lower) }
5
5
  configuration = options.deep_transform_keys { |key| key.to_s.camelize(:lower) }
6
6
  .merge("initialCountry" => initial_country.to_s.downcase, "classNames" => classes)
@@ -1,3 +1,3 @@
1
1
  module DialtoneRails
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dialtone_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harun