anchor_view_components 0.19.0 → 0.20.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: 7e2a60354dbc20761276da05c682b655fd627e029add58567e29db5954522951
4
- data.tar.gz: 2f0d6eb82cdc9824c7524541696bd346cb5542492a88f76b107f6e7d5bace4cc
3
+ metadata.gz: 567d2daba21ef05c23aeebe202b89dd3ea3ca64685c719864fe4d429a895c16b
4
+ data.tar.gz: 898a0aa5bee4eb95d932dcc384c5bf2fbd3b68f81d2c869fd42fb06f4415afbc
5
5
  SHA512:
6
- metadata.gz: '04539df2f5ac5097f37b0dd597ebb7bc708ba4977ae312d50ecf6efe6db86aec399e72c135f1865b209ab655ac6374e56cd60c98e7827cbd099cb309b7deafe3'
7
- data.tar.gz: 5d32b2956b275cff10c0ecc21d1e5f0036c60baee10f21b6206dcd0d584e398c326ba934c3596f9d7f49a3909334ffcee8eac703b30c7361a499632207423564
6
+ metadata.gz: 9b40abd16d6167ca9d865044f123a3b6be175f425ae8ba8065a66e4ba8a8138b8eb373486599eb56755857257935228239c37513a0d1b09dbb7d9f8176390cee
7
+ data.tar.gz: db6318e677cd254d0b1e4c90de08b01fb82a99146e61ef84fdee53e9bef9696588fcc53b4a1ed58f65ec6f75fe5fb122e8fd46931908e6e45aa4f13dd377314a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cf985b0: Added the `warning-triangle` icon
8
+ - cf985b0: Added a test ID to the Table pagination
9
+
10
+ ### Patch Changes
11
+
12
+ - d436563: Add a script for adding icons to Anchor from Iconoir
13
+ - 7afa4f7: Improve and automate package releasing using [Changesets].
14
+
15
+ [Changesets]: https://github.com/changesets/changesets
16
+
3
17
  ## 0.19.0 - 2023-09-21
4
18
 
5
19
  ### Fixed
@@ -77,29 +91,34 @@
77
91
  ## 0.12.0 - 2023-09-11
78
92
 
79
93
  ### Changed
80
- - Added a record argument to the TableComponent row link lambda
81
94
 
95
+ - Added a record argument to the TableComponent row link lambda
82
96
 
83
97
  ## 0.11.4 - 2023-09-07
84
98
 
85
99
  ### Added
100
+
86
101
  - PopoverComponent was extracted from ActionMenuComponent
87
102
 
88
103
  ### Changed
104
+
89
105
  - Added optional totals to TableComponent
90
106
 
91
107
  ## 0.11.3 - 2023-09-06
92
108
 
93
109
  ### Added
110
+
94
111
  - Allow adding captions to tables.
95
112
  - Show empty message when no data on tables.
96
113
 
97
114
  ### Changed
115
+
98
116
  - Prioritize methods over #[] (#52)
99
117
 
100
118
  ## 0.11.2 - 2023-09-02
101
119
 
102
120
  ### Fixed
121
+
103
122
  - Aligment of button menu items in action menu component.
104
123
 
105
124
  ## 0.11.1 - 2023-09-01
data/README.md CHANGED
@@ -64,6 +64,10 @@ To see component previews:
64
64
  - Go to the `demo/` directory, install dependencies, and run `bin/dev`
65
65
  - See the components at http://localhost:3000
66
66
 
67
+ ## Releasing
68
+
69
+ See [RELEASING.md](RELEASING.md)
70
+
67
71
  ## License
68
72
 
69
73
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,16 @@
1
+ # Icons
2
+
3
+ We use icons from [Iconoir]. Not all icons are currently included in Anchor.
4
+
5
+ ## Adding icons
6
+
7
+ To help ensure icon names and their SVG source stay consistent, please use the
8
+ script in the Anchor ViewComponents repo to add new icons:
9
+
10
+ ```
11
+ bin/add_icon [icon-name]
12
+ ```
13
+
14
+ Icons and their name can be found by searching the [Iconoir] website.
15
+
16
+ [Iconoir]: https://iconoir.com
@@ -1,3 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke-width="1.5" color="currentColor" viewBox="0 0 24 24">
2
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M6.758 17.243 12.001 12m5.243-5.243L12 12m0 0L6.758 6.757M12.001 12l5.243 5.243"/>
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
4
  </svg>
@@ -0,0 +1,5 @@
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
5
+ </svg>
@@ -1,4 +1,6 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke-width="1.5" color="currentColor" viewBox="0 0 24 24">
2
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"/>
3
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M16.5 8.5 13 12l3.5 3.5m-6-7L7 12l3.5 3.5"/>
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M16.5 8.5L13 12L16.5 15.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M10.5 8.5L7 12L10.5 15.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
6
  </svg>
@@ -1,3 +1,6 @@
1
- <svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M3 5h18M3 12h18M3 19h18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M3 5H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path d="M3 12H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
5
+ <path d="M3 19H21" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
6
  </svg>
@@ -1,3 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke-width="1.5" color="currentColor" viewBox="0 0 24 24">
2
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m6 9 6 6 6-6"/>
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M6 9L12 15L18 9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
4
  </svg>
@@ -1,3 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke-width="1.5" color="currentColor" viewBox="0 0 24 24">
2
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m15 6-6 6 6 6"/>
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M15 6L9 12L15 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
4
  </svg>
@@ -1,3 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" stroke-width="1.5" color="currentColor" viewBox="0 0 24 24">
2
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m9 6 6 6-6 6"/>
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M9 6L15 12L9 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
3
4
  </svg>
@@ -0,0 +1,6 @@
1
+ <!-- Source: Iconoir, added via `bin/add_icon` -->
2
+ <svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M20.0429 21H3.95705C2.41902 21 1.45658 19.3364 2.22324 18.0031L10.2662 4.01533C11.0352 2.67792 12.9648 2.67791 13.7338 4.01532L21.7768 18.0031C22.5434 19.3364 21.581 21 20.0429 21Z" stroke="currentColor" stroke-linecap="round"/>
4
+ <path d="M12 9V13" stroke="currentColor" stroke-linecap="round"/>
5
+ <path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
6
+ </svg>
@@ -1,4 +1,4 @@
1
- <div class="flex font-semibold items-center justify-between mt-3 px-2 text-base">
1
+ <div class="flex font-semibold items-center justify-between mt-3 px-2 text-base" data-testid="table-pagination">
2
2
  <%= tag.span total %>
3
3
 
4
4
  <%= tag.nav(
@@ -1,5 +1,5 @@
1
1
  module Anchor
2
2
  module ViewComponents
3
- VERSION = "0.19.0".freeze
3
+ VERSION = "0.20.0".freeze
4
4
  end
5
5
  end
@@ -1,12 +1,11 @@
1
1
  module Anchor
2
2
  class IconComponentPreview < Preview
3
- # Icons
4
- # ------------
5
- # We use icons from [Iconoir](https://iconoir.com). Not all icons are
6
- # currently included in Anchor; those that are [can be viewed on
7
- # GitHub](https://github.com/BuoySoftware/anchor_view_components/tree/main/app/assets/images/icons).
8
3
  def default
9
- anchor_icon(icon: "actions-check-circle-base")
4
+ anchor_icon(icon: "check-circle")
5
+ end
6
+
7
+ def warning
8
+ anchor_icon(icon: "warning-triangle", classes: "text-critical")
10
9
  end
11
10
  end
12
11
  end
@@ -18,7 +18,7 @@ module Anchor
18
18
 
19
19
  def with_icon
20
20
  anchor_toast do |toast|
21
- toast.with_icon(icon: "actions-check-circle-base")
21
+ toast.with_icon(icon: "check-circle")
22
22
  "Confirmed"
23
23
  end
24
24
  end
@@ -0,0 +1,16 @@
1
+ We use icons from [Iconoir]. Not all icons are currently included in Anchor;
2
+ those that are [can be viewed on GitHub][gh-icons].
3
+
4
+ ## Adding icons
5
+
6
+ To help ensure icon names and their SVG source stay consistent, please use the
7
+ script in the Anchor ViewComponents repo to add new icons:
8
+
9
+ ```
10
+ bin/add_icon [icon-name]
11
+ ```
12
+
13
+ Icons and their name can be found by searching the [Iconoir] website.
14
+
15
+ [Iconoir]: https://iconoir.com
16
+ [gh-icons]: https://github.com/BuoySoftware/anchor_view_components/tree/main/app/assets/images/icons
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anchor_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buoy Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-21 00:00:00.000000000 Z
11
+ date: 2023-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -54,14 +54,16 @@ files:
54
54
  - app/assets/images/buoy-logomark.svg
55
55
  - app/assets/images/favicon.ico
56
56
  - app/assets/images/favicon.svg
57
- - app/assets/images/icons/actions-check-circle-base.svg
57
+ - app/assets/images/icons/README.md
58
58
  - app/assets/images/icons/cancel.svg
59
+ - app/assets/images/icons/check-circle.svg
59
60
  - app/assets/images/icons/fast-left-circle.svg
60
61
  - app/assets/images/icons/loading-indicator.svg
61
62
  - app/assets/images/icons/menu.svg
62
63
  - app/assets/images/icons/nav-arrow-down.svg
63
64
  - app/assets/images/icons/nav-arrow-left.svg
64
65
  - app/assets/images/icons/nav-arrow-right.svg
66
+ - app/assets/images/icons/warning-triangle.svg
65
67
  - app/assets/stylesheets/anchor-view-components.tailwind.css
66
68
  - app/assets/stylesheets/components/action-menu.css
67
69
  - app/assets/stylesheets/components/button.css
@@ -173,6 +175,7 @@ files:
173
175
  - previews/forms/default.html.erb
174
176
  - previews/pages/forms.md.erb
175
177
  - previews/pages/helpers.md.erb
178
+ - previews/pages/icons.md.erb
176
179
  homepage: https://github.com/BuoySoftware/anchor_view_components
177
180
  licenses:
178
181
  - MIT
@@ -193,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
196
  - !ruby/object:Gem::Version
194
197
  version: '0'
195
198
  requirements: []
196
- rubygems_version: 3.4.18
199
+ rubygems_version: 3.4.19
197
200
  signing_key:
198
201
  specification_version: 4
199
202
  summary: ViewComponents for Buoy’s design system, Anchor
@@ -1,4 +0,0 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path d="M7 12.5L10 15.5L17 8.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
- <path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
- </svg>