playbook_ui_docs 15.6.0.pre.alpha.play266013023 → 15.6.0.pre.alpha.play266913088
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_background_colors_rails.html.erb +43 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.md +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb +11 -5
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +7 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.jsx +54 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.md +9 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx +80 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md +3 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +4 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +3 -1
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb +33 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx +46 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md +2 -0
- data/app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md +2 -0
- data/app/pb_kits/playbook/pb_contact/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_contact/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.html.erb +23 -14
- data/app/pb_kits/playbook/pb_date_picker/docs/_date_picker_range_pattern_rails.md +1 -1
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb +71 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx +57 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md +1 -0
- data/app/pb_kits/playbook/pb_dialog/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_dialog/docs/index.js +2 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +7 -5
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb +19 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb +12 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md +26 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb +19 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md +1 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb +30 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md +3 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb +29 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md +13 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +3 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +5 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx +134 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md +34 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb +101 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md +33 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx +180 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb +122 -0
- data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md +3 -0
- data/app/pb_kits/playbook/pb_table/docs/example.yml +4 -0
- data/app/pb_kits/playbook/pb_table/docs/index.js +2 -0
- metadata +33 -2
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import React, { useState } from "react"
|
|
2
|
+
import { Button, Date as DateKit, DatePicker, Dropdown, Pagination, Select, Table, TextInput, Typeahead, Flex } from "playbook-ui"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
// Mock Data for Table
|
|
6
|
+
const users = [
|
|
7
|
+
{ id: 1, name: "Jennifer", title: "Associate Scrum Master", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-01" },
|
|
8
|
+
{ id: 2, name: "Nick", title: "UX Engineer II", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-02" },
|
|
9
|
+
{ id: 3, name: "Nida", title: "Senior UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-03" },
|
|
10
|
+
{ id: 4, name: "Justin", title: "Director of User Experience Engineering", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-04" },
|
|
11
|
+
{ id: 5, name: "Edward", title: "UX Designer II", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-05" },
|
|
12
|
+
{ id: 6, name: "Elisa", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-06" },
|
|
13
|
+
{ id: 7, name: "Gary", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-07" },
|
|
14
|
+
{ id: 8, name: "Barkley", title: "Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-08" },
|
|
15
|
+
{ id: 9, name: "Aaron", title: "Associate Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-09" },
|
|
16
|
+
{ id: 10, name: "Sarah", title: "Senior Product Manager", department: "Business Technology", branch: "New York", startDate: "2025-01-10" },
|
|
17
|
+
{ id: 11, name: "Michael", title: "Software Engineer III", department: "Business Technology", branch: "Austin", startDate: "2025-01-11" },
|
|
18
|
+
{ id: 12, name: "Emma", title: "Data Analyst II", department: "Customer Development", branch: "Philadelphia", startDate: "2025-01-12" },
|
|
19
|
+
{ id: 13, name: "David", title: "QA Engineer", department: "Business Technology", branch: "New York", startDate: "2025-01-13" },
|
|
20
|
+
{ id: 14, name: "Lisa", title: "UX Researcher", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-14" },
|
|
21
|
+
{ id: 15, name: "James", title: "DevOps Engineer", department: "Business Technology", branch: "Austin", startDate: "2025-01-15" },
|
|
22
|
+
{ id: 16, name: "Anna", title: "Product Designer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-16" },
|
|
23
|
+
{ id: 17, name: "Robert", title: "Backend Engineer", department: "Business Technology", branch: "New York", startDate: "2025-01-17" },
|
|
24
|
+
{ id: 18, name: "Maria", title: "Frontend Developer", department: "Business Technology", branch: "Austin", startDate: "2025-01-18" },
|
|
25
|
+
{ id: 19, name: "William", title: "Tech Lead", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-19" },
|
|
26
|
+
{ id: 20, name: "Jessica", title: "Scrum Master", department: "Business Technology", branch: "New York", startDate: "2025-01-20" },
|
|
27
|
+
{ id: 21, name: "Daniel", title: "Software Architect", department: "Business Technology", branch: "Austin", startDate: "2025-01-21" },
|
|
28
|
+
{ id: 22, name: "Laura", title: "Business Analyst", department: "Customer Development", branch: "Philadelphia", startDate: "2025-01-22" },
|
|
29
|
+
{ id: 23, name: "Chris", title: "Security Engineer", department: "Business Technology", branch: "New York", startDate: "2025-01-23" },
|
|
30
|
+
{ id: 24, name: "Ashley", title: "UX Engineer III", department: "Business Technology", branch: "Austin", startDate: "2025-01-24" },
|
|
31
|
+
{ id: 25, name: "Kevin", title: "Platform Engineer", department: "Business Technology", branch: "Philadelphia", startDate: "2025-01-25" },
|
|
32
|
+
{ id: 26, name: "Michelle", title: "Content Designer", department: "Business Technology", branch: "New York", startDate: "2025-01-26" },
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
const TableWithFilterVariantWithPagination = () => {
|
|
37
|
+
const [territory, setTerritory] = useState("")
|
|
38
|
+
// ------Pagination-----
|
|
39
|
+
const [activePage, setActivePage] = useState(1)
|
|
40
|
+
// Calculate pagination
|
|
41
|
+
const itemsPerPage = 20
|
|
42
|
+
const totalPages = Math.ceil(users.length / itemsPerPage)
|
|
43
|
+
const startIndex = (activePage - 1) * itemsPerPage
|
|
44
|
+
const endIndex = startIndex + itemsPerPage
|
|
45
|
+
const currentData = users.slice(startIndex, endIndex)
|
|
46
|
+
|
|
47
|
+
const onPageChange = (page) => {
|
|
48
|
+
setActivePage(page)
|
|
49
|
+
}
|
|
50
|
+
// ------End Pagination-----
|
|
51
|
+
|
|
52
|
+
// -------Filter content example ------
|
|
53
|
+
const filterContent = ({ closePopover }) => (
|
|
54
|
+
<>
|
|
55
|
+
<TextInput
|
|
56
|
+
label="Territory ID"
|
|
57
|
+
onChange={event => setTerritory(event.target.value)}
|
|
58
|
+
value={territory}
|
|
59
|
+
/>
|
|
60
|
+
<Typeahead
|
|
61
|
+
label="Title"
|
|
62
|
+
options={[
|
|
63
|
+
{ key: "senior-ux-engineer", label: "Senior UX Engineer", value: "senior-ux-engineer" },
|
|
64
|
+
{ key: "ux-engineer", label: "UX Engineer", value: "ux-engineer" },
|
|
65
|
+
{ key: "ux-designer", label: "UX Designer", value: "ux-designer" }
|
|
66
|
+
]}
|
|
67
|
+
/>
|
|
68
|
+
|
|
69
|
+
<Select
|
|
70
|
+
blankSelection="All Departments"
|
|
71
|
+
label="Department"
|
|
72
|
+
options={[
|
|
73
|
+
{ value: "Business Technology", label: "Business Technology", key: "business-technology" },
|
|
74
|
+
{ value: "Customer Development", label: "Customer Development", key: "customer-development" },
|
|
75
|
+
{ value: "Talent Acquisition", label: "Talent Acquisition", key: "talent-acquisition" }
|
|
76
|
+
]}
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
<Dropdown
|
|
80
|
+
label="Branch"
|
|
81
|
+
options={[
|
|
82
|
+
{ key: "Philadelphia", label: "Philadelphia", value: "philadelphia" },
|
|
83
|
+
{ key: "New York", label: "New York", value: "new-york" },
|
|
84
|
+
{ key: "Austin", label: "Austin", value: "austin" }
|
|
85
|
+
]}
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<DatePicker
|
|
89
|
+
label="Start Date"
|
|
90
|
+
paddingY="sm"
|
|
91
|
+
pickerId="startedOn"
|
|
92
|
+
/>
|
|
93
|
+
<Flex spacing="between">
|
|
94
|
+
<Button
|
|
95
|
+
onClick={() => {
|
|
96
|
+
alert("No filtering functionality - just a pattern demo!")
|
|
97
|
+
closePopover()
|
|
98
|
+
}}
|
|
99
|
+
text="Filter"
|
|
100
|
+
/>
|
|
101
|
+
<Button
|
|
102
|
+
text="Defaults"
|
|
103
|
+
variant="secondary"
|
|
104
|
+
/>
|
|
105
|
+
</Flex>
|
|
106
|
+
</>
|
|
107
|
+
)
|
|
108
|
+
// -------End Filter content example ------
|
|
109
|
+
|
|
110
|
+
// -------Pagination element example ------
|
|
111
|
+
const paginationElement = (
|
|
112
|
+
<Pagination
|
|
113
|
+
current={activePage}
|
|
114
|
+
key={`pagination-${activePage}`}
|
|
115
|
+
marginLeft="lg"
|
|
116
|
+
onChange={onPageChange}
|
|
117
|
+
paddingY="xs"
|
|
118
|
+
range={5}
|
|
119
|
+
total={totalPages}
|
|
120
|
+
/>
|
|
121
|
+
)
|
|
122
|
+
// -------End Pagination element example ------
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<Table
|
|
126
|
+
filterContent={filterContent}
|
|
127
|
+
filterProps={{
|
|
128
|
+
results: 50,
|
|
129
|
+
sortOptions: {
|
|
130
|
+
territory_id: "Territory ID",
|
|
131
|
+
first_name: "Name",
|
|
132
|
+
started_on: "Start Date",
|
|
133
|
+
department_name: "Department",
|
|
134
|
+
title_name: "Title",
|
|
135
|
+
branch_branch_name: "Branch",
|
|
136
|
+
},
|
|
137
|
+
sortValue: [{ name: 'started_on', dir: 'asc' }],
|
|
138
|
+
}}
|
|
139
|
+
pagination={paginationElement}
|
|
140
|
+
title="Table Title Here"
|
|
141
|
+
variant="withFilter"
|
|
142
|
+
>
|
|
143
|
+
<Table.Head>
|
|
144
|
+
<Table.Row>
|
|
145
|
+
<Table.Header>{'Territory ID'}</Table.Header>
|
|
146
|
+
<Table.Header>{'Name'}</Table.Header>
|
|
147
|
+
<Table.Header>{'Title'}</Table.Header>
|
|
148
|
+
<Table.Header>{'Department'}</Table.Header>
|
|
149
|
+
<Table.Header>{'Branch'}</Table.Header>
|
|
150
|
+
<Table.Header textAlign="right">{'Start Date'}</Table.Header>
|
|
151
|
+
</Table.Row>
|
|
152
|
+
</Table.Head>
|
|
153
|
+
<Table.Body>
|
|
154
|
+
{currentData.map((user) => (
|
|
155
|
+
<Table.Row key={user.id}>
|
|
156
|
+
<Table.Cell
|
|
157
|
+
marginX={{ xs: "sm" }}
|
|
158
|
+
numberSpacing="tabular"
|
|
159
|
+
>
|
|
160
|
+
{user.id}
|
|
161
|
+
</Table.Cell>
|
|
162
|
+
<Table.Cell marginX={{ xs: "sm" }}>{user.name}</Table.Cell>
|
|
163
|
+
<Table.Cell marginX={{ xs: "sm" }}>{user.title}</Table.Cell>
|
|
164
|
+
<Table.Cell marginX={{ xs: "sm" }}>{user.department}</Table.Cell>
|
|
165
|
+
<Table.Cell marginX={{ xs: "sm" }}>{user.branch}</Table.Cell>
|
|
166
|
+
<Table.Cell marginX={{ xs: "sm" }}>
|
|
167
|
+
<DateKit
|
|
168
|
+
alignment="right"
|
|
169
|
+
showCurrentYear
|
|
170
|
+
value={user.startDate}
|
|
171
|
+
/>
|
|
172
|
+
</Table.Cell>
|
|
173
|
+
</Table.Row>
|
|
174
|
+
))}
|
|
175
|
+
</Table.Body>
|
|
176
|
+
</Table>
|
|
177
|
+
)
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export default TableWithFilterVariantWithPagination
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
The `withFilter` variant can also be used with the Pagination kit as shown here. Simply set up your Pagination as normal, and pass the Pagination kit to the prop `pagination` as shown.
|
|
2
|
+
|
|
3
|
+
For more information on the Pagination Kit and how to use it, see the documentation [here](https://playbook.powerapp.cloud/kits/pagination/react)
|
data/app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<% users = [
|
|
2
|
+
{ id: 1, name: "Jennifer", title: "Associate Scrum Master", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 1) },
|
|
3
|
+
{ id: 2, name: "Nick", title: "UX Engineer II", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 2) },
|
|
4
|
+
{ id: 3, name: "Nida", title: "Senior UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 3) },
|
|
5
|
+
{ id: 4, name: "Justin", title: "Director of User Experience Engineering", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 4) },
|
|
6
|
+
{ id: 5, name: "Edward", title: "UX Designer II", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 5) },
|
|
7
|
+
{ id: 6, name: "Elisa", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 6) },
|
|
8
|
+
{ id: 7, name: "Gary", title: "UX Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 7) },
|
|
9
|
+
{ id: 8, name: "Barkley", title: "Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 8) },
|
|
10
|
+
{ id: 9, name: "Aaron", title: "Associate Nitro Quality Ninja", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 9) },
|
|
11
|
+
{ id: 10, name: "Sarah", title: "Senior Product Manager", department: "Business Technology", branch: "New York", start_date: Date.new(2025, 1, 10) },
|
|
12
|
+
{ id: 11, name: "Michael", title: "Software Engineer III", department: "Business Technology", branch: "Austin", start_date: Date.new(2025, 1, 11) },
|
|
13
|
+
{ id: 12, name: "Emma", title: "Data Analyst II", department: "Customer Development", branch: "Philadelphia", start_date: Date.new(2025, 1, 12) },
|
|
14
|
+
{ id: 13, name: "David", title: "QA Engineer", department: "Business Technology", branch: "New York", start_date: Date.new(2025, 1, 13) },
|
|
15
|
+
{ id: 14, name: "Lisa", title: "UX Researcher", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 14) },
|
|
16
|
+
{ id: 15, name: "James", title: "DevOps Engineer", department: "Business Technology", branch: "Austin", start_date: Date.new(2025, 1, 15) },
|
|
17
|
+
{ id: 16, name: "Anna", title: "Product Designer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 16) },
|
|
18
|
+
{ id: 17, name: "Robert", title: "Backend Engineer", department: "Business Technology", branch: "New York", start_date: Date.new(2025, 1, 17) },
|
|
19
|
+
{ id: 18, name: "Maria", title: "Frontend Developer", department: "Business Technology", branch: "Austin", start_date: Date.new(2025, 1, 18) },
|
|
20
|
+
{ id: 19, name: "William", title: "Tech Lead", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 19) },
|
|
21
|
+
{ id: 20, name: "Jessica", title: "Scrum Master", department: "Business Technology", branch: "New York", start_date: Date.new(2025, 1, 20) },
|
|
22
|
+
{ id: 21, name: "Daniel", title: "Software Architect", department: "Business Technology", branch: "Austin", start_date: Date.new(2025, 1, 21) },
|
|
23
|
+
{ id: 22, name: "Laura", title: "Business Analyst", department: "Customer Development", branch: "Philadelphia", start_date: Date.new(2025, 1, 22) },
|
|
24
|
+
{ id: 23, name: "Chris", title: "Security Engineer", department: "Business Technology", branch: "New York", start_date: Date.new(2025, 1, 23) },
|
|
25
|
+
{ id: 24, name: "Ashley", title: "UX Engineer III", department: "Business Technology", branch: "Austin", start_date: Date.new(2025, 1, 24) },
|
|
26
|
+
{ id: 25, name: "Kevin", title: "Platform Engineer", department: "Business Technology", branch: "Philadelphia", start_date: Date.new(2025, 1, 25) },
|
|
27
|
+
{ id: 26, name: "Michelle", title: "Content Designer", department: "Business Technology", branch: "New York", start_date: Date.new(2025, 1, 26) },
|
|
28
|
+
] %>
|
|
29
|
+
|
|
30
|
+
<% filter_content =
|
|
31
|
+
pb_rails("text_input", props: {
|
|
32
|
+
label: "Territory ID",
|
|
33
|
+
placeholder: "Enter Territory ID"
|
|
34
|
+
}) +
|
|
35
|
+
pb_rails("typeahead", props: {
|
|
36
|
+
label: "Title",
|
|
37
|
+
options: [
|
|
38
|
+
{ label: "Senior UX Engineer", value: "senior-ux-engineer" },
|
|
39
|
+
{ label: "UX Engineer", value: "ux-engineer" },
|
|
40
|
+
{ label: "UX Designer", value: "ux-designer" }
|
|
41
|
+
]
|
|
42
|
+
}) +
|
|
43
|
+
pb_rails("select", props: {
|
|
44
|
+
blank_selection: "All Departments",
|
|
45
|
+
label: "Department",
|
|
46
|
+
options: [
|
|
47
|
+
{ value: "Business Technology", text: "Business Technology" },
|
|
48
|
+
{ value: "Customer Development", text: "Customer Development" },
|
|
49
|
+
{ value: "Talent Acquisition", text: "Talent Acquisition" }
|
|
50
|
+
]
|
|
51
|
+
}) +
|
|
52
|
+
pb_rails("dropdown", props: {
|
|
53
|
+
label: "Branch",
|
|
54
|
+
options: [
|
|
55
|
+
{ label: "Philadelphia", value: "philadelphia" },
|
|
56
|
+
{ label: "New York", value: "new-york" },
|
|
57
|
+
{ label: "Austin", value: "austin" }
|
|
58
|
+
]
|
|
59
|
+
}) +
|
|
60
|
+
pb_rails("date_picker", props: {
|
|
61
|
+
label: "Start Date",
|
|
62
|
+
padding_y: "sm",
|
|
63
|
+
picker_id: "startedOn"
|
|
64
|
+
}) +
|
|
65
|
+
pb_rails("flex", props: { spacing: "between" }) do
|
|
66
|
+
pb_rails("button", props: {
|
|
67
|
+
text: "Filter",
|
|
68
|
+
}) +
|
|
69
|
+
pb_rails("button", props: {
|
|
70
|
+
text: "Defaults",
|
|
71
|
+
variant: "secondary"
|
|
72
|
+
})
|
|
73
|
+
end
|
|
74
|
+
%>
|
|
75
|
+
|
|
76
|
+
<%# Replace "model" in pagination here with your specific data source %>
|
|
77
|
+
<% pagination_element = pb_rails("pagination", props: { model: @users, view: self, padding_y:"xs", margin_left:"lg" }) %>
|
|
78
|
+
|
|
79
|
+
<%= pb_rails("table", props: {
|
|
80
|
+
variant: "with_filter",
|
|
81
|
+
title: "Table Title Here",
|
|
82
|
+
filter_content: filter_content,
|
|
83
|
+
pagination: pagination_element,
|
|
84
|
+
filter_props: {
|
|
85
|
+
id: "user-table-filters-2",
|
|
86
|
+
results: users.length,
|
|
87
|
+
sort_menu: [
|
|
88
|
+
{ item: "Start Date", link: "?q[sorts]=started_on+asc", active: true, direction: "asc" },
|
|
89
|
+
{ item: "First Name", link: "?q[sorts]=name+asc", active: false },
|
|
90
|
+
{ item: "Title", link: "?q[sorts]=title+asc", active: false },
|
|
91
|
+
{ item: "Department", link: "?q[sorts]=department+asc", active: false },
|
|
92
|
+
{ item: "Branch", link: "?q[sorts]=branch+asc", active: false },
|
|
93
|
+
{ item: "Territory ID", link: "?q[sorts]=territory_id+asc", active: false },
|
|
94
|
+
],
|
|
95
|
+
}
|
|
96
|
+
}) do %>
|
|
97
|
+
<%= pb_rails("table/table_head") do %>
|
|
98
|
+
<%= pb_rails("table/table_row") do %>
|
|
99
|
+
<%= pb_rails("table/table_header", props: { text: "Territory ID" }) %>
|
|
100
|
+
<%= pb_rails("table/table_header", props: { text: "Name" }) %>
|
|
101
|
+
<%= pb_rails("table/table_header", props: { text: "Title" }) %>
|
|
102
|
+
<%= pb_rails("table/table_header", props: { text: "Department" }) %>
|
|
103
|
+
<%= pb_rails("table/table_header", props: { text: "Branch" }) %>
|
|
104
|
+
<%= pb_rails("table/table_header", props: { text: "Start Date", text_align: "right" }) %>
|
|
105
|
+
<% end %>
|
|
106
|
+
<% end %>
|
|
107
|
+
|
|
108
|
+
<%= pb_rails("table/table_body") do %>
|
|
109
|
+
<% users.each do |user| %>
|
|
110
|
+
<%= pb_rails("table/table_row") do %>
|
|
111
|
+
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" }, number_spacing: "tabular" }) { user[:id].to_s } %>
|
|
112
|
+
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:name] } %>
|
|
113
|
+
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:title] } %>
|
|
114
|
+
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:department] } %>
|
|
115
|
+
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) { user[:branch] } %>
|
|
116
|
+
<%= pb_rails("table/table_cell", props: { margin_x: { xs: "sm" } }) do %>
|
|
117
|
+
<%= pb_rails("date", props: {alignment: "right", date: user[:start_date].to_s, show_current_year: true } ) %>
|
|
118
|
+
<% end %>
|
|
119
|
+
<% end %>
|
|
120
|
+
<% end %>
|
|
121
|
+
<% end %>
|
|
122
|
+
<% end %>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
The `with_filter` variant can also be used with the Pagination kit as shown here. Simply set up your Pagination as normal, and pass the Pagination kit to the prop `pagination` as shown.
|
|
2
|
+
|
|
3
|
+
**IMPORTANT NOTE**: This is NOT a working example of pagination, please set up your use case with the relevant data in your controller. For more information on the Pagination Kit and how to use it, see the documentation [here](https://playbook.powerapp.cloud/kits/pagination/rails)
|
|
@@ -40,6 +40,8 @@ examples:
|
|
|
40
40
|
- table_with_selectable_rows: Table with Selectable Rows
|
|
41
41
|
- table_with_header_style_borderless: Header Style Borderless
|
|
42
42
|
- table_with_header_style_floating: Header Style Floating
|
|
43
|
+
- table_with_filter_variant_rails: Variant with Filter
|
|
44
|
+
- table_with_filter_variant_with_pagination_rails: Variant with Filter and Pagination
|
|
43
45
|
|
|
44
46
|
react:
|
|
45
47
|
- table_sm: Small
|
|
@@ -81,3 +83,5 @@ examples:
|
|
|
81
83
|
- table_with_selectable_rows: Table with Selectable Rows
|
|
82
84
|
- table_with_header_style_borderless: Header Style Borderless
|
|
83
85
|
- table_with_header_style_floating: Header Style Floating
|
|
86
|
+
- table_with_filter_variant: Variant with Filter
|
|
87
|
+
- table_with_filter_variant_with_pagination: Variant with Filter and Pagination
|
|
@@ -38,3 +38,5 @@ export { default as TableWithSelectableRows } from './_table_with_selectable_row
|
|
|
38
38
|
export { default as TableWithClickableRows } from './_table_with_clickable_rows.jsx'
|
|
39
39
|
export { default as TableWithHeaderStyleBorderless } from './_table_with_header_style_borderless.jsx'
|
|
40
40
|
export { default as TableWithHeaderStyleFloating } from './_table_with_header_style_floating.jsx'
|
|
41
|
+
export { default as TableWithFilterVariant } from './_table_with_filter_variant.jsx'
|
|
42
|
+
export { default as TableWithFilterVariantWithPagination } from './_table_with_filter_variant_with_pagination.jsx'
|
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: 15.6.0.pre.alpha.
|
|
4
|
+
version: 15.6.0.pre.alpha.play266913088
|
|
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-12-
|
|
12
|
+
date: 2025-12-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: playbook_ui
|
|
@@ -33,6 +33,8 @@ executables: []
|
|
|
33
33
|
extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
|
35
35
|
files:
|
|
36
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.html.erb
|
|
37
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_colors_rails.md
|
|
36
38
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.html.erb
|
|
37
39
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md
|
|
38
40
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta.html.erb
|
|
@@ -60,6 +62,10 @@ files:
|
|
|
60
62
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx
|
|
61
63
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx
|
|
62
64
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md
|
|
65
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.jsx
|
|
66
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background.md
|
|
67
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.jsx
|
|
68
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_background_multi.md
|
|
63
69
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx
|
|
64
70
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.md
|
|
65
71
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers_rails.html.erb
|
|
@@ -528,6 +534,10 @@ files:
|
|
|
528
534
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default.md
|
|
529
535
|
- app/pb_kits/playbook/pb_contact/docs/_contact_default_swift.md
|
|
530
536
|
- app/pb_kits/playbook/pb_contact/docs/_contact_props_swift.md
|
|
537
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.html.erb
|
|
538
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled.jsx
|
|
539
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_rails.md
|
|
540
|
+
- app/pb_kits/playbook/pb_contact/docs/_contact_unstyled_react.md
|
|
531
541
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.html.erb
|
|
532
542
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail.jsx
|
|
533
543
|
- app/pb_kits/playbook/pb_contact/docs/_contact_with_detail_swift.md
|
|
@@ -806,6 +816,10 @@ files:
|
|
|
806
816
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.html.erb
|
|
807
817
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.jsx
|
|
808
818
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_loading.md
|
|
819
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.html.erb
|
|
820
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible.jsx
|
|
821
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_rails.md
|
|
822
|
+
- app/pb_kits/playbook/pb_dialog/docs/_dialog_overflow_visible_react.md
|
|
809
823
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_props_swift.md
|
|
810
824
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.html.erb
|
|
811
825
|
- app/pb_kits/playbook/pb_dialog/docs/_dialog_scrollable.jsx
|
|
@@ -910,12 +924,21 @@ files:
|
|
|
910
924
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx
|
|
911
925
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.jsx
|
|
912
926
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick.md
|
|
927
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.html.erb
|
|
913
928
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.jsx
|
|
914
929
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_default_dates.md
|
|
930
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.html.erb
|
|
931
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_rails.md
|
|
915
932
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.jsx
|
|
916
933
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end.md
|
|
934
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.html.erb
|
|
935
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_range_end_rails.md
|
|
917
936
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.jsx
|
|
918
937
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers.md
|
|
938
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.html.erb
|
|
939
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_default_rails.md
|
|
940
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.html.erb
|
|
941
|
+
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_quickpick_with_date_pickers_rails.md
|
|
919
942
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb
|
|
920
943
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx
|
|
921
944
|
- app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx
|
|
@@ -2310,6 +2333,14 @@ files:
|
|
|
2310
2333
|
- app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible.jsx
|
|
2311
2334
|
- app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_rails.md
|
|
2312
2335
|
- app/pb_kits/playbook/pb_table/docs/_table_with_dynamic_collapsible_react.md
|
|
2336
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.jsx
|
|
2337
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant.md
|
|
2338
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.html.erb
|
|
2339
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_rails.md
|
|
2340
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.jsx
|
|
2341
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination.md
|
|
2342
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.html.erb
|
|
2343
|
+
- app/pb_kits/playbook/pb_table/docs/_table_with_filter_variant_with_pagination_rails.md
|
|
2313
2344
|
- app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.html.erb
|
|
2314
2345
|
- app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless.jsx
|
|
2315
2346
|
- app/pb_kits/playbook/pb_table/docs/_table_with_header_style_borderless_rails.md
|