sdr_view_components 0.1.2 → 0.1.4

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: 9a2b7362cc8e33e3efb9056117bdd8b3303cfa9df131f3af3d614b3afe8293d8
4
- data.tar.gz: 86178a05243b29b9a6a4bf6e0c4f085ac180f43fed956fecb287b6c81883c52e
3
+ metadata.gz: 4e3803526ec08ea8786418750aded1cefd281a20bbc9d9911fe8b684ffaceb25
4
+ data.tar.gz: 1db98361a27b37e781a0bb8a17e4e7e913ee22f455ff6b97aaacd115ea5292bc
5
5
  SHA512:
6
- metadata.gz: 99eeb9d90b6d7d469aaaa869faa48cc3fa3054c71b25bfefbb96b3eab53c5ae5a6c45c4b4dd79633f46afc4035f83493200b23252b07d6a3588976c1e7c05215
7
- data.tar.gz: 25611e8779d1992f4828a3a71a37307e3f4f202acc32d498e179d6eed0609604987b806fd681517574ebe3aa66498c3ac894b5762f751981d33b0acf3d522abb
6
+ metadata.gz: 7d2e42055690b2e650f841d791f09d122b879b8ccf040f7c25911e080ad91c9221e4c141f1c68720491c9dad77dc50308d3401f58dbe13796a6a3bfad0c32ba6
7
+ data.tar.gz: 35e9aee8a9ce3642e04db16e953307c54fcb41f8079fdb4872424f461a43289f1a6cd465be00739a6646213874932c778de351d1db58dd61b55ef473eb65d20d
data/README.md CHANGED
@@ -7,22 +7,20 @@
7
7
  A rails gem to provide reusable view components used throughout the SDR applications and implement
8
8
  component library assets.
9
9
 
10
- # NOTE: Under Development
10
+ # Installation
11
11
 
12
- Until initial development is complete and this gem is published, it can only be used locally. Install by cloning the repository to your local system and then including it in your gemfile as:
12
+ Add to gemfile:
13
13
 
14
14
  ```
15
- gem 'sdr_view_components', path: '../sdr_view_components'
15
+ gem 'sdr_view_components'
16
16
  ```
17
17
 
18
- Or via github path
19
-
20
18
  ## Requirements
21
19
 
22
20
  This set of components relies on the component library stylesheets, add:
23
21
 
24
22
  ```
25
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2025-09-11/styles/sul.css">
23
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/sul-dlss/component-library@v2025-09-11/styles/sul.css">
26
24
  ```
27
25
 
28
26
  with the most recent date tagged release to your `application.html.erb` layout file.
@@ -53,7 +51,7 @@ Supported header variations are `:dark`, `:light`, and `:white` (default is `:li
53
51
  <% end %>
54
52
  ```
55
53
 
56
- The `:dark` variation supports providing an rgb value via the `rgb_color_str` param in order to override the default dark background, for example:
54
+ The `:dark` variation supports providing an rgb value via the `background_color` param in order to override the default dark background, for example:
57
55
 
58
56
  ```
59
57
  <%= render SdrViewComponents::Structure::HeaderComponent.new(title: 'Test Header', subtitle: 'Test Subtitle', variant: :dark, rgb_color_str: '1, 104, 149') do |header| %>
@@ -63,14 +61,10 @@ The `:dark` variation supports providing an rgb value via the `rgb_color_str` pa
63
61
  <% end %>
64
62
  ```
65
63
 
64
+ By default, the SUL Rosette is included in the header, this can be disabled by setting `rosette: false` in the parameter list when instantiating the header.
65
+
66
66
  ### General usage:
67
67
 
68
68
  ```
69
69
  <% render SdrViewComponent::....>
70
70
  ```
71
-
72
- ## Contributing
73
- Contribution directions go here.
74
-
75
- ## License
76
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,40 +1,34 @@
1
- <style>
2
- .toast:not(.show) {
3
- display: block;
4
- }
5
- </style>
6
- <div class="toast-container position-relative bottom-0 end-0 p-3">
1
+ <div
2
+ class="toast align-items-center show"
3
+ role="alert"
4
+ aria-live="assertive"
5
+ aria-atomic="true"
6
+ >
7
+ <%= tag.div class: toast_body_classes do %>
8
+ <div class="d-flex">
7
9
  <div
8
- class="toast align-items-center"
9
- role="alert"
10
- aria-live="assertive"
11
- aria-atomic="true"
12
- >
13
- <div class="<%= toast_class %>">
14
- <div class="d-flex">
15
- <div
16
- class="bi bi-exclamation-circle-fill fs-3 me-3 align-self-center d-flex justify-content-center"
17
- ></div>
18
- <div>
19
- <div class="fw-semibold"><%= title %> </div>
20
- <div><%= text %></div>
21
- </div>
22
- <div class="me-2 m-auto">
23
- <% if close_text.present? %>
24
- <button
25
- type="button"
26
- class="btn btn-text text-uppercase text-white"
27
- >
28
- <%= close_text %>
29
- </button>
30
- <% end %>
31
- <button
32
- type="button"
33
- class="btn btn-close btn-close-white"
34
- aria-label="Close"
35
- ></button>
36
- </div>
37
- </div>
38
- </div>
10
+ class="bi bi-exclamation-circle-fill fs-3 me-3 align-self-center d-flex justify-content-center"
11
+ ></div>
12
+ <div>
13
+ <div class="fw-semibold"><%= title %> </div>
14
+ <div><%= text %></div>
15
+ </div>
16
+ <div class="me-2 m-auto">
17
+ <% if close_text.present? %>
18
+ <button
19
+ type="button"
20
+ class="btn btn-text text-uppercase text-white"
21
+ >
22
+ <%= close_text %>
23
+ </button>
24
+ <% end %>
25
+ <button
26
+ type="button"
27
+ class="btn btn-close btn-close-white"
28
+ aria-label="Close"
29
+ data-bs-dismiss="toast"
30
+ ></button>
39
31
  </div>
40
32
  </div>
33
+ <% end %>
34
+ </div>
@@ -14,7 +14,7 @@ module SdrViewComponents
14
14
 
15
15
  attr_reader :title, :text, :close_text, :variant
16
16
 
17
- def toast_class
17
+ def toast_body_classes
18
18
  merge_classes([background_color], %w[toast-body text-white])
19
19
  end
20
20
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SdrViewComponents
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdr_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Collier
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-12-05 00:00:00.000000000 Z
10
+ date: 2025-12-10 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails