@economic/taco 1.12.2 → 1.12.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,6 +1,6 @@
1
1
  import { createElement, forwardRef } from 'react';
2
2
  import cn from 'classnames';
3
- import { Root, Trigger as Trigger$1 } from '@radix-ui/react-hover-card';
3
+ import { Root, Trigger as Trigger$1, Portal } from '@radix-ui/react-hover-card';
4
4
  import { UnstyledContent, UnstyledArrow } from './Primitives.js';
5
5
 
6
6
  const Trigger = /*#__PURE__*/forwardRef(function HoverCardTrigger(props, ref) {
@@ -15,13 +15,13 @@ const Content = /*#__PURE__*/forwardRef(function HoverCardContent(externalProps,
15
15
  ...props
16
16
  } = externalProps;
17
17
  const className = cn('bg-white focus:border-blue-light rounded p-3 yt-shadow min-w-[theme(spacing.40)] max-w-[theme(spacing.96)]', props.className);
18
- return /*#__PURE__*/createElement(UnstyledContent, Object.assign({}, props, {
18
+ return /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(UnstyledContent, Object.assign({}, props, {
19
19
  className: className,
20
20
  placement: placement,
21
21
  ref: ref
22
22
  }), props.children, /*#__PURE__*/createElement(UnstyledArrow, {
23
23
  className: "text-white"
24
- }));
24
+ })));
25
25
  });
26
26
  const HoverCard = props => {
27
27
  return /*#__PURE__*/createElement(Root, Object.assign({}, props, {
@@ -1 +1 @@
1
- {"version":3,"file":"HoverCard.js","sources":["../../../../src/components/HoverCard/HoverCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { Placement } from '../..';\nimport { UnstyledArrow, UnstyledContent } from './Primitives';\n\nexport type HoverCardTriggerProps = React.HTMLAttributes<HTMLAnchorElement>;\nconst Trigger = React.forwardRef(function HoverCardTrigger(props: HoverCardTriggerProps, ref: React.Ref<HTMLAnchorElement>) {\n return <HoverCardPrimitive.Trigger {...props} asChild ref={ref} />;\n});\n\nexport type HoverCardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Set the position of the HoverCard relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function HoverCardContent(externalProps: HoverCardContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement, ...props } = externalProps;\n const className = cn(\n 'bg-white focus:border-blue-light rounded p-3 yt-shadow min-w-[theme(spacing.40)] max-w-[theme(spacing.96)]',\n props.className\n );\n\n return (\n <UnstyledContent {...props} className={className} placement={placement} ref={ref}>\n {props.children}\n <UnstyledArrow className=\"text-white\" />\n </UnstyledContent>\n );\n});\n\nexport type HoverCardProps = React.PropsWithChildren<{}>;\n\nexport const HoverCard = (props: HoverCardProps) => {\n return <HoverCardPrimitive.Root {...props} openDelay={300} />;\n};\nHoverCard.Trigger = Trigger;\nHoverCard.Content = Content;\n"],"names":["Trigger","React","HoverCardTrigger","props","ref","HoverCardPrimitive","asChild","Content","HoverCardContent","externalProps","placement","className","cn","UnstyledContent","children","UnstyledArrow","HoverCard","openDelay"],"mappings":";;;;;AAOA,MAAMA,OAAO,gBAAGC,UAAA,CAAiB,SAASC,gBAAT,CAA0BC,KAA1B,EAAwDC,GAAxD;EAC7B,oBAAOH,aAAA,CAACI,SAAD,oBAAgCF;IAAOG,OAAO;IAACF,GAAG,EAAEA;IAApD,CAAP;AACH,CAFe,CAAhB;AAQA,MAAMG,OAAO,gBAAGN,UAAA,CAAiB,SAASO,gBAAT,CAA0BC,aAA1B,EAAgEL,GAAhE;EAC7B,MAAM;IAAEM,SAAF;IAAa,GAAGP;MAAUM,aAAhC;EACA,MAAME,SAAS,GAAGC,EAAE,CAChB,4GADgB,EAEhBT,KAAK,CAACQ,SAFU,CAApB;EAKA,oBACIV,aAAA,CAACY,eAAD,oBAAqBV;IAAOQ,SAAS,EAAEA;IAAWD,SAAS,EAAEA;IAAWN,GAAG,EAAEA;IAA7E,EACKD,KAAK,CAACW,QADX,eAEIb,aAAA,CAACc,aAAD;IAAeJ,SAAS,EAAC;GAAzB,CAFJ,CADJ;AAMH,CAbe,CAAhB;MAiBaK,SAAS,GAAIb,KAAD;EACrB,oBAAOF,aAAA,CAACI,IAAD,oBAA6BF;IAAOc,SAAS,EAAE;IAA/C,CAAP;AACH;AACDD,SAAS,CAAChB,OAAV,GAAoBA,OAApB;AACAgB,SAAS,CAACT,OAAV,GAAoBA,OAApB;;;;"}
1
+ {"version":3,"file":"HoverCard.js","sources":["../../../../src/components/HoverCard/HoverCard.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as HoverCardPrimitive from '@radix-ui/react-hover-card';\nimport { Placement } from '../..';\nimport { UnstyledArrow, UnstyledContent } from './Primitives';\n\nexport type HoverCardTriggerProps = React.HTMLAttributes<HTMLAnchorElement>;\nconst Trigger = React.forwardRef(function HoverCardTrigger(props: HoverCardTriggerProps, ref: React.Ref<HTMLAnchorElement>) {\n return <HoverCardPrimitive.Trigger {...props} asChild ref={ref} />;\n});\n\nexport type HoverCardContentProps = React.HTMLAttributes<HTMLDivElement> & {\n /** Set the position of the HoverCard relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\nconst Content = React.forwardRef(function HoverCardContent(externalProps: HoverCardContentProps, ref: React.Ref<HTMLDivElement>) {\n const { placement, ...props } = externalProps;\n const className = cn(\n 'bg-white focus:border-blue-light rounded p-3 yt-shadow min-w-[theme(spacing.40)] max-w-[theme(spacing.96)]',\n props.className\n );\n\n return (\n <HoverCardPrimitive.Portal>\n <UnstyledContent {...props} className={className} placement={placement} ref={ref}>\n {props.children}\n <UnstyledArrow className=\"text-white\" />\n </UnstyledContent>\n </HoverCardPrimitive.Portal>\n );\n});\n\nexport type HoverCardProps = React.PropsWithChildren<{}>;\n\nexport const HoverCard = (props: HoverCardProps) => {\n return <HoverCardPrimitive.Root {...props} openDelay={300} />;\n};\nHoverCard.Trigger = Trigger;\nHoverCard.Content = Content;\n"],"names":["Trigger","React","HoverCardTrigger","props","ref","HoverCardPrimitive","asChild","Content","HoverCardContent","externalProps","placement","className","cn","UnstyledContent","children","UnstyledArrow","HoverCard","openDelay"],"mappings":";;;;;AAOA,MAAMA,OAAO,gBAAGC,UAAA,CAAiB,SAASC,gBAAT,CAA0BC,KAA1B,EAAwDC,GAAxD;EAC7B,oBAAOH,aAAA,CAACI,SAAD,oBAAgCF;IAAOG,OAAO;IAACF,GAAG,EAAEA;IAApD,CAAP;AACH,CAFe,CAAhB;AAQA,MAAMG,OAAO,gBAAGN,UAAA,CAAiB,SAASO,gBAAT,CAA0BC,aAA1B,EAAgEL,GAAhE;EAC7B,MAAM;IAAEM,SAAF;IAAa,GAAGP;MAAUM,aAAhC;EACA,MAAME,SAAS,GAAGC,EAAE,CAChB,4GADgB,EAEhBT,KAAK,CAACQ,SAFU,CAApB;EAKA,oBACIV,aAAA,CAACI,MAAD,MAAA,eACIJ,aAAA,CAACY,eAAD,oBAAqBV;IAAOQ,SAAS,EAAEA;IAAWD,SAAS,EAAEA;IAAWN,GAAG,EAAEA;IAA7E,EACKD,KAAK,CAACW,QADX,eAEIb,aAAA,CAACc,aAAD;IAAeJ,SAAS,EAAC;GAAzB,CAFJ,CADJ,CADJ;AAQH,CAfe,CAAhB;MAmBaK,SAAS,GAAIb,KAAD;EACrB,oBAAOF,aAAA,CAACI,IAAD,oBAA6BF;IAAOc,SAAS,EAAE;IAA/C,CAAP;AACH;AACDD,SAAS,CAAChB,OAAV,GAAoBA,OAApB;AACAgB,SAAS,CAACT,OAAV,GAAoBA,OAApB;;;;"}
@@ -12,7 +12,7 @@ const Content = /*#__PURE__*/forwardRef(function MenuContent(props, ref) {
12
12
  placement: side,
13
13
  ...otherProps
14
14
  } = props;
15
- const className = cn('border rounded block outline-none p-1 wcag-white border-grey yt-shadow', props.className);
15
+ const className = cn('border rounded block outline-none p-1 wcag-white border-grey yt-shadow z-[999]', props.className);
16
16
  return /*#__PURE__*/createElement(Content$1, Object.assign({}, otherProps, {
17
17
  align: "start",
18
18
  className: className,
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { Placement } from '../../../types';\nimport { useProxiedRef } from '../../../utils/hooks/useProxiedRef';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuContentProps = Omit<DropdownMenuPrimitive.DropdownMenuContentProps, 'children' | 'side'> & {\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useProxiedRef<any>(ref);\n const menu = useCurrentMenu();\n const { children, placement: side, ...otherProps } = props;\n const className = cn('border rounded block outline-none p-1 wcag-white border-grey yt-shadow', props.className);\n\n return (\n <DropdownMenuPrimitive.Content\n {...otherProps}\n align=\"start\"\n className={className}\n data-taco=\"menu\"\n side={side}\n sideOffset={2}\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {children}\n </DropdownMenuPrimitive.Content>\n );\n});\n"],"names":["Content","React","MenuContent","props","ref","internalRef","useProxiedRef","menu","useCurrentMenu","children","placement","side","otherProps","className","cn","DropdownMenuPrimitive","align","sideOffset","style","minWidth"],"mappings":";;;;;;MAaaA,OAAO,gBAAGC,UAAA,CAAiB,SAASC,WAAT,CAAqBC,KAArB,EAA8CC,GAA9C;EACpC,MAAMC,WAAW,GAAGC,aAAa,CAAMF,GAAN,CAAjC;EACA,MAAMG,IAAI,GAAGC,cAAc,EAA3B;EACA,MAAM;IAAEC,QAAF;IAAYC,SAAS,EAAEC,IAAvB;IAA6B,GAAGC;MAAeT,KAArD;EACA,MAAMU,SAAS,GAAGC,EAAE,CAAC,wEAAD,EAA2EX,KAAK,CAACU,SAAjF,CAApB;EAEA,oBACIZ,aAAA,CAACc,SAAD,oBACQH;IACJI,KAAK,EAAC;IACNH,SAAS,EAAEA;iBACD;IACVF,IAAI,EAAEA;IACNM,UAAU,EAAE;IACZC,KAAK,EAAE;MAAEC,QAAQ,EAAEZ,IAAF,aAAEA,IAAF,uBAAEA,IAAI,CAAEY;;IACzBf,GAAG,EAAEC;IART,EASKI,QATL,CADJ;AAaH,CAnBsB;;;;"}
1
+ {"version":3,"file":"Content.js","sources":["../../../../../src/components/Menu/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport cn from 'classnames';\nimport { Placement } from '../../../types';\nimport { useProxiedRef } from '../../../utils/hooks/useProxiedRef';\nimport { useCurrentMenu } from '../Context';\n\nexport type MenuContentProps = Omit<DropdownMenuPrimitive.DropdownMenuContentProps, 'children' | 'side'> & {\n children: React.ReactNode;\n /** Set the position of the Menu relative to its trigger. Default value is `bottom` */\n placement?: Placement;\n};\n\nexport const Content = React.forwardRef(function MenuContent(props: MenuContentProps, ref: React.Ref<HTMLDivElement>) {\n const internalRef = useProxiedRef<any>(ref);\n const menu = useCurrentMenu();\n const { children, placement: side, ...otherProps } = props;\n const className = cn('border rounded block outline-none p-1 wcag-white border-grey yt-shadow z-[999]', props.className);\n\n return (\n <DropdownMenuPrimitive.Content\n {...otherProps}\n align=\"start\"\n className={className}\n data-taco=\"menu\"\n side={side}\n sideOffset={2}\n style={{ minWidth: menu?.minWidth }}\n ref={internalRef}>\n {children}\n </DropdownMenuPrimitive.Content>\n );\n});\n"],"names":["Content","React","MenuContent","props","ref","internalRef","useProxiedRef","menu","useCurrentMenu","children","placement","side","otherProps","className","cn","DropdownMenuPrimitive","align","sideOffset","style","minWidth"],"mappings":";;;;;;MAaaA,OAAO,gBAAGC,UAAA,CAAiB,SAASC,WAAT,CAAqBC,KAArB,EAA8CC,GAA9C;EACpC,MAAMC,WAAW,GAAGC,aAAa,CAAMF,GAAN,CAAjC;EACA,MAAMG,IAAI,GAAGC,cAAc,EAA3B;EACA,MAAM;IAAEC,QAAF;IAAYC,SAAS,EAAEC,IAAvB;IAA6B,GAAGC;MAAeT,KAArD;EACA,MAAMU,SAAS,GAAGC,EAAE,CAAC,gFAAD,EAAmFX,KAAK,CAACU,SAAzF,CAApB;EAEA,oBACIZ,aAAA,CAACc,SAAD,oBACQH;IACJI,KAAK,EAAC;IACNH,SAAS,EAAEA;iBACD;IACVF,IAAI,EAAEA;IACNM,UAAU,EAAE;IACZC,KAAK,EAAE;MAAEC,QAAQ,EAAEZ,IAAF,aAAEA,IAAF,uBAAEA,IAAI,CAAEY;;IACzBf,GAAG,EAAEC;IART,EASKI,QATL,CADJ;AAaH,CAnBsB;;;;"}
@@ -6209,13 +6209,13 @@ const Content$6 = /*#__PURE__*/React.forwardRef(function HoverCardContent(extern
6209
6209
  ...props
6210
6210
  } = externalProps;
6211
6211
  const className = cn('bg-white focus:border-blue-light rounded p-3 yt-shadow min-w-[theme(spacing.40)] max-w-[theme(spacing.96)]', props.className);
6212
- return /*#__PURE__*/React.createElement(UnstyledContent$1, Object.assign({}, props, {
6212
+ return /*#__PURE__*/React.createElement(HoverCardPrimitive.Portal, null, /*#__PURE__*/React.createElement(UnstyledContent$1, Object.assign({}, props, {
6213
6213
  className: className,
6214
6214
  placement: placement,
6215
6215
  ref: ref
6216
6216
  }), props.children, /*#__PURE__*/React.createElement(UnstyledArrow$1, {
6217
6217
  className: "text-white"
6218
- }));
6218
+ })));
6219
6219
  });
6220
6220
  const HoverCard = props => {
6221
6221
  return /*#__PURE__*/React.createElement(HoverCardPrimitive.Root, Object.assign({}, props, {
@@ -6670,7 +6670,7 @@ const Content$7 = /*#__PURE__*/React.forwardRef(function MenuContent(props, ref)
6670
6670
  placement: side,
6671
6671
  ...otherProps
6672
6672
  } = props;
6673
- const className = cn('border rounded block outline-none p-1 wcag-white border-grey yt-shadow', props.className);
6673
+ const className = cn('border rounded block outline-none p-1 wcag-white border-grey yt-shadow z-[999]', props.className);
6674
6674
  return /*#__PURE__*/React.createElement(DropdownMenuPrimitive.Content, Object.assign({}, otherProps, {
6675
6675
  align: "start",
6676
6676
  className: className,