ndr_ui 5.0.1 → 5.0.2
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 +5 -0
- data/app/assets/stylesheets/ndr_ui/index.scss +19 -3
- data/app/builders/ndr_ui/bootstrap/input_group_addons.rb +1 -1
- data/app/helpers/ndr_ui/bootstrap/modal_helper.rb +2 -2
- data/app/helpers/ndr_ui/bootstrap_helper.rb +2 -2
- data/lib/ndr_ui/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2fe83273bc89d89c52221125280a72d2e21d8d1a6b5a08a60f705a822ee4892
|
4
|
+
data.tar.gz: a7582a30f48f0b3b448f90f462adb12d66163ebf1fbefd5ca619c039130109b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 297e03b359f052b0945aefa379ebc60cf34aff58862c8623d2be1cd7c4888ce1a5b2d2964de0457e970c23d25956c8aa6349cc7207a9eb2ca1b34c30970400a4
|
7
|
+
data.tar.gz: 459e1b57cc9573c494c72fef667e0c7efc5b02217fc6f4a4f605d56f3eaccc5a34d50393d3a19df10c6e86b6bfcf16fd96993748c816d437632224539495fae2
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
* no unreleased changes *
|
3
3
|
|
4
|
+
## 5.0.2 / 2025-03-02
|
5
|
+
### Fixed
|
6
|
+
* add row class to horizontal form row (.form-group)
|
7
|
+
* add `has-validation` class to input fields with addons
|
8
|
+
|
4
9
|
## 5.0.1 / 2025-02-03
|
5
10
|
### Fixed
|
6
11
|
* fix cancel modal button
|
@@ -7,9 +7,9 @@ $bootstrap-icons-font-dir: ".";
|
|
7
7
|
// Fieldsets don't behave properly with Bootstrap in Firefox
|
8
8
|
// https://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-have-unremovable-min-width-min-content/17863685#17863685
|
9
9
|
@-moz-document url-prefix() {
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
fieldset {
|
11
|
+
display: table-cell;
|
12
|
+
}
|
13
13
|
}
|
14
14
|
|
15
15
|
// for input fields with input-addons, remove background and border when the form is readonly.
|
@@ -20,6 +20,22 @@ $bootstrap-icons-font-dir: ".";
|
|
20
20
|
}
|
21
21
|
}
|
22
22
|
|
23
|
+
// UI fix for .input-group in readonly mode
|
24
|
+
form .input-group {
|
25
|
+
// for input-addons in readonly mode, remove background and border
|
26
|
+
.form-control-plaintext + .input-group-text,
|
27
|
+
.input-group-text:has(+ .form-control-plaintext) {
|
28
|
+
background: none;
|
29
|
+
border:0;
|
30
|
+
}
|
31
|
+
|
32
|
+
// for readonly fields following or followed by input-addons, set auto width to display content in one line
|
33
|
+
.form-control-plaintext:has(+ .input-group-text),
|
34
|
+
.input-group-text + .form-control-plaintext {
|
35
|
+
width: auto;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
|
23
39
|
// Bootstrap don't have btn-default anymore
|
24
40
|
// however, we keep btn-default in codebase/helpers and set global default setting here.
|
25
41
|
.btn-default {
|
@@ -18,7 +18,7 @@ module NdrUi
|
|
18
18
|
div_content << text_field_without_inline_errors(method, options)
|
19
19
|
div_content << @template.content_tag(:span, append, class: 'input-group-text') if append.present?
|
20
20
|
|
21
|
-
@template.content_tag(:div, @template.safe_join(div_content), class: 'input-group')
|
21
|
+
@template.content_tag(:div, @template.safe_join(div_content), class: 'input-group has-validation')
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
@@ -227,8 +227,8 @@ module NdrUi
|
|
227
227
|
def bootstrap_modal_classes(options)
|
228
228
|
options = options.stringify_keys
|
229
229
|
|
230
|
-
classes = %w
|
231
|
-
classes << "modal-#{options['size']}" if MODAL_SIZES.include?(options['size'])
|
230
|
+
classes = %w[modal-dialog]
|
231
|
+
classes << "modal-#{options['size']}" if MODAL_SIZES.include?(options['size'].to_s)
|
232
232
|
classes.join(' ')
|
233
233
|
end
|
234
234
|
end
|
@@ -381,7 +381,7 @@ module NdrUi
|
|
381
381
|
# ==== Examples
|
382
382
|
# bootstrap_horizontal_form_group("The Label", [3, 9]) { 'This is the content' }
|
383
383
|
# # =>
|
384
|
-
# <div class="form-group">
|
384
|
+
# <div class="form-group row">
|
385
385
|
# <label class="col-sm-3 col-form-label">The Label</label>
|
386
386
|
# <div class="col-sm-9">This is the content</div>
|
387
387
|
# </div>
|
@@ -395,7 +395,7 @@ module NdrUi
|
|
395
395
|
# Prepend optional label:
|
396
396
|
content = content_tag(:label, label, class: "col-sm-#{l} col-form-label") + content unless label.nil?
|
397
397
|
|
398
|
-
content_tag(:div, content, class: 'form-group')
|
398
|
+
content_tag(:div, content, class: 'form-group row')
|
399
399
|
end
|
400
400
|
|
401
401
|
# This helper produces a pair of HTML dt, dd tags to display name and value pairs.
|
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.2
|
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-02
|
11
|
+
date: 2025-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bootstrap
|