@legion-ui-kit/react-core
Version:
<div align="center"> <img height="108" width="116" src="https://legion.digitaltelkom.id/favicon.svg?v=4643a71fb65fa61a5f2b266b769ea7b1" /> <h1 align="center">Legion UI Kit - React Core</h1> </div>
1 lines • 2.19 kB
Source Map (JSON)
{"version":3,"file":"Tooltip.constant.cjs","sources":["../../../../src/components/Tooltip/Tooltip.constant.ts"],"sourcesContent":["// Types\r\nimport type { TTooltipPosition, TTooltipProps, TTooltipOpenState, TTooltipStyle } from './Tooltip.type';\r\n\r\nexport const TOOLTIP_POSITIONS: TTooltipPosition[] = [\r\n 'bottom-center',\r\n 'bottom-left',\r\n 'bottom-right',\r\n 'left-bottom',\r\n 'left-center',\r\n 'left-top',\r\n 'right-bottom',\r\n 'right-center',\r\n 'right-top',\r\n 'top-center',\r\n 'top-left',\r\n 'top-right'\r\n];\r\nexport const TOOLTIP_POSITION: { [key in TTooltipPosition]: key } = {\r\n ['bottom-center']: 'bottom-center',\r\n ['bottom-left']: 'bottom-left',\r\n ['bottom-right']: 'bottom-right',\r\n ['left-bottom']: 'left-bottom',\r\n ['left-center']: 'left-center',\r\n ['left-top']: 'left-top',\r\n ['right-bottom']: 'right-bottom',\r\n ['right-center']: 'right-center',\r\n ['right-top']: 'right-top',\r\n ['top-center']: 'top-center',\r\n ['top-left']: 'top-left',\r\n ['top-right']: 'top-right'\r\n};\r\n\r\n/*\r\n This is the default animation duration for the Tooltip to be opened / closed.\r\n The duration value is in millisecond.\r\n */\r\n\r\nexport const TOOLTIP_ANIMATION_DURATION = 300;\r\n// The delay before the animation starts or ends, to prevent race conditions between animation and rendering. The duration value is in millisecond.\r\nexport const TOOLTIP_ANIMATION_DELAY = 50;\r\n\r\nexport const TOOLTIP_DEFAULT_OPEN_STATE: TTooltipOpenState = {\r\n isOpen: false,\r\n isShow: false\r\n};\r\n\r\nexport const TOOLTIP_DEFAULT_STYLE: TTooltipStyle = {\r\n left: 0,\r\n top: 0\r\n};\r\n\r\nexport const TOOLTIP_DEFAULT_PROPS: Omit<TTooltipProps, 'children'> = {\r\n content: 'Tooltip',\r\n position: TOOLTIP_POSITION['top-center']\r\n};\r\n"],"names":["TOOLTIP_POSITION","TOOLTIP_DEFAULT_PROPS","position","isOpen","isShow","left","top"],"mappings":"aAiBO,MAAMA,EAAuD,CAClE,gBAAmB,gBACnB,cAAiB,cACjB,eAAkB,eAClB,cAAiB,cACjB,cAAiB,cACjB,WAAc,WACd,eAAkB,eAClB,eAAkB,eAClB,YAAe,YACf,aAAgB,aAChB,WAAc,WACd,YAAe,aAsBJC,EAAyD,CAEpEC,SAAUF,EAAiB,+CAdU,sCAFG,uCAImB,CAC3DG,QAAQ,EACRC,QAAQ,iEAG0C,CAClDC,KAAM,EACNC,IAAK"}