Skip to content

Commit 1622c2b

Browse files
authored
chore: remove & rename icons (#1696)
1 parent 7e688f7 commit 1622c2b

File tree

371 files changed

+2033
-1379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+2033
-1379
lines changed

.changeset/angry-tigers-scream.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@strapi/icons': major
3+
---
4+
5+
chore!: removes some icons and renames others
6+
7+
Users should refer to the BREAKING_CHANGES.md for more information on how to migrate. Most of the icons have been visually changed. Snapshots will most likely need to be updated.

.changeset/proud-kings-relate.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@strapi/design-system': major
3+
---
4+
5+
chore!: remove the Icon component
6+
7+
Users should instead apply `fill` and `stroke` directly to the icon component as theme colors are now possible.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ package-lock.json
106106
dist
107107
storybook-static
108108
**/strapi-icons/src/*
109+
!**/strapi-icons/src/index.ts
110+
!**/strapi-icons/src/symbols-index.ts
109111

110112
############################
111113
# Visual Studio Code

BREAKING_CHANGES.md

Lines changed: 318 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,321 @@ This was just a wrapped component around `Flex`. You should use `Flex` instead.
4343
#### `ToggleCheckbox`
4444

4545
This is the same component as `ToggleInput` and therefore you should use that instead.
46+
47+
### Icon Updates
48+
49+
Many of the icons have been updated visually, this will effect snapshot tests. The default size is `1.6rem` for an icon, in the Strapi design-system this equates to 16px. We have also ensured that `paths` do not have any `fill` or `stroke` properties set, this allows the icon to be styled with CSS except for specific use cases we don't expect users to encounter. The default `color` is `currentColor` which means it will inherit the color of the parent element.
50+
51+
The following icons have been removed:
52+
53+
#### Apps
54+
55+
Replaced with `GridNine`
56+
57+
#### Attachment
58+
59+
Replaced with `Paperclip`
60+
61+
#### Blocks
62+
63+
Replaced with `BlocksField` and exported from `@strapi/icons/symbols`.
64+
65+
#### Boolean
66+
67+
Replaced with `BooleanField` and exported from `@strapi/icons/symbols`
68+
69+
#### Brush
70+
71+
Replaced with `PaintBrush`
72+
73+
#### CarretDown
74+
75+
Replaced with `CaretDown`
76+
77+
#### CarretUp
78+
79+
Replaced with `CaretUp`
80+
81+
#### CodeSquare
82+
83+
Now exported from `@strapi/icons/symbols`
84+
85+
#### Component
86+
87+
Replaced with `ComponentField` and exported from `@strapi/icons/symbols`
88+
89+
#### Connector
90+
91+
Replaced with `Faders`
92+
93+
#### Cube
94+
95+
Removed.
96+
97+
#### Cup
98+
99+
Replaced with `Coffee`
100+
101+
#### Dashboard
102+
103+
Replaced with `SquareFour`
104+
105+
#### Date
106+
107+
Replaced with `DateField`
108+
109+
#### Discord
110+
111+
Now exported from `@strapi/icons/symbols`
112+
113+
#### Discourse
114+
115+
Now exported from `@strapi/icons/symbols`
116+
117+
#### Doctor
118+
119+
Replaced with `Stethoscope`
120+
121+
#### Dot
122+
123+
Removed.
124+
125+
#### DynamicZone
126+
127+
Replaced with `DynamicZoneField` and exported from `@strapi/icons/symbols`
128+
129+
#### Email
130+
131+
Replaced with `EmailField` and exported from `@strapi/icons/symbols`
132+
133+
#### EmptyData
134+
135+
Now exported from `@strapi/icons/symbols`
136+
137+
#### EmptyDocuments
138+
139+
Now exported from `@strapi/icons/symbols`
140+
141+
#### EmptyPermissions
142+
143+
Now exported from `@strapi/icons/symbols`
144+
145+
#### EmptyPictures
146+
147+
Now exported from `@strapi/icons/symbols`
148+
149+
#### Enumeration
150+
151+
Replaced with `EnumerationField` and exported from `@strapi/icons/symbols`
152+
153+
#### Envelop
154+
155+
Replaced with `Mail`
156+
157+
#### Equalizer
158+
159+
Replaced with `SlidersHorizontal`
160+
161+
#### ExclamationMarkCircle
162+
163+
Replaced with `WarningCircle`
164+
165+
#### Exit
166+
167+
Replaced with `SignOut`
168+
169+
#### Facebook
170+
171+
Now exported from `@strapi/icons/symbols`
172+
173+
#### FeatherSquare
174+
175+
Now exported from `@strapi/icons/symbols`
176+
177+
#### Gate
178+
179+
Replaced with `CastleTurret`
180+
181+
#### Github
182+
183+
Now exported from `@strapi/icons/symbols`
184+
185+
#### GlassesSquare
186+
187+
Now exported from `@strapi/icons/symbols`
188+
189+
#### Grid
190+
191+
Replaced with `GridFour`
192+
193+
#### Headphone
194+
195+
Replaced with `Headphones`
196+
197+
#### History
198+
199+
Replaced with `ClockCounterClockwise`
200+
201+
#### InformationSquare
202+
203+
Now exported from `@strapi/icons/symbols`
204+
205+
#### Json
206+
207+
Replaced with `JsonField` and exported from `@strapi/icons/symbols`
208+
209+
#### Landscape
210+
211+
Replaced with `Images`
212+
213+
#### LandscapeSmall
214+
215+
Replaced with `Images`
216+
217+
#### Layer
218+
219+
Replaced with `ListPlus`
220+
221+
#### LinkSmall
222+
223+
Replaced with `Link`
224+
225+
#### Media
226+
227+
Replaced with `MediaField` and exported from `@strapi/icons/symbols`
228+
229+
#### Medium
230+
231+
Now exported from `@strapi/icons/symbols`
232+
233+
#### MenuBurger
234+
235+
Replaced with `List`
236+
237+
#### MinusOutlined
238+
239+
Replaced with `MinusCircle`
240+
241+
#### Music
242+
243+
Replaced with `MusicNotes`
244+
245+
#### Number
246+
247+
Replaced with `NumberField` and exported from `@strapi/icons/symbols`
248+
249+
#### OnholdCarretDown
250+
251+
Replaced with `CaretDown`
252+
253+
#### OnholdCarretUp
254+
255+
Replaced with `CaretUp`
256+
257+
#### Paint
258+
259+
Replaced with `PaintBrush`
260+
261+
#### Password
262+
263+
Replaced with `PasswordField`
264+
265+
#### Picture
266+
267+
Replaced with `Image`
268+
269+
#### PicturePlus
270+
271+
Replaced with `PlusCircle`
272+
273+
#### PlaySquare
274+
275+
Now exported from `@strapi/icons/symbols`
276+
277+
#### Puzzle
278+
279+
Replaced with `PuzzlePiece`
280+
281+
#### Quote
282+
283+
Replaced with `Quotes`
284+
285+
#### QuoteClosed
286+
287+
Replaced with `Quotes`
288+
289+
#### Reddit
290+
291+
Now exported from `@strapi/icons/symbols`
292+
293+
#### Refresh
294+
295+
Replaced with `ArrowClockwise`
296+
297+
#### Relation
298+
299+
Replaced with `RelationField` and exported from `@strapi/icons/symbols`
300+
301+
#### Repeat
302+
303+
Removed.
304+
305+
#### RichText
306+
307+
Replaced with `RichTextField` and exported from `@strapi/icons/symbols`
308+
309+
#### Rotate
310+
311+
Replaced with `ArrowsCounterClockwise`
312+
313+
#### SearchIcon
314+
315+
Removed, use `Search` instead.
316+
317+
#### Seed
318+
319+
Replaced with `Plant`
320+
321+
#### Slideshow
322+
323+
Replaced with `PresentationChart`
324+
325+
#### Spark
326+
327+
Replaced with `Sparkle`
328+
329+
#### Spinner
330+
331+
Replaced with `Loader`
332+
333+
#### Strapi
334+
335+
Now exported from `@strapi/icons/symbols`
336+
337+
#### Text
338+
339+
Replace with `TextField` and exported from `@strapi/icons/symbols`
340+
341+
#### Twitter
342+
343+
Replaced with `X` and exported from `@strapi/icons/symbols`
344+
345+
#### Uid
346+
347+
Replaced with `UidField` and exported from `@strapi/icons/symbols`
348+
349+
#### Write
350+
351+
Replaced with `Feather`
352+
353+
## Icon has been removed
354+
355+
The `Icon` component has been removed. It's primary function was to allow you to apply theme colors to icons, this is now doable with the actual icon:
356+
357+
```ts
358+
// before
359+
<Icon as={Plus} color="primary700" />
360+
361+
// after
362+
<Plus fill="primary700" />
363+
```

docs/.storybook/main.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ const config: StorybookConfig = {
1212
allowSyntheticDefaultImports: false,
1313
esModuleInterop: false,
1414
},
15+
propFilter: () => {
16+
return true;
17+
},
1518
},
1619
},
1720
viteFinal: (config) => {
@@ -40,10 +43,6 @@ const config: StorybookConfig = {
4043
name: getAbsolutePath('@storybook/react-vite'),
4144
options: {},
4245
},
43-
44-
docs: {
45-
autodocs: true,
46-
},
4746
};
4847

4948
function getAbsolutePath<T extends string>(value: T): T {

docs/.storybook/preview.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,21 @@ const preview: Preview = {
2626
parameters: {
2727
options: {
2828
storySort: {
29-
order: ['Design System', ['Primitives', 'Technical Components', 'Components']],
29+
order: [
30+
'Foundations',
31+
['Overview', 'Icons', ['Overview', '*']],
32+
'Primitives',
33+
['Overview', '*'],
34+
'Design System',
35+
['Technical Components', 'Components'],
36+
'Utilities',
37+
],
3038
},
3139
},
3240
actions: { argTypesRegex: '^on[A-Z].*' },
41+
controls: {
42+
expanded: true,
43+
},
3344
darkMode: {
3445
// Override the default dark theme
3546
dark: createCustomTheme({ theme: darkTheme, asStorybookTheme: false }),

docs/custom.d.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)