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 +4 -4
- data/app/pb_kits/playbook/pb_icon/_icon.jsx +20 -5
- data/app/pb_kits/playbook/pb_icon/icon.html.erb +4 -2
- data/app/pb_kits/playbook/pb_loading_inline/_loading_inline.jsx +1 -0
- data/app/pb_kits/playbook/pb_loading_inline/loading_inline.html.erb +1 -1
- data/app/pb_kits/playbook/pb_nav/_item.jsx +0 -2
- data/app/pb_kits/playbook/pb_nav/item.html.erb +2 -2
- data/lib/playbook/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 566bf05016cdbd914b93dd26f30748ef55e924c3c2a50680a7f378ab936c6992
|
4
|
+
data.tar.gz: 54e7da499075ccf13d244c4a53e3809fd9db0e8ad6bbb73c95b9581cb9409db7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?:
|
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
|
-
|
80
|
-
|
81
|
-
|
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
|
|
@@ -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: {
|
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: {
|
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 %>
|
data/lib/playbook/version.rb
CHANGED
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
|
+
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-
|
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:
|
2108
|
+
version: 1.3.1
|
2109
2109
|
requirements: []
|
2110
|
-
|
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
|