playbook_ui_docs 14.23.0.pre.alpha.highchartstest9121 → 14.23.0.pre.alpha.play1983advancedtabledoubleborder9286

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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +6 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +21 -6
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.jsx +107 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_with_custom_header_multi_header.md +1 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
  8. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
  9. data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +2 -1
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx +90 -0
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +4 -0
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +1 -0
  13. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -1
  14. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +3 -2
  15. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
  16. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md +3 -1
  17. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md +3 -1
  18. data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +1 -0
  19. data/dist/playbook-doc.js +2 -2
  20. metadata +6 -10
  21. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +0 -69
  22. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +0 -71
  23. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +0 -110
  24. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +0 -76
  25. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +0 -76
  26. data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +0 -76
  27. data/app/pb_kits/playbook/pb_walkthrough/docs/example.yml +0 -10
  28. 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: 9d05ea953da889aa1c9aecbaebb35a7f7e5679f480d054b5a67a0ac4c4923ec9
4
- data.tar.gz: df36f162b078073445e1245e6d227c25e3d51abb04866693c67c64b11af561df
3
+ metadata.gz: a7de23badbd1b1f2e233c2ef63d2e57bdd1b61ebcccb0ea3fa1ccae3838ed39b
4
+ data.tar.gz: a71bae1b489202785ed325cfb0ea1ac98d9eeecbcefbb380a9718662f060cfd0
5
5
  SHA512:
6
- metadata.gz: f90ff535ef955b12d3f3eed61c2658ede4538d0cefa3b88f28dd21f7e5de354c9214a58697572368a1c3e4dd6d9ec3a001f224764603d2b5447cee01df29619e
7
- data.tar.gz: 7cfc3fc2f3effd0cd172e32eea6c0c7b51957ee27342d233c0eaf29ccb5878b919b8a5dc76955670b0dd3fe43d1a52e8f8d6c69e4cbfd68f64b72145498b7dc5
6
+ metadata.gz: '09e9871aa54ae3f1634bd1c1416c76c419a589fecd1cb2ee96fd0ec653a8e0924cd6849b3c9b47d8793d015256496c4014719137cab0cbceed24fc4b8d5e61b5'
7
+ data.tar.gz: 36a7e75e8a604d43d3bd72c0f7f443cc9a626ca4b0a18d43b4618af91d1f26abc4ae5bb4cee70863aaf4937824f5ddb393b8134aa131be8e635efcef004935af
@@ -29,5 +29,10 @@
29
29
  label: "Graduated Students",
30
30
  }
31
31
  ] %>
32
+ <%= pb_rails("card", props: { margin_bottom: "md" }) do %>
33
+ <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, vertical_border: true }}) %>
34
+ <% end %>
32
35
 
33
- <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, table_props: { vertical_border: true, container: false }}) %>
36
+ <%= pb_rails("card", props: { padding: "none" }) do %>
37
+ <%= pb_rails("advanced_table", props: { id: "table_props_table_2", padding: "none", table_data: @table_data, column_definitions: column_definitions, table_props: { container: false, vertical_border: true }}) %>
38
+ <% end %>
@@ -1,5 +1,6 @@
1
1
  import React from "react"
2
2
  import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
+ import { Card } from "playbook-ui"
3
4
  import MOCK_DATA from "./advanced_table_mock_data.json"
4
5
 
5
6
  const AdvancedTableTableProps = (props) => {
@@ -42,12 +43,26 @@ const AdvancedTableTableProps = (props) => {
42
43
 
43
44
  return (
44
45
  <div>
45
- <AdvancedTable
46
- columnDefinitions={columnDefinitions}
47
- tableData={MOCK_DATA}
48
- tableProps={tableProps}
49
- {...props}
50
- />
46
+ <Card padding="md">
47
+ <AdvancedTable
48
+ columnDefinitions={columnDefinitions}
49
+ tableData={MOCK_DATA}
50
+ tableProps={tableProps}
51
+ {...props}
52
+ />
53
+ </Card>
54
+
55
+ <Card
56
+ marginTop="md"
57
+ padding="none"
58
+ >
59
+ <AdvancedTable
60
+ columnDefinitions={columnDefinitions}
61
+ tableData={MOCK_DATA}
62
+ tableProps={tableProps}
63
+ {...props}
64
+ />
65
+ </Card>
51
66
  </div>
52
67
  )
53
68
  }
@@ -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;
@@ -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
@@ -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
- # - 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)
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.
@@ -19,6 +19,7 @@
19
19
  value: "checkbox-value",
20
20
  name: "main-checkbox-selectable",
21
21
  indeterminate_main: true,
22
+ indeterminate_main_labels: ["", ""],
22
23
  id: "checkbox-selectable"
23
24
  }) %>
24
25
  <% end %>