playbook_ui 14.24.0.pre.alpha.PLAY2350ftniconspike9659 → 14.24.0.pre.alpha.PLAY2360circleiconbuttonvariantdatabug9404

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 (58) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/Components/RegularTableView.tsx +2 -8
  3. data/app/pb_kits/playbook/pb_advanced_table/Components/TableHeaderCell.tsx +2 -1
  4. data/app/pb_kits/playbook/pb_advanced_table/_advanced_table.scss +0 -34
  5. data/app/pb_kits/playbook/pb_advanced_table/advanced_table.test.jsx +0 -56
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +0 -4
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -4
  8. data/app/pb_kits/playbook/pb_advanced_table/table_row.rb +1 -1
  9. data/app/pb_kits/playbook/pb_advanced_table/table_subrow_header.rb +1 -1
  10. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.html.erb +1 -10
  11. data/app/pb_kits/playbook/pb_circle_icon_button/circle_icon_button.rb +0 -2
  12. data/app/pb_kits/playbook/pb_circle_icon_button/docs/example.yml +0 -1
  13. data/app/pb_kits/playbook/pb_date/_date.tsx +3 -5
  14. data/app/pb_kits/playbook/pb_date/date.html.erb +6 -6
  15. data/app/pb_kits/playbook/pb_date/date.rb +0 -2
  16. data/app/pb_kits/playbook/pb_date/docs/example.yml +0 -2
  17. data/app/pb_kits/playbook/pb_date/docs/index.js +0 -1
  18. data/app/pb_kits/playbook/pb_dropdown/index.js +0 -3
  19. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/_fixed_confirmation_toast.tsx +2 -2
  20. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/example.yml +0 -2
  21. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/index.js +0 -1
  22. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.html.erb +1 -2
  23. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.rb +1 -1
  24. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/fixed_confirmation_toast.test.js +0 -6
  25. data/app/pb_kits/playbook/pb_icon/_icon.scss +0 -4
  26. data/app/pb_kits/playbook/pb_pagination/_pagination.tsx +1 -8
  27. data/app/pb_kits/playbook/pb_pagination/docs/example.yml +0 -1
  28. data/app/pb_kits/playbook/pb_pagination/docs/index.js +0 -1
  29. data/app/pb_kits/playbook/pb_phone_number_input/_phone_number_input.tsx +1 -11
  30. data/app/pb_kits/playbook/pb_table/styles/_vertical_border.scss +1 -49
  31. data/dist/chunks/{_line_graph-qk_BN_J0.js → _line_graph-D7DgMqnT.js} +1 -1
  32. data/dist/chunks/{_typeahead-ZLTFtAoW.js → _typeahead-BzYZCpJO.js} +1 -1
  33. data/dist/chunks/{_weekday_stacked-CBQhTZg3.js → _weekday_stacked-CCn-qLh_.js} +3 -3
  34. data/dist/chunks/vendor.js +1 -1
  35. data/dist/menu.yml +2 -2
  36. data/dist/playbook-doc.js +1 -1
  37. data/dist/playbook-rails-react-bindings.js +1 -1
  38. data/dist/playbook-rails.js +1 -1
  39. data/dist/playbook.css +1 -1
  40. data/lib/playbook/version.rb +1 -1
  41. metadata +5 -22
  42. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.html.erb +0 -43
  43. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx +0 -64
  44. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +0 -60
  45. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +0 -3
  46. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.jsx +0 -57
  47. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.md +0 -1
  48. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb +0 -24
  49. data/app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md +0 -3
  50. data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb +0 -4
  51. data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx +0 -17
  52. data/app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md +0 -1
  53. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb +0 -22
  54. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx +0 -43
  55. data/app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md +0 -1
  56. data/app/pb_kits/playbook/pb_pagination/_pagination.test.jsx +0 -212
  57. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx +0 -112
  58. data/app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md +0 -3
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Playbook
4
4
  PREVIOUS_VERSION = "14.24.0"
5
- VERSION = "14.24.0.pre.alpha.PLAY2350ftniconspike9659"
5
+ VERSION = "14.24.0.pre.alpha.PLAY2360circleiconbuttonvariantdatabug9404"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playbook_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.24.0.pre.alpha.PLAY2350ftniconspike9659
4
+ version: 14.24.0.pre.alpha.PLAY2360circleiconbuttonvariantdatabug9404
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-15 00:00:00.000000000 Z
12
+ date: 2025-08-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -308,8 +308,6 @@ files:
308
308
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.html.erb
309
309
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.jsx
310
310
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_multiple.md
311
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.html.erb
312
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_headers_vertical_border.jsx
313
311
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx
314
312
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md
315
313
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx
@@ -352,10 +350,6 @@ files:
352
350
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_loading_react.md
353
351
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.html.erb
354
352
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_no_subrows.jsx
355
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx
356
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md
357
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.jsx
358
- - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control_per_row.md
359
353
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.jsx
360
354
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination.md
361
355
  - app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pagination_with_props.jsx
@@ -816,8 +810,6 @@ files:
816
810
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_click.jsx
817
811
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.html.erb
818
812
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_default.jsx
819
- - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.html.erb
820
- - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_input_options.md
821
813
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.html.erb
822
814
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.jsx
823
815
  - app/pb_kits/playbook/pb_circle_icon_button/docs/_circle_icon_button_link.md
@@ -988,9 +980,6 @@ files:
988
980
  - app/pb_kits/playbook/pb_date/docs/_date_variants.html.erb
989
981
  - app/pb_kits/playbook/pb_date/docs/_date_variants.jsx
990
982
  - app/pb_kits/playbook/pb_date/docs/_date_variants_swift.md
991
- - app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.html.erb
992
- - app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.jsx
993
- - app/pb_kits/playbook/pb_date/docs/_date_with_show_current_year.md
994
983
  - app/pb_kits/playbook/pb_date/docs/_description.md
995
984
  - app/pb_kits/playbook/pb_date/docs/example.yml
996
985
  - app/pb_kits/playbook/pb_date/docs/index.js
@@ -1579,9 +1568,6 @@ files:
1579
1568
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.jsx
1580
1569
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line.md
1581
1570
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_multi_line_swift.md
1582
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.html.erb
1583
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.jsx
1584
- - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_no_icon.md
1585
1571
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.html.erb
1586
1572
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions.jsx
1587
1573
  - app/pb_kits/playbook/pb_fixed_confirmation_toast/docs/_fixed_confirmation_toast_positions_swift.md
@@ -2397,14 +2383,11 @@ files:
2397
2383
  - app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_percentage.tsx
2398
2384
  - app/pb_kits/playbook/pb_overlay/subcomponents/_overlay_token.tsx
2399
2385
  - app/pb_kits/playbook/pb_pagination/_pagination.scss
2400
- - app/pb_kits/playbook/pb_pagination/_pagination.test.jsx
2401
2386
  - app/pb_kits/playbook/pb_pagination/_pagination.tsx
2402
2387
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.html.erb
2403
2388
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_default.jsx
2404
2389
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_default_rails.md
2405
2390
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_default_react.md
2406
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control.jsx
2407
- - app/pb_kits/playbook/pb_pagination/docs/_pagination_external_control_react.md
2408
2391
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change.jsx
2409
2392
  - app/pb_kits/playbook/pb_pagination/docs/_pagination_page_change_react.md
2410
2393
  - app/pb_kits/playbook/pb_pagination/docs/data.js
@@ -3647,9 +3630,9 @@ files:
3647
3630
  - app/pb_kits/playbook/utilities/test/globalProps/truncate.test.js
3648
3631
  - app/pb_kits/playbook/utilities/text.ts
3649
3632
  - app/pb_kits/playbook/utilities/validEmojiChecker.ts
3650
- - dist/chunks/_line_graph-qk_BN_J0.js
3651
- - dist/chunks/_typeahead-ZLTFtAoW.js
3652
- - dist/chunks/_weekday_stacked-CBQhTZg3.js
3633
+ - dist/chunks/_line_graph-D7DgMqnT.js
3634
+ - dist/chunks/_typeahead-BzYZCpJO.js
3635
+ - dist/chunks/_weekday_stacked-CCn-qLh_.js
3653
3636
  - dist/chunks/lazysizes-B7xYodB-.js
3654
3637
  - dist/chunks/lib-CY5ZPzic.js
3655
3638
  - dist/chunks/pb_form_validation-D3b0JKHH.js
@@ -1,43 +0,0 @@
1
- <% column_definitions = [
2
- {
3
- accessor: "year",
4
- label: "Year",
5
- cellAccessors: ["quarter", "month", "day"],
6
- },
7
- {
8
- label: "Enrollment Data",
9
- columns: [
10
- {
11
- accessor: "newEnrollments",
12
- label: "New Enrollments",
13
- },
14
- {
15
- accessor: "scheduledMeetings",
16
- label: "Scheduled Meetings",
17
- },
18
- ],
19
- },
20
- {
21
- label: "Performance Data",
22
- columns: [
23
- {
24
- accessor: "attendanceRate",
25
- label: "Attendance Rate",
26
- },
27
- {
28
- accessor: "completedClasses",
29
- label: "Completed Classes",
30
- },
31
- {
32
- accessor: "classCompletionRate",
33
- label: "Class Completion Rate",
34
- },
35
- {
36
- accessor: "graduatedStudents",
37
- label: "Graduated Students",
38
- },
39
- ],
40
- },
41
- ] %>
42
-
43
- <%= pb_rails("advanced_table", props: { id: "table_multi_headers_vertical_borders", table_data: @table_data, column_definitions: column_definitions, table_props: { vertical_border: true } }) %>
@@ -1,64 +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 AdvancedTableColumnHeadersVerticalBorder = (props) => {
6
- const columnDefinitions = [
7
- {
8
- accessor: "year",
9
- label: "Year",
10
- cellAccessors: ["quarter", "month", "day"],
11
- },
12
- {
13
- label: "Enrollment Data",
14
- columns: [
15
- {
16
- accessor: "newEnrollments",
17
- label: "New Enrollments",
18
- },
19
- {
20
- accessor: "scheduledMeetings",
21
- label: "Scheduled Meetings",
22
- },
23
- ],
24
- },
25
- {
26
- label: "Performance Data",
27
- columns: [
28
- {
29
- accessor: "attendanceRate",
30
- label: "Attendance Rate",
31
- },
32
- {
33
- accessor: "completedClasses",
34
- label: "Completed Classes",
35
- },
36
- {
37
- accessor: "classCompletionRate",
38
- label: "Class Completion Rate",
39
- },
40
- {
41
- accessor: "graduatedStudents",
42
- label: "Graduated Students",
43
- },
44
- ],
45
- },
46
- ];
47
-
48
- const tableProps = {
49
- verticalBorder: true
50
- }
51
-
52
- return (
53
- <>
54
- <AdvancedTable
55
- columnDefinitions={columnDefinitions}
56
- tableData={MOCK_DATA}
57
- tableProps={tableProps}
58
- {...props}
59
- />
60
- </>
61
- )
62
- }
63
-
64
- export default AdvancedTableColumnHeadersVerticalBorder
@@ -1,60 +0,0 @@
1
- import React from "react"
2
- import AdvancedTable from '../_advanced_table'
3
- import Background from '../../pb_background/_background'
4
- import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
5
-
6
- const AdvancedTablePaddingControl = (props) => {
7
- const columnDefinitions = [
8
- {
9
- accessor: "year",
10
- label: "Year",
11
- cellAccessors: ["quarter", "month", "day"],
12
- },
13
- {
14
- accessor: "newEnrollments",
15
- label: "New Enrollments",
16
- columnStyling:{cellPadding: "none"},
17
- customRenderer: (row, value) => (
18
- <Background
19
- backgroundColor={row.original.newEnrollments > 20 ? "success_secondary" : "warning_secondary"}
20
- padding="xs"
21
- >
22
- {value}
23
- </Background>
24
- ),
25
-
26
- },
27
- {
28
- accessor: "scheduledMeetings",
29
- label: "Scheduled Meetings",
30
- },
31
- {
32
- accessor: "attendanceRate",
33
- label: "Attendance Rate",
34
- },
35
- {
36
- accessor: "completedClasses",
37
- label: "Completed Classes",
38
- },
39
- {
40
- accessor: "classCompletionRate",
41
- label: "Class Completion Rate",
42
- },
43
- {
44
- accessor: "graduatedStudents",
45
- label: "Graduated Students",
46
- },
47
- ]
48
-
49
- return (
50
- <div>
51
- <AdvancedTable
52
- columnDefinitions={columnDefinitions}
53
- tableData={MOCK_DATA}
54
- {...props}
55
- />
56
- </div>
57
- )
58
- }
59
-
60
- export default AdvancedTablePaddingControl
@@ -1,3 +0,0 @@
1
- `columnStyling` can also be used to control padding on all cells in a given column via the use of the `cellPadding` key/value pair. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
2
-
3
- This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
@@ -1,57 +0,0 @@
1
- import React from "react"
2
- import AdvancedTable from '../_advanced_table'
3
- import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
4
-
5
- const AdvancedTablePaddingControlPerRow = (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 rowStyling = [
39
- {
40
- rowId: "1",
41
- cellPadding:"md"
42
- },
43
- ];
44
-
45
- return (
46
- <div>
47
- <AdvancedTable
48
- columnDefinitions={columnDefinitions}
49
- rowStyling={rowStyling}
50
- tableData={MOCK_DATA}
51
- {...props}
52
- />
53
- </div>
54
- )
55
- }
56
-
57
- export default AdvancedTablePaddingControlPerRow
@@ -1 +0,0 @@
1
- `rowStyling` can also be used to control padding on all cells in a given row via the use of the `cellPadding` key/value pair as shown here. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
@@ -1,24 +0,0 @@
1
- <%= pb_rails("circle_icon_button", props: {
2
- icon: "plus",
3
- input_options: {
4
- data: { "test-id": "add-button", remote: true },
5
- }
6
- }) %>
7
- <br/>
8
- <%= pb_rails("circle_icon_button", props: {
9
- icon: "pen",
10
- variant: "secondary",
11
- input_options: {
12
- data: { "test-id": "edit-button" },
13
- classname: "custom-secondary-button-class"
14
- }
15
- }) %>
16
- <br/>
17
- <%= pb_rails("circle_icon_button", props: {
18
- icon: "user",
19
- variant: "link",
20
- input_options: {
21
- data: { "test-id": "user-button" },
22
- id: "user-button-id"
23
- }
24
- }) %>
@@ -1,3 +0,0 @@
1
- Use the `input_options` prop to pass additional attributes directly to the internal Playbook Button component. While the wrapper div has access to the standard `data` prop from KitBase, `input_options` allows you to attach attributes specifically to the internal button element.
2
-
3
- This is particularly useful when you need data attributes or other HTML attributes to apply to the button itself.
@@ -1,4 +0,0 @@
1
- <%= pb_rails("date", props: {
2
- date: Date.today,
3
- show_current_year: true
4
- }) %>
@@ -1,17 +0,0 @@
1
- import React from 'react'
2
-
3
- import FormattedDate from '../../pb_date/_date'
4
-
5
- const DateWithShowCurrentYear = (props) => {
6
- return (
7
- <>
8
- <FormattedDate
9
- showCurrentYear
10
- value={new Date()}
11
- {...props}
12
- />
13
- </>
14
- )
15
- }
16
-
17
- export default DateWithShowCurrentYear
@@ -1 +0,0 @@
1
- By default, the Date kit does NOT display the year if it is the current year. If you want to display the current year you can do so by setting `showCurrentYear`/`show_current_year` to true as shown here.
@@ -1,22 +0,0 @@
1
- <%= pb_rails("fixed_confirmation_toast", props: {
2
- text: "Error Message",
3
- status: "error",
4
- icon: "none",
5
- closeable: true
6
- })%>
7
-
8
- <br><br>
9
-
10
- <%= pb_rails("fixed_confirmation_toast", props: {
11
- text: "Items Successfully Moved",
12
- status: "success",
13
- icon: "none"
14
- })%>
15
-
16
- <br><br>
17
-
18
- <%= pb_rails("fixed_confirmation_toast", props: {
19
- text: "Scan to Assign Selected Items",
20
- status: "neutral",
21
- icon: "none"
22
- })%>
@@ -1,43 +0,0 @@
1
- import React from 'react'
2
-
3
- import FixedConfirmationToast from '../_fixed_confirmation_toast'
4
-
5
- const FixedConfirmationToastNoIcon = (props) => {
6
- return (
7
- <div>
8
- <div>
9
- <FixedConfirmationToast
10
- closeable
11
- icon="none"
12
- status="error"
13
- text="Error Message"
14
- {...props}
15
- />
16
- </div>
17
-
18
- <br />
19
-
20
- <div>
21
- <FixedConfirmationToast
22
- icon="none"
23
- status="success"
24
- text="Items Successfully Moved"
25
- {...props}
26
- />
27
- </div>
28
-
29
- <br />
30
-
31
- <div>
32
- <FixedConfirmationToast
33
- icon="none"
34
- status="neutral"
35
- text="Scan to Assign Selected Items"
36
- {...props}
37
- />
38
- </div>
39
- </div>
40
- )
41
- }
42
-
43
- export default FixedConfirmationToastNoIcon
@@ -1 +0,0 @@
1
- Setting `icon` prop to "none" will render the fixed confirmation toast without the left side icon.
@@ -1,212 +0,0 @@
1
- import React from 'react'
2
- import { ensureAccessible, renderKit, render, fireEvent, screen } from '../utilities/test-utils'
3
- import Pagination from './_pagination'
4
-
5
- const defaultProps = {
6
- data: { testid: 'pagination-test' },
7
- total: 10,
8
- current: 1,
9
- range: 5,
10
- }
11
-
12
- describe('Pagination Component', () => {
13
- test('returns namespaced class name', () => {
14
- const kit = renderKit(Pagination, defaultProps)
15
- expect(kit).toBeInTheDocument()
16
- expect(kit).toHaveClass('pb_paginate')
17
- })
18
-
19
- it("should be accessible", async () => {
20
- ensureAccessible(Pagination, defaultProps)
21
- })
22
-
23
- test('renders with default props', () => {
24
- render(<Pagination {...defaultProps} />)
25
-
26
- const pagination = screen.getByTestId('pagination-test')
27
- expect(pagination).toBeInTheDocument()
28
- expect(pagination).toHaveClass('pb_paginate')
29
- })
30
-
31
- test('renders pagination buttons correctly', () => {
32
- render(<Pagination {...defaultProps} />)
33
-
34
- expect(screen.getByText('1')).toBeInTheDocument()
35
- expect(screen.getByText('2')).toBeInTheDocument()
36
- expect(screen.getByText('3')).toBeInTheDocument()
37
- expect(screen.getByText('4')).toBeInTheDocument()
38
- expect(screen.getByText('5')).toBeInTheDocument()
39
-
40
- // Check for navigation arrows by looking for the li elements with specific classes
41
- const leftArrow = document.querySelector('.pagination-left')
42
- const rightArrow = document.querySelector('.pagination-right')
43
- expect(leftArrow).toBeInTheDocument()
44
- expect(rightArrow).toBeInTheDocument()
45
- })
46
-
47
- test('highlights current page as active', () => {
48
- render(<Pagination {...defaultProps}
49
- current={3}
50
- />)
51
-
52
- const activePage = screen.getByText('3')
53
- expect(activePage).toHaveClass('active')
54
- })
55
-
56
- test('calls onChange when page is clicked', () => {
57
- const mockOnChange = jest.fn()
58
- render(<Pagination {...defaultProps}
59
- onChange={mockOnChange}
60
- />)
61
-
62
- const pageButton = screen.getByText('3')
63
- fireEvent.click(pageButton)
64
-
65
- expect(mockOnChange).toHaveBeenCalledWith(3)
66
- })
67
-
68
- test('disables left arrow on first page', () => {
69
- render(<Pagination {...defaultProps}
70
- current={1}
71
- />)
72
-
73
- const leftArrow = document.querySelector('.pagination-left')
74
- expect(leftArrow).toHaveClass('disabled')
75
- })
76
-
77
- test('disables right arrow on last page', () => {
78
- render(<Pagination {...defaultProps}
79
- current={10}
80
- />)
81
-
82
- const rightArrow = document.querySelector('.pagination-right')
83
- expect(rightArrow).toHaveClass('disabled')
84
- })
85
-
86
- test('does not render when total is 1 or less', () => {
87
- const { container } = render(<Pagination {...defaultProps}
88
- total={1}
89
- />)
90
-
91
- expect(container.firstChild).toBeNull()
92
- })
93
-
94
- test('renders with custom className', () => {
95
- render(<Pagination {...defaultProps}
96
- className="custom-class"
97
- />)
98
-
99
- const pagination = screen.getByTestId('pagination-test')
100
- expect(pagination).toHaveClass('custom-class')
101
- })
102
-
103
- test('renders with custom id', () => {
104
- render(<Pagination {...defaultProps}
105
- id="custom-id"
106
- />)
107
-
108
- const pagination = screen.getByTestId('pagination-test')
109
- expect(pagination).toHaveAttribute('id', 'custom-id')
110
- })
111
-
112
- test('renders with custom range', () => {
113
- render(<Pagination {...defaultProps}
114
- range={3}
115
- />)
116
-
117
- expect(screen.getByText('1')).toBeInTheDocument()
118
- expect(screen.getByText('2')).toBeInTheDocument()
119
- expect(screen.getByText('3')).toBeInTheDocument()
120
- expect(screen.getByText('9')).toBeInTheDocument()
121
- expect(screen.getByText('10')).toBeInTheDocument()
122
- })
123
-
124
- test('handles large number of pages correctly', () => {
125
- render(<Pagination {...defaultProps}
126
- current={50}
127
- range={5}
128
- total={100}
129
- />)
130
-
131
- const pagination = screen.getByTestId('pagination-test')
132
- expect(pagination).toBeInTheDocument()
133
- expect(pagination).toHaveClass('pb_paginate')
134
-
135
-
136
- expect(screen.getByText('48')).toBeInTheDocument()
137
- expect(screen.getByText('49')).toBeInTheDocument()
138
- expect(screen.getByText('50')).toBeInTheDocument()
139
- expect(screen.getByText('51')).toBeInTheDocument()
140
- expect(screen.getByText('52')).toBeInTheDocument()
141
- })
142
-
143
- test('syncs with external current prop changes', () => {
144
- const { rerender } = render(<Pagination {...defaultProps}
145
- current={1}
146
- />)
147
-
148
- expect(screen.getByText('1')).toHaveClass('active')
149
-
150
- rerender(<Pagination {...defaultProps}
151
- current={3}
152
- />)
153
-
154
- expect(screen.getByText('3')).toHaveClass('active')
155
- expect(screen.getByText('1')).not.toHaveClass('active')
156
- })
157
-
158
- test('validates current prop is within valid range', () => {
159
- const { rerender } = render(<Pagination {...defaultProps}
160
- current={1}
161
- />)
162
-
163
- rerender(<Pagination {...defaultProps}
164
- current={0}
165
- />)
166
-
167
- expect(screen.getByText('1')).toHaveClass('active')
168
-
169
- rerender(<Pagination {...defaultProps}
170
- current={15}
171
- />)
172
-
173
- expect(screen.getByText('1')).toHaveClass('active')
174
- })
175
-
176
- test('handles htmlOptions props', () => {
177
- const htmlOptions = { 'data-test': 'test-value' }
178
- render(<Pagination {...defaultProps}
179
- htmlOptions={htmlOptions}
180
- />)
181
-
182
- const pagination = screen.getByTestId('pagination-test')
183
- expect(pagination).toHaveAttribute('data-test', 'test-value')
184
- })
185
-
186
- test('renders first and last page buttons when range is small', () => {
187
- render(<Pagination {...defaultProps}
188
- current={10}
189
- range={3}
190
- total={20}
191
- />)
192
-
193
- expect(screen.getByText('1')).toBeInTheDocument()
194
- expect(screen.getByText('20')).toBeInTheDocument()
195
-
196
- expect(screen.getByText('9')).toBeInTheDocument()
197
- expect(screen.getByText('10')).toBeInTheDocument()
198
- expect(screen.getByText('11')).toBeInTheDocument()
199
- })
200
-
201
- test('renders second and second-to-last page buttons when needed', () => {
202
- render(<Pagination {...defaultProps}
203
- current={10}
204
- range={3}
205
- total={20}
206
- />)
207
-
208
- expect(screen.getByText('2')).toBeInTheDocument()
209
-
210
- expect(screen.getByText('19')).toBeInTheDocument()
211
- })
212
- })