app_rail-steps 0.2.16 → 0.2.17

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: d500e8081e8600e20549d14ebcbf13e4fa4d1fc838b909d07c727eb0c29e388a
4
- data.tar.gz: a7b9bc43c513fdb60505bf3da67d124e715fef139d1ecaa0ae82f132cf1e31fb
3
+ metadata.gz: 73b5a80452096f2cd1b120557e985c6a164b6da06d3424e05c6c608a3e28536c
4
+ data.tar.gz: 4bbebd9fe3a3b4c1d31323b54f419fa2713f0de7b3b334497c7cb280250a861b
5
5
  SHA512:
6
- metadata.gz: 7ca1c468461b68616e91e52d934cb2b2a4eec8a907f9e2d4a2064cb26c59029ff01ad0616f6bb468219878a9fc53151f2a260fa025b00174b693f83c0b087cc8
7
- data.tar.gz: 07b91e1f0595504db72e615ef0976d79de63dcf5c4fa7e9f6b4e995b891934443fa7866dd8405f725caa83fda173ef13769a096a9ddb2daa7ea5af623fd38f08
6
+ metadata.gz: 2f8abdd77ed00ad00fa4c38698b7ff7b54aec99a707b7d141ef0717fe9818d3c95e3d5a7a70f6dabf2d263211942117fdfd9f7f76f595176ec66dd9c611615bc
7
+ data.tar.gz: 2218b1c391cca6bad40d08d3a03bfb6156ef13755a236ccebc043fd7ee9a67e3b7fb9ade70fcb41fb159ff2b4e260dd20fee96f7da0a2cde9ce339a1032e0603
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-steps (0.2.15)
4
+ app_rail-steps (0.2.17)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,12 +6,16 @@ module AppRail
6
6
  module Stack
7
7
  CONTENT_MODE_OPTIONS = %i[scale_aspect_fill scale_aspect_fit].freeze
8
8
  IMAGE_STYLE_OPTIONS = %i[full_width profile].freeze
9
+ TEXT_STYLE_OPTIONS = %i[left large_center].freeze
9
10
  BUTTON_STYLES = %i[primary outline danger].freeze
10
11
  ON_SUCCESS_OPTIONS = %i[none reload backward forward].freeze
11
12
 
12
- def ar_core_stack_text(text:, label: nil, sf_symbol_name: nil, material_icon_name: nil)
13
+ def ar_core_stack_text(text:, text_style: :left, label: nil, sf_symbol_name: nil, material_icon_name: nil)
14
+ validate_text_style!(text_style)
15
+
13
16
  {
14
17
  type: :text,
18
+ textStyle: camelcase_converter(text_style.to_s, first_letter: :lower),
15
19
  label: label,
16
20
  text: text.to_s,
17
21
  sfSymbolName: sf_symbol_name,
@@ -58,7 +62,7 @@ module AppRail
58
62
  materialIconName: material_icon_name }.compact
59
63
  end
60
64
 
61
- def ar_core_stack_delete_button(url:, label: "Delete", method: :delete, style: :danger, on_success: :backward, confirm_title: "Delete?", confirm_text: "Are you sure?", sf_symbol_name: :trash, material_icon_name: :delete)
65
+ def ar_core_stack_delete_button(url:, label: "Delete", method: :delete, style: :danger, on_success: :backward, confirm_title: "Delete", confirm_text: "Are you sure?", sf_symbol_name: :trash, material_icon_name: :delete)
62
66
  ar_core_stack_validate_on_success!(on_success)
63
67
  ar_core_stack_validate_button_style!(style)
64
68
 
@@ -122,6 +126,10 @@ module AppRail
122
126
  raise "Unknown image_style" unless IMAGE_STYLE_OPTIONS.include?(image_style)
123
127
  end
124
128
 
129
+ def validate_text_style!(text_style)
130
+ raise "Unknown text_style" unless TEXT_STYLE_OPTIONS.include?(text_style)
131
+ end
132
+
125
133
  def ar_core_stack_validate_on_success!(on_success)
126
134
  raise "Unknown on_success action" unless ON_SUCCESS_OPTIONS.include?(on_success)
127
135
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Steps
5
- VERSION = "0.2.16"
5
+ VERSION = "0.2.17"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_rail-steps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.16
4
+ version: 0.2.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-05 00:00:00.000000000 Z
11
+ date: 2022-10-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: