playbook_ui 13.23.0.pre.alpha.PLAY1284investigation2657 → 13.23.0
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_avatar/avatar.html.erb +6 -1
- data/app/pb_kits/playbook/pb_bar_graph/_bar_graph.tsx +7 -28
- data/app/pb_kits/playbook/pb_bar_graph/bar_graph.rb +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_bar_graph/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_body/_body.scss +3 -3
- data/app/pb_kits/playbook/pb_typeahead/_typeahead.tsx +19 -27
- data/app/pb_kits/playbook/pb_typeahead/components/MenuList.tsx +2 -4
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/index.js +0 -1
- data/dist/playbook-rails.js +5 -5
- data/lib/playbook/kit_base.rb +1 -21
- data/lib/playbook/version.rb +2 -2
- metadata +29 -10
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb +0 -26
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx +0 -36
- data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md +0 -3
- data/app/pb_kits/playbook/pb_typeahead/components/index.tsx +0 -19
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx +0 -51
data/lib/playbook/kit_base.rb
CHANGED
@@ -31,8 +31,6 @@ require "playbook/right"
|
|
31
31
|
require "playbook/bottom"
|
32
32
|
|
33
33
|
module Playbook
|
34
|
-
include ActionView::Helpers
|
35
|
-
|
36
34
|
class KitBase < ViewComponent::Base
|
37
35
|
include Playbook::PbKitHelper
|
38
36
|
include Playbook::Props
|
@@ -80,26 +78,8 @@ module Playbook
|
|
80
78
|
default_html_options.merge(html_options.deep_merge(data_attributes))
|
81
79
|
end
|
82
80
|
|
83
|
-
# rubocop:disable Style/OptionalBooleanParameter
|
84
|
-
def pb_content_tag(name, content_or_options_with_block = nil, options = {}, escape = true, &block)
|
85
|
-
combined_options = options
|
86
|
-
.merge(combined_html_options)
|
87
|
-
.merge(default_options.merge(content_or_options_with_block))
|
88
|
-
content_tag(name, combined_options, options, escape, &block)
|
89
|
-
end
|
90
|
-
# rubocop:enable Style/OptionalBooleanParameter
|
91
|
-
|
92
81
|
private
|
93
82
|
|
94
|
-
def default_options
|
95
|
-
{
|
96
|
-
id: id,
|
97
|
-
data: data,
|
98
|
-
class: classname,
|
99
|
-
aria: aria,
|
100
|
-
}
|
101
|
-
end
|
102
|
-
|
103
83
|
def default_html_options
|
104
84
|
{}
|
105
85
|
end
|
@@ -108,7 +88,7 @@ module Playbook
|
|
108
88
|
{
|
109
89
|
data: data,
|
110
90
|
aria: aria,
|
111
|
-
}.transform_keys { |key| key.to_s.tr("_", "-")
|
91
|
+
}.transform_keys { |key| key.to_s.tr("_", "-") }
|
112
92
|
end
|
113
93
|
end
|
114
94
|
end
|
data/lib/playbook/version.rb
CHANGED
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: 13.23.0
|
4
|
+
version: 13.23.0
|
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: 2024-04-
|
12
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -18,6 +18,9 @@ dependencies:
|
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 5.2.4.5
|
21
|
+
- - "<="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 7.0.8.1
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -25,6 +28,9 @@ dependencies:
|
|
25
28
|
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: 5.2.4.5
|
31
|
+
- - "<="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 7.0.8.1
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: actionview
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
@@ -32,6 +38,9 @@ dependencies:
|
|
32
38
|
- - ">="
|
33
39
|
- !ruby/object:Gem::Version
|
34
40
|
version: 5.2.4.5
|
41
|
+
- - "<="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 7.0.8.1
|
35
44
|
type: :runtime
|
36
45
|
prerelease: false
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -39,6 +48,9 @@ dependencies:
|
|
39
48
|
- - ">="
|
40
49
|
- !ruby/object:Gem::Version
|
41
50
|
version: 5.2.4.5
|
51
|
+
- - "<="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 7.0.8.1
|
42
54
|
- !ruby/object:Gem::Dependency
|
43
55
|
name: activesupport
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,6 +58,9 @@ dependencies:
|
|
46
58
|
- - ">="
|
47
59
|
- !ruby/object:Gem::Version
|
48
60
|
version: 5.2.4.5
|
61
|
+
- - "<="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 7.0.8.1
|
49
64
|
type: :runtime
|
50
65
|
prerelease: false
|
51
66
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -53,6 +68,9 @@ dependencies:
|
|
53
68
|
- - ">="
|
54
69
|
- !ruby/object:Gem::Version
|
55
70
|
version: 5.2.4.5
|
71
|
+
- - "<="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 7.0.8.1
|
56
74
|
- !ruby/object:Gem::Dependency
|
57
75
|
name: react-rails
|
58
76
|
requirement: !ruby/object:Gem::Requirement
|
@@ -130,6 +148,9 @@ dependencies:
|
|
130
148
|
- - ">="
|
131
149
|
- !ruby/object:Gem::Version
|
132
150
|
version: 5.2.4.5
|
151
|
+
- - "<="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 7.0.8.1
|
133
154
|
type: :development
|
134
155
|
prerelease: false
|
135
156
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -137,6 +158,9 @@ dependencies:
|
|
137
158
|
- - ">="
|
138
159
|
- !ruby/object:Gem::Version
|
139
160
|
version: 5.2.4.5
|
161
|
+
- - "<="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: 7.0.8.1
|
140
164
|
- !ruby/object:Gem::Dependency
|
141
165
|
name: rspec-html-matchers
|
142
166
|
requirement: !ruby/object:Gem::Requirement
|
@@ -406,9 +430,6 @@ files:
|
|
406
430
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.html.erb
|
407
431
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.jsx
|
408
432
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_legend_position.md
|
409
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.html.erb
|
410
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.jsx
|
411
|
-
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_secondary_y_axis.md
|
412
433
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.html.erb
|
413
434
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.jsx
|
414
435
|
- app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_spline.md
|
@@ -2605,12 +2626,10 @@ files:
|
|
2605
2626
|
- app/pb_kits/playbook/pb_typeahead/components/Option.tsx
|
2606
2627
|
- app/pb_kits/playbook/pb_typeahead/components/Placeholder.tsx
|
2607
2628
|
- app/pb_kits/playbook/pb_typeahead/components/ValueContainer.tsx
|
2608
|
-
- app/pb_kits/playbook/pb_typeahead/components/index.tsx
|
2609
2629
|
- app/pb_kits/playbook/pb_typeahead/docs/_description.md
|
2610
2630
|
- app/pb_kits/playbook/pb_typeahead/docs/_footer.md
|
2611
2631
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_async_createable.jsx
|
2612
2632
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_createable.jsx
|
2613
|
-
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_custom_menu_list.jsx
|
2614
2633
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.html.erb
|
2615
2634
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_default.jsx
|
2616
2635
|
- app/pb_kits/playbook/pb_typeahead/docs/_typeahead_error_state.html.erb
|
@@ -2866,7 +2885,7 @@ homepage: https://playbook.powerapp.cloud/
|
|
2866
2885
|
licenses:
|
2867
2886
|
- ISC
|
2868
2887
|
metadata: {}
|
2869
|
-
post_install_message:
|
2888
|
+
post_install_message:
|
2870
2889
|
rdoc_options: []
|
2871
2890
|
require_paths:
|
2872
2891
|
- lib
|
@@ -2882,7 +2901,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2882
2901
|
version: '0'
|
2883
2902
|
requirements: []
|
2884
2903
|
rubygems_version: 3.5.3
|
2885
|
-
signing_key:
|
2904
|
+
signing_key:
|
2886
2905
|
specification_version: 4
|
2887
2906
|
summary: Playbook Design System
|
2888
2907
|
test_files: []
|
@@ -1,26 +0,0 @@
|
|
1
|
-
<% data = [{
|
2
|
-
name: 'Number of Installations',
|
3
|
-
data: [1475,200,3000,654,656]
|
4
|
-
}, {
|
5
|
-
type: 'spline',
|
6
|
-
name: 'Percentage',
|
7
|
-
data: [48, 70, 25, 55, 72],
|
8
|
-
color: '#F9BB00',
|
9
|
-
yAxis: 1
|
10
|
-
}] %>
|
11
|
-
|
12
|
-
<% axis_titles = [{name: "Number of Installations"}, {name: "Percentage"}] %>
|
13
|
-
|
14
|
-
<% axis_formats = [{format: ""}, {format: "{value}%"}] %>
|
15
|
-
|
16
|
-
<%= pb_rails("bar_graph", props: {
|
17
|
-
axis_format: axis_formats,
|
18
|
-
axis_title: axis_titles,
|
19
|
-
chart_data: data,
|
20
|
-
id: "bar-spline",
|
21
|
-
y_axis_min: 0,
|
22
|
-
x_axis_categories:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],
|
23
|
-
subtitle: 'Source: thesolarfoundation.com',
|
24
|
-
title: 'Bar Graph with Secondary Y-axis',
|
25
|
-
legend: true,
|
26
|
-
}) %>
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import React from 'react'
|
2
|
-
|
3
|
-
import BarGraph from '../_bar_graph'
|
4
|
-
|
5
|
-
const chartData = [{
|
6
|
-
name: 'Number of Installations',
|
7
|
-
data: [1475, 200, 3000, 654, 656],
|
8
|
-
}, {
|
9
|
-
type: 'spline',
|
10
|
-
name: 'Percentage',
|
11
|
-
data: [48, 70, 25, 55, 72],
|
12
|
-
color: '#F9BB00',
|
13
|
-
yAxis: 1
|
14
|
-
}]
|
15
|
-
|
16
|
-
const axisTitles = [ {name: "Number of Installations"}, {name: "Percentage"}]
|
17
|
-
|
18
|
-
const axisFormats = [{format: ""}, {format: "{value}%"}]
|
19
|
-
|
20
|
-
const BarGraphSecondaryYAxis= (props) => (
|
21
|
-
<div>
|
22
|
-
<BarGraph
|
23
|
-
axisFormat={axisFormats}
|
24
|
-
axisTitle={axisTitles}
|
25
|
-
chartData={chartData}
|
26
|
-
id="bar-spline"
|
27
|
-
legend
|
28
|
-
title="Bar Graph with Secondary Y-axis"
|
29
|
-
xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
|
30
|
-
yAxisMin={0}
|
31
|
-
{...props}
|
32
|
-
/>
|
33
|
-
</div>
|
34
|
-
)
|
35
|
-
|
36
|
-
export default BarGraphSecondaryYAxis
|
@@ -1,3 +0,0 @@
|
|
1
|
-
Optionally add a second yAxis to support secondary datasets (e.x., a spline) by passing` yAxis: 1` to the second node of your `chartData` array.
|
2
|
-
|
3
|
-
To customize the format and/or title of your secondary yAxis, pass your desired values as arrays through the `axisFormat` and `axisTitle` props, respectively.
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import Control from './Control'
|
2
|
-
import ClearIndicator from './ClearIndicator'
|
3
|
-
import IndicatorsContainer from './IndicatorsContainer'
|
4
|
-
import MenuList from './MenuList'
|
5
|
-
import MultiValue from './MultiValue'
|
6
|
-
import Option from './Option'
|
7
|
-
import Placeholder from './Placeholder'
|
8
|
-
import ValueContainer from './ValueContainer'
|
9
|
-
|
10
|
-
export {
|
11
|
-
Control,
|
12
|
-
ClearIndicator,
|
13
|
-
IndicatorsContainer,
|
14
|
-
MenuList,
|
15
|
-
MultiValue,
|
16
|
-
Option,
|
17
|
-
Placeholder,
|
18
|
-
ValueContainer,
|
19
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
import React, { useState } from 'react'
|
2
|
-
|
3
|
-
import {
|
4
|
-
Button,
|
5
|
-
} from '../..'
|
6
|
-
|
7
|
-
import Typeahead from '../_typeahead'
|
8
|
-
|
9
|
-
const options = [
|
10
|
-
{ label: 'Orange', value: '#FFA500' },
|
11
|
-
{ label: 'Red', value: '#FF0000' },
|
12
|
-
{ label: 'Green', value: '#00FF00' },
|
13
|
-
{ label: 'Blue', value: '#0000FF' },
|
14
|
-
{ label: 'Amaranth', value: '#9F2B68' },
|
15
|
-
{ label: 'Key Lime', value: '#DAF7A6' },
|
16
|
-
{ label: 'Turquois', value: '#00FFD0' },
|
17
|
-
]
|
18
|
-
|
19
|
-
const TypeaheadCustomMenuList = (props) => {
|
20
|
-
const defaultColorOptions = options.slice(0, 3)
|
21
|
-
const [colorOptions, setColorOptions] = useState(defaultColorOptions)
|
22
|
-
|
23
|
-
const moreToLoad = colorOptions.length == defaultColorOptions.length
|
24
|
-
const loadColors = moreToLoad ? () => setColorOptions(options) : () => setColorOptions(defaultColorOptions)
|
25
|
-
|
26
|
-
const menuListProps = {
|
27
|
-
footer: (<Button
|
28
|
-
margin="sm"
|
29
|
-
onClick={loadColors}
|
30
|
-
text={`Load ${moreToLoad ? "More" : "Less"}`}
|
31
|
-
/>)
|
32
|
-
}
|
33
|
-
|
34
|
-
const MenuList = (props) => (
|
35
|
-
<Typeahead.MenuList
|
36
|
-
{...menuListProps}
|
37
|
-
{...props}
|
38
|
-
/>
|
39
|
-
)
|
40
|
-
|
41
|
-
return (
|
42
|
-
<Typeahead
|
43
|
-
components={{ MenuList }}
|
44
|
-
label="Colors"
|
45
|
-
options={colorOptions}
|
46
|
-
{...props}
|
47
|
-
/>
|
48
|
-
)
|
49
|
-
}
|
50
|
-
|
51
|
-
export default TypeaheadCustomMenuList
|