playbook_ui_docs 14.19.0.pre.alpha.PLAY2172homeaddressstreetundefinedstatebug7733 → 14.19.0.pre.alpha.PLAY20937693

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.19.0.pre.alpha.PLAY2172homeaddressstreetundefinedstatebug7733
4
+ version: 14.19.0.pre.alpha.PLAY20937693
5
5
  platform: ruby
6
6
  authors:
7
7
  - Power UX
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2025-05-13 00:00:00.000000000 Z
12
+ date: 2025-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: playbook_ui
@@ -54,14 +54,6 @@ files:
54
54
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb
55
55
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx
56
56
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md
57
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.jsx
58
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility.md
59
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.jsx
60
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_custom.md
61
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.jsx
62
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_multi.md
63
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.jsx
64
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_visibility_with_state.md
65
57
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.jsx
66
58
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell.md
67
59
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_custom_cell_rails.html.erb
@@ -880,8 +872,6 @@ files:
880
872
  - app/pb_kits/playbook/pb_file_upload/docs/_file_upload_custom_message.jsx
881
873
  - app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.html.erb
882
874
  - app/pb_kits/playbook/pb_file_upload/docs/_file_upload_default.jsx
883
- - app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.html.erb
884
- - app/pb_kits/playbook/pb_file_upload/docs/_file_upload_error.jsx
885
875
  - app/pb_kits/playbook/pb_file_upload/docs/_file_upload_max_size.jsx
886
876
  - app/pb_kits/playbook/pb_file_upload/docs/example.yml
887
877
  - app/pb_kits/playbook/pb_file_upload/docs/index.js
@@ -1,57 +0,0 @@
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 AdvancedTableColumnVisibility = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- id: "year"
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
- columnVisibilityControl={{default: true}}
50
- tableData={MOCK_DATA}
51
- {...props}
52
- />
53
- </div>
54
- )
55
- }
56
-
57
- export default AdvancedTableColumnVisibility
@@ -1,4 +0,0 @@
1
- The `columnVisibilityControl` prop allows users to toggle the visibility of table columns dynamically.
2
-
3
- The default can be enabled simply by passing `{ default:true }` to the prop as shown. This will render the header with the icon enabled dropdown. The dropdown contains all columns present in the Table and any can be toggled on or off via the checkboxes.
4
- **NOTE**: The first column will not be shown in the dropdown as an option since all the expansion logic/functionality lives there and it should always be visible.
@@ -1,62 +0,0 @@
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 AdvancedTableColumnVisibilityCustom = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- id: "year"
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 columnVisibilityControl = {
46
- // This is the list of column ids that will be included in the column visibility control
47
- includeIds:["newEnrollments", "scheduledMeetings", "attendanceRate", "completedClasses"],
48
- }
49
-
50
- return (
51
- <div>
52
- <AdvancedTable
53
- columnDefinitions={columnDefinitions}
54
- columnVisibilityControl={columnVisibilityControl}
55
- tableData={MOCK_DATA}
56
- {...props}
57
- />
58
- </div>
59
- )
60
- }
61
-
62
- export default AdvancedTableColumnVisibilityCustom
@@ -1 +0,0 @@
1
- By using the `includeIds` key/value pair as shown within the `columnVisibilityControl` prop, you can control which columns show up as options in the columnVisibility dropdown.
@@ -1,82 +0,0 @@
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 AdvancedTableColumnVisibilityMulti = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- id: "year",
11
- cellAccessors: ["quarter", "month", "day"],
12
- },
13
- {
14
- label: "Enrollment Data",
15
- id: "enrollmentData",
16
- columns: [
17
- {
18
- label: "Enrollment Stats",
19
- id: "enrollmentStats",
20
- columns: [
21
- {
22
- accessor: "newEnrollments",
23
- label: "New Enrollments",
24
- id: "newEnrollments",
25
- },
26
- {
27
- accessor: "scheduledMeetings",
28
- label: "Scheduled Meetings",
29
- id: "scheduledMeetings",
30
- },
31
- ],
32
- },
33
- ],
34
- },
35
- {
36
- label: "Performance Data",
37
- id: "performanceData",
38
- columns: [
39
- {
40
- label: "Completion Metrics",
41
- id: "completionMetrics",
42
- columns: [
43
- {
44
- accessor: "completedClasses",
45
- label: "Completed Classes",
46
- id: "completedClasses",
47
- },
48
- {
49
- accessor: "classCompletionRate",
50
- label: "Class Completion Rate",
51
- id: "classCompletionRate",
52
- },
53
- ],
54
- },
55
- {
56
- label: "Attendance",
57
- id: "attendance",
58
- columns: [
59
- {
60
- accessor: "attendanceRate",
61
- label: "Attendance Rate",
62
- id: "attendanceRate",
63
- },
64
- ],
65
- },
66
- ],
67
- },
68
- ];
69
-
70
- return (
71
- <div>
72
- <AdvancedTable
73
- columnDefinitions={columnDefinitions}
74
- columnVisibilityControl={{default: true}}
75
- tableData={MOCK_DATA}
76
- {...props}
77
- />
78
- </div>
79
- )
80
- }
81
-
82
- export default AdvancedTableColumnVisibilityMulti
@@ -1 +0,0 @@
1
- The `columnVisibilityControl` prop can also be used with multi-header columns as shown.
@@ -1,65 +0,0 @@
1
- import React, { useState } from "react"
2
- import AdvancedTable from '../../pb_advanced_table/_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data.json"
4
-
5
- const AdvancedTableColumnVisibilityWithState = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- id: "year"
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 [columnVisibility, setColumnVisibility] = useState({
46
- newEnrollments: false
47
- })
48
-
49
- const columnVisibilityControl = {
50
- value: columnVisibility,
51
- onChange: setColumnVisibility,
52
- }
53
- return (
54
- <div>
55
- <AdvancedTable
56
- columnDefinitions={columnDefinitions}
57
- columnVisibilityControl={columnVisibilityControl}
58
- tableData={MOCK_DATA}
59
- {...props}
60
- />
61
- </div>
62
- )
63
- }
64
-
65
- export default AdvancedTableColumnVisibilityWithState
@@ -1 +0,0 @@
1
- The `columnVisibilityControl` prop also allows for greater control over the columnVisibility state. Devs can manage state themselves by passing in `value` and `onChange` as shown.
@@ -1 +0,0 @@
1
- <%= pb_rails("file_upload", props: {id: "error", error: raw(pb_rails("icon", props: { icon: "warning" }) + " Please upload a valid file")}) %>
@@ -1,41 +0,0 @@
1
- import React, { useState } from 'react'
2
- import FileUpload from '../_file_upload'
3
- import List from '../../pb_list/_list'
4
- import ListItem from '../../pb_list/_list_item'
5
- import Icon from '../../pb_icon/_icon'
6
-
7
- const AcceptedFilesList = ({ files }) => (
8
- <List>
9
- {files.map((file) => (
10
- <ListItem key={file.name}>{file.name}</ListItem>
11
- ))}
12
- </List>
13
- )
14
-
15
- const FileUploadError = (props) => {
16
- const [filesToUpload, setFilesToUpload] = useState([])
17
-
18
- const handleOnFilesAccepted = (files) => {
19
- setFilesToUpload([...filesToUpload, ...files])
20
- }
21
-
22
- const error = (<>
23
- <Icon icon="warning" /> Please upload a valid file
24
- </>)
25
-
26
- return (
27
- <div>
28
- <AcceptedFilesList
29
- files={filesToUpload}
30
- {...props}
31
- />
32
- <FileUpload
33
- error={error}
34
- onFilesAccepted={handleOnFilesAccepted}
35
- {...props}
36
- />
37
- </div>
38
- )
39
- }
40
-
41
- export default FileUploadError