keystone_ui 0.15.1 → 0.16.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: 60fbc4a896b71babee643443b4583435ffa85d0b1be67324afdc901169807f68
4
- data.tar.gz: e83753c421f5e7095b552fc39776c982c823273665bd10dee5f5a769df39c204
3
+ metadata.gz: efab888e379841270a79e3d2410df8c4905eb0270f5e13091b2f7db40d96f0fc
4
+ data.tar.gz: f5487f7756e4771a754d7bba15ccb009519ac0af076c4dc04dd28015586f9672
5
5
  SHA512:
6
- metadata.gz: 56fb8e5421b4cb2e9669af2dec0a452ee7c58f316b10f63ce6ea0096ecfd347fbaf01708613a23a00365c9d0e88d7576fbd46c83e13509d5ff9f823f22e9c688
7
- data.tar.gz: 70375887467d685ddf82dc96074ec99d3ce43694ad53bf022d315083478e9f21238099528924e133d9bdb425410d8727a8873c8db8119531843fa39a3eb97106
6
+ metadata.gz: 4f0c8f0433e90eb500c28eb36201b69d141968a6c482db81e9ccb4fd3e0cf0e81ed202d8b6f8b1dae6cd2e8f325b1d92674aa1464c9029470a4d26082e92fd20
7
+ data.tar.gz: 4e5c1a2317719013e90221c344248aecb5b88649722e968806af6b7d7001b994a5bf9cc9a6f05d16cc75384c66a04ff49b4702f21d20696d8516d6f65b354058
@@ -11,7 +11,7 @@ module Keystone
11
11
  CHECKBOX_CLASSES = "ks-checkbox"
12
12
  CHECKBOX_WRAPPER_CLASSES = "flex items-center gap-2"
13
13
 
14
- def initialize(attribute:, label: nil, type: :text, required: false, hint: nil, placeholder: nil, min: nil, max: nil, step: nil, value: nil, options: [], errors: [], include_blank: nil)
14
+ def initialize(attribute:, label: nil, type: :text, required: false, hint: nil, placeholder: nil, min: nil, max: nil, step: nil, value: nil, options: [], errors: [], include_blank: nil, disabled: false)
15
15
  @attribute = attribute
16
16
  @label = label
17
17
  @type = type
@@ -25,6 +25,7 @@ module Keystone
25
25
  @options = options
26
26
  @errors = Array(errors)
27
27
  @include_blank = include_blank.to_s
28
+ @disabled = disabled
28
29
  end
29
30
 
30
31
  def label_text
@@ -81,6 +82,7 @@ module Keystone
81
82
  options[:min] = @min unless @min.nil?
82
83
  options[:max] = @max unless @max.nil?
83
84
  options[:step] = @step unless @step.nil?
85
+ options[:disabled] = true if @disabled
84
86
  options
85
87
  end
86
88
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module KeystoneUi
4
- VERSION = "0.15.1"
4
+ VERSION = "0.16.0"
5
5
  end
@@ -102,7 +102,7 @@ outer element. See Conventions before using it.
102
102
  The `<form>` wrapper. `method:` may be `:patch`/`:put`/`:delete` and is
103
103
  translated for Rails. Set `multipart: true` when the form contains a file
104
104
  upload.
105
- - `ui_form_field(attribute:, label: nil, type: :text, required: false, hint: nil, placeholder: nil, min: nil, max: nil, step: nil, value: nil, options: [], errors: [], include_blank: nil)`
105
+ - `ui_form_field(attribute:, label: nil, type: :text, required: false, hint: nil, placeholder: nil, min: nil, max: nil, step: nil, value: nil, options: [], errors: [], include_blank: nil, disabled: false)`
106
106
  — a labeled field with hint and error text. This is the default way to render
107
107
  an input. `type:` `:text` `:number` `:email` `:password` `:date` `:textarea`
108
108
  `:checkbox` `:select`. `attribute:` is used verbatim as the input's `name`, so
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keystone_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Schneider