Skip to content

Commit dd212a6

Browse files
fix(OutlinedCalendarAltIcon): Replace OutlinedCalendarAltIcon with RhUiCalendarIcon
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 8b528bb commit dd212a6

4 files changed

Lines changed: 13 additions & 42 deletions

File tree

packages/react-core/src/components/DatePicker/DatePicker.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { TextInput, TextInputProps } from '../TextInput/TextInput';
66
import { Button } from '../Button';
77
import { Popover, PopoverProps } from '../Popover/Popover';
88
import { InputGroup, InputGroupItem } from '../InputGroup';
9-
import OutlinedCalendarAltIcon from '@patternfly/react-icons/dist/esm/icons/outlined-calendar-alt-icon';
9+
import RhUiCalendarIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-calendar-icon';
1010
import { CalendarMonth, CalendarFormat } from '../CalendarMonth';
1111
import { KeyTypes } from '../../helpers';
1212
import { isValidDate } from '../../helpers/datetimeUtils';
@@ -333,7 +333,7 @@ const DatePickerBase = (
333333
aria-label={buttonAriaLabel}
334334
onClick={() => setPopoverOpen(!popoverOpen)}
335335
isDisabled={isDisabled}
336-
icon={<OutlinedCalendarAltIcon />}
336+
icon={<RhUiCalendarIcon />}
337337
aria-haspopup="dialog"
338338
/>
339339
</InputGroupItem>

packages/react-core/src/components/DatePicker/__tests__/__snapshots__/DatePicker.test.tsx.snap

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,12 @@ exports[`With popover opened 1`] = `
5151
fill="currentColor"
5252
height="1em"
5353
role="img"
54+
viewBox="0 0 32 32"
5455
width="1em"
5556
>
56-
<svg
57-
class="pf-v6-icon-default"
58-
viewBox="0 0 448 512"
59-
>
60-
<path
61-
d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"
62-
/>
63-
</svg>
64-
<svg
65-
class="pf-v6-icon-rh-ui"
66-
viewBox="0 0 32 32"
67-
>
68-
<path
69-
d="M28.5 5H23V3a1 1 0 1 0-2 0v2H11V3a1 1 0 1 0-2 0v2H3.507c-.827 0-1.5.673-1.5 1.5v7c0 .01.003.019.003.029v8.423c0 .017-.01.031-.01.048 0 .279.115.53.299.712l.004.005 6.99 6.99c.092.092.201.165.323.216l.005.002c.121.05.25.076.38.076h18.5c.827 0 1.5-.673 1.5-1.5V6.5c0-.827-.673-1.5-1.5-1.5ZM9 7v2a1 1 0 1 0 2 0V7h10v2a1 1 0 1 0 2 0V7h5v6H4.01V7H9Zm0 19.586L5.414 23H9v3.586ZM11 28v-5.5c0-.827-.673-1.5-1.5-1.5H4.01v-6H28v13H11Z"
70-
/>
71-
</svg>
57+
<path
58+
d="M28.5 5H23V3a1 1 0 1 0-2 0v2H11V3a1 1 0 1 0-2 0v2H3.507c-.827 0-1.5.673-1.5 1.5v7c0 .01.003.019.003.029v8.423c0 .017-.01.031-.01.048 0 .279.115.53.299.712l.004.005 6.99 6.99c.092.092.201.165.323.216l.005.002c.121.05.25.076.38.076h18.5c.827 0 1.5-.673 1.5-1.5V6.5c0-.827-.673-1.5-1.5-1.5ZM9 7v2a1 1 0 1 0 2 0V7h10v2a1 1 0 1 0 2 0V7h5v6H4.01V7H9Zm0 19.586L5.414 23H9v3.586ZM11 28v-5.5c0-.827-.673-1.5-1.5-1.5H4.01v-6H28v13H11Z"
59+
/>
7260
</svg>
7361
</span>
7462
</button>
@@ -856,24 +844,12 @@ exports[`disabled date picker 1`] = `
856844
fill="currentColor"
857845
height="1em"
858846
role="img"
847+
viewBox="0 0 32 32"
859848
width="1em"
860849
>
861-
<svg
862-
class="pf-v6-icon-default"
863-
viewBox="0 0 448 512"
864-
>
865-
<path
866-
d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"
867-
/>
868-
</svg>
869-
<svg
870-
class="pf-v6-icon-rh-ui"
871-
viewBox="0 0 32 32"
872-
>
873-
<path
874-
d="M28.5 5H23V3a1 1 0 1 0-2 0v2H11V3a1 1 0 1 0-2 0v2H3.507c-.827 0-1.5.673-1.5 1.5v7c0 .01.003.019.003.029v8.423c0 .017-.01.031-.01.048 0 .279.115.53.299.712l.004.005 6.99 6.99c.092.092.201.165.323.216l.005.002c.121.05.25.076.38.076h18.5c.827 0 1.5-.673 1.5-1.5V6.5c0-.827-.673-1.5-1.5-1.5ZM9 7v2a1 1 0 1 0 2 0V7h10v2a1 1 0 1 0 2 0V7h5v6H4.01V7H9Zm0 19.586L5.414 23H9v3.586ZM11 28v-5.5c0-.827-.673-1.5-1.5-1.5H4.01v-6H28v13H11Z"
875-
/>
876-
</svg>
850+
<path
851+
d="M28.5 5H23V3a1 1 0 1 0-2 0v2H11V3a1 1 0 1 0-2 0v2H3.507c-.827 0-1.5.673-1.5 1.5v7c0 .01.003.019.003.029v8.423c0 .017-.01.031-.01.048 0 .279.115.53.299.712l.004.005 6.99 6.99c.092.092.201.165.323.216l.005.002c.121.05.25.076.38.076h18.5c.827 0 1.5-.673 1.5-1.5V6.5c0-.827-.673-1.5-1.5-1.5ZM9 7v2a1 1 0 1 0 2 0V7h10v2a1 1 0 1 0 2 0V7h5v6H4.01V7H9Zm0 19.586L5.414 23H9v3.586ZM11 28v-5.5c0-.827-.673-1.5-1.5-1.5H4.01v-6H28v13H11Z"
852+
/>
877853
</svg>
878854
</span>
879855
</button>

packages/react-core/src/demos/DateTimePicker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ subsection: date-and-time
55
---
66

77
import { useState } from 'react';
8-
import OutlinedCalendarAltIcon from '@patternfly/react-icons/dist/esm/icons/outlined-calendar-alt-icon';
8+
import RhUiCalendarIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-calendar-icon';
99
import OutlinedClockIcon from '@patternfly/react-icons/dist/esm/icons/outlined-clock-icon';
1010

1111
## Demos

packages/react-core/src/demos/examples/DateTimePicker/DateTimePicker.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
MenuToggle,
1313
MenuToggleElement
1414
} from '@patternfly/react-core';
15-
import OutlinedCalendarAltIcon from '@patternfly/react-icons/dist/esm/icons/outlined-calendar-alt-icon';
15+
import RhUiCalendarIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-calendar-icon';
1616
import OutlinedClockIcon from '@patternfly/react-icons/dist/esm/icons/outlined-clock-icon';
1717

1818
export const DateTimePicker: React.FunctionComponent = () => {
@@ -74,12 +74,7 @@ export const DateTimePicker: React.FunctionComponent = () => {
7474
);
7575

7676
const calendarButton = (
77-
<Button
78-
variant="control"
79-
aria-label="Toggle the calendar"
80-
onClick={onToggleCalendar}
81-
icon={<OutlinedCalendarAltIcon />}
82-
/>
77+
<Button variant="control" aria-label="Toggle the calendar" onClick={onToggleCalendar} icon={<RhUiCalendarIcon />} />
8378
);
8479

8580
return (

0 commit comments

Comments
 (0)