@fuf-stack/pixels 0.42.2 → 0.43.1

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.
Files changed (67) hide show
  1. package/dist/Button/index.cjs +2 -2
  2. package/dist/Button/index.d.cts +2 -2
  3. package/dist/Button/index.d.ts +2 -2
  4. package/dist/Button/index.js +1 -1
  5. package/dist/{Button-Bm0yKM7X.d.cts → Button-DykH6Lmz.d.cts} +12 -10
  6. package/dist/{Button-Bm0yKM7X.d.ts → Button-DykH6Lmz.d.ts} +12 -10
  7. package/dist/Json/index.cjs +3 -3
  8. package/dist/Json/index.js +2 -2
  9. package/dist/Popover/index.cjs +2 -2
  10. package/dist/Popover/index.d.cts +3 -3
  11. package/dist/Popover/index.d.ts +3 -3
  12. package/dist/Popover/index.js +1 -1
  13. package/dist/{Popover-DajWpbPN.d.cts → Popover-B7Bc2FWo.d.ts} +33 -1
  14. package/dist/{Popover-DcZ3qt-u.d.ts → Popover-G9P0rR-7.d.cts} +33 -1
  15. package/dist/Progress/index.cjs +2 -2
  16. package/dist/Progress/index.d.cts +2 -2
  17. package/dist/Progress/index.d.ts +2 -2
  18. package/dist/Progress/index.js +1 -1
  19. package/dist/{Progress-7yXUVioO.d.cts → Progress-CR_BcIKV.d.cts} +3 -1
  20. package/dist/{Progress-7yXUVioO.d.ts → Progress-CR_BcIKV.d.ts} +3 -1
  21. package/dist/ProgressCircular/index.cjs +2 -2
  22. package/dist/ProgressCircular/index.d.cts +2 -2
  23. package/dist/ProgressCircular/index.d.ts +2 -2
  24. package/dist/ProgressCircular/index.js +1 -1
  25. package/dist/{ProgressCircular-BrcYFzAa.d.cts → ProgressCircular-D9VbRNdF.d.cts} +3 -1
  26. package/dist/{ProgressCircular-BrcYFzAa.d.ts → ProgressCircular-D9VbRNdF.d.ts} +3 -1
  27. package/dist/Tooltip/index.cjs +2 -2
  28. package/dist/Tooltip/index.js +1 -1
  29. package/dist/{chunk-J63YGHTG.cjs → chunk-77THLTVP.cjs} +3 -3
  30. package/dist/{chunk-J63YGHTG.cjs.map → chunk-77THLTVP.cjs.map} +1 -1
  31. package/dist/{chunk-FLPLJTAC.cjs → chunk-AN7A66NS.cjs} +4 -2
  32. package/dist/chunk-AN7A66NS.cjs.map +1 -0
  33. package/dist/{chunk-VES4SOJH.js → chunk-ESLZ4HYA.js} +6 -5
  34. package/dist/chunk-ESLZ4HYA.js.map +1 -0
  35. package/dist/{chunk-5TOE75VE.js → chunk-JKZIVTWA.js} +14 -10
  36. package/dist/chunk-JKZIVTWA.js.map +1 -0
  37. package/dist/{chunk-OGK2OQXX.js → chunk-JORMLHKF.js} +4 -2
  38. package/dist/chunk-JORMLHKF.js.map +1 -0
  39. package/dist/{chunk-VRPX6QUG.js → chunk-Q3WI7NPI.js} +2 -2
  40. package/dist/{chunk-MAKWBTTW.js → chunk-RELR2OCI.js} +4 -2
  41. package/dist/chunk-RELR2OCI.js.map +1 -0
  42. package/dist/{chunk-EAX5J2I2.cjs → chunk-SYPFLG7E.cjs} +14 -10
  43. package/dist/chunk-SYPFLG7E.cjs.map +1 -0
  44. package/dist/{chunk-YXWPOEX6.js → chunk-TG2HRVJX.js} +2 -2
  45. package/dist/chunk-TG2HRVJX.js.map +1 -0
  46. package/dist/{chunk-HENURJFU.cjs → chunk-W2EOAUKE.cjs} +6 -5
  47. package/dist/chunk-W2EOAUKE.cjs.map +1 -0
  48. package/dist/{chunk-25AJSW5E.cjs → chunk-XKJOXUWH.cjs} +2 -2
  49. package/dist/chunk-XKJOXUWH.cjs.map +1 -0
  50. package/dist/{chunk-PK723NKO.cjs → chunk-XOCP745X.cjs} +4 -2
  51. package/dist/chunk-XOCP745X.cjs.map +1 -0
  52. package/dist/index.cjs +7 -7
  53. package/dist/index.d.cts +4 -4
  54. package/dist/index.d.ts +4 -4
  55. package/dist/index.js +6 -6
  56. package/package.json +5 -5
  57. package/dist/chunk-25AJSW5E.cjs.map +0 -1
  58. package/dist/chunk-5TOE75VE.js.map +0 -1
  59. package/dist/chunk-EAX5J2I2.cjs.map +0 -1
  60. package/dist/chunk-FLPLJTAC.cjs.map +0 -1
  61. package/dist/chunk-HENURJFU.cjs.map +0 -1
  62. package/dist/chunk-MAKWBTTW.js.map +0 -1
  63. package/dist/chunk-OGK2OQXX.js.map +0 -1
  64. package/dist/chunk-PK723NKO.cjs.map +0 -1
  65. package/dist/chunk-VES4SOJH.js.map +0 -1
  66. package/dist/chunk-YXWPOEX6.js.map +0 -1
  67. /package/dist/{chunk-VRPX6QUG.js.map → chunk-Q3WI7NPI.js.map} +0 -0
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  Progress_default,
3
3
  progressVariants
4
- } from "./chunk-OGK2OQXX.js";
4
+ } from "./chunk-JORMLHKF.js";
5
5
  import {
6
6
  ProgressCircular_default,
7
7
  progressCircularVariants
8
- } from "./chunk-VES4SOJH.js";
8
+ } from "./chunk-ESLZ4HYA.js";
9
9
  import {
10
10
  Table_default,
11
11
  tableVariants
@@ -22,7 +22,7 @@ import {
22
22
  } from "./chunk-ZMEVGJBC.js";
23
23
  import {
24
24
  Tooltip_default
25
- } from "./chunk-YXWPOEX6.js";
25
+ } from "./chunk-TG2HRVJX.js";
26
26
  import {
27
27
  useDebounce,
28
28
  useIsInitialRenderCycle,
@@ -45,7 +45,7 @@ import {
45
45
  } from "./chunk-VBOUHWXM.js";
46
46
  import {
47
47
  Json_default
48
- } from "./chunk-VRPX6QUG.js";
48
+ } from "./chunk-Q3WI7NPI.js";
49
49
  import {
50
50
  Label_default,
51
51
  labelVariants
@@ -59,7 +59,7 @@ import {
59
59
  } from "./chunk-RW4WTSLJ.js";
60
60
  import {
61
61
  Popover_default
62
- } from "./chunk-5TOE75VE.js";
62
+ } from "./chunk-JKZIVTWA.js";
63
63
  import "./chunk-EQVC4PJE.js";
64
64
  import {
65
65
  Accordion_default,
@@ -85,7 +85,7 @@ import {
85
85
  import {
86
86
  Button_default,
87
87
  buttonVariants
88
- } from "./chunk-MAKWBTTW.js";
88
+ } from "./chunk-RELR2OCI.js";
89
89
  import "./chunk-J7N2552D.js";
90
90
  export {
91
91
  Accordion_default as Accordion,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fuf-stack/pixels",
3
3
  "description": "fuf core react component library",
4
4
  "author": "Hannes Tiede",
5
- "version": "0.42.2",
5
+ "version": "0.43.1",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.js",
@@ -180,10 +180,10 @@
180
180
  "@heroui/tabs": "2.2.14",
181
181
  "@heroui/toast": "2.0.7",
182
182
  "@heroui/tooltip": "2.2.14",
183
- "framer-motion": "12.8.0",
183
+ "framer-motion": "12.9.2",
184
184
  "next-themes": "0.4.6",
185
185
  "react-icons": "5.5.0",
186
- "@fuf-stack/pixel-utils": "0.5.3"
186
+ "@fuf-stack/pixel-utils": "0.5.4"
187
187
  },
188
188
  "devDependencies": {
189
189
  "@types/debug": "4.1.12",
@@ -193,9 +193,9 @@
193
193
  "react": "19.0.0",
194
194
  "react-dom": "19.0.0",
195
195
  "@repo/tailwind-config": "0.0.1",
196
- "@repo/storybook-config": "0.0.1",
196
+ "@repo/tsup-config": "0.0.1",
197
197
  "@repo/vite-config": "0.0.1",
198
- "@repo/tsup-config": "0.0.1"
198
+ "@repo/storybook-config": "0.0.1"
199
199
  },
200
200
  "scripts": {
201
201
  "build": "tsup --config node_modules/@repo/tsup-config/config.ts --dts-resolve",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-25AJSW5E.cjs","../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":"AAAA;ACIA,0CAAuC;AAEvC,oDAAyC;AAqEnC,+CAAA;AAlEC,IAAM,gBAAA,EAAkB,4BAAA;AAAG,EAChC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,OAAA,EAAS,EAAA;AAAA,IACT,OAAA,EAAS;AAAA,EACX;AACF,CAAC,CAAA;AA+BD,IAAM,QAAA,EAAU,CAAC;AAAA,EACf,QAAA;AAAA,EACA,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,WAAA,EAAa,GAAA;AAAA,EACb,iBAAA,EAAmB,CAAA;AAAA,EACnB,OAAA;AAAA,EACA,YAAA,EAAc,KAAA;AAAA,EACd,MAAA,EAAQ,CAAA;AAAA,EACR,aAAA,EAAe,KAAA,CAAA;AAAA,EACf,UAAA,EAAY;AACd,CAAA,EAAA,GAAoB;AAElB,EAAA,MAAM,SAAA,EAAW,eAAA,CAAgB,CAAA;AACjC,EAAA,MAAM,WAAA,EAAa,8CAAA,QAAqB,EAAU,UAAA,EAAY,MAAM,CAAA;AAEpE,EAAA,uBACE,6BAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,UAAA;AAAA,MACA,gBAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA,EAAS,CAAC,CAAA,EAAA,GAAM,CAAA,CAAE,cAAA,CAAe,CAAA;AAAA,MACjC,YAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAS,IAAA;AAAA,MAET,QAAA,kBAAA,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,OAAA,EAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EACjD,CAAA;AAEJ,CAAA;AAEA,IAAO,gBAAA,EAAQ,OAAA;ADrCf;AACA;AEtCA,IAAOA,iBAAAA,EAAQ,eAAA;AFwCf;AACA;AACE;AACA;AACF,uFAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-25AJSW5E.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { TooltipPlacement as HeroTooltipPlacement } from '@heroui/tooltip';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as HeroTooltip } from '@heroui/tooltip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n content: '',\n wrapper: 'cursor-pointer',\n },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport type TooltipPlacement = HeroTooltipPlacement;\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** delay in milliseconds before the tooltip opens. */\n closeDelay?: number;\n /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: TooltipPlacement;\n}\n\n/**\n * Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n closeDelay = 500,\n containerPadding = 0,\n content,\n defaultOpen = false,\n delay = 0,\n onOpenChange = undefined,\n placement = 'top',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.wrapper}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip from './Tooltip';\n\nexport type { TooltipProps, TooltipPlacement } from './Tooltip';\n\nexport { Tooltip };\n\nexport default Tooltip;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Popover/Popover.tsx","../src/Popover/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { PopoverProps as HeroPopoverProps } from '@heroui/popover';\nimport type { ReactNode } from 'react';\nimport type { ButtonProps } from '../Button';\n\nimport { Button } from '@heroui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@heroui/popover';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport ScrollShadow from '../ScrollShadow/ScrollShadow';\n\n// popover styling variants\nexport const popoverVariants = tv({\n slots: {\n body: 'w-full px-2.5 py-1',\n content: 'flex max-h-[80vh] flex-col p-0',\n footer: 'w-full px-2.5 py-1',\n header: 'w-full px-2.5 py-1',\n trigger: '',\n },\n});\n\ntype VariantProps = TVProps<typeof popoverVariants>;\ntype ClassName = TVClassName<typeof popoverVariants>;\n\nexport interface PopoverProps extends VariantProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** content of the popover */\n content: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n contentTestId?: string;\n /** popover footer */\n footer?: ReactNode;\n /** use as controlled component */\n openControlled?: { open: boolean; setOpen: (open: boolean) => void };\n /** placement of the popover relative to its trigger reference */\n placement?: HeroPopoverProps['placement'];\n /** The container element in which the overlay portal will be placed. */\n portalContainer?: HeroPopoverProps['portalContainer'];\n /** Whether to block scrolling outside the popover */\n shouldBlockScroll?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Popover title */\n title?: ReactNode;\n /** When defined a Button will be rendered as trigger (with provided props) instead of unstyled html button */\n triggerButtonProps?: Pick<\n ButtonProps,\n | 'ariaLabel'\n | 'className'\n | 'color'\n | 'disableAnimation'\n | 'disabled'\n | 'size'\n | 'testId'\n | 'variant'\n >;\n}\n\n/**\n * Popover component based on [HeroUI Card](https://www.heroui.com//docs/components/popover)\n */\nexport default ({\n children = null,\n className: _className = undefined,\n content,\n contentTestId = undefined,\n footer = undefined,\n openControlled = undefined,\n placement = 'top',\n portalContainer = undefined,\n shouldBlockScroll = undefined,\n testId = undefined,\n title = undefined,\n triggerButtonProps = undefined,\n}: PopoverProps) => {\n // className from slots\n const variants = popoverVariants();\n const className = variantsToClassNames(variants, _className, 'trigger');\n\n return (\n <Popover\n classNames={className}\n placement={placement}\n portalContainer={portalContainer}\n radius=\"sm\"\n shouldBlockScroll={shouldBlockScroll}\n showArrow\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...(openControlled\n ? { isOpen: openControlled.open, onOpenChange: openControlled.setOpen }\n : {})}\n >\n <PopoverTrigger data-testid={testId}>\n {/* NOTE: type and aria properties are injected by PopoverTrigger */}\n {triggerButtonProps ? (\n // TODO: currently we have to use @heroui/button because\n // passing ref does not work (even with forwardRef in Button)\n // eslint-disable-next-line react/jsx-props-no-spreading\n <Button className={className.trigger} {...triggerButtonProps}>\n {children}\n </Button>\n ) : (\n // eslint-disable-next-line react/button-has-type\n <button className={className.trigger}>{children}</button>\n )}\n </PopoverTrigger>\n <PopoverContent data-testid={contentTestId}>\n {title && (\n <div className={className.header}>\n {title}\n <hr />\n </div>\n )}\n <ScrollShadow className={className.body}>{content}</ScrollShadow>\n {footer && (\n <div className={className.footer}>\n <hr />\n {footer}\n </div>\n )}\n </PopoverContent>\n </Popover>\n );\n};\n","import Popover from './Popover';\n\nexport type { PopoverProps } from './Popover';\n\nexport { Popover };\n\nexport default Popover;\n"],"mappings":";;;;;;;;;AAKA,SAAS,cAAc;AACvB,SAAS,SAAS,gBAAgB,sBAAsB;AAExD,SAAS,IAAI,4BAA4B;AA+F/B,cAUA,YAVA;AA1FH,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,SAAS;AAAA,EACX;AACF,CAAC;AA6CD,IAAO,kBAAQ,CAAC;AAAA,EACd,WAAW;AAAA,EACX,WAAW,aAAa;AAAA,EACxB;AAAA,EACA,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,qBAAqB;AACvB,MAAoB;AAElB,QAAM,WAAW,gBAAgB;AACjC,QAAM,YAAY,qBAAqB,UAAU,YAAY,SAAS;AAEtE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,QAAO;AAAA,MACP;AAAA,MACA,WAAS;AAAA,OAEJ,iBACD,EAAE,QAAQ,eAAe,MAAM,cAAc,eAAe,QAAQ,IACpE,CAAC,IAVN;AAAA,MAYC;AAAA,4BAAC,kBAAe,eAAa,QAE1B;AAAA;AAAA;AAAA;AAAA,UAIC,oBAAC,uCAAO,WAAW,UAAU,WAAa,qBAAzC,EACE,WACH;AAAA;AAAA;AAAA,UAGA,oBAAC,YAAO,WAAW,UAAU,SAAU,UAAS;AAAA,WAEpD;AAAA,QACA,qBAAC,kBAAe,eAAa,eAC1B;AAAA,mBACC,qBAAC,SAAI,WAAW,UAAU,QACvB;AAAA;AAAA,YACD,oBAAC,QAAG;AAAA,aACN;AAAA,UAEF,oBAAC,wBAAa,WAAW,UAAU,MAAO,mBAAQ;AAAA,UACjD,UACC,qBAAC,SAAI,WAAW,UAAU,QACxB;AAAA,gCAAC,QAAG;AAAA,YACH;AAAA,aACH;AAAA,WAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;;;AC1HA,IAAOA,mBAAQ;","names":["Popover_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-EAX5J2I2.cjs","../src/Popover/Popover.tsx","../src/Popover/index.ts"],"names":["Popover_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACHA,wCAAuB;AACvB,0CAA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EAAA;AAAA,wBAAA,6BAAA,uBAAC,EAAA,EAAe,aAAA,EAAa,MAAA,EAE1B,QAAA,EAAA,mBAAA,EAAA;AAAA;AAAA;AAAA;AAAA,0BAIC,6BAAA,cAAC,EAAA,6CAAA,8CAAA,EAAO,SAAA,EAAW,SAAA,CAAU,QAAA,CAAA,EAAa,kBAAA,CAAA,EAAzC,EACE,SAAA,CAAA,CACH;AAAA,QAAA,EAAA,EAAA;AAAA;AAAA,0BAGA,6BAAA,QAAC,EAAA,EAAO,SAAA,EAAW,SAAA,CAAU,OAAA,EAAU,SAAA,CAAS;AAAA,QAAA,EAAA,CAEpD,CAAA;AAAA,wBACA,8BAAA,uBAAC,EAAA,EAAe,aAAA,EAAa,aAAA,EAC1B,QAAA,EAAA;AAAA,UAAA,MAAA,mBACC,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAW,SAAA,CAAU,MAAA,EACvB,QAAA,EAAA;AAAA,YAAA,KAAA;AAAA,4BACD,6BAAA,IAAC,EAAA,CAAA,CAAG;AAAA,UAAA,EAAA,CACN,CAAA;AAAA,0BAEF,6BAAA,sCAAC,EAAA,EAAa,SAAA,EAAW,SAAA,CAAU,IAAA,EAAO,QAAA,EAAA,QAAA,CAAQ,CAAA;AAAA,UACjD,OAAA,mBACC,8BAAA,KAAC,EAAA,EAAI,SAAA,EAAW,SAAA,CAAU,MAAA,EACxB,QAAA,EAAA;AAAA,4BAAA,6BAAA,IAAC,EAAA,CAAA,CAAG,CAAA;AAAA,YACH;AAAA,UAAA,EAAA,CACH;AAAA,QAAA,EAAA,CAEJ;AAAA,MAAA;AAAA,IAAA,CAAA;AAAA,EACF,CAAA;AAEJ,CAAA;ADvDA;AACA;AEpEA,IAAOA,iBAAAA,EAAQ,eAAA;AFsEf;AACA;AACE;AACA;AACF,uFAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-EAX5J2I2.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { PopoverProps as HeroPopoverProps } from '@heroui/popover';\nimport type { ReactNode } from 'react';\nimport type { ButtonProps } from '../Button';\n\nimport { Button } from '@heroui/button';\nimport { Popover, PopoverContent, PopoverTrigger } from '@heroui/popover';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport ScrollShadow from '../ScrollShadow/ScrollShadow';\n\n// popover styling variants\nexport const popoverVariants = tv({\n slots: {\n body: 'w-full px-2.5 py-1',\n content: 'flex max-h-[80vh] flex-col p-0',\n footer: 'w-full px-2.5 py-1',\n header: 'w-full px-2.5 py-1',\n trigger: '',\n },\n});\n\ntype VariantProps = TVProps<typeof popoverVariants>;\ntype ClassName = TVClassName<typeof popoverVariants>;\n\nexport interface PopoverProps extends VariantProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** content of the popover */\n content: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n contentTestId?: string;\n /** popover footer */\n footer?: ReactNode;\n /** use as controlled component */\n openControlled?: { open: boolean; setOpen: (open: boolean) => void };\n /** placement of the popover relative to its trigger reference */\n placement?: HeroPopoverProps['placement'];\n /** The container element in which the overlay portal will be placed. */\n portalContainer?: HeroPopoverProps['portalContainer'];\n /** Whether to block scrolling outside the popover */\n shouldBlockScroll?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Popover title */\n title?: ReactNode;\n /** When defined a Button will be rendered as trigger (with provided props) instead of unstyled html button */\n triggerButtonProps?: Pick<\n ButtonProps,\n | 'ariaLabel'\n | 'className'\n | 'color'\n | 'disableAnimation'\n | 'disabled'\n | 'size'\n | 'testId'\n | 'variant'\n >;\n}\n\n/**\n * Popover component based on [HeroUI Card](https://www.heroui.com//docs/components/popover)\n */\nexport default ({\n children = null,\n className: _className = undefined,\n content,\n contentTestId = undefined,\n footer = undefined,\n openControlled = undefined,\n placement = 'top',\n portalContainer = undefined,\n shouldBlockScroll = undefined,\n testId = undefined,\n title = undefined,\n triggerButtonProps = undefined,\n}: PopoverProps) => {\n // className from slots\n const variants = popoverVariants();\n const className = variantsToClassNames(variants, _className, 'trigger');\n\n return (\n <Popover\n classNames={className}\n placement={placement}\n portalContainer={portalContainer}\n radius=\"sm\"\n shouldBlockScroll={shouldBlockScroll}\n showArrow\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...(openControlled\n ? { isOpen: openControlled.open, onOpenChange: openControlled.setOpen }\n : {})}\n >\n <PopoverTrigger data-testid={testId}>\n {/* NOTE: type and aria properties are injected by PopoverTrigger */}\n {triggerButtonProps ? (\n // TODO: currently we have to use @heroui/button because\n // passing ref does not work (even with forwardRef in Button)\n // eslint-disable-next-line react/jsx-props-no-spreading\n <Button className={className.trigger} {...triggerButtonProps}>\n {children}\n </Button>\n ) : (\n // eslint-disable-next-line react/button-has-type\n <button className={className.trigger}>{children}</button>\n )}\n </PopoverTrigger>\n <PopoverContent data-testid={contentTestId}>\n {title && (\n <div className={className.header}>\n {title}\n <hr />\n </div>\n )}\n <ScrollShadow className={className.body}>{content}</ScrollShadow>\n {footer && (\n <div className={className.footer}>\n <hr />\n {footer}\n </div>\n )}\n </PopoverContent>\n </Popover>\n );\n};\n","import Popover from './Popover';\n\nexport type { PopoverProps } from './Popover';\n\nexport { Popover };\n\nexport default Popover;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-FLPLJTAC.cjs","../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"names":["jsxs","jsx","Button_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACAA,wCAAqC;AACrC,sCAA6C;AAE7C,oDAAmB;ADCnB;AACA;AEJE,+CAAA;AADF,IAAO,uBAAA,EAAQ,CAAA,EAAA,mBACb,8BAAA;AAAA,EAAC,KAAA;AAAA,EAAA;AAAA,IACC,SAAA,EAAU,mCAAA;AAAA,IACV,IAAA,EAAK,MAAA;AAAA,IACL,OAA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,CAAA,EAAA,GAAmB;AACjB,EAAA,uBACEA,8BAAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAY,SAAA;AAAA,MACZ,SAAA,EAAW,cAAA,CAAe,EAAE,KAAA,EAAO,OAAA,EAAS,UAAU,CAAC,CAAA;AAAA,MACvD,KAAA;AAAA,MACA,aAAA,EAAa,MAAA;AAAA,MACb,gBAAA;AAAA,MACA,aAAA,EAAe,gBAAA;AAAA,MACf,UAAA,EAAY,QAAA;AAAA,MACZ,UAAA,EAAY,CAAC,CAAA,CAAE,KAAA,GAAQ,CAAC,QAAA,CAAA;AAAA,MACxB,SAAA,EAAW,OAAA;AAAA,MACX,OAAA,EAAS,OAAA;AAAA,MACT,IAAA;AAAA,MACA,OAAA,kBAASC,6BAAAA,sBAAC,EAAA,CAAA,CAAe,CAAA;AAAA,MACzB,IAAA;AAAA,MACA,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,CAAA;AAEJ,CAAA;AAEA,IAAO,eAAA,EAAQ,MAAA;ADNf;AACA;AG1IA,IAAOC,gBAAAA,EAAQ,cAAA;AH4If;AACA;AACE;AACA;AACA;AACF,4HAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-FLPLJTAC.cjs","sourcesContent":[null,"import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n base: '',\n variants: {\n color: {\n info: '',\n ...heroButtonVariants.variants.color,\n },\n variant: {\n ...heroButtonVariants.variants.variant,\n },\n size: {\n ...heroButtonVariants.variants.size,\n },\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'text-info-foreground\" bg-info shadow-lg shadow-info/40',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof buttonVariants>;\n\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** hero ui button color */\n color?: HeroButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** disables all button animations */\n disableAnimation?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: HeroButtonProps['onPress'];\n /** 3 size options */\n size?: HeroButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** sets the button type. */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** hero ui button variants */\n variant?: HeroButtonProps['variant'];\n}\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n disableAnimation = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <HeroButton\n aria-label={ariaLabel}\n className={buttonVariants({ color, variant, className })}\n color={color}\n data-testid={testId}\n disableAnimation={disableAnimation}\n disableRipple={disableAnimation}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </HeroButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-HENURJFU.cjs","../src/ProgressCircular/ProgressCircular.tsx","../src/ProgressCircular/index.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACHA,oCAAiC;AAEjC,4CAAyD;AACzD,sCAAiE;AAEjE,oDAAyC;AA4I7B,+CAAA;AAxIL,IAAM,yBAAA,EAA2B,4BAAA;AAAG,EACzC,KAAA,EAAO;AAAA;AAAA,IAEL,IAAA,EAAM,EAAA;AAAA;AAAA,IAEN,SAAA,EAAW,EAAA;AAAA;AAAA,I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AA;AACoB,EAAA;AACD;AAEE,EAAA;AAEG,EAAA;AACf,EAAA;AACf,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACD,EAAA;AACkB,EAAA;AAGO,EAAA;AAGR,EAAA;AACC,EAAA;AACH,IAAA;AACP,MAAA;AACW,QAAA;AACd,QAAA;AACG,MAAA;AACW,QAAA;AACd,QAAA;AACF,MAAA;AACgB,QAAA;AACd,QAAA;AACJ,IAAA;AACF,EAAA;AAG2C,EAAA;AAC7B,EAAA;AACI,IAAA;AACP,IAAA;AACY,EAAA;AACL,IAAA;AACP,IAAA;AACX,EAAA;AAG2B,EAAA;AACI,IAAA;AAG3B,EAAA;AAGF,EAAA;AAAC,IAAA;AAAA,IAAA;AACa,MAAA;AACZ,MAAA;AACO,MAAA;AACW,MAAA;AACJ,MAAA;AACd,MAAA;AAEkB,MAAA;AACN,MAAA;AAAA,IAAA;AACd,EAAA;AAEJ;AAEe;AD7CuB;AACA;AE/HvB;AFiIuB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-HENURJFU.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { CircularProgressProps as HeroCircularProgressProps } from '@heroui/progress';\nimport type { ReactNode } from 'react';\n\nimport { FaCheck, FaTimes } from 'react-icons/fa';\n\nimport { CircularProgress as HeroCircularProgress } from '@heroui/progress';\nimport { circularProgress as heroCircularProgressVariants } from '@heroui/theme';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useIsInitialRenderCycle } from '../hooks';\n\nexport const progressCircularVariants = tv({\n slots: {\n // wrapper around the whole component\n base: '',\n // indicator of the circle (finished part)\n indicator: '',\n // label next to the svgWrapper\n label: '',\n // wrapper for the circle\n svg: '',\n // wrapper around progress svg and value span\n svgWrapper: '',\n // track of the circle (not finished part)\n track: 'stroke-default-300',\n // outer span next to the svg\n value: '',\n },\n variants: {\n color: {\n info: {\n svg: 'text-info',\n },\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/progress.ts\n ...heroCircularProgressVariants.variants.color,\n },\n hasError: {\n true: {\n svg: 'text-danger',\n },\n },\n isFinished: {\n true: {\n svg: 'text-success',\n },\n },\n size: {\n xs: {\n svg: 'h-10 w-10',\n value: 'text-[0.6rem]',\n },\n sm: {\n svg: 'h-12 w-12',\n value: 'text-xs',\n },\n md: {\n svg: 'h-16 w-16',\n value: 'text-md',\n },\n lg: {\n svg: 'h-20 w-20',\n value: 'text-lg',\n },\n xl: {\n svg: 'h-24 w-24',\n value: 'text-xl',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof progressCircularVariants>;\ntype ClassName = TVClassName<typeof progressCircularVariants>;\n\nexport interface ProgressCircularProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** color options */\n color?: VariantProps['color'];\n /** disables all animations */\n disableAnimation?: boolean;\n /** formats the display value of the progress in the center */\n format?: (percent?: number) => ReactNode;\n /** enables error version */\n hasError?: boolean;\n /** percentage / progress of the circular progress bar */\n percent: number;\n /** size options */\n size?: VariantProps['size'];\n /** stroke width of the circular progress bar */\n strokeWidth?: number;\n}\n\n/** formats percent with percent sign */\nconst defaultFormat = (percent = 0) => `${percent}%`;\n\n/**\n * ProgressCircular component based on [HeroUI CircularProgress](https://www.heroui.com/docs/components/circular-progress)\n */\nconst ProgressCircular = ({\n ariaLabel = 'progress',\n className = undefined,\n format = defaultFormat,\n hasError = false,\n percent,\n disableAnimation = false,\n size = 'md',\n color = 'info',\n strokeWidth: _strokeWidth = undefined,\n}: ProgressCircularProps) => {\n // used to disable animation on initial render cycle\n const isInitialRenderCycle = useIsInitialRenderCycle();\n\n const isFinished = !hasError && percent >= 100;\n const variants = progressCircularVariants({\n color,\n hasError,\n isFinished,\n size,\n });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // format value\n let value = format(percent);\n\n // set strokeWidth based on size prop\n let strokeWidth = _strokeWidth;\n if (!_strokeWidth) {\n switch (size) {\n case 'xs':\n strokeWidth = 2;\n break;\n case 'sm':\n strokeWidth = 1.8;\n break;\n default:\n strokeWidth = 1.6;\n break;\n }\n }\n\n // handle special states\n let progressColor: VariantProps['color'] = color;\n if (hasError) {\n progressColor = 'danger';\n value = <FaTimes className=\"text-danger\" />;\n } else if (isFinished) {\n progressColor = 'success';\n value = <FaCheck className=\"text-success\" />;\n }\n\n // pass only HeroUI colors as props\n const heroUiColor = Object.keys(\n heroCircularProgressVariants.variants.color,\n ).includes(color)\n ? (progressColor as HeroCircularProgressProps['color'])\n : undefined;\n\n return (\n <HeroCircularProgress\n aria-label={ariaLabel}\n classNames={classNames}\n color={heroUiColor}\n disableAnimation={isInitialRenderCycle || disableAnimation}\n showValueLabel\n strokeWidth={strokeWidth}\n // we do not use spinner animation when no percent provided\n value={percent || 0}\n valueLabel={value}\n />\n );\n};\n\nexport default ProgressCircular;\n","import ProgressCircular, { progressCircularVariants } from './ProgressCircular';\n\nexport type { ProgressCircularProps } from './ProgressCircular';\n\nexport { ProgressCircular, progressCircularVariants };\n\nexport default ProgressCircular;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n base: '',\n variants: {\n color: {\n info: '',\n ...heroButtonVariants.variants.color,\n },\n variant: {\n ...heroButtonVariants.variants.variant,\n },\n size: {\n ...heroButtonVariants.variants.size,\n },\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'text-info-foreground\" bg-info shadow-lg shadow-info/40',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof buttonVariants>;\n\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** hero ui button color */\n color?: HeroButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** disables all button animations */\n disableAnimation?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: HeroButtonProps['onPress'];\n /** 3 size options */\n size?: HeroButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** sets the button type. */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** hero ui button variants */\n variant?: HeroButtonProps['variant'];\n}\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n disableAnimation = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <HeroButton\n aria-label={ariaLabel}\n className={buttonVariants({ color, variant, className })}\n color={color}\n data-testid={testId}\n disableAnimation={disableAnimation}\n disableRipple={disableAnimation}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </HeroButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"],"mappings":";;;;;AAIA,SAAS,UAAU,kBAAkB;AACrC,SAAS,UAAU,0BAA0B;AAE7C,SAAS,UAAU;;;ACFjB,SAME,KANF;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;A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V,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,WAAW,eAAe,EAAE,OAAO,SAAS,UAAU,CAAC;AAAA,MACvD;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA,eAAe;AAAA,MACf,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,SAAS,gBAAAD,KAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;;;AE/If,IAAOE,kBAAQ;","names":["jsx","jsxs","Button_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Progress/Progress.tsx","../src/Progress/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Progress as HeroProgress } from '@heroui/progress';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useIsInitialRenderCycle } from '../hooks';\n\n// progress styling variants\nexport const progressVariants = tv({\n slots: {\n // wrapper around the whole component\n base: '',\n // indicator of the progress (finished part)\n indicator: '',\n // label at the top left of the progress bar\n label: '',\n // wrapper around progress label and label span\n labelWrapper: '',\n // track of the progress (not finished part)\n track: '',\n // span around the progress value\n value: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/progress.ts\n color: {\n danger: {\n indicator: 'bg-danger',\n },\n default: {\n indicator: 'bg-default-400',\n },\n info: {\n indicator: 'bg-info',\n },\n primary: {\n indicator: 'bg-primary',\n },\n secondary: {\n indicator: 'bg-secondary',\n },\n success: {\n indicator: 'bg-success',\n },\n warning: {\n indicator: 'bg-warning',\n },\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof progressVariants>;\ntype ClassName = TVClassName<typeof progressVariants>;\n\nexport interface ProgressProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** color of the progress bar */\n color?: VariantProps['color'];\n /** disables all animations */\n disableAnimation?: boolean;\n /** function to format the progress value */\n format?: (percent: number) => ReactNode;\n /** shows indeterminate progress animation */\n indeterminate?: boolean;\n /** label of the progress bar */\n label?: ReactNode;\n /** percentage / progress of the progress bar */\n percent: number;\n /** whether to show the value label */\n showValueLabel?: boolean;\n /** size of the progress bar */\n size?: 'sm' | 'md' | 'lg';\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/** formats percent with percent sign */\nconst defaultFormat = (percent = 0) => `${percent}%`;\n\n/**\n * Progress component based on [HeroUI Progress](https://www.heroui.com//docs/components/progress)\n */\nconst Progress = ({\n ariaLabel = 'progress',\n className = undefined,\n color = 'info',\n disableAnimation = false,\n format = defaultFormat,\n indeterminate = false,\n label = undefined,\n percent,\n showValueLabel = false,\n size = 'md',\n testId = undefined,\n}: ProgressProps) => {\n // used to disable animation on initial render cycle\n const isInitialRenderCycle = useIsInitialRenderCycle();\n\n // handle special states\n let progressColor: VariantProps['color'] = color;\n if (percent >= 100) {\n progressColor = 'success';\n }\n\n const variants = progressVariants({ color: progressColor });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const value = format(percent);\n\n return (\n <HeroProgress\n aria-label={ariaLabel}\n classNames={classNames}\n data-testid={testId}\n disableAnimation={isInitialRenderCycle || disableAnimation}\n isIndeterminate={indeterminate}\n label={label}\n showValueLabel={showValueLabel}\n size={size}\n value={percent || 0}\n valueLabel={!!percent && value}\n />\n );\n};\n\nexport default Progress;\n","import Progress, { progressVariants } from './Progress';\n\nexport type { ProgressProps } from './Progress';\n\nexport { Progress, progressVariants };\n\nexport default Progress;\n"],"mappings":";;;;;AAGA,SAAS,YAAY,oBAAoB;AAEzC,S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wB;AAAA,MAC1C,iBAAiB;AAAA,MACjB;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,WAAW;AAAA,MAClB,YAAY,CAAC,CAAC,WAAW;AAAA;AAAA,EAC3B;AAEJ;AAEA,IAAO,mBAAQ;;;AC5Hf,IAAOA,oBAAQ;","names":["Progress_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PK723NKO.cjs","../src/Progress/Progress.tsx","../src/Progress/index.ts"],"names":[],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACDA,4CAAyC;AAEzC,oDAAyC;AA8GrC,+CAAA;AAzGG,IAAM,iBAAA,EAAmB,4BAAA;AAAG,EACjC,KAAA,EAAO;AAAA;AAAA,IAEL,IAAA,EAAM,EAAA;AAAA;AAAA,IAEN,SAAA,EAAW,EAAA;AAAA;AAAA,IAEX,KAAA,EAAO,EAAA;AAAA;AAAA,IAEP,YAAA,EAAc,EAAA;AAAA;AAAA,IAEd,KAAA,EAAO,EAAA;AAAA;AAAA,IAEP,KAAA,EAAO;AAAA,EACT,CAAA;AAAA,EACA,QAAA,EAAU;AAAA;AAAA,IAER,KAAA,EAAO;AAAA,MACL,MAAA,EAAQ;AAAA,QACN,SAAA,EAAW;AAAA,MACb,CAAA;AAAA,MACA,OAAA,EAAS;AAAA,QACP,SAAA,EAAW;AAAA,MACb,CAAA;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,SAAA,EAAW;AAAA,MACb,CAAA;AAAA,MACA,OAAA,EAAS;AAAA,QACP,SAAA,EAAW;AAAA,MACb,CAAA;AAAA,MACA,SAAA,EAAW;AAAA,QACT,SAAA,EAAW;AAAA,MACb,CAAA;AAAA,MACA,OAAA,EAAS;AAAA,QACP,SAAA,EAAW;AAAA,MACb,CAAA;AAAA,MACA,OAAA,EAAS;AAAA,QACP,SAAA,EAAW;AAAA,MACb;AAAA,IACF;AAAA,EACF;AACF,CAAC,CAAA;AA+BD,IAAM,cAAA,EAAgB,CAAC,QAAA,EAAU,CAAA,EAAA,GAAM,CAAA,EAAA;AAKrB;AACJ,EAAA;AACA,EAAA;AACJ,EAAA;AACW,EAAA;AACV,EAAA;AACO,EAAA;AACR,EAAA;AACR,EAAA;AACiB,EAAA;AACV,EAAA;AACE,EAAA;AACU;AAEU,EAAA;AAGc,EAAA;AACvB,EAAA;AACF,IAAA;AAClB,EAAA;AAEoC,EAAA;AACjB,EAAA;AAES,EAAA;AAG1B,EAAA;AAAC,IAAA;AAAA,IAAA;AACa,MAAA;AACZ,MAAA;AACa,MAAA;AACK,MAAA;AACD,MAAA;AACjB,MAAA;AACA,MAAA;AACA,MAAA;AACkB,MAAA;AACO,MAAA;AAAA,IAAA;AAC3B,EAAA;AAEJ;AAEe;ADzCuB;AACA;AEpFvB;AFsFuB;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PK723NKO.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Progress as HeroProgress } from '@heroui/progress';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useIsInitialRenderCycle } from '../hooks';\n\n// progress styling variants\nexport const progressVariants = tv({\n slots: {\n // wrapper around the whole component\n base: '',\n // indicator of the progress (finished part)\n indicator: '',\n // label at the top left of the progress bar\n label: '',\n // wrapper around progress label and label span\n labelWrapper: '',\n // track of the progress (not finished part)\n track: '',\n // span around the progress value\n value: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/progress.ts\n color: {\n danger: {\n indicator: 'bg-danger',\n },\n default: {\n indicator: 'bg-default-400',\n },\n info: {\n indicator: 'bg-info',\n },\n primary: {\n indicator: 'bg-primary',\n },\n secondary: {\n indicator: 'bg-secondary',\n },\n success: {\n indicator: 'bg-success',\n },\n warning: {\n indicator: 'bg-warning',\n },\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof progressVariants>;\ntype ClassName = TVClassName<typeof progressVariants>;\n\nexport interface ProgressProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** color of the progress bar */\n color?: VariantProps['color'];\n /** disables all animations */\n disableAnimation?: boolean;\n /** function to format the progress value */\n format?: (percent: number) => ReactNode;\n /** shows indeterminate progress animation */\n indeterminate?: boolean;\n /** label of the progress bar */\n label?: ReactNode;\n /** percentage / progress of the progress bar */\n percent: number;\n /** whether to show the value label */\n showValueLabel?: boolean;\n /** size of the progress bar */\n size?: 'sm' | 'md' | 'lg';\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/** formats percent with percent sign */\nconst defaultFormat = (percent = 0) => `${percent}%`;\n\n/**\n * Progress component based on [HeroUI Progress](https://www.heroui.com//docs/components/progress)\n */\nconst Progress = ({\n ariaLabel = 'progress',\n className = undefined,\n color = 'info',\n disableAnimation = false,\n format = defaultFormat,\n indeterminate = false,\n label = undefined,\n percent,\n showValueLabel = false,\n size = 'md',\n testId = undefined,\n}: ProgressProps) => {\n // used to disable animation on initial render cycle\n const isInitialRenderCycle = useIsInitialRenderCycle();\n\n // handle special states\n let progressColor: VariantProps['color'] = color;\n if (percent >= 100) {\n progressColor = 'success';\n }\n\n const variants = progressVariants({ color: progressColor });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n const value = format(percent);\n\n return (\n <HeroProgress\n aria-label={ariaLabel}\n classNames={classNames}\n data-testid={testId}\n disableAnimation={isInitialRenderCycle || disableAnimation}\n isIndeterminate={indeterminate}\n label={label}\n showValueLabel={showValueLabel}\n size={size}\n value={percent || 0}\n valueLabel={!!percent && value}\n />\n );\n};\n\nexport default Progress;\n","import Progress, { progressVariants } from './Progress';\n\nexport type { ProgressProps } from './Progress';\n\nexport { Progress, progressVariants };\n\nexport default Progress;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ProgressCircular/ProgressCircular.tsx","../src/ProgressCircular/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { CircularProgressProps as HeroCircularProgressProps } from '@heroui/progress';\nimport type { ReactNode } from 'react';\n\nimport { FaCheck, FaTimes } from 'react-icons/fa';\n\nimport { CircularProgress as HeroCircularProgress } from '@heroui/progress';\nimport { circularProgress as heroCircularProgressVariants } from '@heroui/theme';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { useIsInitialRenderCycle } from '../hooks';\n\nexport const progressCircularVariants = tv({\n slots: {\n // wrapper around the whole component\n base: '',\n // indicator of the circle (finished part)\n indicator: '',\n // label next to the svgWrapper\n label: '',\n // wrapper for the circle\n svg: '',\n // wrapper around progress svg and value span\n svgWrapper: '',\n // track of the circle (not finished part)\n track: 'stroke-default-300',\n // outer span next to the svg\n value: '',\n },\n variants: {\n color: {\n info: {\n svg: 'text-info',\n },\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/progress.ts\n ...heroCircularProgressVariants.variants.color,\n },\n hasError: {\n true: {\n svg: 'text-danger',\n },\n },\n isFinished: {\n true: {\n svg: 'text-success',\n },\n },\n size: {\n xs: {\n svg: 'h-10 w-10',\n value: 'text-[0.6rem]',\n },\n sm: {\n svg: 'h-12 w-12',\n value: 'text-xs',\n },\n md: {\n svg: 'h-16 w-16',\n value: 'text-md',\n },\n lg: {\n svg: 'h-20 w-20',\n value: 'text-lg',\n },\n xl: {\n svg: 'h-24 w-24',\n value: 'text-xl',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof progressCircularVariants>;\ntype ClassName = TVClassName<typeof progressCircularVariants>;\n\nexport interface ProgressCircularProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** color options */\n color?: VariantProps['color'];\n /** disables all animations */\n disableAnimation?: boolean;\n /** formats the display value of the progress in the center */\n format?: (percent?: number) => ReactNode;\n /** enables error version */\n hasError?: boolean;\n /** percentage / progress of the circular progress bar */\n percent: number;\n /** size options */\n size?: VariantProps['size'];\n /** stroke width of the circular progress bar */\n strokeWidth?: number;\n}\n\n/** formats percent with percent sign */\nconst defaultFormat = (percent = 0) => `${percent}%`;\n\n/**\n * ProgressCircular component based on [HeroUI CircularProgress](https://www.heroui.com/docs/components/circular-progress)\n */\nconst ProgressCircular = ({\n ariaLabel = 'progress',\n className = undefined,\n format = defaultFormat,\n hasError = false,\n percent,\n disableAnimation = false,\n size = 'md',\n color = 'info',\n strokeWidth: _strokeWidth = undefined,\n}: ProgressCircularProps) => {\n // used to disable animation on initial render cycle\n const isInitialRenderCycle = useIsInitialRenderCycle();\n\n const isFinished = !hasError && percent >= 100;\n const variants = progressCircularVariants({\n color,\n hasError,\n isFinished,\n size,\n });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // format value\n let value = format(percent);\n\n // set strokeWidth based on size prop\n let strokeWidth = _strokeWidth;\n if (!_strokeWidth) {\n switch (size) {\n case 'xs':\n strokeWidth = 2;\n break;\n case 'sm':\n strokeWidth = 1.8;\n break;\n default:\n strokeWidth = 1.6;\n break;\n }\n }\n\n // handle special states\n let progressColor: VariantProps['color'] = color;\n if (hasError) {\n progressColor = 'danger';\n value = <FaTimes className=\"text-danger\" />;\n } else if (isFinished) {\n progressColor = 'success';\n value = <FaCheck className=\"text-success\" />;\n }\n\n // pass only HeroUI colors as props\n const heroUiColor = Object.keys(\n heroCircularProgressVariants.variants.color,\n ).includes(color)\n ? (progressColor as HeroCircularProgressProps['color'])\n : undefined;\n\n return (\n <HeroCircularProgress\n aria-label={ariaLabel}\n classNames={classNames}\n color={heroUiColor}\n disableAnimation={isInitialRenderCycle || disableAnimation}\n showValueLabel\n strokeWidth={strokeWidth}\n // we do not use spinner animation when no percent provided\n value={percent || 0}\n valueLabel={value}\n />\n );\n};\n\nexport default ProgressCircular;\n","import ProgressCircular, { progressCircularVariants } from './ProgressCircular';\n\nexport type { ProgressCircularProps } from './ProgressCircular';\n\nexport { ProgressCircular, progressCircularVariants };\n\nexport default ProgressCircular;\n"],"mappings":";;;;;;;;AAIA,SAAS,SAAS,eAAe;AAEjC,SAAS,oBAAoB,4BAA4B;AACzD,SAAS,oBAAoB,oCAAoC;AAEjE,SAAS,IAAI,4BAA4B;AA4I7B;AAxIL,IAAM,2BAA2B,GAAG;AAAA,EACzC,OAAO;AAAA;AAAA,IAEL,MAAM;AAAA;AAAA,IAEN,WAAW;AAAA;AAAA,IAEX,OAAO;AAAA;AAAA,IAEP,KAAK;AAAA;AAAA,IAEL,YAAY;AAAA;AAAA,IAEZ,OAAO;AAAA;AAAA,IAEP,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,MACL,MAAM;AAAA,QACJ,KAAK;AAAA,MACP;AAAA,OAEG,6BAA6B,SAAS;AAAA,IAE3C,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,KAAK;AAAA,MACP;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,KAAK;AAAA,MACP;AAAA,IACF;AAAA,IACA,MAAM;AAAA,MACJ,IAAI;AAAA,QACF,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,MACA,IAAI;AAAA,QACF,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,MACA,IAAI;AAAA,QACF,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,MACA,IAAI;AAAA,QACF,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,MACA,IAAI;AAAA,QACF,KAAK;AAAA,QACL,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF,CAAC;AA2BD,IAAM,gBAAgB,CAAC,UAAU,MAAM,GAAG,OAAO;AAKjD,IAAM,mBAAmB,CAAC;AAAA,EACxB,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,WAAW;AAAA,EACX;AAAA,EACA,mBAAmB;AAAA,EACnB,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,aAAa,eAAe;AAC9B,MAA6B;AAE3B,QAAM,uBAAuB,wBAAwB;AAErD,QAAM,aAAa,CAAC,YAAY,WAAW;AAC3C,QAAM,WAAW,yBAAyB;AAAA,IACxC;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;AAGnE,MAAI,QAAQ,OAAO,OAAO;AAG1B,MAAI,cAAc;AAClB,MAAI,CAAC,cAAc;AACjB,YAAQ,MAAM;AAAA,MACZ,KAAK;AACH,sBAAc;AACd;AAAA,MACF,KAAK;AACH,sBAAc;AACd;AAAA,MACF;AACE,sBAAc;AACd;AAAA,IACJ;AAAA,EACF;AAGA,MAAI,gBAAuC;AAC3C,MAAI,UAAU;AACZ,oBAAgB;AAChB,YAAQ,oBAAC,WAAQ,WAAU,eAAc;AAAA,EAC3C,WAAW,YAAY;AACrB,oBAAgB;AAChB,YAAQ,oBAAC,WAAQ,WAAU,gBAAe;AAAA,EAC5C;AAGA,QAAM,cAAc,OAAO;AAAA,IACzB,6BAA6B,SAAS;AAAA,EACxC,EAAE,SAAS,KAAK,IACX,gBACD;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ;AAAA,MACA,OAAO;AAAA,MACP,kBAAkB,wBAAwB;AAAA,MAC1C,gBAAc;AAAA,MACd;AAAA,MAEA,OAAO,WAAW;AAAA,MAClB,YAAY;AAAA;AAAA,EACd;AAEJ;AAEA,IAAO,2BAAQ;;;AC3Kf,IAAOA,4BAAQ;","names":["ProgressCircular_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { TooltipPlacement as HeroTooltipPlacement } from '@heroui/tooltip';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as HeroTooltip } from '@heroui/tooltip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n content: '',\n wrapper: 'cursor-pointer',\n },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport type TooltipPlacement = HeroTooltipPlacement;\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** delay in milliseconds before the tooltip opens. */\n closeDelay?: number;\n /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: TooltipPlacement;\n}\n\n/**\n * Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n closeDelay = 500,\n containerPadding = 0,\n content,\n defaultOpen = false,\n delay = 0,\n onOpenChange = undefined,\n placement = 'top',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.wrapper}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip from './Tooltip';\n\nexport type { TooltipProps, TooltipPlacement } from './Tooltip';\n\nexport { Tooltip };\n\nexport default Tooltip;\n"],"mappings":";AAIA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AAqEnC;AAlEC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AA+BD,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AACd,MAAoB;AAElB,QAAM,WAAW,gBAAgB;AACjC,QAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;AAEpE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAET,8BAAC,UAAK,WAAW,WAAW,SAAU,UAAS;AAAA;AAAA,EACjD;AAEJ;AAEA,IAAO,kBAAQ;;;AC1Ef,IAAOA,mBAAQ;","names":["Tooltip_default"]}