playbook_ui 9.4.0 → 9.5.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 +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 +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2381b18440b9c161bb5fedd7adaa62cb6231ef81aff16a6078c37bd2a08368fa
|
4
|
+
data.tar.gz: 7d969a36b50458b303453f005471dd10def62fafbcfa358ca12f15125536b32e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 171386b3c28a4b2a9f20fa038b9d61030baf429093a489162045633500356b0a05d8b63a6f735932adc95fac7acec4b61b309d01468d495e67ecde820f88689d
|
7
|
+
data.tar.gz: ad65ae5c98a64bf1a09742ba5d5cd7ea94bebefedfba1ed00961c995d311eff8f116866d28f997761c813dbbfbf99809bf3e70c3d0a75d882c2dcc4263d38dd0
|
@@ -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
|
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
|
@@ -2107,8 +2107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2107
2107
|
- !ruby/object:Gem::Version
|
2108
2108
|
version: '0'
|
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
|