playbook_ui_docs 14.23.0.pre.alpha.highchartstest9121 → 14.23.0.pre.alpha.play22549235
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_with_custom_header_multi_header.jsx +107 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +2 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx +90 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +4 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +3 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md +3 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +3 -1
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +1 -0
- data/dist/playbook-doc.js +2 -2
- metadata +6 -10
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +0 -69
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +0 -71
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +0 -110
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +0 -76
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +0 -76
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +0 -76
- data/app/pb_kits/playbook/pb_walkthrough/docs/example.yml +0 -10
- data/app/pb_kits/playbook/pb_walkthrough/docs/index.js +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ba3e5aa2caeb29fe4029bea8b914b4808707da66634a4facde059954d40b00c
|
4
|
+
data.tar.gz: 595e29fcfd54eb007bf39e3412bc1718340e4ed66a4649ed997c61f4638762d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f490d111c47ceb4c84899d91f0b2a4f6902baf33f834a47c40b4a71a2aeca4ffb44659144a3ddd86f7a30969c5cc698b87a4eb1ca94bd166de08854ac9ce40c
|
7
|
+
data.tar.gz: 3b2a2433ed14bb2b4aced236f92a7596b92e28af6d846be7df40157d2f35681afa47408addc60f00985324510dedc7d03cca7335dca00347ed8484d9aa61994b
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
import React from "react"
|
2
|
+
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
3
|
+
import Icon from "../../pb_icon/_icon"
|
4
|
+
import Flex from "../../pb_flex/_flex"
|
5
|
+
import Caption from "../../pb_caption/_caption"
|
6
|
+
import Tooltip from "../../pb_tooltip/_tooltip"
|
7
|
+
import MOCK_DATA from "./advanced_table_mock_data.json"
|
8
|
+
|
9
|
+
const AdvancedTableWithCustomHeaderMultiHeader = (props) => {
|
10
|
+
|
11
|
+
const columnDefinitions = [
|
12
|
+
{
|
13
|
+
accessor: "year",
|
14
|
+
label: "Year",
|
15
|
+
id: "year",
|
16
|
+
cellAccessors: ["quarter", "month", "day"],
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "Enrollment Data",
|
20
|
+
id: "enrollmentData",
|
21
|
+
header: () => (
|
22
|
+
<Flex alignItems="center"
|
23
|
+
justifyContent="center"
|
24
|
+
>
|
25
|
+
<Caption marginRight="xs">Enrollments Data</Caption>
|
26
|
+
<Tooltip placement="top"
|
27
|
+
text="Whoa. I'm a Tooltip"
|
28
|
+
zIndex={10}
|
29
|
+
>
|
30
|
+
<Icon cursor="pointer"
|
31
|
+
icon="info"
|
32
|
+
size="xs"
|
33
|
+
/>
|
34
|
+
</Tooltip>
|
35
|
+
</Flex>
|
36
|
+
),
|
37
|
+
columns: [
|
38
|
+
{
|
39
|
+
label: "Enrollment Stats",
|
40
|
+
id: "enrollmentStats",
|
41
|
+
columns: [
|
42
|
+
{
|
43
|
+
accessor: "newEnrollments",
|
44
|
+
id: "newEnrollments",
|
45
|
+
label: "New Enrollments",
|
46
|
+
},
|
47
|
+
{
|
48
|
+
accessor: "scheduledMeetings",
|
49
|
+
id: "scheduledMeetings",
|
50
|
+
label: "Scheduled Meetings",
|
51
|
+
},
|
52
|
+
],
|
53
|
+
},
|
54
|
+
],
|
55
|
+
},
|
56
|
+
{
|
57
|
+
label: "Performance Data",
|
58
|
+
id: "performanceData",
|
59
|
+
columns: [
|
60
|
+
{
|
61
|
+
label: "Completion Metrics",
|
62
|
+
id: "completionMetrics",
|
63
|
+
columns: [
|
64
|
+
{
|
65
|
+
accessor: "completedClasses",
|
66
|
+
label: "Completed Classes",
|
67
|
+
id: "completedClasses",
|
68
|
+
},
|
69
|
+
{
|
70
|
+
accessor: "classCompletionRate",
|
71
|
+
label: "Class Completion Rate",
|
72
|
+
id: "classCompletionRate",
|
73
|
+
},
|
74
|
+
],
|
75
|
+
},
|
76
|
+
{
|
77
|
+
label: "Attendance",
|
78
|
+
id: "attendance",
|
79
|
+
columns: [
|
80
|
+
{
|
81
|
+
accessor: "attendanceRate",
|
82
|
+
label: "Attendance Rate",
|
83
|
+
id: "attendanceRate",
|
84
|
+
},
|
85
|
+
{
|
86
|
+
accessor: "scheduledMeetings",
|
87
|
+
label: "Scheduled Meetings",
|
88
|
+
id: "scheduledMeetings",
|
89
|
+
},
|
90
|
+
],
|
91
|
+
},
|
92
|
+
],
|
93
|
+
},
|
94
|
+
];
|
95
|
+
|
96
|
+
return (
|
97
|
+
<div>
|
98
|
+
<AdvancedTable
|
99
|
+
columnDefinitions={columnDefinitions}
|
100
|
+
tableData={MOCK_DATA}
|
101
|
+
{...props}
|
102
|
+
/>
|
103
|
+
</div>
|
104
|
+
)
|
105
|
+
}
|
106
|
+
|
107
|
+
export default AdvancedTableWithCustomHeaderMultiHeader;
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
The optional `header` key/value pair within `columnDefinitions` can also be used with multi headers as seen here.
|
@@ -43,6 +43,7 @@ examples:
|
|
43
43
|
- advanced_table_responsive: Responsive Tables
|
44
44
|
- advanced_table_custom_cell: Custom Components for Cells
|
45
45
|
- advanced_table_with_custom_header: Custom Header Cell
|
46
|
+
- advanced_table_with_custom_header_multi_header: Custom Header with Multiple Headers
|
46
47
|
- advanced_table_pagination: Pagination
|
47
48
|
- advanced_table_pagination_with_props: Pagination Props
|
48
49
|
- advanced_table_loading: Loading State
|
@@ -40,3 +40,4 @@ export { default as AdvancedTableColumnStylingColumnHeaders } from './_advanced_
|
|
40
40
|
export { default as AdvancedTableInfiniteScroll} from './_advanced_table_infinite_scroll.jsx'
|
41
41
|
export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_custom_header.jsx'
|
42
42
|
export { default as AdvancedTableCustomSort } from './_advanced_table_custom_sort.jsx'
|
43
|
+
export { default as AdvancedTableWithCustomHeaderMultiHeader } from './_advanced_table_with_custom_header_multi_header.jsx'
|
@@ -9,10 +9,10 @@
|
|
9
9
|
<tr>
|
10
10
|
<th>
|
11
11
|
<%= pb_rails("checkbox", props: {
|
12
|
-
text: "Uncheck All",
|
13
12
|
value: "checkbox-value",
|
14
13
|
name: "main-checkbox",
|
15
14
|
indeterminate_main: true,
|
15
|
+
indeterminate_main_labels: ["Check All Ice Cream", "Uncheck All Ice Cream"],
|
16
16
|
id: "indeterminate-checkbox"
|
17
17
|
}) %>
|
18
18
|
</th>
|
@@ -1 +1,2 @@
|
|
1
|
-
If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
|
1
|
+
If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
|
2
|
+
If you want to customize the main checkbox labels, set an array `indeterminate_main_labels` with "Check All" and "Uncheck All" labels.
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import Dropdown from '../_dropdown'
|
3
|
+
|
4
|
+
const DropdownCustomActiveStyleOptions = (props) => {
|
5
|
+
|
6
|
+
|
7
|
+
const options = [
|
8
|
+
{
|
9
|
+
label: "United States",
|
10
|
+
value: "unitedStates",
|
11
|
+
id: "us"
|
12
|
+
},
|
13
|
+
{
|
14
|
+
label: "Canada",
|
15
|
+
value: "canada",
|
16
|
+
id: "ca"
|
17
|
+
},
|
18
|
+
{
|
19
|
+
label: "Pakistan",
|
20
|
+
value: "pakistan",
|
21
|
+
id: "pk"
|
22
|
+
}
|
23
|
+
];
|
24
|
+
|
25
|
+
|
26
|
+
return (
|
27
|
+
<div>
|
28
|
+
<Dropdown
|
29
|
+
activeStyle={{
|
30
|
+
backgroundColor: "bg_light",
|
31
|
+
fontColor: "primary",
|
32
|
+
}}
|
33
|
+
label="Background Color: bg_light; Font Color: primary"
|
34
|
+
marginBottom="sm"
|
35
|
+
options={options}
|
36
|
+
{...props}
|
37
|
+
>
|
38
|
+
<Dropdown.Trigger/>
|
39
|
+
<Dropdown.Container>
|
40
|
+
{options.map((option) => (
|
41
|
+
<Dropdown.Option key={option.id}
|
42
|
+
option={option}
|
43
|
+
/>
|
44
|
+
))}
|
45
|
+
</Dropdown.Container>
|
46
|
+
</Dropdown>
|
47
|
+
<Dropdown
|
48
|
+
activeStyle={{
|
49
|
+
backgroundColor: "white",
|
50
|
+
fontColor: "primary",
|
51
|
+
}}
|
52
|
+
label="Background Color: white; Font Color: primary"
|
53
|
+
marginBottom="sm"
|
54
|
+
options={options}
|
55
|
+
{...props}
|
56
|
+
/>
|
57
|
+
<Dropdown
|
58
|
+
activeStyle={{
|
59
|
+
backgroundColor: "bg_light",
|
60
|
+
fontColor: "text_lt_default",
|
61
|
+
}}
|
62
|
+
autocomplete
|
63
|
+
label="Background Color: bg_light; Font Color: text_lt_default"
|
64
|
+
marginBottom="sm"
|
65
|
+
options={options}
|
66
|
+
{...props}
|
67
|
+
/>
|
68
|
+
<Dropdown
|
69
|
+
activeStyle={{
|
70
|
+
fontColor: "text_lt_lighter",
|
71
|
+
}}
|
72
|
+
label="Font Color: text_lt_lighter"
|
73
|
+
marginBottom="sm"
|
74
|
+
options={options}
|
75
|
+
{...props}
|
76
|
+
>
|
77
|
+
<Dropdown.Trigger/>
|
78
|
+
<Dropdown.Container>
|
79
|
+
{options.map((option) => (
|
80
|
+
<Dropdown.Option key={option.id}
|
81
|
+
option={option}
|
82
|
+
/>
|
83
|
+
))}
|
84
|
+
</Dropdown.Container>
|
85
|
+
</Dropdown>
|
86
|
+
</div>
|
87
|
+
)
|
88
|
+
}
|
89
|
+
|
90
|
+
export default DropdownCustomActiveStyleOptions
|
data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md
ADDED
@@ -0,0 +1,4 @@
|
|
1
|
+
The `activeStyle` prop can be used to customize the appearance of the dropdown selection indicator. It accepts an object with the following keys: `backgroundColor` sets the background color of the selected item (and its hover state); `fontColor` sets the font color of the selected item.
|
2
|
+
|
3
|
+
`backgroundColor` **Type**: String | **Values**: bg_light | white | **Default**: (no selection) is primary
|
4
|
+
`fontColor` **Type**: String | **Values**: primary | all [Playbook Text Colors](https://playbook.powerapp.cloud/visual_guidelines/colors) | **Default**: (no selection) is white
|
@@ -18,6 +18,7 @@ const DropdownCustomRadioOptions = (props) => {
|
|
18
18
|
return (
|
19
19
|
<div>
|
20
20
|
<Dropdown
|
21
|
+
activeStyle={{ backgroundColor: "bg_light", fontColor: "text_lt_default" }}
|
21
22
|
label="Select Item"
|
22
23
|
onSelect={(selectedItem) => setSelectedValue(selectedItem?.value)}
|
23
24
|
options={options}
|
@@ -1 +1 @@
|
|
1
|
-
Radio inputs can be used inside `Dropdown.Option` for a custom layout that mimics form-like selection within a dropdown.
|
1
|
+
Radio inputs can be used inside `Dropdown.Option` for a custom layout that mimics form-like selection within a dropdown. Use the [activeStyle](https://playbook.powerapp.cloud/kits/dropdown/react#custom-active-style-options) `backgroundColor` and `fontColor` props to create contrast between the Radio selection indicator and the Dropdown selection background indicator.
|
@@ -16,7 +16,7 @@ examples:
|
|
16
16
|
- dropdown_with_search_rails: Custom Trigger Dropdown with Search
|
17
17
|
- dropdown_with_custom_padding: Custom Option Padding
|
18
18
|
- dropdown_with_custom_icon_options: Custom Icon Options
|
19
|
-
# - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
|
19
|
+
# - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in the Rails follow up to [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
|
20
20
|
- dropdown_error: Dropdown with Error
|
21
21
|
- dropdown_default_value: Default Value
|
22
22
|
- dropdown_multi_select_with_default: Multi Select Default Value
|
@@ -39,8 +39,9 @@ examples:
|
|
39
39
|
- dropdown_with_custom_trigger: Custom Trigger
|
40
40
|
- dropdown_with_search: Custom Trigger Dropdown with Search
|
41
41
|
- dropdown_with_custom_padding: Custom Option Padding
|
42
|
+
- dropdown_with_custom_active_style_options: Custom Active Style Options
|
42
43
|
- dropdown_with_custom_icon_options: Custom Icon Options
|
43
|
-
|
44
|
+
- dropdown_with_custom_radio_options: Custom Radio Options
|
44
45
|
- dropdown_error: Dropdown with Error
|
45
46
|
- dropdown_default_value: Default Value
|
46
47
|
- dropdown_multi_select_with_default: Multi Select Default Value
|
@@ -21,4 +21,5 @@ export { default as DropdownMultiSelectWithAutocomplete } from './_dropdown_mult
|
|
21
21
|
export { default as DropdownMultiSelectWithDefault } from './_dropdown_multi_select_with_default.jsx'
|
22
22
|
export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
|
23
23
|
export {default as DropdownWithCustomIconOptions} from './_dropdown_with_custom_icon_options.jsx'
|
24
|
-
export {default as DropdownWithCustomRadioOptions} from './_dropdown_with_custom_radio_options.jsx'
|
24
|
+
export {default as DropdownWithCustomRadioOptions} from './_dropdown_with_custom_radio_options.jsx'
|
25
|
+
export {default as DropdownWithCustomActiveStyleOptions} from './_dropdown_with_custom_active_style_options.jsx'
|
@@ -3,4 +3,6 @@ Our Pagination kit depends on the <a href="https://github.com/mislav/will_pagina
|
|
3
3
|
|
4
4
|
Once you have perfomed the paginated query in your controller file you can use our kit (see code example below) instead of `<%= will_paginate @users %>` in your view file.
|
5
5
|
|
6
|
-
You need to add: <code>require "playbook/pagination_renderer"</code> in your apps controller file.
|
6
|
+
You need to add: <code>require "playbook/pagination_renderer"</code> in your apps controller file.
|
7
|
+
|
8
|
+
Note: If the total page count is 0 or 1, the Pagination kit will not be displayed as there aren't multiple pages to navigate.
|
@@ -1 +1,3 @@
|
|
1
|
-
The `range` prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the `range` prop.
|
1
|
+
The `range` prop determines how many pages to display in the Pagination component. Regardless of this value, the first two and last two pages are always visible to facilitate navigation to the beginning and end of the pagination. If these always-visible pages fall within the specified range, they are included in the display. If they fall outside the range, the pagination will show additional pages up to the number defined by the `range` prop.
|
2
|
+
|
3
|
+
Note: If the `total` pages prop is 0 or 1, the Pagination component will not be displayed, as there aren't multiple pages to navigate.
|