@leafygreen-ui/icon 11.12.0 → 11.12.1

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,12 @@
1
1
  # @leafygreen-ui/icon
2
2
 
3
+ ## 11.12.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4b4c2d27d: Added Biometric icon
8
+ - 1a335d0b2: Explicitly include `data-testid` in allowed props for Glyph components
9
+
3
10
  ## 11.12.0
4
11
 
5
12
  ### 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'`, `'Apps'`, `'Array'`, `'ArrowDown'`, `'ArrowLeft'`, `'ArrowRight'`, `'ArrowUp'`, `'Beaker'`, `'Bell'`, `'Building'`, `'Calendar'`, `'Copy'`, `'CaretUp'`, `'CaretDown'`, `'CaretRight'`, `'CaretLeft'`, `'Checkmark'`, `'CheckmarkWithCircle'`, `'ChevronUp'`, `'ChevronDown'`, `'ChevronRight'`, `'ChevronLeft'`, `'ClockWithArrow'`, `'Charts'`, `'Clone'`, `'Cloud'`, `'Code'`,`'CreditCard'`, `'CurlyBraces'`, `'Database'`, `'Diagram'`, `'Download'`, `'Edit'`, `'Ellipsis'`, `'Export'`, `'Favorite'`, `'Filter'`, `'File'`, `'Folder'`, `'FullScreenEnter'`, `'FullScreenExit'`, `'GlobeAmericas'`, `'GovernmentBuilding'`, `'Home'`, `'ImportantWithCircle'`, `'InfoWithCircle'`, `'InviteUser'`, `'Key'`, `'Laptop'`, `'Lock'`, `'MagnifyingGlass'`, `'Megaphone'`, `'Menu'`, `'Minus'`, `'NotAllowed'`, `'Note'`, `'Open New Tab'`, `'Pause'`, `'Person'`, `'PersonGroup'`, `'PersonWithLock'`, `'Play'`, `'Plus'`, `'PlusWithCircle'`, `'QuestionMarkWithCircle'`, `'Redo'`, `'Refresh'`, `'ReplicaSet'`, `'Save'`, `'Serverless'`, `'Settings'`, `'ShardedCluster'`, `'Shell'`,`'SortAscending'`, `'SortDescending'`, `'Stitch'`, `'Support'`, `'Table'`, `'TimeSeries'`, `'Trash'`, `'Undo'`, `'University'`, `'Unlock'`, `'Unsorted'`, `'UpDownCarets'`, `'Upload'`, `'VerticalEllipsis'`, `'Visibility'`, `'VisibilityOff'`, `'Warning'`, `'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'`, `'Apps'`, `'Array'`, `'ArrowDown'`, `'ArrowLeft'`, `'ArrowRight'`, `'ArrowUp'`, `'Beaker'`, `'Bell'`, `'Biometric'`, `'Building'`, `'Calendar'`, `'Copy'`, `'CaretUp'`, `'CaretDown'`, `'CaretRight'`, `'CaretLeft'`, `'Checkmark'`, `'CheckmarkWithCircle'`, `'ChevronUp'`, `'ChevronDown'`, `'ChevronRight'`, `'ChevronLeft'`, `'ClockWithArrow'`, `'Charts'`, `'Clone'`, `'Cloud'`, `'Code'`,`'CreditCard'`, `'CurlyBraces'`, `'Database'`, `'Diagram'`, `'Download'`, `'Edit'`, `'Ellipsis'`, `'Export'`, `'Favorite'`, `'Filter'`, `'File'`, `'Folder'`, `'FullScreenEnter'`, `'FullScreenExit'`, `'GlobeAmericas'`, `'GovernmentBuilding'`, `'Home'`, `'ImportantWithCircle'`, `'InfoWithCircle'`, `'InviteUser'`, `'Key'`, `'Laptop'`, `'Lock'`, `'MagnifyingGlass'`, `'Megaphone'`, `'Menu'`, `'Minus'`, `'NotAllowed'`, `'Note'`, `'Open New Tab'`, `'Pause'`, `'Person'`, `'PersonGroup'`, `'PersonWithLock'`, `'Play'`, `'Plus'`, `'PlusWithCircle'`, `'QuestionMarkWithCircle'`, `'Redo'`, `'Refresh'`, `'ReplicaSet'`, `'Save'`, `'Serverless'`, `'Settings'`, `'ShardedCluster'`, `'Shell'`,`'SortAscending'`, `'SortDescending'`, `'Stitch'`, `'Support'`, `'Table'`, `'TimeSeries'`, `'Trash'`, `'Undo'`, `'University'`, `'Unlock'`, `'Unsorted'`, `'UpDownCarets'`, `'Upload'`, `'VerticalEllipsis'`, `'Visibility'`, `'VisibilityOff'`, `'Warning'`, `'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
 
@@ -142,3 +142,13 @@ A `LGGlyph.Component`
142
142
  | ------- | ---------------- | ----------------------- | ------- |
143
143
  | `name` | `string` | The name of the icon | |
144
144
  | `Glyph` | `SVGR.Component` | The React SVG component | |
145
+
146
+ ## Reference
147
+
148
+ ### Creating a new icon component
149
+
150
+ (For DS engineers)
151
+
152
+ - After uploading a new SVG file to `src/glyphs`, replace all `fill` property values with `#000`.
153
+ - Update `src/glyphs/index.ts` to import/export the SVG file.
154
+ - Build the package with `yarn build:packages icon` to create the component in `src/generated`.
@@ -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).Biometric=e.Biometric||{},e.Biometric.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 a(e){if(e&&e.__esModule)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 i=a(e),n=l(r);function o(e,r,t){return 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||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 c(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 f(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,l=e.className,a=e.size,n=void 0===a?16:a,y=e.title,C=e["aria-label"],m=e["aria-labelledby"],g=e.fill,O=e.role,v=void 0===O?"img":O,j=c(e,d),h=t.css(s||(s=f(["\n color: ",";\n "])),g),V=t.css(b||(b=f(["\n flex-shrink: 0;\n "]))),w=function(e,r,t){var l,a,i=t["aria-label"],n=t["aria-labelledby"],u=t.title;switch(e){case"img":return i||n||u?(o(l={},"aria-labelledby",n),o(l,"aria-label",i),o(l,"title",u),l):{"aria-label":(a=r,"".concat(a.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(v,"Biometric",(o(r={title:y},"aria-label",C),o(r,"aria-labelledby",m),r));return i.createElement("svg",u({className:t.cx(o({},h,null!=g),V,l),height:"number"==typeof n?n:p[n],width:"number"==typeof n?n:p[n],role:v},w,j,{viewBox:"0 0 16 16"}),i.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 1C4.46243 1 2 3.46243 2 6.5V9.5C2 12.5376 4.46243 15 7.5 15H8.5C11.5376 15 14 12.5376 14 9.5V6.5C14 3.46243 11.5376 1 8.5 1H7.5ZM8.57432 7.75001C8.57432 7.43282 8.31719 7.17569 8 7.17569C7.68281 7.17569 7.42567 7.43282 7.42567 7.75001V10.2069C7.42567 10.5241 7.68281 10.7812 8 10.7812C8.31719 10.7812 8.57432 10.5241 8.57432 10.2069V7.75001ZM8.00001 5.33783C6.66781 5.33783 5.58785 6.41779 5.58785 7.74999V10.3164C5.58785 10.5802 5.48308 10.8331 5.2966 11.0196C5.07232 11.2438 5.07232 11.6075 5.2966 11.8318C5.52089 12.0561 5.88453 12.0561 6.10882 11.8318C6.51071 11.4299 6.7365 10.8848 6.7365 10.3164V7.74999C6.7365 7.05217 7.30219 6.48648 8.00001 6.48648C8.69783 6.48648 9.26352 7.05217 9.26352 7.74999V10.3983C9.26352 10.8104 9.03068 11.1871 8.66208 11.3714C8.37838 11.5133 8.26338 11.8583 8.40524 12.142C8.54709 12.4257 8.89207 12.5407 9.17577 12.3988C9.93352 12.0199 10.4122 11.2455 10.4122 10.3983V7.74999C10.4122 6.41779 9.33221 5.33783 8.00001 5.33783ZM4.89865 7.75C4.89865 6.03717 6.28717 4.64865 8 4.64865C8.6033 4.64865 9.16475 4.82034 9.64017 5.11727C9.9092 5.28529 10.2635 5.20341 10.4315 4.93438C10.5996 4.66535 10.5177 4.31104 10.2486 4.14302C9.59605 3.73544 8.82464 3.5 8 3.5C5.65279 3.5 3.75 5.40279 3.75 7.75V10.0473C3.75 10.3645 4.00713 10.6216 4.32432 10.6216C4.64151 10.6216 4.89865 10.3645 4.89865 10.0473V7.75ZM11.7861 5.81757C11.6417 5.53515 11.2957 5.42326 11.0133 5.56765C10.7309 5.71205 10.619 6.05805 10.7634 6.34047C10.9793 6.76274 11.1014 7.24128 11.1014 7.75V9.12838C11.1014 9.44557 11.3585 9.7027 11.6757 9.7027C11.9929 9.7027 12.25 9.44557 12.25 9.12838V7.75C12.25 7.0553 12.0829 6.39796 11.7861 5.81757Z",fill:"currentColor"}))};return y.displayName="Biometric",y.isGlyph=!0,y.propTypes={fill:n.default.string,size:n.default.oneOfType([n.default.number,n.default.string]),className:n.default.string},y}));
2
+ //# sourceMappingURL=Biometric.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Biometric.js","sources":["../src/glyphCommon.ts","../src/generated/Biometric.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 b222acbf47aa3d822ae6d4b8d3dc1dac\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 BiometricProps extends LGGlyph.ComponentProps {}\n\nconst Biometric = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: BiometricProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Biometric', {\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n });\n return (\n <svg\n className={cx(\n {\n [fillStyle]: fill != null,\n },\n noFlexShrink,\n className,\n )}\n height={typeof size === 'number' ? size : sizeMap[size]}\n width={typeof size === 'number' ? size : sizeMap[size]}\n role={role}\n {...accessibleProps}\n {...props}\n viewBox=\"0 0 16 16\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M7.5 1C4.46243 1 2 3.46243 2 6.5V9.5C2 12.5376 4.46243 15 7.5 15H8.5C11.5376 15 14 12.5376 14 9.5V6.5C14 3.46243 11.5376 1 8.5 1H7.5ZM8.57432 7.75001C8.57432 7.43282 8.31719 7.17569 8 7.17569C7.68281 7.17569 7.42567 7.43282 7.42567 7.75001V10.2069C7.42567 10.5241 7.68281 10.7812 8 10.7812C8.31719 10.7812 8.57432 10.5241 8.57432 10.2069V7.75001ZM8.00001 5.33783C6.66781 5.33783 5.58785 6.41779 5.58785 7.74999V10.3164C5.58785 10.5802 5.48308 10.8331 5.2966 11.0196C5.07232 11.2438 5.07232 11.6075 5.2966 11.8318C5.52089 12.0561 5.88453 12.0561 6.10882 11.8318C6.51071 11.4299 6.7365 10.8848 6.7365 10.3164V7.74999C6.7365 7.05217 7.30219 6.48648 8.00001 6.48648C8.69783 6.48648 9.26352 7.05217 9.26352 7.74999V10.3983C9.26352 10.8104 9.03068 11.1871 8.66208 11.3714C8.37838 11.5133 8.26338 11.8583 8.40524 12.142C8.54709 12.4257 8.89207 12.5407 9.17577 12.3988C9.93352 12.0199 10.4122 11.2455 10.4122 10.3983V7.74999C10.4122 6.41779 9.33221 5.33783 8.00001 5.33783ZM4.89865 7.75C4.89865 6.03717 6.28717 4.64865 8 4.64865C8.6033 4.64865 9.16475 4.82034 9.64017 5.11727C9.9092 5.28529 10.2635 5.20341 10.4315 4.93438C10.5996 4.66535 10.5177 4.31104 10.2486 4.14302C9.59605 3.73544 8.82464 3.5 8 3.5C5.65279 3.5 3.75 5.40279 3.75 7.75V10.0473C3.75 10.3645 4.00713 10.6216 4.32432 10.6216C4.64151 10.6216 4.89865 10.3645 4.89865 10.0473V7.75ZM11.7861 5.81757C11.6417 5.53515 11.2957 5.42326 11.0133 5.56765C10.7309 5.71205 10.619 6.05805 10.7634 6.34047C10.9793 6.76274 11.1014 7.24128 11.1014 7.75V9.12838C11.1014 9.44557 11.3585 9.7027 11.6757 9.7027C11.9929 9.7027 12.25 9.44557 12.25 9.12838V7.75C12.25 7.0553 12.0829 6.39796 11.7861 5.81757Z\"\n fill={'currentColor'}\n />\n </svg>\n );\n};\n\nBiometric.displayName = 'Biometric';\nBiometric.isGlyph = true;\nBiometric.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string,\n};\nexport default Biometric;\n"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Biometric","_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":"8lDAOO,ICFHA,EAAiBC,EDEVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICJV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAapFC,EAAY,SAAmBC,GACjC,IAAIC,EAEAC,EAAYF,EAAKE,UACjBC,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,GAEvCe,EAAYC,EAAAA,IAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,gBAAiB,WAAYP,GAC3GQ,EAAeF,EAAGA,IAACtB,IAAqBA,EAAmBuB,EAAuB,CAAC,gCACnFE,EDvBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAuBwBC,EArBxBd,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MAEjB,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAMnBgB,EAAZF,EAAQ,GAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAL9J,CACL,cAaoBC,EAbQF,EAc7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,KCGWC,CAAwBf,EAAM,aAEjDW,EAF+DpB,EAAwB,CACxFI,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,6mDACH3B,KAAM,0BAIVT,EAAUqC,YAAc,YACxBrC,EAAUsC,SAAU,EACpBtC,EAAUuC,UAAY,CACpB9B,KAAM+B,EAAS,QAACC,OAChBpC,KAAMmC,EAAS,QAACE,UAAU,CAACF,EAAS,QAACG,OAAQH,EAAAA,QAAUC,SACvDtC,UAAWqC,EAAS,QAACC"}
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import r from"prop-types";import{css as l,cx as a}from"@leafygreen-ui/emotion";function t(e,r,l){return r in e?Object.defineProperty(e,r,{value:l,enumerable:!0,configurable:!0,writable:!0}):e[r]=l,e}function i(){return i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var l=arguments[r];for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(e[a]=l[a])}return e},i.apply(this,arguments)}function n(e,r){if(null==e)return{};var l,a,t=function(e,r){if(null==e)return{};var l,a,t={},i=Object.keys(e);for(a=0;a<i.length;a++)l=i[a],r.indexOf(l)>=0||(t[l]=e[l]);return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)l=i[a],r.indexOf(l)>=0||Object.prototype.propertyIsEnumerable.call(e,l)&&(t[l]=e[l])}return t}function o(e,r){return r||(r=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(r)}}))}var c,f,s={small:14,default:16,large:20,xlarge:24};var u=["className","size","title","aria-label","aria-labelledby","fill","role"],b=function(r){var b,C=r.className,p=r.size,m=void 0===p?16:p,y=r.title,d=r["aria-label"],g=r["aria-labelledby"],v=r.fill,O=r.role,h=void 0===O?"img":O,V=n(r,u),j=l(c||(c=o(["\n color: ",";\n "])),v),w=l(f||(f=o(["\n flex-shrink: 0;\n "]))),x=function(e,r,l){var a,i,n=l["aria-label"],o=l["aria-labelledby"],c=l.title;switch(e){case"img":return n||o||c?(t(a={},"aria-labelledby",o),t(a,"aria-label",n),t(a,"title",c),a):{"aria-label":(i=r,"".concat(i.replace(/([a-z])([A-Z])/g,"$1 $2")," Icon"))};case"presentation":return{"aria-hidden":!0,alt:""}}}(h,"Biometric",(t(b={title:y},"aria-label",d),t(b,"aria-labelledby",g),b));return e.createElement("svg",i({className:a(t({},j,null!=v),w,C),height:"number"==typeof m?m:s[m],width:"number"==typeof m?m:s[m],role:h},x,V,{viewBox:"0 0 16 16"}),e.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5 1C4.46243 1 2 3.46243 2 6.5V9.5C2 12.5376 4.46243 15 7.5 15H8.5C11.5376 15 14 12.5376 14 9.5V6.5C14 3.46243 11.5376 1 8.5 1H7.5ZM8.57432 7.75001C8.57432 7.43282 8.31719 7.17569 8 7.17569C7.68281 7.17569 7.42567 7.43282 7.42567 7.75001V10.2069C7.42567 10.5241 7.68281 10.7812 8 10.7812C8.31719 10.7812 8.57432 10.5241 8.57432 10.2069V7.75001ZM8.00001 5.33783C6.66781 5.33783 5.58785 6.41779 5.58785 7.74999V10.3164C5.58785 10.5802 5.48308 10.8331 5.2966 11.0196C5.07232 11.2438 5.07232 11.6075 5.2966 11.8318C5.52089 12.0561 5.88453 12.0561 6.10882 11.8318C6.51071 11.4299 6.7365 10.8848 6.7365 10.3164V7.74999C6.7365 7.05217 7.30219 6.48648 8.00001 6.48648C8.69783 6.48648 9.26352 7.05217 9.26352 7.74999V10.3983C9.26352 10.8104 9.03068 11.1871 8.66208 11.3714C8.37838 11.5133 8.26338 11.8583 8.40524 12.142C8.54709 12.4257 8.89207 12.5407 9.17577 12.3988C9.93352 12.0199 10.4122 11.2455 10.4122 10.3983V7.74999C10.4122 6.41779 9.33221 5.33783 8.00001 5.33783ZM4.89865 7.75C4.89865 6.03717 6.28717 4.64865 8 4.64865C8.6033 4.64865 9.16475 4.82034 9.64017 5.11727C9.9092 5.28529 10.2635 5.20341 10.4315 4.93438C10.5996 4.66535 10.5177 4.31104 10.2486 4.14302C9.59605 3.73544 8.82464 3.5 8 3.5C5.65279 3.5 3.75 5.40279 3.75 7.75V10.0473C3.75 10.3645 4.00713 10.6216 4.32432 10.6216C4.64151 10.6216 4.89865 10.3645 4.89865 10.0473V7.75ZM11.7861 5.81757C11.6417 5.53515 11.2957 5.42326 11.0133 5.56765C10.7309 5.71205 10.619 6.05805 10.7634 6.34047C10.9793 6.76274 11.1014 7.24128 11.1014 7.75V9.12838C11.1014 9.44557 11.3585 9.7027 11.6757 9.7027C11.9929 9.7027 12.25 9.44557 12.25 9.12838V7.75C12.25 7.0553 12.0829 6.39796 11.7861 5.81757Z",fill:"currentColor"}))};b.displayName="Biometric",b.isGlyph=!0,b.propTypes={fill:r.string,size:r.oneOfType([r.number,r.string]),className:r.string};export{b as default};
2
+ //# sourceMappingURL=Biometric.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Biometric.js","sources":["../../src/glyphCommon.ts","../../src/generated/Biometric.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 b222acbf47aa3d822ae6d4b8d3dc1dac\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 BiometricProps extends LGGlyph.ComponentProps {}\n\nconst Biometric = ({\n className,\n size = 16,\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n fill,\n role = 'img',\n ...props\n}: BiometricProps) => {\n const fillStyle = css`\n color: ${fill};\n `;\n const noFlexShrink = css`\n flex-shrink: 0;\n `;\n const accessibleProps = generateAccessibleProps(role, 'Biometric', {\n title,\n ['aria-label']: ariaLabel,\n ['aria-labelledby']: ariaLabelledby,\n });\n return (\n <svg\n className={cx(\n {\n [fillStyle]: fill != null,\n },\n noFlexShrink,\n className,\n )}\n height={typeof size === 'number' ? size : sizeMap[size]}\n width={typeof size === 'number' ? size : sizeMap[size]}\n role={role}\n {...accessibleProps}\n {...props}\n viewBox=\"0 0 16 16\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M7.5 1C4.46243 1 2 3.46243 2 6.5V9.5C2 12.5376 4.46243 15 7.5 15H8.5C11.5376 15 14 12.5376 14 9.5V6.5C14 3.46243 11.5376 1 8.5 1H7.5ZM8.57432 7.75001C8.57432 7.43282 8.31719 7.17569 8 7.17569C7.68281 7.17569 7.42567 7.43282 7.42567 7.75001V10.2069C7.42567 10.5241 7.68281 10.7812 8 10.7812C8.31719 10.7812 8.57432 10.5241 8.57432 10.2069V7.75001ZM8.00001 5.33783C6.66781 5.33783 5.58785 6.41779 5.58785 7.74999V10.3164C5.58785 10.5802 5.48308 10.8331 5.2966 11.0196C5.07232 11.2438 5.07232 11.6075 5.2966 11.8318C5.52089 12.0561 5.88453 12.0561 6.10882 11.8318C6.51071 11.4299 6.7365 10.8848 6.7365 10.3164V7.74999C6.7365 7.05217 7.30219 6.48648 8.00001 6.48648C8.69783 6.48648 9.26352 7.05217 9.26352 7.74999V10.3983C9.26352 10.8104 9.03068 11.1871 8.66208 11.3714C8.37838 11.5133 8.26338 11.8583 8.40524 12.142C8.54709 12.4257 8.89207 12.5407 9.17577 12.3988C9.93352 12.0199 10.4122 11.2455 10.4122 10.3983V7.74999C10.4122 6.41779 9.33221 5.33783 8.00001 5.33783ZM4.89865 7.75C4.89865 6.03717 6.28717 4.64865 8 4.64865C8.6033 4.64865 9.16475 4.82034 9.64017 5.11727C9.9092 5.28529 10.2635 5.20341 10.4315 4.93438C10.5996 4.66535 10.5177 4.31104 10.2486 4.14302C9.59605 3.73544 8.82464 3.5 8 3.5C5.65279 3.5 3.75 5.40279 3.75 7.75V10.0473C3.75 10.3645 4.00713 10.6216 4.32432 10.6216C4.64151 10.6216 4.89865 10.3645 4.89865 10.0473V7.75ZM11.7861 5.81757C11.6417 5.53515 11.2957 5.42326 11.0133 5.56765C10.7309 5.71205 10.619 6.05805 10.7634 6.34047C10.9793 6.76274 11.1014 7.24128 11.1014 7.75V9.12838C11.1014 9.44557 11.3585 9.7027 11.6757 9.7027C11.9929 9.7027 12.25 9.44557 12.25 9.12838V7.75C12.25 7.0553 12.0829 6.39796 11.7861 5.81757Z\"\n fill={'currentColor'}\n />\n </svg>\n );\n};\n\nBiometric.displayName = 'Biometric';\nBiometric.isGlyph = true;\nBiometric.propTypes = {\n fill: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n className: PropTypes.string,\n};\nexport default Biometric;\n"],"names":["_templateObject","_templateObject2","sizeMap","small","default","large","xlarge","_excluded","Biometric","_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":"q5BAOO,ICFHA,EAAiBC,EDEVC,EAAU,CACnBC,MAAO,GACPC,QAAS,GACTC,MAAO,GACPC,OAAQ,ICJV,IAAIC,EAAY,CAAC,YAAa,OAAQ,QAAS,aAAc,kBAAmB,OAAQ,QAapFC,EAAY,SAAmBC,GACjC,IAAIC,EAEAC,EAAYF,EAAKE,UACjBC,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,GAEvCe,EAAYC,EAAIvB,IAAoBA,EAAkBwB,EAAuB,CAAC,gBAAiB,WAAYP,GAC3GQ,EAAeF,EAAItB,IAAqBA,EAAmBuB,EAAuB,CAAC,gCACnFE,EDvBC,SAAiCP,EAAMQ,EAAWlB,GACvD,IAAImB,EAuBwBC,EArBxBd,EAAYN,EAAK,cACjBO,EAAiBP,EAAK,mBACtBK,EAAQL,EAAKK,MAEjB,OAAQK,GACN,IAAK,MACH,OAAKJ,GAAcC,GAAmBF,GAMnBgB,EAAZF,EAAQ,GAA2B,kBAAmBZ,GAAiBc,EAAgBF,EAAO,aAAcb,GAAYe,EAAgBF,EAAO,QAASd,GAAQc,GAL9J,CACL,cAaoBC,EAbQF,EAc7B,GAAGI,OAAOF,EAAKG,QAAQ,kBAAmB,SAAU,WARzD,IAAK,eACH,MAAO,CACL,eAAe,EACfC,IAAK,KCGWC,CAAwBf,EAAM,aAEjDW,EAF+DpB,EAAwB,CACxFI,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,6mDACH3B,KAAM,mBAIVT,EAAUqC,YAAc,YACxBrC,EAAUsC,SAAU,EACpBtC,EAAUuC,UAAY,CACpB9B,KAAM+B,EAAUC,OAChBpC,KAAMmC,EAAUE,UAAU,CAACF,EAAUG,OAAQH,EAAUC,SACvDtC,UAAWqC,EAAUC"}