@patternfly/react-core 5.1.1-prerelease.11 → 5.1.1-prerelease.13

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 (170) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/components/package.json +1 -1
  3. package/deprecated/package.json +1 -1
  4. package/dist/dynamic/components/AboutModal/package.json +1 -1
  5. package/dist/dynamic/components/Accordion/package.json +1 -1
  6. package/dist/dynamic/components/ActionList/package.json +1 -1
  7. package/dist/dynamic/components/Alert/package.json +1 -1
  8. package/dist/dynamic/components/Avatar/package.json +1 -1
  9. package/dist/dynamic/components/BackToTop/package.json +1 -1
  10. package/dist/dynamic/components/Backdrop/package.json +1 -1
  11. package/dist/dynamic/components/BackgroundImage/package.json +1 -1
  12. package/dist/dynamic/components/Badge/package.json +1 -1
  13. package/dist/dynamic/components/Banner/package.json +1 -1
  14. package/dist/dynamic/components/Brand/package.json +1 -1
  15. package/dist/dynamic/components/Breadcrumb/package.json +1 -1
  16. package/dist/dynamic/components/Button/package.json +1 -1
  17. package/dist/dynamic/components/CalendarMonth/package.json +1 -1
  18. package/dist/dynamic/components/Card/package.json +1 -1
  19. package/dist/dynamic/components/Checkbox/package.json +1 -1
  20. package/dist/dynamic/components/Chip/package.json +1 -1
  21. package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
  22. package/dist/dynamic/components/CodeBlock/package.json +1 -1
  23. package/dist/dynamic/components/DataList/package.json +1 -1
  24. package/dist/dynamic/components/DatePicker/package.json +1 -1
  25. package/dist/dynamic/components/DescriptionList/package.json +1 -1
  26. package/dist/dynamic/components/Divider/package.json +1 -1
  27. package/dist/dynamic/components/DragDrop/package.json +1 -1
  28. package/dist/dynamic/components/Drawer/package.json +1 -1
  29. package/dist/dynamic/components/Dropdown/package.json +1 -1
  30. package/dist/dynamic/components/DualListSelector/package.json +1 -1
  31. package/dist/dynamic/components/EmptyState/package.json +1 -1
  32. package/dist/dynamic/components/ExpandableSection/package.json +1 -1
  33. package/dist/dynamic/components/FileUpload/package.json +1 -1
  34. package/dist/dynamic/components/Form/package.json +1 -1
  35. package/dist/dynamic/components/FormSelect/package.json +1 -1
  36. package/dist/dynamic/components/HelperText/package.json +1 -1
  37. package/dist/dynamic/components/Hint/package.json +1 -1
  38. package/dist/dynamic/components/Icon/package.json +1 -1
  39. package/dist/dynamic/components/InputGroup/package.json +1 -1
  40. package/dist/dynamic/components/JumpLinks/package.json +1 -1
  41. package/dist/dynamic/components/Label/package.json +1 -1
  42. package/dist/dynamic/components/List/package.json +1 -1
  43. package/dist/dynamic/components/LoginPage/package.json +1 -1
  44. package/dist/dynamic/components/Masthead/package.json +1 -1
  45. package/dist/dynamic/components/Menu/package.json +1 -1
  46. package/dist/dynamic/components/MenuToggle/package.json +1 -1
  47. package/dist/dynamic/components/Modal/package.json +1 -1
  48. package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
  49. package/dist/dynamic/components/Nav/package.json +1 -1
  50. package/dist/dynamic/components/NotificationBadge/package.json +1 -1
  51. package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
  52. package/dist/dynamic/components/NumberInput/package.json +1 -1
  53. package/dist/dynamic/components/OverflowMenu/package.json +1 -1
  54. package/dist/dynamic/components/Page/package.json +1 -1
  55. package/dist/dynamic/components/Pagination/package.json +1 -1
  56. package/dist/dynamic/components/Panel/package.json +1 -1
  57. package/dist/dynamic/components/Popover/package.json +1 -1
  58. package/dist/dynamic/components/Progress/package.json +1 -1
  59. package/dist/dynamic/components/ProgressStepper/package.json +1 -1
  60. package/dist/dynamic/components/Radio/package.json +1 -1
  61. package/dist/dynamic/components/SearchInput/package.json +1 -1
  62. package/dist/dynamic/components/Select/package.json +1 -1
  63. package/dist/dynamic/components/Sidebar/package.json +1 -1
  64. package/dist/dynamic/components/SimpleList/package.json +1 -1
  65. package/dist/dynamic/components/Skeleton/package.json +1 -1
  66. package/dist/dynamic/components/SkipToContent/package.json +1 -1
  67. package/dist/dynamic/components/Slider/package.json +1 -1
  68. package/dist/dynamic/components/Spinner/package.json +1 -1
  69. package/dist/dynamic/components/Switch/package.json +1 -1
  70. package/dist/dynamic/components/Tabs/package.json +1 -1
  71. package/dist/dynamic/components/Text/package.json +1 -1
  72. package/dist/dynamic/components/TextArea/package.json +1 -1
  73. package/dist/dynamic/components/TextInput/package.json +1 -1
  74. package/dist/dynamic/components/TextInputGroup/package.json +1 -1
  75. package/dist/dynamic/components/Tile/package.json +1 -1
  76. package/dist/dynamic/components/TimePicker/package.json +1 -1
  77. package/dist/dynamic/components/Timestamp/package.json +1 -1
  78. package/dist/dynamic/components/Title/package.json +1 -1
  79. package/dist/dynamic/components/ToggleGroup/package.json +1 -1
  80. package/dist/dynamic/components/Toolbar/package.json +1 -1
  81. package/dist/dynamic/components/Tooltip/package.json +1 -1
  82. package/dist/dynamic/components/TreeView/package.json +1 -1
  83. package/dist/dynamic/components/Truncate/package.json +1 -1
  84. package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
  85. package/dist/dynamic/components/Wizard/package.json +1 -1
  86. package/dist/dynamic/deprecated/components/ApplicationLauncher/package.json +1 -1
  87. package/dist/dynamic/deprecated/components/ContextSelector/package.json +1 -1
  88. package/dist/dynamic/deprecated/components/Dropdown/package.json +1 -1
  89. package/dist/dynamic/deprecated/components/OptionsMenu/package.json +1 -1
  90. package/dist/dynamic/deprecated/components/PageHeader/package.json +1 -1
  91. package/dist/dynamic/deprecated/components/Select/package.json +1 -1
  92. package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
  93. package/dist/dynamic/deprecated/components/package.json +1 -1
  94. package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
  95. package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
  96. package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
  97. package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
  98. package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
  99. package/dist/dynamic/helpers/constants/package.json +1 -1
  100. package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
  101. package/dist/dynamic/helpers/favorites/package.json +1 -1
  102. package/dist/dynamic/helpers/fileUtils/package.json +1 -1
  103. package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
  104. package/dist/dynamic/helpers/package.json +1 -1
  105. package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
  106. package/dist/dynamic/helpers/typeUtils/package.json +1 -1
  107. package/dist/dynamic/helpers/useInterval/package.json +1 -1
  108. package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
  109. package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
  110. package/dist/dynamic/helpers/util/package.json +1 -1
  111. package/dist/dynamic/layouts/Bullseye/package.json +1 -1
  112. package/dist/dynamic/layouts/Flex/package.json +1 -1
  113. package/dist/dynamic/layouts/Gallery/package.json +1 -1
  114. package/dist/dynamic/layouts/Grid/package.json +1 -1
  115. package/dist/dynamic/layouts/Level/package.json +1 -1
  116. package/dist/dynamic/layouts/Split/package.json +1 -1
  117. package/dist/dynamic/layouts/Stack/package.json +1 -1
  118. package/dist/dynamic/next/components/package.json +1 -1
  119. package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
  120. package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +1 -1
  121. package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
  122. package/dist/esm/components/ClipboardCopy/ClipboardCopyExpanded.js +1 -1
  123. package/dist/esm/components/ClipboardCopy/ClipboardCopyExpanded.js.map +1 -1
  124. package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.d.ts.map +1 -1
  125. package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.js +5 -2
  126. package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.js.map +1 -1
  127. package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
  128. package/dist/esm/components/SearchInput/SearchInput.js +4 -2
  129. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  130. package/dist/esm/components/TextInput/TextInput.d.ts +3 -1
  131. package/dist/esm/components/TextInput/TextInput.d.ts.map +1 -1
  132. package/dist/esm/components/TextInput/TextInput.js +8 -7
  133. package/dist/esm/components/TextInput/TextInput.js.map +1 -1
  134. package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
  135. package/dist/js/components/ClipboardCopy/ClipboardCopy.js +1 -1
  136. package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
  137. package/dist/js/components/ClipboardCopy/ClipboardCopyExpanded.js +1 -1
  138. package/dist/js/components/ClipboardCopy/ClipboardCopyExpanded.js.map +1 -1
  139. package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.d.ts.map +1 -1
  140. package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.js +5 -2
  141. package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.js.map +1 -1
  142. package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
  143. package/dist/js/components/SearchInput/SearchInput.js +4 -2
  144. package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
  145. package/dist/js/components/TextInput/TextInput.d.ts +3 -1
  146. package/dist/js/components/TextInput/TextInput.d.ts.map +1 -1
  147. package/dist/js/components/TextInput/TextInput.js +8 -7
  148. package/dist/js/components/TextInput/TextInput.js.map +1 -1
  149. package/dist/umd/react-core.min.js +1 -1
  150. package/helpers/package.json +1 -1
  151. package/layouts/package.json +1 -1
  152. package/next/package.json +1 -1
  153. package/package.json +6 -6
  154. package/src/components/Checkbox/examples/Checkbox.md +8 -2
  155. package/src/components/Checkbox/examples/CheckboxControlled.tsx +18 -16
  156. package/src/components/ClipboardCopy/ClipboardCopy.tsx +1 -0
  157. package/src/components/ClipboardCopy/ClipboardCopyExpanded.tsx +1 -1
  158. package/src/components/ClipboardCopy/ClipboardCopyToggle.tsx +5 -2
  159. package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyExpanded.test.tsx.snap +3 -1
  160. package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyToggle.test.tsx.snap +16 -12
  161. package/src/components/SearchInput/SearchInput.tsx +5 -2
  162. package/src/components/SearchInput/__tests__/__snapshots__/SearchInput.test.tsx.snap +105 -65
  163. package/src/components/TextInput/TextInput.tsx +11 -7
  164. package/src/components/TextInput/__tests__/TextInput.test.tsx +16 -1
  165. package/src/components/TextInput/__tests__/__snapshots__/TextInput.test.tsx.snap +2 -1
  166. package/src/components/TextInput/examples/TextInput.md +2 -2
  167. package/src/components/TextInput/examples/{TextInputLeftTruncated.tsx → TextInputStartTruncated.tsx} +3 -3
  168. package/src/demos/DataListDemo.md +7 -4
  169. package/src/deprecated/components/ContextSelector/__tests__/__snapshots__/ContextSelector.test.tsx.snap +42 -26
  170. package/src/components/Checkbox/examples/checkbox.css +0 -3
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"5.1.1-prerelease.10","private":true}
1
+ {"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"5.1.1-prerelease.12","private":true}
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"5.1.1-prerelease.10","private":true}
1
+ {"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"5.1.1-prerelease.12","private":true}
package/next/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"5.1.1-prerelease.10","private":true}
1
+ {"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"5.1.1-prerelease.12","private":true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "5.1.1-prerelease.11",
3
+ "version": "5.1.1-prerelease.13",
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",
@@ -45,15 +45,15 @@
45
45
  "subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
46
46
  },
47
47
  "dependencies": {
48
- "@patternfly/react-icons": "^5.1.1-prerelease.5",
49
- "@patternfly/react-styles": "^5.1.1-prerelease.5",
50
- "@patternfly/react-tokens": "^5.1.1-prerelease.5",
48
+ "@patternfly/react-icons": "^5.1.1-prerelease.6",
49
+ "@patternfly/react-styles": "^5.1.1-prerelease.6",
50
+ "@patternfly/react-tokens": "^5.1.1-prerelease.6",
51
51
  "focus-trap": "7.5.2",
52
52
  "react-dropzone": "^14.2.3",
53
53
  "tslib": "^2.5.0"
54
54
  },
55
55
  "devDependencies": {
56
- "@patternfly/patternfly": "5.1.0-prerelease.24",
56
+ "@patternfly/patternfly": "5.1.0-prerelease.28",
57
57
  "@rollup/plugin-commonjs": "^25.0.0",
58
58
  "@rollup/plugin-node-resolve": "^15.0.2",
59
59
  "@rollup/plugin-replace": "^5.0.2",
@@ -70,5 +70,5 @@
70
70
  "react": "^17 || ^18",
71
71
  "react-dom": "^17 || ^18"
72
72
  },
73
- "gitHead": "10e4992a19129f0123d894612b9160e498553d73"
73
+ "gitHead": "ff467eef5db530f0245ba29ca01db1f4a239f274"
74
74
  }
@@ -6,46 +6,52 @@ cssPrefix: pf-v5-c-check
6
6
  propComponents: ['Checkbox']
7
7
  ---
8
8
 
9
- import './checkbox.css';
10
-
11
9
  ## Examples
12
10
 
13
11
  ### Controlled
14
12
 
15
13
  ```ts file='./CheckboxControlled.tsx'
14
+
16
15
  ```
17
16
 
18
17
  ### Uncontrolled
19
18
 
20
19
  ```ts file='./CheckboxUncontrolled.tsx'
20
+
21
21
  ```
22
22
 
23
23
  ### Disabled
24
24
 
25
25
  ```ts file='./CheckboxDisabled.tsx'
26
+
26
27
  ```
27
28
 
28
29
  ### Checkbox with description
29
30
 
30
31
  ```ts file='./CheckboxWithDescription.tsx'
32
+
31
33
  ```
32
34
 
33
35
  ### Checkbox with body
34
36
 
35
37
  ```ts file='./CheckboxWithBody.tsx'
38
+
36
39
  ```
37
40
 
38
41
  ### Checkbox with description and body
39
42
 
40
43
  ```ts file='./CheckboxWithDescriptionBody.tsx'
44
+
41
45
  ```
42
46
 
43
47
  ### Standalone input
44
48
 
45
49
  ```ts file='./CheckboxStandaloneInput.tsx'
50
+
46
51
  ```
47
52
 
48
53
  ### Required input
49
54
 
50
55
  ```ts file='./CheckboxRequired.tsx'
56
+
51
57
  ```
@@ -49,22 +49,24 @@ export const CheckboxControlled: React.FunctionComponent = () => {
49
49
  onChange={handleChange}
50
50
  id="controlled-check-1"
51
51
  name="check1"
52
- />
53
- <Checkbox
54
- className="nested"
55
- label="Child CheckBox 1"
56
- isChecked={isChecked2}
57
- onChange={handleChange}
58
- id="controlled-check-2"
59
- name="check2"
60
- />
61
- <Checkbox
62
- className="nested"
63
- label="Child CheckBox 2"
64
- isChecked={isChecked3}
65
- onChange={handleChange}
66
- id="controlled-check-3"
67
- name="check3"
52
+ body={
53
+ <>
54
+ <Checkbox
55
+ label="Child CheckBox 1"
56
+ isChecked={isChecked2}
57
+ onChange={handleChange}
58
+ id="controlled-check-2"
59
+ name="check2"
60
+ />
61
+ <Checkbox
62
+ label="Child CheckBox 2"
63
+ isChecked={isChecked3}
64
+ onChange={handleChange}
65
+ id="controlled-check-3"
66
+ name="check3"
67
+ />
68
+ </>
69
+ }
68
70
  />
69
71
  <Checkbox
70
72
  label="Controlled CheckBox"
@@ -242,6 +242,7 @@ class ClipboardCopy extends React.Component<ClipboardCopyProps, ClipboardCopySta
242
242
  value={this.state.text as string | number}
243
243
  id={`text-input-${id}`}
244
244
  aria-label={textAriaLabel}
245
+ {...(isCode && { dir: 'ltr' })}
245
246
  />
246
247
  <ClipboardCopyButton
247
248
  exitDelay={exitDelay}
@@ -36,7 +36,7 @@ class ClipboardCopyExpanded extends React.Component<ClipboardCopyExpandedProps>
36
36
  contentEditable={!isReadOnly}
37
37
  {...props}
38
38
  >
39
- {isCode ? <pre>{children}</pre> : children}
39
+ {isCode ? <pre dir="ltr">{children}</pre> : children}
40
40
  </div>
41
41
  );
42
42
  }
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import styles from '@patternfly/react-styles/css/components/ClipboardCopy/clipboard-copy';
3
+ import { css } from '@patternfly/react-styles';
2
4
  import AngleRightIcon from '@patternfly/react-icons/dist/esm/icons/angle-right-icon';
3
- import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-icon';
4
5
  import { Button } from '../Button';
5
6
 
6
7
  export interface ClipboardCopyToggleProps
@@ -31,7 +32,9 @@ export const ClipboardCopyToggle: React.FunctionComponent<ClipboardCopyTogglePro
31
32
  aria-expanded={isExpanded}
32
33
  {...props}
33
34
  >
34
- {isExpanded ? <AngleDownIcon aria-hidden="true" /> : <AngleRightIcon aria-hidden="true" />}
35
+ <div className={css(styles.clipboardCopyToggleIcon)}>
36
+ <AngleRightIcon aria-hidden="true" />
37
+ </div>
35
38
  </Button>
36
39
  );
37
40
  ClipboardCopyToggle.displayName = 'ClipboardCopyToggle';
@@ -7,7 +7,9 @@ exports[`expanded code content render 1`] = `
7
7
  contenteditable="true"
8
8
  id="id-1"
9
9
  >
10
- <pre>
10
+ <pre
11
+ dir="ltr"
12
+ >
11
13
  {
12
14
  "name": "@patternfly/react-core",
13
15
  "version": "1.33.2"
@@ -15,19 +15,23 @@ exports[`ClipboardCopyToggle toggle button render 1`] = `
15
15
  id="my-id"
16
16
  type="button"
17
17
  >
18
- <svg
19
- aria-hidden="true"
20
- class="pf-v5-svg"
21
- fill="currentColor"
22
- height="1em"
23
- role="img"
24
- viewBox="0 0 256 512"
25
- width="1em"
18
+ <div
19
+ class="pf-v5-c-clipboard-copy__toggle-icon"
26
20
  >
27
- <path
28
- 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"
29
- />
30
- </svg>
21
+ <svg
22
+ aria-hidden="true"
23
+ class="pf-v5-svg"
24
+ fill="currentColor"
25
+ height="1em"
26
+ role="img"
27
+ viewBox="0 0 256 512"
28
+ width="1em"
29
+ >
30
+ <path
31
+ 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"
32
+ />
33
+ </svg>
34
+ </div>
31
35
  </button>
32
36
  </DocumentFragment>
33
37
  `;
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { css } from '@patternfly/react-styles';
3
3
  import { Button, ButtonVariant } from '../Button';
4
4
  import { Badge } from '../Badge';
5
+ import { Icon } from '../Icon';
5
6
  import AngleDownIcon from '@patternfly/react-icons/dist/esm/icons/angle-down-icon';
6
7
  import AngleUpIcon from '@patternfly/react-icons/dist/esm/icons/angle-up-icon';
7
8
  import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
@@ -375,7 +376,7 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
375
376
  </InputGroupItem>
376
377
  )}
377
378
  {!!onSearch && (
378
- <InputGroupItem isPlain>
379
+ <InputGroupItem>
379
380
  <Button
380
381
  type="submit"
381
382
  variant={ButtonVariant.control}
@@ -383,7 +384,9 @@ const SearchInputBase: React.FunctionComponent<SearchInputProps> = ({
383
384
  onClick={onSearchHandler}
384
385
  isDisabled={isDisabled}
385
386
  >
386
- <ArrowRightIcon />
387
+ <Icon shouldMirrorRTL>
388
+ <ArrowRightIcon />
389
+ </Icon>
387
390
  </Button>
388
391
  </InputGroupItem>
389
392
  )}
@@ -103,7 +103,7 @@ exports[`SearchInput advanced search 1`] = `
103
103
  </button>
104
104
  </div>
105
105
  <div
106
- class="pf-v5-c-input-group__item pf-m-plain"
106
+ class="pf-v5-c-input-group__item"
107
107
  >
108
108
  <button
109
109
  aria-disabled="false"
@@ -114,19 +114,27 @@ exports[`SearchInput advanced search 1`] = `
114
114
  data-ouia-safe="true"
115
115
  type="submit"
116
116
  >
117
- <svg
118
- aria-hidden="true"
119
- class="pf-v5-svg"
120
- fill="currentColor"
121
- height="1em"
122
- role="img"
123
- viewBox="0 0 448 512"
124
- width="1em"
117
+ <span
118
+ class="pf-v5-c-icon"
125
119
  >
126
- <path
127
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
128
- />
129
- </svg>
120
+ <span
121
+ class="pf-v5-c-icon__content pf-v5-m-mirror-inline-rtl"
122
+ >
123
+ <svg
124
+ aria-hidden="true"
125
+ class="pf-v5-svg"
126
+ fill="currentColor"
127
+ height="1em"
128
+ role="img"
129
+ viewBox="0 0 448 512"
130
+ width="1em"
131
+ >
132
+ <path
133
+ d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
134
+ />
135
+ </svg>
136
+ </span>
137
+ </span>
130
138
  </button>
131
139
  </div>
132
140
  </div>
@@ -245,7 +253,7 @@ exports[`SearchInput advanced search with custom attributes 1`] = `
245
253
  </button>
246
254
  </div>
247
255
  <div
248
- class="pf-v5-c-input-group__item pf-m-plain"
256
+ class="pf-v5-c-input-group__item"
249
257
  >
250
258
  <button
251
259
  aria-disabled="false"
@@ -256,19 +264,27 @@ exports[`SearchInput advanced search with custom attributes 1`] = `
256
264
  data-ouia-safe="true"
257
265
  type="submit"
258
266
  >
259
- <svg
260
- aria-hidden="true"
261
- class="pf-v5-svg"
262
- fill="currentColor"
263
- height="1em"
264
- role="img"
265
- viewBox="0 0 448 512"
266
- width="1em"
267
+ <span
268
+ class="pf-v5-c-icon"
267
269
  >
268
- <path
269
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
270
- />
271
- </svg>
270
+ <span
271
+ class="pf-v5-c-icon__content pf-v5-m-mirror-inline-rtl"
272
+ >
273
+ <svg
274
+ aria-hidden="true"
275
+ class="pf-v5-svg"
276
+ fill="currentColor"
277
+ height="1em"
278
+ role="img"
279
+ viewBox="0 0 448 512"
280
+ width="1em"
281
+ >
282
+ <path
283
+ d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
284
+ />
285
+ </svg>
286
+ </span>
287
+ </span>
272
288
  </button>
273
289
  </div>
274
290
  </div>
@@ -579,7 +595,7 @@ exports[`SearchInput renders search input in strict mode 1`] = `
579
595
  </button>
580
596
  </div>
581
597
  <div
582
- class="pf-v5-c-input-group__item pf-m-plain"
598
+ class="pf-v5-c-input-group__item"
583
599
  >
584
600
  <button
585
601
  aria-disabled="false"
@@ -590,19 +606,27 @@ exports[`SearchInput renders search input in strict mode 1`] = `
590
606
  data-ouia-safe="true"
591
607
  type="submit"
592
608
  >
593
- <svg
594
- aria-hidden="true"
595
- class="pf-v5-svg"
596
- fill="currentColor"
597
- height="1em"
598
- role="img"
599
- viewBox="0 0 448 512"
600
- width="1em"
609
+ <span
610
+ class="pf-v5-c-icon"
601
611
  >
602
- <path
603
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
604
- />
605
- </svg>
612
+ <span
613
+ class="pf-v5-c-icon__content pf-v5-m-mirror-inline-rtl"
614
+ >
615
+ <svg
616
+ aria-hidden="true"
617
+ class="pf-v5-svg"
618
+ fill="currentColor"
619
+ height="1em"
620
+ role="img"
621
+ viewBox="0 0 448 512"
622
+ width="1em"
623
+ >
624
+ <path
625
+ d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
626
+ />
627
+ </svg>
628
+ </span>
629
+ </span>
606
630
  </button>
607
631
  </div>
608
632
  </div>
@@ -746,7 +770,7 @@ exports[`SearchInput search input with hint 1`] = `
746
770
  </div>
747
771
  </div>
748
772
  <div
749
- class="pf-v5-c-input-group__item pf-m-plain"
773
+ class="pf-v5-c-input-group__item"
750
774
  >
751
775
  <button
752
776
  aria-disabled="false"
@@ -757,19 +781,27 @@ exports[`SearchInput search input with hint 1`] = `
757
781
  data-ouia-safe="true"
758
782
  type="submit"
759
783
  >
760
- <svg
761
- aria-hidden="true"
762
- class="pf-v5-svg"
763
- fill="currentColor"
764
- height="1em"
765
- role="img"
766
- viewBox="0 0 448 512"
767
- width="1em"
784
+ <span
785
+ class="pf-v5-c-icon"
768
786
  >
769
- <path
770
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
771
- />
772
- </svg>
787
+ <span
788
+ class="pf-v5-c-icon__content pf-v5-m-mirror-inline-rtl"
789
+ >
790
+ <svg
791
+ aria-hidden="true"
792
+ class="pf-v5-svg"
793
+ fill="currentColor"
794
+ height="1em"
795
+ role="img"
796
+ viewBox="0 0 448 512"
797
+ width="1em"
798
+ >
799
+ <path
800
+ d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
801
+ />
802
+ </svg>
803
+ </span>
804
+ </span>
773
805
  </button>
774
806
  </div>
775
807
  </div>
@@ -898,7 +930,7 @@ exports[`SearchInput simple search input 1`] = `
898
930
  </div>
899
931
  </div>
900
932
  <div
901
- class="pf-v5-c-input-group__item pf-m-plain"
933
+ class="pf-v5-c-input-group__item"
902
934
  >
903
935
  <button
904
936
  aria-disabled="false"
@@ -909,19 +941,27 @@ exports[`SearchInput simple search input 1`] = `
909
941
  data-ouia-safe="true"
910
942
  type="submit"
911
943
  >
912
- <svg
913
- aria-hidden="true"
914
- class="pf-v5-svg"
915
- fill="currentColor"
916
- height="1em"
917
- role="img"
918
- viewBox="0 0 448 512"
919
- width="1em"
944
+ <span
945
+ class="pf-v5-c-icon"
920
946
  >
921
- <path
922
- d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
923
- />
924
- </svg>
947
+ <span
948
+ class="pf-v5-c-icon__content pf-v5-m-mirror-inline-rtl"
949
+ >
950
+ <svg
951
+ aria-hidden="true"
952
+ class="pf-v5-svg"
953
+ fill="currentColor"
954
+ height="1em"
955
+ role="img"
956
+ viewBox="0 0 448 512"
957
+ width="1em"
958
+ >
959
+ <path
960
+ d="M190.5 66.9l22.2-22.2c9.4-9.4 24.6-9.4 33.9 0L441 239c9.4 9.4 9.4 24.6 0 33.9L246.6 467.3c-9.4 9.4-24.6 9.4-33.9 0l-22.2-22.2c-9.5-9.5-9.3-25 .4-34.3L311.4 296H24c-13.3 0-24-10.7-24-24v-32c0-13.3 10.7-24 24-24h287.4L190.9 101.2c-9.8-9.3-10-24.8-.4-34.3z"
961
+ />
962
+ </svg>
963
+ </span>
964
+ </span>
925
965
  </button>
926
966
  </div>
927
967
  </div>
@@ -67,8 +67,10 @@ export interface TextInputProps
67
67
  'aria-label'?: string;
68
68
  /** @hide A reference object to attach to the text input box. */
69
69
  innerRef?: React.RefObject<any>;
70
- /** Trim text on left */
70
+ /** @deprecated Use isStartTruncated instead. Trim text at start */
71
71
  isLeftTruncated?: boolean;
72
+ /** Trim text at start */
73
+ isStartTruncated?: boolean;
72
74
  /** Callback function when text input is focused */
73
75
  onFocus?: (event?: any) => void;
74
76
  /** Callback function when text input is blurred (focus leaves) */
@@ -96,6 +98,7 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
96
98
  isExpanded: false,
97
99
  type: TextInputTypes.text,
98
100
  isLeftTruncated: false,
101
+ isStartTruncated: false,
99
102
  onChange: (): any => undefined,
100
103
  ouiaSafe: true
101
104
  };
@@ -120,7 +123,7 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
120
123
  };
121
124
 
122
125
  componentDidMount() {
123
- if (this.props.isLeftTruncated) {
126
+ if (this.props.isLeftTruncated || this.props.isStartTruncated) {
124
127
  const inputRef = this.props.innerRef || this.inputRef;
125
128
  this.observer = getResizeObserver(inputRef.current, this.handleResize, true);
126
129
  this.handleResize();
@@ -128,7 +131,7 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
128
131
  }
129
132
 
130
133
  componentWillUnmount() {
131
- if (this.props.isLeftTruncated) {
134
+ if (this.props.isLeftTruncated || this.props.isStartTruncated) {
132
135
  this.observer();
133
136
  }
134
137
  }
@@ -149,16 +152,16 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
149
152
  };
150
153
 
151
154
  onFocus = (event?: any) => {
152
- const { isLeftTruncated, onFocus } = this.props;
153
- if (isLeftTruncated) {
155
+ const { isLeftTruncated, isStartTruncated, onFocus } = this.props;
156
+ if (isLeftTruncated || isStartTruncated) {
154
157
  this.restoreText();
155
158
  }
156
159
  onFocus && onFocus(event);
157
160
  };
158
161
 
159
162
  onBlur = (event?: any) => {
160
- const { isLeftTruncated, onBlur } = this.props;
161
- if (isLeftTruncated) {
163
+ const { isLeftTruncated, isStartTruncated, onBlur } = this.props;
164
+ if (isLeftTruncated || isStartTruncated) {
162
165
  this.handleResize();
163
166
  }
164
167
  onBlur && onBlur(event);
@@ -177,6 +180,7 @@ export class TextInputBase extends React.Component<TextInputProps, TextInputStat
177
180
  onFocus,
178
181
  onBlur,
179
182
  isLeftTruncated,
183
+ isStartTruncated,
180
184
  isExpanded,
181
185
  readOnly,
182
186
  readOnlyVariant,
@@ -5,6 +5,7 @@ import userEvent from '@testing-library/user-event';
5
5
 
6
6
  import { TextInput, TextInputBase } from '../TextInput';
7
7
  import { ValidatedOptions } from '../../../helpers/constants';
8
+ import * as ReactCoreUtils from '@patternfly/react-core/src/helpers/util';
8
9
 
9
10
  const props = {
10
11
  onChange: jest.fn(),
@@ -32,7 +33,7 @@ describe('TextInput', () => {
32
33
  });
33
34
 
34
35
  test('read only text input using isReadOnly', () => {
35
- const { asFragment } = render(<TextInput isReadOnly value="read only" aria-label="read only text input" />);
36
+ const { asFragment } = render(<TextInput readOnlyVariant="default" value="read only" aria-label="read only text input" />);
36
37
  expect(asFragment()).toMatchSnapshot();
37
38
  });
38
39
 
@@ -109,4 +110,18 @@ describe('TextInput', () => {
109
110
 
110
111
  expect(myMock).not.toHaveBeenCalled();
111
112
  });
113
+
114
+ test('trimLeft is called when isStartTruncated is true', async () => {
115
+ const trimLeftFn = jest.spyOn(ReactCoreUtils, 'trimLeft').mockImplementation();
116
+
117
+ render(<TextInput isStartTruncated aria-label="start truncated text input" />);
118
+ expect(trimLeftFn).toHaveBeenCalled();
119
+ });
120
+
121
+ test('trimLeft is called when isLeftTruncated is true', async () => {
122
+ const trimLeftFn = jest.spyOn(ReactCoreUtils, 'trimLeft').mockImplementation();
123
+
124
+ render(<TextInput isLeftTruncated aria-label="start truncated text input" />);
125
+ expect(trimLeftFn).toHaveBeenCalled();
126
+ });
112
127
  });
@@ -99,7 +99,7 @@ exports[`TextInput plain read only text input 1`] = `
99
99
  exports[`TextInput read only text input using isReadOnly 1`] = `
100
100
  <DocumentFragment>
101
101
  <span
102
- class="pf-v5-c-form-control"
102
+ class="pf-v5-c-form-control pf-m-readonly"
103
103
  >
104
104
  <input
105
105
  aria-invalid="false"
@@ -107,6 +107,7 @@ exports[`TextInput read only text input using isReadOnly 1`] = `
107
107
  data-ouia-component-id="OUIA-Generated-TextInputBase-4"
108
108
  data-ouia-component-type="PF5/TextInput"
109
109
  data-ouia-safe="true"
110
+ readonly=""
110
111
  type="text"
111
112
  value="read only"
112
113
  />
@@ -23,9 +23,9 @@ import ClockIcon from '@patternfly/react-icons/dist/esm/icons/clock-icon';
23
23
 
24
24
  ```
25
25
 
26
- ### Truncated on Left
26
+ ### Truncated at start
27
27
 
28
- ```ts file="./TextInputLeftTruncated.tsx"
28
+ ```ts file="./TextInputStartTruncated.tsx"
29
29
 
30
30
  ```
31
31
 
@@ -1,17 +1,17 @@
1
1
  import React from 'react';
2
2
  import { TextInput } from '@patternfly/react-core';
3
3
 
4
- export const LeftTruncatedTextInput: React.FunctionComponent = () => {
4
+ export const StartTruncatedTextInput: React.FunctionComponent = () => {
5
5
  const [value, setValue] = React.useState(
6
6
  'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
7
7
  );
8
8
  return (
9
9
  <TextInput
10
- isLeftTruncated
10
+ isStartTruncated
11
11
  value={value}
12
12
  type="text"
13
13
  onChange={(_event, value) => setValue(value)}
14
- aria-label="left-truncated text input example"
14
+ aria-label="start-truncated text input example"
15
15
  />
16
16
  );
17
17
  };