@patternfly/react-core 4.202.37 → 4.203.2
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.
- package/CHANGELOG.md +27 -0
- package/dist/esm/components/Form/Form.d.ts +3 -1
- package/dist/esm/components/Form/Form.d.ts.map +1 -1
- package/dist/esm/components/Form/Form.js +4 -2
- package/dist/esm/components/Form/Form.js.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts +3 -0
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js +3 -2
- package/dist/esm/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +4 -2
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +2 -2
- package/dist/esm/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
- package/dist/esm/components/Pagination/OptionsToggle.d.ts +10 -6
- package/dist/esm/components/Pagination/OptionsToggle.d.ts.map +1 -1
- package/dist/esm/components/Pagination/OptionsToggle.js +10 -4
- package/dist/esm/components/Pagination/OptionsToggle.js.map +1 -1
- package/dist/esm/components/Pagination/Pagination.d.ts +7 -3
- package/dist/esm/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/esm/components/Pagination/Pagination.js +5 -4
- package/dist/esm/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts +12 -8
- package/dist/esm/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
- package/dist/esm/components/Pagination/PaginationOptionsMenu.js +6 -5
- package/dist/esm/components/Pagination/PaginationOptionsMenu.js.map +1 -1
- package/dist/esm/components/Switch/Switch.d.ts +7 -5
- package/dist/esm/components/Switch/Switch.d.ts.map +1 -1
- package/dist/esm/components/Switch/Switch.js +3 -1
- package/dist/esm/components/Switch/Switch.js.map +1 -1
- package/dist/js/components/Form/Form.d.ts +3 -1
- package/dist/js/components/Form/Form.d.ts.map +1 -1
- package/dist/js/components/Form/Form.js +4 -2
- package/dist/js/components/Form/Form.js.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.d.ts +3 -0
- package/dist/js/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js +3 -2
- package/dist/js/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts +4 -2
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.d.ts.map +1 -1
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js +2 -2
- package/dist/js/components/MultipleFileUpload/MultipleFileUploadStatusItem.js.map +1 -1
- package/dist/js/components/Pagination/OptionsToggle.d.ts +10 -6
- package/dist/js/components/Pagination/OptionsToggle.d.ts.map +1 -1
- package/dist/js/components/Pagination/OptionsToggle.js +10 -4
- package/dist/js/components/Pagination/OptionsToggle.js.map +1 -1
- package/dist/js/components/Pagination/Pagination.d.ts +7 -3
- package/dist/js/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/js/components/Pagination/Pagination.js +5 -4
- package/dist/js/components/Pagination/Pagination.js.map +1 -1
- package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts +12 -8
- package/dist/js/components/Pagination/PaginationOptionsMenu.d.ts.map +1 -1
- package/dist/js/components/Pagination/PaginationOptionsMenu.js +6 -5
- package/dist/js/components/Pagination/PaginationOptionsMenu.js.map +1 -1
- package/dist/js/components/Switch/Switch.d.ts +7 -5
- package/dist/js/components/Switch/Switch.d.ts.map +1 -1
- package/dist/js/components/Switch/Switch.js +3 -1
- package/dist/js/components/Switch/Switch.js.map +1 -1
- package/dist/umd/react-core.css +137 -49
- package/dist/umd/react-core.js +38 -20
- package/dist/umd/react-core.min.css +102 -14
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +6 -6
- package/src/components/Form/Form.tsx +11 -2
- package/src/components/MenuToggle/MenuToggle.tsx +5 -0
- package/src/components/MenuToggle/examples/MenuToggle.md +16 -0
- package/src/components/MultipleFileUpload/MultipleFileUploadStatusItem.tsx +6 -2
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUpload.test.tsx +8 -8
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadButton.test.tsx +7 -7
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadInfo.test.tsx +5 -5
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadMain.test.tsx +11 -11
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadStatus.test.tsx +11 -9
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadStatusItem.test.tsx +28 -13
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadTitle.test.tsx +11 -11
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadTitleIcon.test.tsx +5 -5
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadTitleText.test.tsx +5 -5
- package/src/components/MultipleFileUpload/__tests__/MultipleFileUploadTitleTextSeparator.test.tsx +7 -5
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUpload.test.tsx.snap +42 -124
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadButton.test.tsx.snap +36 -86
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadInfo.test.tsx.snap +6 -8
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadMain.test.tsx.snap +85 -179
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadStatus.test.tsx.snap +188 -383
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadStatusItem.test.tsx.snap +596 -330
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadTitle.test.tsx.snap +32 -49
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadTitleIcon.test.tsx.snap +9 -11
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadTitleText.test.tsx.snap +6 -8
- package/src/components/MultipleFileUpload/__tests__/__snapshots__/MultipleFileUploadTitleTextSeparator.test.tsx.snap +6 -8
- package/src/components/Pagination/OptionsToggle.tsx +56 -46
- package/src/components/Pagination/Pagination.tsx +12 -5
- package/src/components/Pagination/PaginationOptionsMenu.tsx +20 -12
- package/src/components/Pagination/__tests__/Generated/__snapshots__/OptionsToggle.test.tsx.snap +1 -0
- package/src/components/Pagination/__tests__/Pagination.test.tsx +6 -4
- package/src/components/Pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +223 -0
- package/src/components/Pagination/examples/Pagination.md +11 -1
- package/src/components/Switch/Switch.tsx +13 -5
- package/src/components/Switch/examples/Switch.md +64 -5
- package/src/components/TimePicker/__tests__/TimePicker.test.tsx +1 -1
- package/src/components/Toolbar/examples/Toolbar.md +7 -39
- package/src/components/Dropdown/__tests__/Generated/InternalDropdownItem.test.tsx +0 -42
- package/src/components/Dropdown/__tests__/Generated/__snapshots__/InternalDropdownItem.test.tsx.snap +0 -10
- package/src/components/Select/__tests__/Generated/SelectGroup.test.tsx +0 -25
- package/src/components/Select/__tests__/Generated/SelectMenu.test.tsx +0 -25
- package/src/components/Select/__tests__/Generated/__snapshots__/SelectGroup.test.tsx.snap +0 -18
- package/src/components/Select/__tests__/Generated/__snapshots__/SelectMenu.test.tsx.snap +0 -10
- package/src/components/Toolbar/__tests__/Generated/ToolbarToggleGroup.test.tsx +0 -27
- package/src/components/Toolbar/__tests__/Generated/__snapshots__/ToolbarToggleGroup.test.tsx.snap +0 -29
|
@@ -30,6 +30,7 @@ exports[`Pagination component render custom pagination toggle 1`] = `
|
|
|
30
30
|
</span>
|
|
31
31
|
<button
|
|
32
32
|
aria-expanded="false"
|
|
33
|
+
aria-haspopup="listbox"
|
|
33
34
|
aria-label="Items per page"
|
|
34
35
|
class=" pf-c-options-menu__toggle-button"
|
|
35
36
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-13"
|
|
@@ -242,6 +243,7 @@ exports[`Pagination component render custom perPageOptions 1`] = `
|
|
|
242
243
|
</span>
|
|
243
244
|
<button
|
|
244
245
|
aria-expanded="false"
|
|
246
|
+
aria-haspopup="listbox"
|
|
245
247
|
aria-label="Items per page"
|
|
246
248
|
class=" pf-c-options-menu__toggle-button"
|
|
247
249
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-10"
|
|
@@ -454,6 +456,7 @@ exports[`Pagination component render custom start end 1`] = `
|
|
|
454
456
|
</span>
|
|
455
457
|
<button
|
|
456
458
|
aria-expanded="false"
|
|
459
|
+
aria-haspopup="listbox"
|
|
457
460
|
aria-label="Items per page"
|
|
458
461
|
class=" pf-c-options-menu__toggle-button"
|
|
459
462
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-11"
|
|
@@ -835,6 +838,7 @@ exports[`Pagination component render last page 1`] = `
|
|
|
835
838
|
</span>
|
|
836
839
|
<button
|
|
837
840
|
aria-expanded="false"
|
|
841
|
+
aria-haspopup="listbox"
|
|
838
842
|
aria-label="Items per page"
|
|
839
843
|
class=" pf-c-options-menu__toggle-button"
|
|
840
844
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-9"
|
|
@@ -1047,6 +1051,7 @@ exports[`Pagination component render limited number of pages 1`] = `
|
|
|
1047
1051
|
</span>
|
|
1048
1052
|
<button
|
|
1049
1053
|
aria-expanded="false"
|
|
1054
|
+
aria-haspopup="listbox"
|
|
1050
1055
|
aria-label="Items per page"
|
|
1051
1056
|
class=" pf-c-options-menu__toggle-button"
|
|
1052
1057
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-7"
|
|
@@ -1250,6 +1255,7 @@ exports[`Pagination component render should render correctly bottom 1`] = `
|
|
|
1250
1255
|
</span>
|
|
1251
1256
|
<button
|
|
1252
1257
|
aria-expanded="false"
|
|
1258
|
+
aria-haspopup="listbox"
|
|
1253
1259
|
aria-label="Items per page"
|
|
1254
1260
|
class=" pf-c-options-menu__toggle-button"
|
|
1255
1261
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-2"
|
|
@@ -1450,6 +1456,7 @@ exports[`Pagination component render should render correctly bottom sticky 1`] =
|
|
|
1450
1456
|
</span>
|
|
1451
1457
|
<button
|
|
1452
1458
|
aria-expanded="false"
|
|
1459
|
+
aria-haspopup="listbox"
|
|
1453
1460
|
aria-label="Items per page"
|
|
1454
1461
|
class=" pf-c-options-menu__toggle-button"
|
|
1455
1462
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-5"
|
|
@@ -1618,6 +1625,215 @@ exports[`Pagination component render should render correctly bottom sticky 1`] =
|
|
|
1618
1625
|
</DocumentFragment>
|
|
1619
1626
|
`;
|
|
1620
1627
|
|
|
1628
|
+
exports[`Pagination component render should render correctly button variant 1`] = `
|
|
1629
|
+
<DocumentFragment>
|
|
1630
|
+
<div
|
|
1631
|
+
class="pf-c-pagination"
|
|
1632
|
+
data-ouia-component-id="OUIA-Generated-Pagination-top-17"
|
|
1633
|
+
data-ouia-component-type="PF4/Pagination"
|
|
1634
|
+
data-ouia-safe="true"
|
|
1635
|
+
id="pagination-options-menu-18"
|
|
1636
|
+
style="--pf-c-pagination__nav-page-select--c-form-control--width-chars: 2;"
|
|
1637
|
+
>
|
|
1638
|
+
<div
|
|
1639
|
+
class="pf-c-pagination__total-items"
|
|
1640
|
+
>
|
|
1641
|
+
<b>
|
|
1642
|
+
-9 - 10
|
|
1643
|
+
</b>
|
|
1644
|
+
of
|
|
1645
|
+
<b>
|
|
1646
|
+
20
|
|
1647
|
+
</b>
|
|
1648
|
+
|
|
1649
|
+
</div>
|
|
1650
|
+
<div
|
|
1651
|
+
class="pf-c-options-menu"
|
|
1652
|
+
data-ouia-component-type="PF4/PaginationOptionsMenu"
|
|
1653
|
+
data-ouia-safe="true"
|
|
1654
|
+
>
|
|
1655
|
+
<button
|
|
1656
|
+
aria-expanded="false"
|
|
1657
|
+
aria-haspopup="listbox"
|
|
1658
|
+
aria-label=""
|
|
1659
|
+
class=" pf-c-options-menu__toggle pf-m-plain pf-m-text"
|
|
1660
|
+
data-ouia-component-id="OUIA-Generated-DropdownToggle-18"
|
|
1661
|
+
data-ouia-component-type="PF4/DropdownToggle"
|
|
1662
|
+
data-ouia-safe="true"
|
|
1663
|
+
id="pagination-options-menu-toggle-17"
|
|
1664
|
+
type="button"
|
|
1665
|
+
>
|
|
1666
|
+
<span
|
|
1667
|
+
class="pf-c-options-menu__toggle-text"
|
|
1668
|
+
>
|
|
1669
|
+
<b>
|
|
1670
|
+
-9 - 10
|
|
1671
|
+
</b>
|
|
1672
|
+
of
|
|
1673
|
+
<b>
|
|
1674
|
+
20
|
|
1675
|
+
</b>
|
|
1676
|
+
|
|
1677
|
+
</span>
|
|
1678
|
+
<span
|
|
1679
|
+
class="pf-c-options-menu__toggle-icon"
|
|
1680
|
+
>
|
|
1681
|
+
<svg
|
|
1682
|
+
aria-hidden="true"
|
|
1683
|
+
fill="currentColor"
|
|
1684
|
+
height="1em"
|
|
1685
|
+
role="img"
|
|
1686
|
+
style="vertical-align: -0.125em;"
|
|
1687
|
+
viewBox="0 0 320 512"
|
|
1688
|
+
width="1em"
|
|
1689
|
+
>
|
|
1690
|
+
<path
|
|
1691
|
+
d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
|
|
1692
|
+
/>
|
|
1693
|
+
</svg>
|
|
1694
|
+
</span>
|
|
1695
|
+
</button>
|
|
1696
|
+
</div>
|
|
1697
|
+
<nav
|
|
1698
|
+
aria-label="Pagination"
|
|
1699
|
+
class="pf-c-pagination__nav"
|
|
1700
|
+
>
|
|
1701
|
+
<div
|
|
1702
|
+
class="pf-c-pagination__nav-control pf-m-first"
|
|
1703
|
+
>
|
|
1704
|
+
<button
|
|
1705
|
+
aria-disabled="true"
|
|
1706
|
+
aria-label="Go to first page"
|
|
1707
|
+
class="pf-c-button pf-m-plain pf-m-disabled"
|
|
1708
|
+
data-action="first"
|
|
1709
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-71"
|
|
1710
|
+
data-ouia-component-type="PF4/Button"
|
|
1711
|
+
data-ouia-safe="true"
|
|
1712
|
+
disabled=""
|
|
1713
|
+
type="button"
|
|
1714
|
+
>
|
|
1715
|
+
<svg
|
|
1716
|
+
aria-hidden="true"
|
|
1717
|
+
fill="currentColor"
|
|
1718
|
+
height="1em"
|
|
1719
|
+
role="img"
|
|
1720
|
+
style="vertical-align: -0.125em;"
|
|
1721
|
+
viewBox="0 0 448 512"
|
|
1722
|
+
width="1em"
|
|
1723
|
+
>
|
|
1724
|
+
<path
|
|
1725
|
+
d="M223.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L319.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L393.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34zm-192 34l136 136c9.4 9.4 24.6 9.4 33.9 0l22.6-22.6c9.4-9.4 9.4-24.6 0-33.9L127.9 256l96.4-96.4c9.4-9.4 9.4-24.6 0-33.9L201.7 103c-9.4-9.4-24.6-9.4-33.9 0l-136 136c-9.5 9.4-9.5 24.6-.1 34z"
|
|
1726
|
+
/>
|
|
1727
|
+
</svg>
|
|
1728
|
+
</button>
|
|
1729
|
+
</div>
|
|
1730
|
+
<div
|
|
1731
|
+
class="pf-c-pagination__nav-control"
|
|
1732
|
+
>
|
|
1733
|
+
<button
|
|
1734
|
+
aria-disabled="true"
|
|
1735
|
+
aria-label="Go to previous page"
|
|
1736
|
+
class="pf-c-button pf-m-plain pf-m-disabled"
|
|
1737
|
+
data-action="previous"
|
|
1738
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-72"
|
|
1739
|
+
data-ouia-component-type="PF4/Button"
|
|
1740
|
+
data-ouia-safe="true"
|
|
1741
|
+
disabled=""
|
|
1742
|
+
type="button"
|
|
1743
|
+
>
|
|
1744
|
+
<svg
|
|
1745
|
+
aria-hidden="true"
|
|
1746
|
+
fill="currentColor"
|
|
1747
|
+
height="1em"
|
|
1748
|
+
role="img"
|
|
1749
|
+
style="vertical-align: -0.125em;"
|
|
1750
|
+
viewBox="0 0 256 512"
|
|
1751
|
+
width="1em"
|
|
1752
|
+
>
|
|
1753
|
+
<path
|
|
1754
|
+
d="M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"
|
|
1755
|
+
/>
|
|
1756
|
+
</svg>
|
|
1757
|
+
</button>
|
|
1758
|
+
</div>
|
|
1759
|
+
<div
|
|
1760
|
+
class="pf-c-pagination__nav-page-select"
|
|
1761
|
+
>
|
|
1762
|
+
<input
|
|
1763
|
+
aria-label="Current page"
|
|
1764
|
+
class="pf-c-form-control"
|
|
1765
|
+
max="2"
|
|
1766
|
+
min="1"
|
|
1767
|
+
type="number"
|
|
1768
|
+
value="1"
|
|
1769
|
+
/>
|
|
1770
|
+
<span
|
|
1771
|
+
aria-hidden="true"
|
|
1772
|
+
>
|
|
1773
|
+
of 2
|
|
1774
|
+
</span>
|
|
1775
|
+
</div>
|
|
1776
|
+
<div
|
|
1777
|
+
class="pf-c-pagination__nav-control"
|
|
1778
|
+
>
|
|
1779
|
+
<button
|
|
1780
|
+
aria-disabled="false"
|
|
1781
|
+
aria-label="Go to next page"
|
|
1782
|
+
class="pf-c-button pf-m-plain"
|
|
1783
|
+
data-action="next"
|
|
1784
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-73"
|
|
1785
|
+
data-ouia-component-type="PF4/Button"
|
|
1786
|
+
data-ouia-safe="true"
|
|
1787
|
+
type="button"
|
|
1788
|
+
>
|
|
1789
|
+
<svg
|
|
1790
|
+
aria-hidden="true"
|
|
1791
|
+
fill="currentColor"
|
|
1792
|
+
height="1em"
|
|
1793
|
+
role="img"
|
|
1794
|
+
style="vertical-align: -0.125em;"
|
|
1795
|
+
viewBox="0 0 256 512"
|
|
1796
|
+
width="1em"
|
|
1797
|
+
>
|
|
1798
|
+
<path
|
|
1799
|
+
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"
|
|
1800
|
+
/>
|
|
1801
|
+
</svg>
|
|
1802
|
+
</button>
|
|
1803
|
+
</div>
|
|
1804
|
+
<div
|
|
1805
|
+
class="pf-c-pagination__nav-control pf-m-last"
|
|
1806
|
+
>
|
|
1807
|
+
<button
|
|
1808
|
+
aria-disabled="false"
|
|
1809
|
+
aria-label="Go to last page"
|
|
1810
|
+
class="pf-c-button pf-m-plain"
|
|
1811
|
+
data-action="last"
|
|
1812
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-74"
|
|
1813
|
+
data-ouia-component-type="PF4/Button"
|
|
1814
|
+
data-ouia-safe="true"
|
|
1815
|
+
type="button"
|
|
1816
|
+
>
|
|
1817
|
+
<svg
|
|
1818
|
+
aria-hidden="true"
|
|
1819
|
+
fill="currentColor"
|
|
1820
|
+
height="1em"
|
|
1821
|
+
role="img"
|
|
1822
|
+
style="vertical-align: -0.125em;"
|
|
1823
|
+
viewBox="0 0 448 512"
|
|
1824
|
+
width="1em"
|
|
1825
|
+
>
|
|
1826
|
+
<path
|
|
1827
|
+
d="M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34zm192-34l-136-136c-9.4-9.4-24.6-9.4-33.9 0l-22.6 22.6c-9.4 9.4-9.4 24.6 0 33.9l96.4 96.4-96.4 96.4c-9.4 9.4-9.4 24.6 0 33.9l22.6 22.6c9.4 9.4 24.6 9.4 33.9 0l136-136c9.4-9.2 9.4-24.4 0-33.8z"
|
|
1828
|
+
/>
|
|
1829
|
+
</svg>
|
|
1830
|
+
</button>
|
|
1831
|
+
</div>
|
|
1832
|
+
</nav>
|
|
1833
|
+
</div>
|
|
1834
|
+
</DocumentFragment>
|
|
1835
|
+
`;
|
|
1836
|
+
|
|
1621
1837
|
exports[`Pagination component render should render correctly compact 1`] = `
|
|
1622
1838
|
<DocumentFragment>
|
|
1623
1839
|
<div
|
|
@@ -1662,6 +1878,7 @@ exports[`Pagination component render should render correctly compact 1`] = `
|
|
|
1662
1878
|
</span>
|
|
1663
1879
|
<button
|
|
1664
1880
|
aria-expanded="false"
|
|
1881
|
+
aria-haspopup="listbox"
|
|
1665
1882
|
aria-label="Items per page"
|
|
1666
1883
|
class=" pf-c-options-menu__toggle-button"
|
|
1667
1884
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-3"
|
|
@@ -1800,6 +2017,7 @@ exports[`Pagination component render should render correctly disabled 1`] = `
|
|
|
1800
2017
|
</span>
|
|
1801
2018
|
<button
|
|
1802
2019
|
aria-expanded="false"
|
|
2020
|
+
aria-haspopup="listbox"
|
|
1803
2021
|
aria-label="Items per page"
|
|
1804
2022
|
class=" pf-c-options-menu__toggle-button"
|
|
1805
2023
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-6"
|
|
@@ -2016,6 +2234,7 @@ exports[`Pagination component render should render correctly sticky 1`] = `
|
|
|
2016
2234
|
</span>
|
|
2017
2235
|
<button
|
|
2018
2236
|
aria-expanded="false"
|
|
2237
|
+
aria-haspopup="listbox"
|
|
2019
2238
|
aria-label="Items per page"
|
|
2020
2239
|
class=" pf-c-options-menu__toggle-button"
|
|
2021
2240
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-4"
|
|
@@ -2228,6 +2447,7 @@ exports[`Pagination component render should render correctly top 1`] = `
|
|
|
2228
2447
|
</span>
|
|
2229
2448
|
<button
|
|
2230
2449
|
aria-expanded="false"
|
|
2450
|
+
aria-haspopup="listbox"
|
|
2231
2451
|
aria-label="Items per page"
|
|
2232
2452
|
class=" pf-c-options-menu__toggle-button"
|
|
2233
2453
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-1"
|
|
@@ -2440,6 +2660,7 @@ exports[`Pagination component render titles 1`] = `
|
|
|
2440
2660
|
</span>
|
|
2441
2661
|
<button
|
|
2442
2662
|
aria-expanded="false"
|
|
2663
|
+
aria-haspopup="listbox"
|
|
2443
2664
|
aria-label="Items per page"
|
|
2444
2665
|
class=" pf-c-options-menu__toggle-button"
|
|
2445
2666
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-12"
|
|
@@ -2652,6 +2873,7 @@ exports[`Pagination component render up drop direction 1`] = `
|
|
|
2652
2873
|
</span>
|
|
2653
2874
|
<button
|
|
2654
2875
|
aria-expanded="false"
|
|
2876
|
+
aria-haspopup="listbox"
|
|
2655
2877
|
aria-label="Items per page"
|
|
2656
2878
|
class=" pf-c-options-menu__toggle-button"
|
|
2657
2879
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-14"
|
|
@@ -2864,6 +3086,7 @@ exports[`Pagination component render zero results 1`] = `
|
|
|
2864
3086
|
</span>
|
|
2865
3087
|
<button
|
|
2866
3088
|
aria-expanded="false"
|
|
3089
|
+
aria-haspopup="listbox"
|
|
2867
3090
|
aria-label="Items per page"
|
|
2868
3091
|
class=" pf-c-options-menu__toggle-button"
|
|
2869
3092
|
data-ouia-component-id="OUIA-Generated-DropdownToggle-8"
|
|
@@ -38,6 +38,7 @@ class PaginationTop extends React.Component {
|
|
|
38
38
|
render() {
|
|
39
39
|
return (
|
|
40
40
|
<Pagination
|
|
41
|
+
perPageComponent="button"
|
|
41
42
|
itemCount={523}
|
|
42
43
|
perPage={this.state.perPage}
|
|
43
44
|
page={this.state.page}
|
|
@@ -77,6 +78,7 @@ class PaginationBottom extends React.Component {
|
|
|
77
78
|
render() {
|
|
78
79
|
return (
|
|
79
80
|
<Pagination
|
|
81
|
+
perPageComponent="button"
|
|
80
82
|
itemCount={333}
|
|
81
83
|
widgetId="pagination-options-menu-bottom"
|
|
82
84
|
perPage={this.state.perPage}
|
|
@@ -89,6 +91,7 @@ class PaginationBottom extends React.Component {
|
|
|
89
91
|
}
|
|
90
92
|
}
|
|
91
93
|
```
|
|
94
|
+
|
|
92
95
|
### Indeterminate
|
|
93
96
|
|
|
94
97
|
By not passing `itemCount` and passing `toggleTemplate` you can customize the toggle with text.
|
|
@@ -106,6 +109,7 @@ PaginationIndeterminate = () => {
|
|
|
106
109
|
|
|
107
110
|
return (
|
|
108
111
|
<Pagination
|
|
112
|
+
perPageComponent="button"
|
|
109
113
|
toggleTemplate={({ firstIndex, lastIndex }) => (
|
|
110
114
|
<React.Fragment>
|
|
111
115
|
<b>
|
|
@@ -122,7 +126,7 @@ PaginationIndeterminate = () => {
|
|
|
122
126
|
onPerPageSelect={onPerPageSelect}
|
|
123
127
|
/>
|
|
124
128
|
);
|
|
125
|
-
}
|
|
129
|
+
};
|
|
126
130
|
```
|
|
127
131
|
|
|
128
132
|
### Disabled
|
|
@@ -155,6 +159,7 @@ class PaginationDisabled extends React.Component {
|
|
|
155
159
|
render() {
|
|
156
160
|
return (
|
|
157
161
|
<Pagination
|
|
162
|
+
perPageComponent="button"
|
|
158
163
|
itemCount={523}
|
|
159
164
|
perPage={this.state.perPage}
|
|
160
165
|
page={this.state.page}
|
|
@@ -198,6 +203,7 @@ class PaginationTop extends React.Component {
|
|
|
198
203
|
render() {
|
|
199
204
|
return (
|
|
200
205
|
<Pagination
|
|
206
|
+
perPageComponent="button"
|
|
201
207
|
itemCount={0}
|
|
202
208
|
perPage={this.state.perPage}
|
|
203
209
|
page={this.state.page}
|
|
@@ -240,6 +246,7 @@ class PaginationTop extends React.Component {
|
|
|
240
246
|
render() {
|
|
241
247
|
return (
|
|
242
248
|
<Pagination
|
|
249
|
+
perPageComponent="button"
|
|
243
250
|
itemCount={15}
|
|
244
251
|
perPage={this.state.perPage}
|
|
245
252
|
page={this.state.page}
|
|
@@ -282,6 +289,7 @@ class PaginationTop extends React.Component {
|
|
|
282
289
|
render() {
|
|
283
290
|
return (
|
|
284
291
|
<Pagination
|
|
292
|
+
perPageComponent="button"
|
|
285
293
|
itemCount={523}
|
|
286
294
|
perPage={this.state.perPage}
|
|
287
295
|
page={this.state.page}
|
|
@@ -335,6 +343,7 @@ class PaginationSticky extends React.Component {
|
|
|
335
343
|
{this.state.isTopSticky && (
|
|
336
344
|
<React.Fragment>
|
|
337
345
|
<Pagination
|
|
346
|
+
perPageComponent="button"
|
|
338
347
|
itemCount={523}
|
|
339
348
|
perPage={this.state.perPage}
|
|
340
349
|
page={this.state.page}
|
|
@@ -368,6 +377,7 @@ class PaginationSticky extends React.Component {
|
|
|
368
377
|
))}
|
|
369
378
|
</Gallery>
|
|
370
379
|
<Pagination
|
|
380
|
+
perPageComponent="button"
|
|
371
381
|
itemCount={523}
|
|
372
382
|
perPage={this.state.perPage}
|
|
373
383
|
page={this.state.page}
|
|
@@ -10,19 +10,21 @@ export interface SwitchProps
|
|
|
10
10
|
OUIAProps {
|
|
11
11
|
/** id for the label. */
|
|
12
12
|
id?: string;
|
|
13
|
-
/** Additional classes added to the
|
|
13
|
+
/** Additional classes added to the switch */
|
|
14
14
|
className?: string;
|
|
15
15
|
/** Text value for the label when on */
|
|
16
16
|
label?: React.ReactNode;
|
|
17
17
|
/** Text value for the label when off */
|
|
18
18
|
labelOff?: React.ReactNode;
|
|
19
|
-
/** Flag to show if the
|
|
19
|
+
/** Flag to show if the switch is checked. */
|
|
20
20
|
isChecked?: boolean;
|
|
21
|
-
/** Flag to show if the
|
|
21
|
+
/** Flag to show if the switch has a check icon. */
|
|
22
|
+
hasCheckIcon?: boolean;
|
|
23
|
+
/** Flag to show if the switch is disabled. */
|
|
22
24
|
isDisabled?: boolean;
|
|
23
|
-
/** A callback for when the
|
|
25
|
+
/** A callback for when the switch selection changes. (isChecked, event) => {} */
|
|
24
26
|
onChange?: (checked: boolean, event: React.FormEvent<HTMLInputElement>) => void;
|
|
25
|
-
/** Adds accessible text to the
|
|
27
|
+
/** Adds accessible text to the switch, and should describe the isChecked="true" state. When label is defined, aria-label should be set to the text string that is visible when isChecked is true. */
|
|
26
28
|
'aria-label'?: string;
|
|
27
29
|
/** Flag to reverse the layout of toggle and label (toggle on right). */
|
|
28
30
|
isReversed?: boolean;
|
|
@@ -61,6 +63,7 @@ export class Switch extends React.Component<SwitchProps & OUIAProps, { ouiaState
|
|
|
61
63
|
label,
|
|
62
64
|
labelOff,
|
|
63
65
|
isChecked,
|
|
66
|
+
hasCheckIcon,
|
|
64
67
|
isDisabled,
|
|
65
68
|
onChange,
|
|
66
69
|
isReversed,
|
|
@@ -96,6 +99,11 @@ export class Switch extends React.Component<SwitchProps & OUIAProps, { ouiaState
|
|
|
96
99
|
>
|
|
97
100
|
{label}
|
|
98
101
|
</span>
|
|
102
|
+
{hasCheckIcon && (
|
|
103
|
+
<div className={css(styles.switchToggleIcon)} aria-hidden="true">
|
|
104
|
+
<CheckIcon noVerticalAlign />
|
|
105
|
+
</div>
|
|
106
|
+
)}
|
|
99
107
|
<span
|
|
100
108
|
className={css(styles.switchLabel, styles.modifiers.off)}
|
|
101
109
|
id={isAriaLabelledBy ? `${this.id}-off` : null}
|
|
@@ -7,7 +7,9 @@ ouia: true
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## Examples
|
|
10
|
+
|
|
10
11
|
### Basic
|
|
12
|
+
|
|
11
13
|
```js
|
|
12
14
|
import React from 'react';
|
|
13
15
|
import { Switch } from '@patternfly/react-core';
|
|
@@ -39,6 +41,7 @@ class SimpleSwitch extends React.Component {
|
|
|
39
41
|
```
|
|
40
42
|
|
|
41
43
|
### Reversed Layout
|
|
44
|
+
|
|
42
45
|
```js
|
|
43
46
|
import React from 'react';
|
|
44
47
|
import { Switch } from '@patternfly/react-core';
|
|
@@ -71,6 +74,7 @@ class ReversedSwitch extends React.Component {
|
|
|
71
74
|
```
|
|
72
75
|
|
|
73
76
|
### Without label
|
|
77
|
+
|
|
74
78
|
```js
|
|
75
79
|
import React from 'react';
|
|
76
80
|
import { Switch } from '@patternfly/react-core';
|
|
@@ -95,13 +99,55 @@ class NoLabelSwitch extends React.Component {
|
|
|
95
99
|
}
|
|
96
100
|
```
|
|
97
101
|
|
|
102
|
+
### Checked with label
|
|
103
|
+
|
|
104
|
+
```js
|
|
105
|
+
import React from 'react';
|
|
106
|
+
import { Switch } from '@patternfly/react-core';
|
|
107
|
+
|
|
108
|
+
class CheckedWithLabelSwitch extends React.Component {
|
|
109
|
+
constructor(props) {
|
|
110
|
+
super(props);
|
|
111
|
+
this.state = {
|
|
112
|
+
isChecked: true
|
|
113
|
+
};
|
|
114
|
+
this.handleChange = isChecked => {
|
|
115
|
+
this.setState({ isChecked });
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
render() {
|
|
120
|
+
const { isChecked } = this.state;
|
|
121
|
+
return (
|
|
122
|
+
<Switch
|
|
123
|
+
label="Message when on"
|
|
124
|
+
labelOff="Message when off"
|
|
125
|
+
id="checked-with-label-switch-on"
|
|
126
|
+
aria-label="Message when on"
|
|
127
|
+
isChecked={isChecked}
|
|
128
|
+
hasCheckIcon
|
|
129
|
+
onChange={this.handleChange}
|
|
130
|
+
/>
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
```
|
|
135
|
+
|
|
98
136
|
### Disabled
|
|
137
|
+
|
|
99
138
|
```js
|
|
100
139
|
import React from 'react';
|
|
101
140
|
import { Switch } from '@patternfly/react-core';
|
|
102
141
|
|
|
103
142
|
<React.Fragment>
|
|
104
|
-
<Switch
|
|
143
|
+
<Switch
|
|
144
|
+
id="disabled-switch-on"
|
|
145
|
+
aria-label="Message when on"
|
|
146
|
+
label="Message when on"
|
|
147
|
+
labelOff="Message when off"
|
|
148
|
+
isChecked
|
|
149
|
+
isDisabled
|
|
150
|
+
/>
|
|
105
151
|
<br />
|
|
106
152
|
<Switch
|
|
107
153
|
id="disabled-switch-off"
|
|
@@ -115,21 +161,34 @@ import { Switch } from '@patternfly/react-core';
|
|
|
115
161
|
<Switch id="disabled-no-label-switch-on" aria-label="Message when on" isChecked isDisabled />
|
|
116
162
|
<br />
|
|
117
163
|
<Switch id="disabled-no-label-switch-off" aria-label="Message when on" isChecked={false} isDisabled />
|
|
118
|
-
</React.Fragment
|
|
164
|
+
</React.Fragment>;
|
|
119
165
|
```
|
|
120
166
|
|
|
121
167
|
### Uncontrolled
|
|
168
|
+
|
|
122
169
|
```js
|
|
123
170
|
import React from 'react';
|
|
124
171
|
import { Switch } from '@patternfly/react-core';
|
|
125
172
|
|
|
126
173
|
<React.Fragment>
|
|
127
|
-
<Switch
|
|
174
|
+
<Switch
|
|
175
|
+
id="uncontrolled-switch-on"
|
|
176
|
+
aria-label="Message when on"
|
|
177
|
+
label="Message when on"
|
|
178
|
+
labelOff="Message when off"
|
|
179
|
+
isChecked
|
|
180
|
+
/>
|
|
128
181
|
<br />
|
|
129
|
-
<Switch
|
|
182
|
+
<Switch
|
|
183
|
+
id="uncontrolled-switch-off"
|
|
184
|
+
aria-label="Message when on"
|
|
185
|
+
label="Message when on"
|
|
186
|
+
labelOff="Message when off"
|
|
187
|
+
isChecked={false}
|
|
188
|
+
/>
|
|
130
189
|
<br />
|
|
131
190
|
<Switch id="uncontrolled-no-label-switch-on" aria-label="Message when on" isChecked />
|
|
132
191
|
<br />
|
|
133
192
|
<Switch id="uncontrolled-no-label-switch-off" aria-label="Message when on" isChecked={false} />
|
|
134
|
-
</React.Fragment
|
|
193
|
+
</React.Fragment>;
|
|
135
194
|
```
|
|
@@ -20,7 +20,7 @@ Toolbar items are individual components that can be placed inside of a toolbar.
|
|
|
20
20
|
```js
|
|
21
21
|
import React from 'react';
|
|
22
22
|
import { Toolbar, ToolbarItem, ToolbarContent } from '@patternfly/react-core';
|
|
23
|
-
import { Button,
|
|
23
|
+
import { Button, SearchInput } from '@patternfly/react-core';
|
|
24
24
|
|
|
25
25
|
class ToolbarItems extends React.Component {
|
|
26
26
|
constructor(props) {
|
|
@@ -133,7 +133,7 @@ class ToolbarSpacers extends React.Component {
|
|
|
133
133
|
|
|
134
134
|
```js
|
|
135
135
|
import React from 'react';
|
|
136
|
-
import { Toolbar, ToolbarItem,
|
|
136
|
+
import { Toolbar, ToolbarItem, ToolbarContent } from '@patternfly/react-core';
|
|
137
137
|
import { Button } from '@patternfly/react-core';
|
|
138
138
|
|
|
139
139
|
class ToolbarWidths extends React.Component {
|
|
@@ -237,16 +237,7 @@ class ToolbarSpacers extends React.Component {
|
|
|
237
237
|
|
|
238
238
|
```js
|
|
239
239
|
import React from 'react';
|
|
240
|
-
import {
|
|
241
|
-
Toolbar,
|
|
242
|
-
ToolbarItem,
|
|
243
|
-
ToolbarContent,
|
|
244
|
-
Button,
|
|
245
|
-
ButtonVariant,
|
|
246
|
-
InputGroup,
|
|
247
|
-
TextInput,
|
|
248
|
-
Checkbox
|
|
249
|
-
} from '@patternfly/react-core';
|
|
240
|
+
import { Toolbar, ToolbarItem, ToolbarContent, SearchInput, Checkbox } from '@patternfly/react-core';
|
|
250
241
|
import SearchIcon from '@patternfly/react-icons/dist/esm/icons/search-icon';
|
|
251
242
|
|
|
252
243
|
const ToolbarItems = () => {
|
|
@@ -261,12 +252,7 @@ const ToolbarItems = () => {
|
|
|
261
252
|
<Toolbar id="toolbar-spacers" inset={{ default: 'insetNone' }} isSticky={isSticky}>
|
|
262
253
|
<ToolbarContent>
|
|
263
254
|
<ToolbarItem>
|
|
264
|
-
<
|
|
265
|
-
<TextInput name="textInput1" id="textInput1" type="search" aria-label="search input example" />
|
|
266
|
-
<Button variant={ButtonVariant.control} aria-label="search button for search input">
|
|
267
|
-
<SearchIcon />
|
|
268
|
-
</Button>
|
|
269
|
-
</InputGroup>
|
|
255
|
+
<SearchInput aria-label="search input example" />
|
|
270
256
|
</ToolbarItem>
|
|
271
257
|
<ToolbarItem>
|
|
272
258
|
<Checkbox
|
|
@@ -500,15 +486,7 @@ A toggle group can be used when you want to collapse a set of items into an over
|
|
|
500
486
|
```js
|
|
501
487
|
import React from 'react';
|
|
502
488
|
import { Toolbar, ToolbarItem, ToolbarContent, ToolbarToggleGroup, ToolbarGroup } from '@patternfly/react-core';
|
|
503
|
-
import {
|
|
504
|
-
Button,
|
|
505
|
-
ButtonVariant,
|
|
506
|
-
InputGroup,
|
|
507
|
-
Select,
|
|
508
|
-
SelectOption,
|
|
509
|
-
SelectVariant,
|
|
510
|
-
SearchInput
|
|
511
|
-
} from '@patternfly/react-core';
|
|
489
|
+
import { Select, SelectOption, SelectVariant, SearchInput } from '@patternfly/react-core';
|
|
512
490
|
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
|
|
513
491
|
|
|
514
492
|
class ToolbarComponentMangedToggleGroup extends React.Component {
|
|
@@ -659,18 +637,10 @@ If the consumer would prefer to manage the expanded state of the toggle group fo
|
|
|
659
637
|
```js
|
|
660
638
|
import React from 'react';
|
|
661
639
|
import { Toolbar, ToolbarItem, ToolbarContent, ToolbarToggleGroup, ToolbarGroup } from '@patternfly/react-core';
|
|
662
|
-
import {
|
|
663
|
-
Button,
|
|
664
|
-
ButtonVariant,
|
|
665
|
-
InputGroup,
|
|
666
|
-
Select,
|
|
667
|
-
SelectOption,
|
|
668
|
-
SelectVariant,
|
|
669
|
-
SearchInput
|
|
670
|
-
} from '@patternfly/react-core';
|
|
640
|
+
import { Select, SelectOption, SelectVariant, SearchInput } from '@patternfly/react-core';
|
|
671
641
|
import FilterIcon from '@patternfly/react-icons/dist/esm/icons/filter-icon';
|
|
672
642
|
|
|
673
|
-
class
|
|
643
|
+
class ToolbarConsumerManagedToggleGroup extends React.Component {
|
|
674
644
|
constructor(props) {
|
|
675
645
|
super(props);
|
|
676
646
|
this.state = {
|
|
@@ -835,8 +805,6 @@ import {
|
|
|
835
805
|
} from '@patternfly/react-core';
|
|
836
806
|
import {
|
|
837
807
|
Button,
|
|
838
|
-
ButtonVariant,
|
|
839
|
-
InputGroup,
|
|
840
808
|
Select,
|
|
841
809
|
SelectOption,
|
|
842
810
|
SelectVariant,
|