playbook_ui 8.2.0 → 8.2.1.alpha.iconacc

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: fb83d7f848b905c0474d64e01f8fc94314c592419c387754618a280217990c1c
4
- data.tar.gz: 97ad2d02d4cc111b1b25556a5415531e5fc7a753961864df222d09199a87af1b
3
+ metadata.gz: b7526c42c57c64b2f20becc559569747cda234e5478190b62e170ad5be74ac4a
4
+ data.tar.gz: c2167d4d617d1fa829b96ee32d6b8ca490734b416dabd261806756868b6b4431
5
5
  SHA512:
6
- metadata.gz: d217671d83f452bbd313cfb6c67afd8caec79e0db685845d2c557e2562fa8704309288143f0d78f4aaf27d733fd54b66b106718aaaaecab48119b71908bb519d
7
- data.tar.gz: 5030041ed8610a6b1149af2630d70296dc9e6a482fc732c8790fd9d6a98e4a8efee78e4b4907d2b9d153416ede5e7b144c794a8f7235f082f766832e8e1a6ad7
6
+ metadata.gz: 61791c852673487ced56bfa3eb2e47c336017172b79ecb447ff48fb02d5b800ce85cb335f93347d7771c7e5dbe5ce2c92ba8ddf4d4dc07d776516de703d47e77
7
+ data.tar.gz: af3ccf64210ecba24d6898579f51333f3b9be8e8f85d6d4feb6cf1ca5002e927f63e70eb2c51188270dde52b85f228c1f789acda840a7931b7b39327e6c23539
data/Rakefile CHANGED
@@ -4,29 +4,12 @@ rescue LoadError
4
4
  puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
5
  end
6
6
 
7
- require 'rdoc/task'
8
-
9
- RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'Playbook'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.md')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
15
- end
16
-
17
7
  APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
18
8
  load 'rails/tasks/engine.rake'
19
-
20
9
  load 'rails/tasks/statistics.rake'
21
10
 
22
11
  require 'bundler/gem_tasks'
23
12
 
24
- require 'rake/testtask'
25
-
26
- Rake::TestTask.new(:test) do |t|
27
- t.libs << 'test'
28
- t.pattern = 'spec/**/*_spec.rb'
29
- t.verbose = false
30
- end
13
+ Dir["private/tasks/*.rake"].each(&method(:load))
31
14
 
32
15
  task default: :test
@@ -2,12 +2,14 @@
2
2
 
3
3
  import React from 'react'
4
4
  import classnames from 'classnames'
5
+ import { buildAriaProps, buildDataProps } from '../utilities/props'
5
6
  import { globalProps } from '../utilities/globalProps.js'
6
7
 
7
8
  type IconProps = {
8
- aria?: Object,
9
+ aria?: object,
9
10
  border?: boolean,
10
11
  className?: string,
12
+ data?: object,
11
13
  fixedWidth?: boolean,
12
14
  flip?: "horizontal" | "vertical" | "both" | "none",
13
15
  icon: string,
@@ -41,8 +43,10 @@ const flipMap = {
41
43
 
42
44
  const Icon = (props: IconProps) => {
43
45
  const {
46
+ aria = {},
44
47
  border = false,
45
48
  className,
49
+ data = {},
46
50
  fixedWidth = true,
47
51
  flip = false,
48
52
  icon,
@@ -75,11 +79,22 @@ const Icon = (props: IconProps) => {
75
79
  className
76
80
  )
77
81
 
82
+ aria.label ? null : aria.label = `${icon} icon`
83
+ const ariaProps = buildAriaProps(aria)
84
+ const dataProps = buildDataProps(data)
85
+
78
86
  return (
79
- <i
80
- className={classes}
81
- id={id}
82
- />
87
+ <>
88
+ <i
89
+ {...dataProps}
90
+ className={classes}
91
+ id={id}
92
+ />
93
+ <span
94
+ {...ariaProps}
95
+ hidden="true"
96
+ />
97
+ </>
83
98
  )
84
99
  }
85
100
 
@@ -1,5 +1,7 @@
1
1
  <%= content_tag(:i, nil,
2
2
  id: object.id,
3
3
  data: object.data,
4
- class: object.classname,
5
- aria: object.aria) %>
4
+ class: object.classname ) %>
5
+ <%= content_tag(:span, nil,
6
+ aria: { label: "#{object.icon} icon" }.merge(object.aria),
7
+ hidden: true ) %>
@@ -22,6 +22,7 @@ const LoadingInline = (props: LoadingInlineProps) => {
22
22
  >
23
23
  <Body color="light">
24
24
  <Icon
25
+ aria={{ label: 'loading icon' }}
25
26
  fixedWidth
26
27
  icon="spinner"
27
28
  pulse
@@ -4,6 +4,6 @@
4
4
  class: object.classname) do %>
5
5
 
6
6
  <%= pb_rails("body", props: { color: "light", dark: object.dark }) do %>
7
- <%= pb_rails("icon", props: { fixed_width: true, icon: "spinner", pulse: true }) %> Loading
7
+ <%= pb_rails("icon", props: { aria: { label: "loading icon" }, fixed_width: true, icon: "spinner", pulse: true }) %> Loading
8
8
  <% end %>
9
9
  <% end %>
@@ -75,7 +75,6 @@ const NavItem = (props: NavItemProps) => {
75
75
  key={iconLeft}
76
76
  >
77
77
  <Icon
78
- aria={{ label: iconLeft }}
79
78
  className="pb_nav_list_item_icon_left"
80
79
  fixedWidth
81
80
  icon={iconLeft}
@@ -91,7 +90,6 @@ const NavItem = (props: NavItemProps) => {
91
90
  key={iconRight}
92
91
  >
93
92
  <Icon
94
- aria={{ label: iconRight }}
95
93
  className="pb_nav_list_item_icon_right"
96
94
  fixedWidth
97
95
  icon={iconRight}
@@ -9,13 +9,13 @@
9
9
  <%= pb_rails("image", props: { url: object.image_url, classname: "pb_nav_img_wrapper" }) %>
10
10
  <% end %>
11
11
  <% if object.icon_left %>
12
- <%= pb_rails("icon", props: { aria: { label: object.icon_left }, icon: object.icon_left, classname: "pb_nav_list_item_icon_left", fixed_width: true}) %>
12
+ <%= pb_rails("icon", props: { icon: object.icon_left, classname: "pb_nav_list_item_icon_left", fixed_width: true}) %>
13
13
  <% end %>
14
14
  <span class="pb_nav_list_item_text">
15
15
  <%= object.text %><%= content.presence %>
16
16
  </span>
17
17
  <% if object.icon_right %>
18
- <%= pb_rails("icon", props: { aria: { label: object.icon_right }, icon: object.icon_right, classname: "pb_nav_list_item_icon_right", fixed_width: true}) %>
18
+ <%= pb_rails("icon", props: { icon: object.icon_right, classname: "pb_nav_list_item_icon_right", fixed_width: true}) %>
19
19
  <% end %>
20
20
  <% end %>
21
21
  <% end %>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "8.2.0"
4
+ VERSION = "8.2.1.alpha.iconacc"
5
5
  end
6
6
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.2.0
4
+ version: 8.2.1.alpha.iconacc
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
8
8
  - Power Devs
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-03-11 00:00:00.000000000 Z
12
+ date: 2021-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -17,27 +17,27 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 5.2.4.5
20
+ version: 5.2.4.4
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '6.0'
23
+ version: '7.0'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: 5.2.4.5
30
+ version: 5.2.4.4
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '6.0'
33
+ version: '7.0'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: actionview
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 5.2.4.5
40
+ version: 5.2.4.4
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '7.0'
@@ -47,7 +47,7 @@ dependencies:
47
47
  requirements:
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 5.2.4.5
50
+ version: 5.2.4.4
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '7.0'
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 5.2.4.5
60
+ version: 5.2.4.4
61
61
  - - "<"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '7.0'
@@ -67,24 +67,10 @@ dependencies:
67
67
  requirements:
68
68
  - - ">="
69
69
  - !ruby/object:Gem::Version
70
- version: 5.2.4.5
70
+ version: 5.2.4.4
71
71
  - - "<"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '7.0'
74
- - !ruby/object:Gem::Dependency
75
- name: github_changelog_generator
76
- requirement: !ruby/object:Gem::Requirement
77
- requirements:
78
- - - '='
79
- - !ruby/object:Gem::Version
80
- version: 1.15.2
81
- type: :runtime
82
- prerelease: false
83
- version_requirements: !ruby/object:Gem::Requirement
84
- requirements:
85
- - - '='
86
- - !ruby/object:Gem::Version
87
- version: 1.15.2
88
74
  - !ruby/object:Gem::Dependency
89
75
  name: react-rails
90
76
  requirement: !ruby/object:Gem::Requirement
@@ -253,6 +239,20 @@ dependencies:
253
239
  - - '='
254
240
  - !ruby/object:Gem::Version
255
241
  version: 11.0.0
242
+ - !ruby/object:Gem::Dependency
243
+ name: github_changelog_generator
244
+ requirement: !ruby/object:Gem::Requirement
245
+ requirements:
246
+ - - '='
247
+ - !ruby/object:Gem::Version
248
+ version: 1.15.2
249
+ type: :development
250
+ prerelease: false
251
+ version_requirements: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - '='
254
+ - !ruby/object:Gem::Version
255
+ version: 1.15.2
256
256
  - !ruby/object:Gem::Dependency
257
257
  name: overcommit
258
258
  requirement: !ruby/object:Gem::Requirement
@@ -2103,7 +2103,7 @@ homepage: http://playbook.powerapp.cloud
2103
2103
  licenses:
2104
2104
  - MIT
2105
2105
  metadata: {}
2106
- post_install_message:
2106
+ post_install_message:
2107
2107
  rdoc_options: []
2108
2108
  require_paths:
2109
2109
  - lib
@@ -2114,12 +2114,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
2114
2114
  version: '0'
2115
2115
  required_rubygems_version: !ruby/object:Gem::Requirement
2116
2116
  requirements:
2117
- - - ">="
2117
+ - - ">"
2118
2118
  - !ruby/object:Gem::Version
2119
- version: '0'
2119
+ version: 1.3.1
2120
2120
  requirements: []
2121
2121
  rubygems_version: 3.1.4
2122
- signing_key:
2122
+ signing_key:
2123
2123
  specification_version: 4
2124
2124
  summary: Playbook Design System
2125
2125
  test_files: []