playbook_ui_docs 14.24.0.pre.alpha.PLAY2346reactpaginationexternalcontrol9346 → 14.24.0.pre.alpha.PLAY2360circleiconbuttonvariantdatabug9438
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_column_headers_vertical_border.html.erb +43 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx +64 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb +24 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md +3 -0
- data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +1 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb +4 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx +17 -0
- data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md +1 -0
- data/app/pb_kits/playbook/pb_date/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_date/docs/index.js +1 -0
- data/app/pb_kits/playbook/pb_pagination/docs/example.yml +0 -1
- data/app/pb_kits/playbook/pb_pagination/docs/index.js +0 -1
- data/dist/playbook-doc.js +1 -1
- metadata +9 -4
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx +0 -112
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md +0 -3
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.24.0.pre.alpha.
|
4
|
+
version: 14.24.0.pre.alpha.PLAY2360circleiconbuttonvariantdatabug9438
|
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-08-
|
12
|
+
date: 2025-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: playbook_ui
|
@@ -54,6 +54,8 @@ 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_headers_vertical_border.html.erb
|
58
|
+
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx
|
57
59
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx
|
58
60
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md
|
59
61
|
- app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx
|
@@ -456,6 +458,8 @@ files:
|
|
456
458
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_click.jsx
|
457
459
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.html.erb
|
458
460
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.jsx
|
461
|
+
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb
|
462
|
+
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md
|
459
463
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb
|
460
464
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx
|
461
465
|
- app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md
|
@@ -575,6 +579,9 @@ files:
|
|
575
579
|
- app/pb_kits/playbook/pb_date/docs/_date_variants.html.erb
|
576
580
|
- app/pb_kits/playbook/pb_date/docs/_date_variants.jsx
|
577
581
|
- app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md
|
582
|
+
- app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb
|
583
|
+
- app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx
|
584
|
+
- app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md
|
578
585
|
- app/pb_kits/playbook/pb_date/docs/_description.md
|
579
586
|
- app/pb_kits/playbook/pb_date/docs/example.yml
|
580
587
|
- app/pb_kits/playbook/pb_date/docs/index.js
|
@@ -1601,8 +1608,6 @@ files:
|
|
1601
1608
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx
|
1602
1609
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md
|
1603
1610
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md
|
1604
|
-
- app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx
|
1605
|
-
- app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md
|
1606
1611
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx
|
1607
1612
|
- app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md
|
1608
1613
|
- app/pb_kits/playbook/pb_pagination/docs/data.js
|
@@ -1,112 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import Flex from '../../pb_flex/_flex'
|
3
|
-
import Pagination from '../../pb_pagination/_pagination'
|
4
|
-
import Select from '../../pb_select/_select'
|
5
|
-
import Table from '../../pb_table/_table'
|
6
|
-
|
7
|
-
import { data } from "./data";
|
8
|
-
|
9
|
-
const PaginationExternalControl = (props) => {
|
10
|
-
const [totalItems, setTotalItems] = useState(20);
|
11
|
-
const [itemsPerPage, setItemsPerPage] = useState(5);
|
12
|
-
const [currentPage, setCurrentPage] = useState(1);
|
13
|
-
|
14
|
-
const totalPages = Math.ceil(totalItems / itemsPerPage);
|
15
|
-
|
16
|
-
const handlePageChange = (page) => {
|
17
|
-
setCurrentPage(page);
|
18
|
-
};
|
19
|
-
|
20
|
-
const limitedData = data.slice(0, totalItems);
|
21
|
-
const startIndex = (currentPage - 1) * itemsPerPage;
|
22
|
-
const paginatedItems = limitedData.slice(startIndex, startIndex + itemsPerPage);
|
23
|
-
|
24
|
-
const handleTotalItemsChange = (event) => {
|
25
|
-
const value = Number(event.target.value);
|
26
|
-
setTotalItems(value);
|
27
|
-
setCurrentPage(1);
|
28
|
-
};
|
29
|
-
|
30
|
-
const handleItemsPerPageChange = (event) => {
|
31
|
-
const value = Number(event.target.value);
|
32
|
-
setItemsPerPage(value);
|
33
|
-
setCurrentPage(1);
|
34
|
-
};
|
35
|
-
|
36
|
-
return (
|
37
|
-
<>
|
38
|
-
<Flex gap="sm">
|
39
|
-
<Select
|
40
|
-
label="Total Items"
|
41
|
-
onChange={handleTotalItemsChange}
|
42
|
-
options={[
|
43
|
-
{ value: "5", text: "5" },
|
44
|
-
{ value: "10", text: "10" },
|
45
|
-
{ value: "20", text: "20" }
|
46
|
-
]}
|
47
|
-
size="sm"
|
48
|
-
value={String(totalItems)}
|
49
|
-
{...props}
|
50
|
-
/>
|
51
|
-
|
52
|
-
<Select
|
53
|
-
label="Items per Page"
|
54
|
-
onChange={handleItemsPerPageChange}
|
55
|
-
options={[
|
56
|
-
{ value: "3", text: "3" },
|
57
|
-
{ value: "5", text: "5" },
|
58
|
-
{ value: "10", text: "10" }
|
59
|
-
]}
|
60
|
-
size="sm"
|
61
|
-
value={String(itemsPerPage)}
|
62
|
-
{...props}
|
63
|
-
/>
|
64
|
-
</Flex>
|
65
|
-
|
66
|
-
<Pagination
|
67
|
-
current={currentPage}
|
68
|
-
key={`pagination-top-${currentPage}`}
|
69
|
-
marginBottom="xs"
|
70
|
-
onChange={handlePageChange}
|
71
|
-
range={5}
|
72
|
-
total={totalPages}
|
73
|
-
{...props}
|
74
|
-
/>
|
75
|
-
<Table
|
76
|
-
marginBottom="xs"
|
77
|
-
responsive="none"
|
78
|
-
size="sm"
|
79
|
-
{...props}
|
80
|
-
>
|
81
|
-
<Table.Head>
|
82
|
-
<Table.Row>
|
83
|
-
<Table.Header>{"Column 1"}</Table.Header>
|
84
|
-
<Table.Header>{"Column 2"}</Table.Header>
|
85
|
-
<Table.Header>{"Column 3"}</Table.Header>
|
86
|
-
<Table.Header>{"Column 4"}</Table.Header>
|
87
|
-
<Table.Header>{"Column 5"}</Table.Header>
|
88
|
-
</Table.Row>
|
89
|
-
</Table.Head>
|
90
|
-
<Table.Body>
|
91
|
-
{paginatedItems.map((row, index) => (
|
92
|
-
<Table.Row key={index}>
|
93
|
-
{row.map((cell, cellIndex) => (
|
94
|
-
<Table.Cell key={cellIndex}>{cell}</Table.Cell>
|
95
|
-
))}
|
96
|
-
</Table.Row>
|
97
|
-
))}
|
98
|
-
</Table.Body>
|
99
|
-
</Table>
|
100
|
-
<Pagination
|
101
|
-
current={currentPage}
|
102
|
-
key={`pagination-bottom-${currentPage}`}
|
103
|
-
onChange={handlePageChange}
|
104
|
-
range={5}
|
105
|
-
total={totalPages}
|
106
|
-
{...props}
|
107
|
-
/>
|
108
|
-
</>
|
109
|
-
)
|
110
|
-
}
|
111
|
-
|
112
|
-
export default PaginationExternalControl
|
@@ -1,3 +0,0 @@
|
|
1
|
-
The Pagination component supports external control of the current page. This allows for programmatically reseting or changing the current page when filters or other criteria change, without needing to unmount and remount the component.
|
2
|
-
|
3
|
-
In this example, changing the "Total Items" or "Items per Page" dropdowns will automatically reset the pagination to page 1, demonstrating how external control works. The pagination component will update its internal state to reflect the new `current` prop value.
|