ndr_ui 5.0.0 → 5.0.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac1513f28fb442cd411ed3448be7429df4e1b31257f9f824582f7e7dade4a792
|
4
|
+
data.tar.gz: 94183bcd72c12668f441de2c11ad9c94ae3821a597d743888abb6b5ccec14210
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb20871cec4626f5ec59384fdb698d284f041064ae4e5d49e28bacf3e1f465ff459ace458a3f28f575fde366e063b42bcdc40534e6168bf1df393f8b50a2b69a
|
7
|
+
data.tar.gz: 2b40d49fb9d537f91dcdada361515988431a0565bb44512eff1df38a49e193d3ced8026ffa13fc31e74d9f2316114f280a32e8d335303778600025166919f026
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,15 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
* no unreleased changes *
|
3
3
|
|
4
|
+
## 5.0.1 / 2025-02-03
|
5
|
+
### Fixed
|
6
|
+
* fix cancel modal button
|
7
|
+
* re-introdce `btn-default` style
|
8
|
+
* fix `bootstrap_tab_nav_tag` helper method with required classes
|
9
|
+
* allow more padding at the end for `bootstrap_list_badge_and_link_to`
|
10
|
+
* fix offset class name in line with Bootstrap 5 upgrade
|
11
|
+
* fix `bootstrap_alert_tag` style with close button option
|
12
|
+
|
4
13
|
## 5.0.0 / 2025-01-24
|
5
14
|
### Changed
|
6
15
|
* Support Bootstrap to v5.3.3
|
@@ -218,7 +218,7 @@ module NdrUi
|
|
218
218
|
end
|
219
219
|
|
220
220
|
def bootstrap_modal_button(label)
|
221
|
-
button_tag(label, class: 'btn btn-default', 'data-bs-dismiss': 'modal')
|
221
|
+
button_tag(label, type: 'button', class: 'btn btn-default', 'data-bs-dismiss': 'modal')
|
222
222
|
end
|
223
223
|
|
224
224
|
private
|
@@ -51,8 +51,8 @@ module NdrUi
|
|
51
51
|
# <%= bootstrap_alert_tag(:info) do %>
|
52
52
|
# Check it out!!
|
53
53
|
# <% end %>
|
54
|
-
# # => <div class="alert alert-info"
|
55
|
-
#
|
54
|
+
# # => <div class="alert alert-info">Check it out!!
|
55
|
+
# <button type="button" class="btn-close" data-bs-dismiss="alert"></button></div>
|
56
56
|
#
|
57
57
|
# Ids for css and/or javascript are easy to produce:
|
58
58
|
#
|
@@ -79,7 +79,7 @@ module NdrUi
|
|
79
79
|
options['class'] = classes.join(' ')
|
80
80
|
|
81
81
|
if options.delete('dismissible')
|
82
|
-
message = button_tag('', type: 'button', class: 'btn-close', 'data-bs-dismiss': 'alert')
|
82
|
+
message = message.html_safe + button_tag('', type: 'button', class: 'btn-close', 'data-bs-dismiss': 'alert')
|
83
83
|
end
|
84
84
|
content_tag(:div, message, options)
|
85
85
|
end
|
@@ -203,16 +203,18 @@ module NdrUi
|
|
203
203
|
# ==== Examples
|
204
204
|
#
|
205
205
|
# <%= bootstrap_tab_nav_tag("Fruits", "#fruits", true) %>
|
206
|
-
# # => <li class="
|
206
|
+
# # => <li class="nav-item"><a class="nav-link active" href="#fruits" data-bs-toggle="tab">Fruits</a></li>
|
207
207
|
def bootstrap_tab_nav_tag(title, linkto, active = false)
|
208
208
|
content_tag('li',
|
209
|
-
link_to(title, linkto, 'data-bs-toggle': 'tab'),
|
210
|
-
|
209
|
+
link_to(title, linkto, 'data-bs-toggle': 'tab', class: "nav-link#{active ? ' active' : ''}"),
|
210
|
+
class: 'nav-item')
|
211
211
|
end
|
212
212
|
|
213
213
|
# Convenience wrapper for a bootstrap_list_link_to with badge
|
214
214
|
def bootstrap_list_badge_and_link_to(type, count, name, path)
|
215
|
-
html = content_tag(:div, bootstrap_badge_tag(type, count), class: 'float-end') +
|
215
|
+
html = content_tag(:div, bootstrap_badge_tag(type, count), class: 'float-end') +
|
216
|
+
content_tag(:div, name, class: 'pe-5')
|
217
|
+
|
216
218
|
bootstrap_list_link_to(html, path)
|
217
219
|
end
|
218
220
|
|
@@ -306,7 +308,7 @@ module NdrUi
|
|
306
308
|
# <%= button_control_group("Apples", class: "some_class") %>
|
307
309
|
# # =>
|
308
310
|
# <div class="form-group">
|
309
|
-
# <div class="col-sm-9
|
311
|
+
# <div class="col-sm-9 offset-sm-3">
|
310
312
|
# <div class="some_class">Apples</div>
|
311
313
|
# </div>
|
312
314
|
# </div>
|
@@ -386,7 +388,7 @@ module NdrUi
|
|
386
388
|
#
|
387
389
|
def bootstrap_horizontal_form_group(label = nil, ratio = [2, 10], &block)
|
388
390
|
l, r = ratio[0..1].map(&:to_i)
|
389
|
-
offset = label.nil? ? "
|
391
|
+
offset = label.nil? ? " offset-sm-#{l}" : ''
|
390
392
|
|
391
393
|
# Main content:
|
392
394
|
content = content_tag(:div, class: "col-sm-#{r}" + offset, &block)
|
data/lib/ndr_ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ndr_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- NDR Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap
|