playbook_ui 10.26.0.pre.alpha1 → 10.26.0.pre.alpha.sticky1
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/data/menu.yml +0 -1
- data/app/pb_kits/playbook/index.js +1 -2
- data/app/pb_kits/playbook/pb_button/docs/_button_default.html.erb +0 -1
- data/app/pb_kits/playbook/pb_caption/{_caption.tsx → _caption.jsx} +8 -7
- data/app/pb_kits/playbook/pb_dashboard/pbChartsDarkTheme.js +0 -37
- data/app/pb_kits/playbook/pb_dashboard/pbChartsLightTheme.js +0 -37
- data/app/pb_kits/playbook/pb_form_pill/_form_pill.jsx +1 -1
- data/app/pb_kits/playbook/pb_kit/dateTime.js +2 -1
- data/app/pb_kits/playbook/pb_pill/_pill.jsx +1 -1
- data/app/pb_kits/playbook/pb_table/_table.jsx +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb +83 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx +94 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_sticky.md +10 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_table/styles/_all.scss +1 -0
- data/app/pb_kits/playbook/pb_table/styles/_sticky_header.scss +23 -0
- data/app/pb_kits/playbook/pb_table/table.rb +7 -1
- data/app/pb_kits/playbook/pb_table/table.test.js +17 -0
- data/app/pb_kits/playbook/pb_title/{_title.tsx → _title.jsx} +12 -10
- data/app/pb_kits/playbook/pb_title/title.test.js +2 -2
- data/app/pb_kits/playbook/playbook-doc.js +0 -2
- data/app/pb_kits/playbook/playbook-rails-react-bindings.js +0 -2
- data/app/pb_kits/playbook/plugins/pb_chart.js +0 -34
- data/app/pb_kits/playbook/utilities/_flex_direction.scss +15 -28
- data/app/pb_kits/playbook/utilities/globalProps.ts +110 -94
- data/app/pb_kits/playbook/utilities/text.js +15 -0
- data/lib/playbook/flex_direction.rb +1 -7
- data/lib/playbook/version.rb +1 -1
- metadata +11 -27
- data/app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.jsx +0 -79
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_description.md +0 -5
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.html.erb +0 -37
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.jsx +0 -48
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.md +0 -2
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.html.erb +0 -37
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.jsx +0 -47
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.md +0 -3
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.html.erb +0 -79
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.jsx +0 -90
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.md +0 -1
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.html.erb +0 -54
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.jsx +0 -65
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.md +0 -3
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.html.erb +0 -37
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx +0 -48
- data/app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.md +0 -3
- data/app/pb_kits/playbook/pb_treemap_chart/docs/example.yml +0 -15
- data/app/pb_kits/playbook/pb_treemap_chart/docs/index.js +0 -5
- data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.html.erb +0 -1
- data/app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb +0 -43
- data/app/pb_kits/playbook/utilities/text.ts +0 -22
@@ -7,7 +7,6 @@ import colors from '../tokens/exports/_colors.scss'
|
|
7
7
|
import pie from 'highcharts/modules/variable-pie'
|
8
8
|
import highchartsMore from 'highcharts/highcharts-more'
|
9
9
|
import solidGauge from 'highcharts/modules/solid-gauge'
|
10
|
-
import treemap from 'highcharts/modules/treemap'
|
11
10
|
|
12
11
|
pie(Highcharts)
|
13
12
|
|
@@ -64,8 +63,6 @@ class pbChart {
|
|
64
63
|
this.setupPieChart(options)
|
65
64
|
} else if (this.options.type == 'gauge') {
|
66
65
|
this.setupGauge(options)
|
67
|
-
} else if (this.options.type == 'treemap') {
|
68
|
-
this.setupTreemap(options)
|
69
66
|
} else {
|
70
67
|
this.setupChart(options)
|
71
68
|
}
|
@@ -194,37 +191,6 @@ class pbChart {
|
|
194
191
|
})
|
195
192
|
}
|
196
193
|
|
197
|
-
setupTreemap(options) {
|
198
|
-
treemap(Highcharts)
|
199
|
-
this.setupTheme()
|
200
|
-
options.dark ? Highcharts.setOptions(highchartsDarkTheme) : Highcharts.setOptions(highchartsTheme)
|
201
|
-
|
202
|
-
Highcharts.chart(this.defaults.id, {
|
203
|
-
title: {
|
204
|
-
text: this.defaults.title,
|
205
|
-
},
|
206
|
-
chart: {
|
207
|
-
height: this.defaults.height,
|
208
|
-
type: this.defaults.type,
|
209
|
-
},
|
210
|
-
credits: false,
|
211
|
-
series: [{
|
212
|
-
data: this.defaults.chartData,
|
213
|
-
}],
|
214
|
-
plotOptions: {
|
215
|
-
treemap: {
|
216
|
-
allowTraversingTree: this.defaults.drillable,
|
217
|
-
colorByPoint: !this.defaults.grouped,
|
218
|
-
colors: options.colors !== undefined && options.colors.length > 0 ? mapColors(options.colors) : highchartsTheme.colors,
|
219
|
-
},
|
220
|
-
},
|
221
|
-
tooltip: {
|
222
|
-
pointFormat: this.defaults.tooltipHtml,
|
223
|
-
useHTML: true,
|
224
|
-
},
|
225
|
-
})
|
226
|
-
}
|
227
|
-
|
228
194
|
setupChart(options) {
|
229
195
|
this.setupTheme()
|
230
196
|
const configOptions = {
|
@@ -1,32 +1,19 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
column_reverse: column-reverse
|
6
|
-
);
|
7
|
-
|
8
|
-
$media-query-breakpoints: (
|
9
|
-
xs: "xs",
|
10
|
-
sm: "sm",
|
11
|
-
md: "md",
|
12
|
-
lg: "lg",
|
13
|
-
xl: "xl"
|
14
|
-
);
|
1
|
+
.flex_direction_row {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: row !important;
|
4
|
+
}
|
15
5
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
flex-direction: #{$flex-direction-value} !important;
|
20
|
-
}
|
6
|
+
.flex_direction_column {
|
7
|
+
display: flex;
|
8
|
+
flex-direction: column !important;
|
21
9
|
}
|
22
10
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
display: flex;
|
27
|
-
@include break_at( breakpoint($breakpoint-value)) {
|
28
|
-
flex-direction: #{$flex-direction-value} !important;
|
29
|
-
}
|
30
|
-
}
|
31
|
-
}
|
11
|
+
.flex_direction_row_reverse {
|
12
|
+
display: flex;
|
13
|
+
flex-direction: row-reverse !important;
|
32
14
|
}
|
15
|
+
|
16
|
+
.flex_direction_column_reverse {
|
17
|
+
display: flex;
|
18
|
+
flex-direction: column-reverse !important;
|
19
|
+
}
|
@@ -1,54 +1,74 @@
|
|
1
|
-
// Please keep these in alphabetical order
|
2
1
|
import { omit } from 'lodash'
|
3
|
-
import { camelToSnakeCase } from './text'
|
4
2
|
|
5
|
-
type
|
3
|
+
type Sizes = "xs" | "sm" | "md" | "lg" | "xl"
|
4
|
+
type None = "none"
|
6
5
|
|
7
|
-
type
|
8
|
-
|
6
|
+
type AllSizes = None & Sizes
|
7
|
+
|
8
|
+
type Margin = {
|
9
|
+
marginRight?: AllSizes,
|
10
|
+
marginLeft?: AllSizes,
|
11
|
+
marginTop?: AllSizes,
|
12
|
+
marginBottom?: AllSizes,
|
13
|
+
marginX?: AllSizes,
|
14
|
+
marginY?: AllSizes,
|
15
|
+
margin?: AllSizes,
|
9
16
|
}
|
10
17
|
|
11
|
-
type
|
12
|
-
|
18
|
+
type Padding = {
|
19
|
+
paddingRight?: AllSizes,
|
20
|
+
paddingLeft?: AllSizes,
|
21
|
+
paddingTop?: AllSizes,
|
22
|
+
paddingBottom?: AllSizes,
|
23
|
+
paddingX?: AllSizes,
|
24
|
+
paddingY?: AllSizes,
|
25
|
+
padding?: AllSizes,
|
13
26
|
}
|
14
27
|
|
15
|
-
type
|
16
|
-
|
28
|
+
type Dark = {
|
29
|
+
dark?: boolean,
|
17
30
|
}
|
18
|
-
type AllSizes = None & Sizes
|
19
31
|
|
20
|
-
type
|
21
|
-
|
32
|
+
type NumberSpacing = {
|
33
|
+
numberSpacing?: "tabular",
|
22
34
|
}
|
23
35
|
|
24
|
-
type
|
25
|
-
|
36
|
+
type MaxWidth = {
|
37
|
+
maxWidth?: Sizes,
|
26
38
|
}
|
27
39
|
|
28
|
-
type
|
29
|
-
|
40
|
+
type ZIndex = {
|
41
|
+
zIndex?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10,
|
42
|
+
}
|
43
|
+
|
44
|
+
type Shadow = {
|
45
|
+
shadow?: "none" | "deep" | "deeper" | "deepest",
|
46
|
+
}
|
47
|
+
|
48
|
+
type LineHeight = {
|
49
|
+
lineHeight?: "loosest" | "looser" | "loose" | "normal" | "tight" | "tighter" | "tightest",
|
30
50
|
}
|
31
51
|
|
32
52
|
type Display = {
|
33
53
|
display?: "block" | "flex" | "hidden" | "inline_block" | "inline" | "inline_flex",
|
34
54
|
}
|
35
55
|
|
56
|
+
type Cursor = {
|
57
|
+
cursor?: "pointer",
|
58
|
+
}
|
59
|
+
|
60
|
+
type BorderRadius = {
|
61
|
+
borderRadius?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "rounded",
|
62
|
+
}
|
63
|
+
|
36
64
|
type Flex = {
|
37
65
|
flex?: "none" | "initial" | "auto" | 1
|
38
66
|
}
|
39
67
|
|
40
68
|
type FlexDirection = {
|
41
|
-
flexDirection?:
|
42
|
-
xs?: FlexDirectionOptions,
|
43
|
-
sm?: FlexDirectionOptions,
|
44
|
-
md?: FlexDirectionOptions,
|
45
|
-
lg?: FlexDirectionOptions,
|
46
|
-
xl?: FlexDirectionOptions,
|
47
|
-
}
|
69
|
+
flexDirection?: "row" | "column" | "rowReverse" | "columnReverse"
|
48
70
|
}
|
49
71
|
|
50
|
-
type FlexDirectionOptions = "row" | "column" | "row_reverse" | "column_reverse"
|
51
|
-
|
52
72
|
type FlexGrow = {
|
53
73
|
flexGrow?: 0 | 1
|
54
74
|
}
|
@@ -58,9 +78,13 @@ type FlexShrink = {
|
|
58
78
|
}
|
59
79
|
|
60
80
|
type FlexWrap = {
|
61
|
-
flexWrap?: "wrap" | "nowrap" | "
|
81
|
+
flexWrap?: "wrap" | "nowrap" | "wrapReverse"
|
62
82
|
}
|
63
83
|
|
84
|
+
type Alignment = "start" | "end" | "center"
|
85
|
+
|
86
|
+
type Space = "spaceBetween" | "spaceAround" | "spaceEvenly"
|
87
|
+
|
64
88
|
type JustifyContent = {
|
65
89
|
justifyContent?: Alignment & Space
|
66
90
|
}
|
@@ -69,57 +93,22 @@ type JustifySelf = {
|
|
69
93
|
justifySelf?: Alignment & ("auto" | "stretch")
|
70
94
|
}
|
71
95
|
|
72
|
-
type
|
73
|
-
|
74
|
-
}
|
75
|
-
|
76
|
-
type Margin = {
|
77
|
-
marginRight?: AllSizes,
|
78
|
-
marginLeft?: AllSizes,
|
79
|
-
marginTop?: AllSizes,
|
80
|
-
marginBottom?: AllSizes,
|
81
|
-
marginX?: AllSizes,
|
82
|
-
marginY?: AllSizes,
|
83
|
-
margin?: AllSizes,
|
96
|
+
type AlignContent = {
|
97
|
+
alignContent?: Alignment & Space
|
84
98
|
}
|
85
99
|
|
86
|
-
type
|
87
|
-
|
100
|
+
type AlignItems = {
|
101
|
+
alignItems?: Alignment & ("flexStart" | "flexEnd" | "stretch" | "baseline")
|
88
102
|
}
|
89
103
|
|
90
|
-
type
|
91
|
-
|
92
|
-
type NumberSpacing = {
|
93
|
-
numberSpacing?: "tabular",
|
104
|
+
type AlignSelf = {
|
105
|
+
alignSelf?: Alignment & ("auto" | "stretch" | "baseline")
|
94
106
|
}
|
95
107
|
|
96
108
|
type Order = {
|
97
109
|
order?: "none" | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
|
98
110
|
}
|
99
111
|
|
100
|
-
type Padding = {
|
101
|
-
paddingRight?: AllSizes,
|
102
|
-
paddingLeft?: AllSizes,
|
103
|
-
paddingTop?: AllSizes,
|
104
|
-
paddingBottom?: AllSizes,
|
105
|
-
paddingX?: AllSizes,
|
106
|
-
paddingY?: AllSizes,
|
107
|
-
padding?: AllSizes,
|
108
|
-
}
|
109
|
-
|
110
|
-
type Shadow = {
|
111
|
-
shadow?: "none" | "deep" | "deeper" | "deepest",
|
112
|
-
}
|
113
|
-
|
114
|
-
type Sizes = "xs" | "sm" | "md" | "lg" | "xl"
|
115
|
-
|
116
|
-
type Space = "spaceBetween" | "spaceAround" | "spaceEvenly"
|
117
|
-
|
118
|
-
type ZIndex = {
|
119
|
-
zIndex?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10,
|
120
|
-
}
|
121
|
-
|
122
|
-
// keep this as the last type definition
|
123
112
|
export type GlobalProps = AlignContent & AlignItems & AlignSelf &
|
124
113
|
BorderRadius & Cursor & Dark & Display & Flex & FlexDirection &
|
125
114
|
FlexGrow & FlexShrink & FlexWrap & JustifyContent & JustifySelf &
|
@@ -201,49 +190,76 @@ const PROP_CATEGORIES: {[key:string]: (props: {[key: string]: any}) => string} =
|
|
201
190
|
css += cursor ? `cursor_${cursor} ` : ''
|
202
191
|
return css
|
203
192
|
},
|
193
|
+
flexDirectionProps: ({ flexDirection }: FlexDirection) => {
|
194
|
+
let css = ''
|
195
|
+
css += flexDirection == 'columnReverse' ? 'flex_direction_column_reverse' :
|
196
|
+
flexDirection == 'rowReverse' ? 'flex_direction_row_reverse' :
|
197
|
+
flexDirection ? `flex_direction_${flexDirection} ` : ''
|
198
|
+
return css
|
199
|
+
},
|
200
|
+
flexWrapProps: ({ flexWrap }: FlexWrap) => {
|
201
|
+
let css = ''
|
202
|
+
css += flexWrap == 'wrapReverse' ? 'flex_wrap_reverse' :
|
203
|
+
flexWrap == 'nowrap' ? 'flex_nowrap' :
|
204
|
+
flexWrap ? `flex_wrap_${flexWrap} ` : ''
|
205
|
+
return css
|
206
|
+
},
|
207
|
+
justifyContentProps: ({ justifyContent }: JustifyContent) => {
|
208
|
+
let css = ''
|
209
|
+
css += justifyContent == 'spaceBetween' ? 'justify_content_space_between' :
|
210
|
+
justifyContent == 'spaceEvenly' ? 'justify_content_space_evenly' :
|
211
|
+
justifyContent == 'spaceAround' ? 'justify_content_space_around' :
|
212
|
+
justifyContent ? `justify_content_${justifyContent}` : ''
|
213
|
+
return css
|
214
|
+
},
|
215
|
+
justifySelfProps: ({ justifySelf }: JustifySelf) => {
|
216
|
+
let css = ''
|
217
|
+
css += justifySelf ? `justify_self_${justifySelf}` : ''
|
218
|
+
return css
|
219
|
+
},
|
204
220
|
alignItemsProps: ({ alignItems }: AlignItems) => {
|
205
|
-
|
221
|
+
let css = ''
|
222
|
+
css += alignItems == 'flexStart' ? 'align_items_flex_start' :
|
223
|
+
alignItems == 'flexEnd' ? 'align_items_flex_end' :
|
224
|
+
alignItems ? `align_items_${alignItems}` : ''
|
225
|
+
return css
|
206
226
|
},
|
207
227
|
alignContentProps: ({ alignContent }: AlignContent) => {
|
208
|
-
|
228
|
+
let css = ''
|
229
|
+
css += alignContent == 'spaceBetween' ? 'align_content_space_between' :
|
230
|
+
alignContent == 'spaceEvenly' ? 'align_content_space_evenly' :
|
231
|
+
alignContent == 'spaceAround' ? 'align_content_space_around' :
|
232
|
+
alignContent ? `align_content_${alignContent}` : ''
|
233
|
+
return css
|
209
234
|
},
|
210
235
|
alignSelfProps: ({ alignSelf }: AlignSelf) => {
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
if (typeof flexDirection !== 'object') return
|
215
|
-
|
216
|
-
const flexKeys: string[] = Object.keys(flexDirection)
|
217
|
-
|
218
|
-
return flexKeys.map((key: Sizes) => {
|
219
|
-
const flexDirectionValue: string = flexDirection[key]
|
220
|
-
return `flex_direction_${key}_${flexDirectionValue}`
|
221
|
-
}).join(" ")
|
222
|
-
},
|
223
|
-
flexWrapProps: ({ flexWrap }: FlexWrap) => {
|
224
|
-
return flexWrap ? `flex_wrap_${flexWrap} ` : ''
|
236
|
+
let css = ''
|
237
|
+
css += alignSelf ? `align_self_${alignSelf}` : ''
|
238
|
+
return css
|
225
239
|
},
|
226
240
|
flexProps: ({ flex }: Flex) => {
|
227
|
-
|
241
|
+
let css = ''
|
242
|
+
css += flex ? `flex_${flex}` : ''
|
243
|
+
return css
|
228
244
|
},
|
229
245
|
flexGrowProps: ({ flexGrow }: FlexGrow) => {
|
230
|
-
|
246
|
+
let css = ''
|
247
|
+
css += flexGrow ? `flex_grow_${flexGrow}` : ''
|
248
|
+
return css
|
231
249
|
},
|
232
250
|
flexShrinkProps: ({ flexShrink }: FlexShrink) => {
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
return justifyContent ? `justify_content_${camelToSnakeCase(justifyContent)}` : ''
|
237
|
-
},
|
238
|
-
justifySelfProps: ({ justifySelf }: JustifySelf) => {
|
239
|
-
return justifySelf ? `justify_self_${justifySelf}` : ''
|
251
|
+
let css = ''
|
252
|
+
css += flexShrink ? `flex_shrink_${flexShrink}` : ''
|
253
|
+
return css
|
240
254
|
},
|
241
255
|
orderProps: ({ order }: Order) => {
|
242
|
-
|
256
|
+
let css = ''
|
257
|
+
css += order ? `order_${order}` : ''
|
258
|
+
return css
|
243
259
|
}
|
244
260
|
}
|
245
261
|
|
246
|
-
export const globalProps = (props: GlobalProps, defaultProps: {[key: string]: string} |
|
262
|
+
export const globalProps = (props: GlobalProps, defaultProps: {[key: string]: string} | {} = {}): string => {
|
247
263
|
const allProps = { ...props, ...defaultProps }
|
248
264
|
return Object.keys(PROP_CATEGORIES).map((key) => {
|
249
265
|
return PROP_CATEGORIES[key](allProps)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { filter, isEmpty } from 'lodash'
|
2
|
+
|
3
|
+
const titleizedWord = (string) => (
|
4
|
+
string.charAt(0).toUpperCase() + string.slice(1).toLowerCase()
|
5
|
+
)
|
6
|
+
|
7
|
+
export const titleize = (sentence) => (
|
8
|
+
isEmpty(sentence) ? sentence : sentence.split(' ').map(titleizedWord).join(' ')
|
9
|
+
)
|
10
|
+
|
11
|
+
const notEmpty = (value) => !isEmpty(value)
|
12
|
+
|
13
|
+
export const joinPresent = (array, separator) => (
|
14
|
+
filter(array, notEmpty).join(separator)
|
15
|
+
)
|
@@ -12,13 +12,7 @@ module Playbook
|
|
12
12
|
|
13
13
|
selected_props.map do |k|
|
14
14
|
flex_direction_value = send(k)
|
15
|
-
if
|
16
|
-
flex_direction_value.map do |media_size, flex_value|
|
17
|
-
"flex_direction_#{media_size}_#{flex_value}"
|
18
|
-
end
|
19
|
-
else
|
20
|
-
"flex_direction_#{flex_direction_value}" unless flex_direction_value.nil?
|
21
|
-
end
|
15
|
+
"flex_direction_#{flex_direction_value}" if flex_direction_values.include? flex_direction_value
|
22
16
|
end.compact.join(" ")
|
23
17
|
end
|
24
18
|
|
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: 10.26.0.pre.
|
4
|
+
version: 10.26.0.pre.alpha.sticky1
|
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: 2022-04
|
12
|
+
date: 2022-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|
@@ -452,8 +452,8 @@ files:
|
|
452
452
|
- app/pb_kits/playbook/pb_button_toolbar/docs/_description.md
|
453
453
|
- app/pb_kits/playbook/pb_button_toolbar/docs/example.yml
|
454
454
|
- app/pb_kits/playbook/pb_button_toolbar/docs/index.js
|
455
|
+
- app/pb_kits/playbook/pb_caption/_caption.jsx
|
455
456
|
- app/pb_kits/playbook/pb_caption/_caption.scss
|
456
|
-
- app/pb_kits/playbook/pb_caption/_caption.tsx
|
457
457
|
- app/pb_kits/playbook/pb_caption/_caption_mixin.scss
|
458
458
|
- app/pb_kits/playbook/pb_caption/caption.html.erb
|
459
459
|
- app/pb_kits/playbook/pb_caption/caption.rb
|
@@ -1734,6 +1734,9 @@ files:
|
|
1734
1734
|
- app/pb_kits/playbook/pb_table/docs/_table_sm.html.erb
|
1735
1735
|
- app/pb_kits/playbook/pb_table/docs/_table_sm.jsx
|
1736
1736
|
- app/pb_kits/playbook/pb_table/docs/_table_sm.md
|
1737
|
+
- app/pb_kits/playbook/pb_table/docs/_table_sticky.html.erb
|
1738
|
+
- app/pb_kits/playbook/pb_table/docs/_table_sticky.jsx
|
1739
|
+
- app/pb_kits/playbook/pb_table/docs/_table_sticky.md
|
1737
1740
|
- app/pb_kits/playbook/pb_table/docs/_table_two_actions.html.erb
|
1738
1741
|
- app/pb_kits/playbook/pb_table/docs/_table_two_actions.jsx
|
1739
1742
|
- app/pb_kits/playbook/pb_table/docs/_table_two_actions.md
|
@@ -1755,6 +1758,7 @@ files:
|
|
1755
1758
|
- app/pb_kits/playbook/pb_table/styles/_reset.scss
|
1756
1759
|
- app/pb_kits/playbook/pb_table/styles/_side_highlight.scss
|
1757
1760
|
- app/pb_kits/playbook/pb_table/styles/_single-line.scss
|
1761
|
+
- app/pb_kits/playbook/pb_table/styles/_sticky_header.scss
|
1758
1762
|
- app/pb_kits/playbook/pb_table/styles/_structure.scss
|
1759
1763
|
- app/pb_kits/playbook/pb_table/styles/_table-card.scss
|
1760
1764
|
- app/pb_kits/playbook/pb_table/styles/_table-dark.scss
|
@@ -1762,6 +1766,7 @@ files:
|
|
1762
1766
|
- app/pb_kits/playbook/pb_table/styles/_variables.scss
|
1763
1767
|
- app/pb_kits/playbook/pb_table/table.html.erb
|
1764
1768
|
- app/pb_kits/playbook/pb_table/table.rb
|
1769
|
+
- app/pb_kits/playbook/pb_table/table.test.js
|
1765
1770
|
- app/pb_kits/playbook/pb_table/table_row.html.erb
|
1766
1771
|
- app/pb_kits/playbook/pb_table/table_row.rb
|
1767
1772
|
- app/pb_kits/playbook/pb_text_input/_text_input.jsx
|
@@ -1884,8 +1889,8 @@ files:
|
|
1884
1889
|
- app/pb_kits/playbook/pb_timestamp/docs/index.js
|
1885
1890
|
- app/pb_kits/playbook/pb_timestamp/timestamp.html.erb
|
1886
1891
|
- app/pb_kits/playbook/pb_timestamp/timestamp.rb
|
1892
|
+
- app/pb_kits/playbook/pb_title/_title.jsx
|
1887
1893
|
- app/pb_kits/playbook/pb_title/_title.scss
|
1888
|
-
- app/pb_kits/playbook/pb_title/_title.tsx
|
1889
1894
|
- app/pb_kits/playbook/pb_title/_title_mixin.scss
|
1890
1895
|
- app/pb_kits/playbook/pb_title/docs/_description.md
|
1891
1896
|
- app/pb_kits/playbook/pb_title/docs/_title_colors.html.erb
|
@@ -1950,27 +1955,6 @@ files:
|
|
1950
1955
|
- app/pb_kits/playbook/pb_tooltip/index.js
|
1951
1956
|
- app/pb_kits/playbook/pb_tooltip/tooltip.html.erb
|
1952
1957
|
- app/pb_kits/playbook/pb_tooltip/tooltip.rb
|
1953
|
-
- app/pb_kits/playbook/pb_treemap_chart/_treemap_chart.jsx
|
1954
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_description.md
|
1955
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.html.erb
|
1956
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.jsx
|
1957
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_colors.md
|
1958
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.html.erb
|
1959
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.jsx
|
1960
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_default.md
|
1961
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.html.erb
|
1962
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.jsx
|
1963
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_drillable.md
|
1964
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.html.erb
|
1965
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.jsx
|
1966
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_grouped_data.md
|
1967
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.html.erb
|
1968
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.jsx
|
1969
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/_treemap_chart_tooltip.md
|
1970
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/example.yml
|
1971
|
-
- app/pb_kits/playbook/pb_treemap_chart/docs/index.js
|
1972
|
-
- app/pb_kits/playbook/pb_treemap_chart/treemap_chart.html.erb
|
1973
|
-
- app/pb_kits/playbook/pb_treemap_chart/treemap_chart.rb
|
1974
1958
|
- app/pb_kits/playbook/pb_typeahead/_typeahead.jsx
|
1975
1959
|
- app/pb_kits/playbook/pb_typeahead/_typeahead.scss
|
1976
1960
|
- app/pb_kits/playbook/pb_typeahead/components/ClearIndicator.jsx
|
@@ -2115,7 +2099,7 @@ files:
|
|
2115
2099
|
- app/pb_kits/playbook/utilities/globalProps.ts
|
2116
2100
|
- app/pb_kits/playbook/utilities/props.ts
|
2117
2101
|
- app/pb_kits/playbook/utilities/test-utils.js
|
2118
|
-
- app/pb_kits/playbook/utilities/text.
|
2102
|
+
- app/pb_kits/playbook/utilities/text.js
|
2119
2103
|
- dist/reset.css
|
2120
2104
|
- fonts/fontawesome-min.js
|
2121
2105
|
- fonts/regular-min.js
|
@@ -2176,7 +2160,7 @@ files:
|
|
2176
2160
|
- lib/playbook_ui.rb
|
2177
2161
|
homepage: http://playbook.powerapp.cloud
|
2178
2162
|
licenses:
|
2179
|
-
-
|
2163
|
+
- ISC
|
2180
2164
|
metadata: {}
|
2181
2165
|
post_install_message:
|
2182
2166
|
rdoc_options: []
|
@@ -1,79 +0,0 @@
|
|
1
|
-
/* @flow */
|
2
|
-
|
3
|
-
import React from 'react'
|
4
|
-
import classnames from 'classnames'
|
5
|
-
|
6
|
-
import { globalProps } from '../utilities/globalProps'
|
7
|
-
import pbChart from '../plugins/pb_chart'
|
8
|
-
|
9
|
-
type TreemapChartProps = {
|
10
|
-
chartData: array<{
|
11
|
-
name: string,
|
12
|
-
parent?: string | number,
|
13
|
-
value: number,
|
14
|
-
color?: string,
|
15
|
-
id?: string | number,
|
16
|
-
}>,
|
17
|
-
className?: string,
|
18
|
-
colors: array,
|
19
|
-
dark?: boolean,
|
20
|
-
drillable: boolean,
|
21
|
-
grouped: boolean,
|
22
|
-
height?: string,
|
23
|
-
id: number,
|
24
|
-
title: string,
|
25
|
-
tooltipHtml: string,
|
26
|
-
type?: string,
|
27
|
-
}
|
28
|
-
|
29
|
-
export default class TreemapChart extends React.Component<TreemapChartProps> {
|
30
|
-
static defaultProps = {
|
31
|
-
className: 'pb_treemap_chart',
|
32
|
-
dark: false,
|
33
|
-
drillable: false,
|
34
|
-
grouped: false,
|
35
|
-
type: 'treemap',
|
36
|
-
}
|
37
|
-
|
38
|
-
componentDidMount() {
|
39
|
-
const {
|
40
|
-
chartData,
|
41
|
-
className,
|
42
|
-
colors = [],
|
43
|
-
dark,
|
44
|
-
drillable,
|
45
|
-
grouped,
|
46
|
-
height,
|
47
|
-
id,
|
48
|
-
title = "",
|
49
|
-
tooltipHtml = '<span style="font-weight: bold; color:{point.color};">● </span>{point.name}: <b>{point.value}</b>',
|
50
|
-
type,
|
51
|
-
} = this.props
|
52
|
-
|
53
|
-
new pbChart(`.${className}`, {
|
54
|
-
chartData: chartData,
|
55
|
-
colors: colors,
|
56
|
-
dark,
|
57
|
-
drillable,
|
58
|
-
grouped,
|
59
|
-
height: height,
|
60
|
-
id: id,
|
61
|
-
title: title,
|
62
|
-
tooltipHtml,
|
63
|
-
type,
|
64
|
-
})
|
65
|
-
}
|
66
|
-
|
67
|
-
props: TreemapChartProps
|
68
|
-
|
69
|
-
render() {
|
70
|
-
const { className, id } = this.props
|
71
|
-
|
72
|
-
return (
|
73
|
-
<div
|
74
|
-
className={classnames(globalProps(this.props), className)}
|
75
|
-
id={id}
|
76
|
-
/>
|
77
|
-
)
|
78
|
-
}
|
79
|
-
}
|
@@ -1,5 +0,0 @@
|
|
1
|
-
Treemap charts are used to compare the relative size of groups of data. They can also use a nested data structure, allowing a user to drill down into a group to see its constituent data points.
|
2
|
-
|
3
|
-
The default height of treemap is 400px and can be changed. The default height is in pixel units, but can also use percentage string (percentage would be that of the width. For example, `height:"50%"` would mean that the height is 50% of the width). This allows for preserving the aspect ratio across responsive sizes.
|
4
|
-
|
5
|
-
For more information, see: <a href="https://api.highcharts.com/highcharts/chart.height" target="_blank"> highcharts/chart.height</a>.
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<% data = [
|
2
|
-
{
|
3
|
-
name: "Pepperoni",
|
4
|
-
parent: "Toppings",
|
5
|
-
value: 600,
|
6
|
-
}, {
|
7
|
-
name: "Cheese",
|
8
|
-
parent: "Toppings",
|
9
|
-
value: 510,
|
10
|
-
}, {
|
11
|
-
name: "Mushroom",
|
12
|
-
parent: "Toppings",
|
13
|
-
value: 330,
|
14
|
-
},{
|
15
|
-
name: "Onions",
|
16
|
-
parent: "Toppings",
|
17
|
-
value: 250,
|
18
|
-
}, {
|
19
|
-
name: "Olives",
|
20
|
-
parent: "Toppings",
|
21
|
-
value: 204,
|
22
|
-
}, {
|
23
|
-
name: "Pineapple",
|
24
|
-
parent: "Toppings",
|
25
|
-
value: 90,
|
26
|
-
}, {
|
27
|
-
name: "Pizza Toppings",
|
28
|
-
id: "Toppings",
|
29
|
-
},
|
30
|
-
] %>
|
31
|
-
|
32
|
-
<%= pb_rails("treemap_chart", props: {
|
33
|
-
chart_data: data,
|
34
|
-
colors: ["data-4", "data-7", "#8E6E53", "#124732"],
|
35
|
-
id: "treemap-colors",
|
36
|
-
title: "Favored Pizza Toppings",
|
37
|
-
}) %>
|