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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 452a03b346d2fe5cd79019537fb3bc6ac4bfbdaa621b3e552d898bdaaf1e7c00
|
4
|
+
data.tar.gz: fd5127e3deb4e55449b11d1d989335e3b48cfda1d0064b353d615749eef417c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48edcdfd01a13c5082b670efa0a5d689cd3e3793ce9adacb1789f047bc1514f8f428194d2ea43e1e9bdef4b11d62a496a0b064d6009fed455287ca770ddb81fa
|
7
|
+
data.tar.gz: 37f2323fd3f2a3b4ea76822e139a9bc2c627f7c3bc6817f1f6092c7d9ea9159db7c9916bd0737baab951f7b4aeae28f17dfe5025282ad678898b5eb40bf05ffb
|
@@ -1,4 +1,9 @@
|
|
1
|
-
<%=
|
1
|
+
<%= content_tag(:div,
|
2
|
+
id: object.id,
|
3
|
+
data: object.data.merge(initials: object.initials),
|
4
|
+
class: object.classname,
|
5
|
+
aria: object.aria,
|
6
|
+
**combined_html_options) do %>
|
2
7
|
<%= content_tag(:div, data: { initials: object.initials }, class: "avatar_wrapper") do %>
|
3
8
|
<%= pb_rails("image", props: { alt: object.alt_text, url: object.image_url, on_error: object.handle_img_error }) if object.image_url.present? %>
|
4
9
|
<% end %>
|
@@ -13,12 +13,12 @@ import classnames from "classnames";
|
|
13
13
|
|
14
14
|
type BarGraphProps = {
|
15
15
|
align?: "left" | "right" | "center";
|
16
|
-
axisTitle:
|
16
|
+
axisTitle: string;
|
17
17
|
dark?: boolean;
|
18
18
|
xAxisCategories: [];
|
19
19
|
yAxisMin: number;
|
20
20
|
yAxisMax: number;
|
21
|
-
chartData: { name: string; data: number[]
|
21
|
+
chartData: { name: string; data: number[] }[];
|
22
22
|
className?: string;
|
23
23
|
customOptions?: Partial<Highcharts.Options>;
|
24
24
|
id: string;
|
@@ -37,7 +37,6 @@ type BarGraphProps = {
|
|
37
37
|
y?: number;
|
38
38
|
aria?: { [key: string]: string };
|
39
39
|
data?: { [key: string]: string };
|
40
|
-
axisFormat?: { format: string; }[] | string;
|
41
40
|
};
|
42
41
|
|
43
42
|
|
@@ -52,7 +51,6 @@ const BarGraph = ({
|
|
52
51
|
colors,
|
53
52
|
htmlOptions = {},
|
54
53
|
customOptions = {},
|
55
|
-
axisFormat,
|
56
54
|
id,
|
57
55
|
pointStart,
|
58
56
|
subTitle,
|
@@ -69,7 +67,7 @@ const BarGraph = ({
|
|
69
67
|
x = 0,
|
70
68
|
y = 0,
|
71
69
|
...props
|
72
|
-
}: BarGraphProps): React.ReactElement => {
|
70
|
+
}: BarGraphProps): React.ReactElement => {
|
73
71
|
const ariaProps = buildAriaProps(aria);
|
74
72
|
const dataProps = buildDataProps(data)
|
75
73
|
const htmlProps = buildHtmlProps(htmlOptions);
|
@@ -91,18 +89,13 @@ const BarGraph = ({
|
|
91
89
|
subtitle: {
|
92
90
|
text: subTitle,
|
93
91
|
},
|
94
|
-
yAxis:
|
95
|
-
labels: {
|
96
|
-
format: typeof axisFormat === 'string' ? axisFormat : (axisFormat && axisFormat[0] ? axisFormat[0].format : "")
|
97
|
-
|
98
|
-
},
|
92
|
+
yAxis: {
|
99
93
|
min: yAxisMin,
|
100
94
|
max: yAxisMax,
|
101
|
-
opposite: false,
|
102
95
|
title: {
|
103
|
-
text:
|
104
|
-
}
|
105
|
-
}
|
96
|
+
text: axisTitle,
|
97
|
+
},
|
98
|
+
},
|
106
99
|
xAxis: {
|
107
100
|
categories: xAxisCategories,
|
108
101
|
},
|
@@ -131,20 +124,6 @@ const BarGraph = ({
|
|
131
124
|
credits: false,
|
132
125
|
};
|
133
126
|
|
134
|
-
if (Array.isArray(axisTitle) && axisTitle.length > 1 && axisTitle[1].name) {
|
135
|
-
staticOptions.yAxis.push({
|
136
|
-
labels: {
|
137
|
-
format: typeof axisFormat === 'string' ? axisFormat : axisFormat[1].format,
|
138
|
-
},
|
139
|
-
min: yAxisMin,
|
140
|
-
max: yAxisMax,
|
141
|
-
opposite: true,
|
142
|
-
title: {
|
143
|
-
text: axisTitle[1].name,
|
144
|
-
}
|
145
|
-
});
|
146
|
-
}
|
147
|
-
|
148
127
|
if (!toggleLegendClick) {
|
149
128
|
staticOptions.plotOptions.series.events = { legendItemClick: () => false };
|
150
129
|
}
|
@@ -7,7 +7,6 @@ module Playbook
|
|
7
7
|
values: %w[left right center],
|
8
8
|
default: "center"
|
9
9
|
prop :axis_title
|
10
|
-
prop :axis_format
|
11
10
|
prop :chart_data, type: Playbook::Props::Array,
|
12
11
|
default: []
|
13
12
|
prop :custom_options, default: {}
|
@@ -52,7 +51,6 @@ module Playbook
|
|
52
51
|
title: title,
|
53
52
|
subTitle: subtitle,
|
54
53
|
axisTitle: axis_title,
|
55
|
-
axisFormat: axis_format,
|
56
54
|
pointStart: point_start,
|
57
55
|
xAxisCategories: x_axis_categories,
|
58
56
|
yAxisMin: y_axis_min,
|
@@ -9,7 +9,6 @@ examples:
|
|
9
9
|
- bar_graph_spline: Spline
|
10
10
|
- bar_graph_colors: Color Overrides
|
11
11
|
- bar_graph_custom: Custom Overrides
|
12
|
-
- bar_graph_secondary_y_axis: Secondary Y-Axis
|
13
12
|
|
14
13
|
|
15
14
|
react:
|
@@ -21,4 +20,3 @@ examples:
|
|
21
20
|
- bar_graph_spline: Spline
|
22
21
|
- bar_graph_colors: Color Overrides
|
23
22
|
- bar_graph_custom: Custom Overrides
|
24
|
-
- bar_graph_secondary_y_axis: Secondary Y-Axis
|
@@ -6,4 +6,3 @@ export { default as BarGraphHeight } from './_bar_graph_height.jsx'
|
|
6
6
|
export { default as BarGraphSpline } from './_bar_graph_spline.jsx'
|
7
7
|
export { default as BarGraphColors } from './_bar_graph_colors.jsx'
|
8
8
|
export { default as BarGraphCustom } from './_bar_graph_custom.jsx'
|
9
|
-
export { default as BarGraphSecondaryYAxis } from './_bar_graph_secondary_y_axis.jsx'
|
@@ -7,21 +7,17 @@ import { get, isString, uniqueId } from 'lodash'
|
|
7
7
|
import { globalProps } from '../utilities/globalProps'
|
8
8
|
import classnames from 'classnames'
|
9
9
|
|
10
|
-
import
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
ValueContainer,
|
19
|
-
} from "./components"
|
20
|
-
|
21
|
-
import * as kitComponents from "./components"
|
10
|
+
import Control from './components/Control'
|
11
|
+
import ClearIndicator from './components/ClearIndicator'
|
12
|
+
import IndicatorsContainer from './components/IndicatorsContainer'
|
13
|
+
import MenuList from './components/MenuList'
|
14
|
+
import MultiValue from './components/MultiValue'
|
15
|
+
import Option from './components/Option'
|
16
|
+
import Placeholder from './components/Placeholder'
|
17
|
+
import ValueContainer from './components/ValueContainer'
|
22
18
|
|
23
19
|
import { noop, buildDataProps, buildHtmlProps } from '../utilities/props'
|
24
|
-
import {
|
20
|
+
import { Noop } from '../types'
|
25
21
|
|
26
22
|
/**
|
27
23
|
* @typedef {object} Props
|
@@ -33,7 +29,7 @@ import { GenericObject, Noop } from '../types'
|
|
33
29
|
type TypeaheadProps = {
|
34
30
|
async?: boolean,
|
35
31
|
className?: string,
|
36
|
-
components?:
|
32
|
+
components?: object,
|
37
33
|
createable?: boolean,
|
38
34
|
dark?: boolean,
|
39
35
|
data?: { [key: string]: string },
|
@@ -104,7 +100,7 @@ const Typeahead = ({
|
|
104
100
|
multiKit: '',
|
105
101
|
onCreateOption: null as null,
|
106
102
|
plusIcon: false,
|
107
|
-
onMultiValueClick: (_option: SelectValueType)
|
103
|
+
onMultiValueClick: (_option: SelectValueType) => { },
|
108
104
|
...props,
|
109
105
|
}
|
110
106
|
|
@@ -141,23 +137,19 @@ const Typeahead = ({
|
|
141
137
|
const inlineClass = selectProps.inline ? 'inline' : null
|
142
138
|
|
143
139
|
return (
|
144
|
-
<div
|
145
|
-
|
146
|
-
|
147
|
-
|
140
|
+
<div
|
141
|
+
{...dataProps}
|
142
|
+
{...htmlProps}
|
143
|
+
className={classnames(classes, inlineClass)}
|
148
144
|
>
|
149
145
|
<Tag
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
146
|
+
classNamePrefix="typeahead-kit-select"
|
147
|
+
error={error}
|
148
|
+
onChange={handleOnChange}
|
149
|
+
{...selectProps}
|
154
150
|
/>
|
155
151
|
</div>
|
156
152
|
)
|
157
153
|
}
|
158
154
|
|
159
|
-
Object.keys(kitComponents).forEach((k) => {
|
160
|
-
(Typeahead as GenericObject)[k] = (kitComponents as {[key: string]: unknown})[k]
|
161
|
-
})
|
162
|
-
|
163
155
|
export default Typeahead
|
@@ -1,12 +1,10 @@
|
|
1
1
|
import React from 'react'
|
2
2
|
import { components } from 'react-select'
|
3
3
|
|
4
|
-
const MenuList = (props: any) =>
|
5
|
-
return (
|
4
|
+
const MenuList = (props: any) => (
|
6
5
|
<components.MenuList {...props}>
|
7
6
|
{props.children}
|
8
|
-
{props.footer}
|
9
7
|
</components.MenuList>
|
10
|
-
)
|
8
|
+
)
|
11
9
|
|
12
10
|
export default MenuList
|
@@ -9,4 +9,3 @@ export { default as TypeaheadMultiKit } from './_typeahead_multi_kit.jsx'
|
|
9
9
|
export { default as TypeaheadCreateable } from './_typeahead_createable.jsx'
|
10
10
|
export { default as TypeaheadAsyncCreateable } from './_typeahead_async_createable.jsx'
|
11
11
|
export { default as TypeaheadErrorState } from './_typeahead_error_state.jsx'
|
12
|
-
export { default as TypeaheadCustomMenuList } from './_typeahead_custom_menu_list.jsx'
|