trendmicro-frontend / tonic-ui

Tonic UI is a UI component library for React, built with Emotion and Styled System. It is designed to be easy to use and easy to customize.
https://trendmicro-frontend.github.io/tonic-ui
MIT License
125 stars 28 forks source link

[react-icons] Create a common terms list for camel case conversion (e.g., "ai" should be "AI" instead of "Ai") #915

Closed cheton closed 4 days ago

cheton commented 3 weeks ago

We need to create a common terms list for handling specific cases in camel case conversion within the react-icons library. This list should ensure that certain terms are always converted correctly, such as:

This list will help maintain consistency across the codebase and prevent incorrect case conversions.

cheton commented 2 weeks ago

This has already been updated in the main branch of tmicon. Some icon names are fully capitalized to conform to the terminology.

TV

https://github.com/trendmicro-frontend/tmicon/blob/main/src/icons/tv.js

const icon = {
  "iconset": 2,
  "name": "TV",
  "new": true,
  "svg": "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"rgb(34, 34, 34)\" xmlns=\"http://www.w3.org/2000/svg\"><title>TV</title><path d=\"M15 1H1C0.448 1 0 1.448 0 2V12C0 12.552 0.448 13 1 13H15C15.552 13 16 12.552 16 12V2C16 1.448 15.552 1 15 1ZM14 8.414V11H2V3H14V8.414ZM4 14H12V15H4V14Z\" fill=\"rgb(34, 34, 34)\" fill-opacity=\"1.00\"/></svg>",
  "viewBox": "0 0 16 16"
};

URL

https://github.com/trendmicro-frontend/tmicon/blob/main/src/icons/url.js

const icon = {
  "iconset": 9,
  "name": "URL",
  "new": true,
  "svg": "<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"rgb(34, 34, 34)\" xmlns=\"http://www.w3.org/2000/svg\"><title>URL</title><path d=\"M16 3.94991C16 4.94591 15.582 5.84491 14.912 6.47991L14.91 6.48191L11.272 9.96891C10.945 10.2809 10.559 10.5339 10.132 10.7089L10.108 10.7179L9.97699 10.7649C9.85299 10.8119 9.69999 10.8569 9.54299 10.8919L9.51899 10.8969C9.41199 10.9209 9.27799 10.9429 9.14199 10.9569L9.12599 10.9579C9.09299 10.9619 9.06099 10.9649 9.02799 10.9679C8.93299 10.9759 8.82099 10.9809 8.70899 10.9809C8.66099 10.9809 8.61399 10.9799 8.56699 10.9789H8.57399C8.45299 10.9769 8.33299 10.9639 8.21299 10.9499C8.19599 10.9479 8.17899 10.9479 8.16199 10.9459L7.90399 10.9109C7.22099 10.7699 6.62799 10.4509 6.15699 10.0049L6.15899 10.0069L5.64799 9.51791C5.62699 9.49791 5.60699 9.47791 5.58599 9.45691C5.51299 9.38391 5.45699 9.29891 5.39199 9.21991L6.42899 8.22591C6.49499 8.31591 6.56499 8.39591 6.63999 8.46991L7.15099 8.95891C7.55999 9.32491 8.10199 9.54791 8.69699 9.54791C9.30999 9.54791 9.86799 9.30991 10.284 8.92191L10.283 8.92291L13.92 5.43691C14.316 5.06491 14.564 4.53791 14.565 3.95391C14.565 3.95291 14.565 3.95191 14.565 3.95191C14.565 3.41191 14.345 2.92291 13.991 2.56991C13.979 2.55791 13.967 2.54591 13.955 2.53491L13.444 2.04591C13.038 1.67191 12.494 1.44291 11.897 1.44291C11.281 1.44291 10.723 1.68591 10.312 2.08191L8.30699 4.00391H6.22199L9.31999 1.03491C9.98899 0.396906 10.897 0.00390625 11.897 0.00390625C12.878 0.00390625 13.771 0.381906 14.438 1.00091L14.436 0.998906L14.947 1.48791C15.598 2.10991 16.002 2.98491 16.004 3.95391L16 3.94991ZM7.69699 11.9999L5.69099 13.9219C5.28099 14.3169 4.72199 14.5599 4.10599 14.5599C3.50899 14.5599 2.96499 14.3309 2.55699 13.9559L2.55899 13.9569L2.04799 13.4679C1.67199 13.1149 1.43699 12.6139 1.43699 12.0589C1.43699 12.0549 1.43699 12.0509 1.43699 12.0469V12.0479C1.43799 11.4629 1.68599 10.9369 2.08099 10.5659L2.08199 10.5649L5.71899 7.07891C6.06199 6.75391 6.50599 6.53391 6.99999 6.47091L7.01099 6.46991C7.10799 6.45491 7.21999 6.44591 7.33399 6.44591C7.92099 6.44591 8.45399 6.67291 8.85099 7.04391L8.84999 7.04291L9.36099 7.53191C9.37299 7.54291 9.38499 7.55491 9.39699 7.56691C9.45699 7.63091 9.51399 7.69891 9.56599 7.77191L9.56999 7.77791L10.607 6.78391C10.523 6.67291 10.44 6.57591 10.352 6.48291L10.354 6.48491L9.84299 5.99591C9.42799 5.60691 8.91699 5.31491 8.34999 5.15991L8.32499 5.15391C8.01799 5.06291 7.66399 5.01091 7.29899 5.01091C6.30299 5.01091 5.39699 5.39991 4.72499 6.03291L4.72699 6.03091L1.08899 9.51791C0.416993 10.1539 -0.00100708 11.0519 -0.00100708 12.0479C-0.00100708 12.0499 -0.00100708 12.0529 -0.00100708 12.0559C-0.00100708 12.9929 0.378993 13.8409 0.993993 14.4539C1.01399 14.4749 1.03499 14.4949 1.05599 14.5149L1.56699 15.0039C2.23099 15.6209 3.12499 15.9989 4.10599 15.9989C5.10599 15.9989 6.01399 15.6059 6.68499 14.9669L6.68399 14.9679L9.78199 11.9989H7.69699V11.9999Z\" fill=\"rgb(34, 34, 34)\" fill-opacity=\"1.00\"/></svg>",
  "viewBox": "0 0 16 16"
};