Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v5 icons #2647

Closed
wants to merge 78 commits into from
Closed
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
4aa8050
feat: v5 icons
denkristoffer Jan 11, 2024
a20e489
chore: pin v4 icons
denkristoffer Jan 11, 2024
64e34c0
fix: imports
denkristoffer Jan 11, 2024
12f4062
fix: fix imports, pkg lock update
bgutsol Feb 22, 2024
9046734
fix: pin f36-icon dep in f36-icons
bgutsol Feb 22, 2024
84aea1e
chore: update import
cf-remylenoir Apr 15, 2024
b734397
build: replace tsup with swc
cf-remylenoir Apr 16, 2024
6900694
refactor: export individual icons modules
cf-remylenoir Apr 16, 2024
7e5acb3
Merge branch 'main' into feat/icons-v5
cf-remylenoir Apr 16, 2024
2bfb82b
refactor: store icons in distinct directories
cf-remylenoir Apr 16, 2024
f339ac4
chore: restore original package name
cf-remylenoir Apr 16, 2024
ddb1429
build: enable pure ESM
cf-remylenoir Apr 16, 2024
697e959
fix: lockfile
denkristoffer Apr 17, 2024
8e4cb96
feat: duotone icons
denkristoffer Apr 17, 2024
91e2873
build: update package + move module type in config
cf-remylenoir Apr 17, 2024
7a6d7ce
fix: lockfile
cf-remylenoir Apr 17, 2024
8551203
chore: document config change
cf-remylenoir Apr 17, 2024
497616c
chore: put previous version before publish bump
cf-remylenoir Apr 17, 2024
db3d717
build: bump version after release
cf-remylenoir Apr 18, 2024
2088a3f
chore: pin dependency version
cf-remylenoir Apr 18, 2024
1fd9f9f
Merge branch 'main' into feat/icons-v5
cf-remylenoir Apr 18, 2024
7b89714
build: bump version after release
cf-remylenoir Apr 18, 2024
886edc3
chore: build CJS
denkristoffer Apr 22, 2024
508e3ca
feat: prebuild script
denkristoffer Apr 24, 2024
b67105d
feat: add FileArchive
denkristoffer Apr 24, 2024
275ebb5
chore: improved pre-build script
denkristoffer Apr 24, 2024
97f38a0
feat: add Gift icon
denkristoffer Apr 24, 2024
5dc83ab
feat:(codemod) add v5-icons codemod (#2716)
massao Apr 25, 2024
59f246c
Extract Icon weight type from Phosphor (#2727)
denkristoffer Apr 25, 2024
688e132
build icon with swc (#2726)
denkristoffer Apr 25, 2024
b0ed861
feat: V5 icons codemod (#2732)
massao Apr 26, 2024
ec9c25d
fix: icon props typing
cf-remylenoir Apr 30, 2024
0e776bf
fix(icon): add module export
cf-remylenoir Apr 30, 2024
073202e
fix(icons): adjust module import
cf-remylenoir Apr 30, 2024
753d9ed
fix: adjust dependency path
cf-remylenoir Apr 30, 2024
7b1a020
fix(icon): wrong SWC config file name
cf-remylenoir May 3, 2024
2ec2138
fix(icon): wrong types definition path
cf-remylenoir May 3, 2024
0b047d5
build: switch to dual package emitting (#2746)
cf-remylenoir May 8, 2024
e520ce9
feat: duotone icons
denkristoffer May 15, 2024
00101a2
feat(icon): active colour change
denkristoffer May 15, 2024
f7f7fed
fix(icon): use color property instead of fill
denkristoffer May 15, 2024
62c0ca6
chore(pre-build): typo
denkristoffer May 15, 2024
e5df311
fix: bring back pre-build script
denkristoffer May 15, 2024
142e909
feat(icon): 5.0.0-alpha.9
denkristoffer May 15, 2024
3b109fb
feat(icons): 5.0.0-alpha.9
denkristoffer May 15, 2024
36b27df
refactor: update icons v5 codemod (#2759)
massao May 16, 2024
ebf19d4
fix: properly pass testId as data-test-id to components [] (#2761)
massao May 17, 2024
44864d5
fix: properly pass the props from Icon to underling icon [] (#2762)
massao May 22, 2024
fadfea7
feat: add new utility to codemod to update identifier
massao May 23, 2024
8b74d06
feat: update icons v5 codemod with correct mapping and upate identifiers
massao May 23, 2024
40bf049
feat: make codemod replace trimmed icons
massao May 23, 2024
11cbfa8
refactor: update mapping on icons codemod
massao May 23, 2024
d44d075
feat: codemod also migrate IconProps
massao May 23, 2024
24e8827
feat: add support for mapping variant to color
massao May 28, 2024
93f9ab8
refactor: set default color to currentColor
massao May 28, 2024
4950cab
chore: release new alpha version
massao May 28, 2024
2494b86
feat: update link icon + add link-break icon
cf-remylenoir May 29, 2024
4295901
chore: update references icon replacement
cf-remylenoir May 30, 2024
9eb3016
refactor(codemod): only add IconProps import if necessary
massao May 30, 2024
0ba2b81
feat: add Icon component to icons codemod
massao May 30, 2024
746b704
refactor: improve codemod handling size prop
massao May 30, 2024
d62307c
feat: improve codemod handling Icon component
massao May 31, 2024
5730ba2
refactor: pass size and color prop to Icon component
massao Jun 3, 2024
42ff0ba
chore: release new alpha version
massao Jun 3, 2024
0be4423
chore: bump lock version
cf-remylenoir Jun 6, 2024
7181670
feat: add icons
cf-remylenoir Jun 6, 2024
5eceada
feat: migrate icons from custom to Phosphor
cf-remylenoir Jun 10, 2024
aa5e19c
feat: add HalfCircleIcon and DotsThreeVerticalIcon
massao Jun 10, 2024
e0242e6
chore: bump icons alpha version
massao Jun 10, 2024
2ea9198
feat: add missing icons
cf-remylenoir Jun 10, 2024
1f83157
fix: prevent prop leaking into Phosphor
cf-remylenoir Jun 14, 2024
cec812d
refactor: improve prop values ternary updates
massao Jun 17, 2024
6968f4c
refactor: make codemod accept only one directory or file per run
massao Jun 17, 2024
8f4a7d8
fix: reset import package name
Lelith Jun 17, 2024
1efc6ad
chore: version update
Lelith Jun 17, 2024
d080df7
chore: udpate dependencies
massao Jun 17, 2024
021bcea
chore: release codemod as alpha
massao Jun 17, 2024
380d6e9
feat: add custom Sparkle + SparkleFilled icons, remove Phosphor one
cf-remylenoir Jun 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
}
],
"ignore": [
"@contentful/f36-icon",
"@contentful/f36-icons",
"@contentful/f36-avatar",
"@contentful/f36-image",
"@contentful/f36-header",
Expand Down
34 changes: 34 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Building

We are using [tsup](https://tsup.egoist.dev/) and [esbuild](https://esbuild.github.io/) together with [Microbundle](https://www.npmjs.com/package/microbundle) to build our component library.

Each component builds to its own `dist` directory with:

- `index.d.ts` – TypeScript type declaration file
- `index.js` – CJS (CommonJS)
- `index.modern.mjs` – [Modern](https://github.com/developit/microbundle#-modern-mode-) output (work in all modern browsers)
- `index.module.js` – legacy ESM (ES Modules) output (for bundlers)
- `index.umd.js` – legacy UMD (Universal Module Definition) output (for Node & CDN use)

## Create a build of the library

```bash
npm run-script build
```

## v5 alpha/beta pre-releases

> [!WARNING]
>
> Revisit the build setup before the v5 release

We aim to emit ESM only in our next major release.

Until then, we emit CJS and ESM using a dual-package approach with `tsc` and [tsconfig-to-dual-package](https://github.com/azu/tsconfig-to-dual-package/tree/main).

This ensures Node/TypeScript point to the right package type (commonjs, module) depending on the consumer's configuration, without the hassle of us to "hack" the main `package.json` and `tsconfig` to satisfy all use cases.

The build has the following structure in its own `dist` directory:

- `./cjs` – CJS (CommonJS) with declaration + inline source map.
- `./esm` – ESM (ES Modules) with declaration + inline source map.
Loading