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 +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +6 -10
- data/lib/bh/form_builder/controls.rb +15 -2
- data/lib/bh/version.rb +1 -1
- data/package.json +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1cd77c71793dce878451ae631e1072b5edb1b8cf711e6905eeec3990f3fb359a
|
|
4
|
+
data.tar.gz: 5c156dd6204dde82cd2fc5cc1f1f0de8303aafb9b852d8bc1598d02326b5e791
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
24
|
-
gem 'bh', '~> 6.8.0'
|
|
23
|
+
gem 'bh', '~> 6.9.0'
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
`~> 6.
|
|
28
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
63
|
-
inside = @template.safe_join [
|
|
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
data/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bh6",
|
|
3
|
-
"version": "6.
|
|
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",
|