Skip to content

Commit 2752a98

Browse files
committed
chore!(icon): Renamed the download icon to upload
BREAKING_CHANGE: The `download` icon used by the `IconProvider` has been renamed to `upload` to better match the icon that is being used.
1 parent cfc30f0 commit 2752a98

File tree

9 files changed

+24
-22
lines changed

9 files changed

+24
-22
lines changed

examples/create-react-app-typescript/src/components/Layout/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import navItems from "./navItems";
2525
const icons: ConfigurableIcons = {
2626
back: <KeyboardArrowLeftSVGIcon />,
2727
checkbox: <CheckBoxSVGIcon />,
28-
download: <FileUploadSVGIcon />,
2928
dropdown: <ArrowDropDownSVGIcon />,
3029
error: <ErrorOutlineSVGIcon />,
3130
expander: <KeyboardArrowDownSVGIcon />,
@@ -36,6 +35,7 @@ const icons: ConfigurableIcons = {
3635
radio: <RadioButtonCheckedSVGIcon />,
3736
selected: <CheckSVGIcon />,
3837
sort: <ArrowUpwardSVGIcon />,
38+
upload: <FileUploadSVGIcon />,
3939
};
4040

4141
interface LayoutProps {

examples/create-react-app/src/components/Layout/Layout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import navItems from './navItems';
2323
const icons = {
2424
back: <KeyboardArrowLeftSVGIcon />,
2525
checkbox: <CheckBoxSVGIcon />,
26-
download: <FileUploadSVGIcon />,
2726
dropdown: <ArrowDropDownSVGIcon />,
2827
error: <ErrorOutlineSVGIcon />,
2928
expander: <KeyboardArrowDownSVGIcon />,
@@ -34,6 +33,7 @@ const icons = {
3433
radio: <RadioButtonCheckedSVGIcon />,
3534
selected: <CheckSVGIcon />,
3635
sort: <ArrowUpwardSVGIcon />,
36+
upload: <FileUploadSVGIcon />,
3737
};
3838

3939
export default function Layout({ children }) {

examples/gatsby-typescript/src/components/Layout/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import navItems from "./navItems"
2424
const icons = {
2525
back: <KeyboardArrowLeftSVGIcon />,
2626
checkbox: <CheckBoxSVGIcon />,
27-
download: <FileUploadSVGIcon />,
2827
dropdown: <ArrowDropDownSVGIcon />,
2928
error: <ErrorOutlineSVGIcon />,
3029
expander: <KeyboardArrowDownSVGIcon />,
@@ -35,6 +34,7 @@ const icons = {
3534
radio: <RadioButtonCheckedSVGIcon />,
3635
selected: <CheckSVGIcon />,
3736
sort: <ArrowUpwardSVGIcon />,
37+
upload: <FileUploadSVGIcon />,
3838
}
3939

4040
export default function Layout({ children, location: { pathname } }) {

examples/gatsby/src/components/Layout/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import navItems from "./navItems"
2424
const icons = {
2525
back: <KeyboardArrowLeftSVGIcon />,
2626
checkbox: <CheckBoxSVGIcon />,
27-
download: <FileUploadSVGIcon />,
2827
dropdown: <ArrowDropDownSVGIcon />,
2928
error: <ErrorOutlineSVGIcon />,
3029
expander: <KeyboardArrowDownSVGIcon />,
@@ -35,6 +34,7 @@ const icons = {
3534
radio: <RadioButtonCheckedSVGIcon />,
3635
selected: <CheckSVGIcon />,
3736
sort: <ArrowUpwardSVGIcon />,
37+
upload: <FileUploadSVGIcon />,
3838
}
3939

4040
export default function Layout({ children, path }) {

examples/nextjs-typescript/src/components/Layout/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import navItems from "./navItems";
2626
const icons: ConfigurableIcons = {
2727
back: <KeyboardArrowLeftSVGIcon />,
2828
checkbox: <CheckBoxSVGIcon />,
29-
download: <FileUploadSVGIcon />,
3029
dropdown: <ArrowDropDownSVGIcon />,
3130
error: <ErrorOutlineSVGIcon />,
3231
expander: <KeyboardArrowDownSVGIcon />,
@@ -37,6 +36,7 @@ const icons: ConfigurableIcons = {
3736
radio: <RadioButtonCheckedSVGIcon />,
3837
selected: <CheckSVGIcon />,
3938
sort: <ArrowUpwardSVGIcon />,
39+
upload: <FileUploadSVGIcon />,
4040
};
4141

4242
interface LayoutProps {

examples/nextjs/src/components/Layout/Layout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import navItems from './navItems';
2424
const icons = {
2525
back: <KeyboardArrowLeftSVGIcon />,
2626
checkbox: <CheckBoxSVGIcon />,
27-
download: <FileUploadSVGIcon />,
2827
dropdown: <ArrowDropDownSVGIcon />,
2928
error: <ErrorOutlineSVGIcon />,
3029
expander: <KeyboardArrowDownSVGIcon />,
@@ -35,6 +34,7 @@ const icons = {
3534
radio: <RadioButtonCheckedSVGIcon />,
3635
selected: <CheckSVGIcon />,
3736
sort: <ArrowUpwardSVGIcon />,
37+
upload: <FileUploadSVGIcon />,
3838
};
3939

4040
export default function Layout({ children }) {

packages/documentation/src/components/Layout/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const icons: ConfiguredIcons = {
5050
back: <KeyboardArrowLeftSVGIcon />,
5151
checkbox: <CheckBoxSVGIcon />,
5252
dropdown: <ArrowDropDownSVGIcon />,
53-
download: <FileUploadSVGIcon />,
5453
expander: <KeyboardArrowDownSVGIcon />,
5554
error: <ErrorOutlineSVGIcon />,
5655
forward: <KeyboardArrowRightSVGIcon />,
@@ -60,6 +59,7 @@ const icons: ConfiguredIcons = {
6059
password: <RemoveRedEyeSVGIcon />,
6160
selected: <CheckSVGIcon />,
6261
sort: <ArrowUpwardSVGIcon />,
62+
upload: <FileUploadSVGIcon />,
6363
};
6464

6565
let devLayoutConf: LayoutConfiguration | undefined;

packages/form/src/file-input/FileInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const FileInput = forwardRef<HTMLInputElement, FileInputProps>(
9797
ref
9898
) {
9999
const { id, disabled } = props;
100-
const icon = useIcon("download", propIcon);
100+
const icon = useIcon("upload", propIcon);
101101
const disableIconSpacing =
102102
propDisableIconSpacing ?? typeof propChildren === "undefined";
103103

packages/icon/src/IconProvider.tsx

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import {
88

99
import { FontIcon } from "./FontIcon";
1010

11+
/**
12+
* @remarks \@since 5.0.0 The `download` icon has been renamed to `upload`.
13+
*/
1114
export interface ConfigurableIcons {
1215
/**
1316
* The general icon for navigating backwards or closing an item to the left.
@@ -25,15 +28,6 @@ export interface ConfigurableIcons {
2528
*/
2629
dropdown?: ReactNode;
2730

28-
/**
29-
* The general icon to use for the `FileInput` component (normally file
30-
* uploads).
31-
*
32-
* @remarks \@since 4.0.3 Changed the default icon to be `file_upload` and
33-
* this will be renamed to `upload` in the next major release.
34-
*/
35-
download?: ReactNode;
36-
3731
/**
3832
* The general icon to use when there are form errors.
3933
*
@@ -86,14 +80,22 @@ export interface ConfigurableIcons {
8680
* behavior.
8781
*/
8882
sort?: ReactNode;
83+
84+
/**
85+
* The general icon to use for the `FileInput` component (normally file
86+
* uploads).
87+
*
88+
* @remarks \@since 5.0.0
89+
*/
90+
upload?: ReactNode;
8991
}
9092

9193
export type ConfiguredIcons = Required<ConfigurableIcons>;
9294

9395
const DEFAULT_ICONS: ConfiguredIcons = {
9496
back: <FontIcon>keyboard_arrow_left</FontIcon>,
9597
checkbox: <FontIcon>check_box</FontIcon>,
96-
download: <FontIcon>file_upload</FontIcon>,
98+
upload: <FontIcon>file_upload</FontIcon>,
9799
dropdown: <FontIcon>arrow_drop_down</FontIcon>,
98100
error: <FontIcon>error_outline</FontIcon>,
99101
expander: <FontIcon>keyboard_arrow_down</FontIcon>,
@@ -153,7 +155,6 @@ export function IconProvider({
153155
children,
154156
back = DEFAULT_ICONS.back,
155157
checkbox = DEFAULT_ICONS.checkbox,
156-
download = DEFAULT_ICONS.download,
157158
dropdown = DEFAULT_ICONS.dropdown,
158159
expander = DEFAULT_ICONS.expander,
159160
error = DEFAULT_ICONS.error,
@@ -164,12 +165,12 @@ export function IconProvider({
164165
radio = DEFAULT_ICONS.radio,
165166
selected = DEFAULT_ICONS.selected,
166167
sort = DEFAULT_ICONS.sort,
168+
upload = DEFAULT_ICONS.upload,
167169
}: IconProviderProps): ReactElement {
168-
const value = useMemo(
170+
const value = useMemo<ConfiguredIcons>(
169171
() => ({
170172
back,
171173
checkbox,
172-
download,
173174
dropdown,
174175
error,
175176
expander,
@@ -180,11 +181,11 @@ export function IconProvider({
180181
radio,
181182
selected,
182183
sort,
184+
upload,
183185
}),
184186
[
185187
back,
186188
checkbox,
187-
download,
188189
dropdown,
189190
error,
190191
expander,
@@ -195,6 +196,7 @@ export function IconProvider({
195196
radio,
196197
selected,
197198
sort,
199+
upload,
198200
]
199201
);
200202

0 commit comments

Comments
 (0)