@economic/taco 1.9.1 → 1.9.2

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 +1 @@
1
- {"version":3,"file":"Item.js","sources":["../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { useCurrentMenu } from '../Context';\nimport { DialogProps } from '../../Dialog/Dialog';\n\nexport const Icon = ({ name }) => (\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({ disabled, indented, className }) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group',\n 'text-black aria-disabled:text-grey hover:bg-grey-light hover:text-black',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n 'cursor-pointer': !disabled,\n 'cursor-not-allowed': disabled,\n },\n className\n );\n};\n\nexport const Shortcut = props => {\n return <span {...props} className=\"text-grey-darkest ml-auto pl-3\" />;\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n shortcut?: string;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, shortcut, ...otherProps } = props;\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = props.disabled ?? props['aria-disabled'];\n\n let handleClick;\n\n // radix has a bug that does not disable clicks when disabled is set on items\n if (disabled) {\n handleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n };\n }\n\n const handleSelect = event => {\n if (onClick) {\n onClick(event);\n }\n\n if (props['aria-haspopup'] || typeof dialog === 'function') {\n event.preventDefault();\n }\n };\n\n let button = (\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\n {icon && <Icon name={icon} />}\n {props.children}\n {shortcut && <Shortcut>{shortcut}</Shortcut>}\n </DropdownMenuPrimitive.Item>\n );\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button });\n }\n\n return button;\n});\n"],"names":["Icon","name","React","className","IconPrimitive","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Shortcut","props","Item","MenuItem","ref","dialog","icon","onClick","shortcut","otherProps","handleClick","event","preventDefault","stopPropagation","handleSelect","button","DropdownMenuPrimitive","onSelect","children","trigger"],"mappings":";;;;;;MAQaA,IAAI,GAAG,CAAC;EAAEC;AAAF,CAAD,KAChBC,aAAA,OAAA;EAAMC,SAAS,EAAC;CAAhB,EACID,aAAA,CAACE,MAAD;EAAeD,SAAS,EAAC;EAA0BF,IAAI,EAAEA;CAAzD,CADJ;MAKSI,cAAc,GAAG,CAAC;EAAEC,QAAF;EAAYC,QAAZ;EAAsBJ;AAAtB,CAAD;EAC1B,MAAMK,IAAI,GAAGC,cAAc,EAA3B;EAEAP,SAAA,CAAgB;IACZ,IAAIK,QAAQ,IAAI,EAACC,IAAD,aAACA,IAAD,eAACA,IAAI,CAAED,QAAP,CAAhB,EAAiC;MAC7BC,IAAI,SAAJ,IAAAA,IAAI,WAAJ,YAAAA,IAAI,CAAEE,mBAAN;;GAFR,EAIG,CAACH,QAAD,CAJH;EAMA,OAAOI,EAAE,CACL,6FADK,EAEL,yEAFK,EAGL;IACI,QAAQH,IAAR,aAAQA,IAAR,uBAAQA,IAAI,CAAED,QADlB;IAEI,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,CAACiB,QAFX,EAGKV,QAAQ,IAAIlB,aAAA,CAACU,QAAD,MAAA,EAAWQ,QAAX,CAHjB,CADJ;;EAQA,IAAI,OAAOH,MAAP,KAAkB,UAAtB,EAAkC;IAC9BU,MAAM,GAAGV,MAAM,CAAC;MAAEc,OAAO,EAAEJ;KAAZ,CAAf;;;EAGJ,OAAOA,MAAP;AACH,CA3CmB;;;;"}
1
+ {"version":3,"file":"Item.js","sources":["../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { IconName } from '../../Icon/Icon';\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\nimport { useCurrentMenu } from '../Context';\nimport { DialogProps } from '../../Dialog/Dialog';\n\nexport const Icon = ({ name }) => (\n <span className=\"absolute left-0 ml-1\">\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\n </span>\n);\n\nexport const useItemStyling = ({ disabled, indented, className }) => {\n const menu = useCurrentMenu();\n\n React.useEffect(() => {\n if (indented && !menu?.indented) {\n menu?.registerIndentation();\n }\n }, [indented]);\n\n return cn(\n 'flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group',\n {\n 'pl-7': menu?.indented,\n 'pl-1.5': !menu?.indented,\n 'cursor-pointer hover:bg-grey-light text-black hover:text-black': !disabled,\n 'cursor-not-allowed hover:bg-white text-grey-dark': disabled,\n },\n className\n );\n};\n\nexport const Shortcut = props => {\n return <span {...props} className=\"text-grey-darkest ml-auto pl-3\" />;\n};\n\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n disabled?: boolean;\n icon?: IconName;\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n shortcut?: string;\n};\n\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\n const { dialog, icon, onClick, shortcut, ...otherProps } = props;\n const className = useItemStyling({\n disabled: props.disabled,\n indented: !!icon,\n className: props.className,\n });\n\n const disabled = props.disabled ?? props['aria-disabled'];\n\n let handleClick;\n\n // radix has a bug that does not disable clicks when disabled is set on items\n if (disabled) {\n handleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n };\n }\n\n const handleSelect = event => {\n if (onClick) {\n onClick(event);\n }\n\n if (props['aria-haspopup'] || typeof dialog === 'function') {\n event.preventDefault();\n }\n };\n\n let button = (\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\n {icon && <Icon name={icon} />}\n {props.children}\n {shortcut && <Shortcut>{shortcut}</Shortcut>}\n </DropdownMenuPrimitive.Item>\n );\n\n if (typeof dialog === 'function') {\n button = dialog({ trigger: button });\n }\n\n return button;\n});\n"],"names":["Icon","name","React","className","IconPrimitive","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Shortcut","props","Item","MenuItem","ref","dialog","icon","onClick","shortcut","otherProps","handleClick","event","preventDefault","stopPropagation","handleSelect","button","DropdownMenuPrimitive","onSelect","children","trigger"],"mappings":";;;;;;MAQaA,IAAI,GAAG,CAAC;EAAEC;AAAF,CAAD,KAChBC,aAAA,OAAA;EAAMC,SAAS,EAAC;CAAhB,EACID,aAAA,CAACE,MAAD;EAAeD,SAAS,EAAC;EAA0BF,IAAI,EAAEA;CAAzD,CADJ;MAKSI,cAAc,GAAG,CAAC;EAAEC,QAAF;EAAYC,QAAZ;EAAsBJ;AAAtB,CAAD;EAC1B,MAAMK,IAAI,GAAGC,cAAc,EAA3B;EAEAP,SAAA,CAAgB;IACZ,IAAIK,QAAQ,IAAI,EAACC,IAAD,aAACA,IAAD,eAACA,IAAI,CAAED,QAAP,CAAhB,EAAiC;MAC7BC,IAAI,SAAJ,IAAAA,IAAI,WAAJ,YAAAA,IAAI,CAAEE,mBAAN;;GAFR,EAIG,CAACH,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;IAAcV,GAAG,EAAEA;IAArH,EACKE,IAAI,IAAIhB,aAAA,CAACF,IAAD;IAAMC,IAAI,EAAEiB;GAAZ,CADb,EAEKL,KAAK,CAACiB,QAFX,EAGKV,QAAQ,IAAIlB,aAAA,CAACU,QAAD,MAAA,EAAWQ,QAAX,CAHjB,CADJ;;EAQA,IAAI,OAAOH,MAAP,KAAkB,UAAtB,EAAkC;IAC9BU,MAAM,GAAGV,MAAM,CAAC;MAAEc,OAAO,EAAEJ;KAAZ,CAAf;;;EAGJ,OAAOA,MAAP;AACH,CA3CmB;;;;"}
@@ -1,8 +1,8 @@
1
- import { createElement, useContext, createContext } from 'react';
1
+ import { useContext, createElement, createContext, forwardRef } from 'react';
2
2
  import cn from 'classnames';
3
- import { RadioGroup as RadioGroup$1, RadioItem as RadioItem$1, ItemIndicator } from '@radix-ui/react-dropdown-menu';
3
+ import { RadioItem as RadioItem$1, ItemIndicator, RadioGroup as RadioGroup$1 } from '@radix-ui/react-dropdown-menu';
4
4
  import { useItemStyling } from './Item.js';
5
- import { useRadioGroup, getRadioGroupItemValueAsString } from '../../RadioGroup/RadioGroup.js';
5
+ import { getRadioGroupItemValueAsString, useRadioGroup } from '../../RadioGroup/RadioGroup.js';
6
6
 
7
7
  const RadioItem = props => {
8
8
  const context = useContext(MenuRadioGroupContext);
@@ -30,7 +30,7 @@ const RadioItem = props => {
30
30
  const MenuRadioGroupContext = /*#__PURE__*/createContext({
31
31
  disabled: false
32
32
  });
33
- const RadioGroup = props => {
33
+ const RadioGroup = /*#__PURE__*/forwardRef(function MenuRadioItem(props) {
34
34
  const {
35
35
  context,
36
36
  props: otherProps
@@ -41,7 +41,7 @@ const RadioGroup = props => {
41
41
  }, createElement(RadioGroup$1, Object.assign({}, otherProps, {
42
42
  className: className
43
43
  })));
44
- };
44
+ });
45
45
  RadioGroup.Item = RadioItem;
46
46
 
47
47
  export { RadioGroup, RadioItem };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.js","sources":["../../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { getRadioGroupItemValueAsString, RadioGroupItemProps, RadioGroupProps, useRadioGroup } from '../../RadioGroup/RadioGroup';\nimport { useItemStyling } from './Item';\n\nexport type MenuRadioGroupItemProps = RadioGroupItemProps<HTMLDivElement>;\n\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const context = React.useContext(MenuRadioGroupContext);\n const { children, value, ...otherProps } = props;\n const disabled = context.disabled || props.disabled;\n const className = useItemStyling({\n disabled: disabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <DropdownMenuPrimitive.RadioItem\n {...otherProps}\n className={className}\n disabled={disabled}\n value={getRadioGroupItemValueAsString(value)}>\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current \" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n};\n\nconst MenuRadioGroupContext = React.createContext({ disabled: false });\n\nexport type MenuRadioGroupProps = RadioGroupProps;\n\nexport const RadioGroup = (props: MenuRadioGroupProps) => {\n const { context, props: otherProps } = useRadioGroup(props);\n const className = cn('flex flex-col', props.className);\n\n return (\n <MenuRadioGroupContext.Provider value={context}>\n <DropdownMenuPrimitive.RadioGroup {...otherProps} className={className} />\n </MenuRadioGroupContext.Provider>\n );\n};\nRadioGroup.Item = RadioItem;\n"],"names":["RadioItem","props","context","React","MenuRadioGroupContext","children","value","otherProps","disabled","className","useItemStyling","indented","DropdownMenuPrimitive","getRadioGroupItemValueAsString","RadioGroup","useRadioGroup","cn","Provider","Item"],"mappings":";;;;;;MAQaA,SAAS,GAAIC,KAAD;EACrB,MAAMC,OAAO,GAAGC,UAAA,CAAiBC,qBAAjB,CAAhB;EACA,MAAM;IAAEC,QAAF;IAAYC,KAAZ;IAAmB,GAAGC;MAAeN,KAA3C;EACA,MAAMO,QAAQ,GAAGN,OAAO,CAACM,QAAR,IAAoBP,KAAK,CAACO,QAA3C;EACA,MAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BF,QAAQ,EAAEA,QADmB;IAE7BG,QAAQ,EAAE,IAFmB;IAG7BF,SAAS,EAAER,KAAK,CAACQ;GAHW,CAAhC;EAMA,OACIN,aAAA,CAACS,WAAD,oBACQL;IACJE,SAAS,EAAEA;IACXD,QAAQ,EAAEA;IACVF,KAAK,EAAEO,8BAA8B,CAACP,KAAD;IAJzC,EAKIH,aAAA,CAACS,aAAD;IAAqCH,SAAS,EAAC;GAA/C,EACIN,aAAA,OAAA;IAAMM,SAAS,EAAC;GAAhB,CADJ,CALJ,EAQKJ,QARL,CADJ;AAYH;AAED,MAAMD,qBAAqB,gBAAGD,aAAA,CAAoB;EAAEK,QAAQ,EAAE;AAAZ,CAApB,CAA9B;MAIaM,UAAU,GAAIb,KAAD;EACtB,MAAM;IAAEC,OAAF;IAAWD,KAAK,EAAEM;MAAeQ,aAAa,CAACd,KAAD,CAApD;EACA,MAAMQ,SAAS,GAAGO,EAAE,CAAC,eAAD,EAAkBf,KAAK,CAACQ,SAAxB,CAApB;EAEA,OACIN,aAAA,CAACC,qBAAqB,CAACa,QAAvB;IAAgCX,KAAK,EAAEJ;GAAvC,EACIC,aAAA,CAACS,YAAD,oBAAsCL;IAAYE,SAAS,EAAEA;IAA7D,CADJ,CADJ;AAKH;AACDK,UAAU,CAACI,IAAX,GAAkBlB,SAAlB;;;;"}
1
+ {"version":3,"file":"RadioGroup.js","sources":["../../../../../src/components/Menu/components/RadioGroup.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { getRadioGroupItemValueAsString, RadioGroupItemProps, RadioGroupProps, useRadioGroup } from '../../RadioGroup/RadioGroup';\nimport { useItemStyling } from './Item';\n\nexport type MenuRadioGroupItemProps = RadioGroupItemProps<HTMLDivElement>;\n\nexport const RadioItem = (props: MenuRadioGroupItemProps) => {\n const context = React.useContext(MenuRadioGroupContext);\n const { children, value, ...otherProps } = props;\n const disabled = context.disabled || props.disabled;\n const className = useItemStyling({\n disabled: disabled,\n indented: true,\n className: props.className,\n });\n\n return (\n <DropdownMenuPrimitive.RadioItem\n {...otherProps}\n className={className}\n disabled={disabled}\n value={getRadioGroupItemValueAsString(value)}>\n <DropdownMenuPrimitive.ItemIndicator className=\"absolute left-0 ml-1.5\">\n <span className=\"ml-1 flex h-1.5 w-1.5 rounded-full bg-current \" />\n </DropdownMenuPrimitive.ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n};\n\nconst MenuRadioGroupContext = React.createContext({ disabled: false });\n\nexport type MenuRadioGroupProps = RadioGroupProps;\n\nexport type ForwardedMenuRadioGroupWithStatics = React.ForwardRefExoticComponent<\n MenuRadioGroupProps & React.RefAttributes<HTMLElement>\n> & {\n Item: React.FunctionComponent<MenuRadioGroupItemProps>;\n};\n\nexport const RadioGroup = React.forwardRef<HTMLDivElement, MenuRadioGroupProps>(function MenuRadioItem(props) {\n const { context, props: otherProps } = useRadioGroup(props);\n const className = cn('flex flex-col', props.className);\n\n return (\n <MenuRadioGroupContext.Provider value={context}>\n <DropdownMenuPrimitive.RadioGroup {...otherProps} className={className} />\n </MenuRadioGroupContext.Provider>\n );\n}) as ForwardedMenuRadioGroupWithStatics;\nRadioGroup.Item = RadioItem;\n"],"names":["RadioItem","props","context","React","MenuRadioGroupContext","children","value","otherProps","disabled","className","useItemStyling","indented","DropdownMenuPrimitive","getRadioGroupItemValueAsString","RadioGroup","MenuRadioItem","useRadioGroup","cn","Provider","Item"],"mappings":";;;;;;MAQaA,SAAS,GAAIC,KAAD;EACrB,MAAMC,OAAO,GAAGC,UAAA,CAAiBC,qBAAjB,CAAhB;EACA,MAAM;IAAEC,QAAF;IAAYC,KAAZ;IAAmB,GAAGC;MAAeN,KAA3C;EACA,MAAMO,QAAQ,GAAGN,OAAO,CAACM,QAAR,IAAoBP,KAAK,CAACO,QAA3C;EACA,MAAMC,SAAS,GAAGC,cAAc,CAAC;IAC7BF,QAAQ,EAAEA,QADmB;IAE7BG,QAAQ,EAAE,IAFmB;IAG7BF,SAAS,EAAER,KAAK,CAACQ;GAHW,CAAhC;EAMA,OACIN,aAAA,CAACS,WAAD,oBACQL;IACJE,SAAS,EAAEA;IACXD,QAAQ,EAAEA;IACVF,KAAK,EAAEO,8BAA8B,CAACP,KAAD;IAJzC,EAKIH,aAAA,CAACS,aAAD;IAAqCH,SAAS,EAAC;GAA/C,EACIN,aAAA,OAAA;IAAMM,SAAS,EAAC;GAAhB,CADJ,CALJ,EAQKJ,QARL,CADJ;AAYH;AAED,MAAMD,qBAAqB,gBAAGD,aAAA,CAAoB;EAAEK,QAAQ,EAAE;AAAZ,CAApB,CAA9B;MAUaM,UAAU,gBAAGX,UAAA,CAAsD,SAASY,aAAT,CAAuBd,KAAvB;EAC5E,MAAM;IAAEC,OAAF;IAAWD,KAAK,EAAEM;MAAeS,aAAa,CAACf,KAAD,CAApD;EACA,MAAMQ,SAAS,GAAGQ,EAAE,CAAC,eAAD,EAAkBhB,KAAK,CAACQ,SAAxB,CAApB;EAEA,OACIN,aAAA,CAACC,qBAAqB,CAACc,QAAvB;IAAgCZ,KAAK,EAAEJ;GAAvC,EACIC,aAAA,CAACS,YAAD,oBAAsCL;IAAYE,SAAS,EAAEA;IAA7D,CADJ,CADJ;AAKH,CATyB;AAU1BK,UAAU,CAACK,IAAX,GAAkBnB,SAAlB;;;;"}
@@ -24,7 +24,7 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
24
24
  transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
25
25
  }
26
26
  }, createElement(Arrow, {
27
- className: "fill-purple stroke-purple"
27
+ className: "fill-purple stroke-purple -mt-px"
28
28
  }), title)));
29
29
  });
30
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef(function Tooltip(props: TooltipProps, ref: React.Ref<HTMLElement>) {\n const { title, children, placement, ...otherProps } = props;\n\n return (\n <TooltipPrimitive.Root delayDuration={50}>\n <TooltipPrimitive.Trigger asChild ref={ref as any}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content {...otherProps} asChild side={placement} sideOffset={3}>\n <div\n className=\"wcag-purple xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold opacity-90\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}>\n <TooltipPrimitive.Arrow className=\"fill-purple stroke-purple\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Root>\n );\n});\n"],"names":["Tooltip","React","props","ref","title","children","placement","otherProps","TooltipPrimitive","delayDuration","asChild","side","sideOffset","className","style","transformOrigin"],"mappings":";;;MAeaA,OAAO,gBAAGC,UAAA,CAAiB,SAASD,OAAT,CAAiBE,KAAjB,EAAsCC,GAAtC;EACpC,MAAM;IAAEC,KAAF;IAASC,QAAT;IAAmBC,SAAnB;IAA8B,GAAGC;MAAeL,KAAtD;EAEA,OACID,aAAA,CAACO,IAAD;IAAuBC,aAAa,EAAE;GAAtC,EACIR,aAAA,CAACO,OAAD;IAA0BE,OAAO;IAACP,GAAG,EAAEA;GAAvC,EACKE,QADL,CADJ,EAIIJ,aAAA,CAACO,OAAD,oBAA8BD;IAAYG,OAAO;IAACC,IAAI,EAAEL;IAAWM,UAAU,EAAE;IAA/E,EACIX,aAAA,MAAA;IACIY,SAAS,EAAC;iBACA;IACVC,KAAK,EAAE;MACHC,eAAe,EAAE;;GAJzB,EAMId,aAAA,CAACO,KAAD;IAAwBK,SAAS,EAAC;GAAlC,CANJ,EAOKT,KAPL,CADJ,CAJJ,CADJ;AAkBH,CArBsB;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef(function Tooltip(props: TooltipProps, ref: React.Ref<HTMLElement>) {\n const { title, children, placement, ...otherProps } = props;\n\n return (\n <TooltipPrimitive.Root delayDuration={50}>\n <TooltipPrimitive.Trigger asChild ref={ref as any}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content {...otherProps} asChild side={placement} sideOffset={3}>\n <div\n className=\"wcag-purple xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold opacity-90\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}>\n <TooltipPrimitive.Arrow className=\"fill-purple stroke-purple -mt-px\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Root>\n );\n});\n"],"names":["Tooltip","React","props","ref","title","children","placement","otherProps","TooltipPrimitive","delayDuration","asChild","side","sideOffset","className","style","transformOrigin"],"mappings":";;;MAeaA,OAAO,gBAAGC,UAAA,CAAiB,SAASD,OAAT,CAAiBE,KAAjB,EAAsCC,GAAtC;EACpC,MAAM;IAAEC,KAAF;IAASC,QAAT;IAAmBC,SAAnB;IAA8B,GAAGC;MAAeL,KAAtD;EAEA,OACID,aAAA,CAACO,IAAD;IAAuBC,aAAa,EAAE;GAAtC,EACIR,aAAA,CAACO,OAAD;IAA0BE,OAAO;IAACP,GAAG,EAAEA;GAAvC,EACKE,QADL,CADJ,EAIIJ,aAAA,CAACO,OAAD,oBAA8BD;IAAYG,OAAO;IAACC,IAAI,EAAEL;IAAWM,UAAU,EAAE;IAA/E,EACIX,aAAA,MAAA;IACIY,SAAS,EAAC;iBACA;IACVC,KAAK,EAAE;MACHC,eAAe,EAAE;;GAJzB,EAMId,aAAA,CAACO,KAAD;IAAwBK,SAAS,EAAC;GAAlC,CANJ,EAOKT,KAPL,CADJ,CAJJ,CADJ;AAkBH,CArBsB;;;;"}
@@ -3459,7 +3459,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(props, ref) {
3459
3459
  transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
3460
3460
  }
3461
3461
  }, React.createElement(TooltipPrimitive.Arrow, {
3462
- className: "fill-purple stroke-purple"
3462
+ className: "fill-purple stroke-purple -mt-px"
3463
3463
  }), title)));
3464
3464
  });
3465
3465
 
@@ -6491,11 +6491,11 @@ const useItemStyling = ({
6491
6491
  menu === null || menu === void 0 ? void 0 : menu.registerIndentation();
6492
6492
  }
6493
6493
  }, [indented]);
6494
- return cn('flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group', 'text-black aria-disabled:text-grey hover:bg-grey-light hover:text-black', {
6494
+ return cn('flex items-center justify-start h-8 pr-1.5 relative rounded w-full focus:outline-none group', {
6495
6495
  'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
6496
6496
  'pl-1.5': !(menu !== null && menu !== void 0 && menu.indented),
6497
- 'cursor-pointer': !disabled,
6498
- 'cursor-not-allowed': disabled
6497
+ 'cursor-pointer hover:bg-grey-light text-black hover:text-black': !disabled,
6498
+ 'cursor-not-allowed hover:bg-white text-grey-dark': disabled
6499
6499
  }, className);
6500
6500
  };
6501
6501
  const Shortcut = props => {
@@ -6602,7 +6602,7 @@ const Trigger$4 = /*#__PURE__*/React.forwardRef(function MenuTrigger(props, ref)
6602
6602
  }));
6603
6603
  });
6604
6604
 
6605
- const Checkbox$1 = props => {
6605
+ const Checkbox$1 = /*#__PURE__*/React.forwardRef(function MenuCheckboxItem(props) {
6606
6606
  const {
6607
6607
  checked,
6608
6608
  children,
@@ -6624,7 +6624,7 @@ const Checkbox$1 = props => {
6624
6624
  name: "tick",
6625
6625
  className: "-ml-px !h-4 !w-4"
6626
6626
  })), children);
6627
- };
6627
+ });
6628
6628
 
6629
6629
  const getRadioGroupItemValueAsString = value => String(value !== null && value !== void 0 ? value : '');
6630
6630
  const findByValue$1 = (values, valueAsString) => values.find(value => getRadioGroupItemValueAsString(value) === valueAsString);
@@ -6753,7 +6753,7 @@ const RadioItem = props => {
6753
6753
  const MenuRadioGroupContext = /*#__PURE__*/React.createContext({
6754
6754
  disabled: false
6755
6755
  });
6756
- const RadioGroup$1 = props => {
6756
+ const RadioGroup$1 = /*#__PURE__*/React.forwardRef(function MenuRadioItem(props) {
6757
6757
  const {
6758
6758
  context,
6759
6759
  props: otherProps
@@ -6764,7 +6764,7 @@ const RadioGroup$1 = props => {
6764
6764
  }, React.createElement(DropdownMenuPrimitive.RadioGroup, Object.assign({}, otherProps, {
6765
6765
  className: className
6766
6766
  })));
6767
- };
6767
+ });
6768
6768
  RadioGroup$1.Item = RadioItem;
6769
6769
 
6770
6770
  const Separator = () => {
@@ -6773,7 +6773,7 @@ const Separator = () => {
6773
6773
  });
6774
6774
  };
6775
6775
 
6776
- const Header = props => {
6776
+ const Header = /*#__PURE__*/React.forwardRef(function MenuHeader(props) {
6777
6777
  const menu = useCurrentMenu();
6778
6778
  const className = cn('flex items-center justify-start h-7 pr-1.5 text-xs text-grey-darkest', {
6779
6779
  'pl-7': menu === null || menu === void 0 ? void 0 : menu.indented,
@@ -6782,9 +6782,9 @@ const Header = props => {
6782
6782
  return React.createElement(DropdownMenuPrimitive.Label, Object.assign({}, props, {
6783
6783
  className: className
6784
6784
  }));
6785
- };
6785
+ });
6786
6786
 
6787
- const Menu$1 = externalProps => {
6787
+ const Menu$1 = /*#__PURE__*/React.forwardRef(function Menu(externalProps, ref) {
6788
6788
  const {
6789
6789
  children,
6790
6790
  trigger,
@@ -6806,8 +6806,10 @@ const Menu$1 = externalProps => {
6806
6806
  modal: false,
6807
6807
  open: open,
6808
6808
  onOpenChange: setOpen
6809
- }), trigger && React.createElement(Trigger$4, null, trigger), children));
6810
- };
6809
+ }), trigger && React.createElement(Trigger$4, {
6810
+ ref: ref
6811
+ }, trigger), children));
6812
+ });
6811
6813
  Menu$1.Trigger = Trigger$4;
6812
6814
  Menu$1.Content = Content$6;
6813
6815
  Menu$1.Item = Item$1;