From 7dfff85a29e2175ab9049bbaea816af5ddc084e4 Mon Sep 17 00:00:00 2001 From: AtsushiM Date: Thu, 16 Jan 2025 10:07:11 +0900 Subject: [PATCH 1/6] =?UTF-8?q?chore:=20Icon=E7=94=9F=E6=88=90=E3=83=AD?= =?UTF-8?q?=E3=82=B8=E3=83=83=E3=82=AF=E3=82=92generateIcon=E3=81=AB?= =?UTF-8?q?=E7=B5=B1=E4=B8=80=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../smarthr-ui/src/components/Icon/Icon.tsx | 388 +++++++++--------- .../src/components/Icon/generateIcon.tsx | 4 +- 2 files changed, 195 insertions(+), 197 deletions(-) diff --git a/packages/smarthr-ui/src/components/Icon/Icon.tsx b/packages/smarthr-ui/src/components/Icon/Icon.tsx index 2e17c3cfa3..a07abc87d1 100644 --- a/packages/smarthr-ui/src/components/Icon/Icon.tsx +++ b/packages/smarthr-ui/src/components/Icon/Icon.tsx @@ -194,205 +194,205 @@ import { FaYenSign, } from 'react-icons/fa6' -import { createIcon } from './generateIcon' +import { generateIcon } from './generateIcon' -export const FaAddressBookIcon = /*#__PURE__*/ createIcon(FaAddressBook) -export const FaAddressCardIcon = /*#__PURE__*/ createIcon(FaAddressCard) -export const FaAngleDownIcon = /*#__PURE__*/ createIcon(FaAngleDown) -export const FaAngleLeftIcon = /*#__PURE__*/ createIcon(FaAngleLeft) -export const FaAngleRightIcon = /*#__PURE__*/ createIcon(FaAngleRight) -export const FaAngleUpIcon = /*#__PURE__*/ createIcon(FaAngleUp) -export const FaAnglesLeftIcon = /*#__PURE__*/ createIcon(FaAnglesLeft) -export const FaAnglesRightIcon = /*#__PURE__*/ createIcon(FaAnglesRight) -export const FaArrowDownIcon = /*#__PURE__*/ createIcon(FaArrowDown) -export const FaArrowDownWideShortIcon = /*#__PURE__*/ createIcon(FaArrowDownWideShort) -export const FaArrowLeftIcon = /*#__PURE__*/ createIcon(FaArrowLeft) -export const FaArrowRightIcon = /*#__PURE__*/ createIcon(FaArrowRight) -export const FaArrowRightArrowLeftIcon = /*#__PURE__*/ createIcon(FaArrowRightArrowLeft) -export const FaArrowRotateLeftIcon = /*#__PURE__*/ createIcon(FaArrowRotateLeft) -export const FaArrowRotateRightIcon = /*#__PURE__*/ createIcon(FaArrowRotateRight) -export const FaArrowUp19Icon = /*#__PURE__*/ createIcon(FaArrowUp19) -export const FaArrowUpIcon = /*#__PURE__*/ createIcon(FaArrowUp) -export const FaArrowUpWideShortIcon = /*#__PURE__*/ createIcon(FaArrowUpWideShort) -export const FaArrowsRotateIcon = /*#__PURE__*/ createIcon(FaArrowsRotate) -export const FaAsteriskIcon = /*#__PURE__*/ createIcon(FaAsterisk) -export const FaBabyCarriageIcon = /*#__PURE__*/ createIcon(FaBabyCarriage) -export const FaBanIcon = /*#__PURE__*/ createIcon(FaBan) -export const FaBarsIcon = /*#__PURE__*/ createIcon(FaBars) -export const FaBarsStaggeredIcon = /*#__PURE__*/ createIcon(FaBarsStaggered) -export const FaBellIcon = /*#__PURE__*/ createIcon(FaBell) -export const FaBellSlashIcon = /*#__PURE__*/ createIcon(FaBellSlash) -export const FaBoltIcon = /*#__PURE__*/ createIcon(FaBolt) -export const FaBookIcon = /*#__PURE__*/ createIcon(FaBook) -export const FaBookOpenIcon = /*#__PURE__*/ createIcon(FaBookOpen) -export const FaBoxArchiveIcon = /*#__PURE__*/ createIcon(FaBoxArchive) -export const FaBuildingIcon = /*#__PURE__*/ createIcon(FaBuilding) -export const FaBullhornIcon = /*#__PURE__*/ createIcon(FaBullhorn) -export const FaCakeCandlesIcon = /*#__PURE__*/ createIcon(FaCakeCandles) -export const FaCalculatorIcon = /*#__PURE__*/ createIcon(FaCalculator) -export const FaCalendarCheckIcon = /*#__PURE__*/ createIcon(FaCalendarCheck) -export const FaCalendarDaysIcon = /*#__PURE__*/ createIcon(FaCalendarDays) -export const FaCalendarXmarkIcon = /*#__PURE__*/ createIcon(FaCalendarXmark) -export const FaCaretDownIcon = /*#__PURE__*/ createIcon(FaCaretDown) -export const FaCaretLeftIcon = /*#__PURE__*/ createIcon(FaCaretLeft) -export const FaCaretRightIcon = /*#__PURE__*/ createIcon(FaCaretRight) -export const FaCaretUpIcon = /*#__PURE__*/ createIcon(FaCaretUp) -export const FaChartAreaIcon = /*#__PURE__*/ createIcon(FaChartArea) -export const FaChartBarIcon = /*#__PURE__*/ createIcon(FaChartBar) -export const FaChartColumnIcon = /*#__PURE__*/ createIcon(FaChartColumn) -export const FaChartLineIcon = /*#__PURE__*/ createIcon(FaChartLine) -export const FaChartPieIcon = /*#__PURE__*/ createIcon(FaChartPie) -export const FaCheckIcon = /*#__PURE__*/ createIcon(FaCheck) -export const FaChevronDownIcon = /*#__PURE__*/ createIcon(FaChevronDown) -export const FaChevronLeftIcon = /*#__PURE__*/ createIcon(FaChevronLeft) -export const FaChevronRightIcon = /*#__PURE__*/ createIcon(FaChevronRight) -export const FaCircleCheckIcon = /*#__PURE__*/ createIcon(FaCircleCheck) -export const FaCircleDotIcon = /*#__PURE__*/ createIcon(FaCircleDot) -export const FaCircleExclamationIcon = /*#__PURE__*/ createIcon(FaCircleExclamation) -export const FaCircleIcon = /*#__PURE__*/ createIcon(FaCircle) -export const FaCircleInfoIcon = /*#__PURE__*/ createIcon(FaCircleInfo) -export const FaCircleMinusIcon = /*#__PURE__*/ createIcon(FaCircleMinus) -export const FaCirclePlusIcon = /*#__PURE__*/ createIcon(FaCirclePlus) -export const FaCircleQuestionIcon = /*#__PURE__*/ createIcon(FaCircleQuestion) -export const FaCircleUserIcon = /*#__PURE__*/ createIcon(FaCircleUser) -export const FaCircleXmarkIcon = /*#__PURE__*/ createIcon(FaCircleXmark) -export const FaClipboardCheckIcon = /*#__PURE__*/ createIcon(FaClipboardCheck) -export const FaClipboardIcon = /*#__PURE__*/ createIcon(FaClipboard) -export const FaClipboardListIcon = /*#__PURE__*/ createIcon(FaClipboardList) -export const FaClockIcon = /*#__PURE__*/ createIcon(FaClock) -export const FaClockRotateLeftIcon = /*#__PURE__*/ createIcon(FaClockRotateLeft) -export const FaCloudArrowDownIcon = /*#__PURE__*/ createIcon(FaCloudArrowDown) -export const FaCloudArrowUpIcon = /*#__PURE__*/ createIcon(FaCloudArrowUp) -export const FaCodeIcon = /*#__PURE__*/ createIcon(FaCode) -export const FaCommentDotsIcon = /*#__PURE__*/ createIcon(FaCommentDots) -export const FaCommentIcon = /*#__PURE__*/ createIcon(FaComment) -export const FaCommentsIcon = /*#__PURE__*/ createIcon(FaComments) -export const FaCompressIcon = /*#__PURE__*/ createIcon(FaCompress) -export const FaCopyIcon = /*#__PURE__*/ createIcon(FaCopy) -export const FaCubeIcon = /*#__PURE__*/ createIcon(FaCube) -export const FaCubesIcon = /*#__PURE__*/ createIcon(FaCubes) -export const FaDatabaseIcon = /*#__PURE__*/ createIcon(FaDatabase) -export const FaDoorOpenIcon = /*#__PURE__*/ createIcon(FaDoorOpen) -export const FaDownLeftAndUpRightToCenterIcon = /*#__PURE__*/ createIcon( +export const FaAddressBookIcon = /*#__PURE__*/ generateIcon(FaAddressBook) +export const FaAddressCardIcon = /*#__PURE__*/ generateIcon(FaAddressCard) +export const FaAngleDownIcon = /*#__PURE__*/ generateIcon(FaAngleDown) +export const FaAngleLeftIcon = /*#__PURE__*/ generateIcon(FaAngleLeft) +export const FaAngleRightIcon = /*#__PURE__*/ generateIcon(FaAngleRight) +export const FaAngleUpIcon = /*#__PURE__*/ generateIcon(FaAngleUp) +export const FaAnglesLeftIcon = /*#__PURE__*/ generateIcon(FaAnglesLeft) +export const FaAnglesRightIcon = /*#__PURE__*/ generateIcon(FaAnglesRight) +export const FaArrowDownIcon = /*#__PURE__*/ generateIcon(FaArrowDown) +export const FaArrowDownWideShortIcon = /*#__PURE__*/ generateIcon(FaArrowDownWideShort) +export const FaArrowLeftIcon = /*#__PURE__*/ generateIcon(FaArrowLeft) +export const FaArrowRightIcon = /*#__PURE__*/ generateIcon(FaArrowRight) +export const FaArrowRightArrowLeftIcon = /*#__PURE__*/ generateIcon(FaArrowRightArrowLeft) +export const FaArrowRotateLeftIcon = /*#__PURE__*/ generateIcon(FaArrowRotateLeft) +export const FaArrowRotateRightIcon = /*#__PURE__*/ generateIcon(FaArrowRotateRight) +export const FaArrowUp19Icon = /*#__PURE__*/ generateIcon(FaArrowUp19) +export const FaArrowUpIcon = /*#__PURE__*/ generateIcon(FaArrowUp) +export const FaArrowUpWideShortIcon = /*#__PURE__*/ generateIcon(FaArrowUpWideShort) +export const FaArrowsRotateIcon = /*#__PURE__*/ generateIcon(FaArrowsRotate) +export const FaAsteriskIcon = /*#__PURE__*/ generateIcon(FaAsterisk) +export const FaBabyCarriageIcon = /*#__PURE__*/ generateIcon(FaBabyCarriage) +export const FaBanIcon = /*#__PURE__*/ generateIcon(FaBan) +export const FaBarsIcon = /*#__PURE__*/ generateIcon(FaBars) +export const FaBarsStaggeredIcon = /*#__PURE__*/ generateIcon(FaBarsStaggered) +export const FaBellIcon = /*#__PURE__*/ generateIcon(FaBell) +export const FaBellSlashIcon = /*#__PURE__*/ generateIcon(FaBellSlash) +export const FaBoltIcon = /*#__PURE__*/ generateIcon(FaBolt) +export const FaBookIcon = /*#__PURE__*/ generateIcon(FaBook) +export const FaBookOpenIcon = /*#__PURE__*/ generateIcon(FaBookOpen) +export const FaBoxArchiveIcon = /*#__PURE__*/ generateIcon(FaBoxArchive) +export const FaBuildingIcon = /*#__PURE__*/ generateIcon(FaBuilding) +export const FaBullhornIcon = /*#__PURE__*/ generateIcon(FaBullhorn) +export const FaCakeCandlesIcon = /*#__PURE__*/ generateIcon(FaCakeCandles) +export const FaCalculatorIcon = /*#__PURE__*/ generateIcon(FaCalculator) +export const FaCalendarCheckIcon = /*#__PURE__*/ generateIcon(FaCalendarCheck) +export const FaCalendarDaysIcon = /*#__PURE__*/ generateIcon(FaCalendarDays) +export const FaCalendarXmarkIcon = /*#__PURE__*/ generateIcon(FaCalendarXmark) +export const FaCaretDownIcon = /*#__PURE__*/ generateIcon(FaCaretDown) +export const FaCaretLeftIcon = /*#__PURE__*/ generateIcon(FaCaretLeft) +export const FaCaretRightIcon = /*#__PURE__*/ generateIcon(FaCaretRight) +export const FaCaretUpIcon = /*#__PURE__*/ generateIcon(FaCaretUp) +export const FaChartAreaIcon = /*#__PURE__*/ generateIcon(FaChartArea) +export const FaChartBarIcon = /*#__PURE__*/ generateIcon(FaChartBar) +export const FaChartColumnIcon = /*#__PURE__*/ generateIcon(FaChartColumn) +export const FaChartLineIcon = /*#__PURE__*/ generateIcon(FaChartLine) +export const FaChartPieIcon = /*#__PURE__*/ generateIcon(FaChartPie) +export const FaCheckIcon = /*#__PURE__*/ generateIcon(FaCheck) +export const FaChevronDownIcon = /*#__PURE__*/ generateIcon(FaChevronDown) +export const FaChevronLeftIcon = /*#__PURE__*/ generateIcon(FaChevronLeft) +export const FaChevronRightIcon = /*#__PURE__*/ generateIcon(FaChevronRight) +export const FaCircleCheckIcon = /*#__PURE__*/ generateIcon(FaCircleCheck) +export const FaCircleDotIcon = /*#__PURE__*/ generateIcon(FaCircleDot) +export const FaCircleExclamationIcon = /*#__PURE__*/ generateIcon(FaCircleExclamation) +export const FaCircleIcon = /*#__PURE__*/ generateIcon(FaCircle) +export const FaCircleInfoIcon = /*#__PURE__*/ generateIcon(FaCircleInfo) +export const FaCircleMinusIcon = /*#__PURE__*/ generateIcon(FaCircleMinus) +export const FaCirclePlusIcon = /*#__PURE__*/ generateIcon(FaCirclePlus) +export const FaCircleQuestionIcon = /*#__PURE__*/ generateIcon(FaCircleQuestion) +export const FaCircleUserIcon = /*#__PURE__*/ generateIcon(FaCircleUser) +export const FaCircleXmarkIcon = /*#__PURE__*/ generateIcon(FaCircleXmark) +export const FaClipboardCheckIcon = /*#__PURE__*/ generateIcon(FaClipboardCheck) +export const FaClipboardIcon = /*#__PURE__*/ generateIcon(FaClipboard) +export const FaClipboardListIcon = /*#__PURE__*/ generateIcon(FaClipboardList) +export const FaClockIcon = /*#__PURE__*/ generateIcon(FaClock) +export const FaClockRotateLeftIcon = /*#__PURE__*/ generateIcon(FaClockRotateLeft) +export const FaCloudArrowDownIcon = /*#__PURE__*/ generateIcon(FaCloudArrowDown) +export const FaCloudArrowUpIcon = /*#__PURE__*/ generateIcon(FaCloudArrowUp) +export const FaCodeIcon = /*#__PURE__*/ generateIcon(FaCode) +export const FaCommentDotsIcon = /*#__PURE__*/ generateIcon(FaCommentDots) +export const FaCommentIcon = /*#__PURE__*/ generateIcon(FaComment) +export const FaCommentsIcon = /*#__PURE__*/ generateIcon(FaComments) +export const FaCompressIcon = /*#__PURE__*/ generateIcon(FaCompress) +export const FaCopyIcon = /*#__PURE__*/ generateIcon(FaCopy) +export const FaCubeIcon = /*#__PURE__*/ generateIcon(FaCube) +export const FaCubesIcon = /*#__PURE__*/ generateIcon(FaCubes) +export const FaDatabaseIcon = /*#__PURE__*/ generateIcon(FaDatabase) +export const FaDoorOpenIcon = /*#__PURE__*/ generateIcon(FaDoorOpen) +export const FaDownLeftAndUpRightToCenterIcon = /*#__PURE__*/ generateIcon( FaDownLeftAndUpRightToCenter, ) -export const FaEllipsisIcon = /*#__PURE__*/ createIcon(FaEllipsis) -export const FaEllipsisVerticalIcon = /*#__PURE__*/ createIcon(FaEllipsisVertical) -export const FaEnvelopeIcon = /*#__PURE__*/ createIcon(FaEnvelope) -export const FaEnvelopeOpenIcon = /*#__PURE__*/ createIcon(FaEnvelopeOpen) -export const FaExpandIcon = /*#__PURE__*/ createIcon(FaExpand) -export const FaEyeIcon = /*#__PURE__*/ createIcon(FaEye) -export const FaEyeSlashIcon = /*#__PURE__*/ createIcon(FaEyeSlash) -export const FaFileArrowDownIcon = /*#__PURE__*/ createIcon(FaFileArrowDown) -export const FaFileCodeIcon = /*#__PURE__*/ createIcon(FaFileCode) -export const FaFileCsvIcon = /*#__PURE__*/ createIcon(FaFileCsv) -export const FaFileExcelIcon = /*#__PURE__*/ createIcon(FaFileExcel) -export const FaFileExportIcon = /*#__PURE__*/ createIcon(FaFileExport) -export const FaFileIcon = /*#__PURE__*/ createIcon(FaFile) -export const FaFileLinesIcon = /*#__PURE__*/ createIcon(FaFileLines) -export const FaFilePdfIcon = /*#__PURE__*/ createIcon(FaFilePdf) -export const FaFilePowerpointIcon = /*#__PURE__*/ createIcon(FaFilePowerpoint) -export const FaFileWordIcon = /*#__PURE__*/ createIcon(FaFileWord) -export const FaFilterIcon = /*#__PURE__*/ createIcon(FaFilter) -export const FaFloppyDiskIcon = /*#__PURE__*/ createIcon(FaFloppyDisk) -export const FaFolderIcon = /*#__PURE__*/ createIcon(FaFolder) -export const FaFolderOpenIcon = /*#__PURE__*/ createIcon(FaFolderOpen) -export const FaFolderPlusIcon = /*#__PURE__*/ createIcon(FaFolderPlus) -export const FaFontIcon = /*#__PURE__*/ createIcon(FaFont) -export const FaGaugeIcon = /*#__PURE__*/ createIcon(FaGauge) -export const FaGearIcon = /*#__PURE__*/ createIcon(FaGear) -export const FaGearsIcon = /*#__PURE__*/ createIcon(FaGears) -export const FaGlobeIcon = /*#__PURE__*/ createIcon(FaGlobe) -export const FaGraduationCapIcon = /*#__PURE__*/ createIcon(FaGraduationCap) -export const FaGripIcon = /*#__PURE__*/ createIcon(FaGrip) -export const FaGripLinesIcon = /*#__PURE__*/ createIcon(FaGripLines) -export const FaGripLinesVerticalIcon = /*#__PURE__*/ createIcon(FaGripLinesVertical) -export const FaGripVerticalIcon = /*#__PURE__*/ createIcon(FaGripVertical) -export const FaHourglassHalfIcon = /*#__PURE__*/ createIcon(FaHourglassHalf) -export const FaHouseIcon = /*#__PURE__*/ createIcon(FaHouse) -export const FaIdBadgeIcon = /*#__PURE__*/ createIcon(FaIdBadge) -export const FaIdCardIcon = /*#__PURE__*/ createIcon(FaIdCard) -export const FaImageIcon = /*#__PURE__*/ createIcon(FaImage) -export const FaInboxIcon = /*#__PURE__*/ createIcon(FaInbox) -export const FaIntercomIcon = /*#__PURE__*/ createIcon(FaIntercom) -export const FaKeyIcon = /*#__PURE__*/ createIcon(FaKey) -export const FaLeftLongIcon = /*#__PURE__*/ createIcon(FaLeftLong) -export const FaLeftRightIcon = /*#__PURE__*/ createIcon(FaLeftRight) -export const FaLightbulbIcon = /*#__PURE__*/ createIcon(FaLightbulb) -export const FaLinkIcon = /*#__PURE__*/ createIcon(FaLink) -export const FaListIcon = /*#__PURE__*/ createIcon(FaList) -export const FaListOlIcon = /*#__PURE__*/ createIcon(FaListOl) -export const FaListUlIcon = /*#__PURE__*/ createIcon(FaListUl) -export const FaLockIcon = /*#__PURE__*/ createIcon(FaLock) -export const FaLockOpenIcon = /*#__PURE__*/ createIcon(FaLockOpen) -export const FaMagnifyingGlassIcon = /*#__PURE__*/ createIcon(FaMagnifyingGlass) -export const FaMagnifyingGlassMinusIcon = /*#__PURE__*/ createIcon(FaMagnifyingGlassMinus) -export const FaMagnifyingGlassPlusIcon = /*#__PURE__*/ createIcon(FaMagnifyingGlassPlus) -export const FaMessageIcon = /*#__PURE__*/ createIcon(FaMessage) -export const FaMinusIcon = /*#__PURE__*/ createIcon(FaMinus) -export const FaMoneyCheckDollarIcon = /*#__PURE__*/ createIcon(FaMoneyCheckDollar) -export const FaPaintbrushIcon = /*#__PURE__*/ createIcon(FaPaintbrush) -export const FaPaperPlaneIcon = /*#__PURE__*/ createIcon(FaPaperPlane) -export const FaPaperclipIcon = /*#__PURE__*/ createIcon(FaPaperclip) -export const FaPenIcon = /*#__PURE__*/ createIcon(FaPen) -export const FaPenToSquareIcon = /*#__PURE__*/ createIcon(FaPenToSquare) -export const FaPencilIcon = /*#__PURE__*/ createIcon(FaPencil) -export const FaPiggyBankIcon = /*#__PURE__*/ createIcon(FaPiggyBank) -export const FaPlusIcon = /*#__PURE__*/ createIcon(FaPlus) -export const FaPowerOffIcon = /*#__PURE__*/ createIcon(FaPowerOff) -export const FaPrintIcon = /*#__PURE__*/ createIcon(FaPrint) -export const FaRegCircleQuestionIcon = /*#__PURE__*/ createIcon(FaRegCircleQuestion) -export const FaRegLightbulbIcon = /*#__PURE__*/ createIcon(FaRegLightbulb) -export const FaReplyIcon = /*#__PURE__*/ createIcon(FaReply) -export const FaRightFromBracketIcon = /*#__PURE__*/ createIcon(FaRightFromBracket) -export const FaRightLeftIcon = /*#__PURE__*/ createIcon(FaRightLeft) -export const FaRightLongIcon = /*#__PURE__*/ createIcon(FaRightLong) -export const FaRightToBracketIcon = /*#__PURE__*/ createIcon(FaRightToBracket) -export const FaRobotIcon = /*#__PURE__*/ createIcon(FaRobot) -export const FaRocketIcon = /*#__PURE__*/ createIcon(FaRocket) -export const FaRotateIcon = /*#__PURE__*/ createIcon(FaRotate) -export const FaRotateLeftIcon = /*#__PURE__*/ createIcon(FaRotateLeft) -export const FaShareNodesIcon = /*#__PURE__*/ createIcon(FaShareNodes) -export const FaShieldHalvedIcon = /*#__PURE__*/ createIcon(FaShieldHalved) -export const FaSlidersIcon = /*#__PURE__*/ createIcon(FaSliders) -export const FaSortDownIcon = /*#__PURE__*/ createIcon(FaSortDown) -export const FaSortIcon = /*#__PURE__*/ createIcon(FaSort) -export const FaSortUpIcon = /*#__PURE__*/ createIcon(FaSortUp) -export const FaSquareCheckIcon = /*#__PURE__*/ createIcon(FaSquareCheck) -export const FaSquareMinusIcon = /*#__PURE__*/ createIcon(FaSquareMinus) -export const FaSquarePlusIcon = /*#__PURE__*/ createIcon(FaSquarePlus) -export const FaSquarePollVerticalIcon = /*#__PURE__*/ createIcon(FaSquarePollVertical) -export const FaStarIcon = /*#__PURE__*/ createIcon(FaStar) -export const FaSuitcaseMedicalIcon = /*#__PURE__*/ createIcon(FaSuitcaseMedical) -export const FaTableIcon = /*#__PURE__*/ createIcon(FaTable) -export const FaTableListIcon = /*#__PURE__*/ createIcon(FaTableList) -export const FaTableColumnsIcon = /*#__PURE__*/ createIcon(FaTableColumns) -export const FaTagIcon = /*#__PURE__*/ createIcon(FaTag) -export const FaTagsIcon = /*#__PURE__*/ createIcon(FaTags) -export const FaThumbtackIcon = /*#__PURE__*/ createIcon(FaThumbtack) -export const FaToolboxIcon = /*#__PURE__*/ createIcon(FaToolbox) -export const FaTrashCanIcon = /*#__PURE__*/ createIcon(FaTrashCan) -export const FaTrashIcon = /*#__PURE__*/ createIcon(FaTrash) -export const FaTriangleExclamationIcon = /*#__PURE__*/ createIcon(FaTriangleExclamation) -export const FaTruckIcon = /*#__PURE__*/ createIcon(FaTruck) -export const FaTruckRampBoxIcon = /*#__PURE__*/ createIcon(FaTruckRampBox) -export const FaUpDownIcon = /*#__PURE__*/ createIcon(FaUpDown) -export const FaUpRightAndDownLeftFromCenterIcon = /*#__PURE__*/ createIcon( +export const FaEllipsisIcon = /*#__PURE__*/ generateIcon(FaEllipsis) +export const FaEllipsisVerticalIcon = /*#__PURE__*/ generateIcon(FaEllipsisVertical) +export const FaEnvelopeIcon = /*#__PURE__*/ generateIcon(FaEnvelope) +export const FaEnvelopeOpenIcon = /*#__PURE__*/ generateIcon(FaEnvelopeOpen) +export const FaExpandIcon = /*#__PURE__*/ generateIcon(FaExpand) +export const FaEyeIcon = /*#__PURE__*/ generateIcon(FaEye) +export const FaEyeSlashIcon = /*#__PURE__*/ generateIcon(FaEyeSlash) +export const FaFileArrowDownIcon = /*#__PURE__*/ generateIcon(FaFileArrowDown) +export const FaFileCodeIcon = /*#__PURE__*/ generateIcon(FaFileCode) +export const FaFileCsvIcon = /*#__PURE__*/ generateIcon(FaFileCsv) +export const FaFileExcelIcon = /*#__PURE__*/ generateIcon(FaFileExcel) +export const FaFileExportIcon = /*#__PURE__*/ generateIcon(FaFileExport) +export const FaFileIcon = /*#__PURE__*/ generateIcon(FaFile) +export const FaFileLinesIcon = /*#__PURE__*/ generateIcon(FaFileLines) +export const FaFilePdfIcon = /*#__PURE__*/ generateIcon(FaFilePdf) +export const FaFilePowerpointIcon = /*#__PURE__*/ generateIcon(FaFilePowerpoint) +export const FaFileWordIcon = /*#__PURE__*/ generateIcon(FaFileWord) +export const FaFilterIcon = /*#__PURE__*/ generateIcon(FaFilter) +export const FaFloppyDiskIcon = /*#__PURE__*/ generateIcon(FaFloppyDisk) +export const FaFolderIcon = /*#__PURE__*/ generateIcon(FaFolder) +export const FaFolderOpenIcon = /*#__PURE__*/ generateIcon(FaFolderOpen) +export const FaFolderPlusIcon = /*#__PURE__*/ generateIcon(FaFolderPlus) +export const FaFontIcon = /*#__PURE__*/ generateIcon(FaFont) +export const FaGaugeIcon = /*#__PURE__*/ generateIcon(FaGauge) +export const FaGearIcon = /*#__PURE__*/ generateIcon(FaGear) +export const FaGearsIcon = /*#__PURE__*/ generateIcon(FaGears) +export const FaGlobeIcon = /*#__PURE__*/ generateIcon(FaGlobe) +export const FaGraduationCapIcon = /*#__PURE__*/ generateIcon(FaGraduationCap) +export const FaGripIcon = /*#__PURE__*/ generateIcon(FaGrip) +export const FaGripLinesIcon = /*#__PURE__*/ generateIcon(FaGripLines) +export const FaGripLinesVerticalIcon = /*#__PURE__*/ generateIcon(FaGripLinesVertical) +export const FaGripVerticalIcon = /*#__PURE__*/ generateIcon(FaGripVertical) +export const FaHourglassHalfIcon = /*#__PURE__*/ generateIcon(FaHourglassHalf) +export const FaHouseIcon = /*#__PURE__*/ generateIcon(FaHouse) +export const FaIdBadgeIcon = /*#__PURE__*/ generateIcon(FaIdBadge) +export const FaIdCardIcon = /*#__PURE__*/ generateIcon(FaIdCard) +export const FaImageIcon = /*#__PURE__*/ generateIcon(FaImage) +export const FaInboxIcon = /*#__PURE__*/ generateIcon(FaInbox) +export const FaIntercomIcon = /*#__PURE__*/ generateIcon(FaIntercom) +export const FaKeyIcon = /*#__PURE__*/ generateIcon(FaKey) +export const FaLeftLongIcon = /*#__PURE__*/ generateIcon(FaLeftLong) +export const FaLeftRightIcon = /*#__PURE__*/ generateIcon(FaLeftRight) +export const FaLightbulbIcon = /*#__PURE__*/ generateIcon(FaLightbulb) +export const FaLinkIcon = /*#__PURE__*/ generateIcon(FaLink) +export const FaListIcon = /*#__PURE__*/ generateIcon(FaList) +export const FaListOlIcon = /*#__PURE__*/ generateIcon(FaListOl) +export const FaListUlIcon = /*#__PURE__*/ generateIcon(FaListUl) +export const FaLockIcon = /*#__PURE__*/ generateIcon(FaLock) +export const FaLockOpenIcon = /*#__PURE__*/ generateIcon(FaLockOpen) +export const FaMagnifyingGlassIcon = /*#__PURE__*/ generateIcon(FaMagnifyingGlass) +export const FaMagnifyingGlassMinusIcon = /*#__PURE__*/ generateIcon(FaMagnifyingGlassMinus) +export const FaMagnifyingGlassPlusIcon = /*#__PURE__*/ generateIcon(FaMagnifyingGlassPlus) +export const FaMessageIcon = /*#__PURE__*/ generateIcon(FaMessage) +export const FaMinusIcon = /*#__PURE__*/ generateIcon(FaMinus) +export const FaMoneyCheckDollarIcon = /*#__PURE__*/ generateIcon(FaMoneyCheckDollar) +export const FaPaintbrushIcon = /*#__PURE__*/ generateIcon(FaPaintbrush) +export const FaPaperPlaneIcon = /*#__PURE__*/ generateIcon(FaPaperPlane) +export const FaPaperclipIcon = /*#__PURE__*/ generateIcon(FaPaperclip) +export const FaPenIcon = /*#__PURE__*/ generateIcon(FaPen) +export const FaPenToSquareIcon = /*#__PURE__*/ generateIcon(FaPenToSquare) +export const FaPencilIcon = /*#__PURE__*/ generateIcon(FaPencil) +export const FaPiggyBankIcon = /*#__PURE__*/ generateIcon(FaPiggyBank) +export const FaPlusIcon = /*#__PURE__*/ generateIcon(FaPlus) +export const FaPowerOffIcon = /*#__PURE__*/ generateIcon(FaPowerOff) +export const FaPrintIcon = /*#__PURE__*/ generateIcon(FaPrint) +export const FaRegCircleQuestionIcon = /*#__PURE__*/ generateIcon(FaRegCircleQuestion) +export const FaRegLightbulbIcon = /*#__PURE__*/ generateIcon(FaRegLightbulb) +export const FaReplyIcon = /*#__PURE__*/ generateIcon(FaReply) +export const FaRightFromBracketIcon = /*#__PURE__*/ generateIcon(FaRightFromBracket) +export const FaRightLeftIcon = /*#__PURE__*/ generateIcon(FaRightLeft) +export const FaRightLongIcon = /*#__PURE__*/ generateIcon(FaRightLong) +export const FaRightToBracketIcon = /*#__PURE__*/ generateIcon(FaRightToBracket) +export const FaRobotIcon = /*#__PURE__*/ generateIcon(FaRobot) +export const FaRocketIcon = /*#__PURE__*/ generateIcon(FaRocket) +export const FaRotateIcon = /*#__PURE__*/ generateIcon(FaRotate) +export const FaRotateLeftIcon = /*#__PURE__*/ generateIcon(FaRotateLeft) +export const FaShareNodesIcon = /*#__PURE__*/ generateIcon(FaShareNodes) +export const FaShieldHalvedIcon = /*#__PURE__*/ generateIcon(FaShieldHalved) +export const FaSlidersIcon = /*#__PURE__*/ generateIcon(FaSliders) +export const FaSortDownIcon = /*#__PURE__*/ generateIcon(FaSortDown) +export const FaSortIcon = /*#__PURE__*/ generateIcon(FaSort) +export const FaSortUpIcon = /*#__PURE__*/ generateIcon(FaSortUp) +export const FaSquareCheckIcon = /*#__PURE__*/ generateIcon(FaSquareCheck) +export const FaSquareMinusIcon = /*#__PURE__*/ generateIcon(FaSquareMinus) +export const FaSquarePlusIcon = /*#__PURE__*/ generateIcon(FaSquarePlus) +export const FaSquarePollVerticalIcon = /*#__PURE__*/ generateIcon(FaSquarePollVertical) +export const FaStarIcon = /*#__PURE__*/ generateIcon(FaStar) +export const FaSuitcaseMedicalIcon = /*#__PURE__*/ generateIcon(FaSuitcaseMedical) +export const FaTableIcon = /*#__PURE__*/ generateIcon(FaTable) +export const FaTableListIcon = /*#__PURE__*/ generateIcon(FaTableList) +export const FaTableColumnsIcon = /*#__PURE__*/ generateIcon(FaTableColumns) +export const FaTagIcon = /*#__PURE__*/ generateIcon(FaTag) +export const FaTagsIcon = /*#__PURE__*/ generateIcon(FaTags) +export const FaThumbtackIcon = /*#__PURE__*/ generateIcon(FaThumbtack) +export const FaToolboxIcon = /*#__PURE__*/ generateIcon(FaToolbox) +export const FaTrashCanIcon = /*#__PURE__*/ generateIcon(FaTrashCan) +export const FaTrashIcon = /*#__PURE__*/ generateIcon(FaTrash) +export const FaTriangleExclamationIcon = /*#__PURE__*/ generateIcon(FaTriangleExclamation) +export const FaTruckIcon = /*#__PURE__*/ generateIcon(FaTruck) +export const FaTruckRampBoxIcon = /*#__PURE__*/ generateIcon(FaTruckRampBox) +export const FaUpDownIcon = /*#__PURE__*/ generateIcon(FaUpDown) +export const FaUpRightAndDownLeftFromCenterIcon = /*#__PURE__*/ generateIcon( FaUpRightAndDownLeftFromCenter, ) -export const FaUpRightFromSquareIcon = /*#__PURE__*/ createIcon(FaUpRightFromSquare) -export const FaUserCheckIcon = /*#__PURE__*/ createIcon(FaUserCheck) -export const FaUserClockIcon = /*#__PURE__*/ createIcon(FaUserClock) -export const FaUserIcon = /*#__PURE__*/ createIcon(FaUser) -export const FaUserLargeIcon = /*#__PURE__*/ createIcon(FaUserLarge) -export const FaUserPenIcon = /*#__PURE__*/ createIcon(FaUserPen) -export const FaUserPlusIcon = /*#__PURE__*/ createIcon(FaUserPlus) -export const FaUsersIcon = /*#__PURE__*/ createIcon(FaUsers) -export const FaWindowMaximizeIcon = /*#__PURE__*/ createIcon(FaWindowMaximize) -export const FaWindowMinimizeIcon = /*#__PURE__*/ createIcon(FaWindowMinimize) -export const FaWindowRestoreIcon = /*#__PURE__*/ createIcon(FaWindowRestore) -export const FaXmarkIcon = /*#__PURE__*/ createIcon(FaXmark) -export const FaYenSignIcon = /*#__PURE__*/ createIcon(FaYenSign) +export const FaUpRightFromSquareIcon = /*#__PURE__*/ generateIcon(FaUpRightFromSquare) +export const FaUserCheckIcon = /*#__PURE__*/ generateIcon(FaUserCheck) +export const FaUserClockIcon = /*#__PURE__*/ generateIcon(FaUserClock) +export const FaUserIcon = /*#__PURE__*/ generateIcon(FaUser) +export const FaUserLargeIcon = /*#__PURE__*/ generateIcon(FaUserLarge) +export const FaUserPenIcon = /*#__PURE__*/ generateIcon(FaUserPen) +export const FaUserPlusIcon = /*#__PURE__*/ generateIcon(FaUserPlus) +export const FaUsersIcon = /*#__PURE__*/ generateIcon(FaUsers) +export const FaWindowMaximizeIcon = /*#__PURE__*/ generateIcon(FaWindowMaximize) +export const FaWindowMinimizeIcon = /*#__PURE__*/ generateIcon(FaWindowMinimize) +export const FaWindowRestoreIcon = /*#__PURE__*/ generateIcon(FaWindowRestore) +export const FaXmarkIcon = /*#__PURE__*/ generateIcon(FaXmark) +export const FaYenSignIcon = /*#__PURE__*/ generateIcon(FaYenSign) export { WarningIcon } from './WarningIcon' export { SparklesIcon } from './SparklesIcon' diff --git a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx index f161870da2..3dcc914139 100644 --- a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx +++ b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx @@ -14,8 +14,6 @@ import { VisuallyHiddenText } from '../VisuallyHiddenText' */ type LiteralUnion = T | (U & Record) -export const generateIcon = (svg: IconType) => createIcon(svg) - export const colorSet = { TEXT_BLACK: 'black', TEXT_WHITE: 'white', @@ -113,7 +111,7 @@ const wrapper = tv({ }, }) -export const createIcon = (SvgIcon: IconType) => { +export const generateIcon = (SvgIcon: IconType) => { const Icon: React.FC = ({ color, className, From 4842505d5c009526c16fb89da6092f165b8eef2f Mon Sep 17 00:00:00 2001 From: AtsushiM Date: Thu, 16 Jan 2025 10:10:35 +0900 Subject: [PATCH 2/6] =?UTF-8?q?chore:=20Icon=E3=81=AEright=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E3=81=AE=E4=B8=8D=E8=A6=81=E3=81=AA=E5=88=9D=E6=9C=9F?= =?UTF-8?q?=E5=8C=96=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/smarthr-ui/src/components/Icon/generateIcon.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx index 3dcc914139..63686abb54 100644 --- a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx +++ b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx @@ -121,7 +121,7 @@ export const generateIcon = (SvgIcon: IconType) => { focusable = false, text, iconGap = 0.25, - right = false, + right, size, ...props }) => { From 432a13bfa086b55f86e44ea2fb6f2d7ba40d1e5f Mon Sep 17 00:00:00 2001 From: AtsushiM Date: Thu, 16 Jan 2025 10:13:06 +0900 Subject: [PATCH 3/6] =?UTF-8?q?chore:=20Icon=E3=81=AF=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E3=81=8C=E5=A4=89=E3=82=8F=E3=82=8B=E5=8F=AF=E8=83=BD=E6=80=A7?= =?UTF-8?q?=E3=81=8C=E4=BD=8E=E3=81=84=E3=81=9F=E3=82=81=E3=80=81=E4=B8=B8?= =?UTF-8?q?=E3=81=94=E3=81=A8memo=E5=8C=96=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/smarthr-ui/src/components/Icon/generateIcon.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx index 63686abb54..30cb98be9c 100644 --- a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx +++ b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx @@ -112,7 +112,7 @@ const wrapper = tv({ }) export const generateIcon = (SvgIcon: IconType) => { - const Icon: React.FC = ({ + const Icon = React.memo(({ color, className, role = 'img', @@ -183,7 +183,7 @@ export const generateIcon = (SvgIcon: IconType) => { {svgIcon} ) - } + }) Icon.displayName = SvgIcon.name From d3057675381fab8c695048f6e0a4c5aa7a49bb14 Mon Sep 17 00:00:00 2001 From: AtsushiM Date: Thu, 16 Jan 2025 10:15:01 +0900 Subject: [PATCH 4/6] =?UTF-8?q?chore:=20Icon=E3=81=AEalt=E3=81=AB=E9=96=A2?= =?UTF-8?q?=E3=81=99=E3=82=8B=E5=87=A6=E7=90=86=E3=82=92=E5=85=B1=E9=80=9A?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Icon/generateIcon.tsx | 133 +++++++++--------- 1 file changed, 68 insertions(+), 65 deletions(-) diff --git a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx index 30cb98be9c..f07ed8b2af 100644 --- a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx +++ b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx @@ -112,78 +112,81 @@ const wrapper = tv({ }) export const generateIcon = (SvgIcon: IconType) => { - const Icon = React.memo(({ - color, - className, - role = 'img', - alt, - 'aria-hidden': ariaHidden, - focusable = false, - text, - iconGap = 0.25, - right, - size, - ...props - }) => { - const hasLabelByAria = - props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined - const isAriaHidden = ariaHidden !== undefined ? ariaHidden : !hasLabelByAria - - const iconStyle = useMemo(() => icon({ className }), [className]) - const wrapperStyle = useMemo(() => wrapper({ gap: iconGap }), [iconGap]) - - const replacedColor = useMemo(() => { - if (color && existsColor(color)) { - const colorName = colorSet[color] - - if (colorName in textColor) { - return textColor[colorName as keyof typeof textColor] + const Icon = React.memo( + ({ + color, + className, + role = 'img', + alt, + 'aria-hidden': ariaHidden, + focusable = false, + text, + iconGap = 0.25, + right, + size, + ...props + }) => { + const hasLabelByAria = + props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined + const isAriaHidden = ariaHidden !== undefined ? ariaHidden : !hasLabelByAria + + const iconStyle = useMemo(() => icon({ className }), [className]) + const wrapperStyle = useMemo(() => wrapper({ gap: iconGap }), [iconGap]) + + const replacedColor = useMemo(() => { + if (color && existsColor(color)) { + const colorName = colorSet[color] + + if (colorName in textColor) { + return textColor[colorName as keyof typeof textColor] + } + + return colors[colorName as keyof typeof colors] } - return colors[colorName as keyof typeof colors] + return color + }, [color]) + + const existsText = !!text + const iconSize = size ? fontSize[fontSizeMap[size]] : '1em' // 指定がない場合は親要素のフォントサイズを継承する + const svgIcon = ( + + ) + const visuallyHiddenAlt = alt && {alt} + + if (existsText) { + return ( + + {right && text} + {visuallyHiddenAlt} + {svgIcon} + {!right && text} + + ) } - return color - }, [color]) - - const existsText = !!text - const iconSize = size ? fontSize[fontSizeMap[size]] : '1em' // 指定がない場合は親要素のフォントサイズを継承する - const svgIcon = ( - - ) - - if (existsText) { return ( - - {alt && {alt}} - {right && text} + <> + {visuallyHiddenAlt} {svgIcon} - {!right && text} - + ) - } - - return ( - <> - {alt && {alt}} - {svgIcon} - - ) - }) + }, + ) Icon.displayName = SvgIcon.name From 87f8a6ae60ec31f05fcb6e7891f2dc55ea4e27a9 Mon Sep 17 00:00:00 2001 From: AtsushiM Date: Thu, 16 Jan 2025 10:29:41 +0900 Subject: [PATCH 5/6] =?UTF-8?q?chore:=20Icon=E3=81=AEaria-hidden=E3=81=AE?= =?UTF-8?q?=E7=94=9F=E6=88=90=E3=83=AD=E3=82=B8=E3=83=83=E3=82=AF=E3=82=92?= =?UTF-8?q?=E9=9B=86=E7=B4=84=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Icon/generateIcon.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx index f07ed8b2af..53d3649d38 100644 --- a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx +++ b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx @@ -126,9 +126,20 @@ export const generateIcon = (SvgIcon: IconType) => { size, ...props }) => { - const hasLabelByAria = - props['aria-label'] !== undefined || props['aria-labelledby'] !== undefined - const isAriaHidden = ariaHidden !== undefined ? ariaHidden : !hasLabelByAria + const actualAriaHidden = useMemo(() => { + if (ariaHidden !== undefined) { + return ariaHidden + } + + if ( + alt !== undefined || + (props['aria-label'] === undefined && props['aria-labelledby'] === undefined) + ) { + return true + } + + return undefined + }, [ariaHidden, alt, props['aria-label'], props['aria-labelledby']]) const iconStyle = useMemo(() => icon({ className }), [className]) const wrapperStyle = useMemo(() => wrapper({ gap: iconGap }), [iconGap]) @@ -162,7 +173,7 @@ export const generateIcon = (SvgIcon: IconType) => { color={replacedColor} className={iconStyle} role={role} - aria-hidden={isAriaHidden || alt !== undefined || undefined} + aria-hidden={actualAriaHidden} focusable={focusable} /> ) From b1c024c447cf15be3cf331b7268adc436d649b08 Mon Sep 17 00:00:00 2001 From: AtsushiM Date: Thu, 16 Jan 2025 10:31:12 +0900 Subject: [PATCH 6/6] =?UTF-8?q?chore:=20Icon=E5=86=85=E3=81=AEexistsText?= =?UTF-8?q?=E3=81=AF=E4=B8=8D=E5=BF=85=E8=A6=81=E3=81=AA=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=81=A0=E3=81=A3=E3=81=9F=E3=81=9F=E3=82=81=E3=80=81=E8=AA=BF?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/smarthr-ui/src/components/Icon/generateIcon.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx index 53d3649d38..674f591e60 100644 --- a/packages/smarthr-ui/src/components/Icon/generateIcon.tsx +++ b/packages/smarthr-ui/src/components/Icon/generateIcon.tsx @@ -158,7 +158,6 @@ export const generateIcon = (SvgIcon: IconType) => { return color }, [color]) - const existsText = !!text const iconSize = size ? fontSize[fontSizeMap[size]] : '1em' // 指定がない場合は親要素のフォントサイズを継承する const svgIcon = ( { ) const visuallyHiddenAlt = alt && {alt} - if (existsText) { + if (text) { return ( {right && text}