@leafygreen-ui/icon 14.7.1 → 14.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/esm/AIModel.js.map +1 -1
- package/dist/esm/ActivityFeed.js.map +1 -1
- package/dist/esm/AddFile.js.map +1 -1
- package/dist/esm/AllProducts.js.map +1 -1
- package/dist/esm/AnalyticsNode.js.map +1 -1
- package/dist/esm/Apps.js.map +1 -1
- package/dist/esm/Array.js.map +1 -1
- package/dist/esm/ArrowDown.js.map +1 -1
- package/dist/esm/ArrowLeft.js.map +1 -1
- package/dist/esm/ArrowRight.js.map +1 -1
- package/dist/esm/ArrowUp.js.map +1 -1
- package/dist/esm/Award.js.map +1 -1
- package/dist/esm/Beaker.js.map +1 -1
- package/dist/esm/Bell.js.map +1 -1
- package/dist/esm/Biometric.js.map +1 -1
- package/dist/esm/Boolean.js.map +1 -1
- package/dist/esm/Building.js.map +1 -1
- package/dist/esm/Bulb.js.map +1 -1
- package/dist/esm/Calendar.js.map +1 -1
- package/dist/esm/Camera.js.map +1 -1
- package/dist/esm/Cap.js.map +1 -1
- package/dist/esm/CaretDown.js.map +1 -1
- package/dist/esm/CaretLeft.js.map +1 -1
- package/dist/esm/CaretRight.js.map +1 -1
- package/dist/esm/CaretUp.js.map +1 -1
- package/dist/esm/ChartFilled.js.map +1 -1
- package/dist/esm/Charts.js.map +1 -1
- package/dist/esm/Checkmark.js.map +1 -1
- package/dist/esm/CheckmarkWithCircle.js.map +1 -1
- package/dist/esm/ChevronDown.js.map +1 -1
- package/dist/esm/ChevronLeft.js.map +1 -1
- package/dist/esm/ChevronRight.js.map +1 -1
- package/dist/esm/ChevronUp.js.map +1 -1
- package/dist/esm/Circle.js.map +1 -1
- package/dist/esm/Clock.js.map +1 -1
- package/dist/esm/ClockWithArrow.js.map +1 -1
- package/dist/esm/Clone.js.map +1 -1
- package/dist/esm/Cloud.js.map +1 -1
- package/dist/esm/Code.js.map +1 -1
- package/dist/esm/CodeBlock.js.map +1 -1
- package/dist/esm/Coin.js.map +1 -1
- package/dist/esm/Colon.js.map +1 -1
- package/dist/esm/Config.js.map +1 -1
- package/dist/esm/Connect.js.map +1 -1
- package/dist/esm/Copy.js.map +1 -1
- package/dist/esm/CreditCard.js.map +1 -1
- package/dist/esm/CurlyBraces.js.map +1 -1
- package/dist/esm/Cursor.js.map +1 -1
- package/dist/esm/Dashboard.js.map +1 -1
- package/dist/esm/Database.js.map +1 -1
- package/dist/esm/Diagram.js.map +1 -1
- package/dist/esm/Diagram2.js.map +1 -1
- package/dist/esm/Diagram3.js.map +1 -1
- package/dist/esm/Disconnect.js.map +1 -1
- package/dist/esm/Download.js.map +1 -1
- package/dist/esm/Drag.js.map +1 -1
- package/dist/esm/Edit.js.map +1 -1
- package/dist/esm/Ellipsis.js.map +1 -1
- package/dist/esm/Email.js.map +1 -1
- package/dist/esm/EmptyDatabase.js.map +1 -1
- package/dist/esm/EmptyFolder.js.map +1 -1
- package/dist/esm/Eraser.js.map +1 -1
- package/dist/esm/Escalation.js.map +1 -1
- package/dist/esm/Export.js.map +1 -1
- package/dist/esm/Favorite.js.map +1 -1
- package/dist/esm/Federation.js.map +1 -1
- package/dist/esm/File.js.map +1 -1
- package/dist/esm/Filter.js.map +1 -1
- package/dist/esm/Folder.js.map +1 -1
- package/dist/esm/Format.js.map +1 -1
- package/dist/esm/FullScreenEnter.js.map +1 -1
- package/dist/esm/FullScreenExit.js.map +1 -1
- package/dist/esm/Function.js.map +1 -1
- package/dist/esm/Gauge.js.map +1 -1
- package/dist/esm/GlobeAmericas.js.map +1 -1
- package/dist/esm/GovernmentBuilding.js.map +1 -1
- package/dist/esm/Guide.js.map +1 -1
- package/dist/esm/Hash.js.map +1 -1
- package/dist/esm/HiddenSecondaryNode.js.map +1 -1
- package/dist/esm/Highlight.js.map +1 -1
- package/dist/esm/Home.js.map +1 -1
- package/dist/esm/HorizontalDrag.js.map +1 -1
- package/dist/esm/Import.js.map +1 -1
- package/dist/esm/ImportantWithCircle.js.map +1 -1
- package/dist/esm/InfoWithCircle.js.map +1 -1
- package/dist/esm/InternalEmployee.js.map +1 -1
- package/dist/esm/InviteUser.js.map +1 -1
- package/dist/esm/Key.js.map +1 -1
- package/dist/esm/Laptop.js.map +1 -1
- package/dist/esm/LightningBolt.js.map +1 -1
- package/dist/esm/Link.js.map +1 -1
- package/dist/esm/List.js.map +1 -1
- package/dist/esm/Lock.js.map +1 -1
- package/dist/esm/LogIn.js.map +1 -1
- package/dist/esm/LogOut.js.map +1 -1
- package/dist/esm/MagnifyingGlass.js.map +1 -1
- package/dist/esm/Megaphone.js.map +1 -1
- package/dist/esm/Menu.js.map +1 -1
- package/dist/esm/Minus.js.map +1 -1
- package/dist/esm/Mobile.js.map +1 -1
- package/dist/esm/Moon.js.map +1 -1
- package/dist/esm/MultiDirectionArrow.js.map +1 -1
- package/dist/esm/MultiLayers.js.map +1 -1
- package/dist/esm/NavCollapse.js.map +1 -1
- package/dist/esm/NavExpand.js.map +1 -1
- package/dist/esm/NoFilter.js.map +1 -1
- package/dist/esm/NotAllowed.js.map +1 -1
- package/dist/esm/Note.js.map +1 -1
- package/dist/esm/NumberedList.js.map +1 -1
- package/dist/esm/OpenNewTab.js.map +1 -1
- package/dist/esm/OutlineFavorite.js.map +1 -1
- package/dist/esm/Package.js.map +1 -1
- package/dist/esm/Pause.js.map +1 -1
- package/dist/esm/Pending.js.map +1 -1
- package/dist/esm/Person.js.map +1 -1
- package/dist/esm/PersonGroup.js.map +1 -1
- package/dist/esm/PersonWithLock.js.map +1 -1
- package/dist/esm/Pin.js.map +1 -1
- package/dist/esm/Play.js.map +1 -1
- package/dist/esm/Plus.js.map +1 -1
- package/dist/esm/PlusWithCircle.js.map +1 -1
- package/dist/esm/Primary.js.map +1 -1
- package/dist/esm/Project.js.map +1 -1
- package/dist/esm/QuestionMarkWithCircle.js.map +1 -1
- package/dist/esm/Read.js.map +1 -1
- package/dist/esm/Recommended.js.map +1 -1
- package/dist/esm/Redo.js.map +1 -1
- package/dist/esm/Refresh.js.map +1 -1
- package/dist/esm/Relationship.js.map +1 -1
- package/dist/esm/ReplicaSet.js.map +1 -1
- package/dist/esm/Resize.js.map +1 -1
- package/dist/esm/Resource.js.map +1 -1
- package/dist/esm/Return.js.map +1 -1
- package/dist/esm/Revert.js.map +1 -1
- package/dist/esm/Router.js.map +1 -1
- package/dist/esm/SMS.js.map +1 -1
- package/dist/esm/Save.js.map +1 -1
- package/dist/esm/SearchIndex.js.map +1 -1
- package/dist/esm/Secondary.js.map +1 -1
- package/dist/esm/Serverless.js.map +1 -1
- package/dist/esm/Settings.js.map +1 -1
- package/dist/esm/ShardedCluster.js.map +1 -1
- package/dist/esm/Shell.js.map +1 -1
- package/dist/esm/Shield.js.map +1 -1
- package/dist/esm/Shirt.js.map +1 -1
- package/dist/esm/Shortcut.js.map +1 -1
- package/dist/esm/SortAscending.js.map +1 -1
- package/dist/esm/SortDescending.js.map +1 -1
- package/dist/esm/Sparkle.js.map +1 -1
- package/dist/esm/SplitHorizontal.js.map +1 -1
- package/dist/esm/SplitVertical.js.map +1 -1
- package/dist/esm/Stitch.js.map +1 -1
- package/dist/esm/Stop.js.map +1 -1
- package/dist/esm/Streaming.js.map +1 -1
- package/dist/esm/String.js.map +1 -1
- package/dist/esm/Sun.js.map +1 -1
- package/dist/esm/Support.js.map +1 -1
- package/dist/esm/Sweep.js.map +1 -1
- package/dist/esm/Table.js.map +1 -1
- package/dist/esm/Tag.js.map +1 -1
- package/dist/esm/TemporaryTable.js.map +1 -1
- package/dist/esm/ThumbsDown.js.map +1 -1
- package/dist/esm/ThumbsUp.js.map +1 -1
- package/dist/esm/TimeSeries.js.map +1 -1
- package/dist/esm/TimeSeriesCollection.js.map +1 -1
- package/dist/esm/Trash.js.map +1 -1
- package/dist/esm/Undo.js.map +1 -1
- package/dist/esm/University.js.map +1 -1
- package/dist/esm/Unlock.js.map +1 -1
- package/dist/esm/Unsorted.js.map +1 -1
- package/dist/esm/UpDownCarets.js.map +1 -1
- package/dist/esm/Upload.js.map +1 -1
- package/dist/esm/VerticalEllipsis.js.map +1 -1
- package/dist/esm/View.js.map +1 -1
- package/dist/esm/Visibility.js.map +1 -1
- package/dist/esm/VisibilityOff.js.map +1 -1
- package/dist/esm/Warning.js.map +1 -1
- package/dist/esm/Wizard.js.map +1 -1
- package/dist/esm/Wrench.js.map +1 -1
- package/dist/esm/Write.js.map +1 -1
- package/dist/esm/X.js.map +1 -1
- package/dist/esm/XWithCircle.js.map +1 -1
- package/dist/esm/glyphCommon-cTThlth0.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/createGlyphComponent.d.ts.map +1 -1
- package/dist/types/createGlyphComponent.spec.d.ts +2 -0
- package/dist/types/createGlyphComponent.spec.d.ts.map +1 -0
- package/dist/types/createIconComponent.d.ts.map +1 -1
- package/dist/types/createIconComponent.spec.d.ts +2 -0
- package/dist/types/createIconComponent.spec.d.ts.map +1 -0
- package/dist/types/testUtils.d.ts +10 -0
- package/dist/types/testUtils.d.ts.map +1 -0
- package/dist/umd/AIModel.js.map +1 -1
- package/dist/umd/ActivityFeed.js.map +1 -1
- package/dist/umd/AddFile.js.map +1 -1
- package/dist/umd/AllProducts.js.map +1 -1
- package/dist/umd/AnalyticsNode.js.map +1 -1
- package/dist/umd/Apps.js.map +1 -1
- package/dist/umd/Array.js.map +1 -1
- package/dist/umd/ArrowDown.js.map +1 -1
- package/dist/umd/ArrowLeft.js.map +1 -1
- package/dist/umd/ArrowRight.js.map +1 -1
- package/dist/umd/ArrowUp.js.map +1 -1
- package/dist/umd/Award.js.map +1 -1
- package/dist/umd/Beaker.js.map +1 -1
- package/dist/umd/Bell.js.map +1 -1
- package/dist/umd/Biometric.js.map +1 -1
- package/dist/umd/Boolean.js.map +1 -1
- package/dist/umd/Building.js.map +1 -1
- package/dist/umd/Bulb.js.map +1 -1
- package/dist/umd/Calendar.js.map +1 -1
- package/dist/umd/Camera.js.map +1 -1
- package/dist/umd/Cap.js.map +1 -1
- package/dist/umd/CaretDown.js.map +1 -1
- package/dist/umd/CaretLeft.js.map +1 -1
- package/dist/umd/CaretRight.js.map +1 -1
- package/dist/umd/CaretUp.js.map +1 -1
- package/dist/umd/ChartFilled.js.map +1 -1
- package/dist/umd/Charts.js.map +1 -1
- package/dist/umd/Checkmark.js.map +1 -1
- package/dist/umd/CheckmarkWithCircle.js.map +1 -1
- package/dist/umd/ChevronDown.js.map +1 -1
- package/dist/umd/ChevronLeft.js.map +1 -1
- package/dist/umd/ChevronRight.js.map +1 -1
- package/dist/umd/ChevronUp.js.map +1 -1
- package/dist/umd/Circle.js.map +1 -1
- package/dist/umd/Clock.js.map +1 -1
- package/dist/umd/ClockWithArrow.js.map +1 -1
- package/dist/umd/Clone.js.map +1 -1
- package/dist/umd/Cloud.js.map +1 -1
- package/dist/umd/Code.js.map +1 -1
- package/dist/umd/CodeBlock.js.map +1 -1
- package/dist/umd/Coin.js.map +1 -1
- package/dist/umd/Colon.js.map +1 -1
- package/dist/umd/Config.js.map +1 -1
- package/dist/umd/Connect.js.map +1 -1
- package/dist/umd/Copy.js.map +1 -1
- package/dist/umd/CreditCard.js.map +1 -1
- package/dist/umd/CurlyBraces.js.map +1 -1
- package/dist/umd/Cursor.js.map +1 -1
- package/dist/umd/Dashboard.js.map +1 -1
- package/dist/umd/Database.js.map +1 -1
- package/dist/umd/Diagram.js.map +1 -1
- package/dist/umd/Diagram2.js.map +1 -1
- package/dist/umd/Diagram3.js.map +1 -1
- package/dist/umd/Disconnect.js.map +1 -1
- package/dist/umd/Download.js.map +1 -1
- package/dist/umd/Drag.js.map +1 -1
- package/dist/umd/Edit.js.map +1 -1
- package/dist/umd/Ellipsis.js.map +1 -1
- package/dist/umd/Email.js.map +1 -1
- package/dist/umd/EmptyDatabase.js.map +1 -1
- package/dist/umd/EmptyFolder.js.map +1 -1
- package/dist/umd/Eraser.js.map +1 -1
- package/dist/umd/Escalation.js.map +1 -1
- package/dist/umd/Export.js.map +1 -1
- package/dist/umd/Favorite.js.map +1 -1
- package/dist/umd/Federation.js.map +1 -1
- package/dist/umd/File.js.map +1 -1
- package/dist/umd/Filter.js.map +1 -1
- package/dist/umd/Folder.js.map +1 -1
- package/dist/umd/Format.js.map +1 -1
- package/dist/umd/FullScreenEnter.js.map +1 -1
- package/dist/umd/FullScreenExit.js.map +1 -1
- package/dist/umd/Function.js.map +1 -1
- package/dist/umd/Gauge.js.map +1 -1
- package/dist/umd/GlobeAmericas.js.map +1 -1
- package/dist/umd/GovernmentBuilding.js.map +1 -1
- package/dist/umd/Guide.js.map +1 -1
- package/dist/umd/Hash.js.map +1 -1
- package/dist/umd/HiddenSecondaryNode.js.map +1 -1
- package/dist/umd/Highlight.js.map +1 -1
- package/dist/umd/Home.js.map +1 -1
- package/dist/umd/HorizontalDrag.js.map +1 -1
- package/dist/umd/Import.js.map +1 -1
- package/dist/umd/ImportantWithCircle.js.map +1 -1
- package/dist/umd/InfoWithCircle.js.map +1 -1
- package/dist/umd/InternalEmployee.js.map +1 -1
- package/dist/umd/InviteUser.js.map +1 -1
- package/dist/umd/Key.js.map +1 -1
- package/dist/umd/Laptop.js.map +1 -1
- package/dist/umd/LightningBolt.js.map +1 -1
- package/dist/umd/Link.js.map +1 -1
- package/dist/umd/List.js.map +1 -1
- package/dist/umd/Lock.js.map +1 -1
- package/dist/umd/LogIn.js.map +1 -1
- package/dist/umd/LogOut.js.map +1 -1
- package/dist/umd/MagnifyingGlass.js.map +1 -1
- package/dist/umd/Megaphone.js.map +1 -1
- package/dist/umd/Menu.js.map +1 -1
- package/dist/umd/Minus.js.map +1 -1
- package/dist/umd/Mobile.js.map +1 -1
- package/dist/umd/Moon.js.map +1 -1
- package/dist/umd/MultiDirectionArrow.js.map +1 -1
- package/dist/umd/MultiLayers.js.map +1 -1
- package/dist/umd/NavCollapse.js.map +1 -1
- package/dist/umd/NavExpand.js.map +1 -1
- package/dist/umd/NoFilter.js.map +1 -1
- package/dist/umd/NotAllowed.js.map +1 -1
- package/dist/umd/Note.js.map +1 -1
- package/dist/umd/NumberedList.js.map +1 -1
- package/dist/umd/OpenNewTab.js.map +1 -1
- package/dist/umd/OutlineFavorite.js.map +1 -1
- package/dist/umd/Package.js.map +1 -1
- package/dist/umd/Pause.js.map +1 -1
- package/dist/umd/Pending.js.map +1 -1
- package/dist/umd/Person.js.map +1 -1
- package/dist/umd/PersonGroup.js.map +1 -1
- package/dist/umd/PersonWithLock.js.map +1 -1
- package/dist/umd/Pin.js.map +1 -1
- package/dist/umd/Play.js.map +1 -1
- package/dist/umd/Plus.js.map +1 -1
- package/dist/umd/PlusWithCircle.js.map +1 -1
- package/dist/umd/Primary.js.map +1 -1
- package/dist/umd/Project.js.map +1 -1
- package/dist/umd/QuestionMarkWithCircle.js.map +1 -1
- package/dist/umd/Read.js.map +1 -1
- package/dist/umd/Recommended.js.map +1 -1
- package/dist/umd/Redo.js.map +1 -1
- package/dist/umd/Refresh.js.map +1 -1
- package/dist/umd/Relationship.js.map +1 -1
- package/dist/umd/ReplicaSet.js.map +1 -1
- package/dist/umd/Resize.js.map +1 -1
- package/dist/umd/Resource.js.map +1 -1
- package/dist/umd/Return.js.map +1 -1
- package/dist/umd/Revert.js.map +1 -1
- package/dist/umd/Router.js.map +1 -1
- package/dist/umd/SMS.js.map +1 -1
- package/dist/umd/Save.js.map +1 -1
- package/dist/umd/SearchIndex.js.map +1 -1
- package/dist/umd/Secondary.js.map +1 -1
- package/dist/umd/Serverless.js.map +1 -1
- package/dist/umd/Settings.js.map +1 -1
- package/dist/umd/ShardedCluster.js.map +1 -1
- package/dist/umd/Shell.js.map +1 -1
- package/dist/umd/Shield.js.map +1 -1
- package/dist/umd/Shirt.js.map +1 -1
- package/dist/umd/Shortcut.js.map +1 -1
- package/dist/umd/SortAscending.js.map +1 -1
- package/dist/umd/SortDescending.js.map +1 -1
- package/dist/umd/Sparkle.js.map +1 -1
- package/dist/umd/SplitHorizontal.js.map +1 -1
- package/dist/umd/SplitVertical.js.map +1 -1
- package/dist/umd/Stitch.js.map +1 -1
- package/dist/umd/Stop.js.map +1 -1
- package/dist/umd/Streaming.js.map +1 -1
- package/dist/umd/String.js.map +1 -1
- package/dist/umd/Sun.js.map +1 -1
- package/dist/umd/Support.js.map +1 -1
- package/dist/umd/Sweep.js.map +1 -1
- package/dist/umd/Table.js.map +1 -1
- package/dist/umd/Tag.js.map +1 -1
- package/dist/umd/TemporaryTable.js.map +1 -1
- package/dist/umd/ThumbsDown.js.map +1 -1
- package/dist/umd/ThumbsUp.js.map +1 -1
- package/dist/umd/TimeSeries.js.map +1 -1
- package/dist/umd/TimeSeriesCollection.js.map +1 -1
- package/dist/umd/Trash.js.map +1 -1
- package/dist/umd/Undo.js.map +1 -1
- package/dist/umd/University.js.map +1 -1
- package/dist/umd/Unlock.js.map +1 -1
- package/dist/umd/Unsorted.js.map +1 -1
- package/dist/umd/UpDownCarets.js.map +1 -1
- package/dist/umd/Upload.js.map +1 -1
- package/dist/umd/VerticalEllipsis.js.map +1 -1
- package/dist/umd/View.js.map +1 -1
- package/dist/umd/Visibility.js.map +1 -1
- package/dist/umd/VisibilityOff.js.map +1 -1
- package/dist/umd/Warning.js.map +1 -1
- package/dist/umd/Wizard.js.map +1 -1
- package/dist/umd/Wrench.js.map +1 -1
- package/dist/umd/Write.js.map +1 -1
- package/dist/umd/X.js.map +1 -1
- package/dist/umd/XWithCircle.js.map +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +6 -6
- package/scripts/build/build-batch.ts +13 -6
- package/scripts/build/build.ts +1 -0
- package/src/Icon.spec.tsx +13 -0
- package/src/Icon.stories.tsx +13 -1
- package/src/createGlyphComponent.spec.tsx +274 -0
- package/src/createGlyphComponent.tsx +3 -1
- package/src/createIconComponent.spec.tsx +395 -0
- package/src/createIconComponent.tsx +14 -1
- package/src/testUtils.tsx +26 -0
- package/stories.js +1 -1
package/dist/umd/Clone.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Clone.js","sources":["../../src/glyphCommon.ts","../../src/generated/Clone.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 5272702ad682dc0cd2673580405c6eae\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CloneProps extends LGGlyph.ComponentProps {}\nconst Clone = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CloneProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Clone', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M5.5 12C5.5 13.1046 6.39543 14 7.5 14H12.5C13.6046 14 14.5 13.1046 14.5 12V8C14.5 6.89543 13.6046 6 12.5 6H7.5C6.39543 6 5.5 6.89543 5.5 8V12Z\" fill={'currentColor'} /><path d=\"M4.25 10H3.5C2.39543 10 1.5 9.10457 1.5 8V4C1.5 2.89543 2.39543 2 3.5 2H8.5C9.60457 2 10.5 2.89543 10.5 4V4.75H8.5V4H3.5L3.5 8H4.25V10Z\" fill={'currentColor'} /></svg>;\n};\nClone.displayName = 'Clone';\nClone.isGlyph = true;\nexport default Clone;"],"names":["
|
|
1
|
+
{"version":3,"file":"Clone.js","sources":["../../src/glyphCommon.ts","../../src/generated/Clone.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 5272702ad682dc0cd2673580405c6eae\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CloneProps extends LGGlyph.ComponentProps {}\nconst Clone = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CloneProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Clone', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M5.5 12C5.5 13.1046 6.39543 14 7.5 14H12.5C13.6046 14 14.5 13.1046 14.5 12V8C14.5 6.89543 13.6046 6 12.5 6H7.5C6.39543 6 5.5 6.89543 5.5 8V12Z\" fill={'currentColor'} /><path d=\"M4.25 10H3.5C2.39543 10 1.5 9.10457 1.5 8V4C1.5 2.89543 2.39543 2 3.5 2H8.5C9.60457 2 10.5 2.89543 10.5 4V4.75H8.5V4H3.5L3.5 8H4.25V10Z\" fill={'currentColor'} /></svg>;\n};\nClone.displayName = 'Clone';\nClone.isGlyph = true;\nexport default Clone;"],"names":["sizeMap","small","default","large","xlarge","Clone","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName","isGlyph"],"mappings":"q9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAQ,SAAHC,GASO,IARhBC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEF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-1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cloud.js","sources":["../../src/glyphCommon.ts","../../src/generated/Cloud.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 419912cc8359239dde4ae49ac42ce174\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CloudProps extends LGGlyph.ComponentProps {}\nconst Cloud = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CloudProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Cloud', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M12.5714 8.14286C12.5714 9.91806 11.672 11.4832 10.304 12.4074L10.2902 12.4167C9.4721 12.9655 8.48773 13.2857 7.42857 13.2857L2.85714 13.2857C1.27919 13.2857 0 12.0065 0 10.4286C0 9.03717 0.994597 7.87807 2.31162 7.62345C2.57202 5.02705 4.76357 3 7.42857 3C9.67227 3 11.5804 4.43682 12.283 6.44054C12.4698 6.97334 12.5714 7.54624 12.5714 8.14286Z\" fill={'currentColor'} /><path d=\"M13.8214 8.14286C13.8214 10.1439 12.902 11.9302 11.4626 13.1025C11.8104 13.2213 12.1834 13.2857 12.5714 13.2857C14.465 13.2857 16 11.7507 16 9.85715C16 8.33414 15.007 7.04306 13.633 6.5961C13.7561 7.09139 13.8214 7.6095 13.8214 8.14286Z\" fill={'currentColor'} /></svg>;\n};\nCloud.displayName = 'Cloud';\nCloud.isGlyph = true;\nexport default Cloud;"],"names":["
|
|
1
|
+
{"version":3,"file":"Cloud.js","sources":["../../src/glyphCommon.ts","../../src/generated/Cloud.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 419912cc8359239dde4ae49ac42ce174\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CloudProps extends LGGlyph.ComponentProps {}\nconst Cloud = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CloudProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Cloud', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M12.5714 8.14286C12.5714 9.91806 11.672 11.4832 10.304 12.4074L10.2902 12.4167C9.4721 12.9655 8.48773 13.2857 7.42857 13.2857L2.85714 13.2857C1.27919 13.2857 0 12.0065 0 10.4286C0 9.03717 0.994597 7.87807 2.31162 7.62345C2.57202 5.02705 4.76357 3 7.42857 3C9.67227 3 11.5804 4.43682 12.283 6.44054C12.4698 6.97334 12.5714 7.54624 12.5714 8.14286Z\" fill={'currentColor'} /><path d=\"M13.8214 8.14286C13.8214 10.1439 12.902 11.9302 11.4626 13.1025C11.8104 13.2213 12.1834 13.2857 12.5714 13.2857C14.465 13.2857 16 11.7507 16 9.85715C16 8.33414 15.007 7.04306 13.633 6.5961C13.7561 7.09139 13.8214 7.6095 13.8214 8.14286Z\" fill={'currentColor'} /></svg>;\n};\nCloud.displayName = 'Cloud';\nCloud.isGlyph = true;\nexport default Cloud;"],"names":["sizeMap","small","default","large","xlarge","Cloud","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName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gC,MAAuB,iBAAThC,EAAoBA,EAAOT,EAAQS,GAAOM,KAAMA,GAAUa,EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,EAAE,6VAA6V/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,+OAA+O/B,KAAM,iBACx3B,SACAR,EAAMwC,YAAc,QACpBxC,EAAMyC,SAAU"}
|
package/dist/umd/Code.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Code.js","sources":["../../src/glyphCommon.ts","../../src/generated/Code.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum d1646228a06071051ef13676e6a11303\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CodeProps extends LGGlyph.ComponentProps {}\nconst Code = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CodeProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Code', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M6.10919 13.2623C6.05677 13.5335 6.23405 13.7959 6.50517 13.8484L7.24153 13.9908C7.51265 14.0433 7.77494 13.8659 7.82736 13.5946L9.92574 2.73775C9.97817 2.4665 9.80088 2.20409 9.52976 2.15164L8.7934 2.00919C8.52228 1.95674 8.25999 2.13411 8.20757 2.40536L6.10919 13.2623Z\" fill={'currentColor'} /><path d=\"M1.35982 7.24558L3.97571 5.11122C4.18784 4.93814 4.50313 4.9662 4.67991 5.17391L5.32009 5.92607C5.49687 6.13378 5.46821 6.44247 5.25607 6.61556L3.56205 7.99774L5.25607 9.37993C5.46821 9.55302 5.49687 9.86171 5.32009 10.0694L4.67991 10.8216C4.50313 11.0293 4.18784 11.0574 3.97571 10.8843L1.35982 8.74991C1.13182 8.56389 1 8.28832 1 7.99774C1 7.70717 1.13182 7.4316 1.35982 7.24558Z\" fill={'currentColor'} /><path d=\"M14.6362 7.24558L12.0203 5.11122C11.8082 4.93814 11.4929 4.9662 11.3161 5.17391L10.6759 5.92607C10.4991 6.13378 10.5278 6.44247 10.7399 6.61556L12.4339 7.99774L10.7399 9.37993C10.5278 9.55302 10.4991 9.86171 10.6759 10.0694L11.3161 10.8216C11.4929 11.0293 11.8082 11.0574 12.0203 10.8843L14.6362 8.74991C14.8642 8.56389 14.996 8.28832 14.996 7.99774C14.996 7.70717 14.8642 7.4316 14.6362 7.24558Z\" fill={'currentColor'} /></svg>;\n};\nCode.displayName = 'Code';\nCode.isGlyph = true;\nexport default Code;"],"names":["
|
|
1
|
+
{"version":3,"file":"Code.js","sources":["../../src/glyphCommon.ts","../../src/generated/Code.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum d1646228a06071051ef13676e6a11303\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CodeProps extends LGGlyph.ComponentProps {}\nconst Code = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CodeProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Code', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M6.10919 13.2623C6.05677 13.5335 6.23405 13.7959 6.50517 13.8484L7.24153 13.9908C7.51265 14.0433 7.77494 13.8659 7.82736 13.5946L9.92574 2.73775C9.97817 2.4665 9.80088 2.20409 9.52976 2.15164L8.7934 2.00919C8.52228 1.95674 8.25999 2.13411 8.20757 2.40536L6.10919 13.2623Z\" fill={'currentColor'} /><path d=\"M1.35982 7.24558L3.97571 5.11122C4.18784 4.93814 4.50313 4.9662 4.67991 5.17391L5.32009 5.92607C5.49687 6.13378 5.46821 6.44247 5.25607 6.61556L3.56205 7.99774L5.25607 9.37993C5.46821 9.55302 5.49687 9.86171 5.32009 10.0694L4.67991 10.8216C4.50313 11.0293 4.18784 11.0574 3.97571 10.8843L1.35982 8.74991C1.13182 8.56389 1 8.28832 1 7.99774C1 7.70717 1.13182 7.4316 1.35982 7.24558Z\" fill={'currentColor'} /><path d=\"M14.6362 7.24558L12.0203 5.11122C11.8082 4.93814 11.4929 4.9662 11.3161 5.17391L10.6759 5.92607C10.4991 6.13378 10.5278 6.44247 10.7399 6.61556L12.4339 7.99774L10.7399 9.37993C10.5278 9.55302 10.4991 9.86171 10.6759 10.0694L11.3161 10.8216C11.4929 11.0293 11.8082 11.0574 12.0203 10.8843L14.6362 8.74991C14.8642 8.56389 14.996 8.28832 14.996 7.99774C14.996 7.70717 14.8642 7.4316 14.6362 7.24558Z\" fill={'currentColor'} /></svg>;\n};\nCode.displayName = 'Code';\nCode.isGlyph = true;\nexport default Code;"],"names":["sizeMap","small","default","large","xlarge","Code","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName","isGlyph"],"mappings":"o9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAO,SAAHC,GASO,IARfC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OA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C,cAAA,OAAA,CAAMO,EAAE,kRAAkR/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,gYAAgY/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,+YAA+Y/B,KAAM,iBAC72C,SACAR,EAAKwC,YAAc,OACnBxC,EAAKyC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodeBlock.js","sources":["../../src/glyphCommon.ts","../../src/generated/CodeBlock.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum fe7d7e62b2cd7fdbaf37e4bcd3a4c6fe\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CodeBlockProps extends LGGlyph.ComponentProps {}\nconst CodeBlock = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CodeBlockProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'CodeBlock', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M13 4H3L3 12H13V4ZM3 2C1.89543 2 1 2.89543 1 4V12C1 13.1046 1.89543 14 3 14H13C14.1046 14 15 13.1046 15 12V4C15 2.89543 14.1046 2 13 2H3Z\" fill={'currentColor'} /><path d=\"M4.22142 7.42141L6.256 5.7796C6.42099 5.64646 6.66621 5.66804 6.80371 5.82782L7.30163 6.4064C7.43913 6.56618 7.41683 6.80364 7.25184 6.93678L5.93426 8L7.25184 9.06322C7.41683 9.19636 7.43913 9.43382 7.30163 9.59359L6.80371 10.1722C6.66621 10.332 6.42099 10.3535 6.256 10.2204L4.22142 8.57859C4.04409 8.4355 3.94156 8.22352 3.94156 8C3.94156 7.77648 4.04409 7.5645 4.22142 7.42141Z\" fill={'currentColor'} /><path d=\"M11.7786 7.42141L9.74399 5.7796C9.57899 5.64646 9.33377 5.66804 9.19628 5.82782L8.69836 6.4064C8.56086 6.56618 8.58315 6.80364 8.74815 6.93678L10.0657 8L8.74815 9.06322C8.58315 9.19636 8.56086 9.43382 8.69836 9.59359L9.19628 10.1722C9.33377 10.332 9.57899 10.3535 9.74399 10.2204L11.7786 8.57859C11.9559 8.4355 12.0584 8.22352 12.0584 8C12.0584 7.77648 11.9559 7.5645 11.7786 7.42141Z\" fill={'currentColor'} /></svg>;\n};\nCodeBlock.displayName = 'CodeBlock';\nCodeBlock.isGlyph = true;\nexport default CodeBlock;"],"names":["
|
|
1
|
+
{"version":3,"file":"CodeBlock.js","sources":["../../src/glyphCommon.ts","../../src/generated/CodeBlock.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum fe7d7e62b2cd7fdbaf37e4bcd3a4c6fe\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CodeBlockProps extends LGGlyph.ComponentProps {}\nconst CodeBlock = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CodeBlockProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'CodeBlock', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M13 4H3L3 12H13V4ZM3 2C1.89543 2 1 2.89543 1 4V12C1 13.1046 1.89543 14 3 14H13C14.1046 14 15 13.1046 15 12V4C15 2.89543 14.1046 2 13 2H3Z\" fill={'currentColor'} /><path d=\"M4.22142 7.42141L6.256 5.7796C6.42099 5.64646 6.66621 5.66804 6.80371 5.82782L7.30163 6.4064C7.43913 6.56618 7.41683 6.80364 7.25184 6.93678L5.93426 8L7.25184 9.06322C7.41683 9.19636 7.43913 9.43382 7.30163 9.59359L6.80371 10.1722C6.66621 10.332 6.42099 10.3535 6.256 10.2204L4.22142 8.57859C4.04409 8.4355 3.94156 8.22352 3.94156 8C3.94156 7.77648 4.04409 7.5645 4.22142 7.42141Z\" fill={'currentColor'} /><path d=\"M11.7786 7.42141L9.74399 5.7796C9.57899 5.64646 9.33377 5.66804 9.19628 5.82782L8.69836 6.4064C8.56086 6.56618 8.58315 6.80364 8.74815 6.93678L10.0657 8L8.74815 9.06322C8.58315 9.19636 8.56086 9.43382 8.69836 9.59359L9.19628 10.1722C9.33377 10.332 9.57899 10.3535 9.74399 10.2204L11.7786 8.57859C11.9559 8.4355 12.0584 8.22352 12.0584 8C12.0584 7.77648 11.9559 7.5645 11.7786 7.42141Z\" fill={'currentColor'} /></svg>;\n};\nCodeBlock.displayName = 'CodeBlock';\nCodeBlock.isGlyph = true;\nexport default CodeBlock;"],"names":["sizeMap","small","default","large","xlarge","CodeBlock","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","fillRule","clipRule","d","displayName","isGlyph"],"mappings":"y9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAY,SAAHC,GASO,IARpBC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAA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MS,EAAE,+XAA+XjC,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMS,EAAE,mYAAmYjC,KAAM,iBAChwC,SACAR,EAAU0C,YAAc,YACxB1C,EAAU2C,SAAU"}
|
package/dist/umd/Coin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Coin.js","sources":["../../src/glyphCommon.ts","../../src/generated/Coin.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 5ad701f313c4e655eac0938f2d7f3fb8\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CoinProps extends LGGlyph.ComponentProps {}\nconst Coin = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CoinProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Coin', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M8 1C4.13 1 1 4.13 1 8C1 11.87 4.13 15 8 15C11.87 15 15 11.87 15 8C15 4.13 11.87 1 8 1ZM10.29 10.41C10.2 10.67 10.06 10.87 9.86 11.02C9.66 11.17 9.4 11.27 9.08 11.33C8.82 11.38 8.51 11.41 8.16 11.42L8.06 12.49H6.95L7.05 11.39C7.05 11.39 6.98 11.39 6.94 11.39C6.53 11.36 6.05 11.29 5.52 11.17L5.61 10.08C6 10.08 6.33 10.1 6.62 10.11C6.91 10.11 7.15 10.12 7.36 10.12H7.89C8.15 10.12 8.35 10.1 8.5 10.07C8.65 10.04 8.76 9.97 8.82 9.88C8.88 9.79 8.91 9.65 8.91 9.46C8.91 9.3 8.89 9.17 8.84 9.08C8.8 8.98 8.73 8.9 8.63 8.85C8.54 8.79 8.41 8.74 8.24 8.69L6.87 8.21C6.35 8.02 5.98 7.76 5.76 7.45C5.55 7.14 5.44 6.72 5.44 6.21C5.44 5.81 5.49 5.49 5.58 5.24C5.67 4.99 5.82 4.79 6.02 4.65C6.23 4.51 6.49 4.41 6.81 4.36C7.09 4.31 7.42 4.29 7.79 4.29L7.89 3.38H9L8.89 4.33C8.95 4.33 8.99 4.33 9.05 4.33C9.44 4.36 9.83 4.44 10.2 4.55L10.1 5.56C9.81 5.56 9.47 5.55 9.08 5.54C8.69 5.54 8.31 5.53 7.94 5.53C7.76 5.53 7.61 5.53 7.48 5.55C7.35 5.55 7.25 5.58 7.17 5.63L7 5.82C6.97 5.91 6.95 6.03 6.95 6.18C6.95 6.41 7 6.58 7.11 6.69C7.22 6.8 7.42 6.89 7.69 6.98L8.98 7.41C9.52 7.6 9.9 7.85 10.11 8.17C10.32 8.49 10.43 8.91 10.43 9.43C10.43 9.82 10.38 10.15 10.29 10.41Z\" fill={'currentColor'} /></svg>;\n};\nCoin.displayName = 'Coin';\nCoin.isGlyph = true;\nexport default Coin;"],"names":["
|
|
1
|
+
{"version":3,"file":"Coin.js","sources":["../../src/glyphCommon.ts","../../src/generated/Coin.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 5ad701f313c4e655eac0938f2d7f3fb8\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CoinProps extends LGGlyph.ComponentProps {}\nconst Coin = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CoinProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Coin', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M8 1C4.13 1 1 4.13 1 8C1 11.87 4.13 15 8 15C11.87 15 15 11.87 15 8C15 4.13 11.87 1 8 1ZM10.29 10.41C10.2 10.67 10.06 10.87 9.86 11.02C9.66 11.17 9.4 11.27 9.08 11.33C8.82 11.38 8.51 11.41 8.16 11.42L8.06 12.49H6.95L7.05 11.39C7.05 11.39 6.98 11.39 6.94 11.39C6.53 11.36 6.05 11.29 5.52 11.17L5.61 10.08C6 10.08 6.33 10.1 6.62 10.11C6.91 10.11 7.15 10.12 7.36 10.12H7.89C8.15 10.12 8.35 10.1 8.5 10.07C8.65 10.04 8.76 9.97 8.82 9.88C8.88 9.79 8.91 9.65 8.91 9.46C8.91 9.3 8.89 9.17 8.84 9.08C8.8 8.98 8.73 8.9 8.63 8.85C8.54 8.79 8.41 8.74 8.24 8.69L6.87 8.21C6.35 8.02 5.98 7.76 5.76 7.45C5.55 7.14 5.44 6.72 5.44 6.21C5.44 5.81 5.49 5.49 5.58 5.24C5.67 4.99 5.82 4.79 6.02 4.65C6.23 4.51 6.49 4.41 6.81 4.36C7.09 4.31 7.42 4.29 7.79 4.29L7.89 3.38H9L8.89 4.33C8.95 4.33 8.99 4.33 9.05 4.33C9.44 4.36 9.83 4.44 10.2 4.55L10.1 5.56C9.81 5.56 9.47 5.55 9.08 5.54C8.69 5.54 8.31 5.53 7.94 5.53C7.76 5.53 7.61 5.53 7.48 5.55C7.35 5.55 7.25 5.58 7.17 5.63L7 5.82C6.97 5.91 6.95 6.03 6.95 6.18C6.95 6.41 7 6.58 7.11 6.69C7.22 6.8 7.42 6.89 7.69 6.98L8.98 7.41C9.52 7.6 9.9 7.85 10.11 8.17C10.32 8.49 10.43 8.91 10.43 9.43C10.43 9.82 10.38 10.15 10.29 10.41Z\" fill={'currentColor'} /></svg>;\n};\nCoin.displayName = 'Coin';\nCoin.isGlyph = true;\nexport default Coin;"],"names":["sizeMap","small","default","large","xlarge","Coin","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName","isGlyph"],"mappings":"o9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAO,SAAHC,GASO,IARfC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEFC,EAAUC,EAAAA,eAAe,CAC7BC,OAAQ,eAEJC,EAAYC,EAAAA,IAAGC,IAAAA,EAAAC,EACNZ,CAAAA,oBAAAA,eAAAA,GAETa,EAAeH,EAAGA,IAAAI,IAAAA,EAAAF,EAEnB,CAAA,wCACCG,EDJD,SACLb,EACAc,EAAiBvB,GAOa,IAgCFwB,EArCVnB,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDI,EAAKJ,EAALI,MACAS,EAAOb,EAAPa,QAGF,OAAQJ,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,EAkBtCqB,EAAAA,EACG,GAAA,kBAXCrB,EACEE,EACQ,GAAAoB,OAAMb,OAAOa,OAAIpB,GAEdO,EAGFP,GAKZ,aAAeD,GAnBT,CAAE,cA4BamB,EA5BeD,EA6B3CG,GAAAA,OAAUF,EAAKG,QAAQ,kBAAmB,SAAQ,WANhD,IAAK,eACH,MAAO,CAAE,eAAe,EAAMC,IAAK,IAEzC,CCnC0BC,CAAwBpB,EAAM,OAAMgB,EAAAA,EAAA,CAC1DrB,MAAAA,EACAS,QAAAA,GACC,aAAeR,GACf,kBAAoBC,IAEvB,OAAOwB,EAAAC,cAAA,MAAAC,EAAA,CAAK/B,UAAWgC,EAAAA,GAAER,KACtBT,EAAoB,MAART,GACZa,EAAcnB,GAAYiC,OAAwB,iBAAT/B,EAAoBA,EAAOT,EAAQS,GAAOgC,MAAuB,iBAAThC,EAAoBA,EAAOT,EAAQS,GAAOM,KAAMA,GAAUa,EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,EAAE,koCAAkoC/B,KAAM,iBAC94C,SACAR,EAAKwC,YAAc,OACnBxC,EAAKyC,SAAU"}
|
package/dist/umd/Colon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Colon.js","sources":["../../src/glyphCommon.ts","../../src/generated/Colon.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum aa11cb66b8291a087fe11fbe4616292c\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface ColonProps extends LGGlyph.ComponentProps {}\nconst Colon = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: ColonProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Colon', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M10 4.5C10 5.60457 9.10457 6.5 8 6.5C6.89543 6.5 6 5.60457 6 4.5C6 3.39543 6.89543 2.5 8 2.5C9.10457 2.5 10 3.39543 10 4.5Z\" fill={'currentColor'} /><path d=\"M10 11.5C10 12.6046 9.10457 13.5 8 13.5C6.89543 13.5 6 12.6046 6 11.5C6 10.3954 6.89543 9.5 8 9.5C9.10457 9.5 10 10.3954 10 11.5Z\" fill={'currentColor'} /></svg>;\n};\nColon.displayName = 'Colon';\nColon.isGlyph = true;\nexport default Colon;"],"names":["
|
|
1
|
+
{"version":3,"file":"Colon.js","sources":["../../src/glyphCommon.ts","../../src/generated/Colon.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum aa11cb66b8291a087fe11fbe4616292c\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface ColonProps extends LGGlyph.ComponentProps {}\nconst Colon = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: ColonProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Colon', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M10 4.5C10 5.60457 9.10457 6.5 8 6.5C6.89543 6.5 6 5.60457 6 4.5C6 3.39543 6.89543 2.5 8 2.5C9.10457 2.5 10 3.39543 10 4.5Z\" fill={'currentColor'} /><path d=\"M10 11.5C10 12.6046 9.10457 13.5 8 13.5C6.89543 13.5 6 12.6046 6 11.5C6 10.3954 6.89543 9.5 8 9.5C9.10457 9.5 10 10.3954 10 11.5Z\" fill={'currentColor'} /></svg>;\n};\nColon.displayName = 'Colon';\nColon.isGlyph = true;\nexport default Colon;"],"names":["sizeMap","small","default","large","xlarge","Colon","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","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EAAOT,EAAQS,GAAOgC,MAAuB,iBAAThC,EAAoBA,EAAOT,EAAQS,GAAOM,KAAMA,GAAUa,EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,EAAE,8HAA8H/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,oIAAoI/B,KAAM,iBAC9iB,SACAR,EAAMwC,YAAc,QACpBxC,EAAMyC,SAAU"}
|
package/dist/umd/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","sources":["../../src/glyphCommon.ts","../../src/generated/Config.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 3e43b9a64baef9e6a2e1b0bad4c0d4e7\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface ConfigProps extends LGGlyph.ComponentProps {}\nconst Config = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: ConfigProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Config', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M12.7 2.56989C12.41 2.56989 12.17 2.80989 12.17 3.09989V4.34989L11.32 3.49989C9.21 1.39989 5.75 1.51989 3.78 3.75989C2.65 5.03989 2.23 6.82989 2.68 8.48989C3.24 10.5299 4.98 12.0099 7.08 12.2299L8.1 12.3399C8.42 13.2799 9.3 13.9499 10.34 13.9499C11.65 13.9499 12.71 12.8899 12.71 11.5799C12.71 10.2699 11.65 9.20989 10.34 9.20989C9.14 9.20989 8.16 10.0999 8 11.2599L7.19 11.1799C5.53 11.0099 4.14 9.82989 3.7 8.21989C3.34 6.90989 3.67 5.48989 4.58 4.46989C6.15 2.68989 8.9 2.59989 10.57 4.26989L11.42 5.11989H10.17C9.88 5.11989 9.64 5.35989 9.64 5.64989C9.64 5.93989 9.88 6.17989 10.17 6.17989H12.71C13 6.17989 13.24 5.93989 13.24 5.64989V3.09989C13.24 2.80989 13 2.56989 12.71 2.56989H12.7ZM10.34 10.3099C11.04 10.3099 11.6 10.8799 11.6 11.5699C11.6 12.2599 11.03 12.8299 10.34 12.8299C9.65 12.8299 9.08 12.2599 9.08 11.5699C9.08 10.8799 9.65 10.3099 10.34 10.3099Z\" fill={'currentColor'} /></svg>;\n};\nConfig.displayName = 'Config';\nConfig.isGlyph = true;\nexport default Config;"],"names":["
|
|
1
|
+
{"version":3,"file":"Config.js","sources":["../../src/glyphCommon.ts","../../src/generated/Config.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 3e43b9a64baef9e6a2e1b0bad4c0d4e7\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface ConfigProps extends LGGlyph.ComponentProps {}\nconst Config = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: ConfigProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Config', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M12.7 2.56989C12.41 2.56989 12.17 2.80989 12.17 3.09989V4.34989L11.32 3.49989C9.21 1.39989 5.75 1.51989 3.78 3.75989C2.65 5.03989 2.23 6.82989 2.68 8.48989C3.24 10.5299 4.98 12.0099 7.08 12.2299L8.1 12.3399C8.42 13.2799 9.3 13.9499 10.34 13.9499C11.65 13.9499 12.71 12.8899 12.71 11.5799C12.71 10.2699 11.65 9.20989 10.34 9.20989C9.14 9.20989 8.16 10.0999 8 11.2599L7.19 11.1799C5.53 11.0099 4.14 9.82989 3.7 8.21989C3.34 6.90989 3.67 5.48989 4.58 4.46989C6.15 2.68989 8.9 2.59989 10.57 4.26989L11.42 5.11989H10.17C9.88 5.11989 9.64 5.35989 9.64 5.64989C9.64 5.93989 9.88 6.17989 10.17 6.17989H12.71C13 6.17989 13.24 5.93989 13.24 5.64989V3.09989C13.24 2.80989 13 2.56989 12.71 2.56989H12.7ZM10.34 10.3099C11.04 10.3099 11.6 10.8799 11.6 11.5699C11.6 12.2599 11.03 12.8299 10.34 12.8299C9.65 12.8299 9.08 12.2599 9.08 11.5699C9.08 10.8799 9.65 10.3099 10.34 10.3099Z\" fill={'currentColor'} /></svg>;\n};\nConfig.displayName = 'Config';\nConfig.isGlyph = true;\nexport default Config;"],"names":["sizeMap","small","default","large","xlarge","Config","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName","isGlyph"],"mappings":"s9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAS,SAAHC,GASO,IARjBC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEFC,EAAUC,EAAAA,eAAe,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"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum cacc5f021481d402053e2d0be9bd7edb\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface ConnectProps extends LGGlyph.ComponentProps {}\nconst Connect = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: ConnectProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Connect', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.8674 8.89755C14.165 7.59995 14.3939 5.63211 13.554 4.09804L14.8289 2.82315C15.057 2.59505 15.057 2.22522 14.8289 1.99712L14.0029 1.17108C13.7748 0.942981 13.405 0.942983 13.1769 1.17109L11.8867 2.4612C10.3625 1.66314 8.43194 1.90377 7.15275 3.18294L5.2772 5.05844C5.26266 5.06875 5.24879 5.08041 5.23576 5.09343L3.18162 7.14751C1.90122 8.42791 1.66139 10.3609 2.46214 11.8858L1.17108 13.1769C0.942974 13.405 0.942974 13.7748 1.17108 14.0029L1.99711 14.8289C2.22521 15.057 2.59504 15.057 2.82315 14.8289L4.10098 13.5511C5.63447 14.3882 7.59986 14.1585 8.89625 12.8621L10.7718 10.9866C10.7863 10.9763 10.8002 10.9646 10.8132 10.9516L12.8674 8.89755ZM6.56112 6.77578L4.68548 8.65134C3.9392 9.39765 3.9392 10.612 4.68548 11.3583C5.43176 12.1045 6.64608 12.1046 7.39242 11.3583L9.44653 9.3042C9.45953 9.2912 9.47337 9.27956 9.48788 9.26927L11.3635 7.39371C12.1098 6.64741 12.1098 5.4331 11.3635 4.68679C10.6172 3.94051 9.40292 3.94049 8.65658 4.68679L6.60247 6.74085C6.58947 6.75385 6.57563 6.7655 6.56112 6.77578Z\" fill={'currentColor'} /></svg>;\n};\nConnect.displayName = 'Connect';\nConnect.isGlyph = true;\nexport default Connect;"],"names":["
|
|
1
|
+
{"version":3,"file":"Connect.js","sources":["../../src/glyphCommon.ts","../../src/generated/Connect.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum cacc5f021481d402053e2d0be9bd7edb\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface ConnectProps extends LGGlyph.ComponentProps {}\nconst Connect = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: ConnectProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Connect', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M12.8674 8.89755C14.165 7.59995 14.3939 5.63211 13.554 4.09804L14.8289 2.82315C15.057 2.59505 15.057 2.22522 14.8289 1.99712L14.0029 1.17108C13.7748 0.942981 13.405 0.942983 13.1769 1.17109L11.8867 2.4612C10.3625 1.66314 8.43194 1.90377 7.15275 3.18294L5.2772 5.05844C5.26266 5.06875 5.24879 5.08041 5.23576 5.09343L3.18162 7.14751C1.90122 8.42791 1.66139 10.3609 2.46214 11.8858L1.17108 13.1769C0.942974 13.405 0.942974 13.7748 1.17108 14.0029L1.99711 14.8289C2.22521 15.057 2.59504 15.057 2.82315 14.8289L4.10098 13.5511C5.63447 14.3882 7.59986 14.1585 8.89625 12.8621L10.7718 10.9866C10.7863 10.9763 10.8002 10.9646 10.8132 10.9516L12.8674 8.89755ZM6.56112 6.77578L4.68548 8.65134C3.9392 9.39765 3.9392 10.612 4.68548 11.3583C5.43176 12.1045 6.64608 12.1046 7.39242 11.3583L9.44653 9.3042C9.45953 9.2912 9.47337 9.27956 9.48788 9.26927L11.3635 7.39371C12.1098 6.64741 12.1098 5.4331 11.3635 4.68679C10.6172 3.94051 9.40292 3.94049 8.65658 4.68679L6.60247 6.74085C6.58947 6.75385 6.57563 6.7655 6.56112 6.77578Z\" fill={'currentColor'} /></svg>;\n};\nConnect.displayName = 'Connect';\nConnect.isGlyph = true;\nexport default Connect;"],"names":["sizeMap","small","default","large","xlarge","Connect","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","fillRule","clipRule","d","displayName","isGlyph"],"mappings":"u9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAU,SAAHC,GASO,IARlBC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEFC,EAAUC,EAAAA,eAAe,CAC7BC,OAAQ,eAEJC,EAAYC,EAAAA,IAAGC,IAAAA,EAAAC,EACNZ,CAAAA,oBAAAA,eAAAA,GAETa,EAAeH,EAAGA,IAAAI,IAAAA,EAAAF,EAEnB,CAAA,wCACCG,EDJD,SACLb,EACAc,EAAiBvB,GAOa,IAgCFwB,EArCVnB,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDI,EAAKJ,EAALI,MACAS,EAAOb,EAAPa,QAGF,OAAQJ,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,EAkBtCqB,EAAAA,EACG,GAAA,kBAXCrB,EACEE,EACQ,GAAAoB,OAAMb,OAAOa,OAAIpB,GAEdO,EAGFP,GAKZ,aAAeD,GAnBT,CAAE,cA4BamB,EA5BeD,EA6B3CG,GAAAA,OAAUF,EAAKG,QAAQ,kBAAmB,SAAQ,WANhD,IAAK,eACH,MAAO,CAAE,eAAe,EAAMC,IAAK,IAEzC,CCnC0BC,CAAwBpB,EAAM,UAASgB,EAAAA,EAAA,CAC7DrB,MAAAA,EACAS,QAAAA,GACC,aAAeR,GACf,kBAAoBC,IAEvB,OAAOwB,EAAAC,cAAA,MAAAC,EAAA,CAAK/B,UAAWgC,EAAAA,GAAER,KACtBT,EAAoB,MAART,GACZa,EAAcnB,GAAYiC,OAAwB,iBAAT/B,EAAoBA,EAAOT,EAAQS,GAAOgC,MAAuB,iBAAThC,EAAoBA,EAAOT,EAAQS,GAAOM,KAAMA,GAAUa,EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,SAAS,UAAUC,SAAS,UAAUC,EAAE,w/BAAw/BjC,KAAM,iBAC1yC,SACAR,EAAQ0C,YAAc,UACtB1C,EAAQ2C,SAAU"}
|
package/dist/umd/Copy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Copy.js","sources":["../../src/glyphCommon.ts","../../src/generated/Copy.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 5d913433fd02bb0ed57bf74446645eb2\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CopyProps extends LGGlyph.ComponentProps {}\nconst Copy = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CopyProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Copy', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z\" fill={'currentColor'} /></svg>;\n};\nCopy.displayName = 'Copy';\nCopy.isGlyph = true;\nexport default Copy;"],"names":["
|
|
1
|
+
{"version":3,"file":"Copy.js","sources":["../../src/glyphCommon.ts","../../src/generated/Copy.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 5d913433fd02bb0ed57bf74446645eb2\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CopyProps extends LGGlyph.ComponentProps {}\nconst Copy = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CopyProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Copy', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z\" fill={'currentColor'} /></svg>;\n};\nCopy.displayName = 'Copy';\nCopy.isGlyph = true;\nexport default Copy;"],"names":["sizeMap","small","default","large","xlarge","Copy","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","fillRule","clipRule","d","displayName","isGlyph"],"mappings":"o9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAO,SAAHC,GASO,IARfC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEFC,EAAUC,EAAAA,eAAe,CAC7BC,OAAQ,eAEJC,EAAYC,EAAAA,IAAGC,IAAAA,EAAAC,EACNZ,CAAAA,oBAAAA,eAAAA,GAETa,EAAeH,EAAGA,IAAAI,IAAAA,EAAAF,EAEnB,CAAA,wCACCG,EDJD,SACLb,EACAc,EAAiBvB,GAOa,IAgCFwB,EArCVnB,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDI,EAAKJ,EAALI,MACAS,EAAOb,EAAPa,QAGF,OAAQJ,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,EAkBtCqB,EAAAA,EACG,GAAA,kBAXCrB,EACEE,EACQ,GAAAoB,OAAMb,OAAOa,OAAIpB,GAEdO,EAGFP,GAKZ,aAAeD,GAnBT,CAAE,cA4BamB,EA5BeD,EA6B3CG,GAAAA,OAAUF,EAAKG,QAAQ,kBAAmB,SAAQ,WANhD,IAAK,eACH,MAAO,CAAE,eAAe,EAAMC,IAAK,IAEzC,CCnC0BC,CAAwBpB,EAAM,OAAMgB,EAAAA,EAAA,CAC1DrB,MAAAA,EACAS,QAAAA,GACC,aAAeR,GACf,kBAAoBC,IAEvB,OAAOwB,EAAAC,cAAA,MAAAC,EAAA,CAAK/B,UAAWgC,EAAAA,GAAER,KACtBT,EAAoB,MAART,GACZa,EAAcnB,GAAYiC,OAAwB,iBAAT/B,EAAoBA,EAAOT,EAAQS,GAAOgC,MAAuB,iBAAThC,EAAoBA,EAAOT,EAAQS,GAAOM,KAAMA,GAAUa,EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,SAAS,UAAUC,SAAS,UAAUC,EAAE,s5BAAs5BjC,KAAM,iBACxsC,SACAR,EAAK0C,YAAc,OACnB1C,EAAK2C,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreditCard.js","sources":["../../src/glyphCommon.ts","../../src/generated/CreditCard.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum bc2752783815d54113564fcb4b09858d\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CreditCardProps extends LGGlyph.ComponentProps {}\nconst CreditCard = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CreditCardProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'CreditCard', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M3 3C1.89543 3 1 3.89543 1 5L15 5C15 3.89543 14.1046 3 13 3H3Z\" fill={'currentColor'} /><path d=\"M15 7L1 7V11C1 12.1046 1.89543 13 3 13H13C14.1046 13 15 12.1046 15 11V7Z\" fill={'currentColor'} /></svg>;\n};\nCreditCard.displayName = 'CreditCard';\nCreditCard.isGlyph = true;\nexport default CreditCard;"],"names":["
|
|
1
|
+
{"version":3,"file":"CreditCard.js","sources":["../../src/glyphCommon.ts","../../src/generated/CreditCard.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum bc2752783815d54113564fcb4b09858d\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CreditCardProps extends LGGlyph.ComponentProps {}\nconst CreditCard = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CreditCardProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'CreditCard', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M3 3C1.89543 3 1 3.89543 1 5L15 5C15 3.89543 14.1046 3 13 3H3Z\" fill={'currentColor'} /><path d=\"M15 7L1 7V11C1 12.1046 1.89543 13 3 13H13C14.1046 13 15 12.1046 15 11V7Z\" fill={'currentColor'} /></svg>;\n};\nCreditCard.displayName = 'CreditCard';\nCreditCard.isGlyph = true;\nexport default CreditCard;"],"names":["sizeMap","small","default","large","xlarge","CreditCard","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName","isGlyph"],"mappings":"09CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,Q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EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,EAAE,iEAAiE/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,2EAA2E/B,KAAM,iBACxb,SACAR,EAAWwC,YAAc,aACzBxC,EAAWyC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurlyBraces.js","sources":["../../src/glyphCommon.ts","../../src/generated/CurlyBraces.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 2493a4e08371585756eed503e8cded3e\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CurlyBracesProps extends LGGlyph.ComponentProps {}\nconst CurlyBraces = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CurlyBracesProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'CurlyBraces', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M3.00003 3.54401C3.00003 2.16329 4.11933 1.04401 5.50004 1.04401H6.50002C6.77617 1.04401 7.00002 1.26786 7.00002 1.54401L7.00001 2.64918C7.00001 2.84422 6.8419 3.00233 6.64687 3.00233L5.85772 3.00233C5.38403 3.00233 5.00002 3.38633 5.00002 3.86003L5.00002 6.66157C5.00002 7.24368 4.66843 7.74835 4.18383 7.99699C4.66843 8.24563 5.00003 8.75029 5.00003 9.33241V12.1349C5.00052 12.6081 5.38434 12.9917 5.85773 12.9917H6.6469C6.84192 12.9917 7.00002 13.1497 7.00002 13.3448L7.00003 14.45C7.00003 14.7261 6.77617 14.95 6.50003 14.95H5.50004C4.11933 14.95 3.00004 13.8307 3.00004 12.45L3.00003 10.494C3.00003 9.6656 2.32845 8.99403 1.50003 8.99403C1.22389 8.99403 1.00003 8.77017 1.00003 8.49403L1 7.49402C1 7.21789 1.22385 6.99403 1.49999 6.99403C2.32842 6.99403 2.99999 6.32246 2.99999 5.49403L3.00003 3.54401Z\" fill={'currentColor'} /><path d=\"M13 12.45C13 13.8307 11.8807 14.95 10.5 14.95L9.49998 14.95C9.22383 14.95 8.99998 14.7262 8.99998 14.45L8.99999 13.3448C8.99999 13.1498 9.1581 12.9917 9.35314 12.9917H10.1423C10.616 12.9917 11 12.6077 11 12.134L11 9.33245C11 8.75033 11.3316 8.24567 11.8162 7.99703C11.3316 7.74839 11 7.24372 11 6.66161V3.85915C10.9995 3.38588 10.6157 3.00236 10.1423 3.00236H9.3531C9.15808 3.00236 8.99998 2.84427 8.99998 2.64925L8.99997 1.54401C8.99997 1.26787 9.22383 1.04401 9.49997 1.04401L10.5 1.04401C11.8807 1.04401 13 2.1633 13 3.54401L13 5.49999C13 6.32842 13.6715 6.99999 14.5 6.99999C14.7761 6.99999 15 7.22385 15 7.49998L15 8.49999C15 8.77613 14.7761 8.99999 14.5 8.99999C13.6716 8.99999 13 9.67156 13 10.5L13 12.45Z\" fill={'currentColor'} /></svg>;\n};\nCurlyBraces.displayName = 'CurlyBraces';\nCurlyBraces.isGlyph = true;\nexport default CurlyBraces;"],"names":["
|
|
1
|
+
{"version":3,"file":"CurlyBraces.js","sources":["../../src/glyphCommon.ts","../../src/generated/CurlyBraces.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 2493a4e08371585756eed503e8cded3e\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CurlyBracesProps extends LGGlyph.ComponentProps {}\nconst CurlyBraces = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CurlyBracesProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'CurlyBraces', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path d=\"M3.00003 3.54401C3.00003 2.16329 4.11933 1.04401 5.50004 1.04401H6.50002C6.77617 1.04401 7.00002 1.26786 7.00002 1.54401L7.00001 2.64918C7.00001 2.84422 6.8419 3.00233 6.64687 3.00233L5.85772 3.00233C5.38403 3.00233 5.00002 3.38633 5.00002 3.86003L5.00002 6.66157C5.00002 7.24368 4.66843 7.74835 4.18383 7.99699C4.66843 8.24563 5.00003 8.75029 5.00003 9.33241V12.1349C5.00052 12.6081 5.38434 12.9917 5.85773 12.9917H6.6469C6.84192 12.9917 7.00002 13.1497 7.00002 13.3448L7.00003 14.45C7.00003 14.7261 6.77617 14.95 6.50003 14.95H5.50004C4.11933 14.95 3.00004 13.8307 3.00004 12.45L3.00003 10.494C3.00003 9.6656 2.32845 8.99403 1.50003 8.99403C1.22389 8.99403 1.00003 8.77017 1.00003 8.49403L1 7.49402C1 7.21789 1.22385 6.99403 1.49999 6.99403C2.32842 6.99403 2.99999 6.32246 2.99999 5.49403L3.00003 3.54401Z\" fill={'currentColor'} /><path d=\"M13 12.45C13 13.8307 11.8807 14.95 10.5 14.95L9.49998 14.95C9.22383 14.95 8.99998 14.7262 8.99998 14.45L8.99999 13.3448C8.99999 13.1498 9.1581 12.9917 9.35314 12.9917H10.1423C10.616 12.9917 11 12.6077 11 12.134L11 9.33245C11 8.75033 11.3316 8.24567 11.8162 7.99703C11.3316 7.74839 11 7.24372 11 6.66161V3.85915C10.9995 3.38588 10.6157 3.00236 10.1423 3.00236H9.3531C9.15808 3.00236 8.99998 2.84427 8.99998 2.64925L8.99997 1.54401C8.99997 1.26787 9.22383 1.04401 9.49997 1.04401L10.5 1.04401C11.8807 1.04401 13 2.1633 13 3.54401L13 5.49999C13 6.32842 13.6715 6.99999 14.5 6.99999C14.7761 6.99999 15 7.22385 15 7.49998L15 8.49999C15 8.77613 14.7761 8.99999 14.5 8.99999C13.6716 8.99999 13 9.67156 13 10.5L13 12.45Z\" fill={'currentColor'} /></svg>;\n};\nCurlyBraces.displayName = 'CurlyBraces';\nCurlyBraces.isGlyph = true;\nexport default CurlyBraces;"],"names":["sizeMap","small","default","large","xlarge","CurlyBraces","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","d","displayName","isGlyph"],"mappings":"29CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAc,SAAHC,GASO,IARtBC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEFC,EAAUC,EAAAA,eAAe,CAC7BC,OAAQ,eAEJC,EAAYC,EAAAA,IAAGC,IAAAA,EAAAC,EACNZ,CAAAA,oBAAAA,eAAAA,GAETa,EAAeH,EAAGA,IAAAI,IAAAA,EAAAF,EAEnB,CAAA,wCACCG,EDJD,SACLb,EACAc,EAAiBvB,GAOa,IAgCFwB,EArCVnB,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDI,EAAKJ,EAALI,MACAS,EAAOb,EAAPa,QAGF,OAAQJ,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,EAkBtCqB,EAAAA,EACG,GAAA,kBAXCrB,EACEE,EACQ,GAAAoB,OAAMb,OAAOa,OAAIpB,GAEdO,EAGFP,GAKZ,aAAeD,GAnBT,CAAE,cA4BamB,EA5BeD,EA6B3CG,GAAAA,OAAUF,EAAKG,QAAQ,kBAAmB,SAAQ,WANhD,IAAK,eACH,MAAO,CAAE,eAAe,EAAMC,IAAK,IAEzC,CCnC0BC,CAAwBpB,EAAM,cAAagB,EAAAA,EAAA,CACjErB,MAAAA,EACAS,QAAAA,GACC,aAAeR,GACf,kBAAoBC,IAEvB,OAAOwB,EAAAC,cAAA,MAAAC,EAAA,CAAK/B,UAAWgC,EAAAA,GAAER,KACtBT,EAAoB,MAART,GACZa,EAAcnB,GAAYiC,OAAwB,iBAAT/B,EAAoBA,EAAOT,EAAQS,GAAOgC,MAAuB,iBAAThC,EAAoBA,EAAOT,EAAQS,GAAOM,KAAMA,GAAUa,EAAqBZ,EAAK,CAAE0B,QAAQ,cAAahC,GAAS0B,EAAAC,cAAA,QAAA,CAAOM,GAAIxB,GAAUT,GAAe0B,EAAAC,cAAA,OAAA,CAAMO,EAAE,0yBAA0yB/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,2sBAA2sB/B,KAAM,iBACjyD,SACAR,EAAYwC,YAAc,cAC1BxC,EAAYyC,SAAU"}
|
package/dist/umd/Cursor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cursor.js","sources":["../../src/glyphCommon.ts","../../src/generated/Cursor.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 7e2f46ea0cd42230970ecba889744916\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CursorProps extends LGGlyph.ComponentProps {}\nconst Cursor = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CursorProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Cursor', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M8.53436 8.53438L9.00697 8.26403L11.3957 6.89757L4.64845 4.64847L6.89754 11.3958L8.26401 9.00699L8.53436 8.53438ZM10 10.0001L14.4801 7.4373C15.2139 7.10378 15.1582 6.04354 14.3936 5.78866L3.16879 2.04707C2.47551 1.81597 1.81595 2.47553 2.04704 3.16881L5.78864 14.3936C6.04352 15.1582 7.10375 15.2139 7.43728 14.4801L10 10.0001Z\" fill={'currentColor'} /></svg>;\n};\nCursor.displayName = 'Cursor';\nCursor.isGlyph = true;\nexport default Cursor;"],"names":["
|
|
1
|
+
{"version":3,"file":"Cursor.js","sources":["../../src/glyphCommon.ts","../../src/generated/Cursor.tsx"],"sourcesContent":["export const Size = {\n Small: 'small',\n Default: 'default',\n Large: 'large',\n XLarge: 'xlarge',\n} as const;\n\nexport type Size = (typeof Size)[keyof typeof Size];\n\nexport const sizeMap: Record<Size, number> = {\n small: 14,\n default: 16,\n large: 20,\n xlarge: 24,\n} as const;\n\ninterface AccessibleFunctionParams {\n 'aria-labelledby'?: string;\n 'aria-label'?: string;\n title?: string | null;\n titleId?: string;\n}\n\ntype AccessibleFunctionReturnType =\n | { 'aria-labelledby'?: string; 'aria-label'?: string }\n | { 'aria-hidden': true; alt: '' };\n\nexport function generateAccessibleProps(\n role: 'img' | 'presentation',\n glyphName: string,\n {\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n title,\n titleId,\n }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img': {\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n // If there's a title, use the titleId for aria-labelledby\n // If there's already an aria-labelledby, combine them\n let labelledBy: string | undefined;\n\n if (title) {\n if (ariaLabelledby) {\n labelledBy = `${titleId} ${ariaLabelledby}`;\n } else {\n labelledBy = titleId;\n }\n } else {\n labelledBy = ariaLabelledby;\n }\n\n return {\n ['aria-labelledby']: labelledBy,\n ['aria-label']: ariaLabel,\n };\n }\n\n case 'presentation':\n return { 'aria-hidden': true, alt: '' };\n }\n}\n\nexport function getGlyphLabel(name: string) {\n return `${name.replace(/([a-z])([A-Z])/g, '$1 $2')} Icon`;\n}\n","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script packages/icon/scripts/prebuild/index.ts\n* @checksum 7e2f46ea0cd42230970ecba889744916\n*/\nimport * as React from \"react\";\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { useIdAllocator } from '@leafygreen-ui/hooks';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CursorProps extends LGGlyph.ComponentProps {}\nconst Cursor = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CursorProps) => {\n const titleId = useIdAllocator({\n prefix: 'icon-title'\n });\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Cursor', {\n title,\n titleId,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby\n });\n return <svg className={cx({\n [fillStyle]: fill != null\n }, noFlexShrink, className)} height={typeof size === 'number' ? size : sizeMap[size]} width={typeof size === 'number' ? size : sizeMap[size]} role={role} {...accessibleProps} {...props} viewBox=\"0 0 16 16\">{title && <title id={titleId}>{title}</title>}<path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M8.53436 8.53438L9.00697 8.26403L11.3957 6.89757L4.64845 4.64847L6.89754 11.3958L8.26401 9.00699L8.53436 8.53438ZM10 10.0001L14.4801 7.4373C15.2139 7.10378 15.1582 6.04354 14.3936 5.78866L3.16879 2.04707C2.47551 1.81597 1.81595 2.47553 2.04704 3.16881L5.78864 14.3936C6.04352 15.1582 7.10375 15.2139 7.43728 14.4801L10 10.0001Z\" fill={'currentColor'} /></svg>;\n};\nCursor.displayName = 'Cursor';\nCursor.isGlyph = true;\nexport default Cursor;"],"names":["sizeMap","small","default","large","xlarge","Cursor","_ref","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","_excluded","titleId","useIdAllocator","prefix","fillStyle","css","_templateObject","_taggedTemplateLiteral","noFlexShrink","_templateObject2","accessibleProps","glyphName","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","id","fillRule","clipRule","d","displayName","isGlyph"],"mappings":"s9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAS,SAAHC,GASO,IARjBC,EAASD,EAATC,UAASC,EAAAF,EACTG,KAAAA,OAAO,IAAHD,EAAG,GAAEA,EACTE,EAAKJ,EAALI,MACgBC,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDO,EAAIP,EAAJO,KAAIC,EAAAR,EACJS,KAAAA,OAAO,IAAHD,EAAG,MAAKA,EACTE,+WAAKC,CAAAX,EAAAY,GAEFC,EAAUC,EAAAA,eAAe,CAC7BC,OAAQ,eAEJC,EAAYC,EAAAA,IAAGC,IAAAA,EAAAC,EACNZ,CAAAA,oBAAAA,eAAAA,GAETa,EAAeH,EAAGA,IAAAI,IAAAA,EAAAF,EAEnB,CAAA,wCACCG,EDJD,SACLb,EACAc,EAAiBvB,GAOa,IAgCFwB,EArCVnB,EAASL,EAAxB,cACoBM,EAAcN,EAAlC,mBACDI,EAAKJ,EAALI,MACAS,EAAOb,EAAPa,QAGF,OAAQJ,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