anchor_view_components 0.19.0 → 0.20.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: 7e2a60354dbc20761276da05c682b655fd627e029add58567e29db5954522951
4
- data.tar.gz: 2f0d6eb82cdc9824c7524541696bd346cb5542492a88f76b107f6e7d5bace4cc
3
+ metadata.gz: 26f407ed0f511827c3627b111f3a64a52764f003248ea206aaac3f3902ceb65c
4
+ data.tar.gz: a266da369857e596d2e89dc239e8645a49cd0b03011dc1209d6ed43597e91a4a
5
5
  SHA512:
6
- metadata.gz: '04539df2f5ac5097f37b0dd597ebb7bc708ba4977ae312d50ecf6efe6db86aec399e72c135f1865b209ab655ac6374e56cd60c98e7827cbd099cb309b7deafe3'
7
- data.tar.gz: 5d32b2956b275cff10c0ecc21d1e5f0036c60baee10f21b6206dcd0d584e398c326ba934c3596f9d7f49a3909334ffcee8eac703b30c7361a499632207423564
6
+ metadata.gz: 358b6150a5bf00924ab8ff87f18fe6ce7726e2ce71a96a9dab897f478696c261fd64fbe9608ed25fb4ba5a5c51c2ea937e97a4e1b054bc5e93e87e157945d598
7
+ data.tar.gz: 8672cde3365dc8492b26067dc05da0cae85a515355c417154695c1c5399f8b9de0e4222ab069ef1b332cc0f589304bb6bc78bdf1ed0f305f1ccce8998b235366
data/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.20.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 5914d0c: Fix `gem push` command in `bin/publish`
8
+
9
+ ## 0.20.0
10
+
11
+ ### Minor Changes
12
+
13
+ - cf985b0: Added the `warning-triangle` icon
14
+ - cf985b0: Added a test ID to the Table pagination
15
+
16
+ ### Patch Changes
17
+
18
+ - d436563: Add a script for adding icons to Anchor from Iconoir
19
+ - 7afa4f7: Improve and automate package releasing using [Changesets].
20
+
21
+ [Changesets]: https://github.com/changesets/changesets
22
+
3
23
  ## 0.19.0 - 2023-09-21
4
24
 
5
25
  ### Fixed
@@ -77,29 +97,34 @@
77
97
  ## 0.12.0 - 2023-09-11
78
98
 
79
99
  ### Changed
80
- - Added a record argument to the TableComponent row link lambda
81
100
 
101
+ - Added a record argument to the TableComponent row link lambda
82
102
 
83
103
  ## 0.11.4 - 2023-09-07
84
104
 
85
105
  ### Added
106
+
86
107
  - PopoverComponent was extracted from ActionMenuComponent
87
108
 
88
109
  ### Changed
110
+
89
111
  - Added optional totals to TableComponent
90
112
 
91
113
  ## 0.11.3 - 2023-09-06
92
114
 
93
115
  ### Added
116
+
94
117
  - Allow adding captions to tables.
95
118
  - Show empty message when no data on tables.
96
119
 
97
120
  ### Changed
121
+
98
122
  - Prioritize methods over #[] (#52)
99
123
 
100
124
  ## 0.11.2 - 2023-09-02
101
125
 
102
126
  ### Fixed
127
+
103
128
  - Aligment of button menu items in action menu component.
104
129
 
105
130
  ## 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.1".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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Buoy Software
8
- autorequire:
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
@@ -38,8 +38,8 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
- description:
42
- email:
41
+ description:
42
+ email:
43
43
  executables: []
44
44
  extensions: []
45
45
  extra_rdoc_files: []
@@ -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,12 +175,13 @@ 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
179
182
  metadata:
180
183
  rubygems_mfa_required: 'true'
181
- post_install_message:
184
+ post_install_message:
182
185
  rdoc_options: []
183
186
  require_paths:
184
187
  - lib
@@ -193,8 +196,8 @@ 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
197
- signing_key:
199
+ rubygems_version: 3.4.10
200
+ signing_key:
198
201
  specification_version: 4
199
202
  summary: ViewComponents for Buoy’s design system, Anchor
200
203
  test_files: []
@@ -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>