@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberedList.js","sources":["../../src/glyphCommon.ts","../../src/generated/NumberedList.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 7eba0ef41afe30759b27cc28c078d9f8\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 NumberedListProps extends LGGlyph.ComponentProps {}\nconst NumberedList = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: NumberedListProps) => {\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, 'NumberedList', {\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=\"M2.64914 4.29651C2.73717 4.39255 2.86522 4.45658 3.00128 4.45658C3.08131 4.45658 3.15334 4.44057 3.25738 4.41656L3.5615 4.33653V6.48138H3.12933C2.96126 6.48138 2.8012 6.50539 2.67315 6.61743C2.56911 6.71347 2.51308 6.84952 2.51308 6.98558C2.51308 7.12163 2.56911 7.26569 2.67315 7.36173C2.8012 7.47377 2.95326 7.49778 3.12933 7.49778H5.01007C5.18614 7.49778 5.3382 7.46577 5.46625 7.36173C5.57029 7.27369 5.62632 7.12964 5.62632 6.99358C5.62632 6.85753 5.57029 6.71347 5.46625 6.61743C5.3382 6.50539 5.18614 6.48138 5.01007 6.48138H4.5779V3L2.99327 3.40816C2.84121 3.45618 2.72917 3.48819 2.62513 3.59223C2.5451 3.68827 2.51308 3.80832 2.51308 3.92036C2.51308 4.04842 2.5611 4.18447 2.64914 4.28851V4.29651Z\" fill={'currentColor'} /><path d=\"M5.15413 11.9876C5.05809 11.9876 4.97006 12.0276 4.89002 12.0756H4.12172C4.52188 11.7315 4.80199 11.4834 4.97806 11.3153C5.25817 11.0432 5.44224 10.8431 5.53828 10.651C5.62632 10.475 5.66633 10.2829 5.66633 10.0828C5.66633 9.69065 5.51427 9.33851 5.22616 9.07441C4.93804 8.8023 4.55389 8.65824 4.12172 8.66624C3.84161 8.66624 3.5695 8.73027 3.32941 8.85032C3.08931 8.97037 2.88923 9.14644 2.75318 9.36252C2.63313 9.5626 2.5531 9.73867 2.5531 9.92274C2.5531 10.0588 2.60912 10.1868 2.70516 10.2749C2.8012 10.3709 2.92925 10.4269 3.0653 10.4269C3.16934 10.4269 3.28139 10.3949 3.36942 10.3309C3.46546 10.2589 3.52148 10.1628 3.5535 10.0508C3.59351 9.93875 3.64153 9.86672 3.68155 9.8267C3.79359 9.73067 3.92164 9.68265 4.10571 9.68265C4.28979 9.68265 4.41784 9.73067 4.50587 9.8107C4.60191 9.89873 4.63392 9.97076 4.63392 10.0668C4.63392 10.1228 4.60191 10.2109 4.50587 10.3229C4.29779 10.563 3.60952 11.1632 2.49708 12.0916L2.42505 12.1556V13.108H5.66633V12.6118C5.66633 12.4357 5.64232 12.2837 5.53028 12.1556C5.44224 12.0516 5.29018 11.9956 5.15413 11.9956V11.9876Z\" fill={'currentColor'} /><path d=\"M12.5731 11.0912H8.25936C7.70714 11.0912 7.25896 11.5394 7.25896 12.0916C7.25896 12.6438 7.70714 13.092 8.25936 13.092H12.5731C13.1253 13.092 13.5735 12.6438 13.5735 12.0916C13.5735 11.5394 13.1253 11.0912 12.5731 11.0912Z\" fill={'currentColor'} /><path d=\"M8.25936 5.08883H12.5731C13.1253 5.08883 13.5735 4.64065 13.5735 4.08843C13.5735 3.53621 13.1253 3.08803 12.5731 3.08803H8.25936C7.70714 3.08803 7.25896 3.53621 7.25896 4.08843C7.25896 4.64065 7.70714 5.08883 8.25936 5.08883Z\" fill={'currentColor'} /><path d=\"M12.5731 7.15365H8.25936C7.70714 7.15365 7.25896 7.60182 7.25896 8.15404C7.25896 8.70626 7.70714 9.15444 8.25936 9.15444H12.5731C13.1253 9.15444 13.5735 8.70626 13.5735 8.15404C13.5735 7.60182 13.1253 7.15365 12.5731 7.15365Z\" fill={'currentColor'} /></svg>;\n};\nNumberedList.displayName = 'NumberedList';\nNumberedList.isGlyph = true;\nexport default NumberedList;"],"names":["
|
|
1
|
+
{"version":3,"file":"NumberedList.js","sources":["../../src/glyphCommon.ts","../../src/generated/NumberedList.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 7eba0ef41afe30759b27cc28c078d9f8\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 NumberedListProps extends LGGlyph.ComponentProps {}\nconst NumberedList = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: NumberedListProps) => {\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, 'NumberedList', {\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=\"M2.64914 4.29651C2.73717 4.39255 2.86522 4.45658 3.00128 4.45658C3.08131 4.45658 3.15334 4.44057 3.25738 4.41656L3.5615 4.33653V6.48138H3.12933C2.96126 6.48138 2.8012 6.50539 2.67315 6.61743C2.56911 6.71347 2.51308 6.84952 2.51308 6.98558C2.51308 7.12163 2.56911 7.26569 2.67315 7.36173C2.8012 7.47377 2.95326 7.49778 3.12933 7.49778H5.01007C5.18614 7.49778 5.3382 7.46577 5.46625 7.36173C5.57029 7.27369 5.62632 7.12964 5.62632 6.99358C5.62632 6.85753 5.57029 6.71347 5.46625 6.61743C5.3382 6.50539 5.18614 6.48138 5.01007 6.48138H4.5779V3L2.99327 3.40816C2.84121 3.45618 2.72917 3.48819 2.62513 3.59223C2.5451 3.68827 2.51308 3.80832 2.51308 3.92036C2.51308 4.04842 2.5611 4.18447 2.64914 4.28851V4.29651Z\" fill={'currentColor'} /><path d=\"M5.15413 11.9876C5.05809 11.9876 4.97006 12.0276 4.89002 12.0756H4.12172C4.52188 11.7315 4.80199 11.4834 4.97806 11.3153C5.25817 11.0432 5.44224 10.8431 5.53828 10.651C5.62632 10.475 5.66633 10.2829 5.66633 10.0828C5.66633 9.69065 5.51427 9.33851 5.22616 9.07441C4.93804 8.8023 4.55389 8.65824 4.12172 8.66624C3.84161 8.66624 3.5695 8.73027 3.32941 8.85032C3.08931 8.97037 2.88923 9.14644 2.75318 9.36252C2.63313 9.5626 2.5531 9.73867 2.5531 9.92274C2.5531 10.0588 2.60912 10.1868 2.70516 10.2749C2.8012 10.3709 2.92925 10.4269 3.0653 10.4269C3.16934 10.4269 3.28139 10.3949 3.36942 10.3309C3.46546 10.2589 3.52148 10.1628 3.5535 10.0508C3.59351 9.93875 3.64153 9.86672 3.68155 9.8267C3.79359 9.73067 3.92164 9.68265 4.10571 9.68265C4.28979 9.68265 4.41784 9.73067 4.50587 9.8107C4.60191 9.89873 4.63392 9.97076 4.63392 10.0668C4.63392 10.1228 4.60191 10.2109 4.50587 10.3229C4.29779 10.563 3.60952 11.1632 2.49708 12.0916L2.42505 12.1556V13.108H5.66633V12.6118C5.66633 12.4357 5.64232 12.2837 5.53028 12.1556C5.44224 12.0516 5.29018 11.9956 5.15413 11.9956V11.9876Z\" fill={'currentColor'} /><path d=\"M12.5731 11.0912H8.25936C7.70714 11.0912 7.25896 11.5394 7.25896 12.0916C7.25896 12.6438 7.70714 13.092 8.25936 13.092H12.5731C13.1253 13.092 13.5735 12.6438 13.5735 12.0916C13.5735 11.5394 13.1253 11.0912 12.5731 11.0912Z\" fill={'currentColor'} /><path d=\"M8.25936 5.08883H12.5731C13.1253 5.08883 13.5735 4.64065 13.5735 4.08843C13.5735 3.53621 13.1253 3.08803 12.5731 3.08803H8.25936C7.70714 3.08803 7.25896 3.53621 7.25896 4.08843C7.25896 4.64065 7.70714 5.08883 8.25936 5.08883Z\" fill={'currentColor'} /><path d=\"M12.5731 7.15365H8.25936C7.70714 7.15365 7.25896 7.60182 7.25896 8.15404C7.25896 8.70626 7.70714 9.15444 8.25936 9.15444H12.5731C13.1253 9.15444 13.5735 8.70626 13.5735 8.15404C13.5735 7.60182 13.1253 7.15365 12.5731 7.15365Z\" fill={'currentColor'} /></svg>;\n};\nNumberedList.displayName = 'NumberedList';\nNumberedList.isGlyph = true;\nexport default NumberedList;"],"names":["sizeMap","small","default","large","xlarge","NumberedList","_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":"49CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAe,SAAHC,GASO,IARvBC,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,eAAcgB,EAAAA,EAAA,CAClErB,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,ssBAAssB/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,6iCAA6iC/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,iOAAiO/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,oOAAoO/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,oOAAoO/B,KAAM,iBACxyF,SACAR,EAAawC,YAAc,eAC3BxC,EAAayC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenNewTab.js","sources":["../../src/glyphCommon.ts","../../src/generated/OpenNewTab.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 d4005c46811f3c637e4b82937003bf3e\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 OpenNewTabProps extends LGGlyph.ComponentProps {}\nconst OpenNewTab = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: OpenNewTabProps) => {\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, 'OpenNewTab', {\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=\"M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z\" fill={'currentColor'} /><path d=\"M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z\" fill={'currentColor'} /></svg>;\n};\nOpenNewTab.displayName = 'OpenNewTab';\nOpenNewTab.isGlyph = true;\nexport default OpenNewTab;"],"names":["
|
|
1
|
+
{"version":3,"file":"OpenNewTab.js","sources":["../../src/glyphCommon.ts","../../src/generated/OpenNewTab.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 d4005c46811f3c637e4b82937003bf3e\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 OpenNewTabProps extends LGGlyph.ComponentProps {}\nconst OpenNewTab = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: OpenNewTabProps) => {\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, 'OpenNewTab', {\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=\"M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z\" fill={'currentColor'} /><path d=\"M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z\" fill={'currentColor'} /></svg>;\n};\nOpenNewTab.displayName = 'OpenNewTab';\nOpenNewTab.isGlyph = true;\nexport default OpenNewTab;"],"names":["sizeMap","small","default","large","xlarge","OpenNewTab","_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,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAa,SAAHC,GASO,IARrBC,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,aAAYgB,EAAAA,EAAA,CAChErB,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,4dAA4d/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,kcAAkc/B,KAAM,iBAC1sC,SACAR,EAAWwC,YAAc,aACzBxC,EAAWyC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OutlineFavorite.js","sources":["../../src/glyphCommon.ts","../../src/generated/OutlineFavorite.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 083eed322a2beb8496f2c97039c3e6d4\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 OutlineFavoriteProps extends LGGlyph.ComponentProps {}\nconst OutlineFavorite = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: OutlineFavoriteProps) => {\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, 'OutlineFavorite', {\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=\"M7.76906 1.84601C7.76912 1.84614 7.76901 1.84587 7.76906 1.84601ZM7.99989 2.40099L9.30609 5.54144C9.30607 5.54139 9.30611 5.5415 9.30609 5.54144C9.48607 5.97429 9.89318 6.27011 10.3604 6.30757C10.3604 6.30757 10.3604 6.30757 10.3604 6.30757L13.751 6.57939L11.1677 8.79219C10.8115 9.09731 10.6564 9.57588 10.7651 10.0315L11.5542 13.3401L8.65146 11.5672C8.25149 11.3229 7.74839 11.3229 7.34841 11.5671L4.44554 13.3402L5.23476 10.0316C5.3435 9.57566 5.18809 9.09717 4.83207 8.79221C4.83208 8.79222 4.83206 8.7922 4.83207 8.79221L2.24883 6.57938L5.63936 6.30757C5.63936 6.30757 5.63937 6.30757 5.63936 6.30757C6.10663 6.27011 6.51363 5.97437 6.69363 5.54162L7.99989 2.40099ZM14.3501 6.62742C14.3501 6.62742 14.35 6.62741 14.3501 6.62742ZM9.15404 1.26996C8.72705 0.243319 7.27273 0.243376 6.84574 1.26996L5.3673 4.82456L1.52981 5.13221C0.421481 5.22106 -0.0279132 6.60421 0.816504 7.32754C0.816502 7.32754 0.816505 7.32754 0.816504 7.32754L3.74027 9.83206L2.84701 13.5768C2.58901 14.6584 3.76565 15.513 4.71443 14.9336L7.9999 12.9269L11.2854 14.9336C11.2854 14.9336 11.2854 14.9336 11.2854 14.9336C12.2342 15.5131 13.4107 14.6583 13.1527 13.5768C13.1527 13.5768 13.1527 13.5768 13.1527 13.5768L12.2596 9.83201L15.1833 7.32754C16.0275 6.60426 15.5784 5.22107 14.4699 5.13221C14.4699 5.13221 14.4699 5.13221 14.4699 5.13221L10.6325 4.82457L9.15404 1.26996C9.15404 1.26996 9.15404 1.26996 9.15404 1.26996ZM3.85623 9.9314C3.85627 9.93143 3.85619 9.93136 3.85623 9.9314Z\" fill={'currentColor'} /></svg>;\n};\nOutlineFavorite.displayName = 'OutlineFavorite';\nOutlineFavorite.isGlyph = true;\nexport default OutlineFavorite;"],"names":["
|
|
1
|
+
{"version":3,"file":"OutlineFavorite.js","sources":["../../src/glyphCommon.ts","../../src/generated/OutlineFavorite.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 083eed322a2beb8496f2c97039c3e6d4\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 OutlineFavoriteProps extends LGGlyph.ComponentProps {}\nconst OutlineFavorite = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: OutlineFavoriteProps) => {\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, 'OutlineFavorite', {\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=\"M7.76906 1.84601C7.76912 1.84614 7.76901 1.84587 7.76906 1.84601ZM7.99989 2.40099L9.30609 5.54144C9.30607 5.54139 9.30611 5.5415 9.30609 5.54144C9.48607 5.97429 9.89318 6.27011 10.3604 6.30757C10.3604 6.30757 10.3604 6.30757 10.3604 6.30757L13.751 6.57939L11.1677 8.79219C10.8115 9.09731 10.6564 9.57588 10.7651 10.0315L11.5542 13.3401L8.65146 11.5672C8.25149 11.3229 7.74839 11.3229 7.34841 11.5671L4.44554 13.3402L5.23476 10.0316C5.3435 9.57566 5.18809 9.09717 4.83207 8.79221C4.83208 8.79222 4.83206 8.7922 4.83207 8.79221L2.24883 6.57938L5.63936 6.30757C5.63936 6.30757 5.63937 6.30757 5.63936 6.30757C6.10663 6.27011 6.51363 5.97437 6.69363 5.54162L7.99989 2.40099ZM14.3501 6.62742C14.3501 6.62742 14.35 6.62741 14.3501 6.62742ZM9.15404 1.26996C8.72705 0.243319 7.27273 0.243376 6.84574 1.26996L5.3673 4.82456L1.52981 5.13221C0.421481 5.22106 -0.0279132 6.60421 0.816504 7.32754C0.816502 7.32754 0.816505 7.32754 0.816504 7.32754L3.74027 9.83206L2.84701 13.5768C2.58901 14.6584 3.76565 15.513 4.71443 14.9336L7.9999 12.9269L11.2854 14.9336C11.2854 14.9336 11.2854 14.9336 11.2854 14.9336C12.2342 15.5131 13.4107 14.6583 13.1527 13.5768C13.1527 13.5768 13.1527 13.5768 13.1527 13.5768L12.2596 9.83201L15.1833 7.32754C16.0275 6.60426 15.5784 5.22107 14.4699 5.13221C14.4699 5.13221 14.4699 5.13221 14.4699 5.13221L10.6325 4.82457L9.15404 1.26996C9.15404 1.26996 9.15404 1.26996 9.15404 1.26996ZM3.85623 9.9314C3.85627 9.93143 3.85619 9.93136 3.85623 9.9314Z\" fill={'currentColor'} /></svg>;\n};\nOutlineFavorite.displayName = 'OutlineFavorite';\nOutlineFavorite.isGlyph = true;\nexport default OutlineFavorite;"],"names":["sizeMap","small","default","large","xlarge","OutlineFavorite","_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":"+9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAkB,SAAHC,GASO,IAR1BC,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,kBAAiBgB,EAAAA,EAAA,CACrErB,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,u7CAAu7CjC,KAAM,iBACzuD,SACAR,EAAgB0C,YAAc,kBAC9B1C,EAAgB2C,SAAU"}
|
package/dist/umd/Package.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Package.js","sources":["../../src/glyphCommon.ts","../../src/generated/Package.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 80ef69108a03312295187bd343f0835a\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 PackageProps extends LGGlyph.ComponentProps {}\nconst Package = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PackageProps) => {\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, 'Package', {\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.78017 1.21077L13.4652 3.92807C13.947 4.20828 14.2433 4.72229 14.2433 5.27913V10.7209C14.2433 10.9945 14.1715 11.2633 14.0349 11.5005C13.8983 11.7376 13.7019 11.9346 13.4652 12.0719L8.78017 14.7892C8.54213 14.9273 8.27184 15 7.99666 15C7.72148 15 7.45119 14.9273 7.21315 14.7892L2.52816 12.0719C2.29145 11.9346 2.09498 11.7376 1.95841 11.5005C1.82184 11.2633 1.74997 10.9945 1.75 10.7209V5.27913C1.75 4.72229 2.04627 4.20738 2.52816 3.92807L7.21315 1.21077C7.45119 1.07271 7.72148 1 7.99666 1C8.27184 1 8.54213 1.07271 8.78017 1.21077ZM7.88511 2.36908L3.75339 4.76512L7.99666 7.22631L12.2399 4.76512L8.10821 2.36908C8.07435 2.34932 8.03586 2.33891 7.99666 2.33891C7.95746 2.33891 7.91897 2.34932 7.88511 2.36908ZM3.08857 5.927V10.7209C3.08857 10.8012 3.13051 10.8735 3.20012 10.9136L7.32737 13.3079V8.38551L3.08857 5.927ZM8.66594 13.3079L12.7932 10.9136C12.8271 10.8941 12.8552 10.866 12.8747 10.8322C12.8943 10.7983 12.9047 10.76 12.9047 10.7209V5.927L8.66594 8.38551V13.3079Z\" fill={'currentColor'} /></svg>;\n};\nPackage.displayName = 'Package';\nPackage.isGlyph = true;\nexport default Package;"],"names":["
|
|
1
|
+
{"version":3,"file":"Package.js","sources":["../../src/glyphCommon.ts","../../src/generated/Package.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 80ef69108a03312295187bd343f0835a\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 PackageProps extends LGGlyph.ComponentProps {}\nconst Package = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PackageProps) => {\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, 'Package', {\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.78017 1.21077L13.4652 3.92807C13.947 4.20828 14.2433 4.72229 14.2433 5.27913V10.7209C14.2433 10.9945 14.1715 11.2633 14.0349 11.5005C13.8983 11.7376 13.7019 11.9346 13.4652 12.0719L8.78017 14.7892C8.54213 14.9273 8.27184 15 7.99666 15C7.72148 15 7.45119 14.9273 7.21315 14.7892L2.52816 12.0719C2.29145 11.9346 2.09498 11.7376 1.95841 11.5005C1.82184 11.2633 1.74997 10.9945 1.75 10.7209V5.27913C1.75 4.72229 2.04627 4.20738 2.52816 3.92807L7.21315 1.21077C7.45119 1.07271 7.72148 1 7.99666 1C8.27184 1 8.54213 1.07271 8.78017 1.21077ZM7.88511 2.36908L3.75339 4.76512L7.99666 7.22631L12.2399 4.76512L8.10821 2.36908C8.07435 2.34932 8.03586 2.33891 7.99666 2.33891C7.95746 2.33891 7.91897 2.34932 7.88511 2.36908ZM3.08857 5.927V10.7209C3.08857 10.8012 3.13051 10.8735 3.20012 10.9136L7.32737 13.3079V8.38551L3.08857 5.927ZM8.66594 13.3079L12.7932 10.9136C12.8271 10.8941 12.8552 10.866 12.8747 10.8322C12.8943 10.7983 12.9047 10.76 12.9047 10.7209V5.927L8.66594 8.38551V13.3079Z\" fill={'currentColor'} /></svg>;\n};\nPackage.displayName = 'Package';\nPackage.isGlyph = true;\nexport default Package;"],"names":["sizeMap","small","default","large","xlarge","Package","_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":"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,EAAE,s9BAAs9B/B,KAAM,iBACluC,SACAR,EAAQwC,YAAc,UACtBxC,EAAQyC,SAAU"}
|
package/dist/umd/Pause.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pause.js","sources":["../../src/glyphCommon.ts","../../src/generated/Pause.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 32498b21a72a9ac79ad0f49862796caf\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 PauseProps extends LGGlyph.ComponentProps {}\nconst Pause = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PauseProps) => {\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, 'Pause', {\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.5 3.83333C3.5 3.3731 3.94771 3 4.5 3H5.5C6.05228 3 6.5 3.3731 6.5 3.83333V12.1667C6.5 12.6269 6.05228 13 5.5 13H4.5C3.94771 13 3.5 12.6269 3.5 12.1667V3.83333Z\" fill={'currentColor'} /><path d=\"M9.5 3.83333C9.5 3.3731 9.94772 3 10.5 3H11.5C12.0523 3 12.5 3.3731 12.5 3.83333V12.1667C12.5 12.6269 12.0523 13 11.5 13H10.5C9.94771 13 9.5 12.6269 9.5 12.1667V3.83333Z\" fill={'currentColor'} /></svg>;\n};\nPause.displayName = 'Pause';\nPause.isGlyph = true;\nexport default Pause;"],"names":["
|
|
1
|
+
{"version":3,"file":"Pause.js","sources":["../../src/glyphCommon.ts","../../src/generated/Pause.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 32498b21a72a9ac79ad0f49862796caf\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 PauseProps extends LGGlyph.ComponentProps {}\nconst Pause = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PauseProps) => {\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, 'Pause', {\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.5 3.83333C3.5 3.3731 3.94771 3 4.5 3H5.5C6.05228 3 6.5 3.3731 6.5 3.83333V12.1667C6.5 12.6269 6.05228 13 5.5 13H4.5C3.94771 13 3.5 12.6269 3.5 12.1667V3.83333Z\" fill={'currentColor'} /><path d=\"M9.5 3.83333C9.5 3.3731 9.94772 3 10.5 3H11.5C12.0523 3 12.5 3.3731 12.5 3.83333V12.1667C12.5 12.6269 12.0523 13 11.5 13H10.5C9.94771 13 9.5 12.6269 9.5 12.1667V3.83333Z\" fill={'currentColor'} /></svg>;\n};\nPause.displayName = 'Pause';\nPause.isGlyph = true;\nexport default Pause;"],"names":["sizeMap","small","default","large","xlarge","Pause","_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,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,QAAOgB,EAAAA,EAAA,CAC3DrB,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,qKAAqK/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,4KAA4K/B,KAAM,iBAC7nB,SACAR,EAAMwC,YAAc,QACpBxC,EAAMyC,SAAU"}
|
package/dist/umd/Pending.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pending.js","sources":["../../src/glyphCommon.ts","../../src/generated/Pending.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 fe84beb7e01f087e26cb0e1d62e38a96\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 PendingProps extends LGGlyph.ComponentProps {}\nconst Pending = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PendingProps) => {\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, 'Pending', {\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 11.75C10.0711 11.75 11.75 10.0711 11.75 8C11.75 5.92893 10.0711 4.25 8 4.25C5.92893 4.25 4.25 5.92893 4.25 8C4.25 10.0711 5.92893 11.75 8 11.75ZM8 13.25C10.8995 13.25 13.25 10.8995 13.25 8C13.25 5.10051 10.8995 2.75 8 2.75C5.10051 2.75 2.75 5.10051 2.75 8C2.75 10.8995 5.10051 13.25 8 13.25Z\" fill={'currentColor'} /></svg>;\n};\nPending.displayName = 'Pending';\nPending.isGlyph = true;\nexport default Pending;"],"names":["
|
|
1
|
+
{"version":3,"file":"Pending.js","sources":["../../src/glyphCommon.ts","../../src/generated/Pending.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 fe84beb7e01f087e26cb0e1d62e38a96\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 PendingProps extends LGGlyph.ComponentProps {}\nconst Pending = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PendingProps) => {\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, 'Pending', {\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 11.75C10.0711 11.75 11.75 10.0711 11.75 8C11.75 5.92893 10.0711 4.25 8 4.25C5.92893 4.25 4.25 5.92893 4.25 8C4.25 10.0711 5.92893 11.75 8 11.75ZM8 13.25C10.8995 13.25 13.25 10.8995 13.25 8C13.25 5.10051 10.8995 2.75 8 2.75C5.10051 2.75 2.75 5.10051 2.75 8C2.75 10.8995 5.10051 13.25 8 13.25Z\" fill={'currentColor'} /></svg>;\n};\nPending.displayName = 'Pending';\nPending.isGlyph = true;\nexport default Pending;"],"names":["sizeMap","small","default","large","xlarge","Pending","_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,ySAAySjC,KAAM,iBAC3lB,SACAR,EAAQ0C,YAAc,UACtB1C,EAAQ2C,SAAU"}
|
package/dist/umd/Person.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Person.js","sources":["../../src/glyphCommon.ts","../../src/generated/Person.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 5b759e05777425b9385a72c39e349284\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 PersonProps extends LGGlyph.ComponentProps {}\nconst Person = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PersonProps) => {\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, 'Person', {\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=\"M11.5 4.5C11.5 6.433 9.933 8 8 8C6.067 8 4.5 6.433 4.5 4.5C4.5 2.567 6.067 1 8 1C9.933 1 11.5 2.567 11.5 4.5Z\" fill={'currentColor'} /><path d=\"M8 8C7.29183 8 6.63278 7.78968 6.08191 7.42809C6.66376 7.15352 7.31395 7 8 7C8.68605 7 9.33624 7.15352 9.91809 7.42809C9.36722 7.78968 8.70817 8 8 8Z\" fill={'currentColor'} /><path d=\"M4.591 8.56241C4.89921 8.20507 5.42858 8.22348 5.84253 8.45005C6.48309 8.80067 7.21827 9 8 9C8.78173 9 9.51691 8.80067 10.1575 8.45005C10.5714 8.22348 11.1008 8.20507 11.409 8.56241C12.0889 9.3507 12.5 10.3773 12.5 11.5V14H3.5V11.5C3.5 10.3773 3.91111 9.3507 4.591 8.56241Z\" fill={'currentColor'} /></svg>;\n};\nPerson.displayName = 'Person';\nPerson.isGlyph = true;\nexport default Person;"],"names":["
|
|
1
|
+
{"version":3,"file":"Person.js","sources":["../../src/glyphCommon.ts","../../src/generated/Person.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 5b759e05777425b9385a72c39e349284\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 PersonProps extends LGGlyph.ComponentProps {}\nconst Person = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PersonProps) => {\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, 'Person', {\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=\"M11.5 4.5C11.5 6.433 9.933 8 8 8C6.067 8 4.5 6.433 4.5 4.5C4.5 2.567 6.067 1 8 1C9.933 1 11.5 2.567 11.5 4.5Z\" fill={'currentColor'} /><path d=\"M8 8C7.29183 8 6.63278 7.78968 6.08191 7.42809C6.66376 7.15352 7.31395 7 8 7C8.68605 7 9.33624 7.15352 9.91809 7.42809C9.36722 7.78968 8.70817 8 8 8Z\" fill={'currentColor'} /><path d=\"M4.591 8.56241C4.89921 8.20507 5.42858 8.22348 5.84253 8.45005C6.48309 8.80067 7.21827 9 8 9C8.78173 9 9.51691 8.80067 10.1575 8.45005C10.5714 8.22348 11.1008 8.20507 11.409 8.56241C12.0889 9.3507 12.5 10.3773 12.5 11.5V14H3.5V11.5C3.5 10.3773 3.91111 9.3507 4.591 8.56241Z\" fill={'currentColor'} /></svg>;\n};\nPerson.displayName = 'Person';\nPerson.isGlyph = true;\nexport default Person;"],"names":["sizeMap","small","default","large","xlarge","Person","_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,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,SAAQgB,EAAAA,EAAA,CAC5DrB,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,gHAAgH/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,wJAAwJ/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,oRAAoR/B,KAAM,iBACx2B,SACAR,EAAOwC,YAAc,SACrBxC,EAAOyC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonGroup.js","sources":["../../src/glyphCommon.ts","../../src/generated/PersonGroup.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 601e6ecb1c75062c883f6a0b71dcea16\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 PersonGroupProps extends LGGlyph.ComponentProps {}\nconst PersonGroup = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PersonGroupProps) => {\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, 'PersonGroup', {\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=\"M4.80769 8.92308C6.44331 8.92308 7.76923 7.59715 7.76923 5.96154C7.76923 4.32593 6.44331 3 4.80769 3C3.17208 3 1.84615 4.32593 1.84615 5.96154C1.84615 7.59715 3.17208 8.92308 4.80769 8.92308Z\" fill={'currentColor'} /><path d=\"M2.98214 9.30389C2.63188 9.11218 2.18394 9.0966 1.92316 9.39897C1.34786 10.066 1 10.9347 1 11.8846V14H8.61539V11.8846C8.61539 10.9347 8.26752 10.066 7.69223 9.39897C7.43144 9.0966 6.98351 9.11218 6.63325 9.30389C6.09123 9.60056 5.46916 9.76923 4.80769 9.76923C4.14623 9.76923 3.52415 9.60056 2.98214 9.30389Z\" fill={'currentColor'} /><path d=\"M9.61539 11.8846V13H15V11.0942C15 10.3601 14.7259 9.68888 14.2727 9.17347C14.0672 8.93982 13.7143 8.95186 13.4383 9.1C13.0113 9.32925 12.5212 9.45958 12 9.45958C11.4789 9.45958 10.9887 9.32925 10.5617 9.1C10.2857 8.95186 9.93282 8.93982 9.72735 9.17347C9.51772 9.41185 9.34641 9.68357 9.22282 9.97942C9.47531 10.5638 9.61539 11.2083 9.61539 11.8846Z\" fill={'currentColor'} /><path d=\"M14.3334 6.28846C14.3334 7.55234 13.2887 8.57692 12 8.57692C10.7114 8.57692 9.66668 7.55234 9.66668 6.28846C9.66668 5.02458 10.7114 4 12 4C13.2887 4 14.3334 5.02458 14.3334 6.28846Z\" fill={'currentColor'} /></svg>;\n};\nPersonGroup.displayName = 'PersonGroup';\nPersonGroup.isGlyph = true;\nexport default PersonGroup;"],"names":["
|
|
1
|
+
{"version":3,"file":"PersonGroup.js","sources":["../../src/glyphCommon.ts","../../src/generated/PersonGroup.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 601e6ecb1c75062c883f6a0b71dcea16\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 PersonGroupProps extends LGGlyph.ComponentProps {}\nconst PersonGroup = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PersonGroupProps) => {\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, 'PersonGroup', {\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=\"M4.80769 8.92308C6.44331 8.92308 7.76923 7.59715 7.76923 5.96154C7.76923 4.32593 6.44331 3 4.80769 3C3.17208 3 1.84615 4.32593 1.84615 5.96154C1.84615 7.59715 3.17208 8.92308 4.80769 8.92308Z\" fill={'currentColor'} /><path d=\"M2.98214 9.30389C2.63188 9.11218 2.18394 9.0966 1.92316 9.39897C1.34786 10.066 1 10.9347 1 11.8846V14H8.61539V11.8846C8.61539 10.9347 8.26752 10.066 7.69223 9.39897C7.43144 9.0966 6.98351 9.11218 6.63325 9.30389C6.09123 9.60056 5.46916 9.76923 4.80769 9.76923C4.14623 9.76923 3.52415 9.60056 2.98214 9.30389Z\" fill={'currentColor'} /><path d=\"M9.61539 11.8846V13H15V11.0942C15 10.3601 14.7259 9.68888 14.2727 9.17347C14.0672 8.93982 13.7143 8.95186 13.4383 9.1C13.0113 9.32925 12.5212 9.45958 12 9.45958C11.4789 9.45958 10.9887 9.32925 10.5617 9.1C10.2857 8.95186 9.93282 8.93982 9.72735 9.17347C9.51772 9.41185 9.34641 9.68357 9.22282 9.97942C9.47531 10.5638 9.61539 11.2083 9.61539 11.8846Z\" fill={'currentColor'} /><path d=\"M14.3334 6.28846C14.3334 7.55234 13.2887 8.57692 12 8.57692C10.7114 8.57692 9.66668 7.55234 9.66668 6.28846C9.66668 5.02458 10.7114 4 12 4C13.2887 4 14.3334 5.02458 14.3334 6.28846Z\" fill={'currentColor'} /></svg>;\n};\nPersonGroup.displayName = 'PersonGroup';\nPersonGroup.isGlyph = true;\nexport default PersonGroup;"],"names":["sizeMap","small","default","large","xlarge","PersonGroup","_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,kMAAkM/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,uTAAuT/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,gWAAgW/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,wLAAwL/B,KAAM,iBAC73C,SACAR,EAAYwC,YAAc,cAC1BxC,EAAYyC,SAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonWithLock.js","sources":["../../src/glyphCommon.ts","../../src/generated/PersonWithLock.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 fd61868248373ec9a8906e59814e6799\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 PersonWithLockProps extends LGGlyph.ComponentProps {}\nconst PersonWithLock = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PersonWithLockProps) => {\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, 'PersonWithLock', {\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.72482 9.37085 6.8027 8.41809 7.42809C7.86722 7.78968 7.20817 8 6.5 8C5.83553 8 5.21431 7.81484 4.68512 7.49329C4.65031 7.47214 4.6159 7.4504 4.58191 7.42809C3.62915 6.8027 3 5.72482 3 4.5C3 2.567 4.567 1 6.5 1C8.433 1 10 2.567 10 4.5Z\" fill={'currentColor'} /><path d=\"M4.34253 8.45005C3.92858 8.22348 3.39921 8.20507 3.091 8.56241C2.41111 9.3507 2 10.3773 2 11.5V14H8V11.5C8 11.0546 8.19412 10.6546 8.50236 10.3798C8.53463 9.56068 8.89535 8.82593 9.45648 8.30362C9.19722 8.2528 8.90646 8.31377 8.65747 8.45005C8.01691 8.80067 7.28173 9 6.5 9C5.71827 9 4.98309 8.80067 4.34253 8.45005Z\" fill={'currentColor'} /><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M9.5 10.5V11C9.22386 11 9 11.2239 9 11.5V14.5C9 14.7761 9.22386 15 9.5 15H13.5C13.7761 15 14 14.7761 14 14.5V11.5C14 11.2239 13.7761 11 13.5 11V10.5C13.5 9.39543 12.6046 8.5 11.5 8.5C10.3954 8.5 9.5 9.39543 9.5 10.5ZM11.5 9.5C10.9477 9.5 10.5 9.94771 10.5 10.5V11H12.5V10.5C12.5 9.94771 12.0523 9.5 11.5 9.5Z\" fill={'currentColor'} /></svg>;\n};\nPersonWithLock.displayName = 'PersonWithLock';\nPersonWithLock.isGlyph = true;\nexport default PersonWithLock;"],"names":["
|
|
1
|
+
{"version":3,"file":"PersonWithLock.js","sources":["../../src/glyphCommon.ts","../../src/generated/PersonWithLock.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 fd61868248373ec9a8906e59814e6799\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 PersonWithLockProps extends LGGlyph.ComponentProps {}\nconst PersonWithLock = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PersonWithLockProps) => {\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, 'PersonWithLock', {\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.72482 9.37085 6.8027 8.41809 7.42809C7.86722 7.78968 7.20817 8 6.5 8C5.83553 8 5.21431 7.81484 4.68512 7.49329C4.65031 7.47214 4.6159 7.4504 4.58191 7.42809C3.62915 6.8027 3 5.72482 3 4.5C3 2.567 4.567 1 6.5 1C8.433 1 10 2.567 10 4.5Z\" fill={'currentColor'} /><path d=\"M4.34253 8.45005C3.92858 8.22348 3.39921 8.20507 3.091 8.56241C2.41111 9.3507 2 10.3773 2 11.5V14H8V11.5C8 11.0546 8.19412 10.6546 8.50236 10.3798C8.53463 9.56068 8.89535 8.82593 9.45648 8.30362C9.19722 8.2528 8.90646 8.31377 8.65747 8.45005C8.01691 8.80067 7.28173 9 6.5 9C5.71827 9 4.98309 8.80067 4.34253 8.45005Z\" fill={'currentColor'} /><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M9.5 10.5V11C9.22386 11 9 11.2239 9 11.5V14.5C9 14.7761 9.22386 15 9.5 15H13.5C13.7761 15 14 14.7761 14 14.5V11.5C14 11.2239 13.7761 11 13.5 11V10.5C13.5 9.39543 12.6046 8.5 11.5 8.5C10.3954 8.5 9.5 9.39543 9.5 10.5ZM11.5 9.5C10.9477 9.5 10.5 9.94771 10.5 10.5V11H12.5V10.5C12.5 9.94771 12.0523 9.5 11.5 9.5Z\" fill={'currentColor'} /></svg>;\n};\nPersonWithLock.displayName = 'PersonWithLock';\nPersonWithLock.isGlyph = true;\nexport default PersonWithLock;"],"names":["sizeMap","small","default","large","xlarge","PersonWithLock","_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","fillRule","clipRule","displayName","isGlyph"],"mappings":"89CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAiB,SAAHC,GASO,IARzBC,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,iBAAgBgB,EAAAA,EAAA,CACpErB,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,0PAA0P/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMO,EAAE,+TAA+T/B,KAAM,iBAAkBuB,EAAAC,cAAA,OAAA,CAAMQ,SAAS,UAAUC,SAAS,UAAUF,EAAE,uTAAuT/B,KAAM,iBACluC,SACAR,EAAe0C,YAAc,iBAC7B1C,EAAe2C,SAAU"}
|
package/dist/umd/Pin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pin.js","sources":["../../src/glyphCommon.ts","../../src/generated/Pin.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 58e7153beda5946ddc4f29eb31ddb2f2\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 PinProps extends LGGlyph.ComponentProps {}\nconst Pin = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PinProps) => {\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, 'Pin', {\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 8.5V3.3H10.6833C11.0423 3.3 11.3333 3.00898 11.3333 2.65C11.3333 2.29101 11.0423 2 10.6833 2H5.31667C4.95768 2 4.66667 2.29101 4.66667 2.65C4.66667 3.00898 4.95768 3.3 5.31667 3.3H6V8.5L4.38343 9.55077C4.14428 9.70621 4 9.97208 4 10.2573C4 10.7227 4.37728 11.1 4.84269 11.1H7.46667V14.4667C7.46667 14.7612 7.70545 15 8 15C8.29455 15 8.53333 14.7612 8.53333 14.4667V11.1H11.1573C11.6227 11.1 12 10.7227 12 10.2573C12 9.97208 11.8557 9.70622 11.6166 9.55077L10 8.5Z\" fill={'currentColor'} /></svg>;\n};\nPin.displayName = 'Pin';\nPin.isGlyph = true;\nexport default Pin;"],"names":["
|
|
1
|
+
{"version":3,"file":"Pin.js","sources":["../../src/glyphCommon.ts","../../src/generated/Pin.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 58e7153beda5946ddc4f29eb31ddb2f2\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 PinProps extends LGGlyph.ComponentProps {}\nconst Pin = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PinProps) => {\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, 'Pin', {\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 8.5V3.3H10.6833C11.0423 3.3 11.3333 3.00898 11.3333 2.65C11.3333 2.29101 11.0423 2 10.6833 2H5.31667C4.95768 2 4.66667 2.29101 4.66667 2.65C4.66667 3.00898 4.95768 3.3 5.31667 3.3H6V8.5L4.38343 9.55077C4.14428 9.70621 4 9.97208 4 10.2573C4 10.7227 4.37728 11.1 4.84269 11.1H7.46667V14.4667C7.46667 14.7612 7.70545 15 8 15C8.29455 15 8.53333 14.7612 8.53333 14.4667V11.1H11.1573C11.6227 11.1 12 10.7227 12 10.2573C12 9.97208 11.8557 9.70622 11.6166 9.55077L10 8.5Z\" fill={'currentColor'} /></svg>;\n};\nPin.displayName = 'Pin';\nPin.isGlyph = true;\nexport default Pin;"],"names":["sizeMap","small","default","large","xlarge","Pin","_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":"m9CASO,QAAMA,EAAgC,CAC3CC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,oFCDJC,EAAM,SAAHC,GASO,IARdC,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,MAAKgB,EAAAA,EAAA,CACzDrB,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,sdAAsd/B,KAAM,iBACluB,SACAR,EAAIwC,YAAc,MAClBxC,EAAIyC,SAAU"}
|
package/dist/umd/Play.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Play.js","sources":["../../src/glyphCommon.ts","../../src/generated/Play.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 dd63d3e1a63feb369c7793579dc03cb4\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 PlayProps extends LGGlyph.ComponentProps {}\nconst Play = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PlayProps) => {\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, 'Play', {\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.7789 6.70433C14.7711 7.28315 14.7711 8.71685 13.7789 9.29567L6.25581 13.6841C5.25582 14.2674 4 13.5461 4 12.3884L4 3.61155C4 2.45387 5.25582 1.73256 6.25581 2.31589L13.7789 6.70433Z\" fill={'currentColor'} /></svg>;\n};\nPlay.displayName = 'Play';\nPlay.isGlyph = true;\nexport default Play;"],"names":["
|
|
1
|
+
{"version":3,"file":"Play.js","sources":["../../src/glyphCommon.ts","../../src/generated/Play.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 dd63d3e1a63feb369c7793579dc03cb4\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 PlayProps extends LGGlyph.ComponentProps {}\nconst Play = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PlayProps) => {\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, 'Play', {\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.7789 6.70433C14.7711 7.28315 14.7711 8.71685 13.7789 9.29567L6.25581 13.6841C5.25582 14.2674 4 13.5461 4 12.3884L4 3.61155C4 2.45387 5.25582 1.73256 6.25581 2.31589L13.7789 6.70433Z\" fill={'currentColor'} /></svg>;\n};\nPlay.displayName = 'Play';\nPlay.isGlyph = true;\nexport default Play;"],"names":["sizeMap","small","default","large","xlarge","Play","_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,4LAA4LjC,KAAM,iBAC9e,SACAR,EAAK0C,YAAc,OACnB1C,EAAK2C,SAAU"}
|
package/dist/umd/Plus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plus.js","sources":["../../src/glyphCommon.ts","../../src/generated/Plus.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 2985e7c22cafc8aee7499ec3e9e99d3c\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 PlusProps extends LGGlyph.ComponentProps {}\nconst Plus = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PlusProps) => {\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, 'Plus', {\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=\"M7.5 2C6.94772 2 6.5 2.44772 6.5 3V6.5H3C2.44772 6.5 2 6.94772 2 7.5V8.5C2 9.05228 2.44772 9.5 3 9.5H6.5V13C6.5 13.5523 6.94772 14 7.5 14H8.5C9.05228 14 9.5 13.5523 9.5 13V9.5H13C13.5523 9.5 14 9.05228 14 8.5V7.5C14 6.94771 13.5523 6.5 13 6.5H9.5V3C9.5 2.44772 9.05228 2 8.5 2H7.5Z\" fill={'currentColor'} /></svg>;\n};\nPlus.displayName = 'Plus';\nPlus.isGlyph = true;\nexport default Plus;"],"names":["
|
|
1
|
+
{"version":3,"file":"Plus.js","sources":["../../src/glyphCommon.ts","../../src/generated/Plus.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 2985e7c22cafc8aee7499ec3e9e99d3c\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 PlusProps extends LGGlyph.ComponentProps {}\nconst Plus = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: PlusProps) => {\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, 'Plus', {\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=\"M7.5 2C6.94772 2 6.5 2.44772 6.5 3V6.5H3C2.44772 6.5 2 6.94772 2 7.5V8.5C2 9.05228 2.44772 9.5 3 9.5H6.5V13C6.5 13.5523 6.94772 14 7.5 14H8.5C9.05228 14 9.5 13.5523 9.5 13V9.5H13C13.5523 9.5 14 9.05228 14 8.5V7.5C14 6.94771 13.5523 6.5 13 6.5H9.5V3C9.5 2.44772 9.05228 2 8.5 2H7.5Z\" fill={'currentColor'} /></svg>;\n};\nPlus.displayName = 'Plus';\nPlus.isGlyph = true;\nexport default Plus;"],"names":["sizeMap","small","default","large","xlarge","Plus","_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,4RAA4RjC,KAAM,iBAC9kB,SACAR,EAAK0C,YAAc,OACnB1C,EAAK2C,SAAU"}
|