@leafygreen-ui/icon 11.5.0 → 11.7.0
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 +23 -0
- package/README.md +7 -7
- package/dist/Clock.js +2 -0
- package/dist/Clock.js.map +1 -0
- package/dist/ClockWithArrow.js +2 -0
- package/dist/ClockWithArrow.js.map +1 -0
- package/dist/Connect.js +2 -0
- package/dist/Connect.js.map +1 -0
- package/dist/Disconnect.js +2 -0
- package/dist/Disconnect.js.map +1 -0
- package/dist/Key.js +2 -0
- package/dist/Key.js.map +1 -0
- package/dist/Note.js +2 -0
- package/dist/Note.js.map +1 -0
- package/dist/Redo.js +2 -0
- package/dist/Redo.js.map +1 -0
- package/dist/ReplicaSet.js +2 -0
- package/dist/ReplicaSet.js.map +1 -0
- package/dist/Serverless.js +2 -0
- package/dist/Serverless.js.map +1 -0
- package/dist/ShardedCluster.js +2 -0
- package/dist/ShardedCluster.js.map +1 -0
- package/dist/Table.js.map +1 -1
- package/dist/Undo.js +2 -0
- package/dist/Undo.js.map +1 -0
- package/dist/esm/Clock.js +2 -0
- package/dist/esm/Clock.js.map +1 -0
- package/dist/esm/ClockWithArrow.js +2 -0
- package/dist/esm/ClockWithArrow.js.map +1 -0
- package/dist/esm/Connect.js +2 -0
- package/dist/esm/Connect.js.map +1 -0
- package/dist/esm/Disconnect.js +2 -0
- package/dist/esm/Disconnect.js.map +1 -0
- package/dist/esm/Key.js +2 -0
- package/dist/esm/Key.js.map +1 -0
- package/dist/esm/Note.js +2 -0
- package/dist/esm/Note.js.map +1 -0
- package/dist/esm/Redo.js +2 -0
- package/dist/esm/Redo.js.map +1 -0
- package/dist/esm/ReplicaSet.js +2 -0
- package/dist/esm/ReplicaSet.js.map +1 -0
- package/dist/esm/Serverless.js +2 -0
- package/dist/esm/Serverless.js.map +1 -0
- package/dist/esm/ShardedCluster.js +2 -0
- package/dist/esm/ShardedCluster.js.map +1 -0
- package/dist/esm/Table.js.map +1 -1
- package/dist/esm/Undo.js +2 -0
- package/dist/esm/Undo.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/generated/Clock.d.ts +23 -0
- package/dist/generated/Clock.d.ts.map +1 -0
- package/dist/generated/ClockWithArrow.d.ts +23 -0
- package/dist/generated/ClockWithArrow.d.ts.map +1 -0
- package/dist/generated/Connect.d.ts +23 -0
- package/dist/generated/Connect.d.ts.map +1 -0
- package/dist/generated/Disconnect.d.ts +23 -0
- package/dist/generated/Disconnect.d.ts.map +1 -0
- package/dist/generated/Key.d.ts +23 -0
- package/dist/generated/Key.d.ts.map +1 -0
- package/dist/generated/Note.d.ts +23 -0
- package/dist/generated/Note.d.ts.map +1 -0
- package/dist/generated/Redo.d.ts +23 -0
- package/dist/generated/Redo.d.ts.map +1 -0
- package/dist/generated/ReplicaSet.d.ts +23 -0
- package/dist/generated/ReplicaSet.d.ts.map +1 -0
- package/dist/generated/Serverless.d.ts +23 -0
- package/dist/generated/Serverless.d.ts.map +1 -0
- package/dist/generated/ShardedCluster.d.ts +23 -0
- package/dist/generated/ShardedCluster.d.ts.map +1 -0
- package/dist/generated/Table.d.ts +1 -1
- package/dist/generated/Undo.d.ts +23 -0
- package/dist/generated/Undo.d.ts.map +1 -0
- package/dist/glyphs/index.d.ts +1 -1
- package/dist/glyphs/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/Icon.story.tsx +2 -1
- package/src/generated/Clock.tsx +68 -0
- package/src/generated/ClockWithArrow.tsx +70 -0
- package/src/generated/Connect.tsx +68 -0
- package/src/generated/Disconnect.tsx +72 -0
- package/src/generated/Key.tsx +68 -0
- package/src/generated/Note.tsx +76 -0
- package/src/generated/Redo.tsx +66 -0
- package/src/generated/ReplicaSet.tsx +68 -0
- package/src/generated/Serverless.tsx +66 -0
- package/src/generated/ShardedCluster.tsx +68 -0
- package/src/generated/Table.tsx +1 -1
- package/src/generated/Undo.tsx +66 -0
- package/src/glyphs/Clock.svg +3 -0
- package/src/glyphs/ClockWithArrow.svg +4 -0
- package/src/glyphs/Connect.svg +3 -0
- package/src/glyphs/Disconnect.svg +4 -0
- package/src/glyphs/Key.svg +3 -0
- package/src/glyphs/Note.svg +5 -0
- package/src/glyphs/Redo.svg +3 -0
- package/src/glyphs/ReplicaSet.svg +3 -0
- package/src/glyphs/Serverless.svg +3 -0
- package/src/glyphs/ShardedCluster.svg +3 -0
- package/src/glyphs/Table.svg +1 -1
- package/src/glyphs/Undo.svg +3 -0
- package/src/glyphs/index.ts +24 -2
- package/tsconfig.tsbuildinfo +229 -12
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/glyphCommon.ts","../src/createIconComponent.tsx","../src/createGlyphComponent.tsx","../src/glyphs/index.ts","../src/index.ts","../src/isComponentGlyph.ts"],"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}\n\ntype AccessibleFunctionReturnType =\n | AccessibleFunctionParams\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 }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img':\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n return {\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n title,\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","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { LGGlyph } from './types';\nimport { Size } from './glyphCommon';\n\n// We omit size here because we map string values for size to numbers in this component.\nexport interface IconProps extends Omit<LGGlyph.ComponentProps, 'size'> {\n glyph: string;\n size?: Size | number;\n}\n\ntype GlyphObject = Record<string, LGGlyph.Component>;\n\nexport default function createIconComponent<\n G extends GlyphObject = GlyphObject\n>(glyphs: G) {\n const Icon = ({ glyph, ...rest }: IconProps) => {\n const SVGComponent = glyphs[glyph];\n\n return <SVGComponent {...rest} />;\n };\n\n Icon.displayName = 'Icon';\n\n Icon.propTypes = {\n glyph: PropTypes.oneOf(Object.keys(glyphs)).isRequired,\n size: PropTypes.oneOfType([\n PropTypes.oneOf(Object.values(Size)),\n PropTypes.number,\n ]),\n } as any;\n\n return Icon;\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { SVGR, LGGlyph } from './types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap, Size } from './glyphCommon';\n\nexport default function createGlyphComponent(\n glyphName: string,\n Glyph: SVGR.Component,\n): LGGlyph.Component {\n function GlyphComponent({\n className,\n size = Size.Default,\n fill,\n title,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n role = 'img',\n ...rest\n }: LGGlyph.ComponentProps) {\n const fillStyle = css`\n color: ${fill};\n `;\n\n const renderedSize = typeof size === 'number' ? size : sizeMap[size];\n\n if (!(role === 'img' || role === 'presentation')) {\n console.warn(\n \"Please provide a valid role to this component. Valid options are 'img' and 'presentation'. If you'd like the Icon to be accessible to screen readers please use 'img', otherwise set the role to 'presentation'.\",\n );\n }\n\n return (\n <Glyph\n className={cx(\n {\n [fillStyle]: fill != null,\n },\n className,\n )}\n height={renderedSize}\n width={renderedSize}\n role={role}\n {...generateAccessibleProps(role, glyphName, {\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n })}\n {...rest}\n />\n );\n }\n\n GlyphComponent.displayName = glyphName;\n\n GlyphComponent.isGlyph = true;\n\n GlyphComponent.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([\n PropTypes.oneOf(Object.values(Size)),\n PropTypes.number,\n ]),\n className: PropTypes.string,\n };\n\n return GlyphComponent;\n}\n","import createGlyphComponent from '../createGlyphComponent';\nimport { LGGlyph } from '../types';\n\n// Glyphs\nimport ActivityFeed from './ActivityFeed.svg';\nimport AddFile from './AddFile.svg';\nimport Apps from './Apps.svg';\nimport Array from './Array.svg';\nimport ArrowDown from './ArrowDown.svg';\nimport ArrowLeft from './ArrowLeft.svg';\nimport ArrowRight from './ArrowRight.svg';\nimport ArrowUp from './ArrowUp.svg';\nimport Beaker from './Beaker.svg';\nimport Bell from './Bell.svg';\nimport Building from './Building.svg';\nimport Bulb from './Bulb.svg';\nimport Calendar from './Calendar.svg';\nimport CaretDown from './CaretDown.svg';\nimport CaretLeft from './CaretLeft.svg';\nimport CaretRight from './CaretRight.svg';\nimport CaretUp from './CaretUp.svg';\nimport Charts from './Charts.svg';\nimport Checkmark from './Checkmark.svg';\nimport CheckmarkWithCircle from './CheckmarkWithCircle.svg';\nimport ChevronUp from './ChevronUp.svg';\nimport ChevronDown from './ChevronDown.svg';\nimport ChevronRight from './ChevronRight.svg';\nimport ChevronLeft from './ChevronLeft.svg';\nimport Clone from './Clone.svg';\nimport Cloud from './Cloud.svg';\nimport Code from './Code.svg';\nimport Copy from './Copy.svg';\nimport CreditCard from './CreditCard.svg';\nimport CurlyBraces from './CurlyBraces.svg';\nimport Database from './Database.svg';\nimport Diagram from './Diagram.svg';\nimport Download from './Download.svg';\nimport Edit from './Edit.svg';\nimport Ellipsis from './Ellipsis.svg';\nimport Export from './Export.svg';\nimport Favorite from './Favorite.svg';\nimport File from './File.svg';\nimport Filter from './Filter.svg';\nimport FullScreenEnter from './FullScreenEnter.svg';\nimport FullScreenExit from './FullScreenExit.svg';\nimport Folder from './Folder.svg';\nimport GlobeAmericas from './GlobeAmericas.svg';\nimport GovernmentBuilding from './GovernmentBuilding.svg';\nimport Home from './Home.svg';\nimport ImportantWithCircle from './ImportantWithCircle.svg';\nimport InfoWithCircle from './InfoWithCircle.svg';\nimport InviteUser from './InviteUser.svg';\nimport Laptop from './Laptop.svg';\nimport Lock from './Lock.svg';\nimport MagnifyingGlass from './MagnifyingGlass.svg';\nimport Megaphone from './Megaphone.svg';\nimport Menu from './Menu.svg';\nimport Minus from './Minus.svg';\nimport NotAllowed from './NotAllowed.svg';\nimport OpenNewTab from './OpenNewTab.svg';\nimport Pause from './Pause.svg';\nimport Person from './Person.svg';\nimport PersonGroup from './PersonGroup.svg';\nimport PersonWithLock from './PersonWithLock.svg';\nimport Play from './Play.svg';\nimport Plus from './Plus.svg';\nimport PlusWithCircle from './PlusWithCircle.svg';\nimport QuestionMarkWithCircle from './QuestionMarkWithCircle.svg';\nimport Refresh from './Refresh.svg';\nimport Save from './Save.svg';\nimport Settings from './Settings.svg';\nimport Shell from './Shell.svg';\nimport SortAscending from './SortAscending.svg';\nimport SortDescending from './SortDescending.svg';\nimport Stitch from './Stitch.svg';\nimport Support from './Support.svg';\nimport Table from './Table.svg';\nimport TimeSeries from './TimeSeries.svg';\nimport Trash from './Trash.svg';\nimport University from './University.svg';\nimport Unlock from './Unlock.svg';\nimport Unsorted from './Unsorted.svg';\nimport UpDownCarets from './UpDownCarets.svg';\nimport Upload from './Upload.svg';\nimport VerticalEllipsis from './VerticalEllipsis.svg';\nimport Visibility from './Visibility.svg';\nimport VisibilityOff from './VisibilityOff.svg';\nimport Warning from './Warning.svg';\nimport X from './X.svg';\nimport XWithCircle from './XWithCircle.svg';\n\nconst glyphs = {\n ActivityFeed,\n AddFile,\n Apps,\n Array,\n ArrowDown,\n ArrowLeft,\n ArrowRight,\n ArrowUp,\n Beaker,\n Bell,\n Building,\n Bulb,\n Calendar,\n CaretDown,\n CaretLeft,\n CaretRight,\n CaretUp,\n Charts,\n Checkmark,\n CheckmarkWithCircle,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n ChevronUp,\n Clone,\n Cloud,\n Code,\n Copy,\n CreditCard,\n CurlyBraces,\n Database,\n Diagram,\n Download,\n Edit,\n Ellipsis,\n Export,\n Favorite,\n File,\n Filter,\n FullScreenEnter,\n FullScreenExit,\n Folder,\n GlobeAmericas,\n GovernmentBuilding,\n Home,\n ImportantWithCircle,\n InfoWithCircle,\n InviteUser,\n Laptop,\n Lock,\n MagnifyingGlass,\n Megaphone,\n Menu,\n Minus,\n NotAllowed,\n OpenNewTab,\n Pause,\n Person,\n PersonGroup,\n PersonWithLock,\n Play,\n Plus,\n PlusWithCircle,\n QuestionMarkWithCircle,\n Refresh,\n Save,\n Settings,\n Shell,\n SortAscending,\n SortDescending,\n Stitch,\n Support,\n Table,\n TimeSeries,\n Trash,\n University,\n Unlock,\n Unsorted,\n UpDownCarets,\n Upload,\n VerticalEllipsis,\n Visibility,\n VisibilityOff,\n Warning,\n X,\n XWithCircle,\n} as const;\n\ntype GlyphName = keyof typeof glyphs;\n\nconst glyphKeys = Object.keys(glyphs) as Array<GlyphName>;\n\nconst processedGlyphs = glyphKeys.reduce((acc, name) => {\n acc[name] = createGlyphComponent(name, glyphs[name]);\n\n return acc;\n}, {} as Record<GlyphName, LGGlyph.Component>);\n\nexport default processedGlyphs;\n","import createIconComponent from './createIconComponent';\nimport glyphs from './glyphs';\n\nexport { default as createIconComponent } from './createIconComponent';\nexport { default as glyphs } from './glyphs';\nexport { Size } from './glyphCommon';\nexport { isComponentGlyph } from './isComponentGlyph';\nexport default createIconComponent(glyphs);\n","import { LGGlyph } from './types';\n\n/** Helper type to check if element is a LeafyGreen UI Glyph */\nexport function isComponentGlyph(\n child: React.ReactNode,\n): child is React.ReactElement<LGGlyph.ComponentProps> {\n return (\n child != null &&\n typeof child === 'object' &&\n 'type' in child &&\n (child.type as any).isGlyph === true\n );\n}\n"],"names":["Size","Small","Default","Large","XLarge","sizeMap","small","default","large","xlarge","_templateObject","_excluded","createIconComponent","glyphs","Icon","_ref","glyph","rest","_objectWithoutProperties","SVGComponent","___EmotionJSX","displayName","propTypes","PropTypes","oneOf","Object","keys","isRequired","size","oneOfType","values","number","createGlyphComponent","glyphName","Glyph","GlyphComponent","_generateAccessiblePr","className","_ref$size","fill","title","ariaLabelledby","ariaLabel","_ref$role","role","fillStyle","css","renderedSize","console","warn","_extends","cx","_defineProperty","height","width","_ref2","name","aria-label","concat","replace","aria-hidden","alt","generateAccessibleProps","isGlyph","string","ActivityFeed","AddFile","Apps","Array","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Beaker","Bell","Building","Bulb","Calendar","CaretDown","CaretLeft","CaretRight","CaretUp","Charts","Checkmark","CheckmarkWithCircle","ChevronDown","ChevronLeft","ChevronRight","ChevronUp","Clone","Cloud","Code","Copy","CreditCard","CurlyBraces","Database","Diagram","Download","Edit","Ellipsis","Export","Favorite","File","Filter","FullScreenEnter","FullScreenExit","Folder","GlobeAmericas","GovernmentBuilding","Home","ImportantWithCircle","InfoWithCircle","InviteUser","Laptop","Lock","MagnifyingGlass","Megaphone","Menu","Minus","NotAllowed","OpenNewTab","Pause","Person","PersonGroup","PersonWithLock","Play","Plus","PlusWithCircle","QuestionMarkWithCircle","Refresh","Save","Settings","Shell","SortAscending","SortDescending","Stitch","Support","Table","TimeSeries","Trash","University","Unlock","Unsorted","UpDownCarets","Upload","VerticalEllipsis","Visibility","VisibilityOff","Warning","X","XWithCircle","processedGlyphs","reduce","acc","child","_typeof","type"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/glyphCommon.ts","../src/createIconComponent.tsx","../src/createGlyphComponent.tsx","../src/glyphs/index.ts","../src/index.ts","../src/isComponentGlyph.ts"],"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}\n\ntype AccessibleFunctionReturnType =\n | AccessibleFunctionParams\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 }: AccessibleFunctionParams,\n): AccessibleFunctionReturnType {\n switch (role) {\n case 'img':\n if (!ariaLabel && !ariaLabelledby && !title) {\n return { 'aria-label': getGlyphLabel(glyphName) };\n }\n\n return {\n ['aria-labelledby']: ariaLabelledby,\n ['aria-label']: ariaLabel,\n title,\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","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { LGGlyph } from './types';\nimport { Size } from './glyphCommon';\n\n// We omit size here because we map string values for size to numbers in this component.\nexport interface IconProps extends Omit<LGGlyph.ComponentProps, 'size'> {\n glyph: string;\n size?: Size | number;\n}\n\ntype GlyphObject = Record<string, LGGlyph.Component>;\n\nexport default function createIconComponent<\n G extends GlyphObject = GlyphObject\n>(glyphs: G) {\n const Icon = ({ glyph, ...rest }: IconProps) => {\n const SVGComponent = glyphs[glyph];\n\n return <SVGComponent {...rest} />;\n };\n\n Icon.displayName = 'Icon';\n\n Icon.propTypes = {\n glyph: PropTypes.oneOf(Object.keys(glyphs)).isRequired,\n size: PropTypes.oneOfType([\n PropTypes.oneOf(Object.values(Size)),\n PropTypes.number,\n ]),\n } as any;\n\n return Icon;\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { SVGR, LGGlyph } from './types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap, Size } from './glyphCommon';\n\nexport default function createGlyphComponent(\n glyphName: string,\n Glyph: SVGR.Component,\n): LGGlyph.Component {\n function GlyphComponent({\n className,\n size = Size.Default,\n fill,\n title,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n role = 'img',\n ...rest\n }: LGGlyph.ComponentProps) {\n const fillStyle = css`\n color: ${fill};\n `;\n\n const renderedSize = typeof size === 'number' ? size : sizeMap[size];\n\n if (!(role === 'img' || role === 'presentation')) {\n console.warn(\n \"Please provide a valid role to this component. Valid options are 'img' and 'presentation'. If you'd like the Icon to be accessible to screen readers please use 'img', otherwise set the role to 'presentation'.\",\n );\n }\n\n return (\n <Glyph\n className={cx(\n {\n [fillStyle]: fill != null,\n },\n className,\n )}\n height={renderedSize}\n width={renderedSize}\n role={role}\n {...generateAccessibleProps(role, glyphName, {\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n })}\n {...rest}\n />\n );\n }\n\n GlyphComponent.displayName = glyphName;\n\n GlyphComponent.isGlyph = true;\n\n GlyphComponent.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([\n PropTypes.oneOf(Object.values(Size)),\n PropTypes.number,\n ]),\n className: PropTypes.string,\n };\n\n return GlyphComponent;\n}\n","import createGlyphComponent from '../createGlyphComponent';\nimport { LGGlyph } from '../types';\n\n// Glyphs\nimport ActivityFeed from './ActivityFeed.svg';\nimport AddFile from './AddFile.svg';\nimport Apps from './Apps.svg';\nimport Array from './Array.svg';\nimport ArrowDown from './ArrowDown.svg';\nimport ArrowLeft from './ArrowLeft.svg';\nimport ArrowRight from './ArrowRight.svg';\nimport ArrowUp from './ArrowUp.svg';\nimport Beaker from './Beaker.svg';\nimport Bell from './Bell.svg';\nimport Building from './Building.svg';\nimport Bulb from './Bulb.svg';\nimport Calendar from './Calendar.svg';\nimport CaretDown from './CaretDown.svg';\nimport CaretLeft from './CaretLeft.svg';\nimport CaretRight from './CaretRight.svg';\nimport CaretUp from './CaretUp.svg';\nimport Charts from './Charts.svg';\nimport Checkmark from './Checkmark.svg';\nimport CheckmarkWithCircle from './CheckmarkWithCircle.svg';\nimport ChevronDown from './ChevronDown.svg';\nimport ChevronLeft from './ChevronLeft.svg';\nimport ChevronRight from './ChevronRight.svg';\nimport ChevronUp from './ChevronUp.svg';\nimport Clock from './Clock.svg';\nimport ClockWithArrow from './ClockWithArrow.svg';\nimport Clone from './Clone.svg';\nimport Cloud from './Cloud.svg';\nimport Code from './Code.svg';\nimport Connect from './Connect.svg';\nimport Copy from './Copy.svg';\nimport CreditCard from './CreditCard.svg';\nimport CurlyBraces from './CurlyBraces.svg';\nimport Database from './Database.svg';\nimport Diagram from './Diagram.svg';\nimport Disconnect from './Disconnect.svg';\nimport Download from './Download.svg';\nimport Edit from './Edit.svg';\nimport Ellipsis from './Ellipsis.svg';\nimport Export from './Export.svg';\nimport Favorite from './Favorite.svg';\nimport File from './File.svg';\nimport Filter from './Filter.svg';\nimport FullScreenEnter from './FullScreenEnter.svg';\nimport FullScreenExit from './FullScreenExit.svg';\nimport Folder from './Folder.svg';\nimport GlobeAmericas from './GlobeAmericas.svg';\nimport GovernmentBuilding from './GovernmentBuilding.svg';\nimport Home from './Home.svg';\nimport ImportantWithCircle from './ImportantWithCircle.svg';\nimport InfoWithCircle from './InfoWithCircle.svg';\nimport InviteUser from './InviteUser.svg';\nimport Key from './Key.svg';\nimport Laptop from './Laptop.svg';\nimport Lock from './Lock.svg';\nimport MagnifyingGlass from './MagnifyingGlass.svg';\nimport Megaphone from './Megaphone.svg';\nimport Menu from './Menu.svg';\nimport Minus from './Minus.svg';\nimport NotAllowed from './NotAllowed.svg';\nimport Note from './Note.svg';\nimport OpenNewTab from './OpenNewTab.svg';\nimport Pause from './Pause.svg';\nimport Person from './Person.svg';\nimport PersonGroup from './PersonGroup.svg';\nimport PersonWithLock from './PersonWithLock.svg';\nimport Play from './Play.svg';\nimport Plus from './Plus.svg';\nimport PlusWithCircle from './PlusWithCircle.svg';\nimport QuestionMarkWithCircle from './QuestionMarkWithCircle.svg';\nimport Redo from './Redo.svg';\nimport Refresh from './Refresh.svg';\nimport ReplicaSet from './ReplicaSet.svg';\nimport Save from './Save.svg';\nimport Serverless from './Serverless.svg';\nimport ShardedCluster from './ShardedCluster.svg';\nimport Settings from './Settings.svg';\nimport Shell from './Shell.svg';\nimport SortAscending from './SortAscending.svg';\nimport SortDescending from './SortDescending.svg';\nimport Stitch from './Stitch.svg';\nimport Support from './Support.svg';\nimport Table from './Table.svg';\nimport TimeSeries from './TimeSeries.svg';\nimport Trash from './Trash.svg';\nimport Undo from './Undo.svg';\nimport University from './University.svg';\nimport Unlock from './Unlock.svg';\nimport Unsorted from './Unsorted.svg';\nimport UpDownCarets from './UpDownCarets.svg';\nimport Upload from './Upload.svg';\nimport VerticalEllipsis from './VerticalEllipsis.svg';\nimport Visibility from './Visibility.svg';\nimport VisibilityOff from './VisibilityOff.svg';\nimport Warning from './Warning.svg';\nimport X from './X.svg';\nimport XWithCircle from './XWithCircle.svg';\n\nconst glyphs = {\n ActivityFeed,\n AddFile,\n Apps,\n Array,\n ArrowDown,\n ArrowLeft,\n ArrowRight,\n ArrowUp,\n Beaker,\n Bell,\n Building,\n Bulb,\n Calendar,\n CaretDown,\n CaretLeft,\n CaretRight,\n CaretUp,\n Charts,\n Checkmark,\n CheckmarkWithCircle,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n ChevronUp,\n Clock,\n ClockWithArrow,\n Clone,\n Cloud,\n Code,\n Connect,\n Copy,\n CreditCard,\n CurlyBraces,\n Database,\n Diagram,\n Disconnect,\n Download,\n Edit,\n Ellipsis,\n Export,\n Favorite,\n File,\n Filter,\n FullScreenEnter,\n FullScreenExit,\n Folder,\n GlobeAmericas,\n GovernmentBuilding,\n Home,\n ImportantWithCircle,\n InfoWithCircle,\n InviteUser,\n Key,\n Laptop,\n Lock,\n MagnifyingGlass,\n Megaphone,\n Menu,\n Minus,\n NotAllowed,\n Note,\n OpenNewTab,\n Pause,\n Person,\n PersonGroup,\n PersonWithLock,\n Play,\n Plus,\n PlusWithCircle,\n QuestionMarkWithCircle,\n Redo,\n Refresh,\n ReplicaSet,\n Save,\n Serverless,\n ShardedCluster,\n Settings,\n Shell,\n SortAscending,\n SortDescending,\n Stitch,\n Support,\n Table,\n TimeSeries,\n Trash,\n Undo,\n University,\n Unlock,\n Unsorted,\n UpDownCarets,\n Upload,\n VerticalEllipsis,\n Visibility,\n VisibilityOff,\n Warning,\n X,\n XWithCircle,\n} as const;\n\ntype GlyphName = keyof typeof glyphs;\n\nconst glyphKeys = Object.keys(glyphs) as Array<GlyphName>;\n\nconst processedGlyphs = glyphKeys.reduce((acc, name) => {\n acc[name] = createGlyphComponent(name, glyphs[name]);\n\n return acc;\n}, {} as Record<GlyphName, LGGlyph.Component>);\n\nexport default processedGlyphs;\n","import createIconComponent from './createIconComponent';\nimport glyphs from './glyphs';\n\nexport { default as createIconComponent } from './createIconComponent';\nexport { default as glyphs } from './glyphs';\nexport { Size } from './glyphCommon';\nexport { isComponentGlyph } from './isComponentGlyph';\nexport default createIconComponent(glyphs);\n","import { LGGlyph } from './types';\n\n/** Helper type to check if element is a LeafyGreen UI Glyph */\nexport function isComponentGlyph(\n child: React.ReactNode,\n): child is React.ReactElement<LGGlyph.ComponentProps> {\n return (\n child != null &&\n typeof child === 'object' &&\n 'type' in child &&\n (child.type as any).isGlyph === true\n );\n}\n"],"names":["Size","Small","Default","Large","XLarge","sizeMap","small","default","large","xlarge","_templateObject","_excluded","createIconComponent","glyphs","Icon","_ref","glyph","rest","_objectWithoutProperties","SVGComponent","___EmotionJSX","displayName","propTypes","PropTypes","oneOf","Object","keys","isRequired","size","oneOfType","values","number","createGlyphComponent","glyphName","Glyph","GlyphComponent","_generateAccessiblePr","className","_ref$size","fill","title","ariaLabelledby","ariaLabel","_ref$role","role","fillStyle","css","renderedSize","console","warn","_extends","cx","_defineProperty","height","width","_ref2","name","aria-label","concat","replace","aria-hidden","alt","generateAccessibleProps","isGlyph","string","ActivityFeed","AddFile","Apps","Array","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Beaker","Bell","Building","Bulb","Calendar","CaretDown","CaretLeft","CaretRight","CaretUp","Charts","Checkmark","CheckmarkWithCircle","ChevronDown","ChevronLeft","ChevronRight","ChevronUp","Clock","ClockWithArrow","Clone","Cloud","Code","Connect","Copy","CreditCard","CurlyBraces","Database","Diagram","Disconnect","Download","Edit","Ellipsis","Export","Favorite","File","Filter","FullScreenEnter","FullScreenExit","Folder","GlobeAmericas","GovernmentBuilding","Home","ImportantWithCircle","InfoWithCircle","InviteUser","Key","Laptop","Lock","MagnifyingGlass","Megaphone","Menu","Minus","NotAllowed","Note","OpenNewTab","Pause","Person","PersonGroup","PersonWithLock","Play","Plus","PlusWithCircle","QuestionMarkWithCircle","Redo","Refresh","ReplicaSet","Save","Serverless","ShardedCluster","Settings","Shell","SortAscending","SortDescending","Stitch","Support","Table","TimeSeries","Trash","Undo","University","Unlock","Unsorted","UpDownCarets","Upload","VerticalEllipsis","Visibility","VisibilityOff","Warning","X","XWithCircle","processedGlyphs","reduce","acc","child","_typeof","type"],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leafygreen-ui/icon",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.7.0",
|
|
4
4
|
"description": "LeafyGreen UI Kit Icons",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"xml2json": "^0.11.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@leafygreen-ui/lib": "^9.0.
|
|
27
|
+
"@leafygreen-ui/lib": "^9.0.1"
|
|
28
28
|
},
|
|
29
29
|
"gitHead": "dd71a2d404218ccec2e657df9c0263dc1c15b9e0"
|
|
30
30
|
}
|
package/src/Icon.story.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import Icon, { glyphs, Size } from '.';
|
|
|
3
3
|
import { css } from '@leafygreen-ui/emotion';
|
|
4
4
|
import { storiesOf } from '@storybook/react';
|
|
5
5
|
import { color, select } from '@storybook/addon-knobs';
|
|
6
|
+
import { uiColors } from '@leafygreen-ui/palette';
|
|
6
7
|
|
|
7
8
|
const containerStyle = css`
|
|
8
9
|
width: 150px;
|
|
@@ -20,7 +21,7 @@ const containerStyle = css`
|
|
|
20
21
|
|
|
21
22
|
const textStyle = css`
|
|
22
23
|
font-size: 12px;
|
|
23
|
-
color:
|
|
24
|
+
color: ${uiColors.gray.base};
|
|
24
25
|
margin-top: 0.5rem;
|
|
25
26
|
`;
|
|
26
27
|
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum 867509eef46d330604af7224e7ceb53b
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface ClockProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const Clock = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: ClockProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'Clock', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
fillRule="evenodd"
|
|
53
|
+
clipRule="evenodd"
|
|
54
|
+
d="M8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14ZM7.25 4.75C7.25 4.33579 7.58579 4 8 4C8.41421 4 8.75 4.33579 8.75 4.75V7.90966L10.4939 9.43556C10.8056 9.70832 10.8372 10.1821 10.5644 10.4939C10.2917 10.8056 9.81786 10.8372 9.50613 10.5644L7.51059 8.81833C7.5014 8.8104 7.4924 8.80226 7.48361 8.79391C7.41388 8.7278 7.35953 8.65117 7.32087 8.56867C7.27541 8.47195 7.25 8.36394 7.25 8.25V4.75Z"
|
|
55
|
+
fill={'currentColor'}
|
|
56
|
+
/>
|
|
57
|
+
</svg>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
Clock.displayName = 'Clock';
|
|
62
|
+
Clock.isGlyph = true;
|
|
63
|
+
Clock.propTypes = {
|
|
64
|
+
fill: PropTypes.string,
|
|
65
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
+
className: PropTypes.string,
|
|
67
|
+
};
|
|
68
|
+
export default Clock;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum 5cebdb544bb818697100aa36feb9bd15
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface ClockWithArrowProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const ClockWithArrow = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: ClockWithArrowProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'ClockWithArrow', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
d="M13 8C13 10.7614 10.7614 13 8 13C7.16895 13 6.38526 12.7973 5.69568 12.4385C5.34783 12.2576 4.90944 12.3087 4.65841 12.6099L4.32712 13.0075C4.05174 13.3379 4.1087 13.8355 4.48034 14.0521C5.51438 14.6548 6.71687 15 8 15C11.866 15 15 11.866 15 8C15 4.13401 11.866 1 8 1C6.05606 1 4.2972 1.7924 3.02879 3.07181L1.96954 2.14618C1.56206 1.7901 0.931193 2.13127 1.00611 2.66721L1.4606 5.9185C1.50083 6.20624 1.7463 6.4287 2.03684 6.43H5.31972C5.86086 6.43241 6.1144 5.76821 5.70691 5.41212L4.53896 4.3915C5.4373 3.52965 6.65679 3 8 3C10.7614 3 13 5.23858 13 8Z"
|
|
53
|
+
fill={'currentColor'}
|
|
54
|
+
/>
|
|
55
|
+
<path
|
|
56
|
+
d="M7.25 5.25C7.25 4.83579 7.58579 4.5 8 4.5C8.41421 4.5 8.75 4.83579 8.75 5.25V7.91793L10.4294 9.44169C10.7412 9.71445 10.7728 10.1883 10.5 10.5C10.2272 10.8117 9.75342 10.8433 9.44169 10.5706L7.50697 8.81519C7.49904 8.80826 7.49125 8.80117 7.48361 8.79391C7.41388 8.72781 7.35954 8.65118 7.32088 8.56868C7.27541 8.47196 7.25 8.36395 7.25 8.25V5.25Z"
|
|
57
|
+
fill={'currentColor'}
|
|
58
|
+
/>
|
|
59
|
+
</svg>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
ClockWithArrow.displayName = 'ClockWithArrow';
|
|
64
|
+
ClockWithArrow.isGlyph = true;
|
|
65
|
+
ClockWithArrow.propTypes = {
|
|
66
|
+
fill: PropTypes.string,
|
|
67
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
68
|
+
className: PropTypes.string,
|
|
69
|
+
};
|
|
70
|
+
export default ClockWithArrow;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum 9fb74bd72c9c81b271291e3258b8f159
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface ConnectProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const Connect = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: ConnectProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'Connect', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
fillRule="evenodd"
|
|
53
|
+
clipRule="evenodd"
|
|
54
|
+
d="M12.8674 8.89755C14.165 7.59995 14.3939 5.63211 13.554 4.09804L14.8289 2.82315C15.057 2.59505 15.057 2.22522 14.8289 1.99712L14.0029 1.17108C13.7748 0.942981 13.405 0.942983 13.1769 1.17109L11.8867 2.4612C10.3625 1.66314 8.43194 1.90377 7.15275 3.18294L5.2772 5.05844C5.26266 5.06875 5.24879 5.08041 5.23576 5.09343L3.18162 7.14751C1.90122 8.42791 1.66139 10.3609 2.46214 11.8858L1.17108 13.1769C0.942974 13.405 0.942974 13.7748 1.17108 14.0029L1.99711 14.8289C2.22521 15.057 2.59504 15.057 2.82315 14.8289L4.10098 13.5511C5.63447 14.3882 7.59986 14.1585 8.89625 12.8621L10.7718 10.9866C10.7863 10.9763 10.8002 10.9646 10.8132 10.9516L12.8674 8.89755ZM6.56112 6.77578L4.68548 8.65134C3.9392 9.39765 3.9392 10.612 4.68548 11.3583C5.43176 12.1045 6.64608 12.1046 7.39242 11.3583L9.44653 9.3042C9.45953 9.2912 9.47337 9.27956 9.48788 9.26927L11.3635 7.39371C12.1098 6.64741 12.1098 5.4331 11.3635 4.68679C10.6172 3.94051 9.40292 3.94049 8.65658 4.68679L6.60247 6.74085C6.58947 6.75385 6.57563 6.7655 6.56112 6.77578Z"
|
|
55
|
+
fill={'currentColor'}
|
|
56
|
+
/>
|
|
57
|
+
</svg>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
Connect.displayName = 'Connect';
|
|
62
|
+
Connect.isGlyph = true;
|
|
63
|
+
Connect.propTypes = {
|
|
64
|
+
fill: PropTypes.string,
|
|
65
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
+
className: PropTypes.string,
|
|
67
|
+
};
|
|
68
|
+
export default Connect;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum c574cd235741fe7f51572cb4cee1e0b7
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface DisconnectProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const Disconnect = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: DisconnectProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'Disconnect', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
d="M7.09293 3.67136C6.96902 3.54745 6.96902 3.34652 7.09293 3.22258L8.14018 2.17538C9.70733 0.608258 12.2573 0.608152 13.8246 2.17538C15.3918 3.74259 15.3918 6.29263 13.8246 7.85981L12.7773 8.90702C12.6534 9.03093 12.4525 9.03093 12.3286 8.90702L11.2814 7.85989C11.1575 7.73597 11.1575 7.53505 11.2814 7.41111L12.3287 6.36392C13.071 5.62155 13.071 4.41366 12.3287 3.6713C11.5864 2.92896 10.3785 2.92893 9.63606 3.6713L8.58882 4.71849C8.4649 4.84241 8.26398 4.84241 8.14004 4.71849L7.09293 3.67136Z"
|
|
53
|
+
fill={'currentColor'}
|
|
54
|
+
/>
|
|
55
|
+
<path
|
|
56
|
+
fillRule="evenodd"
|
|
57
|
+
clipRule="evenodd"
|
|
58
|
+
d="M1.29322 1.29322C1.68419 0.902259 2.31807 0.902259 2.70903 1.29322L14.7068 13.291C15.0977 13.6819 15.0977 14.3158 14.7068 14.7068C14.3158 15.0977 13.6819 15.0977 13.291 14.7068L10.132 11.5478L7.85982 13.8245C6.29267 15.3917 3.74267 15.3918 2.17538 13.8245C0.608205 12.2573 0.608205 9.70733 2.17538 8.14015L4.44761 5.86342L1.29322 2.70903C0.902259 2.31807 0.902259 1.68419 1.29322 1.29322ZM5.94352 7.35933L3.6713 9.63604C2.92896 10.3784 2.92896 11.5863 3.6713 12.3287C4.41363 13.071 5.62155 13.071 6.36394 12.3287L8.63614 10.0519L5.94352 7.35933Z"
|
|
59
|
+
fill={'currentColor'}
|
|
60
|
+
/>
|
|
61
|
+
</svg>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
Disconnect.displayName = 'Disconnect';
|
|
66
|
+
Disconnect.isGlyph = true;
|
|
67
|
+
Disconnect.propTypes = {
|
|
68
|
+
fill: PropTypes.string,
|
|
69
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
70
|
+
className: PropTypes.string,
|
|
71
|
+
};
|
|
72
|
+
export default Disconnect;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum 472b9840b2d10f0876a3c95cb82ae7c1
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface KeyProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const Key = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: KeyProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'Key', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
fillRule="evenodd"
|
|
53
|
+
clipRule="evenodd"
|
|
54
|
+
d="M6 10C6.55427 10 7.08222 9.88726 7.56215 9.68347L8.87868 11L8.43934 11.4393C7.85355 12.0251 7.85355 12.9749 8.43934 13.5607C9.02513 14.1464 9.97487 14.1464 10.5607 13.5607L11 13.1213L11.4393 13.5607C12.0251 14.1464 12.9749 14.1464 13.5607 13.5607C14.1464 12.9749 14.1464 12.0251 13.5607 11.4393L9.68347 7.56215C9.88726 7.08222 10 6.55427 10 6C10 3.79086 8.20914 2 6 2C3.79086 2 2 3.79086 2 6C2 8.20914 3.79086 10 6 10ZM5.25 6.5C5.94036 6.5 6.5 5.94036 6.5 5.25C6.5 4.55964 5.94036 4 5.25 4C4.55964 4 4 4.55964 4 5.25C4 5.94036 4.55964 6.5 5.25 6.5Z"
|
|
55
|
+
fill={'currentColor'}
|
|
56
|
+
/>
|
|
57
|
+
</svg>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
Key.displayName = 'Key';
|
|
62
|
+
Key.isGlyph = true;
|
|
63
|
+
Key.propTypes = {
|
|
64
|
+
fill: PropTypes.string,
|
|
65
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
+
className: PropTypes.string,
|
|
67
|
+
};
|
|
68
|
+
export default Key;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum 8138c0459c5346416e419e5fc40eab64
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface NoteProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const Note = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: NoteProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'Note', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
d="M4.5 6.25C4.5 5.83579 4.83579 5.5 5.25 5.5H8.75C9.16421 5.5 9.5 5.83579 9.5 6.25C9.5 6.66421 9.16421 7 8.75 7H5.25C4.83579 7 4.5 6.66421 4.5 6.25Z"
|
|
53
|
+
fill={'currentColor'}
|
|
54
|
+
/>
|
|
55
|
+
<path
|
|
56
|
+
d="M4.5 8.75C4.5 8.33579 4.83579 8 5.25 8H6.75C7.16421 8 7.5 8.33579 7.5 8.75C7.5 9.16421 7.16421 9.5 6.75 9.5H5.25C4.83579 9.5 4.5 9.16421 4.5 8.75Z"
|
|
57
|
+
fill={'currentColor'}
|
|
58
|
+
/>
|
|
59
|
+
<path
|
|
60
|
+
fillRule="evenodd"
|
|
61
|
+
clipRule="evenodd"
|
|
62
|
+
d="M15 10L11 14H3C1.89543 14 1 13.1046 1 12V4C1 2.89543 1.89543 2 3 2H13C14.1046 2 15 2.89543 15 4V10ZM13 4H3L3 12H10V10C10 9.44772 10.4477 9 11 9H13V4Z"
|
|
63
|
+
fill={'currentColor'}
|
|
64
|
+
/>
|
|
65
|
+
</svg>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
Note.displayName = 'Note';
|
|
70
|
+
Note.isGlyph = true;
|
|
71
|
+
Note.propTypes = {
|
|
72
|
+
fill: PropTypes.string,
|
|
73
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
74
|
+
className: PropTypes.string,
|
|
75
|
+
};
|
|
76
|
+
export default Note;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a generated file. Do not modify it manually.
|
|
3
|
+
*
|
|
4
|
+
* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts
|
|
5
|
+
* @checksum f80ff0b262acf6338700f6665f4116f3
|
|
6
|
+
*/
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { css, cx } from '@leafygreen-ui/emotion';
|
|
10
|
+
import { generateAccessibleProps, sizeMap } from '../glyphCommon';
|
|
11
|
+
import { LGGlyph } from '../types';
|
|
12
|
+
export interface RedoProps extends LGGlyph.ComponentProps {}
|
|
13
|
+
|
|
14
|
+
const Redo = ({
|
|
15
|
+
className,
|
|
16
|
+
size = 16,
|
|
17
|
+
title,
|
|
18
|
+
['aria-label']: ariaLabel,
|
|
19
|
+
['aria-labelledby']: ariaLabelledby,
|
|
20
|
+
fill,
|
|
21
|
+
role = 'img',
|
|
22
|
+
...props
|
|
23
|
+
}: RedoProps) => {
|
|
24
|
+
const fillStyle = css`
|
|
25
|
+
color: ${fill};
|
|
26
|
+
`;
|
|
27
|
+
const noFlexShrink = css`
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
`;
|
|
30
|
+
const accessibleProps = generateAccessibleProps(role, 'Redo', {
|
|
31
|
+
title,
|
|
32
|
+
['aria-label']: ariaLabel,
|
|
33
|
+
['aria-labelledby']: ariaLabelledby,
|
|
34
|
+
});
|
|
35
|
+
return (
|
|
36
|
+
<svg
|
|
37
|
+
className={cx(
|
|
38
|
+
{
|
|
39
|
+
[fillStyle]: fill != null,
|
|
40
|
+
},
|
|
41
|
+
noFlexShrink,
|
|
42
|
+
className,
|
|
43
|
+
)}
|
|
44
|
+
height={typeof size === 'number' ? size : sizeMap[size]}
|
|
45
|
+
width={typeof size === 'number' ? size : sizeMap[size]}
|
|
46
|
+
role={role}
|
|
47
|
+
{...accessibleProps}
|
|
48
|
+
{...props}
|
|
49
|
+
viewBox="0 0 16 16"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
d="M4.01756 9.40216C3.96845 9.72987 3.70455 10 3.37318 10H2.57318C2.24181 10 1.97003 9.73064 2.00272 9.40089C2.18023 7.6104 3.14483 6.05139 4.54567 5.07473C5.02468 4.73549 5.56726 4.46519 6.15478 4.28051C6.72834 4.09832 7.33928 4.00002 7.97318 4.00002C7.98266 3.99998 7.99215 4.00002 8.00164 4.00002C10.7006 4.00002 12.9519 5.71778 13.4688 8.00002H14.8831C15.4243 8.00002 15.6748 8.67204 15.2657 9.02631L12.7841 11.1755C12.5645 11.3657 12.2385 11.3657 12.0188 11.1755L9.53719 9.02631C9.12812 8.67204 9.37866 8.00002 9.91982 8.00002H11.3664C10.8977 6.91458 9.68595 6.00002 8.00164 6.00002C7.81503 6.00002 7.63422 6.01124 7.45958 6.03269C6.75401 6.12312 6.10595 6.39739 5.56496 6.80592C5.54654 6.8206 5.52833 6.83543 5.51032 6.85041C5.4936 6.86432 5.47625 6.87728 5.45838 6.88926C4.69892 7.50399 4.16907 8.39119 4.01756 9.40216Z"
|
|
53
|
+
fill={'currentColor'}
|
|
54
|
+
/>
|
|
55
|
+
</svg>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
Redo.displayName = 'Redo';
|
|
60
|
+
Redo.isGlyph = true;
|
|
61
|
+
Redo.propTypes = {
|
|
62
|
+
fill: PropTypes.string,
|
|
63
|
+
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
64
|
+
className: PropTypes.string,
|
|
65
|
+
};
|
|
66
|
+
export default Redo;
|