playbook_ui_docs 14.9.0.pre.rc.18 → 14.10.0.pre.alpha.PBNTR662stickyrightcolumnreact5160

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.html.erb +36 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_collapsible_trail_rails.md +1 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.jsx +60 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers.md +1 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx +74 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md +1 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx +50 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md +1 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx +57 -0
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.md +5 -0
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_pagination_mock_data.json +5600 -0
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +5 -0
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +4 -0
  15. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.jsx +53 -49
  16. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.html.erb +29 -36
  17. data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +6 -0
  18. data/app/pb_kits/playbook/pb_card/docs/_card_header.html.erb +21 -1
  19. data/app/pb_kits/playbook/pb_card/docs/_card_header.jsx +50 -0
  20. data/app/pb_kits/playbook/pb_card/docs/_card_header.md +1 -1
  21. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb +8 -0
  22. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx +9 -0
  23. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md +1 -0
  24. data/app/pb_kits/playbook/pb_gauge/docs/_gauge_complex.jsx +25 -5
  25. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.html.erb +17 -1
  26. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.jsx +15 -0
  27. data/app/pb_kits/playbook/pb_home_address_street/docs/_home_address_street_emphasis.md +2 -1
  28. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_filter.jsx +166 -0
  29. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_height_width.jsx +2 -0
  30. data/app/pb_kits/playbook/pb_skeleton_loading/docs/_skeleton_loading_user.jsx +89 -0
  31. data/app/pb_kits/playbook/pb_skeleton_loading/docs/example.yml +2 -1
  32. data/app/pb_kits/playbook/pb_skeleton_loading/docs/index.js +2 -0
  33. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.jsx +88 -0
  34. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_react.md +3 -0
  35. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +77 -0
  36. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.jsx +1 -1
  37. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +3 -0
  38. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_react.md +4 -1
  39. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.jsx +87 -0
  40. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_react.md +5 -0
  41. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.jsx +75 -0
  42. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible.md +1 -0
  43. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.jsx +108 -0
  44. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_click.md +2 -0
  45. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.jsx +94 -0
  46. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_custom_content.md +0 -0
  47. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.jsx +83 -0
  48. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_rows.md +3 -0
  49. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.jsx +120 -0
  50. data/app/pb_kits/playbook/pb_table/docs/_table_with_collapsible_with_nested_table.md +1 -0
  51. data/app/pb_kits/playbook/pb_table/docs/example.yml +7 -0
  52. data/app/pb_kits/playbook/pb_table/docs/index.js +5 -0
  53. data/app/pb_kits/playbook/pb_text_input/docs/_text_input_mask.jsx +88 -0
  54. data/app/pb_kits/playbook/pb_text_input/docs/example.yml +1 -0
  55. data/app/pb_kits/playbook/pb_text_input/docs/index.js +1 -0
  56. data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_highlight.jsx +9 -2
  57. data/dist/playbook-doc.js +1 -1
  58. metadata +33 -2
@@ -2,6 +2,7 @@ examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
4
  - advanced_table_beta_subrow_headers: SubRow Headers
5
+ - advanced_table_collapsible_trail_rails: Collapsible Trail
5
6
  - advanced_table_beta_sort: Enable Sorting
6
7
  - advanced_table_custom_cell_rails: Custom Components for Cells
7
8
 
@@ -18,3 +19,7 @@ examples:
18
19
  - advanced_table_inline_row_loading: Inline Row Loading
19
20
  - advanced_table_responsive: Responsive Tables
20
21
  - advanced_table_custom_cell: Custom Components for Cells
22
+ - advanced_table_pagination: Pagination
23
+ - advanced_table_pagination_with_props: Pagination Props
24
+ - advanced_table_column_headers: Multi-Header Columns
25
+ - advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
@@ -10,3 +10,7 @@ export { default as AdvancedTableTableProps } from './_advanced_table_table_prop
10
10
  export { default as AdvancedTableInlineRowLoading } from './_advanced_table_inline_row_loading.jsx'
11
11
  export { default as AdvancedTableResponsive } from './_advanced_table_responsive.jsx'
12
12
  export { default as AdvancedTableCustomCell } from './_advanced_table_custom_cell.jsx'
13
+ export { default as AdvancedTablePagination } from './_advanced_table_pagination.jsx'
14
+ export { default as AdvancedTablePaginationWithProps } from './_advanced_table_pagination_with_props.jsx'
15
+ export { default as AdvancedTableColumnHeaders } from './_advanced_table_column_headers.jsx'
16
+ export { default as AdvancedTableColumnHeadersMultiple } from './_advanced_table_column_headers_multiple.jsx'
@@ -1,66 +1,70 @@
1
1
  import React from 'react'
2
-
2
+ import ReactDOMServer from 'react-dom/server'
3
3
  import BarGraph from '../_bar_graph'
4
+ import Icon from '../../pb_icon/_icon'
5
+
6
+ const chartData = [
7
+ {
8
+ name: 'Role',
9
+ data: [0, 200, 300, 654, 656],
10
+ },
11
+ {
12
+ name: 'Company',
13
+ data: [150, 524, 320, 440, 500],
14
+ },
15
+ ]
4
16
 
5
- const chartData = [{
6
- name: 'Installation',
7
- data: [1475, 200, 3000, 654, 656],
8
- }, {
9
- name: 'Manufacturing',
10
- data: [4434, 524, 2320, 440, 500],
11
- }, {
12
- name: 'Sales & Distribution',
13
- data: [3387, 743, 1344, 434, 440],
14
- }, {
15
- name: 'Project Development',
16
- data: [3227, 878, 999, 780, 1000],
17
- }, {
18
- name: 'Other',
19
- data: [1111, 677, 3245, 500, 200],
20
- }]
17
+ const renderIcon = (iconName, color) => {
18
+ return ReactDOMServer.renderToStaticMarkup(
19
+ <Icon
20
+ color={color}
21
+ icon={iconName}
22
+ />)
23
+ };
21
24
 
22
25
  const barGraphOptions = {
23
- subtitle: {
24
- text: "Overwritten subtitle",
25
- style: {
26
- color: "red"
27
- }
26
+ yAxis: {
27
+ tickInterval: 5,
28
28
  },
29
29
  xAxis: {
30
- labels: {
31
- useHTML: true,
32
- formatter: function() {
33
- switch (this.value) {
34
- case 'Jan':
35
- return `<i class="far fa-apple-whole"></i> ${this.value}`
36
- case 'Feb':
37
- return `<i class="far fa-strawberry"></i> ${this.value}`
38
- case 'Mar':
39
- return `<i class="far fa-lemon"></i> ${this.value}`
40
- case 'Apr':
41
- return `<i class="far fa-pear"></i> ${this.value}`
42
- case 'May':
43
- return `<i class="far fa-peach"></i> ${this.value}`
44
- default:
45
- return ''
46
- }
47
- }
48
- }
49
- }
30
+ categories: ['1', '2', '3', '4', '5'],
31
+ labels: {
32
+ useHTML: true,
33
+ formatter: function () {
34
+ switch (this.value) {
35
+ case '1':
36
+ return `${renderIcon('frown', 'error')}`;
37
+ case '2':
38
+ return `${renderIcon('frown', 'warning')}`;
39
+ case '3':
40
+ return `${renderIcon('frown-open', 'neutral')}`;
41
+ case '4':
42
+ return `${renderIcon('smile', 'category_7')}`;
43
+ case '5':
44
+ return `${renderIcon('smile-beam', 'success')}`;
45
+ default:
46
+ return ''
47
+ }
48
+ },
49
+ style: {
50
+ fontSize: '1.4em',
51
+ },
52
+ y: 42,
53
+ },
54
+ },
55
+ legend: {
56
+ itemMarginTop: 62,
57
+ },
50
58
  }
51
59
 
52
- const BarGraphCustom = (props) => (
60
+ const BarGraphCustom = () => (
53
61
  <div>
54
62
  <BarGraph
55
- axisTitle="Number of Employees"
56
63
  chartData={chartData}
57
64
  customOptions={barGraphOptions}
58
- id="bar-custom"
59
- subTitle="Subtitle to replace"
65
+ id="happiness-dashboard"
66
+ legend
60
67
  title="Bar Graph with Custom Overrides"
61
- xAxisCategories={['Jan', 'Feb', 'Mar', 'Apr', 'May']}
62
- yAxisMin={0}
63
- {...props}
64
68
  />
65
69
  </div>
66
70
  )
@@ -1,49 +1,42 @@
1
1
  <% data = [{
2
- name: 'Installation',
3
- data: [1475,200,3000,654,656]
2
+ name: 'Role',
3
+ data: [0, 200, 300, 654, 656],
4
4
  }, {
5
- name: 'Manufacturing',
6
- data: [4434,524,2320,440,500]
7
- }, {
8
- name: 'Sales & Distribution',
9
- data: [3387,743,1344,434,440,]
10
- }, {
11
- name: 'Project Development',
12
- data: [3227,878,999,780,1000]
13
- }, {
14
- name: 'Other',
15
- data: [1111,677,3245,500,200]
5
+ name: 'Company',
6
+ data: [150, 524, 320, 440, 500],
16
7
  }] %>
17
8
 
18
9
  <% bar_graph_options = {
19
- customOptions: {
20
- subtitle: {
21
- text: "Overwritten subtitle",
22
- style: {
23
- color: "red"
24
- }
10
+ customOptions: {
11
+ yAxis: {
12
+ tickInterval: 5,
13
+ },
14
+ xAxis: {
15
+ categories: [
16
+ raw(pb_rails("icon", props: { icon: "frown", color: "error", size: "2x" })),
17
+ raw(pb_rails("icon", props: { icon: "frown", color: "warning", size: "2x" })),
18
+ raw(pb_rails("icon", props: { icon: "frown-open", color: "neutral", size: "2x" })),
19
+ raw(pb_rails("icon", props: { icon: "smile", color: "category_7", size: "2x" })),
20
+ raw(pb_rails("icon", props: { icon: "smile-beam", color: "success", size: "2x" }))
21
+ ],
22
+ labels: {
23
+ useHTML: true,
24
+ sytle: {
25
+ fontSize: '1.4em',
25
26
  },
26
- xAxis: {
27
- categories: [
28
- '<i class="far fa-apple-whole"></i> Jan',
29
- '<i class="far fa-strawberry"></i> Feb',
30
- '<i class="far fa-lemon"></i> Mar',
31
- '<i class="far fa-pear"></i> Apr',
32
- '<i class="far fa-peach"></i> May'
33
- ],
34
- labels: {
35
- useHTML: true,
36
- }
37
- }
38
- }
27
+ y: 42,
28
+ },
29
+ },
30
+ legend: {
31
+ itemMarginTop: 62,
32
+ },
33
+ }
39
34
  } %>
40
35
 
41
36
  <%= pb_rails("bar_graph", props: {
42
- axis_title: 'Number of Employees',
43
37
  chart_data: data,
44
38
  id: "bar-default",
45
- y_axis_min: 0,
46
- subtitle: 'Subtitle to replace',
39
+ legend: true,
47
40
  title: 'Bar Graph with Custom Overrides',
48
41
  custom_options: bar_graph_options
49
- }) %>
42
+ }) %>
@@ -13,6 +13,7 @@ const BreadCrumbsDefault = (props) => {
13
13
  <Icon
14
14
  icon="home"
15
15
  size="1x"
16
+ {...props}
16
17
  />
17
18
  <BreadCrumbItem
18
19
  {...props}
@@ -22,11 +23,13 @@ const BreadCrumbsDefault = (props) => {
22
23
  size="4"
23
24
  tag="span"
24
25
  text="Home"
26
+ {...props}
25
27
  />
26
28
  </BreadCrumbItem>
27
29
  <Icon
28
30
  icon="users"
29
31
  size="1x"
32
+ {...props}
30
33
  />
31
34
  <Link
32
35
  {...props}
@@ -36,17 +39,20 @@ const BreadCrumbsDefault = (props) => {
36
39
  size="4"
37
40
  tag="span"
38
41
  text="Users"
42
+ {...props}
39
43
  />
40
44
  </Link>
41
45
  <Icon
42
46
  icon="user"
43
47
  size="1x"
48
+ {...props}
44
49
  />
45
50
  <Link {...props}>
46
51
  <Title
47
52
  size="4"
48
53
  tag="span"
49
54
  text="User"
55
+ {...props}
50
56
  />
51
57
  </Link>
52
58
  </BreadCrumbs>
@@ -67,4 +67,24 @@
67
67
  <%= pb_rails("card/card_body", props: { padding: "md", }) do %>
68
68
  Body
69
69
  <% end %>
70
- <% end %>
70
+ <% end %>
71
+
72
+ <%= pb_rails("title", props: { text: "Status Colors", tag: "h4", size: 4, margin_bottom: "sm" }) %>
73
+
74
+ <%= pb_rails("card", props: { padding: "none", header: true, margin_bottom: "sm"}) do %>
75
+ <%= pb_rails("card/card_header", props: { padding: "sm", header_color: "success" }) do %>
76
+ <%= pb_rails("body", props: { text: "Success", dark: true }) %>
77
+ <% end %>
78
+ <%= pb_rails("card/card_body", props: { padding: "md" }) do %>
79
+ Body
80
+ <% end %>
81
+ <% end %>
82
+
83
+ <%= pb_rails("card", props: { padding: "none", header: true, margin_bottom: "sm"}) do %>
84
+ <%= pb_rails("card/card_header", props: { padding: "sm", header_color: "error" }) do %>
85
+ <%= pb_rails("body", props: { text: "Error", dark: true }) %>
86
+ <% end %>
87
+ <%= pb_rails("card/card_body", props: { padding: "md" }) do %>
88
+ Body
89
+ <% end %>
90
+ <% end %>
@@ -181,6 +181,56 @@ const CardHeader = (props) => {
181
181
  />
182
182
  </Card.Body>
183
183
  </Card>
184
+
185
+ <Title
186
+ {...props}
187
+ marginBottom='sm'
188
+ size={4}
189
+ tag="h4"
190
+ text="Status Colors"
191
+ />
192
+
193
+ <Card
194
+ {...props}
195
+ marginBottom='sm'
196
+ padding="none"
197
+ >
198
+ <Card.Header
199
+ headerColor="success"
200
+ >
201
+ <Body
202
+ dark
203
+ text="Success"
204
+ />
205
+ </Card.Header>
206
+ <Card.Body>
207
+ <Body
208
+ {...props}
209
+ text="Body"
210
+ />
211
+ </Card.Body>
212
+ </Card>
213
+
214
+ <Card
215
+ {...props}
216
+ marginBottom='sm'
217
+ padding="none"
218
+ >
219
+ <Card.Header
220
+ headerColor="error"
221
+ >
222
+ <Body
223
+ dark
224
+ text="Error"
225
+ />
226
+ </Card.Header>
227
+ <Card.Body>
228
+ <Body
229
+ {...props}
230
+ text="Body"
231
+ />
232
+ </Card.Body>
233
+ </Card>
184
234
  </>
185
235
  )
186
236
  }
@@ -1 +1 @@
1
- Card headers pass category, product, and background colors only. List of all category, product, and background colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
1
+ Card headers pass category, product, status and background colors only. List of all category, product, status and background colors can be viewed <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
@@ -10,3 +10,11 @@
10
10
  link: "https://google.com",
11
11
  new_window: true
12
12
  }) %>
13
+ <br/>
14
+ <%= pb_rails("circle_icon_button", props: {
15
+ icon: "info",
16
+ variant: "secondary",
17
+ aria: { label: "Link to Playbook in new window" },
18
+ link: "https://playbook.powerapp.cloud/",
19
+ target: "child"
20
+ }) %>
@@ -21,6 +21,15 @@ const CircleIconButtonLink = (props) => (
21
21
  {...props}
22
22
  />
23
23
 
24
+ <br/>
25
+
26
+ <CircleIconButton
27
+ aria={{ label: "Link to Playbook in new window" }}
28
+ icon="info"
29
+ link="https://playbook.powerapp.cloud/"
30
+ target="child"
31
+ variant="secondary"
32
+ />
24
33
  </div>
25
34
  )
26
35
 
@@ -0,0 +1 @@
1
+ The `link` prop accepts a string that is used as an href value and causes the button to act as a link. The default behavior of a link is to open in the current window. You can optionally alter the link behavior by adding the `newWindow` prop (boolean), which will open the link in a new window, or by calling the `target` prop, which accepts `_self`, `_blank`, `_parent`, `_top`, `child`, or any string, allowing you to specify any link target.
@@ -17,47 +17,60 @@ const GaugeComplex = (props) => (
17
17
  gap="sm"
18
18
  padding="xl"
19
19
  wrap
20
+ {...props}
20
21
  >
21
22
  <FlexItem
22
23
  flex={1}
23
24
  grow
25
+ {...props}
24
26
  >
25
27
  <Card
26
28
  maxWidth="xs"
27
29
  padding="md"
30
+ {...props}
28
31
  >
29
32
  <Title
30
33
  paddingBottom="sm"
31
34
  size={4}
32
35
  text="Abandoned Calls"
36
+ {...props}
33
37
  />
34
- <Flex align="stretch">
38
+ <Flex
39
+ align="stretch"
40
+ {...props}
41
+ >
35
42
  <Flex
36
43
  marginRight="sm"
37
44
  orientation="column"
45
+ {...props}
38
46
  >
39
47
  <Body
40
48
  color="light"
41
49
  paddingBottom="sm"
42
50
  text="Total Abandoned"
51
+ {...props}
43
52
  />
44
53
  <Flex
45
54
  align="baseline"
46
55
  paddingBottom="xs"
56
+ {...props}
47
57
  >
48
58
  <Title
49
59
  size={1}
50
60
  text="39"
61
+ {...props}
51
62
  />
52
63
  <Title
53
64
  color="light"
54
65
  size={3}
55
66
  text="calls"
67
+ {...props}
56
68
  />
57
69
  </Flex>
58
70
  <Caption
59
71
  size="xs"
60
72
  text="of 390"
73
+ {...props}
61
74
  />
62
75
  </Flex>
63
76
 
@@ -65,22 +78,29 @@ const GaugeComplex = (props) => (
65
78
  alignSelf="stretch"
66
79
  marginRight="sm"
67
80
  orientation="vertical"
81
+ {...props}
68
82
  />
69
83
 
70
84
  <Flex
71
85
  orientation="column"
72
86
  wrap
87
+ {...props}
73
88
  >
74
89
  <Body
75
90
  color="light"
76
91
  text="% Abandoned"
77
- />
78
- <Flex wrap>
92
+ {...props}
93
+ />
94
+ <Flex
95
+ wrap
96
+ {...props}
97
+ >
79
98
  <FlexItem
80
99
  fixedSize="150px"
81
100
  overflow="hidden"
82
101
  shrink
83
- >
102
+ {...props}
103
+ >
84
104
  <Gauge
85
105
  chartData={data}
86
106
  disableAnimation
@@ -90,7 +110,7 @@ const GaugeComplex = (props) => (
90
110
  {...props}
91
111
  />
92
112
  </FlexItem>
93
- </Flex>
113
+ </Flex>
94
114
  </Flex>
95
115
  </Flex>
96
116
  </Card>
@@ -24,4 +24,20 @@
24
24
  state: "PA",
25
25
  zipcode: "19382",
26
26
  territory: "PHL",
27
- }) %>
27
+ }) %>
28
+
29
+ <br>
30
+ <br>
31
+
32
+ <%= pb_rails("home_address_street", props: {
33
+ address: "70 Prospect Ave",
34
+ address_cont: "Apt M18",
35
+ city: "West Chester",
36
+ emphasis: "none",
37
+ home_id: 8250263,
38
+ home_url: "https://powerhrg.com/",
39
+ house_style: "Colonial",
40
+ state: "PA",
41
+ zipcode: "19382",
42
+ territory: "PHL",
43
+ }) %>
@@ -32,6 +32,21 @@ const HomeAddressStreetEmphasis = (props) => {
32
32
  zipcode="19382"
33
33
  {...props}
34
34
  />
35
+ <br />
36
+ <br />
37
+ <HomeAddressStreet
38
+ address="70 Prospect Ave"
39
+ addressCont="Apt M18"
40
+ city="West Chester"
41
+ emphasis="none"
42
+ homeId="8250263"
43
+ homeUrl="https://powerhrg.com/"
44
+ houseStyle="Colonial"
45
+ state="PA"
46
+ territory="PHL"
47
+ zipcode="19382"
48
+ {...props}
49
+ />
35
50
  </div>
36
51
  )
37
52
  }
@@ -1,2 +1,3 @@
1
1
  Emphasis on street happens by default. (no prop needed)
2
- Emphasis on "city" makes the city emphasized, rather than the street.
2
+ Emphasis on "city" makes the city emphasized, rather than the street.
3
+ Adding "none" to emphasis prop will provide no emphasis.