Skip to content

Commit

Permalink
feat(icon): type icon names (#9650)
Browse files Browse the repository at this point in the history
**Related issue:** #8858 

Adds a type for all supported UI icon names and updates types of
component icon props.

### Notes

* Moves `@esri/calcite-ui-icons` as a dependency to ensure types are
available
* Icon name prop includes both kebab-case and camelCase names (supported
icon values)
* Type resides in `icon/interfaces` (maybe it belongs in the shared
interfaces file?)
* Type is computed from `@esri/calcite-ui-icons`' module exports using
`type-fest` + TS utils
  • Loading branch information
jcfranco authored and github-actions[bot] committed Jul 30, 2024
1 parent d6a9e93 commit 7513f3a
Show file tree
Hide file tree
Showing 74 changed files with 254 additions and 195 deletions.
3 changes: 1 addition & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/calcite-components/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ module.exports = {
],
},
],
"@typescript-eslint/lines-between-class-members": ["error", "always"],
"@typescript-eslint/method-signature-style": ["error", "property"],
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "error",
Expand All @@ -84,7 +85,7 @@ module.exports = {
"jsdoc/require-property-type": "off",
"jsdoc/require-returns-type": "off",
"jsdoc/tag-lines": ["error", "any", { startLines: 1 }],
"lines-between-class-members": ["error", "always"],
"lines-between-class-members": "off",
"no-eval": "error",
"no-implied-eval": "error",
"no-multiple-empty-lines": [
Expand Down
2 changes: 1 addition & 1 deletion packages/calcite-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"directory": "packages/calcite-components"
},
"dependencies": {
"@esri/calcite-ui-icons": "3.28.2",
"@floating-ui/dom": "1.6.5",
"@stencil/core": "4.18.3",
"@types/color": "3.0.6",
Expand All @@ -77,7 +78,6 @@
},
"devDependencies": {
"@esri/calcite-design-tokens": "^2.2.1-next.1",
"@esri/calcite-ui-icons": "3.28.2",
"@esri/eslint-plugin-calcite-components": "^1.2.1-next.3",
"@stencil-community/eslint-plugin": "0.7.2",
"@stencil-community/postcss": "2.2.0",
Expand Down
Loading

0 comments on commit 7513f3a

Please sign in to comment.