playbook_ui 16.6.0.pre.alpha.PLAY2923updateviewcomponentsdep16128 → 16.6.0.pre.alpha.PLAY2927squareicons15991
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_grouped_headers_composition.jsx +1 -15
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_infinite_scroll.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_inline_row_loading.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx +2 -2
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading.js +200 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_mock_data_inline_loading_empty_children.js +42 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_grouped_headers_composition_mock_data.json +98 -0
- data/app/pb_kits/playbook/pb_bread_crumbs/docs/_bread_crumbs_default.jsx +5 -5
- data/app/pb_kits/playbook/pb_button/_button.scss +2 -1
- data/app/pb_kits/playbook/pb_button/button.rb +1 -3
- data/app/pb_kits/playbook/pb_date_picker/date_picker.test.js +0 -30
- data/app/pb_kits/playbook/pb_dialog/index.js +1 -6
- data/app/pb_kits/playbook/pb_draggable/index.js +1 -6
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height.jsx +0 -18
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_constrain_height_rails.html.erb +0 -11
- data/app/pb_kits/playbook/pb_dropdown/dropdown.test.jsx +2 -51
- data/app/pb_kits/playbook/pb_kit/dateTime.ts +22 -4
- data/app/pb_kits/playbook/pb_pagination/_pagination.scss +23 -274
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb +1 -1
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx +1 -22
- data/app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx +2 -22
- data/app/pb_kits/playbook/pb_pagination/docs/data.js +23 -0
- data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +0 -68
- data/app/pb_kits/playbook/pb_phone_number_input/docs/example.yml +0 -2
- data/app/pb_kits/playbook/pb_phone_number_input/docs/index.js +0 -1
- data/app/pb_kits/playbook/pb_phone_number_input/kit.schema.json +0 -8
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.rb +0 -3
- data/app/pb_kits/playbook/pb_phone_number_input/phone_number_input.test.js +2 -79
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/_rich_text_editor_advanced_templates.jsx +1 -76
- data/app/pb_kits/playbook/pb_rich_text_editor/docs/templates.js +75 -0
- data/app/pb_kits/playbook/pb_select/docs/_select_error.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_inline.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_inline_compact.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_inline_show_arrow.jsx +1 -1
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.html.erb +3 -3
- data/app/pb_kits/playbook/pb_select/docs/_select_multiple.jsx +5 -5
- data/app/pb_kits/playbook/pb_select/docs/_select_react_hook.jsx +5 -5
- data/app/pb_kits/playbook/pb_select/docs/_select_required_indicator.jsx +1 -1
- data/app/pb_kits/playbook/pb_typeahead/docs/_typeahead_react_hook.jsx +2 -2
- data/dist/chunks/{_pb_line_graph-D7f-RfJJ.js → _pb_line_graph-EzcacMw_.js} +1 -1
- data/dist/chunks/{_typeahead-Cl5cZ7Hz.js → _typeahead-BYUXg9ZT.js} +1 -1
- data/dist/chunks/{globalProps-BwwZkfTI.js → globalProps-6Hsm3bJX.js} +1 -1
- data/dist/chunks/{lib-Ch18RlJa.js → lib-o4u12zAw.js} +1 -1
- data/dist/chunks/vendor.js +1 -1
- data/dist/playbook-rails-react-bindings.js +1 -1
- data/dist/playbook-rails.js +1 -1
- data/dist/playbook.css +1 -1
- data/lib/playbook/engine.rb +0 -1
- data/lib/playbook/pagination_renderer.rb +8 -119
- data/lib/playbook/version.rb +1 -1
- metadata +13 -12
- data/app/pb_kits/playbook/pb_advanced_table/docs/advanced_table_mock_data_inline_loading_empty_children.json +0 -41
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_show_placeholder.html.erb +0 -5
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_show_placeholder.jsx +0 -14
- data/app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_show_placeholder.md +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 92b56a0ef7f60bd56ddc1eb30758013dd9cc676479d907176395b2d73e668191
|
|
4
|
+
data.tar.gz: 2a1e67ad3bfc36adf61187c09c8bedea8118b7237aec9f345867617d6e1e2b6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 907276831a6bf4d98eabf5f7004f05e385dce8f3aac36cac0218a9a4bd06749669ca859bd1aab4712c3dd7a85f05fc897f6316208c5d48f3a2ae2dd1a4a4ee41
|
|
7
|
+
data.tar.gz: 18fa54ca88e50d89b0b6cb2ef9f39ec3a058b4cfcc97755f1bdcf8b31d1a97ed7dabd1799a77d35cd17e8097be4ffd09677cbdf25fe3c1cbcf574139d0c8ac33
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_grouped_headers_composition.jsx
CHANGED
|
@@ -9,21 +9,7 @@ import ListItem from "../../pb_list/_list_item"
|
|
|
9
9
|
import PbReactPopover from "../../pb_popover/_popover"
|
|
10
10
|
import SectionSeparator from "../../pb_section_separator/_section_separator"
|
|
11
11
|
import StarRating from "../../pb_star_rating/_star_rating"
|
|
12
|
-
|
|
13
|
-
const COMPOSITION_MOCK_DATA = [
|
|
14
|
-
{ id: "1", year: "2015", newEnrollments: "12", scheduledMeetings: "40", attendanceRate: "62%", classCompletionRate: "28%" },
|
|
15
|
-
{ id: "2", year: "2016", newEnrollments: "88", scheduledMeetings: "12", attendanceRate: "71%", classCompletionRate: "55%" },
|
|
16
|
-
{ id: "3", year: "2017", newEnrollments: "34", scheduledMeetings: "67", attendanceRate: "58%", classCompletionRate: "41%" },
|
|
17
|
-
{ id: "4", year: "2018", newEnrollments: "05", scheduledMeetings: "91", attendanceRate: "44%", classCompletionRate: "73%" },
|
|
18
|
-
{ id: "5", year: "2019", newEnrollments: "61", scheduledMeetings: "19", attendanceRate: "83%", classCompletionRate: "36%" },
|
|
19
|
-
{ id: "6", year: "2020", newEnrollments: "19", scheduledMeetings: "54", attendanceRate: "67%", classCompletionRate: "62%" },
|
|
20
|
-
{ id: "7", year: "2021", newEnrollments: "73", scheduledMeetings: "08", attendanceRate: "52%", classCompletionRate: "49%" },
|
|
21
|
-
{ id: "8", year: "2022", newEnrollments: "50", scheduledMeetings: "50", attendanceRate: "75%", classCompletionRate: "45%" },
|
|
22
|
-
{ id: "9", year: "2023", newEnrollments: "95", scheduledMeetings: "03", attendanceRate: "69%", classCompletionRate: "81%" },
|
|
23
|
-
{ id: "10", year: "2024", newEnrollments: "27", scheduledMeetings: "76", attendanceRate: "91%", classCompletionRate: "22%" },
|
|
24
|
-
{ id: "11", year: "2025", newEnrollments: "41", scheduledMeetings: "33", attendanceRate: "48%", classCompletionRate: "94%" },
|
|
25
|
-
{ id: "12", year: "2026", newEnrollments: "66", scheduledMeetings: "66", attendanceRate: "55%", classCompletionRate: "58%" },
|
|
26
|
-
]
|
|
12
|
+
import COMPOSITION_MOCK_DATA from "./advanced_table_grouped_headers_composition_mock_data.json"
|
|
27
13
|
|
|
28
14
|
const LEAF_COUNT = "newEnrollments"
|
|
29
15
|
const LEAF_SCHEDULED = "scheduledMeetings"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../_advanced_table'
|
|
3
|
-
import
|
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data_infinite_scroll.json"
|
|
4
4
|
|
|
5
5
|
const AdvancedTableInfiniteScroll = (props) => {
|
|
6
6
|
const columnDefinitions = [
|
|
@@ -39,7 +39,7 @@ const AdvancedTableInfiniteScroll = (props) => {
|
|
|
39
39
|
<div>
|
|
40
40
|
<AdvancedTable
|
|
41
41
|
columnDefinitions={columnDefinitions}
|
|
42
|
-
tableData={
|
|
42
|
+
tableData={MOCK_DATA}
|
|
43
43
|
virtualizedRows
|
|
44
44
|
{...props}
|
|
45
45
|
/>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import AdvancedTable from '../../pb_advanced_table/_advanced_table'
|
|
3
3
|
import Caption from '../../pb_caption/_caption'
|
|
4
|
-
import MOCK_DATA_INLINE_LOADING from "./
|
|
5
|
-
import MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN from "./
|
|
4
|
+
import { MOCK_DATA_INLINE_LOADING } from "./_mock_data_inline_loading"
|
|
5
|
+
import { MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN } from "./_mock_data_inline_loading_empty_children"
|
|
6
6
|
|
|
7
7
|
const AdvancedTableInlineRowLoading = (props) => {
|
|
8
8
|
const columnDefinitions = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import AdvancedTable from '../_advanced_table'
|
|
3
|
-
import
|
|
3
|
+
import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
|
|
4
4
|
|
|
5
5
|
const AdvancedTableRowPinning = (props) => {
|
|
6
6
|
const columnDefinitions = [
|
|
@@ -43,7 +43,7 @@ const AdvancedTableRowPinning = (props) => {
|
|
|
43
43
|
columnDefinitions={columnDefinitions}
|
|
44
44
|
maxHeight="xs"
|
|
45
45
|
pinnedRows={{value: pinnedRows, onChange: setPinnedRows}}
|
|
46
|
-
tableData={
|
|
46
|
+
tableData={MOCK_DATA}
|
|
47
47
|
tableProps={{sticky: true}}
|
|
48
48
|
{...props}
|
|
49
49
|
>
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
export const MOCK_DATA_INLINE_LOADING = [
|
|
2
|
+
{
|
|
3
|
+
year: "2021",
|
|
4
|
+
quarter: null,
|
|
5
|
+
month: null,
|
|
6
|
+
day: null,
|
|
7
|
+
newEnrollments: "20",
|
|
8
|
+
scheduledMeetings: "10",
|
|
9
|
+
attendanceRate: "51%",
|
|
10
|
+
completedClasses: "3",
|
|
11
|
+
classCompletionRate: "33%",
|
|
12
|
+
graduatedStudents: "19",
|
|
13
|
+
children: [],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
year: "2022",
|
|
17
|
+
quarter: null,
|
|
18
|
+
month: null,
|
|
19
|
+
day: null,
|
|
20
|
+
newEnrollments: "25",
|
|
21
|
+
scheduledMeetings: "17",
|
|
22
|
+
attendanceRate: "75%",
|
|
23
|
+
completedClasses: "5",
|
|
24
|
+
classCompletionRate: "45%",
|
|
25
|
+
graduatedStudents: "32",
|
|
26
|
+
children: [
|
|
27
|
+
{
|
|
28
|
+
year: "2022",
|
|
29
|
+
quarter: "Q1",
|
|
30
|
+
month: null,
|
|
31
|
+
day: null,
|
|
32
|
+
newEnrollments: "2",
|
|
33
|
+
scheduledMeetings: "35",
|
|
34
|
+
attendanceRate: "32%",
|
|
35
|
+
completedClasses: "15",
|
|
36
|
+
classCompletionRate: "52%",
|
|
37
|
+
graduatedStudents: "36",
|
|
38
|
+
children: [
|
|
39
|
+
{
|
|
40
|
+
year: "2022",
|
|
41
|
+
quarter: "Q1",
|
|
42
|
+
month: "January",
|
|
43
|
+
day: null,
|
|
44
|
+
newEnrollments: "16",
|
|
45
|
+
scheduledMeetings: "20",
|
|
46
|
+
attendanceRate: "11%",
|
|
47
|
+
completedClasses: "13",
|
|
48
|
+
classCompletionRate: "47%",
|
|
49
|
+
graduatedStudents: "28",
|
|
50
|
+
children: [
|
|
51
|
+
{
|
|
52
|
+
year: "2022",
|
|
53
|
+
quarter: "Q1",
|
|
54
|
+
month: "January",
|
|
55
|
+
day: "15",
|
|
56
|
+
newEnrollments: "34",
|
|
57
|
+
scheduledMeetings: "28",
|
|
58
|
+
attendanceRate: "97%",
|
|
59
|
+
completedClasses: "20",
|
|
60
|
+
classCompletionRate: "15%",
|
|
61
|
+
graduatedStudents: "17",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
year: "2022",
|
|
65
|
+
quarter: "Q1",
|
|
66
|
+
month: "January",
|
|
67
|
+
day: "25",
|
|
68
|
+
newEnrollments: "43",
|
|
69
|
+
scheduledMeetings: "23",
|
|
70
|
+
attendanceRate: "66%",
|
|
71
|
+
completedClasses: "26",
|
|
72
|
+
classCompletionRate: "47%",
|
|
73
|
+
graduatedStudents: "9",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
year: "2022",
|
|
79
|
+
quarter: "Q1",
|
|
80
|
+
month: "May",
|
|
81
|
+
day: null,
|
|
82
|
+
newEnrollments: "20",
|
|
83
|
+
scheduledMeetings: "41",
|
|
84
|
+
attendanceRate: "95%",
|
|
85
|
+
completedClasses: "26",
|
|
86
|
+
classCompletionRate: "83%",
|
|
87
|
+
graduatedStudents: "43",
|
|
88
|
+
children: [
|
|
89
|
+
{
|
|
90
|
+
year: "2011",
|
|
91
|
+
quarter: "Q1",
|
|
92
|
+
month: "May",
|
|
93
|
+
day: "2",
|
|
94
|
+
newEnrollments: "19",
|
|
95
|
+
scheduledMeetings: "35",
|
|
96
|
+
attendanceRate: "69%",
|
|
97
|
+
completedClasses: "8",
|
|
98
|
+
classCompletionRate: "75%",
|
|
99
|
+
graduatedStudents: "23",
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
year: "2023",
|
|
109
|
+
quarter: null,
|
|
110
|
+
month: null,
|
|
111
|
+
day: null,
|
|
112
|
+
newEnrollments: "10",
|
|
113
|
+
scheduledMeetings: "15",
|
|
114
|
+
attendanceRate: "65%",
|
|
115
|
+
completedClasses: "4",
|
|
116
|
+
classCompletionRate: "49%",
|
|
117
|
+
graduatedStudents: "29",
|
|
118
|
+
children: [
|
|
119
|
+
{
|
|
120
|
+
year: "2023",
|
|
121
|
+
quarter: "Q1",
|
|
122
|
+
month: null,
|
|
123
|
+
day: null,
|
|
124
|
+
newEnrollments: "2",
|
|
125
|
+
scheduledMeetings: "35",
|
|
126
|
+
attendanceRate: "32%",
|
|
127
|
+
completedClasses: "15",
|
|
128
|
+
classCompletionRate: "52%",
|
|
129
|
+
graduatedStudents: "36",
|
|
130
|
+
children: [
|
|
131
|
+
{
|
|
132
|
+
year: "2023",
|
|
133
|
+
quarter: "Q1",
|
|
134
|
+
month: "March",
|
|
135
|
+
day: null,
|
|
136
|
+
newEnrollments: "16",
|
|
137
|
+
scheduledMeetings: "20",
|
|
138
|
+
attendanceRate: "11%",
|
|
139
|
+
completedClasses: "13",
|
|
140
|
+
classCompletionRate: "47%",
|
|
141
|
+
graduatedStudents: "28",
|
|
142
|
+
children: [
|
|
143
|
+
{
|
|
144
|
+
year: "2023",
|
|
145
|
+
quarter: "Q1",
|
|
146
|
+
month: "March",
|
|
147
|
+
day: "10",
|
|
148
|
+
newEnrollments: "34",
|
|
149
|
+
scheduledMeetings: "28",
|
|
150
|
+
attendanceRate: "97%",
|
|
151
|
+
completedClasses: "20",
|
|
152
|
+
classCompletionRate: "15%",
|
|
153
|
+
graduatedStudents: "17",
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
year: "2023",
|
|
157
|
+
quarter: "Q1",
|
|
158
|
+
month: "March",
|
|
159
|
+
day: "11",
|
|
160
|
+
newEnrollments: "43",
|
|
161
|
+
scheduledMeetings: "23",
|
|
162
|
+
attendanceRate: "66%",
|
|
163
|
+
completedClasses: "26",
|
|
164
|
+
classCompletionRate: "47%",
|
|
165
|
+
graduatedStudents: "9",
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
year: "2023",
|
|
171
|
+
quarter: "Q1",
|
|
172
|
+
month: "April",
|
|
173
|
+
day: null,
|
|
174
|
+
newEnrollments: "20",
|
|
175
|
+
scheduledMeetings: "41",
|
|
176
|
+
attendanceRate: "95%",
|
|
177
|
+
completedClasses: "26",
|
|
178
|
+
classCompletionRate: "83%",
|
|
179
|
+
graduatedStudents: "43",
|
|
180
|
+
children: [
|
|
181
|
+
{
|
|
182
|
+
year: "2023",
|
|
183
|
+
quarter: "Q1",
|
|
184
|
+
month: "April",
|
|
185
|
+
day: "15",
|
|
186
|
+
newEnrollments: "19",
|
|
187
|
+
scheduledMeetings: "35",
|
|
188
|
+
attendanceRate: "69%",
|
|
189
|
+
completedClasses: "8",
|
|
190
|
+
classCompletionRate: "75%",
|
|
191
|
+
graduatedStudents: "23",
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
],
|
|
196
|
+
},
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
]
|
|
200
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const MOCK_DATA_INLINE_LOADING_EMPTY_CHILDREN = [
|
|
2
|
+
{
|
|
3
|
+
year: "2021",
|
|
4
|
+
quarter: null,
|
|
5
|
+
month: null,
|
|
6
|
+
day: null,
|
|
7
|
+
newEnrollments: "20",
|
|
8
|
+
scheduledMeetings: "10",
|
|
9
|
+
attendanceRate: "51%",
|
|
10
|
+
completedClasses: "3",
|
|
11
|
+
classCompletionRate: "33%",
|
|
12
|
+
graduatedStudents: "19",
|
|
13
|
+
children: [],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
year: "2022",
|
|
17
|
+
quarter: null,
|
|
18
|
+
month: null,
|
|
19
|
+
day: null,
|
|
20
|
+
newEnrollments: "25",
|
|
21
|
+
scheduledMeetings: "17",
|
|
22
|
+
attendanceRate: "75%",
|
|
23
|
+
completedClasses: "5",
|
|
24
|
+
classCompletionRate: "45%",
|
|
25
|
+
graduatedStudents: "32",
|
|
26
|
+
children: [],
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
year: "2023",
|
|
30
|
+
quarter: null,
|
|
31
|
+
month: null,
|
|
32
|
+
day: null,
|
|
33
|
+
newEnrollments: "10",
|
|
34
|
+
scheduledMeetings: "15",
|
|
35
|
+
attendanceRate: "65%",
|
|
36
|
+
completedClasses: "4",
|
|
37
|
+
classCompletionRate: "49%",
|
|
38
|
+
graduatedStudents: "29",
|
|
39
|
+
children: [],
|
|
40
|
+
},
|
|
41
|
+
]
|
|
42
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "1",
|
|
4
|
+
"year": "2015",
|
|
5
|
+
"newEnrollments": "12",
|
|
6
|
+
"scheduledMeetings": "40",
|
|
7
|
+
"attendanceRate": "62%",
|
|
8
|
+
"classCompletionRate": "28%"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "2",
|
|
12
|
+
"year": "2016",
|
|
13
|
+
"newEnrollments": "88",
|
|
14
|
+
"scheduledMeetings": "12",
|
|
15
|
+
"attendanceRate": "71%",
|
|
16
|
+
"classCompletionRate": "55%"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "3",
|
|
20
|
+
"year": "2017",
|
|
21
|
+
"newEnrollments": "34",
|
|
22
|
+
"scheduledMeetings": "67",
|
|
23
|
+
"attendanceRate": "58%",
|
|
24
|
+
"classCompletionRate": "41%"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "4",
|
|
28
|
+
"year": "2018",
|
|
29
|
+
"newEnrollments": "05",
|
|
30
|
+
"scheduledMeetings": "91",
|
|
31
|
+
"attendanceRate": "44%",
|
|
32
|
+
"classCompletionRate": "73%"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"id": "5",
|
|
36
|
+
"year": "2019",
|
|
37
|
+
"newEnrollments": "61",
|
|
38
|
+
"scheduledMeetings": "19",
|
|
39
|
+
"attendanceRate": "83%",
|
|
40
|
+
"classCompletionRate": "36%"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"id": "6",
|
|
44
|
+
"year": "2020",
|
|
45
|
+
"newEnrollments": "19",
|
|
46
|
+
"scheduledMeetings": "54",
|
|
47
|
+
"attendanceRate": "67%",
|
|
48
|
+
"classCompletionRate": "62%"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "7",
|
|
52
|
+
"year": "2021",
|
|
53
|
+
"newEnrollments": "73",
|
|
54
|
+
"scheduledMeetings": "08",
|
|
55
|
+
"attendanceRate": "52%",
|
|
56
|
+
"classCompletionRate": "49%"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "8",
|
|
60
|
+
"year": "2022",
|
|
61
|
+
"newEnrollments": "50",
|
|
62
|
+
"scheduledMeetings": "50",
|
|
63
|
+
"attendanceRate": "75%",
|
|
64
|
+
"classCompletionRate": "45%"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"id": "9",
|
|
68
|
+
"year": "2023",
|
|
69
|
+
"newEnrollments": "95",
|
|
70
|
+
"scheduledMeetings": "03",
|
|
71
|
+
"attendanceRate": "69%",
|
|
72
|
+
"classCompletionRate": "81%"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "10",
|
|
76
|
+
"year": "2024",
|
|
77
|
+
"newEnrollments": "27",
|
|
78
|
+
"scheduledMeetings": "76",
|
|
79
|
+
"attendanceRate": "91%",
|
|
80
|
+
"classCompletionRate": "22%"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"id": "11",
|
|
84
|
+
"year": "2025",
|
|
85
|
+
"newEnrollments": "41",
|
|
86
|
+
"scheduledMeetings": "33",
|
|
87
|
+
"attendanceRate": "48%",
|
|
88
|
+
"classCompletionRate": "94%"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "12",
|
|
92
|
+
"year": "2026",
|
|
93
|
+
"newEnrollments": "66",
|
|
94
|
+
"scheduledMeetings": "66",
|
|
95
|
+
"attendanceRate": "55%",
|
|
96
|
+
"classCompletionRate": "58%"
|
|
97
|
+
}
|
|
98
|
+
]
|
|
@@ -4,7 +4,7 @@ import Icon from "../../pb_icon/_icon"
|
|
|
4
4
|
import Title from "../../pb_title/_title"
|
|
5
5
|
import BreadCrumbItem from '../_bread_crumb_item'
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const Link = (props) => <BreadCrumbItem {...props} />
|
|
8
8
|
const BreadCrumbsDefault = (props) => {
|
|
9
9
|
return (
|
|
10
10
|
<BreadCrumbs
|
|
@@ -35,7 +35,7 @@ const BreadCrumbsDefault = (props) => {
|
|
|
35
35
|
size="1x"
|
|
36
36
|
{...props}
|
|
37
37
|
/>
|
|
38
|
-
<
|
|
38
|
+
<Link
|
|
39
39
|
{...props}
|
|
40
40
|
href="/users"
|
|
41
41
|
>
|
|
@@ -46,20 +46,20 @@ const BreadCrumbsDefault = (props) => {
|
|
|
46
46
|
text="Users"
|
|
47
47
|
{...props}
|
|
48
48
|
/>
|
|
49
|
-
</
|
|
49
|
+
</Link>
|
|
50
50
|
<Icon
|
|
51
51
|
icon="user"
|
|
52
52
|
size="1x"
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
|
-
<
|
|
55
|
+
<Link {...props}>
|
|
56
56
|
<Title
|
|
57
57
|
size="4"
|
|
58
58
|
tag="span"
|
|
59
59
|
text="User"
|
|
60
60
|
{...props}
|
|
61
61
|
/>
|
|
62
|
-
</
|
|
62
|
+
</Link>
|
|
63
63
|
</BreadCrumbs>
|
|
64
64
|
)
|
|
65
65
|
}
|
|
@@ -124,7 +124,8 @@ $pb_button_icon_only_dimensions: (
|
|
|
124
124
|
// Rails: .pb_button_icon_only; React: class or :has(...) when label is empty.
|
|
125
125
|
// Rails uses a truly empty .pb_button_content; React wraps text in a child span (may be empty).
|
|
126
126
|
&.pb_button_icon_only,
|
|
127
|
-
&:has(.pb_button_content:empty)
|
|
127
|
+
&:has(.pb_button_content:empty),
|
|
128
|
+
&:has(.pb_button_content > span:empty) {
|
|
128
129
|
aspect-ratio: 1;
|
|
129
130
|
box-sizing: border-box;
|
|
130
131
|
$pb_button_icon_only_default: map-get($pb_button_icon_only_dimensions, "md");
|
|
@@ -73,10 +73,8 @@ module Playbook
|
|
|
73
73
|
emoji_regex.match?(icon)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
-
# Icon-only = icon with no label. Label may come from `text` or from a block (e.g. CopyButton);
|
|
77
|
-
# block content must not be treated as icon-only when `text` is unset.
|
|
78
76
|
def icon_only?
|
|
79
|
-
icon.present? && text.blank? &&
|
|
77
|
+
icon.present? && text.blank? && variant != "reaction"
|
|
80
78
|
end
|
|
81
79
|
|
|
82
80
|
def classname
|
|
@@ -310,34 +310,4 @@ describe('DatePicker Kit', () => {
|
|
|
310
310
|
expect(label).toBeInTheDocument()
|
|
311
311
|
expect(kit).not.toHaveTextContent("*")
|
|
312
312
|
})
|
|
313
|
-
|
|
314
|
-
test('Last month quickpick includes the correct last day of previous month', async () => {
|
|
315
|
-
const testId = 'datepicker-last-month'
|
|
316
|
-
render(
|
|
317
|
-
<DatePicker
|
|
318
|
-
allowInput
|
|
319
|
-
data={{ testid: testId }}
|
|
320
|
-
mode="range"
|
|
321
|
-
pickerId="date-picker-last-month"
|
|
322
|
-
placeholder="mm/dd/yyyy to mm/dd/yyyy"
|
|
323
|
-
selectionType="quickpick"
|
|
324
|
-
/>
|
|
325
|
-
)
|
|
326
|
-
|
|
327
|
-
const kit = screen.getByTestId(testId)
|
|
328
|
-
const input = within(kit).getByPlaceholderText('mm/dd/yyyy to mm/dd/yyyy')
|
|
329
|
-
|
|
330
|
-
fireEvent(input, new MouseEvent('click', { bubbles: true, cancelable: true }))
|
|
331
|
-
|
|
332
|
-
const lastMonth = within(kit).getByText('Last month')
|
|
333
|
-
fireEvent(lastMonth, new MouseEvent('click', { bubbles: true, cancelable: true }))
|
|
334
|
-
|
|
335
|
-
await waitFor(() => {
|
|
336
|
-
expect(input).toHaveValue(
|
|
337
|
-
DateTime.getPreviousMonthStartDate(new Date()).formatDate() +
|
|
338
|
-
" to " +
|
|
339
|
-
DateTime.getPreviousMonthEndDate(new Date()).formatDate()
|
|
340
|
-
)
|
|
341
|
-
})
|
|
342
|
-
})
|
|
343
313
|
})
|
|
@@ -16,12 +16,7 @@ export default class PbDialog extends PbEnhancedElement {
|
|
|
16
16
|
this.domContentLoadedHandler = () => this.setupDialog()
|
|
17
17
|
this.turboFrameLoadHandler = () => this.setupDialog()
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
if (document.readyState === "loading") {
|
|
21
|
-
window.addEventListener("DOMContentLoaded", this.domContentLoadedHandler)
|
|
22
|
-
} else {
|
|
23
|
-
this.setupDialog()
|
|
24
|
-
}
|
|
19
|
+
window.addEventListener("DOMContentLoaded", this.domContentLoadedHandler)
|
|
25
20
|
window.addEventListener("turbo:frame-load", this.turboFrameLoadHandler)
|
|
26
21
|
|
|
27
22
|
// Code for custom_event_type setup (can take multiple events in a string separated by commas)
|
|
@@ -22,12 +22,7 @@ export default class PbDraggable extends PbEnhancedElement {
|
|
|
22
22
|
this.dragZoneType = "";
|
|
23
23
|
this.dragZoneColor = "";
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
if (document.readyState === "loading") {
|
|
27
|
-
document.addEventListener("DOMContentLoaded", () => this.bindEventListeners());
|
|
28
|
-
} else {
|
|
29
|
-
this.bindEventListeners();
|
|
30
|
-
}
|
|
25
|
+
document.addEventListener("DOMContentLoaded", () => this.bindEventListeners());
|
|
31
26
|
}
|
|
32
27
|
|
|
33
28
|
setState(newState) {
|
|
@@ -26,24 +26,6 @@ const DropdownWithConstrainHeight = (props) => {
|
|
|
26
26
|
options={options}
|
|
27
27
|
{...props}
|
|
28
28
|
/>
|
|
29
|
-
|
|
30
|
-
<br />
|
|
31
|
-
|
|
32
|
-
<Dropdown
|
|
33
|
-
label="Subcomponent With Constrain Height"
|
|
34
|
-
options={options}
|
|
35
|
-
{...props}
|
|
36
|
-
>
|
|
37
|
-
<Dropdown.Trigger />
|
|
38
|
-
<Dropdown.Container constrainHeight>
|
|
39
|
-
{options.map((option) => (
|
|
40
|
-
<Dropdown.Option
|
|
41
|
-
key={option.id}
|
|
42
|
-
option={option}
|
|
43
|
-
/>
|
|
44
|
-
))}
|
|
45
|
-
</Dropdown.Container>
|
|
46
|
-
</Dropdown>
|
|
47
29
|
</>
|
|
48
30
|
)
|
|
49
31
|
}
|
|
@@ -18,14 +18,3 @@
|
|
|
18
18
|
constrain_height: true,
|
|
19
19
|
label: "With Constrain Height"
|
|
20
20
|
}) %>
|
|
21
|
-
|
|
22
|
-
<br>
|
|
23
|
-
|
|
24
|
-
<%= pb_rails("dropdown", props: {options: options, label: "Subcomponent With Constrain Height"}) do %>
|
|
25
|
-
<%= pb_rails("dropdown/dropdown_trigger") %>
|
|
26
|
-
<%= pb_rails("dropdown/dropdown_container", props: { constrain_height: true }) do %>
|
|
27
|
-
<% options.each do |option| %>
|
|
28
|
-
<%= pb_rails("dropdown/dropdown_option", props: {option: option}) %>
|
|
29
|
-
<% end %>
|
|
30
|
-
<% end %>
|
|
31
|
-
<% end %>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
|
-
import { render, screen, fireEvent
|
|
2
|
+
import { render, screen, fireEvent } from "../utilities/test-utils"
|
|
3
3
|
|
|
4
4
|
import { Dropdown, Icon, IconCircle } from 'playbook-ui'
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
|
|
7
7
|
const testId = 'dropdown'
|
|
8
8
|
|
|
@@ -778,52 +778,3 @@ test("requiredIndicator prop renders asterisk when true", () => {
|
|
|
778
778
|
expect(label).toBeInTheDocument();
|
|
779
779
|
expect(kit).toHaveTextContent("*");
|
|
780
780
|
});
|
|
781
|
-
|
|
782
|
-
describe("quickpick Last Month range when current month is shorter than the previous month", () => {
|
|
783
|
-
const quickpickTestId = "dropdown-quickpick-last-month-march"
|
|
784
|
-
|
|
785
|
-
const formatDate = (date) => {
|
|
786
|
-
const month = (date.getMonth() + 1).toString().padStart(2, "0")
|
|
787
|
-
const day = date.getDate().toString().padStart(2, "0")
|
|
788
|
-
const year = date.getFullYear()
|
|
789
|
-
return `${month}/${day}/${year}`
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
beforeEach(() => {
|
|
793
|
-
jest.setSystemTime(new Date(2026, 3, 15, 12, 0, 0))
|
|
794
|
-
})
|
|
795
|
-
|
|
796
|
-
afterEach(() => {
|
|
797
|
-
jest.setSystemTime()
|
|
798
|
-
})
|
|
799
|
-
|
|
800
|
-
test("selecting Last Month matches DateTime previous-month range (full March when today is in April)", async () => {
|
|
801
|
-
const onSelect = jest.fn()
|
|
802
|
-
const now = new Date()
|
|
803
|
-
|
|
804
|
-
render(
|
|
805
|
-
<Dropdown
|
|
806
|
-
data={{ testid: quickpickTestId }}
|
|
807
|
-
onSelect={onSelect}
|
|
808
|
-
variant="quickpick"
|
|
809
|
-
/>
|
|
810
|
-
)
|
|
811
|
-
|
|
812
|
-
const kit = screen.getByTestId(quickpickTestId)
|
|
813
|
-
const lastMonthOption = Array.from(kit.querySelectorAll(".pb_dropdown_option_list")).find(
|
|
814
|
-
(el) => el.textContent === "Last Month"
|
|
815
|
-
)
|
|
816
|
-
|
|
817
|
-
expect(lastMonthOption).toBeTruthy()
|
|
818
|
-
fireEvent.click(lastMonthOption)
|
|
819
|
-
|
|
820
|
-
await waitFor(() => {
|
|
821
|
-
expect(onSelect).toHaveBeenCalled()
|
|
822
|
-
})
|
|
823
|
-
|
|
824
|
-
const [startDate, endDate] = onSelect.mock.calls[0][0].value
|
|
825
|
-
|
|
826
|
-
expect(formatDate(startDate)).toBe(formatDate(DateTime.getPreviousMonthStartDate(now)))
|
|
827
|
-
expect(formatDate(endDate)).toBe(formatDate(DateTime.getPreviousMonthEndDate(now)))
|
|
828
|
-
})
|
|
829
|
-
})
|