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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f32666e4b2500b014dc2554c3ebf3f5f4e3695cc726a3fc1d53bf5b332455a5
4
- data.tar.gz: ff93821e0818cfbf57b09ece3fe03ce0c5459e4d29161f896d5771a3e8eb3761
3
+ metadata.gz: 452a03b346d2fe5cd79019537fb3bc6ac4bfbdaa621b3e552d898bdaaf1e7c00
4
+ data.tar.gz: fd5127e3deb4e55449b11d1d989335e3b48cfda1d0064b353d615749eef417c6
5
5
  SHA512:
6
- metadata.gz: 93c9e3de45864e757c047b19dd7eeed12610d97f234a160183143155ab0dbb88ea6087414e212ffd1037eff4064b239ba7eecfbb30627753f4b4ab1bfcacf1a9
7
- data.tar.gz: a5264af573a6eac322795be8739d2a3974a72085e3d5d163b79f4b1882899483b5e82f5205c1ced23c85d1dcc10f53d67570c3067645169fe9cf41f08062eca6
6
+ metadata.gz: 48edcdfd01a13c5082b670efa0a5d689cd3e3793ce9adacb1789f047bc1514f8f428194d2ea43e1e9bdef4b11d62a496a0b064d6009fed455287ca770ddb81fa
7
+ data.tar.gz: 37f2323fd3f2a3b4ea76822e139a9bc2c627f7c3bc6817f1f6092c7d9ea9159db7c9916bd0737baab951f7b4aeae28f17dfe5025282ad678898b5eb40bf05ffb
@@ -1,4 +1,9 @@
1
- <%= object.pb_content_tag(:div, data: object.data.merge(initials: object.initials)) do %>
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: { name: string; }[] | string;
16
+ axisTitle: string;
17
17
  dark?: boolean;
18
18
  xAxisCategories: [];
19
19
  yAxisMin: number;
20
20
  yAxisMax: number;
21
- chartData: { name: string; data: number[], yAxis: 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: typeof axisTitle === 'string' ? axisTitle : axisTitle[0].name,
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'
@@ -19,7 +19,7 @@
19
19
  }
20
20
  }
21
21
  b, strong {
22
- font-weight: $bold;
22
+ @include pb_title_4
23
23
  }
24
24
 
25
25
  a {
@@ -29,8 +29,8 @@
29
29
  }
30
30
  }
31
31
 
32
- em, i {
33
- font-style: italic;
32
+ em {
33
+ font-weight: $bold;
34
34
  }
35
35
 
36
36
  small {
@@ -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
- Control,
12
- ClearIndicator,
13
- IndicatorsContainer,
14
- MenuList,
15
- MultiValue,
16
- Option,
17
- Placeholder,
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 { GenericObject, Noop } from '../types'
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?: GenericObject,
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): any => undefined,
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
- {...dataProps}
146
- {...htmlProps}
147
- className={classnames(classes, inlineClass)}
140
+ <div
141
+ {...dataProps}
142
+ {...htmlProps}
143
+ className={classnames(classes, inlineClass)}
148
144
  >
149
145
  <Tag
150
- classNamePrefix="typeahead-kit-select"
151
- error={error}
152
- onChange={handleOnChange}
153
- {...selectProps}
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
@@ -46,7 +46,7 @@ const TypeaheadWithHighlight = (props) => {
46
46
  if (!inputValue.length) return text
47
47
  return text.replace(
48
48
  new RegExp(inputValue, 'gi'),
49
- (highlighted) => `<mark>${highlighted}</mark>`
49
+ highlighted => `<mark>${highlighted}</mark>`
50
50
  )
51
51
  }
52
52
  return (
@@ -22,4 +22,3 @@ examples:
22
22
  - typeahead_createable: Createable
23
23
  - typeahead_async_createable: Createable (+ Async Data)
24
24
  - typeahead_error_state: Error State
25
- - typeahead_custom_menu_list: Custom 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'