@patternfly/react-core 5.1.1-prerelease.15 → 5.1.1-prerelease.17

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 (139) hide show
  1. package/CHANGELOG.md +10 -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/Slider/Slider.d.ts +8 -4
  120. package/dist/esm/components/Slider/Slider.d.ts.map +1 -1
  121. package/dist/esm/components/Slider/Slider.js +62 -16
  122. package/dist/esm/components/Slider/Slider.js.map +1 -1
  123. package/dist/js/components/Slider/Slider.d.ts +8 -4
  124. package/dist/js/components/Slider/Slider.d.ts.map +1 -1
  125. package/dist/js/components/Slider/Slider.js +62 -16
  126. package/dist/js/components/Slider/Slider.js.map +1 -1
  127. package/dist/umd/react-core.min.js +2 -2
  128. package/helpers/package.json +1 -1
  129. package/layouts/package.json +1 -1
  130. package/next/package.json +1 -1
  131. package/package.json +2 -2
  132. package/src/components/Breadcrumb/examples/BreadcrumbDropdown.tsx +25 -3
  133. package/src/components/Menu/examples/MenuWithDrilldownBreadcrumbs.tsx +32 -15
  134. package/src/components/Slider/Slider.tsx +69 -20
  135. package/src/components/Slider/_tests_/Slider.test.tsx +3 -3
  136. package/src/components/Slider/examples/SliderActions.tsx +3 -3
  137. package/src/components/Tabs/examples/Tabs.md +1 -3
  138. package/src/components/Toolbar/examples/Toolbar.md +0 -6
  139. package/src/components/Toolbar/examples/Test.tsx +0 -258
@@ -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.14","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.16","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.14","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.16","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.14","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.16","private":true}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "5.1.1-prerelease.15",
3
+ "version": "5.1.1-prerelease.17",
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",
@@ -70,5 +70,5 @@
70
70
  "react": "^17 || ^18",
71
71
  "react-dom": "^17 || ^18"
72
72
  },
73
- "gitHead": "0d522acef9032f2869a47566e34902a89da2f521"
73
+ "gitHead": "026096f9f505bb31b24bb25b551ec81a743ef1fa"
74
74
  }
@@ -7,6 +7,7 @@ import {
7
7
  Dropdown,
8
8
  DropdownList,
9
9
  DropdownItem,
10
+ Icon,
10
11
  MenuToggle,
11
12
  MenuToggleElement
12
13
  } from '@patternfly/react-core';
@@ -14,13 +15,34 @@ import AngleLeftIcon from '@patternfly/react-icons/dist/esm/icons/angle-left-ico
14
15
  import CaretDownIcon from '@patternfly/react-icons/dist/esm/icons/caret-down-icon';
15
16
 
16
17
  const dropdownItems = [
17
- <DropdownItem icon={<AngleLeftIcon />} key="edit">
18
+ <DropdownItem
19
+ icon={
20
+ <Icon shouldMirrorRTL>
21
+ <AngleLeftIcon />
22
+ </Icon>
23
+ }
24
+ key="edit"
25
+ >
18
26
  Edit
19
27
  </DropdownItem>,
20
- <DropdownItem icon={<AngleLeftIcon />} key="action">
28
+ <DropdownItem
29
+ icon={
30
+ <Icon shouldMirrorRTL>
31
+ <AngleLeftIcon />
32
+ </Icon>
33
+ }
34
+ key="action"
35
+ >
21
36
  Deployment
22
37
  </DropdownItem>,
23
- <DropdownItem icon={<AngleLeftIcon />} key="apps">
38
+ <DropdownItem
39
+ icon={
40
+ <Icon shouldMirrorRTL>
41
+ <AngleLeftIcon />
42
+ </Icon>
43
+ }
44
+ key="apps"
45
+ >
24
46
  Applications
25
47
  </DropdownItem>
26
48
  ];
@@ -1,22 +1,23 @@
1
1
  import React from 'react';
2
2
  import {
3
- Menu,
4
- MenuContent,
5
- MenuList,
6
- MenuItem,
7
- Divider,
8
- DrilldownMenu,
3
+ Badge,
9
4
  Breadcrumb,
10
- BreadcrumbItem,
11
5
  BreadcrumbHeading,
12
- MenuBreadcrumb,
6
+ BreadcrumbItem,
13
7
  Checkbox,
8
+ Divider,
9
+ DrilldownMenu,
14
10
  Dropdown,
15
- DropdownList,
16
11
  DropdownItem,
12
+ DropdownList,
13
+ Icon,
14
+ Menu,
15
+ MenuBreadcrumb,
16
+ MenuContent,
17
+ MenuItem,
18
+ MenuList,
17
19
  MenuToggle,
18
- MenuToggleElement,
19
- Badge
20
+ MenuToggleElement
20
21
  } from '@patternfly/react-core';
21
22
  import StorageDomainIcon from '@patternfly/react-icons/dist/esm/icons/storage-domain-icon';
22
23
  import CodeBranchIcon from '@patternfly/react-icons/dist/esm/icons/code-branch-icon';
@@ -129,7 +130,11 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
129
130
  <DropdownList>
130
131
  <DropdownItem
131
132
  key="dropdown-start"
132
- icon={<AngleLeftIcon />}
133
+ icon={
134
+ <Icon shouldMirrorRTL>
135
+ <AngleLeftIcon />
136
+ </Icon>
137
+ }
133
138
  onClick={(event: any) =>
134
139
  drillOut(event, 'breadcrumbs-drilldownMenuStart', 'group:app_grouping_start', startRolloutBreadcrumb)
135
140
  }
@@ -169,7 +174,11 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
169
174
  <DropdownList>
170
175
  <DropdownItem
171
176
  key="dropdown-start"
172
- icon={<AngleLeftIcon />}
177
+ icon={
178
+ <Icon shouldMirrorRTL>
179
+ <AngleLeftIcon />
180
+ </Icon>
181
+ }
173
182
  onClick={(event: any) =>
174
183
  drillOut(event, 'breadcrumbs-drilldownMenuStart', 'group:labels_start', startRolloutBreadcrumb)
175
184
  }
@@ -221,7 +230,11 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
221
230
  <DropdownList>
222
231
  <DropdownItem
223
232
  key="dropdown-pause"
224
- icon={<AngleLeftIcon />}
233
+ icon={
234
+ <Icon shouldMirrorRTL>
235
+ <AngleLeftIcon />
236
+ </Icon>
237
+ }
225
238
  onClick={(event: any) =>
226
239
  drillOut(event, 'breadcrumbs-drilldownMenuPause', 'group:app_grouping', pauseRolloutsBreadcrumb)
227
240
  }
@@ -266,7 +279,11 @@ export const MenuWithDrilldownBreadcrumbs: React.FunctionComponent = () => {
266
279
  <DropdownList>
267
280
  <DropdownItem
268
281
  key="dropdown-pause"
269
- icon={<AngleLeftIcon />}
282
+ icon={
283
+ <Icon shouldMirrorRTL>
284
+ <AngleLeftIcon />
285
+ </Icon>
286
+ }
270
287
  onClick={(event: any) =>
271
288
  drillOut(event, 'breadcrumbs-drilldownMenuPause', 'group:labels', pauseRolloutsBreadcrumb)
272
289
  }
@@ -46,16 +46,18 @@ export interface SliderProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onCh
46
46
  inputAriaLabel?: string;
47
47
  /** Text label that is place after the input field. */
48
48
  inputLabel?: string | number;
49
- /** Position of the input. */
50
- inputPosition?: 'aboveThumb' | 'right';
49
+ /** Position of the input. Note "right" is deprecated. Use "end" instead*/
50
+ inputPosition?: 'aboveThumb' | 'right' | 'end';
51
51
  /** Value displayed in the input field. */
52
52
  inputValue?: number;
53
53
  /** Adds disabled styling, and disables the slider and the input component if present. */
54
54
  isDisabled?: boolean;
55
55
  /** Flag to show value input field. */
56
56
  isInputVisible?: boolean;
57
- /** Actions placed to the left of the slider. */
57
+ /** @deprecated Use startActions instead. Actions placed at the start of the slider. */
58
58
  leftActions?: React.ReactNode;
59
+ /** Actions placed at the start of the slider. */
60
+ startActions?: React.ReactNode;
59
61
  /** The maximum permitted value. */
60
62
  max?: number;
61
63
  /** The minimum permitted value. */
@@ -67,8 +69,10 @@ export interface SliderProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onCh
67
69
  inputValue?: number,
68
70
  setLocalInputValue?: React.Dispatch<React.SetStateAction<number>>
69
71
  ) => void;
70
- /** Actions placed to the right of the slider. */
72
+ /** @deprecated Use endActions instead. Actions placed to the right of the slider. */
71
73
  rightActions?: React.ReactNode;
74
+ /** Actions placed at the end of the slider. */
75
+ endActions?: React.ReactNode;
72
76
  /** Flag to indicate if boundaries should be shown for slider that does not have custom steps. */
73
77
  showBoundaries?: boolean;
74
78
  /** Flag to indicate if ticks should be shown for slider that does not have custom steps. */
@@ -95,10 +99,12 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
95
99
  inputAriaLabel = 'Slider value input',
96
100
  thumbAriaLabel = 'Value',
97
101
  hasTooltipOverThumb = false,
98
- inputPosition = 'right',
102
+ inputPosition = 'end',
99
103
  onChange,
100
104
  leftActions,
105
+ startActions,
101
106
  rightActions,
107
+ endActions,
102
108
  step = 1,
103
109
  min = 0,
104
110
  max = 100,
@@ -114,6 +120,12 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
114
120
  const [localValue, setValue] = useState(value);
115
121
  const [localInputValue, setLocalInputValue] = useState(inputValue);
116
122
 
123
+ let isRTL: boolean;
124
+
125
+ React.useEffect(() => {
126
+ isRTL = window.getComputedStyle(sliderRailRef.current).getPropertyValue('direction') === 'rtl';
127
+ });
128
+
117
129
  React.useEffect(() => {
118
130
  setValue(value);
119
131
  }, [value]);
@@ -182,7 +194,11 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
182
194
  e.stopPropagation();
183
195
  e.preventDefault();
184
196
 
185
- diff = e.clientX - thumbRef.current.getBoundingClientRect().left;
197
+ if (isRTL) {
198
+ diff = thumbRef.current.getBoundingClientRect().right - e.clientX;
199
+ } else {
200
+ diff = e.clientX - thumbRef.current.getBoundingClientRect().left;
201
+ }
186
202
 
187
203
  document.addEventListener('mousemove', callbackThumbMove);
188
204
  document.addEventListener('mouseup', callbackThumbUp);
@@ -191,7 +207,11 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
191
207
  const handleTouchStart = (e: React.TouchEvent) => {
192
208
  e.stopPropagation();
193
209
 
194
- diff = e.touches[0].clientX - thumbRef.current.getBoundingClientRect().left;
210
+ if (isRTL) {
211
+ diff = thumbRef.current.getBoundingClientRect().right - e.touches[0].clientX;
212
+ } else {
213
+ diff = e.touches[0].clientX - thumbRef.current.getBoundingClientRect().left;
214
+ }
195
215
 
196
216
  document.addEventListener('touchmove', callbackThumbMove, { passive: false });
197
217
  document.addEventListener('touchend', callbackThumbUp);
@@ -216,8 +236,13 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
216
236
  }
217
237
 
218
238
  const clientPosition = e.touches && e.touches.length ? e.touches[0].clientX : e.clientX;
239
+ let newPosition;
219
240
 
220
- let newPosition = clientPosition - diff - sliderRailRef.current.getBoundingClientRect().left;
241
+ if (isRTL) {
242
+ newPosition = sliderRailRef.current.getBoundingClientRect().right - clientPosition - diff;
243
+ } else {
244
+ newPosition = clientPosition - diff - sliderRailRef.current.getBoundingClientRect().left;
245
+ }
221
246
 
222
247
  const end = sliderRailRef.current.offsetWidth - thumbRef.current.offsetWidth;
223
248
 
@@ -288,21 +313,43 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
288
313
  if (!areCustomStepsContinuous && customSteps) {
289
314
  const stepIndex = customSteps.findIndex((stepObj) => stepObj.value === localValue);
290
315
  if (key === 'ArrowRight') {
291
- if (stepIndex + 1 < customSteps.length) {
292
- {
293
- newValue = customSteps[stepIndex + 1].value;
316
+ if (isRTL) {
317
+ if (stepIndex - 1 >= 0) {
318
+ newValue = customSteps[stepIndex - 1].value;
319
+ }
320
+ } else {
321
+ if (stepIndex + 1 < customSteps.length) {
322
+ {
323
+ newValue = customSteps[stepIndex + 1].value;
324
+ }
294
325
  }
295
326
  }
296
327
  } else if (key === 'ArrowLeft') {
297
- if (stepIndex - 1 >= 0) {
298
- newValue = customSteps[stepIndex - 1].value;
328
+ if (isRTL) {
329
+ if (stepIndex + 1 < customSteps.length) {
330
+ {
331
+ newValue = customSteps[stepIndex + 1].value;
332
+ }
333
+ }
334
+ } else {
335
+ if (stepIndex - 1 >= 0) {
336
+ newValue = customSteps[stepIndex - 1].value;
337
+ }
299
338
  }
300
339
  }
301
340
  } else {
302
341
  if (key === 'ArrowRight') {
303
- newValue = localValue + step <= max ? localValue + step : max;
342
+ if (isRTL) {
343
+ newValue = localValue - step >= min ? localValue - step : min;
344
+ } else {
345
+ newValue = localValue + step <= max ? localValue + step : max;
346
+ }
304
347
  } else if (key === 'ArrowLeft') {
305
- newValue = localValue - step >= min ? localValue - step : min;
348
+ if (isRTL) {
349
+ newValue = localValue + step <= max ? localValue + step : max;
350
+ } else {
351
+ newValue = localValue - step >= min ? localValue - step : min;
352
+ }
306
353
  }
307
354
  }
308
355
 
@@ -347,8 +394,8 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
347
394
  for (let i = min; i <= max; i = i + step) {
348
395
  const stepValue = getStepValue(i, min, max);
349
396
 
350
- // If we boundaries but not ticks just generate the needed steps
351
- // so that we don't pullute them DOM with empty divs
397
+ // If boundaries but not ticks just generate the needed steps
398
+ // so that we don't pollute them DOM with empty divs
352
399
  if (!showTicks && showBoundaries && i !== min && i !== max) {
353
400
  continue;
354
401
  }
@@ -394,7 +441,7 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
394
441
  style={{ ...style, ...inputStyle }}
395
442
  {...props}
396
443
  >
397
- {leftActions && <div className={css(styles.sliderActions)}>{leftActions}</div>}
444
+ {(leftActions || startActions) && <div className={css(styles.sliderActions)}>{leftActions || startActions}</div>}
398
445
  <div className={css(styles.sliderMain)}>
399
446
  <div className={css(styles.sliderRail)} ref={sliderRailRef} onClick={!isDisabled ? onSliderRailClick : null}>
400
447
  <div className={css(styles.sliderRailTrack)} />
@@ -434,8 +481,10 @@ export const Slider: React.FunctionComponent<SliderProps> = ({
434
481
  <div className={css(styles.sliderValue, styles.modifiers.floating)}>{displayInput()}</div>
435
482
  )}
436
483
  </div>
437
- {isInputVisible && inputPosition === 'right' && <div className={css(styles.sliderValue)}>{displayInput()}</div>}
438
- {rightActions && <div className={css(styles.sliderActions)}>{rightActions}</div>}
484
+ {isInputVisible && (inputPosition === 'right' || inputPosition === 'end') && (
485
+ <div className={css(styles.sliderValue)}>{displayInput()}</div>
486
+ )}
487
+ {(rightActions || endActions) && <div className={css(styles.sliderActions)}>{rightActions || endActions}</div>}
439
488
  </div>
440
489
  );
441
490
  };
@@ -46,7 +46,7 @@ describe('slider', () => {
46
46
 
47
47
  test('renders slider with input', () => {
48
48
  const { asFragment } = render(
49
- <Slider value={50} isInputVisible inputValue={50} inputLabel="%" inputPosition="right" />
49
+ <Slider value={50} isInputVisible inputValue={50} inputLabel="%" inputPosition="end" />
50
50
  );
51
51
  expect(asFragment()).toMatchSnapshot();
52
52
  });
@@ -62,8 +62,8 @@ describe('slider', () => {
62
62
  const { asFragment } = render(
63
63
  <Slider
64
64
  value={50}
65
- leftActions={<Button variant="plain" aria-label="Minus" />}
66
- rightActions={<Button variant="plain" aria-label="Plus" />}
65
+ startActions={<Button variant="plain" aria-label="Minus" />}
66
+ endActions={<Button variant="plain" aria-label="Plus" />}
67
67
  />
68
68
  );
69
69
  expect(asFragment()).toMatchSnapshot();
@@ -65,12 +65,12 @@ export const SliderActions: React.FunctionComponent = () => {
65
65
  <Slider
66
66
  value={value1}
67
67
  onChange={onChange1}
68
- leftActions={
68
+ startActions={
69
69
  <Button variant="plain" aria-label="Minus" onClick={onMinusClick}>
70
70
  <MinusIcon />
71
71
  </Button>
72
72
  }
73
- rightActions={
73
+ endActions={
74
74
  <Button variant="plain" aria-label="Plus" onClick={onPlusClick}>
75
75
  <PlusIcon />
76
76
  </Button>
@@ -85,7 +85,7 @@ export const SliderActions: React.FunctionComponent = () => {
85
85
  inputLabel="%"
86
86
  isInputVisible
87
87
  isDisabled={isDisabled}
88
- rightActions={buildAction(isDisabled)}
88
+ endActions={buildAction(isDisabled)}
89
89
  />
90
90
  </>
91
91
  );
@@ -28,7 +28,7 @@ You can adjust a tab in the following ways:
28
28
  - To disable a tab, but keep it perceivable to assistive technology users, use the `isAriaDisabled` property. If a disabled tab has a tooltip, use this property instead of `isDisabled`.
29
29
  - To add a tooltip to an aria-disabled tab, use the `tooltip` property.
30
30
 
31
- Most tab variations can either be 'default' or 'boxed':
31
+ Tabs can be styled as 'default' or 'boxed':
32
32
 
33
33
  - Default tabs do not have any borders and use a bottom line to distinguish between a selected tab, a hovered tab, and an inactive tab.
34
34
  - Boxed tabs are outlined to emphasize the area that a tab spans. To preview boxed tabs in the following examples, select the 'isBox' checkbox, which sets the `isBox` property to true.
@@ -207,8 +207,6 @@ The tab its content should only be mounted when the tab is visible.
207
207
 
208
208
  To enable closeable tabs, pass the `onClose` property to the `<Tabs>` component. To enable a button that adds new tabs, pass the `onAdd` property to `<Tabs>`.
209
209
 
210
- Aria labels may be controlled manually by passing the `closeButtonAriaLabel` property to a `<Tab>` and the `addButtonAriaLabel` property to `<Tabs>`.
211
-
212
210
  ```ts file="./TabsDynamic.tsx"
213
211
  ```
214
212
 
@@ -14,12 +14,6 @@ import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-ico
14
14
 
15
15
  ## Examples
16
16
 
17
- ### TEST - remove before merging
18
-
19
- ```ts file="./Test.tsx"
20
-
21
- ```
22
-
23
17
  ### Toolbar items
24
18
 
25
19
  A toolbar can contain multiple toolbar items, like filters and buttons.