bh 6.8.0 → 6.9.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: c459a4f1b4c83f76208288d0fcaa877ff4e90ff22e176db261622070dc7e8baf
4
- data.tar.gz: c91ff74b63a56449dda82736e3a930596d8c9db1c61b9174dfa856cf7f7d9173
3
+ metadata.gz: 1cd77c71793dce878451ae631e1072b5edb1b8cf711e6905eeec3990f3fb359a
4
+ data.tar.gz: 5c156dd6204dde82cd2fc5cc1f1f0de8303aafb9b852d8bc1598d02326b5e791
5
5
  SHA512:
6
- metadata.gz: 44cc5e7e1672de1a525d7ea28f710210129750fcc9d1652eb14ba76879e375f547a5d88fb8b36783d02b11ed5c20812b8835bc11f68be0fc410509cf582ac09b
7
- data.tar.gz: 38e4622db91c415c7aabb1c8e64bf8c16227e2a44c6ecc08a50186d5ef513db604fe8819044cd44f97c8ab9fcfd5153247d9a33ab5e64df09675268e3366b58b
6
+ metadata.gz: 9bb7c8f7bdeab02553154c22630b40aebcdcdffd69c3c8b7353e429e4ae8e0b241bf2cd061cdc2782df1f1292fd5fbece8f5be196494b47556325967b4671e57
7
+ data.tar.gz: 108ebfbee3a538d02710cd5b80ab22055714ba0393efa1a2abaf57a23d46bd08dc9cfbc674eaab5f4f8f2dd9b7eea70f43435557f1b8527b4d03a1b3e8da789a
data/CHANGELOG.md CHANGED
@@ -8,6 +8,14 @@ For more information about changelogs, check
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## 6.9.0 - 2026-09-20
12
+
13
+ * [FEATURE] A box can say what ticking it means
14
+
15
+ `check` takes a `description:`, which is the line Bootstrap draws under the words beside
16
+ a box: `form.check :insured, 'Insured', description: 'Uninsured providers are only
17
+ offered preferred work.'` Given none, the markup is what it was.
18
+
11
19
  ## 6.8.0 - 2026-09-19
12
20
 
13
21
  * [FEATURE] A field a browser keeps an answer for says which
data/README.md CHANGED
@@ -20,18 +20,13 @@ gem install bh
20
20
  ```
21
21
 
22
22
  ```ruby
23
- # Gemfile
24
- gem 'bh', '~> 6.8.0'
23
+ gem 'bh', '~> 6.9.0'
25
24
  ```
26
25
 
27
- `~> 6.8.0` stops short of `6.9`, and that is the pin to hold: **until this line settles it
28
- breaks on a minor, not on a major.** Rails 8.1 and Ruby 3.2 are the minimum.
26
+ `~> 6.9.0` stops short of `6.10`, which is the pin to hold while this line still breaks on a
27
+ minor rather than on a major.
29
28
 
30
- 6.2.0 breaks everything before it and keeps its major anyway. 6.0 through 6.1.4 were an alpha
31
- in everything but the number — Bootstrap 3 wrappers with a Bootstrap 6 stopgap bolted on, cut
32
- while Bootstrap 6 was itself pre-release — so there was no settled API to break. Those numbers
33
- are taken and cannot be withdrawn, RubyGems keeping anything published over thirty days ago, so
34
- this release steps over them.
29
+ ## The stylesheet and the script
35
30
 
36
31
  With the gem in the bundle an app serves `/bh/css/bh.css` and `/bh/js/bh.js` itself, at the
37
32
  prefix its engine is mounted at. A layout links both:
@@ -81,6 +76,7 @@ end
81
76
  | `fieldset` `label` `submit` `button` | the form's furniture, with the pill Bootstrap draws |
82
77
  | every `*_field`, `text_area`, `select`, `check` | dressed at one size, so a view says which kind and nothing about how it looks |
83
78
  | `phone_field` | a North American number, shaped `555-555-5555` as it is typed |
79
+ | `price_field` `percentage_field` | money and a share of a hundred, typed into Bootstrap's adorned control |
84
80
  | `pin_field` | one real field drawn as six slots, offered by the phone from the text that brought it |
85
81
  | `combobox` | a `<select>` drawn as a searchable menu, still the one thing the form submits |
86
82
  | `dialog` | a link and the `<dialog>` it opens, sharing an id made from the link's own words |
@@ -111,4 +107,4 @@ rails s
111
107
  - [API reference](https://rubydoc.info/gems/bh) — built from what RubyGems holds
112
108
  - [CHANGELOG](CHANGELOG.md) — what each release is, and which of the three it is
113
109
 
114
- MIT licensed. Drawn for [houseaccount](https://houseaccount.com/) by the Earl of Bubblehum.
110
+ MIT licensed.
@@ -58,12 +58,25 @@ module Bh
58
58
 
59
59
  # A box and the words beside it, which is the one place words sit after a control rather
60
60
  # than over it -- so they are not the label a field wears, and are written here instead.
61
+ # A `description:` is the line under those words, for a box whose label is too short to
62
+ # say what ticking it means. Every other option is the box's.
61
63
  def check(method, text, options = {})
62
- words = @template.label_tag field_id(method), text
63
- inside = @template.safe_join [check_box(method, options), words]
64
+ box = check_box method, options.except(:description)
65
+ inside = @template.safe_join [box, checked_words(method, text, options[:description])]
64
66
 
65
67
  @template.tag.div inside, class: 'form-field'
66
68
  end
69
+
70
+ private
71
+
72
+ def checked_words(method, text, description)
73
+ words = @template.label_tag field_id(method), text
74
+ return words unless description
75
+
76
+ said = @template.tag.small description, class: 'form-text'
77
+
78
+ @template.tag.div @template.safe_join([words, said]), class: 'form-field-content'
79
+ end
67
80
  end
68
81
  end
69
82
  end
data/lib/bh/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Bh
2
2
  # Version of the gem, read by the gemspec and by hosts checking compatibility.
3
- VERSION = '6.8.0'
3
+ VERSION = '6.9.0'
4
4
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bh6",
3
- "version": "6.6.0",
3
+ "version": "6.8.0",
4
4
  "private": true,
5
5
  "description": "Bootstrap 6 in a Rails app: the form builder that dresses every field, the components Bootstrap ships behavior for and no markup, and the Stimulus controllers behind them.",
6
6
  "license": "MIT",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bh
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.0
4
+ version: 6.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob