@leafygreen-ui/icon 11.25.0 → 11.26.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @leafygreen-ui/icon
2
2
 
3
+ ## 11.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 66cfdbca: Adds `'Cap'` icon to glyph set
8
+ - 873448bb: Adds `'Camera'` to glyph set
9
+
10
+ ### Patch Changes
11
+
12
+ - ad243893: Updating dimensions of Calendar icon to correctly center itself horizontally
13
+
14
+ ## 11.25.1
15
+
16
+ ### Patch Changes
17
+
18
+ - ed0437ce: Updates `'Key'` icon to match design specs
19
+
3
20
  ## 11.25.0
4
21
 
5
22
  ### Minor Changes
package/README.md CHANGED
@@ -47,13 +47,13 @@ const SomeComponent = () => <Icon glyph="Plus" fill="#FF0000" />;
47
47
 
48
48
  ## Properties
49
49
 
50
- | Prop | Type | Description | Default |
51
- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
52
- | `glyph` (Required) | `'ActivityFeed'`, `'AddFile'`, `'AllProducts'`, `'Apps'`, `'Array'`, `'ArrowDown'`, `'ArrowLeft'`, `'ArrowRight'`, `'ArrowUp'`, `'Beaker'`, `'Bell'`, `'Biometric'`, `'Boolean'`, `'Building'`, `'Bulb'`, `'Calendar'`, `'CaretDown'`, `'CaretLeft'`, `'CaretRight'`, `'CaretUp'`, `'ChartFilled'`, `'Charts'`, `'Checkmark'`, `'CheckmarkWithCircle'`, `'ChevronDown'`,, `'ChevronLeft'` `'ChevronRight'`,`'ChevronUp'`, `'Clock'`,`'ClockWithArrow'`, `'Clone'`, `'Cloud'`, `'Code'`, `'CodeBlock'`, `'Colon'`, `'Connect'`,`'Copy'`,`'CreditCard'`, `'CurlyBraces'`, `'Dashboard'`, `'Database'`, `'Diagram'`, `'Diagram2'`, `'Diagram3'`, `'Disconnect'`, `'Download'`, `'Drag'`, `'Edit'`, `'Ellipsis'`, `'Email'`, `'Export'`, `'Favorite'`, `'Federation'`, `'File'`, `'Filter'`,`'Folder'`, `'FullScreenEnter'`, `'FullScreenExit'`, `'Guage'`, `'GlobeAmericas'`, `'GovernmentBuilding'`, `'Highlight'`, `'Home'`, `'Import'`, `'ImportantWithCircle'`, `'InfoWithCircle'`, `'InviteUser'`, `'Key'`, `'Laptop'`, `'LightningBolt'`, `'Link'`, `'List'`, `'Lock'`, `'LogIn'`, `'LogOut'`, `'MagnifyingGlass'`, `'Megaphone'`, `'Menu'`, `'Minus'`, `'Mobile'`, `'MultiDirectionArrow'`, `'MultiLayers'`, `'NavCollapse'`, `'NavExpand'`, `'NoFilter'`, `'NotAllowed'`, `'Note'`, `'OpenNewTab'`, `'Pause'`, `'Person'`, `'PersonGroup'`, `'PersonWithLock'`, `'Pin'`, `'Play'`, `'Plus'`, `'PlusWithCircle'`, `'QuestionMarkWithCircle'`, `'Read'`, `'Redo'`, `'Refresh'`,`'Relationship'`, `'ReplicaSet'`,`'Resize'`, `'Return'`, `'Save'`, `'Serverless'`, `'Settings'`, `'ShardedCluster'`, `'Shell'`, `'SMS'`,`'SortAscending'`, `'SortDescending'`, `'SortHorizontal'`, `'SortVertical'`,`'Sparkle'`, `'SplitHorizontal'`, `'SplitVertical'`, `'Stitch'`, `'String'`, `'Support'`, `'Sweep'`, `'Table'`, `'Tag'`, `'ThumbsDown'`, `'ThumbsUp'`, `'TimeSeries'`, `'TimeSeriesCollection'`, `'Trash'`, `'Undo'`, `'University'`, `'Unlock'`, `'Unsorted'`, `'UpDownCarets'`, `'Upload'`, `'VerticalEllipsis'`, `'Visibility'`, `'VisibilityOff'`, `'Warning'`, `'Wizard'`, `'Wrench'`, `'Write'`,`'X'`, `'XWithCircle'` | Specifies the glyph to use. | |
53
- | `size` | `'small'`, `'default'`, `'large'`, `'xlarge'`, `number` | The height and width of the glyph's viewBox. This can be any `number` or one of the following `'small'`, `'default'`, `'large'`, `'xlarge'` | `'default'` |
54
- | `fill` | `string` | The fill color that is passed to the glyph. By default, the glyph will inherit its fill from the CSS color property of its nearest ancestor. | |
55
- | `title` | `string`, `boolean`, `null` | Renders a title tag with the passed string within the SVG element for screen reader accessibility. Setting this value to `false` will entirely unset the title. <br />If title is `undefined` or `null`, a human-readable title will be generated based on the glyph's name. | |
56
- | ... | `SVGR.ComponentProps` | All other props will be spread on the `svg` element | |
50
+ | Prop | Type | Description | Default |
51
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
52
+ | `glyph` (Required) | `'ActivityFeed'`, `'AddFile'`, `'AllProducts'`, `'Apps'`, `'Array'`, `'ArrowDown'`, `'ArrowLeft'`, `'ArrowRight'`, `'ArrowUp'`, `'Beaker'`, `'Bell'`, `'Biometric'`, `'Boolean'`, `'Building'`, `'Bulb'`, `'Calendar'`, `'Camera'`, `'Cap'`, `'CaretDown'`, `'CaretLeft'`, `'CaretRight'`, `'CaretUp'`, `'ChartFilled'`, `'Charts'`, `'Checkmark'`, `'CheckmarkWithCircle'`, `'ChevronDown'`,, `'ChevronLeft'` `'ChevronRight'`,`'ChevronUp'`, `'Clock'`,`'ClockWithArrow'`, `'Clone'`, `'Cloud'`, `'Code'`, `'CodeBlock'`, `'Colon'`, `'Connect'`,`'Copy'`,`'CreditCard'`, `'CurlyBraces'`, `'Dashboard'`, `'Database'`, `'Diagram'`, `'Diagram2'`, `'Diagram3'`, `'Disconnect'`, `'Download'`, `'Drag'`, `'Edit'`, `'Ellipsis'`, `'Email'`, `'Export'`, `'Favorite'`, `'Federation'`, `'File'`, `'Filter'`,`'Folder'`, `'FullScreenEnter'`, `'FullScreenExit'`, `'Guage'`, `'GlobeAmericas'`, `'GovernmentBuilding'`, `'Highlight'`, `'Home'`, `'Import'`, `'ImportantWithCircle'`, `'InfoWithCircle'`, `'InviteUser'`, `'Key'`, `'Laptop'`, `'LightningBolt'`, `'Link'`, `'List'`, `'Lock'`, `'LogIn'`, `'LogOut'`, `'MagnifyingGlass'`, `'Megaphone'`, `'Menu'`, `'Minus'`, `'Mobile'`, `'MultiDirectionArrow'`, `'MultiLayers'`, `'NavCollapse'`, `'NavExpand'`, `'NoFilter'`, `'NotAllowed'`, `'Note'`, `'OpenNewTab'`, `'Pause'`, `'Person'`, `'PersonGroup'`, `'PersonWithLock'`, `'Pin'`, `'Play'`, `'Plus'`, `'PlusWithCircle'`, `'QuestionMarkWithCircle'`, `'Read'`, `'Redo'`, `'Refresh'`,`'Relationship'`, `'ReplicaSet'`,`'Resize'`, `'Return'`, `'Save'`, `'Serverless'`, `'Settings'`, `'ShardedCluster'`, `'Shell'`, `'SMS'`,`'SortAscending'`, `'SortDescending'`, `'SortHorizontal'`, `'SortVertical'`,`'Sparkle'`, `'SplitHorizontal'`, `'SplitVertical'`, `'Stitch'`, `'String'`, `'Support'`, `'Sweep'`, `'Table'`, `'Tag'`, `'ThumbsDown'`, `'ThumbsUp'`, `'TimeSeries'`, `'TimeSeriesCollection'`, `'Trash'`, `'Undo'`, `'University'`, `'Unlock'`, `'Unsorted'`, `'UpDownCarets'`, `'Upload'`, `'VerticalEllipsis'`, `'Visibility'`, `'VisibilityOff'`, `'Warning'`, `'Wizard'`, `'Wrench'`, `'Write'`,`'X'`, `'XWithCircle'` | Specifies the glyph to use. | |
53
+ | `size` | `'small'`, `'default'`, `'large'`, `'xlarge'`, `number` | The height and width of the glyph's viewBox. This can be any `number` or one of the following `'small'`, `'default'`, `'large'`, `'xlarge'` | `'default'` |
54
+ | `fill` | `string` | The fill color that is passed to the glyph. By default, the glyph will inherit its fill from the CSS color property of its nearest ancestor. | |
55
+ | `title` | `string`, `boolean`, `null` | Renders a title tag with the passed string within the SVG element for screen reader accessibility. Setting this value to `false` will entirely unset the title. <br />If title is `undefined` or `null`, a human-readable title will be generated based on the glyph's name. | |
56
+ | ... | `SVGR.ComponentProps` | All other props will be spread on the `svg` element | |
57
57
 
58
58
  # createIconComponent
59
59
 
package/dist/Calendar.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("prop-types"),require("@leafygreen-ui/emotion")):"function"==typeof define&&define.amd?define(["react","prop-types","@leafygreen-ui/emotion"],r):((e="undefined"!=typeof globalThis?globalThis:e||self).Calendar=e.Calendar||{},e.Calendar.js=r(e.React,e.PropTypes,e["@leafygreen-ui/emotion"]))}(this,(function(e,r,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&"object"==typeof e&&"default"in e)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var a=l(e),i=n(r);function o(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},u.apply(this,arguments)}function f(e,r){if(null==e)return{};var t,n,l=function(e,r){if(null==e)return{};var t,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||(l[t]=e[t]);return l}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)t=a[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(l[t]=e[t])}return l}function c(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var s,b,d={small:14,default:16,large:20,xlarge:24};var p=["className","size","title","aria-label","aria-labelledby","fill","role"],y=function(e){var r,n=e.className,l=e.size,i=void 0===l?16:l,y=e.title,m=e["aria-label"],g=e["aria-labelledby"],v=e.fill,O=e.role,j=void 0===O?"img":O,C=f(e,p),h=t.css(s||(s=c(["\n color: ",";\n "])),v),w=t.css(b||(b=c(["\n flex-shrink: 0;\n "]))),P=function(e,r,t){var n,l,a=t["aria-label"],i=t["aria-labelledby"],u=t.title;switch(e){case"img":return a||i||u?(o(n={},"aria-labelledby",i),o(n,"aria-label",a),o(n,"title",u),n):{"aria-label":(l=r,"".concat(l.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(j,"Calendar",(o(r={title:y},"aria-label",m),o(r,"aria-labelledby",g),r));return a.createElement("svg",u({className:t.cx(o({},h,null!=v),w,n),height:"number"==typeof i?i:d[i],width:"number"==typeof i?i:d[i],role:j},P,C,{viewBox:"0 0 16 16"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2C5 1.44772 5.44772 1 6 1C6.55228 1 7 1.44772 7 2V3C7 3.55228 6.55228 4 6 4C5.44772 4 5 3.55228 5 3V2ZM10 3H8C8 4.10457 7.10457 5 6 5C4.89543 5 4 4.10457 4 3C2.89543 3 2 3.89543 2 5V12C2 13.1046 2.89543 14 4 14H14C15.1046 14 16 13.1046 16 12V5C16 3.89543 15.1046 3 14 3C14 4.10457 13.1046 5 12 5C10.8954 5 10 4.10457 10 3ZM11 3C11 3.55228 11.4477 4 12 4C12.5523 4 13 3.55228 13 3V2C13 1.44772 12.5523 1 12 1C11.4477 1 11 1.44772 11 2V3ZM13 7H10V10H13V7Z",fill:"currentColor"}))};return y.displayName="Calendar",y.isGlyph=!0,y.propTypes={fill:i.default.string,size:i.default.oneOfType([i.default.number,i.default.string]),className:i.default.string},y}));
1
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("prop-types"),require("@leafygreen-ui/emotion")):"function"==typeof define&&define.amd?define(["react","prop-types","@leafygreen-ui/emotion"],r):((e="undefined"!=typeof globalThis?globalThis:e||self).Calendar=e.Calendar||{},e.Calendar.js=r(e.React,e.PropTypes,e["@leafygreen-ui/emotion"]))}(this,(function(e,r,t){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&"object"==typeof e&&"default"in e)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,l.get?l:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var a=n(e),i=l(r);function o(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},u.apply(this,arguments)}function f(e,r){if(null==e)return{};var t,l,n=function(e,r){if(null==e)return{};var t,l,n={},a=Object.keys(e);for(l=0;l<a.length;l++)t=a[l],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(l=0;l<a.length;l++)t=a[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function c(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var s,b,d={small:14,default:16,large:20,xlarge:24};var p=["className","size","title","aria-label","aria-labelledby","fill","role"],y=function(e){var r,l=e.className,n=e.size,i=void 0===n?16:n,y=e.title,m=e["aria-label"],g=e["aria-labelledby"],v=e.fill,C=e.role,O=void 0===C?"img":C,j=f(e,p),h=t.css(s||(s=c(["\n color: ",";\n "])),v),w=t.css(b||(b=c(["\n flex-shrink: 0;\n "]))),P=function(e,r,t){var l,n,a=t["aria-label"],i=t["aria-labelledby"],u=t.title;switch(e){case"img":return a||i||u?(o(l={},"aria-labelledby",i),o(l,"aria-label",a),o(l,"title",u),l):{"aria-label":(n=r,"".concat(n.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(O,"Calendar",(o(r={title:y},"aria-label",m),o(r,"aria-labelledby",g),r));return a.createElement("svg",u({className:t.cx(o({},h,null!=v),w,l),height:"number"==typeof i?i:d[i],width:"number"==typeof i?i:d[i],role:O},P,j,{viewBox:"0 0 16 16"}),a.createElement("path",{d:"M4 2C4 1.44772 4.44772 1 5 1C5.55228 1 6 1.44772 6 2V3C6 3.55228 5.55228 4 5 4C4.44772 4 4 3.55228 4 3V2Z",fill:"currentColor"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3H7C7 4.10457 6.10457 5 5 5C3.89543 5 3 4.10457 3 3C1.89543 3 1 3.89543 1 5V12C1 13.1046 1.89543 14 3 14H13C14.1046 14 15 13.1046 15 12V5C15 3.89543 14.1046 3 13 3C13 4.10457 12.1046 5 11 5C9.89543 5 9 4.10457 9 3ZM12 7H9V10H12V7Z",fill:"currentColor"}),a.createElement("path",{d:"M10 3C10 3.55228 10.4477 4 11 4C11.5523 4 12 3.55228 12 3V2C12 1.44772 11.5523 1 11 1C10.4477 1 10 1.44772 10 2V3Z",fill:"currentColor"}))};return y.displayName="Calendar",y.isGlyph=!0,y.propTypes={fill:i.default.string,size:i.default.oneOfType([i.default.number,i.default.string]),className:i.default.string},y}));
2
2
  //# sourceMappingURL=Calendar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sources":["../src/glyphCommon.ts","../src/generated/Calendar.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum e4c0ebc68c4da3e4c22daf5e81659bbe\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CalendarProps extends LGGlyph.ComponentProps {}\nconst Calendar = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CalendarProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Calendar', {\n title,\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\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M5 2C5 1.44772 5.44772 1 6 1C6.55228 1 7 1.44772 7 2V3C7 3.55228 6.55228 4 6 4C5.44772 4 5 3.55228 5 3V2ZM10 3H8C8 4.10457 7.10457 5 6 5C4.89543 5 4 4.10457 4 3C2.89543 3 2 3.89543 2 5V12C2 13.1046 2.89543 14 4 14H14C15.1046 14 16 13.1046 16 12V5C16 3.89543 15.1046 3 14 3C14 4.10457 13.1046 5 12 5C10.8954 5 10 4.10457 10 3ZM11 3C11 3.55228 11.4477 4 12 4C12.5523 4 13 3.55228 13 3V2C13 1.44772 12.5523 1 12 1C11.4477 1 11 1.44772 11 2V3ZM13 7H10V10H13V7Z\" fill={'currentColor'} /></svg>;\n};\nCalendar.displayName = 'Calendar';\nCalendar.isGlyph = true;\nCalendar.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Calendar;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Calendar","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","fillRule","clipRule","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"o9DAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAW,SAAkBC,GAC/B,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,YAEjDW,EAF8DpB,EAAwB,CACvFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAAA,GAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,SAAU,UACVC,SAAU,UACVC,EAAG,2cACH3B,KAAM,iBAEV,SACAT,EAASqC,YAAc,WACvBrC,EAASsC,SAAU,EACnBtC,EAASuC,UAAY,CACnB9B,KAAM+B,EAAS5C,QAAC6C,OAChBpC,KAAMmC,EAAS5C,QAAC8C,UAAU,CAACF,EAAS5C,QAAC+C,OAAQH,EAAAA,QAAUC,SACvDtC,UAAWqC,EAAS5C,QAAC6C"}
1
+ {"version":3,"file":"Calendar.js","sources":["../src/glyphCommon.ts","../src/generated/Calendar.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 9d2337c4c60492aa85c4c4caede7fc3e\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CalendarProps extends LGGlyph.ComponentProps {}\nconst Calendar = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CalendarProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Calendar', {\n title,\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\"><path d=\"M4 2C4 1.44772 4.44772 1 5 1C5.55228 1 6 1.44772 6 2V3C6 3.55228 5.55228 4 5 4C4.44772 4 4 3.55228 4 3V2Z\" fill={'currentColor'} /><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M9 3H7C7 4.10457 6.10457 5 5 5C3.89543 5 3 4.10457 3 3C1.89543 3 1 3.89543 1 5V12C1 13.1046 1.89543 14 3 14H13C14.1046 14 15 13.1046 15 12V5C15 3.89543 14.1046 3 13 3C13 4.10457 12.1046 5 11 5C9.89543 5 9 4.10457 9 3ZM12 7H9V10H12V7Z\" fill={'currentColor'} /><path d=\"M10 3C10 3.55228 10.4477 4 11 4C11.5523 4 12 3.55228 12 3V2C12 1.44772 11.5523 1 11 1C10.4477 1 10 1.44772 10 2V3Z\" fill={'currentColor'} /></svg>;\n};\nCalendar.displayName = 'Calendar';\nCalendar.isGlyph = true;\nCalendar.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Calendar;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Calendar","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","d","fillRule","clipRule","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"o9DAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAW,SAAkBC,GAC/B,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,YAEjDW,EAF8DpB,EAAwB,CACvFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAAA,GAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,4GACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CO,SAAU,UACVC,SAAU,UACVF,EAAG,4OACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,qHACHzB,KAAM,iBAEV,SACAT,EAASqC,YAAc,WACvBrC,EAASsC,SAAU,EACnBtC,EAASuC,UAAY,CACnB9B,KAAM+B,EAAS5C,QAAC6C,OAChBpC,KAAMmC,EAAS5C,QAAC8C,UAAU,CAACF,EAAS5C,QAAC+C,OAAQH,EAAAA,QAAUC,SACvDtC,UAAWqC,EAAS5C,QAAC6C"}
package/dist/Camera.js ADDED
@@ -0,0 +1,2 @@
1
+ !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("prop-types"),require("@leafygreen-ui/emotion")):"function"==typeof define&&define.amd?define(["react","prop-types","@leafygreen-ui/emotion"],r):((e="undefined"!=typeof globalThis?globalThis:e||self).Camera=e.Camera||{},e.Camera.js=r(e.React,e.PropTypes,e["@leafygreen-ui/emotion"]))}(this,(function(e,r,t){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function n(e){if(e&&"object"==typeof e&&"default"in e)return e;var r=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:function(){return e[t]}})}})),r.default=e,Object.freeze(r)}var l=n(e),i=a(r);function o(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},u.apply(this,arguments)}function f(e,r){if(null==e)return{};var t,a,n=function(e,r){if(null==e)return{};var t,a,n={},l=Object.keys(e);for(a=0;a<l.length;a++)t=l[a],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)t=l[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function c(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var s,b,p={small:14,default:16,large:20,xlarge:24};var d=["className","size","title","aria-label","aria-labelledby","fill","role"],y=function(e){var r,a=e.className,n=e.size,i=void 0===n?16:n,y=e.title,m=e["aria-label"],g=e["aria-labelledby"],v=e.fill,C=e.role,O=void 0===C?"img":C,j=f(e,d),h=t.css(s||(s=c(["\n color: ",";\n "])),v),w=t.css(b||(b=c(["\n flex-shrink: 0;\n "]))),P=function(e,r,t){var a,n,l=t["aria-label"],i=t["aria-labelledby"],u=t.title;switch(e){case"img":return l||i||u?(o(a={},"aria-labelledby",i),o(a,"aria-label",l),o(a,"title",u),a):{"aria-label":(n=r,"".concat(n.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(O,"Camera",(o(r={title:y},"aria-label",m),o(r,"aria-labelledby",g),r));return l.createElement("svg",u({className:t.cx(o({},h,null!=v),w,a),height:"number"==typeof i?i:p[i],width:"number"==typeof i?i:p[i],role:O},P,j,{viewBox:"0 0 16 16"}),l.createElement("path",{d:"M10.25 8.5C10.25 9.74264 9.24264 10.75 8 10.75C6.75736 10.75 5.75 9.74264 5.75 8.5C5.75 7.25736 6.75736 6.25 8 6.25C9.24264 6.25 10.25 7.25736 10.25 8.5Z",fill:"currentColor"}),l.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.58541 3.32918C4.8395 2.821 5.35889 2.5 5.92705 2.5H10.0729C10.6411 2.5 11.1605 2.821 11.4146 3.32918L11.7236 3.94721C11.893 4.286 12.2393 4.5 12.618 4.5H13.5C14.3284 4.5 15 5.17157 15 6V12C15 12.8284 14.3284 13.5 13.5 13.5H2.5C1.67157 13.5 1 12.8284 1 12V6C1 5.17157 1.67157 4.5 2.5 4.5H3.38197C3.76074 4.5 4.107 4.286 4.27639 3.94721L4.58541 3.32918ZM11.5 8.5C11.5 10.433 9.933 12 8 12C6.067 12 4.5 10.433 4.5 8.5C4.5 6.567 6.067 5 8 5C9.933 5 11.5 6.567 11.5 8.5Z",fill:"currentColor"}))};return y.displayName="Camera",y.isGlyph=!0,y.propTypes={fill:i.default.string,size:i.default.oneOfType([i.default.number,i.default.string]),className:i.default.string},y}));
2
+ //# sourceMappingURL=Camera.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Camera.js","sources":["../src/glyphCommon.ts","../src/generated/Camera.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum d204b80c1087162281077a3039b0f498\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CameraProps extends LGGlyph.ComponentProps {}\nconst Camera = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CameraProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Camera', {\n title,\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\"><path d=\"M10.25 8.5C10.25 9.74264 9.24264 10.75 8 10.75C6.75736 10.75 5.75 9.74264 5.75 8.5C5.75 7.25736 6.75736 6.25 8 6.25C9.24264 6.25 10.25 7.25736 10.25 8.5Z\" fill={'currentColor'} /><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M4.58541 3.32918C4.8395 2.821 5.35889 2.5 5.92705 2.5H10.0729C10.6411 2.5 11.1605 2.821 11.4146 3.32918L11.7236 3.94721C11.893 4.286 12.2393 4.5 12.618 4.5H13.5C14.3284 4.5 15 5.17157 15 6V12C15 12.8284 14.3284 13.5 13.5 13.5H2.5C1.67157 13.5 1 12.8284 1 12V6C1 5.17157 1.67157 4.5 2.5 4.5H3.38197C3.76074 4.5 4.107 4.286 4.27639 3.94721L4.58541 3.32918ZM11.5 8.5C11.5 10.433 9.933 12 8 12C6.067 12 4.5 10.433 4.5 8.5C4.5 6.567 6.067 5 8 5C9.933 5 11.5 6.567 11.5 8.5Z\" fill={'currentColor'} /></svg>;\n};\nCamera.displayName = 'Camera';\nCamera.isGlyph = true;\nCamera.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Camera;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Camera","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","d","fillRule","clipRule","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"88DAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAS,SAAgBC,GAC3B,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,UAEjDW,EAF4DpB,EAAwB,CACrFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAAA,GAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,4JACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CO,SAAU,UACVC,SAAU,UACVF,EAAG,udACHzB,KAAM,iBAEV,SACAT,EAAOqC,YAAc,SACrBrC,EAAOsC,SAAU,EACjBtC,EAAOuC,UAAY,CACjB9B,KAAM+B,EAAS5C,QAAC6C,OAChBpC,KAAMmC,EAAS5C,QAAC8C,UAAU,CAACF,EAAS5C,QAAC+C,OAAQH,EAAAA,QAAUC,SACvDtC,UAAWqC,EAAS5C,QAAC6C"}
package/dist/Cap.js ADDED
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types"),require("@leafygreen-ui/emotion")):"function"==typeof define&&define.amd?define(["react","prop-types","@leafygreen-ui/emotion"],t):((e="undefined"!=typeof globalThis?globalThis:e||self).Cap=e.Cap||{},e.Cap.js=t(e.React,e.PropTypes,e["@leafygreen-ui/emotion"]))}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function a(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var l=a(e),i=n(t);function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function f(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var s,p,b={small:14,default:16,large:20,xlarge:24};var d=["className","size","title","aria-label","aria-labelledby","fill","role"],y=function(e){var t,n=e.className,a=e.size,i=void 0===a?16:a,y=e.title,m=e["aria-label"],g=e["aria-labelledby"],v=e.fill,C=e.role,O=void 0===C?"img":C,j=f(e,d),h=r.css(s||(s=c(["\n color: ",";\n "])),v),w=r.css(p||(p=c(["\n flex-shrink: 0;\n "]))),P=function(e,t,r){var n,a,l=r["aria-label"],i=r["aria-labelledby"],u=r.title;switch(e){case"img":return l||i||u?(o(n={},"aria-labelledby",i),o(n,"aria-label",l),o(n,"title",u),n):{"aria-label":(a=t,"".concat(a.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(O,"Cap",(o(t={title:y},"aria-label",m),o(t,"aria-labelledby",g),t));return l.createElement("svg",u({className:r.cx(o({},h,null!=v),w,n),height:"number"==typeof i?i:b[i],width:"number"==typeof i?i:b[i],role:O},P,j,{viewBox:"0 0 16 16"}),l.createElement("path",{d:"M2.96929 8.00791V10.3071C2.96929 10.3383 2.96986 10.3693 2.97099 10.4002C2.96986 10.4862 2.96929 10.5734 2.96929 10.6618C2.96929 12.5877 5.50373 13.5 7.96929 13.5C10.4348 13.5 12.9693 12.5877 12.9693 10.6618C12.9693 10.5773 12.9686 10.4938 12.9672 10.4113C12.9686 10.3767 12.9693 10.342 12.9693 10.3071V8.00118L8.70622 9.78705C8.20883 9.99541 7.64838 9.99409 7.15198 9.78338L2.96929 8.00791Z",fill:"currentColor"}),l.createElement("path",{d:"M7.56463 2.58331C7.81791 2.4729 8.10559 2.47221 8.3594 2.5814L14.7092 5.31304C15.1145 5.4874 15.1118 6.06303 14.7048 6.23351L8.35054 8.89542C8.10185 8.9996 7.82162 8.99894 7.57343 8.89358L1.30463 6.23261C0.90058 6.0611 0.897823 5.48941 1.3002 5.31401L7.56463 2.58331Z",fill:"currentColor"}),l.createElement("path",{d:"M13.9693 7.62582V9.10335C13.6704 9.27626 13.4693 9.59943 13.4693 9.96957C13.4693 10.5219 13.917 10.9696 14.4693 10.9696C15.0216 10.9696 15.4693 10.5219 15.4693 9.96957C15.4693 9.59943 15.2682 9.27626 14.9693 9.10336V7.20691L13.9693 7.62582Z",fill:"currentColor"}))};return y.displayName="Cap",y.isGlyph=!0,y.propTypes={fill:i.default.string,size:i.default.oneOfType([i.default.number,i.default.string]),className:i.default.string},y}));
2
+ //# sourceMappingURL=Cap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cap.js","sources":["../src/glyphCommon.ts","../src/generated/Cap.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 2e7ecb7e84d0149540b3bfdfb0b8931f\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CapProps extends LGGlyph.ComponentProps {}\nconst Cap = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CapProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Cap', {\n title,\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\"><path d=\"M2.96929 8.00791V10.3071C2.96929 10.3383 2.96986 10.3693 2.97099 10.4002C2.96986 10.4862 2.96929 10.5734 2.96929 10.6618C2.96929 12.5877 5.50373 13.5 7.96929 13.5C10.4348 13.5 12.9693 12.5877 12.9693 10.6618C12.9693 10.5773 12.9686 10.4938 12.9672 10.4113C12.9686 10.3767 12.9693 10.342 12.9693 10.3071V8.00118L8.70622 9.78705C8.20883 9.99541 7.64838 9.99409 7.15198 9.78338L2.96929 8.00791Z\" fill={'currentColor'} /><path d=\"M7.56463 2.58331C7.81791 2.4729 8.10559 2.47221 8.3594 2.5814L14.7092 5.31304C15.1145 5.4874 15.1118 6.06303 14.7048 6.23351L8.35054 8.89542C8.10185 8.9996 7.82162 8.99894 7.57343 8.89358L1.30463 6.23261C0.90058 6.0611 0.897823 5.48941 1.3002 5.31401L7.56463 2.58331Z\" fill={'currentColor'} /><path d=\"M13.9693 7.62582V9.10335C13.6704 9.27626 13.4693 9.59943 13.4693 9.96957C13.4693 10.5219 13.917 10.9696 14.4693 10.9696C15.0216 10.9696 15.4693 10.5219 15.4693 9.96957C15.4693 9.59943 15.2682 9.27626 14.9693 9.10336V7.20691L13.9693 7.62582Z\" fill={'currentColor'} /></svg>;\n};\nCap.displayName = 'Cap';\nCap.isGlyph = true;\nCap.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Cap;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Cap","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"q8DAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAM,SAAaC,GACrB,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,OAEjDW,EAFyDpB,EAAwB,CAClFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAAA,GAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,0YACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,8QACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,mPACHzB,KAAM,iBAEV,SACAT,EAAImC,YAAc,MAClBnC,EAAIoC,SAAU,EACdpC,EAAIqC,UAAY,CACd5B,KAAM6B,EAAS1C,QAAC2C,OAChBlC,KAAMiC,EAAS1C,QAAC4C,UAAU,CAACF,EAAS1C,QAAC6C,OAAQH,EAAAA,QAAUC,SACvDpC,UAAWmC,EAAS1C,QAAC2C"}
package/dist/Key.js CHANGED
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types"),require("@leafygreen-ui/emotion")):"function"==typeof define&&define.amd?define(["react","prop-types","@leafygreen-ui/emotion"],t):((e="undefined"!=typeof globalThis?globalThis:e||self).Key=e.Key||{},e.Key.js=t(e.React,e.PropTypes,e["@leafygreen-ui/emotion"]))}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=l(e),a=n(t);function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function f(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var s,b,p={small:14,default:16,large:20,xlarge:24};var y=["className","size","title","aria-label","aria-labelledby","fill","role"],d=function(e){var t,n=e.className,l=e.size,a=void 0===l?16:l,d=e.title,m=e["aria-label"],g=e["aria-labelledby"],v=e.fill,O=e.role,j=void 0===O?"img":O,h=f(e,y),C=r.css(s||(s=c(["\n color: ",";\n "])),v),w=r.css(b||(b=c(["\n flex-shrink: 0;\n "]))),P=function(e,t,r){var n,l,i=r["aria-label"],a=r["aria-labelledby"],u=r.title;switch(e){case"img":return i||a||u?(o(n={},"aria-labelledby",a),o(n,"aria-label",i),o(n,"title",u),n):{"aria-label":(l=t,"".concat(l.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(j,"Key",(o(t={title:d},"aria-label",m),o(t,"aria-labelledby",g),t));return i.createElement("svg",u({className:r.cx(o({},C,null!=v),w,n),height:"number"==typeof a?a:p[a],width:"number"==typeof a?a:p[a],role:j},P,h,{viewBox:"0 0 16 16"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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",fill:"currentColor"}))};return d.displayName="Key",d.isGlyph=!0,d.propTypes={fill:a.default.string,size:a.default.oneOfType([a.default.number,a.default.string]),className:a.default.string},d}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react"),require("prop-types"),require("@leafygreen-ui/emotion")):"function"==typeof define&&define.amd?define(["react","prop-types","@leafygreen-ui/emotion"],t):((e="undefined"!=typeof globalThis?globalThis:e||self).Key=e.Key||{},e.Key.js=t(e.React,e.PropTypes,e["@leafygreen-ui/emotion"]))}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&"object"==typeof e&&"default"in e)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=l(e),a=n(t);function o(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},u.apply(this,arguments)}function f(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var s,b,p={small:14,default:16,large:20,xlarge:24};var y=["className","size","title","aria-label","aria-labelledby","fill","role"],d=function(e){var t,n=e.className,l=e.size,a=void 0===l?16:l,d=e.title,m=e["aria-label"],g=e["aria-labelledby"],v=e.fill,O=e.role,j=void 0===O?"img":O,h=f(e,y),C=r.css(s||(s=c(["\n color: ",";\n "])),v),w=r.css(b||(b=c(["\n flex-shrink: 0;\n "]))),P=function(e,t,r){var n,l,i=r["aria-label"],a=r["aria-labelledby"],u=r.title;switch(e){case"img":return i||a||u?(o(n={},"aria-labelledby",a),o(n,"aria-label",i),o(n,"title",u),n):{"aria-label":(l=t,"".concat(l.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(j,"Key",(o(t={title:d},"aria-label",m),o(t,"aria-labelledby",g),t));return i.createElement("svg",u({className:r.cx(o({},C,null!=v),w,n),height:"number"==typeof a?a:p[a],width:"number"==typeof a?a:p[a],role:j},P,h,{viewBox:"0 0 16 16"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.01504 10.0301C6.66679 10.0301 7.28227 9.8748 7.82649 9.5992L9.33772 11.1104L8.41683 12.0313C8.15573 12.2924 8.15573 12.7157 8.41683 12.9768L9.244 13.804C9.5051 14.0651 9.92843 14.0651 10.1895 13.804L11.1104 12.8831L11.8602 13.6329C12.3497 14.1224 13.1433 14.1224 13.6329 13.6329C14.1224 13.1433 14.1224 12.3497 13.6329 11.8602L9.59919 7.82651C9.87479 7.28228 10.0301 6.6668 10.0301 6.01504C10.0301 3.7976 8.23249 2 6.01504 2C3.7976 2 2 3.7976 2 6.01504C2 8.23249 3.7976 10.0301 6.01504 10.0301ZM5.26224 6.51692C5.95519 6.51692 6.51694 5.95517 6.51694 5.26222C6.51694 4.56927 5.95519 4.00752 5.26224 4.00752C4.56929 4.00752 4.00754 4.56927 4.00754 5.26222C4.00754 5.95517 4.56929 6.51692 5.26224 6.51692Z",fill:"currentColor"}))};return d.displayName="Key",d.isGlyph=!0,d.propTypes={fill:a.default.string,size:a.default.oneOfType([a.default.number,a.default.string]),className:a.default.string},d}));
2
2
  //# sourceMappingURL=Key.js.map
package/dist/Key.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Key.js","sources":["../src/glyphCommon.ts","../src/generated/Key.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 041a3d00ad207ef5b3f0cbcb57ab9bd8\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface KeyProps extends LGGlyph.ComponentProps {}\nconst Key = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: KeyProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Key', {\n title,\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\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" 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\" fill={'currentColor'} /></svg>;\n};\nKey.displayName = 'Key';\nKey.isGlyph = true;\nKey.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Key;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Key","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","fillRule","clipRule","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"q8DAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAM,SAAaC,GACrB,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,OAEjDW,EAFyDpB,EAAwB,CAClFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAAA,GAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,SAAU,UACVC,SAAU,UACVC,EAAG,uiBACH3B,KAAM,iBAEV,SACAT,EAAIqC,YAAc,MAClBrC,EAAIsC,SAAU,EACdtC,EAAIuC,UAAY,CACd9B,KAAM+B,EAAS5C,QAAC6C,OAChBpC,KAAMmC,EAAS5C,QAAC8C,UAAU,CAACF,EAAS5C,QAAC+C,OAAQH,EAAAA,QAAUC,SACvDtC,UAAWqC,EAAS5C,QAAC6C"}
1
+ {"version":3,"file":"Key.js","sources":["../src/glyphCommon.ts","../src/generated/Key.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 0e68d2d43abc00d908961394d698765c\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface KeyProps extends LGGlyph.ComponentProps {}\nconst Key = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: KeyProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Key', {\n title,\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\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M6.01504 10.0301C6.66679 10.0301 7.28227 9.8748 7.82649 9.5992L9.33772 11.1104L8.41683 12.0313C8.15573 12.2924 8.15573 12.7157 8.41683 12.9768L9.244 13.804C9.5051 14.0651 9.92843 14.0651 10.1895 13.804L11.1104 12.8831L11.8602 13.6329C12.3497 14.1224 13.1433 14.1224 13.6329 13.6329C14.1224 13.1433 14.1224 12.3497 13.6329 11.8602L9.59919 7.82651C9.87479 7.28228 10.0301 6.6668 10.0301 6.01504C10.0301 3.7976 8.23249 2 6.01504 2C3.7976 2 2 3.7976 2 6.01504C2 8.23249 3.7976 10.0301 6.01504 10.0301ZM5.26224 6.51692C5.95519 6.51692 6.51694 5.95517 6.51694 5.26222C6.51694 4.56927 5.95519 4.00752 5.26224 4.00752C4.56929 4.00752 4.00754 4.56927 4.00754 5.26222C4.00754 5.95517 4.56929 6.51692 5.26224 6.51692Z\" fill={'currentColor'} /></svg>;\n};\nKey.displayName = 'Key';\nKey.isGlyph = true;\nKey.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Key;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Key","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","fillRule","clipRule","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"q8DAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAM,SAAaC,GACrB,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,OAEjDW,EAFyDpB,EAAwB,CAClFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAAA,GAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,SAAU,UACVC,SAAU,UACVC,EAAG,qsBACH3B,KAAM,iBAEV,SACAT,EAAIqC,YAAc,MAClBrC,EAAIsC,SAAU,EACdtC,EAAIuC,UAAY,CACd9B,KAAM+B,EAAS5C,QAAC6C,OAChBpC,KAAMmC,EAAS5C,QAAC8C,UAAU,CAACF,EAAS5C,QAAC+C,OAAQH,EAAAA,QAAUC,SACvDtC,UAAWqC,EAAS5C,QAAC6C"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import r from"prop-types";import{css as t,cx as l}from"@leafygreen-ui/emotion";function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var t,l,a=function(e,r){if(null==e)return{};var t,l,a={},i=Object.keys(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var u,f,c={small:14,default:16,large:20,xlarge:24};var s=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,p=r.className,m=r.size,y=void 0===m?16:m,d=r.title,v=r["aria-label"],g=r["aria-labelledby"],C=r.fill,O=r.role,h=void 0===O?"img":O,j=n(r,s),w=t(u||(u=o(["\n color: ",";\n "])),C),V=t(f||(f=o(["\n flex-shrink: 0;\n "]))),P=function(e,r,t){var l,i,n=t["aria-label"],o=t["aria-labelledby"],u=t.title;switch(e){case"img":return n||o||u?(a(l={},"aria-labelledby",o),a(l,"aria-label",n),a(l,"title",u),l):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(h,"Calendar",(a(b={title:d},"aria-label",v),a(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:l(a({},w,null!=C),V,p),height:"number"==typeof y?y:c[y],width:"number"==typeof y?y:c[y],role:h},P,j,{viewBox:"0 0 16 16"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5 2C5 1.44772 5.44772 1 6 1C6.55228 1 7 1.44772 7 2V3C7 3.55228 6.55228 4 6 4C5.44772 4 5 3.55228 5 3V2ZM10 3H8C8 4.10457 7.10457 5 6 5C4.89543 5 4 4.10457 4 3C2.89543 3 2 3.89543 2 5V12C2 13.1046 2.89543 14 4 14H14C15.1046 14 16 13.1046 16 12V5C16 3.89543 15.1046 3 14 3C14 4.10457 13.1046 5 12 5C10.8954 5 10 4.10457 10 3ZM11 3C11 3.55228 11.4477 4 12 4C12.5523 4 13 3.55228 13 3V2C13 1.44772 12.5523 1 12 1C11.4477 1 11 1.44772 11 2V3ZM13 7H10V10H13V7Z",fill:"currentColor"}))};b.displayName="Calendar",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
1
+ import*as e from"react";import r from"prop-types";import{css as t,cx as l}from"@leafygreen-ui/emotion";function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var t,l,a=function(e,r){if(null==e)return{};var t,l,a={},i=Object.keys(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var u,c,f={small:14,default:16,large:20,xlarge:24};var s=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,p=r.className,m=r.size,y=void 0===m?16:m,d=r.title,v=r["aria-label"],g=r["aria-labelledby"],C=r.fill,O=r.role,h=void 0===O?"img":O,j=n(r,s),w=t(u||(u=o(["\n color: ",";\n "])),C),V=t(c||(c=o(["\n flex-shrink: 0;\n "]))),P=function(e,r,t){var l,i,n=t["aria-label"],o=t["aria-labelledby"],u=t.title;switch(e){case"img":return n||o||u?(a(l={},"aria-labelledby",o),a(l,"aria-label",n),a(l,"title",u),l):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(h,"Calendar",(a(b={title:d},"aria-label",v),a(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:l(a({},w,null!=C),V,p),height:"number"==typeof y?y:f[y],width:"number"==typeof y?y:f[y],role:h},P,j,{viewBox:"0 0 16 16"}),e.createElement("path",{d:"M4 2C4 1.44772 4.44772 1 5 1C5.55228 1 6 1.44772 6 2V3C6 3.55228 5.55228 4 5 4C4.44772 4 4 3.55228 4 3V2Z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 3H7C7 4.10457 6.10457 5 5 5C3.89543 5 3 4.10457 3 3C1.89543 3 1 3.89543 1 5V12C1 13.1046 1.89543 14 3 14H13C14.1046 14 15 13.1046 15 12V5C15 3.89543 14.1046 3 13 3C13 4.10457 12.1046 5 11 5C9.89543 5 9 4.10457 9 3ZM12 7H9V10H12V7Z",fill:"currentColor"}),e.createElement("path",{d:"M10 3C10 3.55228 10.4477 4 11 4C11.5523 4 12 3.55228 12 3V2C12 1.44772 11.5523 1 11 1C10.4477 1 10 1.44772 10 2V3Z",fill:"currentColor"}))};b.displayName="Calendar",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
2
2
  //# sourceMappingURL=Calendar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.js","sources":["../../src/glyphCommon.ts","../../src/generated/Calendar.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum e4c0ebc68c4da3e4c22daf5e81659bbe\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CalendarProps extends LGGlyph.ComponentProps {}\nconst Calendar = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CalendarProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Calendar', {\n title,\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\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M5 2C5 1.44772 5.44772 1 6 1C6.55228 1 7 1.44772 7 2V3C7 3.55228 6.55228 4 6 4C5.44772 4 5 3.55228 5 3V2ZM10 3H8C8 4.10457 7.10457 5 6 5C4.89543 5 4 4.10457 4 3C2.89543 3 2 3.89543 2 5V12C2 13.1046 2.89543 14 4 14H14C15.1046 14 16 13.1046 16 12V5C16 3.89543 15.1046 3 14 3C14 4.10457 13.1046 5 12 5C10.8954 5 10 4.10457 10 3ZM11 3C11 3.55228 11.4477 4 12 4C12.5523 4 13 3.55228 13 3V2C13 1.44772 12.5523 1 12 1C11.4477 1 11 1.44772 11 2V3ZM13 7H10V10H13V7Z\" fill={'currentColor'} /></svg>;\n};\nCalendar.displayName = 'Calendar';\nCalendar.isGlyph = true;\nCalendar.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Calendar;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Calendar","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","fillRule","clipRule","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"yvCAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAW,SAAkBC,GAC/B,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,YAEjDW,EAF8DpB,EAAwB,CACvFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,SAAU,UACVC,SAAU,UACVC,EAAG,2cACH3B,KAAM,iBAEV,EACAT,EAASqC,YAAc,WACvBrC,EAASsC,SAAU,EACnBtC,EAASuC,UAAY,CACnB9B,KAAM+B,EAAUC,OAChBpC,KAAMmC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDtC,UAAWqC,EAAUC"}
1
+ {"version":3,"file":"Calendar.js","sources":["../../src/glyphCommon.ts","../../src/generated/Calendar.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 9d2337c4c60492aa85c4c4caede7fc3e\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CalendarProps extends LGGlyph.ComponentProps {}\nconst Calendar = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CalendarProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Calendar', {\n title,\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\"><path d=\"M4 2C4 1.44772 4.44772 1 5 1C5.55228 1 6 1.44772 6 2V3C6 3.55228 5.55228 4 5 4C4.44772 4 4 3.55228 4 3V2Z\" fill={'currentColor'} /><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M9 3H7C7 4.10457 6.10457 5 5 5C3.89543 5 3 4.10457 3 3C1.89543 3 1 3.89543 1 5V12C1 13.1046 1.89543 14 3 14H13C14.1046 14 15 13.1046 15 12V5C15 3.89543 14.1046 3 13 3C13 4.10457 12.1046 5 11 5C9.89543 5 9 4.10457 9 3ZM12 7H9V10H12V7Z\" fill={'currentColor'} /><path d=\"M10 3C10 3.55228 10.4477 4 11 4C11.5523 4 12 3.55228 12 3V2C12 1.44772 11.5523 1 11 1C10.4477 1 10 1.44772 10 2V3Z\" fill={'currentColor'} /></svg>;\n};\nCalendar.displayName = 'Calendar';\nCalendar.isGlyph = true;\nCalendar.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Calendar;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Calendar","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","d","fillRule","clipRule","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"yvCAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAW,SAAkBC,GAC/B,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,YAEjDW,EAF8DpB,EAAwB,CACvFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,4GACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CO,SAAU,UACVC,SAAU,UACVF,EAAG,4OACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,qHACHzB,KAAM,iBAEV,EACAT,EAASqC,YAAc,WACvBrC,EAASsC,SAAU,EACnBtC,EAASuC,UAAY,CACnB9B,KAAM+B,EAAUC,OAChBpC,KAAMmC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDtC,UAAWqC,EAAUC"}
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import r from"prop-types";import{css as t,cx as l}from"@leafygreen-ui/emotion";function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var t,l,a=function(e,r){if(null==e)return{};var t,l,a={},i=Object.keys(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var u,c,f={small:14,default:16,large:20,xlarge:24};var s=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,p=r.className,m=r.size,y=void 0===m?16:m,d=r.title,v=r["aria-label"],g=r["aria-labelledby"],C=r.fill,O=r.role,h=void 0===O?"img":O,j=n(r,s),w=t(u||(u=o(["\n color: ",";\n "])),C),P=t(c||(c=o(["\n flex-shrink: 0;\n "]))),x=function(e,r,t){var l,i,n=t["aria-label"],o=t["aria-labelledby"],u=t.title;switch(e){case"img":return n||o||u?(a(l={},"aria-labelledby",o),a(l,"aria-label",n),a(l,"title",u),l):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(h,"Camera",(a(b={title:d},"aria-label",v),a(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:l(a({},w,null!=C),P,p),height:"number"==typeof y?y:f[y],width:"number"==typeof y?y:f[y],role:h},x,j,{viewBox:"0 0 16 16"}),e.createElement("path",{d:"M10.25 8.5C10.25 9.74264 9.24264 10.75 8 10.75C6.75736 10.75 5.75 9.74264 5.75 8.5C5.75 7.25736 6.75736 6.25 8 6.25C9.24264 6.25 10.25 7.25736 10.25 8.5Z",fill:"currentColor"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.58541 3.32918C4.8395 2.821 5.35889 2.5 5.92705 2.5H10.0729C10.6411 2.5 11.1605 2.821 11.4146 3.32918L11.7236 3.94721C11.893 4.286 12.2393 4.5 12.618 4.5H13.5C14.3284 4.5 15 5.17157 15 6V12C15 12.8284 14.3284 13.5 13.5 13.5H2.5C1.67157 13.5 1 12.8284 1 12V6C1 5.17157 1.67157 4.5 2.5 4.5H3.38197C3.76074 4.5 4.107 4.286 4.27639 3.94721L4.58541 3.32918ZM11.5 8.5C11.5 10.433 9.933 12 8 12C6.067 12 4.5 10.433 4.5 8.5C4.5 6.567 6.067 5 8 5C9.933 5 11.5 6.567 11.5 8.5Z",fill:"currentColor"}))};b.displayName="Camera",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
2
+ //# sourceMappingURL=Camera.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Camera.js","sources":["../../src/glyphCommon.ts","../../src/generated/Camera.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum d204b80c1087162281077a3039b0f498\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CameraProps extends LGGlyph.ComponentProps {}\nconst Camera = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CameraProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Camera', {\n title,\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\"><path d=\"M10.25 8.5C10.25 9.74264 9.24264 10.75 8 10.75C6.75736 10.75 5.75 9.74264 5.75 8.5C5.75 7.25736 6.75736 6.25 8 6.25C9.24264 6.25 10.25 7.25736 10.25 8.5Z\" fill={'currentColor'} /><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M4.58541 3.32918C4.8395 2.821 5.35889 2.5 5.92705 2.5H10.0729C10.6411 2.5 11.1605 2.821 11.4146 3.32918L11.7236 3.94721C11.893 4.286 12.2393 4.5 12.618 4.5H13.5C14.3284 4.5 15 5.17157 15 6V12C15 12.8284 14.3284 13.5 13.5 13.5H2.5C1.67157 13.5 1 12.8284 1 12V6C1 5.17157 1.67157 4.5 2.5 4.5H3.38197C3.76074 4.5 4.107 4.286 4.27639 3.94721L4.58541 3.32918ZM11.5 8.5C11.5 10.433 9.933 12 8 12C6.067 12 4.5 10.433 4.5 8.5C4.5 6.567 6.067 5 8 5C9.933 5 11.5 6.567 11.5 8.5Z\" fill={'currentColor'} /></svg>;\n};\nCamera.displayName = 'Camera';\nCamera.isGlyph = true;\nCamera.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Camera;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Camera","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","d","fillRule","clipRule","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"yvCAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAS,SAAgBC,GAC3B,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,UAEjDW,EAF4DpB,EAAwB,CACrFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,4JACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CO,SAAU,UACVC,SAAU,UACVF,EAAG,udACHzB,KAAM,iBAEV,EACAT,EAAOqC,YAAc,SACrBrC,EAAOsC,SAAU,EACjBtC,EAAOuC,UAAY,CACjB9B,KAAM+B,EAAUC,OAChBpC,KAAMmC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDtC,UAAWqC,EAAUC"}
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import r from"prop-types";import{css as t,cx as l}from"@leafygreen-ui/emotion";function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var t,l,a=function(e,r){if(null==e)return{};var t,l,a={},i=Object.keys(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var c,u,f={small:14,default:16,large:20,xlarge:24};var s=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,p=r.className,m=r.size,y=void 0===m?16:m,v=r.title,d=r["aria-label"],g=r["aria-labelledby"],C=r.fill,O=r.role,h=void 0===O?"img":O,j=n(r,s),w=t(c||(c=o(["\n color: ",";\n "])),C),L=t(u||(u=o(["\n flex-shrink: 0;\n "]))),P=function(e,r,t){var l,i,n=t["aria-label"],o=t["aria-labelledby"],c=t.title;switch(e){case"img":return n||o||c?(a(l={},"aria-labelledby",o),a(l,"aria-label",n),a(l,"title",c),l):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(h,"Cap",(a(b={title:v},"aria-label",d),a(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:l(a({},w,null!=C),L,p),height:"number"==typeof y?y:f[y],width:"number"==typeof y?y:f[y],role:h},P,j,{viewBox:"0 0 16 16"}),e.createElement("path",{d:"M2.96929 8.00791V10.3071C2.96929 10.3383 2.96986 10.3693 2.97099 10.4002C2.96986 10.4862 2.96929 10.5734 2.96929 10.6618C2.96929 12.5877 5.50373 13.5 7.96929 13.5C10.4348 13.5 12.9693 12.5877 12.9693 10.6618C12.9693 10.5773 12.9686 10.4938 12.9672 10.4113C12.9686 10.3767 12.9693 10.342 12.9693 10.3071V8.00118L8.70622 9.78705C8.20883 9.99541 7.64838 9.99409 7.15198 9.78338L2.96929 8.00791Z",fill:"currentColor"}),e.createElement("path",{d:"M7.56463 2.58331C7.81791 2.4729 8.10559 2.47221 8.3594 2.5814L14.7092 5.31304C15.1145 5.4874 15.1118 6.06303 14.7048 6.23351L8.35054 8.89542C8.10185 8.9996 7.82162 8.99894 7.57343 8.89358L1.30463 6.23261C0.90058 6.0611 0.897823 5.48941 1.3002 5.31401L7.56463 2.58331Z",fill:"currentColor"}),e.createElement("path",{d:"M13.9693 7.62582V9.10335C13.6704 9.27626 13.4693 9.59943 13.4693 9.96957C13.4693 10.5219 13.917 10.9696 14.4693 10.9696C15.0216 10.9696 15.4693 10.5219 15.4693 9.96957C15.4693 9.59943 15.2682 9.27626 14.9693 9.10336V7.20691L13.9693 7.62582Z",fill:"currentColor"}))};b.displayName="Cap",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
2
+ //# sourceMappingURL=Cap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cap.js","sources":["../../src/glyphCommon.ts","../../src/generated/Cap.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 2e7ecb7e84d0149540b3bfdfb0b8931f\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface CapProps extends LGGlyph.ComponentProps {}\nconst Cap = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: CapProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Cap', {\n title,\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\"><path d=\"M2.96929 8.00791V10.3071C2.96929 10.3383 2.96986 10.3693 2.97099 10.4002C2.96986 10.4862 2.96929 10.5734 2.96929 10.6618C2.96929 12.5877 5.50373 13.5 7.96929 13.5C10.4348 13.5 12.9693 12.5877 12.9693 10.6618C12.9693 10.5773 12.9686 10.4938 12.9672 10.4113C12.9686 10.3767 12.9693 10.342 12.9693 10.3071V8.00118L8.70622 9.78705C8.20883 9.99541 7.64838 9.99409 7.15198 9.78338L2.96929 8.00791Z\" fill={'currentColor'} /><path d=\"M7.56463 2.58331C7.81791 2.4729 8.10559 2.47221 8.3594 2.5814L14.7092 5.31304C15.1145 5.4874 15.1118 6.06303 14.7048 6.23351L8.35054 8.89542C8.10185 8.9996 7.82162 8.99894 7.57343 8.89358L1.30463 6.23261C0.90058 6.0611 0.897823 5.48941 1.3002 5.31401L7.56463 2.58331Z\" fill={'currentColor'} /><path d=\"M13.9693 7.62582V9.10335C13.6704 9.27626 13.4693 9.59943 13.4693 9.96957C13.4693 10.5219 13.917 10.9696 14.4693 10.9696C15.0216 10.9696 15.4693 10.5219 15.4693 9.96957C15.4693 9.59943 15.2682 9.27626 14.9693 9.10336V7.20691L13.9693 7.62582Z\" fill={'currentColor'} /></svg>;\n};\nCap.displayName = 'Cap';\nCap.isGlyph = true;\nCap.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Cap;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Cap","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"yvCAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAM,SAAaC,GACrB,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,OAEjDW,EAFyDpB,EAAwB,CAClFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,0YACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,8QACHzB,KAAM,iBACSkB,EAAMC,cAAc,OAAQ,CAC3CM,EAAG,mPACHzB,KAAM,iBAEV,EACAT,EAAImC,YAAc,MAClBnC,EAAIoC,SAAU,EACdpC,EAAIqC,UAAY,CACd5B,KAAM6B,EAAUC,OAChBlC,KAAMiC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDpC,UAAWmC,EAAUC"}
package/dist/esm/Key.js CHANGED
@@ -1,2 +1,2 @@
1
- import*as e from"react";import r from"prop-types";import{css as t,cx as l}from"@leafygreen-ui/emotion";function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var t,l,a=function(e,r){if(null==e)return{};var t,l,a={},i=Object.keys(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var u,f,c={small:14,default:16,large:20,xlarge:24};var s=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,p=r.className,y=r.size,m=void 0===y?16:y,v=r.title,d=r["aria-label"],g=r["aria-labelledby"],O=r.fill,h=r.role,C=void 0===h?"img":h,j=n(r,s),w=t(u||(u=o(["\n color: ",";\n "])),O),P=t(f||(f=o(["\n flex-shrink: 0;\n "]))),x=function(e,r,t){var l,i,n=t["aria-label"],o=t["aria-labelledby"],u=t.title;switch(e){case"img":return n||o||u?(a(l={},"aria-labelledby",o),a(l,"aria-label",n),a(l,"title",u),l):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(C,"Key",(a(b={title:v},"aria-label",d),a(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:l(a({},w,null!=O),P,p),height:"number"==typeof m?m:c[m],width:"number"==typeof m?m:c[m],role:C},x,j,{viewBox:"0 0 16 16"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",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",fill:"currentColor"}))};b.displayName="Key",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
1
+ import*as e from"react";import r from"prop-types";import{css as t,cx as l}from"@leafygreen-ui/emotion";function a(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var l=t.call(e,r||"default");if("object"!=typeof l)return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function i(){return i=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&(e[l]=t[l])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var t,l,a=function(e,r){if(null==e)return{};var t,l,a={},i=Object.keys(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l<i.length;l++)t=i[l],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var u,f,c={small:14,default:16,large:20,xlarge:24};var s=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,p=r.className,y=r.size,m=void 0===y?16:y,v=r.title,d=r["aria-label"],g=r["aria-labelledby"],O=r.fill,h=r.role,C=void 0===h?"img":h,j=n(r,s),w=t(u||(u=o(["\n color: ",";\n "])),O),P=t(f||(f=o(["\n flex-shrink: 0;\n "]))),x=function(e,r,t){var l,i,n=t["aria-label"],o=t["aria-labelledby"],u=t.title;switch(e){case"img":return n||o||u?(a(l={},"aria-labelledby",o),a(l,"aria-label",n),a(l,"title",u),l):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(C,"Key",(a(b={title:v},"aria-label",d),a(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:l(a({},w,null!=O),P,p),height:"number"==typeof m?m:c[m],width:"number"==typeof m?m:c[m],role:C},x,j,{viewBox:"0 0 16 16"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.01504 10.0301C6.66679 10.0301 7.28227 9.8748 7.82649 9.5992L9.33772 11.1104L8.41683 12.0313C8.15573 12.2924 8.15573 12.7157 8.41683 12.9768L9.244 13.804C9.5051 14.0651 9.92843 14.0651 10.1895 13.804L11.1104 12.8831L11.8602 13.6329C12.3497 14.1224 13.1433 14.1224 13.6329 13.6329C14.1224 13.1433 14.1224 12.3497 13.6329 11.8602L9.59919 7.82651C9.87479 7.28228 10.0301 6.6668 10.0301 6.01504C10.0301 3.7976 8.23249 2 6.01504 2C3.7976 2 2 3.7976 2 6.01504C2 8.23249 3.7976 10.0301 6.01504 10.0301ZM5.26224 6.51692C5.95519 6.51692 6.51694 5.95517 6.51694 5.26222C6.51694 4.56927 5.95519 4.00752 5.26224 4.00752C4.56929 4.00752 4.00754 4.56927 4.00754 5.26222C4.00754 5.95517 4.56929 6.51692 5.26224 6.51692Z",fill:"currentColor"}))};b.displayName="Key",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
2
2
  //# sourceMappingURL=Key.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Key.js","sources":["../../src/glyphCommon.ts","../../src/generated/Key.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 041a3d00ad207ef5b3f0cbcb57ab9bd8\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface KeyProps extends LGGlyph.ComponentProps {}\nconst Key = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: KeyProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Key', {\n title,\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\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" 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\" fill={'currentColor'} /></svg>;\n};\nKey.displayName = 'Key';\nKey.isGlyph = true;\nKey.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Key;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Key","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","fillRule","clipRule","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"yvCAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAM,SAAaC,GACrB,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,OAEjDW,EAFyDpB,EAAwB,CAClFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,SAAU,UACVC,SAAU,UACVC,EAAG,uiBACH3B,KAAM,iBAEV,EACAT,EAAIqC,YAAc,MAClBrC,EAAIsC,SAAU,EACdtC,EAAIuC,UAAY,CACd9B,KAAM+B,EAAUC,OAChBpC,KAAMmC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDtC,UAAWqC,EAAUC"}
1
+ {"version":3,"file":"Key.js","sources":["../../src/glyphCommon.ts","../../src/generated/Key.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}\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","/**\n* This is a generated file. Do not modify it manually.\n*\n* @script ./node_modules/.bin/ts-node packages/icon/scripts/build.ts\n* @checksum 0e68d2d43abc00d908961394d698765c\n*/\nimport * as React from \"react\";\nimport PropTypes from 'prop-types';\nimport { css, cx } from '@leafygreen-ui/emotion';\nimport { generateAccessibleProps, sizeMap } from '../glyphCommon';\nimport { LGGlyph } from '../types';\nexport interface KeyProps extends LGGlyph.ComponentProps {}\nconst Key = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: KeyProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Key', {\n title,\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\"><path fillRule=\"evenodd\" clipRule=\"evenodd\" d=\"M6.01504 10.0301C6.66679 10.0301 7.28227 9.8748 7.82649 9.5992L9.33772 11.1104L8.41683 12.0313C8.15573 12.2924 8.15573 12.7157 8.41683 12.9768L9.244 13.804C9.5051 14.0651 9.92843 14.0651 10.1895 13.804L11.1104 12.8831L11.8602 13.6329C12.3497 14.1224 13.1433 14.1224 13.6329 13.6329C14.1224 13.1433 14.1224 12.3497 13.6329 11.8602L9.59919 7.82651C9.87479 7.28228 10.0301 6.6668 10.0301 6.01504C10.0301 3.7976 8.23249 2 6.01504 2C3.7976 2 2 3.7976 2 6.01504C2 8.23249 3.7976 10.0301 6.01504 10.0301ZM5.26224 6.51692C5.95519 6.51692 6.51694 5.95517 6.51694 5.26222C6.51694 4.56927 5.95519 4.00752 5.26224 4.00752C4.56929 4.00752 4.00754 4.56927 4.00754 5.26222C4.00754 5.95517 4.56929 6.51692 5.26224 6.51692Z\" fill={'currentColor'} /></svg>;\n};\nKey.displayName = 'Key';\nKey.isGlyph = true;\nKey.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string\n};\nexport default Key;"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Key","_ref","_generateAccessiblePr","className","_ref$size","size","title","ariaLabel","ariaLabelledby","fill","_ref$role","role","props","_objectWithoutProperties","fillStyle","css","_taggedTemplateLiteral","noFlexShrink","accessibleProps","glyphName","_ref2","name","_defineProperty","concat","replace","alt","generateAccessibleProps","React","createElement","_extends","cx","height","width","viewBox","fillRule","clipRule","d","displayName","isGlyph","propTypes","PropTypes","string","oneOfType","number"],"mappings":"yvCAOO,ICHHA,EAAiBC,EDGVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICNV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAWpFC,EAAM,SAAaC,GACrB,IAAIC,EACAC,EAAYF,EAAKE,UACnBC,EAAYH,EAAKI,KACjBA,OAAqB,IAAdD,EAAuB,GAAKA,EACnCE,EAAQL,EAAKK,MACbC,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBQ,EAAOR,EAAKQ,KACZC,EAAYT,EAAKU,KACjBA,OAAqB,IAAdD,EAAuB,MAAQA,EACtCE,EAAQC,EAAyBZ,EAAMF,GACrCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,oBAAqB,eAAgBP,GACnHQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,wCACnFE,EDjBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAmBwBC,EAlBxBd,EAAYN,EAAK,cACnBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MACf,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAKnBgB,EAAZF,EAAQ,CAAA,EAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAJ9J,CACL,cAWoBC,EAXQF,EAY7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,IAGb,CCFwBC,CAAwBf,EAAM,OAEjDW,EAFyDpB,EAAwB,CAClFI,MAAOA,GACiC,aAAcC,GAAYe,EAAgBpB,EAAuB,kBAAmBM,GAAiBN,IAC/I,OAAoByB,EAAMC,cAAc,MAAOC,EAAS,CACtD1B,UAAW2B,EAAGR,EAAgB,GAAIR,EAAmB,MAARL,GAAeQ,EAAcd,GAC1E4B,OAAwB,iBAAT1B,EAAoBA,EAAOX,EAAQW,GAClD2B,MAAuB,iBAAT3B,EAAoBA,EAAOX,EAAQW,GACjDM,KAAMA,GACLO,EAAiBN,EAAO,CACzBqB,QAAS,cACMN,EAAMC,cAAc,OAAQ,CAC3CM,SAAU,UACVC,SAAU,UACVC,EAAG,qsBACH3B,KAAM,iBAEV,EACAT,EAAIqC,YAAc,MAClBrC,EAAIsC,SAAU,EACdtC,EAAIuC,UAAY,CACd9B,KAAM+B,EAAUC,OAChBpC,KAAMmC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDtC,UAAWqC,EAAUC"}