playbook_ui 9.4.0 → 9.5.0.alpha.rs.downgrade

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: 1c56b74cd258f0a3479d6f6acdaebe1792f3e5a30bbca45c3f2b21493ed2b5f4
4
- data.tar.gz: 151e4c6b8f15c191ca1358de007a3ba373fb7da32d8d1f3afd5d0743a86ae364
3
+ metadata.gz: 566bf05016cdbd914b93dd26f30748ef55e924c3c2a50680a7f378ab936c6992
4
+ data.tar.gz: 54e7da499075ccf13d244c4a53e3809fd9db0e8ad6bbb73c95b9581cb9409db7
5
5
  SHA512:
6
- metadata.gz: a079d327c1a318bb826104f242c104286dd0d996e8adfe325ca719488d790fd73ef71d6ab302c835a368852e5b993f3831480faf0b609aeccdd99e37a9aaee4b
7
- data.tar.gz: 3cf8ead3bf3712caaf275ef4559207108d655315d2c5c43505aba4a0203e91c788ce50cfe51c36d85a0cacf2c364ad65e593b6607a8003fcdd8da48aabd0396f
6
+ metadata.gz: 87dc6b5f61305e12598ba8a2cae7886888d58d8b60d7bc6f99ebd3feba27df7c6efaad4397c99a0cccd9354c256c37de7021e4a5934d211578b04f8b6f38b833
7
+ data.tar.gz: ee0101d042837334f790f3165cb1cd46eec4ad3e1a281a0ba84913eb4c399240d54b76b1d941770cfe38bd5428470ef2eeb7f48ac129e4342a2c2217d7265b57
@@ -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
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,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playbook
4
- VERSION = "9.4.0"
4
+ VERSION = "9.5.0.alpha.rs.downgrade"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.4.0
4
+ version: 9.5.0.alpha.rs.downgrade
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-14 00:00:00.000000000 Z
12
+ date: 2021-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -2103,12 +2103,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
2103
2103
  version: '0'
2104
2104
  required_rubygems_version: !ruby/object:Gem::Requirement
2105
2105
  requirements:
2106
- - - ">="
2106
+ - - ">"
2107
2107
  - !ruby/object:Gem::Version
2108
- version: '0'
2108
+ version: 1.3.1
2109
2109
  requirements: []
2110
- rubyforge_project:
2111
- rubygems_version: 2.7.3
2110
+ rubygems_version: 3.1.4
2112
2111
  signing_key:
2113
2112
  specification_version: 4
2114
2113
  summary: Playbook Design System