playbook_ui_docs 14.18.0.pre.alpha.play2042addturbosupporttopopoverkit7423 → 14.18.0.pre.alpha.revert4567revert4553PLAY2056ATcolbordercolors7469
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.jsx +80 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb +58 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones.html.erb +43 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors.html.erb +55 -0
- data/app/pb_kits/playbook/pb_draggable/docs/_draggable_drop_zones_colors_rails.md +1 -0
- data/app/pb_kits/playbook/pb_draggable/docs/example.yml +2 -1
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.jsx +52 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/_line_graph_pb_styles.md +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_line_graph/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.html.erb +10 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.jsx +20 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_country_search.md +1 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +16 -4
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones_colors.md → _draggable_drop_zones_colors_react.md} +0 -0
- /data/app/pb_kits/playbook/pb_draggable/docs/{_draggable_drop_zones.md → _draggable_drop_zones_react.md} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f74313cf69e4a7ebb2200402fbaed0b99e9f89b94a69954079a1153b6c48743
|
4
|
+
data.tar.gz: 602871eddcf556ef7f26449aa460baff9be835ee8189cd8392f9a60ca19e9fd0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2804f4a7e6ee8c14ae6249237c23c0ae3dd445a47834625f4d2396dcf767b82da7ca1d86646cfbf82d6f90bcb0332a7545154b93ee8c5054b652da818708485d
|
7
|
+
data.tar.gz: f9760df3c5c9b2382d70807c2f82d9249f3ff762624d4a3198496b0cdf7ee6616b586fa034a844503d969d79aef5b44fe319ee60f26cea7e3c569d4cd5d3bc79
|
@@ -0,0 +1,80 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
4
|
+
|
5
|
+
const AdvancedTableColumnBorderColors = (props) => {
|
6
|
+
const columnDefinitions = [
|
7
|
+
{
|
8
|
+
accessor: "year",
|
9
|
+
label: "Year",
|
10
|
+
cellAccessors: ["quarter", "month", "day"],
|
11
|
+
},
|
12
|
+
{
|
13
|
+
label: "Enrollment Data",
|
14
|
+
columns: [
|
15
|
+
{
|
16
|
+
label: "Enrollment Stats",
|
17
|
+
columns: [
|
18
|
+
{
|
19
|
+
accessor: "newEnrollments",
|
20
|
+
label: "New Enrollments",
|
21
|
+
},
|
22
|
+
{
|
23
|
+
accessor: "scheduledMeetings",
|
24
|
+
label: "Scheduled Meetings",
|
25
|
+
},
|
26
|
+
],
|
27
|
+
},
|
28
|
+
],
|
29
|
+
},
|
30
|
+
{
|
31
|
+
label: "Performance Data",
|
32
|
+
columns: [
|
33
|
+
{
|
34
|
+
label: "Completion Metrics",
|
35
|
+
columns: [
|
36
|
+
{
|
37
|
+
accessor: "completedClasses",
|
38
|
+
label: "Completed Classes",
|
39
|
+
},
|
40
|
+
{
|
41
|
+
accessor: "classCompletionRate",
|
42
|
+
label: "Class Completion Rate",
|
43
|
+
},
|
44
|
+
],
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: "Attendance",
|
48
|
+
columns: [
|
49
|
+
{
|
50
|
+
accessor: "attendanceRate",
|
51
|
+
label: "Attendance Rate",
|
52
|
+
},
|
53
|
+
{
|
54
|
+
accessor: "scheduledMeetings",
|
55
|
+
label: "Scheduled Meetings",
|
56
|
+
},
|
57
|
+
],
|
58
|
+
},
|
59
|
+
],
|
60
|
+
},
|
61
|
+
];
|
62
|
+
|
63
|
+
const tableProps = {
|
64
|
+
verticalBorder: true
|
65
|
+
}
|
66
|
+
|
67
|
+
return (
|
68
|
+
<>
|
69
|
+
<AdvancedTable
|
70
|
+
columnDefinitions={columnDefinitions}
|
71
|
+
columnGroupBorderColor="text_lt_default"
|
72
|
+
tableData={MOCK_DATA}
|
73
|
+
tableProps={tableProps}
|
74
|
+
{...props}
|
75
|
+
/>
|
76
|
+
</>
|
77
|
+
)
|
78
|
+
}
|
79
|
+
|
80
|
+
export default AdvancedTableColumnBorderColors
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The borders of column groups can be set to a different color using the `columnGroupBorderColor` prop. In order for these borders to be visible, this prop must be used with `tableProps` and `verticalBorder` set to true.
|
2
|
+
|
3
|
+
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_border_color_rails.html.erb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
<% column_definitions = [
|
2
|
+
{
|
3
|
+
accessor: "year",
|
4
|
+
label: "Year",
|
5
|
+
cellAccessors: ["quarter", "month", "day"],
|
6
|
+
},
|
7
|
+
{
|
8
|
+
label: "Enrollment Data",
|
9
|
+
columns: [
|
10
|
+
{
|
11
|
+
label: "Enrollment Stats",
|
12
|
+
columns: [
|
13
|
+
{
|
14
|
+
accessor: "newEnrollments",
|
15
|
+
label: "New Enrollments",
|
16
|
+
},
|
17
|
+
{
|
18
|
+
accessor: "scheduledMeetings",
|
19
|
+
label: "Scheduled Meetings",
|
20
|
+
},
|
21
|
+
],
|
22
|
+
},
|
23
|
+
],
|
24
|
+
},
|
25
|
+
{
|
26
|
+
label: "Performance Data",
|
27
|
+
columns: [
|
28
|
+
{
|
29
|
+
label: "Completion Metrics",
|
30
|
+
columns: [
|
31
|
+
{
|
32
|
+
accessor: "completedClasses",
|
33
|
+
label: "Completed Classes",
|
34
|
+
},
|
35
|
+
{
|
36
|
+
accessor: "classCompletionRate",
|
37
|
+
label: "Class Completion Rate",
|
38
|
+
},
|
39
|
+
],
|
40
|
+
},
|
41
|
+
{
|
42
|
+
label: "Attendance",
|
43
|
+
columns: [
|
44
|
+
{
|
45
|
+
accessor: "attendanceRate",
|
46
|
+
label: "Attendance Rate",
|
47
|
+
},
|
48
|
+
{
|
49
|
+
accessor: "scheduledMeetings",
|
50
|
+
label: "Scheduled Meetings",
|
51
|
+
},
|
52
|
+
],
|
53
|
+
},
|
54
|
+
],
|
55
|
+
},
|
56
|
+
] %>
|
57
|
+
|
58
|
+
<%= pb_rails("advanced_table", props: { id: "beta_table_with_muilti_headers", table_data: @table_data, column_definitions: column_definitions, column_group_border_color: "text_lt_default", table_props: { vertical_border: true } }) %>
|
@@ -0,0 +1,3 @@
|
|
1
|
+
The borders of column groups can be set to a different color using the `column_group_border_color` prop. In order for these borders to be visible, this prop must be used with `table_props` and `vertical_border` set to true.
|
2
|
+
|
3
|
+
The available colors for the border are Playbook's Text Colors, which can be found [here](https://playbook.powerapp.cloud/visual_guidelines/colors).
|
@@ -14,6 +14,7 @@ examples:
|
|
14
14
|
- advanced_table_column_headers_multiple: Multi-Header Columns (Multiple Levels)
|
15
15
|
# - advanced_table_selectable_rows: Selectable Rows
|
16
16
|
# - advanced_table_selectable_rows_no_subrows: Selectable Rows (No Subrows)
|
17
|
+
- advanced_table_column_border_color_rails: Column Group Border Color
|
17
18
|
|
18
19
|
|
19
20
|
react:
|
@@ -45,4 +46,5 @@ examples:
|
|
45
46
|
- advanced_table_selectable_rows_actions: Selectable Rows (With Actions)
|
46
47
|
- advanced_table_selectable_rows_header: Selectable Rows (No Actions Bar)
|
47
48
|
- advanced_table_inline_editing: Inline Cell Editing
|
48
|
-
- advanced_table_fullscreen: Fullscreen
|
49
|
+
- advanced_table_fullscreen: Fullscreen
|
50
|
+
- advanced_table_column_border_color: Column Group Border Color
|
@@ -26,4 +26,5 @@ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen
|
|
26
26
|
export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
|
27
27
|
export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
|
28
28
|
export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
|
29
|
-
export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
|
29
|
+
export { default as AdvancedTableExpandByDepth } from './_advanced_table_expand_by_depth.jsx'
|
30
|
+
export { default as AdvancedTableColumnBorderColor} from './_advanced_table_column_border_color.jsx'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<% data_shadow = [
|
2
|
+
{ id: "51", text: "Task 1" },
|
3
|
+
{ id: "52", text: "Task 2" },
|
4
|
+
{ id: "53", text: "Task 3" }
|
5
|
+
] %>
|
6
|
+
|
7
|
+
<% data_outline = [
|
8
|
+
{ id: "61", text: "Task 1" },
|
9
|
+
{ id: "62", text: "Task 2" },
|
10
|
+
{ id: "63", text: "Task 3" }
|
11
|
+
] %>
|
12
|
+
|
13
|
+
<%= pb_rails("flex", props: { justify: "around" }) do %>
|
14
|
+
<%= pb_rails("flex/flex_item", props: { margin_right: "xl" }) do %>
|
15
|
+
<%= pb_rails("draggable", props: { drop_zone_type: "shadow", initial_items: data_shadow }) do %>
|
16
|
+
<%= pb_rails("caption", props: { margin_bottom: "xs", text: "Shadow", text_align: "center" }) %>
|
17
|
+
<%= pb_rails("draggable/draggable_container", props: { html_options: { style: { width: "200px" } } }) do %>
|
18
|
+
<% data_shadow.each do |item| %>
|
19
|
+
<%= pb_rails("card", props: { drag_id: item[:id], draggable_item: true, margin_bottom: "xs", padding: "xs", padding_right: "xl" }) do %>
|
20
|
+
<%= pb_rails("flex", props: { align_items: "stretch", flex_direction: "column" }) do %>
|
21
|
+
<%= pb_rails("body", props: { text: item[:text] }) %>
|
22
|
+
<% end %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
26
|
+
<% end %>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<%= pb_rails("flex/flex_item", props: { margin_right: "xl" }) do %>
|
30
|
+
<%= pb_rails("draggable", props: { drop_zone_type: "outline", initial_items: data_outline }) do %>
|
31
|
+
<%= pb_rails("caption", props: { margin_bottom: "xs", text: "Outline", text_align: "center" }) %>
|
32
|
+
<%= pb_rails("draggable/draggable_container", props: { html_options: { style: { width: "200px" } } }) do %>
|
33
|
+
<% data_outline.each do |item| %>
|
34
|
+
<%= pb_rails("card", props: { drag_id: item[:id], draggable_item: true, margin_bottom: "xs", padding: "xs", padding_right: "xl" }) do %>
|
35
|
+
<%= pb_rails("flex", props: { align_items: "stretch", flex_direction: "column" }) do %>
|
36
|
+
<%= pb_rails("body", props: { text: item[:text] }) %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
<% end %>
|
43
|
+
<% end %>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<% initial_items = [
|
2
|
+
{
|
3
|
+
id: "141",
|
4
|
+
url: "https://unsplash.it/500/400/?image=633",
|
5
|
+
},
|
6
|
+
{
|
7
|
+
id: "142",
|
8
|
+
url: "https://unsplash.it/500/400/?image=634",
|
9
|
+
},
|
10
|
+
{
|
11
|
+
id: "143",
|
12
|
+
url: "https://unsplash.it/500/400/?image=637",
|
13
|
+
},
|
14
|
+
] %>
|
15
|
+
|
16
|
+
<% next_init_items = [
|
17
|
+
{
|
18
|
+
id: "151",
|
19
|
+
url: "https://unsplash.it/500/400/?image=633",
|
20
|
+
},
|
21
|
+
{
|
22
|
+
id: "152",
|
23
|
+
url: "https://unsplash.it/500/400/?image=634",
|
24
|
+
},
|
25
|
+
{
|
26
|
+
id: "153",
|
27
|
+
url: "https://unsplash.it/500/400/?image=637",
|
28
|
+
},
|
29
|
+
] %>
|
30
|
+
|
31
|
+
<%= pb_rails("draggable", props: {initial_items: initial_items, drop_zone_type: "shadow", drop_zone_color: "primary"}) do %>
|
32
|
+
<%= pb_rails("draggable/draggable_container") do %>
|
33
|
+
<%= pb_rails("flex", props: { gap: "sm" }) do %>
|
34
|
+
<% initial_items.each do |item| %>
|
35
|
+
<%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
|
36
|
+
<%= pb_rails("image", props: { alt: item[:id], size: "md", url: item[:url] }) %>
|
37
|
+
<% end %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<br/>
|
44
|
+
|
45
|
+
<%= pb_rails("draggable", props: {initial_items: next_init_items, drop_zone_type: "outline", drop_zone_color: "purple"}) do %>
|
46
|
+
<%= pb_rails("draggable/draggable_container") do %>
|
47
|
+
<%= pb_rails("flex", props: { gap: "sm" }) do %>
|
48
|
+
<% initial_items.each do |item| %>
|
49
|
+
<%= pb_rails("draggable/draggable_item", props:{drag_id: item[:id]}) do %>
|
50
|
+
<%= pb_rails("image", props: { alt: item[:id], size: "md", url: item[:url] }) %>
|
51
|
+
<% end %>
|
52
|
+
<% end %>
|
53
|
+
<% end %>
|
54
|
+
<% end %>
|
55
|
+
<% end %>
|
@@ -0,0 +1 @@
|
|
1
|
+
The default `color` for Draggable kit drop zones is "neutral", with "primary" or "purple" as additional options.
|
@@ -17,5 +17,6 @@ examples:
|
|
17
17
|
- draggable_with_cards: Draggable with Cards
|
18
18
|
- draggable_with_table: Draggable with Table
|
19
19
|
- draggable_multiple_containers: Dragging Across Multiple Containers
|
20
|
+
- draggable_drop_zones: Draggable Drop Zones
|
21
|
+
- draggable_drop_zones_colors: Draggable Drop Zones Colors
|
20
22
|
- draggable_event_listeners: Draggable Event Listeners
|
21
|
-
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import lineGraphTheme from '../lineGraphTheme'
|
3
|
+
import Highcharts from "highcharts"
|
4
|
+
import HighchartsReact from "highcharts-react-official"
|
5
|
+
|
6
|
+
const data = [{
|
7
|
+
name: 'Installation',
|
8
|
+
data: [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175],
|
9
|
+
}, {
|
10
|
+
name: 'Manufacturing',
|
11
|
+
data: [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434],
|
12
|
+
}, {
|
13
|
+
name: 'Sales & Distribution',
|
14
|
+
data: [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387],
|
15
|
+
}, {
|
16
|
+
name: 'Project Development',
|
17
|
+
data: [null, null, 7988, 12169, 15112, 22452, 34400, 34227],
|
18
|
+
}, {
|
19
|
+
name: 'Other',
|
20
|
+
data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111],
|
21
|
+
}]
|
22
|
+
|
23
|
+
const categories = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
24
|
+
|
25
|
+
const baseOptions = {
|
26
|
+
series: data,
|
27
|
+
title: { text: "Solar Employment Growth by Sector, 2010-2016" },
|
28
|
+
subtitle: { text: "Source: thesolarfoundation.com" },
|
29
|
+
xAxis: {
|
30
|
+
categories: categories,
|
31
|
+
},
|
32
|
+
yAxis: {
|
33
|
+
title: {
|
34
|
+
text: "Number of Employees",
|
35
|
+
},
|
36
|
+
},
|
37
|
+
}
|
38
|
+
|
39
|
+
const LineGraphPbStyles = () => {
|
40
|
+
const options = Highcharts.merge({}, lineGraphTheme, baseOptions)
|
41
|
+
|
42
|
+
return(
|
43
|
+
<div>
|
44
|
+
<HighchartsReact
|
45
|
+
highcharts={Highcharts}
|
46
|
+
options={options}
|
47
|
+
/>
|
48
|
+
</div>
|
49
|
+
)
|
50
|
+
}
|
51
|
+
|
52
|
+
export default LineGraphPbStyles
|
@@ -0,0 +1 @@
|
|
1
|
+
You don't need to use the Line Graph Kit to apply Playbook styles to your Highcharts line graph. Just import lineGraphTheme.ts and merge it with your graph options—Playbook’s styling will apply automatically.
|
@@ -4,3 +4,4 @@ export { default as LineGraphLegendPosition } from './_line_graph_legend_positio
|
|
4
4
|
export { default as LineGraphLegendNonclickable } from './_line_graph_legend_nonclickable.jsx'
|
5
5
|
export { default as LineGraphHeight } from './_line_graph_height.jsx'
|
6
6
|
export { default as LineGraphColors } from './_line_graph_colors.jsx'
|
7
|
+
export { default as LineGraphPbStyles } from './_line_graph_pb_styles.jsx'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import PhoneNumberInput from '../_phone_number_input'
|
3
|
+
|
4
|
+
const PhoneNumberInputCountrySearch = (props) => (
|
5
|
+
<>
|
6
|
+
<PhoneNumberInput
|
7
|
+
countrySearch
|
8
|
+
id='country-search'
|
9
|
+
{...props}
|
10
|
+
/>
|
11
|
+
<PhoneNumberInput
|
12
|
+
countrySearch
|
13
|
+
id='country-search-limited'
|
14
|
+
onlyCountries={["br", "us", "ph", "gb"]}
|
15
|
+
{...props}
|
16
|
+
/>
|
17
|
+
</>
|
18
|
+
)
|
19
|
+
|
20
|
+
export default PhoneNumberInputCountrySearch
|
@@ -0,0 +1 @@
|
|
1
|
+
Set `country_search` / `countrySearch` to true to allow users to search for a specific Country within the dropdown. If the range of countries has been limited, only the selected countries will be searchable.
|
@@ -9,6 +9,7 @@ examples:
|
|
9
9
|
- phone_number_input_clear_field: Clearing the Input Field
|
10
10
|
- phone_number_input_access_input_element: Accessing the Input Element
|
11
11
|
- phone_number_input_format: Format as You Type
|
12
|
+
- phone_number_input_country_search: Country Search
|
12
13
|
|
13
14
|
rails:
|
14
15
|
- phone_number_input_default: Default
|
@@ -18,4 +19,5 @@ examples:
|
|
18
19
|
- phone_number_input_validation: Form Validation
|
19
20
|
- phone_number_input_format: Format as You Type
|
20
21
|
- phone_number_input_hidden_inputs: Hidden Inputs
|
22
|
+
- phone_number_input_country_search: Country Search
|
21
23
|
|
@@ -6,3 +6,4 @@ export { default as PhoneNumberInputValidation } from './_phone_number_input_val
|
|
6
6
|
export { default as PhoneNumberInputClearField } from './_phone_number_input_clear_field'
|
7
7
|
export { default as PhoneNumberInputAccessInputElement } from './_phone_number_input_access_input_element'
|
8
8
|
export { default as PhoneNumberInputFormat } from './_phone_number_input_format'
|
9
|
+
export { default as PhoneNumberInputCountrySearch } from './_phone_number_input_country_search'
|