playbook_ui_docs 14.18.0.pre.rc.0 → 14.18.0.pre.rc.1

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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.jsx +58 -0
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns.md +6 -0
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.jsx +64 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_columns_and_header.md +8 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.jsx +55 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header.md +3 -0
  8. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.html.erb +33 -0
  9. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_sticky_header_rails.md +3 -0
  10. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.html.erb +1 -1
  11. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props.jsx +1 -2
  12. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_rails.md +2 -2
  13. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_react.md +1 -1
  14. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_rails.md +6 -2
  15. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_table_props_sticky_header_react.md +6 -2
  16. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +6 -2
  17. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +4 -1
  18. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.html.erb +15 -5
  19. data/app/pb_kits/playbook/pb_form_group/docs/_form_group_select.jsx +20 -5
  20. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.jsx +322 -118
  21. data/app/pb_kits/playbook/pb_layout/docs/_layout_bracket.md +1 -1
  22. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.jsx +63 -0
  23. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_color.md +3 -0
  24. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +1 -7
  25. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.jsx +39 -0
  26. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_gradient_opacity.md +1 -0
  27. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.jsx +40 -0
  28. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_layout.md +5 -0
  29. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +3 -0
  30. data/app/pb_kits/playbook/pb_overlay/docs/index.js +3 -0
  31. data/dist/playbook-doc.js +1 -1
  32. metadata +16 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 507cb2728035a82fda1d39c3d6375e87b2d2ed3e0f8069a4983477fbaa5ea22d
4
- data.tar.gz: d686c06944bc4863389652e0e8143303ff06019068deed4734ef0a31772c5e80
3
+ metadata.gz: ecb23a3f95fb3fbe545555f1dbdec8af8b37c744d4bc7abcc2f137cfaaca801c
4
+ data.tar.gz: 2453dbe14bdb42f6b13bbcc3f3a68d8cb97e8811eeb0e2b3412398a3acdebe6d
5
5
  SHA512:
6
- metadata.gz: 6944fa6e3e21af46532cc0f1a8dfc08235de36bcb855a2b376171d3a72cf267c84609b393a417a921b3099739d70351edf461a74a0bfabec2fd1674e03d29898
7
- data.tar.gz: 793e942c63a534bfa7efe02166ec25807f661666e2bfbd114a55e3cde052912a323acf7acaec34abf44affec067ac4fa80d8f488657c15b93f98fd1986bdd88f
6
+ metadata.gz: 6788a55d266bf4ea2ea4ae09254024b01213b4e6945af447dc97d5354dfcaf108adf9827063038834441b8a1424d6db95dfe7f0337dcc2265365dede57eb0c7f
7
+ data.tar.gz: 7af7017205437bea62edc6e1823dabaa943297a402a3f1ba649f7b53fec30d01aecbff96f70eaf8d62633250072fd8d1b09d9164afedc1c41431bac85b058300
@@ -0,0 +1,58 @@
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 AdvancedTableStickyColumns = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ id: "year",
11
+ cellAccessors: ["quarter", "month", "day"],
12
+ },
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ id: "newEnrollments",
17
+ },
18
+ {
19
+ accessor: "scheduledMeetings",
20
+ label: "Scheduled Meetings",
21
+ id: "scheduledMeetings",
22
+ },
23
+ {
24
+ accessor: "attendanceRate",
25
+ label: "Attendance Rate",
26
+ id: "attendanceRate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ id: "completedClasses",
32
+ },
33
+ {
34
+ accessor: "classCompletionRate",
35
+ label: "Class Completion Rate",
36
+ id: "classCompletionRate",
37
+ },
38
+ {
39
+ accessor: "graduatedStudents",
40
+ label: "Graduated Students",
41
+ id: "graduatedStudents",
42
+ },
43
+ ]
44
+
45
+ return (
46
+ <div>
47
+ <AdvancedTable
48
+ columnDefinitions={columnDefinitions}
49
+ responsive="none"
50
+ stickyLeftColumn={["year"]}
51
+ tableData={MOCK_DATA}
52
+ {...props}
53
+ />
54
+ </div>
55
+ )
56
+ }
57
+
58
+ export default AdvancedTableStickyColumns
@@ -0,0 +1,6 @@
1
+ To render sticky columns for the Advanced Table, you can use the `stickyLeftColumn` prop. This prop expects an array of the column ids you want to be sticky.
2
+
3
+ To achieve this:
4
+ - Make sure to provide an id for each column via columnDefinitions as shown below. Id can be any string.
5
+ - One or multiple columns can be made sticky, it is recommended to set the ids within `stickyLeftColumn` in the order in which the columns are rendered.
6
+ - It is recommended to set `responsive` to none when using `stickyLeftColumn` since responsive just makes the first column sticky and the slightly different styling for `responsive` and `stickyLeftColumn` may override each other in unexpected ways.
@@ -0,0 +1,64 @@
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 AdvancedTableStickyColumnsAndHeader = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ id: "year",
11
+ cellAccessors: ["quarter", "month", "day"],
12
+ },
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ id: "newEnrollments",
17
+ },
18
+ {
19
+ accessor: "scheduledMeetings",
20
+ label: "Scheduled Meetings",
21
+ id: "scheduledMeetings",
22
+ },
23
+ {
24
+ accessor: "attendanceRate",
25
+ label: "Attendance Rate",
26
+ id: "attendanceRate",
27
+ },
28
+ {
29
+ accessor: "completedClasses",
30
+ label: "Completed Classes",
31
+ id: "completedClasses",
32
+ },
33
+ {
34
+ accessor: "classCompletionRate",
35
+ label: "Class Completion Rate",
36
+ id: "classCompletionRate",
37
+ },
38
+ {
39
+ accessor: "graduatedStudents",
40
+ label: "Graduated Students",
41
+ id: "graduatedStudents",
42
+ },
43
+ ]
44
+
45
+ const tableProps = {
46
+ sticky: true
47
+ }
48
+
49
+ return (
50
+ <div>
51
+ <AdvancedTable
52
+ columnDefinitions={columnDefinitions}
53
+ maxHeight="xs"
54
+ responsive="none"
55
+ stickyLeftColumn={["year"]}
56
+ tableData={MOCK_DATA}
57
+ tableProps={tableProps}
58
+ {...props}
59
+ />
60
+ </div>
61
+ )
62
+ }
63
+
64
+ export default AdvancedTableStickyColumnsAndHeader
@@ -0,0 +1,8 @@
1
+ To achieve a sticky header AND sticky columns together, in addition to the `stickyLeftColumn` logic outlined above, you can:
2
+
3
+ - Set `sticky: true` via `tableProps`
4
+ - Give the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
5
+
6
+ **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the column stickiness.
7
+
8
+ Expand the table above to see this in action.
@@ -0,0 +1,55 @@
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 AdvancedTableStickyHeader = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ cellAccessors: ["quarter", "month", "day"],
11
+ },
12
+ {
13
+ accessor: "newEnrollments",
14
+ label: "New Enrollments",
15
+ },
16
+ {
17
+ accessor: "scheduledMeetings",
18
+ label: "Scheduled Meetings",
19
+ },
20
+ {
21
+ accessor: "attendanceRate",
22
+ label: "Attendance Rate",
23
+ },
24
+ {
25
+ accessor: "completedClasses",
26
+ label: "Completed Classes",
27
+ },
28
+ {
29
+ accessor: "classCompletionRate",
30
+ label: "Class Completion Rate",
31
+ },
32
+ {
33
+ accessor: "graduatedStudents",
34
+ label: "Graduated Students",
35
+ },
36
+ ]
37
+
38
+ const tableProps = {
39
+ sticky: true
40
+ }
41
+
42
+ return (
43
+ <div>
44
+ <AdvancedTable
45
+ columnDefinitions={columnDefinitions}
46
+ responsive="none"
47
+ tableData={MOCK_DATA}
48
+ tableProps={tableProps}
49
+ {...props}
50
+ />
51
+ </div>
52
+ )
53
+ }
54
+
55
+ export default AdvancedTableStickyHeader
@@ -0,0 +1,3 @@
1
+ The `TableProps` prop can also be used to render a sticky header for the Advanced Table.
2
+
3
+ This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "Sticky Header for Responsive Table" doc example below.
@@ -0,0 +1,33 @@
1
+ <% column_definitions = [
2
+ {
3
+ accessor: "year",
4
+ label: "Year",
5
+ cellAccessors: ["quarter", "month", "day"],
6
+ },
7
+ {
8
+ accessor: "newEnrollments",
9
+ label: "New Enrollments",
10
+ },
11
+ {
12
+ accessor: "scheduledMeetings",
13
+ label: "Scheduled Meetings",
14
+ },
15
+ {
16
+ accessor: "attendanceRate",
17
+ label: "Attendance Rate",
18
+ },
19
+ {
20
+ accessor: "completedClasses",
21
+ label: "Completed Classes",
22
+ },
23
+ {
24
+ accessor: "classCompletionRate",
25
+ label: "Class Completion Rate",
26
+ },
27
+ {
28
+ accessor: "graduatedStudents",
29
+ label: "Graduated Students",
30
+ }
31
+ ] %>
32
+
33
+ <%= pb_rails("advanced_table", props: { id: "sticky_header_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { sticky: true }}) %>
@@ -0,0 +1,3 @@
1
+ The `table_props` prop can also be used to render a sticky header for the Advanced Table.
2
+
3
+ This doc example showcases how to set a sticky header for a nonresponsive table (see the `responsive` prop set to "none"). To achieve sticky header AND responsive functionality, see the "[Sticky Header for Responsive Table](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header-for-responsive-table)" doc example below.
@@ -30,4 +30,4 @@
30
30
  }
31
31
  ] %>
32
32
 
33
- <%= pb_rails("advanced_table", props: { id: "table_props_table", table_data: @table_data, column_definitions: column_definitions, responsive: "none", table_props: { container: false, sticky: true }}) %>
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 }}) %>
@@ -37,14 +37,13 @@ const AdvancedTableTableProps = (props) => {
37
37
 
38
38
  const tableProps = {
39
39
  container: false,
40
- sticky: true
40
+ verticalBorder: true
41
41
  }
42
42
 
43
43
  return (
44
44
  <div>
45
45
  <AdvancedTable
46
46
  columnDefinitions={columnDefinitions}
47
- responsive="none"
48
47
  tableData={MOCK_DATA}
49
48
  tableProps={tableProps}
50
49
  {...props}
@@ -1,3 +1,3 @@
1
- This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table).
1
+ This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `table_props` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
2
2
 
3
- This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#table-props-sticky-header) doc example below.
3
+ This doc example showcases the use of two table props, including how to render the vertical borders between columns.
@@ -1,3 +1,3 @@
1
1
  This kit uses the [Table kit](https://playbook.powerapp.cloud/kits/table/react) under the hood which comes with its own set of props. If you want to apply certain Table props to that underlying kit, you can do so by using the optional `tableProps` prop. This prop must be an object that contains valid Table props. For a full list of Table props, see [here](https://playbook.powerapp.cloud/kits/table/react).
2
2
 
3
- This doc example showcases how to set a sticky header for a nonresponsive table. To achieve sticky header AND responsive functionality, see the ["Table Props Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props-sticky-header) doc example below.
3
+ This doc example showcases the use of two table props, including how to render the vertical borders between columns.
@@ -1,3 +1,7 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `table_props` and giving the AdvancedTable a `max_height` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
2
2
 
3
- A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table#table-props) doc example above.
3
+ **NOTE**: This behavior requires a `max_height` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
+
5
+ Expand the table above to see this in action.
6
+
7
+ A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table#sticky-header) doc example above.
@@ -1,3 +1,7 @@
1
- Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop. This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
1
+ Create a sticky header that works for responsive Advanced Tables by setting `sticky: true` via `tableProps` and giving the AdvancedTable a `maxHeight` using our [Max Height](https://playbook.powerapp.cloud/visual_guidelines/max_height) global prop.
2
2
 
3
- A sticky header on a nonresponsive table is demonstrated in the ["Table Props"](https://playbook.powerapp.cloud/kits/advanced_table/react#table-props) doc example above.
3
+ **NOTE**: This behavior requires a `maxHeight` to work. The header is sticky within the table container, allowing for it to work along with the first column stickiness of a responsive table on smaller screen sizes.
4
+
5
+ Expand the table above to see this in action.
6
+
7
+ A sticky header on a nonresponsive table is demonstrated in the ["Sticky Header"](https://playbook.powerapp.cloud/kits/advanced_table/react#sticky-header) doc example above.
@@ -5,7 +5,8 @@ examples:
5
5
  - advanced_table_beta_subrow_headers: SubRow Headers
6
6
  - advanced_table_collapsible_trail_rails: Collapsible Trail
7
7
  - advanced_table_table_props: Table Props
8
- - advanced_table_table_props_sticky_header: Table Props Sticky Header
8
+ - advanced_table_sticky_header_rails: Sticky Header
9
+ - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
9
10
  - advanced_table_beta_sort: Enable Sorting
10
11
  - advanced_table_responsive: Responsive Tables
11
12
  - advanced_table_custom_cell_rails: Custom Components for Cells
@@ -25,7 +26,10 @@ examples:
25
26
  - advanced_table_collapsible_trail: Collapsible Trail
26
27
  - advanced_table_table_options: Table Options
27
28
  - advanced_table_table_props: Table Props
28
- - advanced_table_table_props_sticky_header: Table Props Sticky Header
29
+ - advanced_table_sticky_header: Sticky Header
30
+ - advanced_table_table_props_sticky_header: Sticky Header for Responsive Table
31
+ - advanced_table_sticky_columns: Sticky Columns
32
+ - advanced_table_sticky_columns_and_header: Sticky Columns with Sticky Header
29
33
  - advanced_table_inline_row_loading: Inline Row Loading
30
34
  - advanced_table_responsive: Responsive Tables
31
35
  - advanced_table_custom_cell: Custom Components for Cells
@@ -22,4 +22,7 @@ export { default as AdvancedTableSelectableRowsActions } from './_advanced_table
22
22
  export { default as AdvancedTableTablePropsStickyHeader } from './_advanced_table_table_props_sticky_header.jsx'
23
23
  export { default as AdvancedTableColumnHeadersCustomCell } from './_advanced_table_column_headers_custom_cell.jsx'
24
24
  export { default as AdvancedTableInlineEditing } from './_advanced_table_inline_editing.jsx'
25
- export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
25
+ export { default as AdvancedTableFullscreen } from './_advanced_table_fullscreen.jsx'
26
+ export { default as AdvancedTableStickyColumns } from './_advanced_table_sticky_columns.jsx'
27
+ export { default as AdvancedTableStickyHeader } from './_advanced_table_sticky_header.jsx'
28
+ export { default as AdvancedTableStickyColumnsAndHeader } from './_advanced_table_sticky_columns_and_header.jsx'
@@ -1,5 +1,4 @@
1
- <div>
2
-
1
+ <%= pb_rails("flex", props: {orientation: "column", row_gap:"md"}) do %>
3
2
  <%= pb_rails("form_group") do %>
4
3
  <%= pb_rails("text_input", props: { placeholder: "Enter Artist Name" }) %>
5
4
  <%= pb_rails("select", props: {
@@ -17,8 +16,6 @@
17
16
  ]
18
17
  }) %>
19
18
  <% end %>
20
- <br>
21
- <br>
22
19
  <%= pb_rails("form_group") do %>
23
20
  <%= pb_rails("select", props: {
24
21
  blank_selection: "Phone",
@@ -32,4 +29,17 @@
32
29
  id: "phone"
33
30
  }) %>
34
31
  <% end %>
35
- </div>
32
+ <%= pb_rails("form_group") do %>
33
+ <%= pb_rails("phone_number_input", props: {
34
+ id: "phone2"
35
+ }) %>
36
+ <%= pb_rails("select", props: {
37
+ blank_selection: "Phone",
38
+ options: [
39
+ { value: "Cell" },
40
+ { value: "Work" },
41
+ { value: "Home" },
42
+ ]
43
+ }) %>
44
+ <% end %>
45
+ <% end %>
@@ -4,6 +4,7 @@ import FormGroup from '../_form_group'
4
4
  import PhoneNumberInput from '../../pb_phone_number_input/_phone_number_input'
5
5
  import Select from '../../pb_select/_select'
6
6
  import TextInput from '../../pb_text_input/_text_input'
7
+ import Flex from '../../pb_flex/_flex'
7
8
 
8
9
  const FormGroupSelect = (props) => {
9
10
  const options = [
@@ -25,7 +26,10 @@ const FormGroupSelect = (props) => {
25
26
  ]
26
27
 
27
28
  return (
28
- <div>
29
+ <Flex
30
+ orientation="column"
31
+ rowGap="md"
32
+ >
29
33
  <FormGroup>
30
34
  <TextInput
31
35
  placeholder="Enter Artist Name"
@@ -37,18 +41,29 @@ const FormGroupSelect = (props) => {
37
41
  {...props}
38
42
  />
39
43
  </FormGroup>
40
- <br />
41
- <br />
42
44
  <FormGroup>
43
45
  <Select
44
46
  blankSelection="Phone"
45
47
  options={phoneOptions}
46
- />
48
+ {...props}
49
+ />
47
50
  <PhoneNumberInput
48
51
  id='default'
52
+ {...props}
49
53
  />
50
54
  </FormGroup>
51
- </div>
55
+ <FormGroup>
56
+ <PhoneNumberInput
57
+ id='default-2'
58
+ {...props}
59
+ />
60
+ <Select
61
+ blankSelection="Phone"
62
+ options={phoneOptions}
63
+ {...props}
64
+ />
65
+ </FormGroup>
66
+ </Flex>
52
67
  )
53
68
  }
54
69