UNPKG

@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.45 kB
{"version":3,"file":"Dropdown.constant.cjs","sources":["../../../../src/components/Dropdown/Dropdown.constant.ts"],"sourcesContent":["// Types\r\nimport type { TDropdownOpenState, TDropdownPosition, TDropdownProps, TDropdownStyle } from './Dropdown.type';\r\n\r\n/*\r\n This Gap is used to separate the Dropdown from the trigger.\r\n There's no token for the Dropdown Gap. It's following the Figma design and valid per 22 Nov 2024.\r\n*/\r\nexport const DROPDOWN_GAP = 12;\r\n\r\n/*\r\n This is the default animation duration for the Dropdown to be opened / closed.\r\n The duration value is in millisecond.\r\n */\r\nexport const DROPDOWN_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 DROPDOWN_ANIMATION_DELAY = 50;\r\n\r\nexport const DROPDOWN_DEFAULT_OPEN_STATE: TDropdownOpenState = {\r\n isOpen: false,\r\n isShow: false\r\n};\r\n\r\nexport const DROPDOWN_DEFAULT_STYLE: TDropdownStyle = {\r\n height: 0,\r\n left: 0,\r\n top: 0\r\n};\r\n\r\nexport const DROPDOWN_POSITIONS: TDropdownPosition[] = [\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 DROPDOWN_POSITION: { [key in TDropdownPosition]: 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\nexport const DROPDOWN_DEFAULT_PROPS: Omit<TDropdownProps, 'children' | 'trigger'> = {\r\n position: DROPDOWN_POSITION['bottom-left']\r\n};\r\n"],"names":["DROPDOWN_POSITION","DROPDOWN_DEFAULT_PROPS","position","isOpen","isShow","height","left","top"],"mappings":"aAOO,MAmCMA,EAAyD,CACpE,gBAAmB,gBACnB,cAAiB,cACjB,eAAkB,eAClB,cAAiB,cACjB,cAAiB,cACjB,WAAc,WACd,eAAkB,eAClB,eAAkB,eAClB,YAAe,YAEf,WAAc,WACd,YAAe,aAGJC,EAAuE,CAClFC,SAAUF,EAAkB,iDA3CU,uCAFG,wCAIoB,CAC7DG,QAAQ,EACRC,QAAQ,mEAG4C,CACpDC,OAAQ,EACRC,KAAM,EACNC,IAAK,wBAlBqB"}