@patternfly/react-core 4.182.1 → 4.183.1

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 (26) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/esm/components/Pagination/Navigation.d.ts +2 -0
  3. package/dist/esm/components/Pagination/Navigation.d.ts.map +1 -1
  4. package/dist/esm/components/Pagination/Navigation.js +3 -2
  5. package/dist/esm/components/Pagination/Navigation.js.map +1 -1
  6. package/dist/esm/components/Pagination/Pagination.d.ts +2 -0
  7. package/dist/esm/components/Pagination/Pagination.d.ts.map +1 -1
  8. package/dist/esm/components/Pagination/Pagination.js +2 -1
  9. package/dist/esm/components/Pagination/Pagination.js.map +1 -1
  10. package/dist/js/components/Pagination/Navigation.d.ts +2 -0
  11. package/dist/js/components/Pagination/Navigation.d.ts.map +1 -1
  12. package/dist/js/components/Pagination/Navigation.js +3 -2
  13. package/dist/js/components/Pagination/Navigation.js.map +1 -1
  14. package/dist/js/components/Pagination/Pagination.d.ts +2 -0
  15. package/dist/js/components/Pagination/Pagination.d.ts.map +1 -1
  16. package/dist/js/components/Pagination/Pagination.js +2 -1
  17. package/dist/js/components/Pagination/Pagination.js.map +1 -1
  18. package/dist/umd/react-core.css +41 -0
  19. package/dist/umd/react-core.js +7 -3
  20. package/dist/umd/react-core.min.css +41 -0
  21. package/dist/umd/react-core.min.js +1 -1
  22. package/package.json +6 -6
  23. package/src/components/Pagination/Navigation.tsx +5 -1
  24. package/src/components/Pagination/Pagination.tsx +4 -0
  25. package/src/components/Pagination/__tests__/Generated/__snapshots__/Pagination.test.tsx.snap +1 -0
  26. package/src/components/Pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +31 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.182.1",
3
+ "version": "4.183.1",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,16 +34,16 @@
34
34
  "generate": "node scripts/copyStyles.js"
35
35
  },
36
36
  "dependencies": {
37
- "@patternfly/react-icons": "^4.33.1",
38
- "@patternfly/react-styles": "^4.32.1",
39
- "@patternfly/react-tokens": "^4.34.1",
37
+ "@patternfly/react-icons": "^4.34.1",
38
+ "@patternfly/react-styles": "^4.33.1",
39
+ "@patternfly/react-tokens": "^4.35.1",
40
40
  "focus-trap": "6.2.2",
41
41
  "react-dropzone": "9.0.0",
42
42
  "tippy.js": "5.1.2",
43
43
  "tslib": "^2.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@patternfly/patternfly": "4.164.2",
46
+ "@patternfly/patternfly": "4.164.4",
47
47
  "@rollup/plugin-commonjs": "^21.0.0",
48
48
  "@rollup/plugin-node-resolve": "^13.0.0",
49
49
  "@rollup/plugin-replace": "^3.0.0",
@@ -60,5 +60,5 @@
60
60
  "react": "^16.8.0 || ^17.0.0",
61
61
  "react-dom": "^16.8.0 || ^17.0.0"
62
62
  },
63
- "gitHead": "7ef55a0e7fc984b853657c3b86e14e4e0f6ffe1c"
63
+ "gitHead": "87b97537c17089399b8c142a28fd35440a9dc8d1"
64
64
  }
@@ -25,6 +25,8 @@ export interface NavigationProps extends React.HTMLProps<HTMLElement> {
25
25
  firstPage?: number;
26
26
  /** The title of a page displayed beside the page number */
27
27
  pagesTitle?: string;
28
+ /** The title of a page displayed beside the page number (the plural form) */
29
+ pagesTitlePlural?: string;
28
30
  /** Accessible label for the button which moves to the last page */
29
31
  toLastPage?: string;
30
32
  /** Accessible label for the button which moves to the previous page */
@@ -75,6 +77,7 @@ export class Navigation extends React.Component<NavigationProps, NavigationState
75
77
  lastPage: 0,
76
78
  firstPage: 0,
77
79
  pagesTitle: '',
80
+ pagesTitlePlural: '',
78
81
  toLastPage: 'Go to last page',
79
82
  toNextPage: 'Go to next page',
80
83
  toFirstPage: 'Go to first page',
@@ -146,6 +149,7 @@ export class Navigation extends React.Component<NavigationProps, NavigationState
146
149
  lastPage,
147
150
  firstPage,
148
151
  pagesTitle,
152
+ pagesTitlePlural,
149
153
  toLastPage,
150
154
  toNextPage,
151
155
  toFirstPage,
@@ -215,7 +219,7 @@ export class Navigation extends React.Component<NavigationProps, NavigationState
215
219
  />
216
220
  {(itemCount || itemCount === 0) && (
217
221
  <span aria-hidden="true">
218
- {ofWord} {pagesTitle ? pluralize(lastPage, pagesTitle) : lastPage}
222
+ {ofWord} {pagesTitle ? pluralize(lastPage, pagesTitle, pagesTitlePlural) : lastPage}
219
223
  </span>
220
224
  )}
221
225
  </div>
@@ -44,6 +44,8 @@ export interface PerPageOptions {
44
44
  export interface PaginationTitles {
45
45
  /** The title of a page displayed beside the page number */
46
46
  page?: string;
47
+ /** The title of a page displayed beside the page number (plural form) */
48
+ pages?: string;
47
49
  /** The type or title of the items being paginated */
48
50
  items?: string;
49
51
  /** The Title of the Pagination Options Menu */
@@ -168,6 +170,7 @@ export class Pagination extends React.Component<PaginationProps, { ouiaStateId:
168
170
  titles: {
169
171
  items: '',
170
172
  page: '',
173
+ pages: '',
171
174
  itemsPerPage: 'Items per page',
172
175
  perPageSuffix: 'per page',
173
176
  toFirstPage: 'Go to first page',
@@ -335,6 +338,7 @@ export class Pagination extends React.Component<PaginationProps, { ouiaStateId:
335
338
  />
336
339
  <Navigation
337
340
  pagesTitle={titles.page}
341
+ pagesTitlePlural={titles.pages}
338
342
  toLastPage={titles.toLastPage}
339
343
  toPreviousPage={titles.toPreviousPage}
340
344
  toNextPage={titles.toNextPage}
@@ -70,6 +70,7 @@ exports[`Pagination should match snapshot (auto-generated) 1`] = `
70
70
  onSetPage={[Function]}
71
71
  page={1}
72
72
  pagesTitle=""
73
+ pagesTitlePlural=""
73
74
  paginationTitle="Pagination"
74
75
  perPage={42}
75
76
  toFirstPage="Go to first page"
@@ -50,6 +50,7 @@ exports[`component render custom pagination toggle 1`] = `
50
50
  "ofWord": "of",
51
51
  "optionsToggle": "Items per page",
52
52
  "page": "",
53
+ "pages": "",
53
54
  "paginationTitle": "Pagination",
54
55
  "perPageSuffix": "per page",
55
56
  "toFirstPage": "Go to first page",
@@ -461,6 +462,7 @@ exports[`component render custom pagination toggle 1`] = `
461
462
  onSetPage={[Function]}
462
463
  page={1}
463
464
  pagesTitle=""
465
+ pagesTitlePlural=""
464
466
  paginationTitle="Pagination"
465
467
  perPage={10}
466
468
  toFirstPage="Go to first page"
@@ -776,6 +778,7 @@ exports[`component render custom perPageOptions 1`] = `
776
778
  "ofWord": "of",
777
779
  "optionsToggle": "Items per page",
778
780
  "page": "",
781
+ "pages": "",
779
782
  "paginationTitle": "Pagination",
780
783
  "perPageSuffix": "per page",
781
784
  "toFirstPage": "Go to first page",
@@ -1212,6 +1215,7 @@ exports[`component render custom perPageOptions 1`] = `
1212
1215
  onSetPage={[Function]}
1213
1216
  page={1}
1214
1217
  pagesTitle=""
1218
+ pagesTitlePlural=""
1215
1219
  paginationTitle="Pagination"
1216
1220
  perPage={10}
1217
1221
  toFirstPage="Go to first page"
@@ -1539,6 +1543,7 @@ exports[`component render custom start end 1`] = `
1539
1543
  "ofWord": "of",
1540
1544
  "optionsToggle": "Items per page",
1541
1545
  "page": "",
1546
+ "pages": "",
1542
1547
  "paginationTitle": "Pagination",
1543
1548
  "perPageSuffix": "per page",
1544
1549
  "toFirstPage": "Go to first page",
@@ -2023,6 +2028,7 @@ exports[`component render custom start end 1`] = `
2023
2028
  onSetPage={[Function]}
2024
2029
  page={1}
2025
2030
  pagesTitle=""
2031
+ pagesTitlePlural=""
2026
2032
  paginationTitle="Pagination"
2027
2033
  perPage={10}
2028
2034
  toFirstPage="Go to first page"
@@ -2329,6 +2335,7 @@ exports[`component render empty per page options 1`] = `
2329
2335
  "ofWord": "of",
2330
2336
  "optionsToggle": "Items per page",
2331
2337
  "page": "",
2338
+ "pages": "",
2332
2339
  "paginationTitle": "Pagination",
2333
2340
  "perPageSuffix": "per page",
2334
2341
  "toFirstPage": "Go to first page",
@@ -2485,6 +2492,7 @@ exports[`component render empty per page options 1`] = `
2485
2492
  onSetPage={[Function]}
2486
2493
  page={1}
2487
2494
  pagesTitle=""
2495
+ pagesTitlePlural=""
2488
2496
  paginationTitle="Pagination"
2489
2497
  perPage={10}
2490
2498
  toFirstPage="Go to first page"
@@ -2838,6 +2846,7 @@ exports[`component render last page 1`] = `
2838
2846
  "ofWord": "of",
2839
2847
  "optionsToggle": "Items per page",
2840
2848
  "page": "",
2849
+ "pages": "",
2841
2850
  "paginationTitle": "Pagination",
2842
2851
  "perPageSuffix": "per page",
2843
2852
  "toFirstPage": "Go to first page",
@@ -3322,6 +3331,7 @@ exports[`component render last page 1`] = `
3322
3331
  onSetPage={[Function]}
3323
3332
  page={2}
3324
3333
  pagesTitle=""
3334
+ pagesTitlePlural=""
3325
3335
  paginationTitle="Pagination"
3326
3336
  perPage={10}
3327
3337
  toFirstPage="Go to first page"
@@ -3649,6 +3659,7 @@ exports[`component render limited number of pages 1`] = `
3649
3659
  "ofWord": "of",
3650
3660
  "optionsToggle": "Items per page",
3651
3661
  "page": "",
3662
+ "pages": "",
3652
3663
  "paginationTitle": "Pagination",
3653
3664
  "perPageSuffix": "per page",
3654
3665
  "toFirstPage": "Go to first page",
@@ -4133,6 +4144,7 @@ exports[`component render limited number of pages 1`] = `
4133
4144
  onSetPage={[Function]}
4134
4145
  page={1}
4135
4146
  pagesTitle=""
4147
+ pagesTitlePlural=""
4136
4148
  paginationTitle="Pagination"
4137
4149
  perPage={20}
4138
4150
  toFirstPage="Go to first page"
@@ -4462,6 +4474,7 @@ exports[`component render no items 1`] = `
4462
4474
  "ofWord": "of",
4463
4475
  "optionsToggle": "Items per page",
4464
4476
  "page": "",
4477
+ "pages": "",
4465
4478
  "paginationTitle": "Pagination",
4466
4479
  "perPageSuffix": "per page",
4467
4480
  "toFirstPage": "Go to first page",
@@ -4946,6 +4959,7 @@ exports[`component render no items 1`] = `
4946
4959
  onSetPage={[Function]}
4947
4960
  page={0}
4948
4961
  pagesTitle=""
4962
+ pagesTitlePlural=""
4949
4963
  paginationTitle="Pagination"
4950
4964
  perPage={10}
4951
4965
  toFirstPage="Go to first page"
@@ -5275,6 +5289,7 @@ exports[`component render should render correctly bottom 1`] = `
5275
5289
  "ofWord": "of",
5276
5290
  "optionsToggle": "Items per page",
5277
5291
  "page": "",
5292
+ "pages": "",
5278
5293
  "paginationTitle": "Pagination",
5279
5294
  "perPageSuffix": "per page",
5280
5295
  "toFirstPage": "Go to first page",
@@ -5735,6 +5750,7 @@ exports[`component render should render correctly bottom 1`] = `
5735
5750
  onSetPage={[Function]}
5736
5751
  page={1}
5737
5752
  pagesTitle=""
5753
+ pagesTitlePlural=""
5738
5754
  paginationTitle="Pagination"
5739
5755
  perPage={10}
5740
5756
  toFirstPage="Go to first page"
@@ -6062,6 +6078,7 @@ exports[`component render should render correctly bottom sticky 1`] = `
6062
6078
  "ofWord": "of",
6063
6079
  "optionsToggle": "Items per page",
6064
6080
  "page": "",
6081
+ "pages": "",
6065
6082
  "paginationTitle": "Pagination",
6066
6083
  "perPageSuffix": "per page",
6067
6084
  "toFirstPage": "Go to first page",
@@ -6522,6 +6539,7 @@ exports[`component render should render correctly bottom sticky 1`] = `
6522
6539
  onSetPage={[Function]}
6523
6540
  page={1}
6524
6541
  pagesTitle=""
6542
+ pagesTitlePlural=""
6525
6543
  paginationTitle="Pagination"
6526
6544
  perPage={10}
6527
6545
  toFirstPage="Go to first page"
@@ -6849,6 +6867,7 @@ exports[`component render should render correctly compact 1`] = `
6849
6867
  "ofWord": "of",
6850
6868
  "optionsToggle": "Items per page",
6851
6869
  "page": "",
6870
+ "pages": "",
6852
6871
  "paginationTitle": "Pagination",
6853
6872
  "perPageSuffix": "per page",
6854
6873
  "toFirstPage": "Go to first page",
@@ -7333,6 +7352,7 @@ exports[`component render should render correctly compact 1`] = `
7333
7352
  onSetPage={[Function]}
7334
7353
  page={1}
7335
7354
  pagesTitle=""
7355
+ pagesTitlePlural=""
7336
7356
  paginationTitle="Pagination"
7337
7357
  perPage={10}
7338
7358
  toFirstPage="Go to first page"
@@ -7519,6 +7539,7 @@ exports[`component render should render correctly disabled 1`] = `
7519
7539
  "ofWord": "of",
7520
7540
  "optionsToggle": "Items per page",
7521
7541
  "page": "",
7542
+ "pages": "",
7522
7543
  "paginationTitle": "Pagination",
7523
7544
  "perPageSuffix": "per page",
7524
7545
  "toFirstPage": "Go to first page",
@@ -8006,6 +8027,7 @@ exports[`component render should render correctly disabled 1`] = `
8006
8027
  onSetPage={[Function]}
8007
8028
  page={1}
8008
8029
  pagesTitle=""
8030
+ pagesTitlePlural=""
8009
8031
  paginationTitle="Pagination"
8010
8032
  perPage={10}
8011
8033
  toFirstPage="Go to first page"
@@ -8335,6 +8357,7 @@ exports[`component render should render correctly sticky 1`] = `
8335
8357
  "ofWord": "of",
8336
8358
  "optionsToggle": "Items per page",
8337
8359
  "page": "",
8360
+ "pages": "",
8338
8361
  "paginationTitle": "Pagination",
8339
8362
  "perPageSuffix": "per page",
8340
8363
  "toFirstPage": "Go to first page",
@@ -8819,6 +8842,7 @@ exports[`component render should render correctly sticky 1`] = `
8819
8842
  onSetPage={[Function]}
8820
8843
  page={1}
8821
8844
  pagesTitle=""
8845
+ pagesTitlePlural=""
8822
8846
  paginationTitle="Pagination"
8823
8847
  perPage={10}
8824
8848
  toFirstPage="Go to first page"
@@ -9146,6 +9170,7 @@ exports[`component render should render correctly top 1`] = `
9146
9170
  "ofWord": "of",
9147
9171
  "optionsToggle": "Items per page",
9148
9172
  "page": "",
9173
+ "pages": "",
9149
9174
  "paginationTitle": "Pagination",
9150
9175
  "perPageSuffix": "per page",
9151
9176
  "toFirstPage": "Go to first page",
@@ -9630,6 +9655,7 @@ exports[`component render should render correctly top 1`] = `
9630
9655
  onSetPage={[Function]}
9631
9656
  page={1}
9632
9657
  pagesTitle=""
9658
+ pagesTitlePlural=""
9633
9659
  paginationTitle="Pagination"
9634
9660
  perPage={10}
9635
9661
  toFirstPage="Go to first page"
@@ -10432,6 +10458,7 @@ exports[`component render titles 1`] = `
10432
10458
  onSetPage={[Function]}
10433
10459
  page={1}
10434
10460
  pagesTitle="books"
10461
+ pagesTitlePlural=""
10435
10462
  paginationTitle="Pagination"
10436
10463
  perPage={10}
10437
10464
  toFirstPage="Go to first page"
@@ -10788,6 +10815,7 @@ exports[`component render up drop direction 1`] = `
10788
10815
  "ofWord": "of",
10789
10816
  "optionsToggle": "Items per page",
10790
10817
  "page": "",
10818
+ "pages": "",
10791
10819
  "paginationTitle": "Pagination",
10792
10820
  "perPageSuffix": "per page",
10793
10821
  "toFirstPage": "Go to first page",
@@ -11272,6 +11300,7 @@ exports[`component render up drop direction 1`] = `
11272
11300
  onSetPage={[Function]}
11273
11301
  page={1}
11274
11302
  pagesTitle=""
11303
+ pagesTitlePlural=""
11275
11304
  paginationTitle="Pagination"
11276
11305
  perPage={10}
11277
11306
  toFirstPage="Go to first page"
@@ -11599,6 +11628,7 @@ exports[`component render zero results 1`] = `
11599
11628
  "ofWord": "of",
11600
11629
  "optionsToggle": "Items per page",
11601
11630
  "page": "",
11631
+ "pages": "",
11602
11632
  "paginationTitle": "Pagination",
11603
11633
  "perPageSuffix": "per page",
11604
11634
  "toFirstPage": "Go to first page",
@@ -12083,6 +12113,7 @@ exports[`component render zero results 1`] = `
12083
12113
  onSetPage={[Function]}
12084
12114
  page={0}
12085
12115
  pagesTitle=""
12116
+ pagesTitlePlural=""
12086
12117
  paginationTitle="Pagination"
12087
12118
  perPage={10}
12088
12119
  toFirstPage="Go to first page"