@newtonschool/grauity 0.0.2 → 0.0.3

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.
@@ -1,5 +1,5 @@
1
1
  export declare const ICON_TAGS: {
2
- 'school-left': string[];
2
+ "school-left": string[];
3
3
  school: string[];
4
4
  code: string[];
5
5
  today: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"iconTags.d.ts","sourceRoot":"","sources":["../../../ui/core/icons/iconTags.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;CAMrB,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC"}
1
+ {"version":3,"file":"iconTags.d.ts","sourceRoot":"","sources":["../../../ui/core/icons/iconTags.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;CAkBrB,CAAC;AACF,eAAO,MAAM,SAAS;;;;;;;CAoBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"iconTypes.d.ts","sourceRoot":"","sources":["../../../ui/core/icons/iconTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACrB,aAAa,GACb,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,CAAC;AAEf,MAAM,MAAM,cAAc,GACpB,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,CAAC;AAEf,oBAAY,aAAa;IACrB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CACpB"}
1
+ {"version":3,"file":"iconTypes.d.ts","sourceRoot":"","sources":["../../../ui/core/icons/iconTypes.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,CAAC;AAEb,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,CAAC;AAEb,oBAAY,aAAa;IACvB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,MAAM,WAAW;CAClB"}
Binary file
Binary file
Binary file
Binary file
Binary file
package/dist/main.cjs.map CHANGED
@@ -1 +1 @@
1
- {"mappings":"0BAEYA,EAAAC,E,gaAAAA,EAAAD,MAAY,KACpB,SACAC,EAAA,UACAA,EAAA,YACAA,EAAA,aACAA,EAAA,YACAA,EAAA,iBACAA,EAAA,kBACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,WACAA,EAAA,gBACAA,EAAA,iBAGG,ICfKC,EAAAC,EDeCC,EAAqB,CAC9BJ,EAAaK,KACbL,EAAaM,MACbN,EAAaO,OACbP,EAAaQ,QACbR,EAAaS,OACbT,EAAaU,YACbV,EAAaW,aACbX,EAAaY,WACbZ,EAAaa,WACbb,EAAac,QCzBLX,EAAAD,MAAa,KACrB,cACAC,EAAA,cACAA,EAAA,YACAA,EAAA,YACAA,EAAA,UACAA,EAAA,cACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,gBAGG,ICAKY,EAAAC,EDACC,EAAsB,CAC/Bf,EAAcgB,MACdhB,EAAciB,MACdjB,EAAckB,KACdlB,EAAcmB,KACdnB,EAAcoB,IACdpB,EAAcqB,MACdrB,EAAcsB,OACdtB,EAAcuB,OACdvB,EAAcwB,SCTNV,EAAAD,MAAa,KACrB,yBACAC,EAAA,gBACAA,EAAA,YACAA,EAAA,cACAA,EAAA,gBCnBG,ICKKW,EAAAC,EAKAC,EAAAC,EDVCC,EAAY,CACrB,cAAe,CAAC,aAChBC,OAAQ,CAAC,aACTC,KAAM,CAAC,QACPC,MAAO,CAAC,UAAW,SAAU,YAC7BC,OAAQ,CAAC,mBAEAC,EAAY,CACrBC,UAAW,CAAC,cAAe,UAC3BJ,KAAM,CAAC,QACPK,QAAS,CAAC,SACVC,OAAQ,CAAC,SACTC,SAAU,CAAC,SACXC,eAAgB,CA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,KACpBxB,SAAUpC,EAAAyB,GAAUmC,KACpBvB,MAAOrC,EAAAyB,GAAUoC,MAAM/F,GACvBwD,UAAWtB,EAAAyB,GAAUE,OACrBW,SAAUtC,EAAAyB,GAAUmC,KACpBrB,OAAQvC,EAAAyB,GAAUmC,KAClBpB,QAASxC,EAAAyB,GAAUoC,MAAMnE,GACzB+C,SAAUzC,EAAAyB,GAAUmC,KACpBlB,KAAM1C,EAAAyB,GAAUmC,KAChBjB,QAAS3C,EAAAyB,GAAUmC,KACnBhB,KAAM5C,EAAAyB,GAAUoC,MAAMC,OAAOC,KAAKnF,IAAYoF,WAC9CnB,QAAS7C,EAAAyB,GAAUoC,MAAMtE,GACzBuD,KAAM9C,EAAAyB,GAAUoC,MAAM5G,GACtBsE,MAAOvB,EAAAyB,GAAUwC,QAGrBjC,EAAKF,aAAe,CAChBG,WAAY,OACZC,eAAWgC,EACXnE,GAAI,IACJoC,UAAU,EACVC,UAAU,EACVC,MAAO,OACPf,eAAW4C,EACX5B,UAAU,EACVC,QAAQ,EACRC,aAAS0B,EACTzB,UAAU,EACVC,MAAM,EACNC,SAAS,EACTE,aAASqB,EACTpB,KAAM,KACNvB,WAAO2C,G,IAGXC,EAAenC","sources":["ui/core/sizes/index.ts","ui/core/colors/index.ts","ui/core/icons/iconTypes.ts","ui/core/icons/iconTags.ts","ui/core/miscellaneous-choices/index.ts","ui/helpers/getElementTypeFromProps.ts","ui/helpers/classNameBuilders.ts","ui/init/GrauityInit.tsx","ui/elements/Icon/Icon.tsx"],"sourcesContent":["export type { grauitySizeName, grauityIconSizeName } from './sizeTypes';\n\nexport enum GRAUITY_SIZE {\n FOUR = '4',\n EIGHT = '8',\n TWELVE = '12',\n SIXTEEN = '16',\n TWENTY = '20',\n TWENTY_FOUR = '24',\n TWENTY_EIGHT = '28',\n THIRTY_TWO = '32',\n THIRTY_SIX = '36',\n FORTY = '40',\n FORTY_FOUR = '44',\n FORTY_EIGHT = '48',\n}\n\nexport const GRAUITY_ICON_SIZES = [\n GRAUITY_SIZE.FOUR,\n GRAUITY_SIZE.EIGHT,\n GRAUITY_SIZE.TWELVE,\n GRAUITY_SIZE.SIXTEEN,\n GRAUITY_SIZE.TWENTY,\n GRAUITY_SIZE.TWENTY_FOUR,\n GRAUITY_SIZE.TWENTY_EIGHT,\n GRAUITY_SIZE.THIRTY_TWO,\n GRAUITY_SIZE.THIRTY_SIX,\n GRAUITY_SIZE.FORTY,\n];\n","export type { grauityColorName, grauityIconColorName } from './colorTypes';\n\nexport enum GRAUITY_COLOR {\n WHITE = 'white',\n BLACK = 'black',\n GREY = 'grey',\n BLUE = 'blue',\n RED = 'red',\n GREEN = 'green',\n ORANGE = 'orange',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n}\n\nexport const GRAUITY_ICON_COLORS = [\n GRAUITY_COLOR.WHITE,\n GRAUITY_COLOR.BLACK,\n GRAUITY_COLOR.GREY,\n GRAUITY_COLOR.BLUE,\n GRAUITY_COLOR.RED,\n GRAUITY_COLOR.GREEN,\n GRAUITY_COLOR.ORANGE,\n GRAUITY_COLOR.YELLOW,\n GRAUITY_COLOR.PURPLE,\n];\n","export type grauityIconName =\n | 'school-left'\n | 'school'\n | 'code'\n | 'today'\n | 'person';\n\nexport type grauityIconKey =\n | 'SchoolLeft'\n | 'School'\n | 'Code'\n | 'Today'\n | 'Person';\n\nexport enum GRAUITY_ICONS {\n SchoolLeft = 'school-left',\n School = 'school',\n Code = 'code',\n Today = 'today',\n Person = 'person',\n}\n","export const ICON_TAGS = {\n 'school-left': ['buildings'],\n school: ['buildings'],\n code: ['code'],\n today: ['objects', 'states', 'calendar'],\n person: ['usersAndPeople'],\n};\nexport const TAG_ICONS = {\n buildings: ['school-left', 'school'],\n code: ['code'],\n objects: ['today'],\n states: ['today'],\n calendar: ['today'],\n usersAndPeople: ['person'],\n};\n","export type {\n grauityRotatedChoiceName,\n grauityFlippedChoiceName,\n} from './miscellaneousTypes';\n\nexport enum GRAUITY_ROTATED_CHOICES {\n CLOCKWISE = 'clockwise',\n COUNTERCLOCKWISE = 'counterclockwise',\n}\n\nexport enum GRAUITY_FLIPPED_CHOICES {\n HORIZONTALLY = 'horizontally',\n VERTICALLY = 'vertically',\n}\n\nexport const GRAUITY_ICON_ROTATED_CHOICES = [\n GRAUITY_ROTATED_CHOICES.CLOCKWISE,\n GRAUITY_ROTATED_CHOICES.COUNTERCLOCKWISE,\n];\n\nexport const GRAUITY_ICON_FLIPPED_CHOICES = [\n GRAUITY_FLIPPED_CHOICES.HORIZONTALLY,\n GRAUITY_FLIPPED_CHOICES.VERTICALLY,\n];\n","import * as React from 'react';\nimport styled from 'styled-components';\n\n/**\n * Returns a createElement() type based on the props of the Component.\n * Useful for calculating what type a component should render as.\n *\n * @param {object} props A ReactElement props object\n * @returns {string|function} A ReactElement type\n */\n\nfunction getElementTypeFromProps(props: {\n as: React.ElementType;\n href?: string;\n}) {\n // ----------------------------------------\n // user defined \"as\" element type\n\n if (props.as) return styled(props.as)``;\n\n // ----------------------------------------\n // infer anchor links\n\n if (props.href) return styled('a')``;\n\n // ----------------------------------------\n // use defaultProp or 'div'\n\n return styled('div')``;\n}\n\nexport default getElementTypeFromProps;\n","/*\n * There are 3 prop patterns used to build up the className for a component.\n * Each utility here is meant for use in a classnames() argument.\n *\n * There is no util for valueOnly() because it would simply return val.\n * Use the prop value inline instead.\n * <Label size='big' />\n * <div class=\"ui big label\"></div>\n */\n\n/**\n * Props where only the prop key is used in the className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label tag />\n * <div class=\"ui tag label\"></div>\n */\nexport const useKeyOnly = (val: any, key: string) => val && key;\n\n/**\n * Props that require both a key and value to create a className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label corner='left' />\n * <div class=\"ui left corner label\"></div>\n */\nexport const useValueAndKey = (val: any, key: string) =>\n val && val !== true && `${val}-${key}`;\n\n/**\n * Props whose key will be used in className, or value and key.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example Key Only\n * <Label pointing />\n * <div class=\"ui pointing label\"></div>\n *\n * @example Key and Value\n * <Label pointing='left' />\n * <div class=\"ui left pointing label\"></div>\n */\nexport const useKeyOrValueAndKey = (val: any, key: string) =>\n val && (val === true ? key : `${val}-${key}`);\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { getElementTypeFromProps } from '../helpers';\n\nexport interface GrauityInitProps {\n /**\n * An element type to render as (string or function).\n * */\n as: React.ElementType;\n\n /**\n * The font size to be applied on this element and so will act as standard for the `ems` of all grauity components.\n * */\n fontSize: string;\n\n /**\n * The multiplier is multiplied will all the `ems` of the grauity components.\n * */\n multiplier?: number;\n\n /**\n * The children to be rendered inside this component.\n * */\n children?: React.ReactNode;\n}\n\n/**\n * This component is used to initialize the Grauity library. Ideally, it should be the root component of your application.\n * But nonetheless all the grauity components should be the children of this component.\n * */\nfunction GrauityInit({ as, fontSize, multiplier, children }: GrauityInitProps) {\n const ElementType = getElementTypeFromProps({ as });\n\n return (\n <ElementType\n className=\"grauity-init\"\n style={{\n fontSize,\n '--multiplier': multiplier,\n }}\n >\n {children}\n </ElementType>\n );\n}\n\nGrauityInit.propTypes = {\n as: PropTypes.elementType,\n fontSize: PropTypes.string,\n multiplier: PropTypes.number,\n children: PropTypes.node,\n};\n\nGrauityInit.defaultProps = {\n as: 'div',\n fontSize: '16px',\n multiplier: 1,\n children: null,\n};\n\nexport default GrauityInit;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'lodash';\nimport classnames from 'classnames';\n\nimport {\n getElementTypeFromProps,\n useKeyOnly,\n useValueAndKey,\n} from '../../helpers';\nimport {\n GRAUITY_ICON_COLORS,\n GRAUITY_ICON_FLIPPED_CHOICES,\n GRAUITY_ICON_ROTATED_CHOICES,\n GRAUITY_ICON_SIZES,\n grauityFlippedChoiceName,\n grauityIconColorName,\n grauityIconName,\n grauityIconSizeName,\n grauityRotatedChoiceName,\n ICON_TAGS,\n} from '../../core';\n\nexport interface IconProps {\n /**\n * Icon can have the aria hidden attribute\n * */\n ariaHidden?: string;\n\n /**\n * Icon can have the aria label attribute\n * */\n ariaLabel?: string;\n\n /**\n * An element type to render as (string or function).\n * */\n as?: React.ElementType;\n\n /**\n * Format the icon to appear bordered\n * */\n bordered?: boolean;\n\n /**\n * Format the icon to appear circular\n * */\n circular?: boolean;\n\n /**\n * Color of the icon\n * */\n color?: grauityIconColorName;\n\n /**\n * Additional classes to be added to the component\n * */\n className?: string;\n\n /**\n * Show that the icon is inactive\n * */\n disabled?: boolean;\n\n /**\n * Fitted, without space to left or right of Icon\n * */\n fitted?: boolean;\n\n /**\n * Icon can be flipped\n * */\n flipped?: grauityFlippedChoiceName;\n\n /**\n * The colors of the icon can be inverted in case of used with border\n * * */\n inverted?: boolean;\n\n /**\n * Icon can be formatted as a link\n * */\n link?: boolean;\n\n /**\n * Icon can be used as a simple loader\n * */\n loading?: boolean;\n\n /**\n * Name of the icon\n * */\n name: grauityIconName;\n\n /**\n * Icon can be rotated\n * */\n rotated?: grauityRotatedChoiceName;\n\n /**\n * Size of the icon\n * */\n size?: grauityIconSizeName;\n\n /**\n * Additional styles to be used over the element\n * */\n style?: React.CSSProperties;\n}\n\nfunction Icon({\n ariaHidden,\n ariaLabel,\n as,\n bordered,\n circular,\n color,\n className,\n disabled,\n fitted,\n flipped,\n inverted,\n link,\n loading,\n name,\n rotated,\n size,\n style,\n ...props\n}: IconProps) {\n const Element = getElementTypeFromProps({ as });\n\n const getIconAriaOptions = () => {\n const ariaOptions: {\n 'aria-hidden'?: string;\n 'aria-label'?: string;\n } = {};\n\n if (_.isNil(ariaLabel)) {\n ariaOptions['aria-hidden'] = 'true';\n } else {\n ariaOptions['aria-label'] = ariaLabel;\n }\n\n if (!_.isNil(ariaHidden)) {\n ariaOptions['aria-hidden'] = ariaHidden;\n }\n\n return ariaOptions;\n };\n\n const handleClick = (e?: any) => {\n if (disabled) {\n e.preventDefault();\n return;\n }\n\n _.invoke(props, 'onClick', e, props);\n };\n\n const ariaOptions = getIconAriaOptions();\n\n const classes = classnames(\n 'grauity-icon',\n `grauity-icon-${name}`,\n `size-${size}`,\n useKeyOnly(color, color),\n useKeyOnly(bordered, 'bordered'),\n useKeyOnly(circular, 'circular'),\n useKeyOnly(disabled, 'disabled'),\n useKeyOnly(fitted, 'fitted'),\n useKeyOnly(inverted, 'inverted'),\n useKeyOnly(link, 'link'),\n useKeyOnly(loading, 'loading'),\n useValueAndKey(flipped, 'flipped'),\n useValueAndKey(rotated, 'rotated'),\n className\n );\n\n return (\n <Element\n onClick={handleClick}\n {...ariaOptions}\n className={classes}\n style={style}\n />\n );\n}\n\nIcon.propTypes = {\n ariaHidden: PropTypes.string,\n ariaLabel: PropTypes.string,\n as: PropTypes.elementType,\n bordered: PropTypes.bool,\n circular: PropTypes.bool,\n color: PropTypes.oneOf(GRAUITY_ICON_COLORS),\n className: PropTypes.string,\n disabled: PropTypes.bool,\n fitted: PropTypes.bool,\n flipped: PropTypes.oneOf(GRAUITY_ICON_FLIPPED_CHOICES),\n inverted: PropTypes.bool,\n link: PropTypes.bool,\n loading: PropTypes.bool,\n name: PropTypes.oneOf(Object.keys(ICON_TAGS)).isRequired,\n rotated: PropTypes.oneOf(GRAUITY_ICON_ROTATED_CHOICES),\n size: PropTypes.oneOf(GRAUITY_ICON_SIZES),\n style: PropTypes.object,\n};\n\nIcon.defaultProps = {\n ariaHidden: 'true',\n ariaLabel: undefined,\n as: 'i',\n bordered: false,\n circular: false,\n color: 'grey',\n className: undefined,\n disabled: false,\n fitted: false,\n flipped: undefined,\n inverted: false,\n link: false,\n loading: false,\n rotated: undefined,\n size: '16',\n style: undefined,\n};\n\nexport default Icon;\n"],"names":["$8cbcc263f670cb67$export$b009745c0d723d05","GRAUITY_SIZE","$93e0a646b230ea7f$export$250fa2f0e0a0ae2d","GRAUITY_COLOR","$8cbcc263f670cb67$export$3bf4c96953c50403","FOUR","EIGHT","TWELVE","SIXTEEN","TWENTY","TWENTY_FOUR","TWENTY_EIGHT","THIRTY_TWO","THIRTY_SIX","FORTY","$9e9ba7b4821e665f$export$bfde210aee969e37","GRAUITY_ICONS","$93e0a646b230ea7f$export$74eaf9ce0283ca6a","WHITE","BLACK","GREY","BLUE","RED","GREEN","ORANGE","YELLOW","PURPLE","$5965ca0b925355b2$export$8de62274c8c83544","GRAUITY_ROTATED_CHOICES","$5965ca0b925355b2$export$7157be2c39530a1b","GRAUITY_FLIPPED_CHOICES","$419cae6f23ffbade$export$18002f458cc7dd66","school","code","today","person","$419cae6f23ffbade$export$8ccf049745ac9a1d","buildings","objects","states","calendar","usersAndPeople","$5965ca0b925355b2$export$24f63745209ad7f5","CLOCKWISE","COUNTERCLOCKWISE","$5965ca0b925355b2$export$20d6cf3ab228a3ac","HORIZONTALLY","VERTICALLY","$9e62f2137a185622$export$2e2bcd8739ae039","props","as","$parcel$interopDefault","$ilWpy$styledcomponents","$9e62f2137a185622$var$templateObject_1","$9e62f2137a185622$var$__makeTemplateObject","href","$9e62f2137a185622$var$templateObject_2","$9e62f2137a185622$var$templateObject_3","$16aa4154c4e32542$export$aac7d417530cc39a","val","key","$16aa4154c4e32542$export$fb1b8744f6450628","concat","$f8fd2b3fc3688835$var$GrauityInit","_a","fontSize","multiplier","children","ElementType","$9e62f2137a185622$exports","default","$ilWpy$react","createElement","className","style","propTypes","$ilWpy$proptypes","elementType","string","number","node","defaultProps","$f8fd2b3fc3688835$export$2e2bcd8739ae039","$aba16f0e588731eb$var$Icon","ariaHidden","ariaLabel","bordered","circular","color","disabled","fitted","flipped","inverted","link","loading","name","rotated","size","$aba16f0e588731eb$var$__rest","Element","ariaOptions","$ilWpy$lodash","isNil","getIconAriaOptions","classes","$ilWpy$classnames","$aba16f0e588731eb$var$__assign","onClick","e","preventDefault","invoke","bool","oneOf","Object","keys","isRequired","object","undefined","$aba16f0e588731eb$export$2e2bcd8739ae039"],"version":3,"file":"main.cjs.map","sourceRoot":"../"}
1
+ {"mappings":"0BAEYA,EAAAC,E,gaAAA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B,GAAUmC,KACpBlB,KAAM1C,EAAAyB,GAAUmC,KAChBjB,QAAS3C,EAAAyB,GAAUmC,KACnBhB,KAAM5C,EAAAyB,GAAUoC,MAAMC,OAAOC,KAAKnF,IAAYoF,WAC9CnB,QAAS7C,EAAAyB,GAAUoC,MAAMtE,GACzBuD,KAAM9C,EAAAyB,GAAUoC,MAAM5G,GACtBsE,MAAOvB,EAAAyB,GAAUwC,QAGrBjC,EAAKF,aAAe,CAChBG,WAAY,OACZC,eAAWgC,EACXnE,GAAI,IACJoC,UAAU,EACVC,UAAU,EACVC,MAAO,OACPf,eAAW4C,EACX5B,UAAU,EACVC,QAAQ,EACRC,aAAS0B,EACTzB,UAAU,EACVC,MAAM,EACNC,SAAS,EACTE,aAASqB,EACTpB,KAAM,KACNvB,WAAO2C,G,IAGXC,EAAenC","sources":["ui/core/sizes/index.ts","ui/core/colors/index.ts","ui/core/icons/iconTypes.ts","ui/core/icons/iconTags.ts","ui/core/miscellaneous-choices/index.ts","ui/helpers/getElementTypeFromProps.ts","ui/helpers/classNameBuilders.ts","ui/init/GrauityInit.tsx","ui/elements/Icon/Icon.tsx"],"sourcesContent":["export type { grauitySizeName, grauityIconSizeName } from './sizeTypes';\n\nexport enum GRAUITY_SIZE {\n FOUR = '4',\n EIGHT = '8',\n TWELVE = '12',\n SIXTEEN = '16',\n TWENTY = '20',\n TWENTY_FOUR = '24',\n TWENTY_EIGHT = '28',\n THIRTY_TWO = '32',\n THIRTY_SIX = '36',\n FORTY = '40',\n FORTY_FOUR = '44',\n FORTY_EIGHT = '48',\n}\n\nexport const GRAUITY_ICON_SIZES = [\n GRAUITY_SIZE.FOUR,\n GRAUITY_SIZE.EIGHT,\n GRAUITY_SIZE.TWELVE,\n GRAUITY_SIZE.SIXTEEN,\n GRAUITY_SIZE.TWENTY,\n GRAUITY_SIZE.TWENTY_FOUR,\n GRAUITY_SIZE.TWENTY_EIGHT,\n GRAUITY_SIZE.THIRTY_TWO,\n GRAUITY_SIZE.THIRTY_SIX,\n GRAUITY_SIZE.FORTY,\n];\n","export type { grauityColorName, grauityIconColorName } from './colorTypes';\n\nexport enum GRAUITY_COLOR {\n WHITE = 'white',\n BLACK = 'black',\n GREY = 'grey',\n BLUE = 'blue',\n RED = 'red',\n GREEN = 'green',\n ORANGE = 'orange',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n}\n\nexport const GRAUITY_ICON_COLORS = [\n GRAUITY_COLOR.WHITE,\n GRAUITY_COLOR.BLACK,\n GRAUITY_COLOR.GREY,\n GRAUITY_COLOR.BLUE,\n GRAUITY_COLOR.RED,\n GRAUITY_COLOR.GREEN,\n GRAUITY_COLOR.ORANGE,\n GRAUITY_COLOR.YELLOW,\n GRAUITY_COLOR.PURPLE,\n];\n","export type grauityIconName =\n | 'school-left'\n | 'school'\n | 'code'\n | 'today'\n | 'person';\n\nexport type grauityIconKey =\n | 'SchoolLeft'\n | 'School'\n | 'Code'\n | 'Today'\n | 'Person';\n\nexport enum GRAUITY_ICONS {\n SchoolLeft = 'school-left',\n School = 'school',\n Code = 'code',\n Today = 'today',\n Person = 'person',\n}\n","export const ICON_TAGS = {\n \"school-left\": [\n \"buildings\"\n ],\n \"school\": [\n \"buildings\"\n ],\n \"code\": [\n \"code\"\n ],\n \"today\": [\n \"objects\",\n \"states\",\n \"calendar\"\n ],\n \"person\": [\n \"usersAndPeople\"\n ]\n};\nexport const TAG_ICONS = {\n \"buildings\": [\n \"school-left\",\n \"school\"\n ],\n \"code\": [\n \"code\"\n ],\n \"objects\": [\n \"today\"\n ],\n \"states\": [\n \"today\"\n ],\n \"calendar\": [\n \"today\"\n ],\n \"usersAndPeople\": [\n \"person\"\n ]\n};","export type {\n grauityRotatedChoiceName,\n grauityFlippedChoiceName,\n} from './miscellaneousTypes';\n\nexport enum GRAUITY_ROTATED_CHOICES {\n CLOCKWISE = 'clockwise',\n COUNTERCLOCKWISE = 'counterclockwise',\n}\n\nexport enum GRAUITY_FLIPPED_CHOICES {\n HORIZONTALLY = 'horizontally',\n VERTICALLY = 'vertically',\n}\n\nexport const GRAUITY_ICON_ROTATED_CHOICES = [\n GRAUITY_ROTATED_CHOICES.CLOCKWISE,\n GRAUITY_ROTATED_CHOICES.COUNTERCLOCKWISE,\n];\n\nexport const GRAUITY_ICON_FLIPPED_CHOICES = [\n GRAUITY_FLIPPED_CHOICES.HORIZONTALLY,\n GRAUITY_FLIPPED_CHOICES.VERTICALLY,\n];\n","import * as React from 'react';\nimport styled from 'styled-components';\n\n/**\n * Returns a createElement() type based on the props of the Component.\n * Useful for calculating what type a component should render as.\n *\n * @param {object} props A ReactElement props object\n * @returns {string|function} A ReactElement type\n */\n\nfunction getElementTypeFromProps(props: {\n as: React.ElementType;\n href?: string;\n}) {\n // ----------------------------------------\n // user defined \"as\" element type\n\n if (props.as) return styled(props.as)``;\n\n // ----------------------------------------\n // infer anchor links\n\n if (props.href) return styled('a')``;\n\n // ----------------------------------------\n // use defaultProp or 'div'\n\n return styled('div')``;\n}\n\nexport default getElementTypeFromProps;\n","/*\n * There are 3 prop patterns used to build up the className for a component.\n * Each utility here is meant for use in a classnames() argument.\n *\n * There is no util for valueOnly() because it would simply return val.\n * Use the prop value inline instead.\n * <Label size='big' />\n * <div class=\"ui big label\"></div>\n */\n\n/**\n * Props where only the prop key is used in the className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label tag />\n * <div class=\"ui tag label\"></div>\n */\nexport const useKeyOnly = (val: any, key: string) => val && key;\n\n/**\n * Props that require both a key and value to create a className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label corner='left' />\n * <div class=\"ui left corner label\"></div>\n */\nexport const useValueAndKey = (val: any, key: string) =>\n val && val !== true && `${val}-${key}`;\n\n/**\n * Props whose key will be used in className, or value and key.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example Key Only\n * <Label pointing />\n * <div class=\"ui pointing label\"></div>\n *\n * @example Key and Value\n * <Label pointing='left' />\n * <div class=\"ui left pointing label\"></div>\n */\nexport const useKeyOrValueAndKey = (val: any, key: string) =>\n val && (val === true ? key : `${val}-${key}`);\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { getElementTypeFromProps } from '../helpers';\n\nexport interface GrauityInitProps {\n /**\n * An element type to render as (string or function).\n * */\n as: React.ElementType;\n\n /**\n * The font size to be applied on this element and so will act as standard for the `ems` of all grauity components.\n * */\n fontSize: string;\n\n /**\n * The multiplier is multiplied will all the `ems` of the grauity components.\n * */\n multiplier?: number;\n\n /**\n * The children to be rendered inside this component.\n * */\n children?: React.ReactNode;\n}\n\n/**\n * This component is used to initialize the Grauity library. Ideally, it should be the root component of your application.\n * But nonetheless all the grauity components should be the children of this component.\n * */\nfunction GrauityInit({ as, fontSize, multiplier, children }: GrauityInitProps) {\n const ElementType = getElementTypeFromProps({ as });\n\n return (\n <ElementType\n className=\"grauity-init\"\n style={{\n fontSize,\n '--multiplier': multiplier,\n }}\n >\n {children}\n </ElementType>\n );\n}\n\nGrauityInit.propTypes = {\n as: PropTypes.elementType,\n fontSize: PropTypes.string,\n multiplier: PropTypes.number,\n children: PropTypes.node,\n};\n\nGrauityInit.defaultProps = {\n as: 'div',\n fontSize: '16px',\n multiplier: 1,\n children: null,\n};\n\nexport default GrauityInit;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'lodash';\nimport classnames from 'classnames';\n\nimport {\n getElementTypeFromProps,\n useKeyOnly,\n useValueAndKey,\n} from '../../helpers';\nimport {\n GRAUITY_ICON_COLORS,\n GRAUITY_ICON_FLIPPED_CHOICES,\n GRAUITY_ICON_ROTATED_CHOICES,\n GRAUITY_ICON_SIZES,\n grauityFlippedChoiceName,\n grauityIconColorName,\n grauityIconName,\n grauityIconSizeName,\n grauityRotatedChoiceName,\n ICON_TAGS,\n} from '../../core';\n\nexport interface IconProps {\n /**\n * Icon can have the aria hidden attribute\n * */\n ariaHidden?: string;\n\n /**\n * Icon can have the aria label attribute\n * */\n ariaLabel?: string;\n\n /**\n * An element type to render as (string or function).\n * */\n as?: React.ElementType;\n\n /**\n * Format the icon to appear bordered\n * */\n bordered?: boolean;\n\n /**\n * Format the icon to appear circular\n * */\n circular?: boolean;\n\n /**\n * Color of the icon\n * */\n color?: grauityIconColorName;\n\n /**\n * Additional classes to be added to the component\n * */\n className?: string;\n\n /**\n * Show that the icon is inactive\n * */\n disabled?: boolean;\n\n /**\n * Fitted, without space to left or right of Icon\n * */\n fitted?: boolean;\n\n /**\n * Icon can be flipped\n * */\n flipped?: grauityFlippedChoiceName;\n\n /**\n * The colors of the icon can be inverted in case of used with border\n * * */\n inverted?: boolean;\n\n /**\n * Icon can be formatted as a link\n * */\n link?: boolean;\n\n /**\n * Icon can be used as a simple loader\n * */\n loading?: boolean;\n\n /**\n * Name of the icon\n * */\n name: grauityIconName;\n\n /**\n * Icon can be rotated\n * */\n rotated?: grauityRotatedChoiceName;\n\n /**\n * Size of the icon\n * */\n size?: grauityIconSizeName;\n\n /**\n * Additional styles to be used over the element\n * */\n style?: React.CSSProperties;\n}\n\nfunction Icon({\n ariaHidden,\n ariaLabel,\n as,\n bordered,\n circular,\n color,\n className,\n disabled,\n fitted,\n flipped,\n inverted,\n link,\n loading,\n name,\n rotated,\n size,\n style,\n ...props\n}: IconProps) {\n const Element = getElementTypeFromProps({ as });\n\n const getIconAriaOptions = () => {\n const ariaOptions: {\n 'aria-hidden'?: string;\n 'aria-label'?: string;\n } = {};\n\n if (_.isNil(ariaLabel)) {\n ariaOptions['aria-hidden'] = 'true';\n } else {\n ariaOptions['aria-label'] = ariaLabel;\n }\n\n if (!_.isNil(ariaHidden)) {\n ariaOptions['aria-hidden'] = ariaHidden;\n }\n\n return ariaOptions;\n };\n\n const handleClick = (e?: any) => {\n if (disabled) {\n e.preventDefault();\n return;\n }\n\n _.invoke(props, 'onClick', e, props);\n };\n\n const ariaOptions = getIconAriaOptions();\n\n const classes = classnames(\n 'grauity-icon',\n `grauity-icon-${name}`,\n `size-${size}`,\n useKeyOnly(color, color),\n useKeyOnly(bordered, 'bordered'),\n useKeyOnly(circular, 'circular'),\n useKeyOnly(disabled, 'disabled'),\n useKeyOnly(fitted, 'fitted'),\n useKeyOnly(inverted, 'inverted'),\n useKeyOnly(link, 'link'),\n useKeyOnly(loading, 'loading'),\n useValueAndKey(flipped, 'flipped'),\n useValueAndKey(rotated, 'rotated'),\n className\n );\n\n return (\n <Element\n onClick={handleClick}\n {...ariaOptions}\n className={classes}\n style={style}\n />\n );\n}\n\nIcon.propTypes = {\n ariaHidden: PropTypes.string,\n ariaLabel: PropTypes.string,\n as: PropTypes.elementType,\n bordered: PropTypes.bool,\n circular: PropTypes.bool,\n color: PropTypes.oneOf(GRAUITY_ICON_COLORS),\n className: PropTypes.string,\n disabled: PropTypes.bool,\n fitted: PropTypes.bool,\n flipped: PropTypes.oneOf(GRAUITY_ICON_FLIPPED_CHOICES),\n inverted: PropTypes.bool,\n link: PropTypes.bool,\n loading: PropTypes.bool,\n name: PropTypes.oneOf(Object.keys(ICON_TAGS)).isRequired,\n rotated: PropTypes.oneOf(GRAUITY_ICON_ROTATED_CHOICES),\n size: PropTypes.oneOf(GRAUITY_ICON_SIZES),\n style: PropTypes.object,\n};\n\nIcon.defaultProps = {\n ariaHidden: 'true',\n ariaLabel: undefined,\n as: 'i',\n bordered: false,\n circular: false,\n color: 'grey',\n className: undefined,\n disabled: false,\n fitted: false,\n flipped: undefined,\n inverted: false,\n link: false,\n loading: false,\n rotated: undefined,\n size: '16',\n style: undefined,\n};\n\nexport default Icon;\n"],"names":["$8cbcc263f670cb67$export$b009745c0d723d05","GRAUITY_SIZE","$93e0a646b230ea7f$export$250fa2f0e0a0ae2d","GRAUITY_COLOR","$8cbcc263f670cb67$export$3bf4c96953c50403","FOUR","EIGHT","TWELVE","SIXTEEN","TWENTY","TWENTY_FOUR","TWENTY_EIGHT","THIRTY_TWO","THIRTY_SIX","FORTY","$9e9ba7b4821e665f$export$bfde210aee969e37","GRAUITY_ICONS","$93e0a646b230ea7f$export$74eaf9ce0283ca6a","WHITE","BLACK","GREY","BLUE","RED","GREEN","ORANGE","YELLOW","PURPLE","$5965ca0b925355b2$export$8de62274c8c83544","GRAUITY_ROTATED_CHOICES","$5965ca0b925355b2$export$7157be2c39530a1b","GRAUITY_FLIPPED_CHOICES","$419cae6f23ffbade$export$18002f458cc7dd66","school","code","today","person","$419cae6f23ffbade$export$8ccf049745ac9a1d","buildings","objects","states","calendar","usersAndPeople","$5965ca0b925355b2$export$24f63745209ad7f5","CLOCKWISE","COUNTERCLOCKWISE","$5965ca0b925355b2$export$20d6cf3ab228a3ac","HORIZONTALLY","VERTICALLY","$9e62f2137a185622$export$2e2bcd8739ae039","props","as","$parcel$interopDefault","$ilWpy$styledcomponents","$9e62f2137a185622$var$templateObject_1","$9e62f2137a185622$var$__makeTemplateObject","href","$9e62f2137a185622$var$templateObject_2","$9e62f2137a185622$var$templateObject_3","$16aa4154c4e32542$export$aac7d417530cc39a","val","key","$16aa4154c4e32542$export$fb1b8744f6450628","concat","$f8fd2b3fc3688835$var$GrauityInit","_a","fontSize","multiplier","children","ElementType","$9e62f2137a185622$exports","default","$ilWpy$react","createElement","className","style","propTypes","$ilWpy$proptypes","elementType","string","number","node","defaultProps","$f8fd2b3fc3688835$export$2e2bcd8739ae039","$aba16f0e588731eb$var$Icon","ariaHidden","ariaLabel","bordered","circular","color","disabled","fitted","flipped","inverted","link","loading","name","rotated","size","$aba16f0e588731eb$var$__rest","Element","ariaOptions","$ilWpy$lodash","isNil","getIconAriaOptions","classes","$ilWpy$classnames","$aba16f0e588731eb$var$__assign","onClick","e","preventDefault","invoke","bool","oneOf","Object","keys","isRequired","object","undefined","$aba16f0e588731eb$export$2e2bcd8739ae039"],"version":3,"file":"main.cjs.map","sourceRoot":"../"}
@@ -1 +1 @@
1
- {"mappings":"iQAEA,IAAYA,EAAAC,KAAAD,MAAY,KACpB,SACAC,EAAA,UACAA,EAAA,YACAA,EAAA,aACAA,EAAA,YACAA,EAAA,iBACAA,EAA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AW4C,EACX5B,UAAU,EACVC,QAAQ,EACRC,aAAS0B,EACTzB,UAAU,EACVC,MAAM,EACNC,SAAS,EACTE,aAASqB,EACTpB,KAAM,KACNvB,WAAO2C,G,IAGXC,EAAenC,S","sources":["ui/core/sizes/index.ts","ui/core/colors/index.ts","ui/core/icons/iconTypes.ts","ui/core/icons/iconTags.ts","ui/core/miscellaneous-choices/index.ts","ui/helpers/getElementTypeFromProps.ts","ui/helpers/classNameBuilders.ts","ui/init/GrauityInit.tsx","ui/elements/Icon/Icon.tsx"],"sourcesContent":["export type { grauitySizeName, grauityIconSizeName } from './sizeTypes';\n\nexport enum GRAUITY_SIZE {\n FOUR = '4',\n EIGHT = '8',\n TWELVE = '12',\n SIXTEEN = '16',\n TWENTY = '20',\n TWENTY_FOUR = '24',\n TWENTY_EIGHT = '28',\n THIRTY_TWO = '32',\n THIRTY_SIX = '36',\n FORTY = '40',\n FORTY_FOUR = '44',\n FORTY_EIGHT = '48',\n}\n\nexport const GRAUITY_ICON_SIZES = [\n GRAUITY_SIZE.FOUR,\n GRAUITY_SIZE.EIGHT,\n GRAUITY_SIZE.TWELVE,\n GRAUITY_SIZE.SIXTEEN,\n GRAUITY_SIZE.TWENTY,\n GRAUITY_SIZE.TWENTY_FOUR,\n GRAUITY_SIZE.TWENTY_EIGHT,\n GRAUITY_SIZE.THIRTY_TWO,\n GRAUITY_SIZE.THIRTY_SIX,\n GRAUITY_SIZE.FORTY,\n];\n","export type { grauityColorName, grauityIconColorName } from './colorTypes';\n\nexport enum GRAUITY_COLOR {\n WHITE = 'white',\n BLACK = 'black',\n GREY = 'grey',\n BLUE = 'blue',\n RED = 'red',\n GREEN = 'green',\n ORANGE = 'orange',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n}\n\nexport const GRAUITY_ICON_COLORS = [\n GRAUITY_COLOR.WHITE,\n GRAUITY_COLOR.BLACK,\n GRAUITY_COLOR.GREY,\n GRAUITY_COLOR.BLUE,\n GRAUITY_COLOR.RED,\n GRAUITY_COLOR.GREEN,\n GRAUITY_COLOR.ORANGE,\n GRAUITY_COLOR.YELLOW,\n GRAUITY_COLOR.PURPLE,\n];\n","export type grauityIconName =\n | 'school-left'\n | 'school'\n | 'code'\n | 'today'\n | 'person';\n\nexport type grauityIconKey =\n | 'SchoolLeft'\n | 'School'\n | 'Code'\n | 'Today'\n | 'Person';\n\nexport enum GRAUITY_ICONS {\n SchoolLeft = 'school-left',\n School = 'school',\n Code = 'code',\n Today = 'today',\n Person = 'person',\n}\n","export const ICON_TAGS = {\n 'school-left': ['buildings'],\n school: ['buildings'],\n code: ['code'],\n today: ['objects', 'states', 'calendar'],\n person: ['usersAndPeople'],\n};\nexport const TAG_ICONS = {\n buildings: ['school-left', 'school'],\n code: ['code'],\n objects: ['today'],\n states: ['today'],\n calendar: ['today'],\n usersAndPeople: ['person'],\n};\n","export type {\n grauityRotatedChoiceName,\n grauityFlippedChoiceName,\n} from './miscellaneousTypes';\n\nexport enum GRAUITY_ROTATED_CHOICES {\n CLOCKWISE = 'clockwise',\n COUNTERCLOCKWISE = 'counterclockwise',\n}\n\nexport enum GRAUITY_FLIPPED_CHOICES {\n HORIZONTALLY = 'horizontally',\n VERTICALLY = 'vertically',\n}\n\nexport const GRAUITY_ICON_ROTATED_CHOICES = [\n GRAUITY_ROTATED_CHOICES.CLOCKWISE,\n GRAUITY_ROTATED_CHOICES.COUNTERCLOCKWISE,\n];\n\nexport const GRAUITY_ICON_FLIPPED_CHOICES = [\n GRAUITY_FLIPPED_CHOICES.HORIZONTALLY,\n GRAUITY_FLIPPED_CHOICES.VERTICALLY,\n];\n","import * as React from 'react';\nimport styled from 'styled-components';\n\n/**\n * Returns a createElement() type based on the props of the Component.\n * Useful for calculating what type a component should render as.\n *\n * @param {object} props A ReactElement props object\n * @returns {string|function} A ReactElement type\n */\n\nfunction getElementTypeFromProps(props: {\n as: React.ElementType;\n href?: string;\n}) {\n // ----------------------------------------\n // user defined \"as\" element type\n\n if (props.as) return styled(props.as)``;\n\n // ----------------------------------------\n // infer anchor links\n\n if (props.href) return styled('a')``;\n\n // ----------------------------------------\n // use defaultProp or 'div'\n\n return styled('div')``;\n}\n\nexport default getElementTypeFromProps;\n","/*\n * There are 3 prop patterns used to build up the className for a component.\n * Each utility here is meant for use in a classnames() argument.\n *\n * There is no util for valueOnly() because it would simply return val.\n * Use the prop value inline instead.\n * <Label size='big' />\n * <div class=\"ui big label\"></div>\n */\n\n/**\n * Props where only the prop key is used in the className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label tag />\n * <div class=\"ui tag label\"></div>\n */\nexport const useKeyOnly = (val: any, key: string) => val && key;\n\n/**\n * Props that require both a key and value to create a className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label corner='left' />\n * <div class=\"ui left corner label\"></div>\n */\nexport const useValueAndKey = (val: any, key: string) =>\n val && val !== true && `${val}-${key}`;\n\n/**\n * Props whose key will be used in className, or value and key.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example Key Only\n * <Label pointing />\n * <div class=\"ui pointing label\"></div>\n *\n * @example Key and Value\n * <Label pointing='left' />\n * <div class=\"ui left pointing label\"></div>\n */\nexport const useKeyOrValueAndKey = (val: any, key: string) =>\n val && (val === true ? key : `${val}-${key}`);\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { getElementTypeFromProps } from '../helpers';\n\nexport interface GrauityInitProps {\n /**\n * An element type to render as (string or function).\n * */\n as: React.ElementType;\n\n /**\n * The font size to be applied on this element and so will act as standard for the `ems` of all grauity components.\n * */\n fontSize: string;\n\n /**\n * The multiplier is multiplied will all the `ems` of the grauity components.\n * */\n multiplier?: number;\n\n /**\n * The children to be rendered inside this component.\n * */\n children?: React.ReactNode;\n}\n\n/**\n * This component is used to initialize the Grauity library. Ideally, it should be the root component of your application.\n * But nonetheless all the grauity components should be the children of this component.\n * */\nfunction GrauityInit({ as, fontSize, multiplier, children }: GrauityInitProps) {\n const ElementType = getElementTypeFromProps({ as });\n\n return (\n <ElementType\n className=\"grauity-init\"\n style={{\n fontSize,\n '--multiplier': multiplier,\n }}\n >\n {children}\n </ElementType>\n );\n}\n\nGrauityInit.propTypes = {\n as: PropTypes.elementType,\n fontSize: PropTypes.string,\n multiplier: PropTypes.number,\n children: PropTypes.node,\n};\n\nGrauityInit.defaultProps = {\n as: 'div',\n fontSize: '16px',\n multiplier: 1,\n children: null,\n};\n\nexport default GrauityInit;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'lodash';\nimport classnames from 'classnames';\n\nimport {\n getElementTypeFromProps,\n useKeyOnly,\n useValueAndKey,\n} from '../../helpers';\nimport {\n GRAUITY_ICON_COLORS,\n GRAUITY_ICON_FLIPPED_CHOICES,\n GRAUITY_ICON_ROTATED_CHOICES,\n GRAUITY_ICON_SIZES,\n grauityFlippedChoiceName,\n grauityIconColorName,\n grauityIconName,\n grauityIconSizeName,\n grauityRotatedChoiceName,\n ICON_TAGS,\n} from '../../core';\n\nexport interface IconProps {\n /**\n * Icon can have the aria hidden attribute\n * */\n ariaHidden?: string;\n\n /**\n * Icon can have the aria label attribute\n * */\n ariaLabel?: string;\n\n /**\n * An element type to render as (string or function).\n * */\n as?: React.ElementType;\n\n /**\n * Format the icon to appear bordered\n * */\n bordered?: boolean;\n\n /**\n * Format the icon to appear circular\n * */\n circular?: boolean;\n\n /**\n * Color of the icon\n * */\n color?: grauityIconColorName;\n\n /**\n * Additional classes to be added to the component\n * */\n className?: string;\n\n /**\n * Show that the icon is inactive\n * */\n disabled?: boolean;\n\n /**\n * Fitted, without space to left or right of Icon\n * */\n fitted?: boolean;\n\n /**\n * Icon can be flipped\n * */\n flipped?: grauityFlippedChoiceName;\n\n /**\n * The colors of the icon can be inverted in case of used with border\n * * */\n inverted?: boolean;\n\n /**\n * Icon can be formatted as a link\n * */\n link?: boolean;\n\n /**\n * Icon can be used as a simple loader\n * */\n loading?: boolean;\n\n /**\n * Name of the icon\n * */\n name: grauityIconName;\n\n /**\n * Icon can be rotated\n * */\n rotated?: grauityRotatedChoiceName;\n\n /**\n * Size of the icon\n * */\n size?: grauityIconSizeName;\n\n /**\n * Additional styles to be used over the element\n * */\n style?: React.CSSProperties;\n}\n\nfunction Icon({\n ariaHidden,\n ariaLabel,\n as,\n bordered,\n circular,\n color,\n className,\n disabled,\n fitted,\n flipped,\n inverted,\n link,\n loading,\n name,\n rotated,\n size,\n style,\n ...props\n}: IconProps) {\n const Element = getElementTypeFromProps({ as });\n\n const getIconAriaOptions = () => {\n const ariaOptions: {\n 'aria-hidden'?: string;\n 'aria-label'?: string;\n } = {};\n\n if (_.isNil(ariaLabel)) {\n ariaOptions['aria-hidden'] = 'true';\n } else {\n ariaOptions['aria-label'] = ariaLabel;\n }\n\n if (!_.isNil(ariaHidden)) {\n ariaOptions['aria-hidden'] = ariaHidden;\n }\n\n return ariaOptions;\n };\n\n const handleClick = (e?: any) => {\n if (disabled) {\n e.preventDefault();\n return;\n }\n\n _.invoke(props, 'onClick', e, props);\n };\n\n const ariaOptions = getIconAriaOptions();\n\n const classes = classnames(\n 'grauity-icon',\n `grauity-icon-${name}`,\n `size-${size}`,\n useKeyOnly(color, color),\n useKeyOnly(bordered, 'bordered'),\n useKeyOnly(circular, 'circular'),\n useKeyOnly(disabled, 'disabled'),\n useKeyOnly(fitted, 'fitted'),\n useKeyOnly(inverted, 'inverted'),\n useKeyOnly(link, 'link'),\n useKeyOnly(loading, 'loading'),\n useValueAndKey(flipped, 'flipped'),\n useValueAndKey(rotated, 'rotated'),\n className\n );\n\n return (\n <Element\n onClick={handleClick}\n {...ariaOptions}\n className={classes}\n style={style}\n />\n );\n}\n\nIcon.propTypes = {\n ariaHidden: PropTypes.string,\n ariaLabel: PropTypes.string,\n as: PropTypes.elementType,\n bordered: PropTypes.bool,\n circular: PropTypes.bool,\n color: PropTypes.oneOf(GRAUITY_ICON_COLORS),\n className: PropTypes.string,\n disabled: PropTypes.bool,\n fitted: PropTypes.bool,\n flipped: PropTypes.oneOf(GRAUITY_ICON_FLIPPED_CHOICES),\n inverted: PropTypes.bool,\n link: PropTypes.bool,\n loading: PropTypes.bool,\n name: PropTypes.oneOf(Object.keys(ICON_TAGS)).isRequired,\n rotated: PropTypes.oneOf(GRAUITY_ICON_ROTATED_CHOICES),\n size: PropTypes.oneOf(GRAUITY_ICON_SIZES),\n style: PropTypes.object,\n};\n\nIcon.defaultProps = {\n ariaHidden: 'true',\n ariaLabel: undefined,\n as: 'i',\n bordered: false,\n circular: false,\n color: 'grey',\n className: undefined,\n disabled: false,\n fitted: false,\n flipped: undefined,\n inverted: false,\n link: false,\n loading: false,\n rotated: undefined,\n size: '16',\n style: undefined,\n};\n\nexport default Icon;\n"],"names":["$97c8cc3406f103f0$export$b009745c0d723d05","GRAUITY_SIZE","$a7b551a82f8eb74c$export$250fa2f0e0a0ae2d","GRAUITY_COLOR","$97c8cc3406f103f0$export$3bf4c96953c50403","FOUR","EIGHT","TWELVE","SIXTEEN","TWENTY","TWENTY_FOUR","TWENTY_EIGHT","THIRTY_TWO","THIRTY_SIX","FORTY","$c42b0db9175e2f03$export$bfde210aee969e37","GRAUITY_ICONS","$a7b551a82f8eb74c$export$74eaf9ce0283ca6a","WHITE","BLACK","GREY","BLUE","RED","GREEN","ORANGE","YELLOW","PURPLE","$a74d57d2ef68f11e$export$8de62274c8c83544","GRAUITY_ROTATED_CHOICES","$a74d57d2ef68f11e$export$7157be2c39530a1b","GRAUITY_FLIPPED_CHOICES","$43ff2d0550f61a97$export$18002f458cc7dd66","school","code","today","person","$43ff2d0550f61a97$export$8ccf049745ac9a1d","buildings","objects","states","calendar","usersAndPeople","$a74d57d2ef68f11e$export$24f63745209ad7f5","CLOCKWISE","COUNTERCLOCKWISE","$a74d57d2ef68f11e$export$20d6cf3ab228a3ac","HORIZONTALLY","VERTICALLY","$afe9cb772c24a39f$export$2e2bcd8739ae039","props","as","$giJ7o$styledcomponents","$afe9cb772c24a39f$var$templateObject_1","$afe9cb772c24a39f$var$__makeTemplateObject","href","$afe9cb772c24a39f$var$templateObject_2","$afe9cb772c24a39f$var$templateObject_3","$1ddc061075aae296$export$aac7d417530cc39a","val","key","$1ddc061075aae296$export$fb1b8744f6450628","concat","$a9401db3fd8e77ce$var$GrauityInit","_a","fontSize","multiplier","children","ElementType","$afe9cb772c24a39f$exports","default","$giJ7o$createElement","className","style","propTypes","$giJ7o$proptypes","elementType","string","number","node","defaultProps","$a9401db3fd8e77ce$export$2e2bcd8739ae039","$214e993a2b2ecc77$var$Icon","ariaHidden","ariaLabel","bordered","circular","color","disabled","fitted","flipped","inverted","link","loading","name","rotated","size","$214e993a2b2ecc77$var$__rest","Element","ariaOptions","$giJ7o$lodash","isNil","getIconAriaOptions","classes","$giJ7o$classnames","$214e993a2b2ecc77$var$__assign","onClick","e","preventDefault","invoke","bool","oneOf","Object","keys","isRequired","object","undefined","$214e993a2b2ecc77$export$2e2bcd8739ae039"],"version":3,"file":"module.mjs.map","sourceRoot":"../"}
1
+ {"mappings":"iQAEA,IAAYA,EAAAC,KAAAD,MAAY,KACpB,SACAC,EAAA,UACAA,EAAA,YACAA,EAAA,aACAA,EAAA,YACAA,EAAA,iBACAA,EAAA,kBACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,WACAA,EAAA,gBACAA,EAAA,iBAGG,ICfKC,EAAAC,EDeCC,EAAqB,CAC9BJ,EAAaK,KACbL,EAAaM,MACbN,EAAaO,OACbP,EAAaQ,QACbR,EAAaS,OACbT,EAAaU,YACbV,EAAaW,aACbX,EAAaY,WACbZ,EAAaa,WACbb,EAAac,QCzBLX,EAAAD,MAAa,KACrB,cACAC,EAAA,cACAA,EAAA,YACAA,EAAA,YACAA,EAAA,UACAA,EAAA,cACAA,EAAA,gBACAA,EAAA,gBACAA,EAAA,gBAGG,ICAKY,EAAAC,EDACC,EAAsB,CAC/Bf,EAAcgB,MACdhB,EAAciB,MACdjB,EAAckB,KACdlB,EAAcmB,KACdnB,EAAcoB,IACdpB,EAAcqB,MACdrB,EAA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AmB,EAAEC,iBAINR,EAAES,OAAO3D,EAAO,UAAWyD,EAAGzD,EAClC,GAwBYiD,EAAW,CACf3B,UAAW+B,EACX9B,MAAOA,IAGnB,CAEAS,EAAKR,UAAY,CACbS,WAAYR,EAAUE,OACtBO,UAAWT,EAAUE,OACrB1B,GAAIwB,EAAUC,YACdS,SAAUV,EAAUmC,KACpBxB,SAAUX,EAAUmC,KACpBvB,MAAOZ,EAAUoC,MAAM7F,GACvBsD,UAAWG,EAAUE,OACrBW,SAAUb,EAAUmC,KACpBrB,OAAQd,EAAUmC,KAClBpB,QAASf,EAAUoC,MAAMjE,GACzB6C,SAAUhB,EAAUmC,KACpBlB,KAAMjB,EAAUmC,KAChBjB,QAASlB,EAAUmC,KACnBhB,KAAMnB,EAAUoC,MAAMC,OAAOC,KAAKjF,IAAYkF,WAC9CnB,QAASpB,EAAUoC,MAAMpE,GACzBqD,KAAMrB,EAAUoC,MAAM1G,GACtBoE,MAAOE,EAAUwC,QAGrBjC,EAAKF,aAAe,CAChBG,WAAY,OACZC,eAAWgC,EACXjE,GAAI,IACJkC,UAAU,EACVC,UAAU,EACVC,MAAO,OACPf,eAAW4C,EACX5B,UAAU,EACVC,QAAQ,EACRC,aAAS0B,EACTzB,UAAU,EACVC,MAAM,EACNC,SAAS,EACTE,aAASqB,EACTpB,KAAM,KACNvB,WAAO2C,G,IAGXC,EAAenC,S","sources":["ui/core/sizes/index.ts","ui/core/colors/index.ts","ui/core/icons/iconTypes.ts","ui/core/icons/iconTags.ts","ui/core/miscellaneous-choices/index.ts","ui/helpers/getElementTypeFromProps.ts","ui/helpers/classNameBuilders.ts","ui/init/GrauityInit.tsx","ui/elements/Icon/Icon.tsx"],"sourcesContent":["export type { grauitySizeName, grauityIconSizeName } from './sizeTypes';\n\nexport enum GRAUITY_SIZE {\n FOUR = '4',\n EIGHT = '8',\n TWELVE = '12',\n SIXTEEN = '16',\n TWENTY = '20',\n TWENTY_FOUR = '24',\n TWENTY_EIGHT = '28',\n THIRTY_TWO = '32',\n THIRTY_SIX = '36',\n FORTY = '40',\n FORTY_FOUR = '44',\n FORTY_EIGHT = '48',\n}\n\nexport const GRAUITY_ICON_SIZES = [\n GRAUITY_SIZE.FOUR,\n GRAUITY_SIZE.EIGHT,\n GRAUITY_SIZE.TWELVE,\n GRAUITY_SIZE.SIXTEEN,\n GRAUITY_SIZE.TWENTY,\n GRAUITY_SIZE.TWENTY_FOUR,\n GRAUITY_SIZE.TWENTY_EIGHT,\n GRAUITY_SIZE.THIRTY_TWO,\n GRAUITY_SIZE.THIRTY_SIX,\n GRAUITY_SIZE.FORTY,\n];\n","export type { grauityColorName, grauityIconColorName } from './colorTypes';\n\nexport enum GRAUITY_COLOR {\n WHITE = 'white',\n BLACK = 'black',\n GREY = 'grey',\n BLUE = 'blue',\n RED = 'red',\n GREEN = 'green',\n ORANGE = 'orange',\n YELLOW = 'yellow',\n PURPLE = 'purple',\n}\n\nexport const GRAUITY_ICON_COLORS = [\n GRAUITY_COLOR.WHITE,\n GRAUITY_COLOR.BLACK,\n GRAUITY_COLOR.GREY,\n GRAUITY_COLOR.BLUE,\n GRAUITY_COLOR.RED,\n GRAUITY_COLOR.GREEN,\n GRAUITY_COLOR.ORANGE,\n GRAUITY_COLOR.YELLOW,\n GRAUITY_COLOR.PURPLE,\n];\n","export type grauityIconName =\n | 'school-left'\n | 'school'\n | 'code'\n | 'today'\n | 'person';\n\nexport type grauityIconKey =\n | 'SchoolLeft'\n | 'School'\n | 'Code'\n | 'Today'\n | 'Person';\n\nexport enum GRAUITY_ICONS {\n SchoolLeft = 'school-left',\n School = 'school',\n Code = 'code',\n Today = 'today',\n Person = 'person',\n}\n","export const ICON_TAGS = {\n \"school-left\": [\n \"buildings\"\n ],\n \"school\": [\n \"buildings\"\n ],\n \"code\": [\n \"code\"\n ],\n \"today\": [\n \"objects\",\n \"states\",\n \"calendar\"\n ],\n \"person\": [\n \"usersAndPeople\"\n ]\n};\nexport const TAG_ICONS = {\n \"buildings\": [\n \"school-left\",\n \"school\"\n ],\n \"code\": [\n \"code\"\n ],\n \"objects\": [\n \"today\"\n ],\n \"states\": [\n \"today\"\n ],\n \"calendar\": [\n \"today\"\n ],\n \"usersAndPeople\": [\n \"person\"\n ]\n};","export type {\n grauityRotatedChoiceName,\n grauityFlippedChoiceName,\n} from './miscellaneousTypes';\n\nexport enum GRAUITY_ROTATED_CHOICES {\n CLOCKWISE = 'clockwise',\n COUNTERCLOCKWISE = 'counterclockwise',\n}\n\nexport enum GRAUITY_FLIPPED_CHOICES {\n HORIZONTALLY = 'horizontally',\n VERTICALLY = 'vertically',\n}\n\nexport const GRAUITY_ICON_ROTATED_CHOICES = [\n GRAUITY_ROTATED_CHOICES.CLOCKWISE,\n GRAUITY_ROTATED_CHOICES.COUNTERCLOCKWISE,\n];\n\nexport const GRAUITY_ICON_FLIPPED_CHOICES = [\n GRAUITY_FLIPPED_CHOICES.HORIZONTALLY,\n GRAUITY_FLIPPED_CHOICES.VERTICALLY,\n];\n","import * as React from 'react';\nimport styled from 'styled-components';\n\n/**\n * Returns a createElement() type based on the props of the Component.\n * Useful for calculating what type a component should render as.\n *\n * @param {object} props A ReactElement props object\n * @returns {string|function} A ReactElement type\n */\n\nfunction getElementTypeFromProps(props: {\n as: React.ElementType;\n href?: string;\n}) {\n // ----------------------------------------\n // user defined \"as\" element type\n\n if (props.as) return styled(props.as)``;\n\n // ----------------------------------------\n // infer anchor links\n\n if (props.href) return styled('a')``;\n\n // ----------------------------------------\n // use defaultProp or 'div'\n\n return styled('div')``;\n}\n\nexport default getElementTypeFromProps;\n","/*\n * There are 3 prop patterns used to build up the className for a component.\n * Each utility here is meant for use in a classnames() argument.\n *\n * There is no util for valueOnly() because it would simply return val.\n * Use the prop value inline instead.\n * <Label size='big' />\n * <div class=\"ui big label\"></div>\n */\n\n/**\n * Props where only the prop key is used in the className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label tag />\n * <div class=\"ui tag label\"></div>\n */\nexport const useKeyOnly = (val: any, key: string) => val && key;\n\n/**\n * Props that require both a key and value to create a className.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example\n * <Label corner='left' />\n * <div class=\"ui left corner label\"></div>\n */\nexport const useValueAndKey = (val: any, key: string) =>\n val && val !== true && `${val}-${key}`;\n\n/**\n * Props whose key will be used in className, or value and key.\n * @param {*} val A props value\n * @param {string} key A props key\n *\n * @example Key Only\n * <Label pointing />\n * <div class=\"ui pointing label\"></div>\n *\n * @example Key and Value\n * <Label pointing='left' />\n * <div class=\"ui left pointing label\"></div>\n */\nexport const useKeyOrValueAndKey = (val: any, key: string) =>\n val && (val === true ? key : `${val}-${key}`);\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { getElementTypeFromProps } from '../helpers';\n\nexport interface GrauityInitProps {\n /**\n * An element type to render as (string or function).\n * */\n as: React.ElementType;\n\n /**\n * The font size to be applied on this element and so will act as standard for the `ems` of all grauity components.\n * */\n fontSize: string;\n\n /**\n * The multiplier is multiplied will all the `ems` of the grauity components.\n * */\n multiplier?: number;\n\n /**\n * The children to be rendered inside this component.\n * */\n children?: React.ReactNode;\n}\n\n/**\n * This component is used to initialize the Grauity library. Ideally, it should be the root component of your application.\n * But nonetheless all the grauity components should be the children of this component.\n * */\nfunction GrauityInit({ as, fontSize, multiplier, children }: GrauityInitProps) {\n const ElementType = getElementTypeFromProps({ as });\n\n return (\n <ElementType\n className=\"grauity-init\"\n style={{\n fontSize,\n '--multiplier': multiplier,\n }}\n >\n {children}\n </ElementType>\n );\n}\n\nGrauityInit.propTypes = {\n as: PropTypes.elementType,\n fontSize: PropTypes.string,\n multiplier: PropTypes.number,\n children: PropTypes.node,\n};\n\nGrauityInit.defaultProps = {\n as: 'div',\n fontSize: '16px',\n multiplier: 1,\n children: null,\n};\n\nexport default GrauityInit;\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport _ from 'lodash';\nimport classnames from 'classnames';\n\nimport {\n getElementTypeFromProps,\n useKeyOnly,\n useValueAndKey,\n} from '../../helpers';\nimport {\n GRAUITY_ICON_COLORS,\n GRAUITY_ICON_FLIPPED_CHOICES,\n GRAUITY_ICON_ROTATED_CHOICES,\n GRAUITY_ICON_SIZES,\n grauityFlippedChoiceName,\n grauityIconColorName,\n grauityIconName,\n grauityIconSizeName,\n grauityRotatedChoiceName,\n ICON_TAGS,\n} from '../../core';\n\nexport interface IconProps {\n /**\n * Icon can have the aria hidden attribute\n * */\n ariaHidden?: string;\n\n /**\n * Icon can have the aria label attribute\n * */\n ariaLabel?: string;\n\n /**\n * An element type to render as (string or function).\n * */\n as?: React.ElementType;\n\n /**\n * Format the icon to appear bordered\n * */\n bordered?: boolean;\n\n /**\n * Format the icon to appear circular\n * */\n circular?: boolean;\n\n /**\n * Color of the icon\n * */\n color?: grauityIconColorName;\n\n /**\n * Additional classes to be added to the component\n * */\n className?: string;\n\n /**\n * Show that the icon is inactive\n * */\n disabled?: boolean;\n\n /**\n * Fitted, without space to left or right of Icon\n * */\n fitted?: boolean;\n\n /**\n * Icon can be flipped\n * */\n flipped?: grauityFlippedChoiceName;\n\n /**\n * The colors of the icon can be inverted in case of used with border\n * * */\n inverted?: boolean;\n\n /**\n * Icon can be formatted as a link\n * */\n link?: boolean;\n\n /**\n * Icon can be used as a simple loader\n * */\n loading?: boolean;\n\n /**\n * Name of the icon\n * */\n name: grauityIconName;\n\n /**\n * Icon can be rotated\n * */\n rotated?: grauityRotatedChoiceName;\n\n /**\n * Size of the icon\n * */\n size?: grauityIconSizeName;\n\n /**\n * Additional styles to be used over the element\n * */\n style?: React.CSSProperties;\n}\n\nfunction Icon({\n ariaHidden,\n ariaLabel,\n as,\n bordered,\n circular,\n color,\n className,\n disabled,\n fitted,\n flipped,\n inverted,\n link,\n loading,\n name,\n rotated,\n size,\n style,\n ...props\n}: IconProps) {\n const Element = getElementTypeFromProps({ as });\n\n const getIconAriaOptions = () => {\n const ariaOptions: {\n 'aria-hidden'?: string;\n 'aria-label'?: string;\n } = {};\n\n if (_.isNil(ariaLabel)) {\n ariaOptions['aria-hidden'] = 'true';\n } else {\n ariaOptions['aria-label'] = ariaLabel;\n }\n\n if (!_.isNil(ariaHidden)) {\n ariaOptions['aria-hidden'] = ariaHidden;\n }\n\n return ariaOptions;\n };\n\n const handleClick = (e?: any) => {\n if (disabled) {\n e.preventDefault();\n return;\n }\n\n _.invoke(props, 'onClick', e, props);\n };\n\n const ariaOptions = getIconAriaOptions();\n\n const classes = classnames(\n 'grauity-icon',\n `grauity-icon-${name}`,\n `size-${size}`,\n useKeyOnly(color, color),\n useKeyOnly(bordered, 'bordered'),\n useKeyOnly(circular, 'circular'),\n useKeyOnly(disabled, 'disabled'),\n useKeyOnly(fitted, 'fitted'),\n useKeyOnly(inverted, 'inverted'),\n useKeyOnly(link, 'link'),\n useKeyOnly(loading, 'loading'),\n useValueAndKey(flipped, 'flipped'),\n useValueAndKey(rotated, 'rotated'),\n className\n );\n\n return (\n <Element\n onClick={handleClick}\n {...ariaOptions}\n className={classes}\n style={style}\n />\n );\n}\n\nIcon.propTypes = {\n ariaHidden: PropTypes.string,\n ariaLabel: PropTypes.string,\n as: PropTypes.elementType,\n bordered: PropTypes.bool,\n circular: PropTypes.bool,\n color: PropTypes.oneOf(GRAUITY_ICON_COLORS),\n className: PropTypes.string,\n disabled: PropTypes.bool,\n fitted: PropTypes.bool,\n flipped: PropTypes.oneOf(GRAUITY_ICON_FLIPPED_CHOICES),\n inverted: PropTypes.bool,\n link: PropTypes.bool,\n loading: PropTypes.bool,\n name: PropTypes.oneOf(Object.keys(ICON_TAGS)).isRequired,\n rotated: PropTypes.oneOf(GRAUITY_ICON_ROTATED_CHOICES),\n size: PropTypes.oneOf(GRAUITY_ICON_SIZES),\n style: PropTypes.object,\n};\n\nIcon.defaultProps = {\n ariaHidden: 'true',\n ariaLabel: undefined,\n as: 'i',\n bordered: false,\n circular: false,\n color: 'grey',\n className: undefined,\n disabled: false,\n fitted: false,\n flipped: undefined,\n inverted: false,\n link: false,\n loading: false,\n rotated: undefined,\n size: '16',\n style: undefined,\n};\n\nexport default Icon;\n"],"names":["$97c8cc3406f103f0$export$b009745c0d723d05","GRAUITY_SIZE","$a7b551a82f8eb74c$export$250fa2f0e0a0ae2d","GRAUITY_COLOR","$97c8cc3406f103f0$export$3bf4c96953c50403","FOUR","EIGHT","TWELVE","SIXTEEN","TWENTY","TWENTY_FOUR","TWENTY_EIGHT","THIRTY_TWO","THIRTY_SIX","FORTY","$c42b0db9175e2f03$export$bfde210aee969e37","GRAUITY_ICONS","$a7b551a82f8eb74c$export$74eaf9ce0283ca6a","WHITE","BLACK","GREY","BLUE","RED","GREEN","ORANGE","YELLOW","PURPLE","$a74d57d2ef68f11e$export$8de62274c8c83544","GRAUITY_ROTATED_CHOICES","$a74d57d2ef68f11e$export$7157be2c39530a1b","GRAUITY_FLIPPED_CHOICES","$43ff2d0550f61a97$export$18002f458cc7dd66","school","code","today","person","$43ff2d0550f61a97$export$8ccf049745ac9a1d","buildings","objects","states","calendar","usersAndPeople","$a74d57d2ef68f11e$export$24f63745209ad7f5","CLOCKWISE","COUNTERCLOCKWISE","$a74d57d2ef68f11e$export$20d6cf3ab228a3ac","HORIZONTALLY","VERTICALLY","$afe9cb772c24a39f$export$2e2bcd8739ae039","props","as","$giJ7o$styledcomponents","$afe9cb772c24a39f$var$templateObject_1","$afe9cb772c24a39f$var$__makeTemplateObject","href","$afe9cb772c24a39f$var$templateObject_2","$afe9cb772c24a39f$var$templateObject_3","$1ddc061075aae296$export$aac7d417530cc39a","val","key","$1ddc061075aae296$export$fb1b8744f6450628","concat","$a9401db3fd8e77ce$var$GrauityInit","_a","fontSize","multiplier","children","ElementType","$afe9cb772c24a39f$exports","default","$giJ7o$createElement","className","style","propTypes","$giJ7o$proptypes","elementType","string","number","node","defaultProps","$a9401db3fd8e77ce$export$2e2bcd8739ae039","$214e993a2b2ecc77$var$Icon","ariaHidden","ariaLabel","bordered","circular","color","disabled","fitted","flipped","inverted","link","loading","name","rotated","size","$214e993a2b2ecc77$var$__rest","Element","ariaOptions","$giJ7o$lodash","isNil","getIconAriaOptions","classes","$giJ7o$classnames","$214e993a2b2ecc77$var$__assign","onClick","e","preventDefault","invoke","bool","oneOf","Object","keys","isRequired","object","undefined","$214e993a2b2ecc77$export$2e2bcd8739ae039"],"version":3,"file":"module.mjs.map","sourceRoot":"../"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtonschool/grauity",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "Newton School",
@@ -1,15 +1,40 @@
1
1
  export const ICON_TAGS = {
2
- 'school-left': ['buildings'],
3
- school: ['buildings'],
4
- code: ['code'],
5
- today: ['objects', 'states', 'calendar'],
6
- person: ['usersAndPeople'],
2
+ "school-left": [
3
+ "buildings"
4
+ ],
5
+ "school": [
6
+ "buildings"
7
+ ],
8
+ "code": [
9
+ "code"
10
+ ],
11
+ "today": [
12
+ "objects",
13
+ "states",
14
+ "calendar"
15
+ ],
16
+ "person": [
17
+ "usersAndPeople"
18
+ ]
7
19
  };
8
20
  export const TAG_ICONS = {
9
- buildings: ['school-left', 'school'],
10
- code: ['code'],
11
- objects: ['today'],
12
- states: ['today'],
13
- calendar: ['today'],
14
- usersAndPeople: ['person'],
15
- };
21
+ "buildings": [
22
+ "school-left",
23
+ "school"
24
+ ],
25
+ "code": [
26
+ "code"
27
+ ],
28
+ "objects": [
29
+ "today"
30
+ ],
31
+ "states": [
32
+ "today"
33
+ ],
34
+ "calendar": [
35
+ "today"
36
+ ],
37
+ "usersAndPeople": [
38
+ "person"
39
+ ]
40
+ };
@@ -1,21 +1,21 @@
1
1
  export type grauityIconName =
2
- | 'school-left'
3
- | 'school'
4
- | 'code'
5
- | 'today'
6
- | 'person';
2
+ | 'school-left'
3
+ | 'school'
4
+ | 'code'
5
+ | 'today'
6
+ | 'person';
7
7
 
8
8
  export type grauityIconKey =
9
- | 'SchoolLeft'
10
- | 'School'
11
- | 'Code'
12
- | 'Today'
13
- | 'Person';
9
+ | 'SchoolLeft'
10
+ | 'School'
11
+ | 'Code'
12
+ | 'Today'
13
+ | 'Person';
14
14
 
15
15
  export enum GRAUITY_ICONS {
16
- SchoolLeft = 'school-left',
17
- School = 'school',
18
- Code = 'code',
19
- Today = 'today',
20
- Person = 'person',
16
+ SchoolLeft = 'school-left',
17
+ School = 'school',
18
+ Code = 'code',
19
+ Today = 'today',
20
+ Person = 'person',
21
21
  }
Binary file
Binary file
Binary file
Binary file
Binary file