@fuf-stack/pixels 0.16.0 → 0.16.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,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkMMZG5BW3cjs = require('../chunk-MMZG5BW3.cjs');
4
+ var _chunkYTQJ6FZKcjs = require('../chunk-YTQJ6FZK.cjs');
5
5
  require('../chunk-DZUJEN5N.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.Label = _chunkMMZG5BW3cjs.Label_default; exports.default = _chunkMMZG5BW3cjs.Label_default2;
9
+ exports.Label = _chunkYTQJ6FZKcjs.Label_default; exports.default = _chunkYTQJ6FZKcjs.Label_default2;
10
10
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { L as Label } from '../Label-BpKnEJWi.cjs';
2
- export { a as LabelProps } from '../Label-BpKnEJWi.cjs';
1
+ import { L as Label } from '../Label-DAK6glI0.cjs';
2
+ export { a as LabelProps } from '../Label-DAK6glI0.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
@@ -1,5 +1,5 @@
1
- import { L as Label } from '../Label-BpKnEJWi.js';
2
- export { a as LabelProps } from '../Label-BpKnEJWi.js';
1
+ import { L as Label } from '../Label-DAK6glI0.js';
2
+ export { a as LabelProps } from '../Label-DAK6glI0.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Label_default,
3
3
  Label_default2
4
- } from "../chunk-EFSKM3C4.js";
4
+ } from "../chunk-7IGL67EH.js";
5
5
  import "../chunk-5WRI5ZAA.js";
6
6
  export {
7
7
  Label_default as Label,
@@ -8,45 +8,69 @@ import { ReactNode } from 'react';
8
8
  declare const labelVariants: tailwind_variants.TVReturnType<{
9
9
  [key: string]: {
10
10
  [key: string]: tailwind_variants.ClassValue | {
11
+ avatar?: tailwind_variants.ClassValue;
11
12
  base?: tailwind_variants.ClassValue;
13
+ closeButton?: tailwind_variants.ClassValue;
12
14
  content?: tailwind_variants.ClassValue;
15
+ dot?: tailwind_variants.ClassValue;
13
16
  };
14
17
  };
15
18
  } | {
16
19
  [x: string]: {
17
20
  [x: string]: tailwind_variants.ClassValue | {
21
+ avatar?: tailwind_variants.ClassValue;
18
22
  base?: tailwind_variants.ClassValue;
23
+ closeButton?: tailwind_variants.ClassValue;
19
24
  content?: tailwind_variants.ClassValue;
25
+ dot?: tailwind_variants.ClassValue;
20
26
  };
21
27
  };
22
28
  } | {}, {
29
+ avatar: string;
23
30
  base: string;
31
+ closeButton: string;
24
32
  content: string;
33
+ dot: string;
25
34
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
26
35
  [key: string]: {
27
36
  [key: string]: tailwind_variants.ClassValue | {
37
+ avatar?: tailwind_variants.ClassValue;
28
38
  base?: tailwind_variants.ClassValue;
39
+ closeButton?: tailwind_variants.ClassValue;
29
40
  content?: tailwind_variants.ClassValue;
41
+ dot?: tailwind_variants.ClassValue;
30
42
  };
31
43
  };
32
44
  } | {}>, {
33
45
  [key: string]: {
34
46
  [key: string]: tailwind_variants.ClassValue | {
47
+ avatar?: tailwind_variants.ClassValue;
35
48
  base?: tailwind_variants.ClassValue;
49
+ closeButton?: tailwind_variants.ClassValue;
36
50
  content?: tailwind_variants.ClassValue;
51
+ dot?: tailwind_variants.ClassValue;
37
52
  };
38
53
  };
39
54
  } | {}, {
55
+ avatar: string;
40
56
  base: string;
57
+ closeButton: string;
41
58
  content: string;
59
+ dot: string;
42
60
  }, tailwind_variants.TVReturnType<unknown, {
61
+ avatar: string;
43
62
  base: string;
63
+ closeButton: string;
44
64
  content: string;
65
+ dot: string;
45
66
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
46
67
  [key: string]: {
47
68
  [key: string]: tailwind_variants.ClassValue | {
69
+ avatar?: tailwind_variants.ClassValue;
48
70
  base?: tailwind_variants.ClassValue;
71
+ closeButton?: tailwind_variants.ClassValue;
49
72
  content?: tailwind_variants.ClassValue;
73
+ dot?: tailwind_variants.ClassValue;
50
74
  };
51
75
  };
52
76
  } | {}>, unknown, unknown, undefined>>;
@@ -8,45 +8,69 @@ import { ReactNode } from 'react';
8
8
  declare const labelVariants: tailwind_variants.TVReturnType<{
9
9
  [key: string]: {
10
10
  [key: string]: tailwind_variants.ClassValue | {
11
+ avatar?: tailwind_variants.ClassValue;
11
12
  base?: tailwind_variants.ClassValue;
13
+ closeButton?: tailwind_variants.ClassValue;
12
14
  content?: tailwind_variants.ClassValue;
15
+ dot?: tailwind_variants.ClassValue;
13
16
  };
14
17
  };
15
18
  } | {
16
19
  [x: string]: {
17
20
  [x: string]: tailwind_variants.ClassValue | {
21
+ avatar?: tailwind_variants.ClassValue;
18
22
  base?: tailwind_variants.ClassValue;
23
+ closeButton?: tailwind_variants.ClassValue;
19
24
  content?: tailwind_variants.ClassValue;
25
+ dot?: tailwind_variants.ClassValue;
20
26
  };
21
27
  };
22
28
  } | {}, {
29
+ avatar: string;
23
30
  base: string;
31
+ closeButton: string;
24
32
  content: string;
33
+ dot: string;
25
34
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
26
35
  [key: string]: {
27
36
  [key: string]: tailwind_variants.ClassValue | {
37
+ avatar?: tailwind_variants.ClassValue;
28
38
  base?: tailwind_variants.ClassValue;
39
+ closeButton?: tailwind_variants.ClassValue;
29
40
  content?: tailwind_variants.ClassValue;
41
+ dot?: tailwind_variants.ClassValue;
30
42
  };
31
43
  };
32
44
  } | {}>, {
33
45
  [key: string]: {
34
46
  [key: string]: tailwind_variants.ClassValue | {
47
+ avatar?: tailwind_variants.ClassValue;
35
48
  base?: tailwind_variants.ClassValue;
49
+ closeButton?: tailwind_variants.ClassValue;
36
50
  content?: tailwind_variants.ClassValue;
51
+ dot?: tailwind_variants.ClassValue;
37
52
  };
38
53
  };
39
54
  } | {}, {
55
+ avatar: string;
40
56
  base: string;
57
+ closeButton: string;
41
58
  content: string;
59
+ dot: string;
42
60
  }, tailwind_variants.TVReturnType<unknown, {
61
+ avatar: string;
43
62
  base: string;
63
+ closeButton: string;
44
64
  content: string;
65
+ dot: string;
45
66
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
46
67
  [key: string]: {
47
68
  [key: string]: tailwind_variants.ClassValue | {
69
+ avatar?: tailwind_variants.ClassValue;
48
70
  base?: tailwind_variants.ClassValue;
71
+ closeButton?: tailwind_variants.ClassValue;
49
72
  content?: tailwind_variants.ClassValue;
73
+ dot?: tailwind_variants.ClassValue;
50
74
  };
51
75
  };
52
76
  } | {}>, unknown, unknown, undefined>>;
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk73EN2DZBcjs = require('../chunk-73EN2DZB.cjs');
5
+ var _chunkP2OOL7Q2cjs = require('../chunk-P2OOL7Q2.cjs');
6
6
  require('../chunk-DZUJEN5N.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.Tooltip = _chunk73EN2DZBcjs.Tooltip_default; exports.default = _chunk73EN2DZBcjs.Tooltip_default2; exports.tooltipPlacementOptions = _chunk73EN2DZBcjs.tooltipPlacementOptions;
11
+ exports.Tooltip = _chunkP2OOL7Q2cjs.Tooltip_default; exports.default = _chunkP2OOL7Q2cjs.Tooltip_default2; exports.tooltipPlacementOptions = _chunkP2OOL7Q2cjs.tooltipPlacementOptions;
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { T as Tooltip } from '../Tooltip-B-1BAE62.cjs';
2
- export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-B-1BAE62.cjs';
1
+ import { T as Tooltip } from '../Tooltip-BuPzZLuE.cjs';
2
+ export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-BuPzZLuE.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
@@ -1,5 +1,5 @@
1
- import { T as Tooltip } from '../Tooltip-B-1BAE62.js';
2
- export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-B-1BAE62.js';
1
+ import { T as Tooltip } from '../Tooltip-BuPzZLuE.js';
2
+ export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-BuPzZLuE.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
@@ -2,7 +2,7 @@ import {
2
2
  Tooltip_default,
3
3
  Tooltip_default2,
4
4
  tooltipPlacementOptions
5
- } from "../chunk-62KNHHTT.js";
5
+ } from "../chunk-LK5TIW6E.js";
6
6
  import "../chunk-5WRI5ZAA.js";
7
7
  export {
8
8
  Tooltip_default as Tooltip,
@@ -9,6 +9,7 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
9
9
  [key: string]: tailwind_variants.ClassValue | {
10
10
  base?: tailwind_variants.ClassValue;
11
11
  content?: tailwind_variants.ClassValue;
12
+ wrapper?: tailwind_variants.ClassValue;
12
13
  };
13
14
  };
14
15
  } | {
@@ -16,16 +17,19 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
16
17
  [x: string]: tailwind_variants.ClassValue | {
17
18
  base?: tailwind_variants.ClassValue;
18
19
  content?: tailwind_variants.ClassValue;
20
+ wrapper?: tailwind_variants.ClassValue;
19
21
  };
20
22
  };
21
23
  } | {}, {
22
24
  base: string;
23
25
  content: string;
26
+ wrapper: string;
24
27
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
25
28
  [key: string]: {
26
29
  [key: string]: tailwind_variants.ClassValue | {
27
30
  base?: tailwind_variants.ClassValue;
28
31
  content?: tailwind_variants.ClassValue;
32
+ wrapper?: tailwind_variants.ClassValue;
29
33
  };
30
34
  };
31
35
  } | {}>, {
@@ -33,19 +37,23 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
33
37
  [key: string]: tailwind_variants.ClassValue | {
34
38
  base?: tailwind_variants.ClassValue;
35
39
  content?: tailwind_variants.ClassValue;
40
+ wrapper?: tailwind_variants.ClassValue;
36
41
  };
37
42
  };
38
43
  } | {}, {
39
44
  base: string;
40
45
  content: string;
46
+ wrapper: string;
41
47
  }, tailwind_variants.TVReturnType<unknown, {
42
48
  base: string;
43
49
  content: string;
50
+ wrapper: string;
44
51
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
45
52
  [key: string]: {
46
53
  [key: string]: tailwind_variants.ClassValue | {
47
54
  base?: tailwind_variants.ClassValue;
48
55
  content?: tailwind_variants.ClassValue;
56
+ wrapper?: tailwind_variants.ClassValue;
49
57
  };
50
58
  };
51
59
  } | {}>, unknown, unknown, undefined>>;
@@ -9,6 +9,7 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
9
9
  [key: string]: tailwind_variants.ClassValue | {
10
10
  base?: tailwind_variants.ClassValue;
11
11
  content?: tailwind_variants.ClassValue;
12
+ wrapper?: tailwind_variants.ClassValue;
12
13
  };
13
14
  };
14
15
  } | {
@@ -16,16 +17,19 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
16
17
  [x: string]: tailwind_variants.ClassValue | {
17
18
  base?: tailwind_variants.ClassValue;
18
19
  content?: tailwind_variants.ClassValue;
20
+ wrapper?: tailwind_variants.ClassValue;
19
21
  };
20
22
  };
21
23
  } | {}, {
22
24
  base: string;
23
25
  content: string;
26
+ wrapper: string;
24
27
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
25
28
  [key: string]: {
26
29
  [key: string]: tailwind_variants.ClassValue | {
27
30
  base?: tailwind_variants.ClassValue;
28
31
  content?: tailwind_variants.ClassValue;
32
+ wrapper?: tailwind_variants.ClassValue;
29
33
  };
30
34
  };
31
35
  } | {}>, {
@@ -33,19 +37,23 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
33
37
  [key: string]: tailwind_variants.ClassValue | {
34
38
  base?: tailwind_variants.ClassValue;
35
39
  content?: tailwind_variants.ClassValue;
40
+ wrapper?: tailwind_variants.ClassValue;
36
41
  };
37
42
  };
38
43
  } | {}, {
39
44
  base: string;
40
45
  content: string;
46
+ wrapper: string;
41
47
  }, tailwind_variants.TVReturnType<unknown, {
42
48
  base: string;
43
49
  content: string;
50
+ wrapper: string;
44
51
  }, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
45
52
  [key: string]: {
46
53
  [key: string]: tailwind_variants.ClassValue | {
47
54
  base?: tailwind_variants.ClassValue;
48
55
  content?: tailwind_variants.ClassValue;
56
+ wrapper?: tailwind_variants.ClassValue;
49
57
  };
50
58
  };
51
59
  } | {}>, unknown, unknown, undefined>>;
@@ -4,8 +4,11 @@ import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  var labelVariants = tv({
6
6
  slots: {
7
+ avatar: "",
7
8
  base: "",
8
- content: ""
9
+ closeButton: "",
10
+ content: "",
11
+ dot: ""
9
12
  }
10
13
  });
11
14
  var Label = ({
@@ -43,4 +46,4 @@ export {
43
46
  Label_default,
44
47
  Label_default2
45
48
  };
46
- //# sourceMappingURL=chunk-EFSKM3C4.js.map
49
+ //# sourceMappingURL=chunk-7IGL67EH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n avatar: '',\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** element to be rendered in the left side of the label */\n startContent?: ChipProps['startContent'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)\n */\nconst Label = ({\n children,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n radius = 'full',\n size = 'md',\n startContent = undefined,\n variant = 'solid',\n}: LabelProps) => {\n // classNames from slots\n const variants = labelVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <NextLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n size={size}\n startContent={startContent}\n variant={variant}\n >\n {children}\n </NextLabel>\n );\n};\n\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"],"mappings":";AAIA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,IAAI,4BAA4B;AAqDrC;AAlDG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,KAAK;AAAA,EACP;AACF,CAAC;AA2BD,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AACZ,MAAkB;AAEhB,QAAM,WAAW,cAAc;AAC/B,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;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;ACnEf,IAAOA,iBAAQ;","names":["Label_default"]}
@@ -5,7 +5,8 @@ import { jsx } from "react/jsx-runtime";
5
5
  var tooltipVariants = tv({
6
6
  slots: {
7
7
  base: "",
8
- content: ""
8
+ content: "",
9
+ wrapper: "cursor-pointer"
9
10
  }
10
11
  });
11
12
  var tooltipPlacementOptions = [
@@ -25,7 +26,7 @@ var Tooltip = ({
25
26
  }) => {
26
27
  const variants = tooltipVariants();
27
28
  const classNames = variantsToClassNames(variants, _className, "base");
28
- return /* @__PURE__ */ jsx(
29
+ return /* @__PURE__ */ jsx("span", { className: classNames.wrapper, children: /* @__PURE__ */ jsx(
29
30
  NextTooltip,
30
31
  {
31
32
  classNames,
@@ -37,9 +38,9 @@ var Tooltip = ({
37
38
  placement,
38
39
  shouldFlip: true,
39
40
  showArrow: true,
40
- children: /* @__PURE__ */ jsx("span", { className: "cursor-pointer", children })
41
+ children
41
42
  }
42
- );
43
+ ) });
43
44
  };
44
45
  var Tooltip_default = Tooltip;
45
46
 
@@ -51,4 +52,4 @@ export {
51
52
  Tooltip_default,
52
53
  Tooltip_default2
53
54
  };
54
- //# sourceMappingURL=chunk-62KNHHTT.js.map
55
+ //# sourceMappingURL=chunk-LK5TIW6E.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/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 const tooltipPlacementOptions = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n] as const;\nexport type TooltipPlacement = (typeof tooltipPlacementOptions)[number];\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\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 [NextUI Tooltip](https://nextui.org/docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <span className={classNames.wrapper}>\n <NextTooltip\n classNames={classNames}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n {children}\n </NextTooltip>\n </span>\n );\n};\n\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"],"mappings":";AAGA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AAyDnC;AAtDC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAKM,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAuBA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,MAAoB;AAElB,QAAM,WAAW,gBAAgB;AACjC,QAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;AAEpE,SACE,oBAAC,UAAK,WAAW,WAAW,SAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAER;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,IAAO,kBAAQ;;;ACzEf,IAAOA,mBAAQ;","names":["Tooltip_default"]}
@@ -5,7 +5,8 @@ var _jsxruntime = require('react/jsx-runtime');
5
5
  var tooltipVariants = _pixelutils.tv.call(void 0, {
6
6
  slots: {
7
7
  base: "",
8
- content: ""
8
+ content: "",
9
+ wrapper: "cursor-pointer"
9
10
  }
10
11
  });
11
12
  var tooltipPlacementOptions = [
@@ -25,7 +26,7 @@ var Tooltip = ({
25
26
  }) => {
26
27
  const variants = tooltipVariants();
27
28
  const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, _className, "base");
28
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
29
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: classNames.wrapper, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
29
30
  _tooltip.Tooltip,
30
31
  {
31
32
  classNames,
@@ -37,9 +38,9 @@ var Tooltip = ({
37
38
  placement,
38
39
  shouldFlip: true,
39
40
  showArrow: true,
40
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "cursor-pointer", children })
41
+ children
41
42
  }
42
- );
43
+ ) });
43
44
  };
44
45
  var Tooltip_default = Tooltip;
45
46
 
@@ -51,4 +52,4 @@ var Tooltip_default2 = Tooltip_default;
51
52
 
52
53
 
53
54
  exports.tooltipPlacementOptions = tooltipPlacementOptions; exports.Tooltip_default = Tooltip_default; exports.Tooltip_default2 = Tooltip_default2;
54
- //# sourceMappingURL=chunk-73EN2DZB.cjs.map
55
+ //# sourceMappingURL=chunk-P2OOL7Q2.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":";AAGA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AAyDnC;AAtDC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAKM,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAuBA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,MAAoB;AAElB,QAAM,WAAW,gBAAgB;AACjC,QAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;AAEpE,SACE,oBAAC,UAAK,WAAW,WAAW,SAC1B;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAER;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,IAAO,kBAAQ;;;ACzEf,IAAOA,mBAAQ","sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/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 const tooltipPlacementOptions = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n] as const;\nexport type TooltipPlacement = (typeof tooltipPlacementOptions)[number];\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\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 [NextUI Tooltip](https://nextui.org/docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <span className={classNames.wrapper}>\n <NextTooltip\n classNames={classNames}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n {children}\n </NextTooltip>\n </span>\n );\n};\n\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"]}
@@ -4,8 +4,11 @@ var _pixelutils = require('@fuf-stack/pixel-utils');
4
4
  var _jsxruntime = require('react/jsx-runtime');
5
5
  var labelVariants = _pixelutils.tv.call(void 0, {
6
6
  slots: {
7
+ avatar: "",
7
8
  base: "",
8
- content: ""
9
+ closeButton: "",
10
+ content: "",
11
+ dot: ""
9
12
  }
10
13
  });
11
14
  var Label = ({
@@ -43,4 +46,4 @@ var Label_default2 = Label_default;
43
46
 
44
47
 
45
48
  exports.Label_default = Label_default; exports.Label_default2 = Label_default2;
46
- //# sourceMappingURL=chunk-MMZG5BW3.cjs.map
49
+ //# sourceMappingURL=chunk-YTQJ6FZK.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":";AAIA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,IAAI,4BAA4B;AAqDrC;AAlDG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,KAAK;AAAA,EACP;AACF,CAAC;AA2BD,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AACZ,MAAkB;AAEhB,QAAM,WAAW,cAAc;AAC/B,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;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;ACnEf,IAAOA,iBAAQ","sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n avatar: '',\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** element to be rendered in the left side of the label */\n startContent?: ChipProps['startContent'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)\n */\nconst Label = ({\n children,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n radius = 'full',\n size = 'md',\n startContent = undefined,\n variant = 'solid',\n}: LabelProps) => {\n // classNames from slots\n const variants = labelVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <NextLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n size={size}\n startContent={startContent}\n variant={variant}\n >\n {children}\n </NextLabel>\n );\n};\n\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"]}
package/dist/index.cjs CHANGED
@@ -11,7 +11,7 @@ var _chunkZCA555Q7cjs = require('./chunk-ZCA555Q7.cjs');
11
11
 
12
12
 
13
13
 
14
- var _chunk73EN2DZBcjs = require('./chunk-73EN2DZB.cjs');
14
+ var _chunkP2OOL7Q2cjs = require('./chunk-P2OOL7Q2.cjs');
15
15
 
16
16
 
17
17
 
@@ -42,7 +42,7 @@ var _chunkULZQ45FScjs = require('./chunk-ULZQ45FS.cjs');
42
42
  var _chunkLOFZNVCNcjs = require('./chunk-LOFZNVCN.cjs');
43
43
 
44
44
 
45
- var _chunkMMZG5BW3cjs = require('./chunk-MMZG5BW3.cjs');
45
+ var _chunkYTQJ6FZKcjs = require('./chunk-YTQJ6FZK.cjs');
46
46
  require('./chunk-DZUJEN5N.cjs');
47
47
 
48
48
 
@@ -64,5 +64,5 @@ require('./chunk-DZUJEN5N.cjs');
64
64
 
65
65
 
66
66
 
67
- exports.Accordion = _chunkJ5XN2HATcjs.Accordion_default; exports.Avatar = _chunkHVLEV6BGcjs.Avatar_default; exports.AvatarGroup = _chunkIDGXOP6Ecjs.AvatarGroup_default; exports.Badge = _chunkU2JEMXXJcjs.Badge_default; exports.Button = _chunkLOFZNVCNcjs.Button_default; exports.Card = _chunkJPALSO5Ecjs.Card_default; exports.Json = _chunkULZQ45FScjs.Json_default; exports.Label = _chunkMMZG5BW3cjs.Label_default; exports.Menu = _chunkMJNISFGXcjs.Menu_default; exports.Modal = _chunkVAJODF7Zcjs.Modal_default; exports.Popover = _chunkZCA555Q7cjs.Popover_default; exports.Tooltip = _chunk73EN2DZBcjs.Tooltip_default; exports.accordionVariants = _chunkJ5XN2HATcjs.accordionVariants; exports.buttonVariants = _chunkLOFZNVCNcjs.buttonVariants; exports.cardVariants = _chunkJPALSO5Ecjs.cardVariants; exports.modalVariants = _chunkVAJODF7Zcjs.modalVariants; exports.tooltipPlacementOptions = _chunk73EN2DZBcjs.tooltipPlacementOptions; exports.useDebounce = _chunkMWNBYTRNcjs.useDebounce; exports.useLocalStorage = _chunkMWNBYTRNcjs.useLocalStorage;
67
+ exports.Accordion = _chunkJ5XN2HATcjs.Accordion_default; exports.Avatar = _chunkHVLEV6BGcjs.Avatar_default; exports.AvatarGroup = _chunkIDGXOP6Ecjs.AvatarGroup_default; exports.Badge = _chunkU2JEMXXJcjs.Badge_default; exports.Button = _chunkLOFZNVCNcjs.Button_default; exports.Card = _chunkJPALSO5Ecjs.Card_default; exports.Json = _chunkULZQ45FScjs.Json_default; exports.Label = _chunkYTQJ6FZKcjs.Label_default; exports.Menu = _chunkMJNISFGXcjs.Menu_default; exports.Modal = _chunkVAJODF7Zcjs.Modal_default; exports.Popover = _chunkZCA555Q7cjs.Popover_default; exports.Tooltip = _chunkP2OOL7Q2cjs.Tooltip_default; exports.accordionVariants = _chunkJ5XN2HATcjs.accordionVariants; exports.buttonVariants = _chunkLOFZNVCNcjs.buttonVariants; exports.cardVariants = _chunkJPALSO5Ecjs.cardVariants; exports.modalVariants = _chunkVAJODF7Zcjs.modalVariants; exports.tooltipPlacementOptions = _chunkP2OOL7Q2cjs.tooltipPlacementOptions; exports.useDebounce = _chunkMWNBYTRNcjs.useDebounce; exports.useLocalStorage = _chunkMWNBYTRNcjs.useLocalStorage;
68
68
  //# sourceMappingURL=index.cjs.map
package/dist/index.d.cts CHANGED
@@ -5,11 +5,11 @@ export { A as Badge, B as BadgeProps } from './Badge-2JMThgzp.cjs';
5
5
  export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-8uTuwTxM.cjs';
6
6
  export { C as Card, a as CardProps, c as cardVariants } from './Card-B3zN1NrH.cjs';
7
7
  export { J as Json, a as JsonProps } from './Json-ClGDcbcp.cjs';
8
- export { L as Label, a as LabelProps } from './Label-BpKnEJWi.cjs';
8
+ export { L as Label, a as LabelProps } from './Label-DAK6glI0.cjs';
9
9
  export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-CG5mVVnv.cjs';
10
10
  export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DZHeIvQc.cjs';
11
11
  export { _ as Popover, P as PopoverProps } from './Popover-DbTTk7_N.cjs';
12
- export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-B-1BAE62.cjs';
12
+ export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-BuPzZLuE.cjs';
13
13
  export { useDebounce, useLocalStorage } from './hooks/index.cjs';
14
14
  import 'react/jsx-runtime';
15
15
  import 'tailwind-variants';
package/dist/index.d.ts CHANGED
@@ -5,11 +5,11 @@ export { A as Badge, B as BadgeProps } from './Badge-2JMThgzp.js';
5
5
  export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-8uTuwTxM.js';
6
6
  export { C as Card, a as CardProps, c as cardVariants } from './Card-B3zN1NrH.js';
7
7
  export { J as Json, a as JsonProps } from './Json-ClGDcbcp.js';
8
- export { L as Label, a as LabelProps } from './Label-BpKnEJWi.js';
8
+ export { L as Label, a as LabelProps } from './Label-DAK6glI0.js';
9
9
  export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-CG5mVVnv.js';
10
10
  export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DZHeIvQc.js';
11
11
  export { _ as Popover, P as PopoverProps } from './Popover-DbTTk7_N.js';
12
- export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-B-1BAE62.js';
12
+ export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-BuPzZLuE.js';
13
13
  export { useDebounce, useLocalStorage } from './hooks/index.js';
14
14
  import 'react/jsx-runtime';
15
15
  import 'tailwind-variants';
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  Tooltip_default,
13
13
  tooltipPlacementOptions
14
- } from "./chunk-62KNHHTT.js";
14
+ } from "./chunk-LK5TIW6E.js";
15
15
  import {
16
16
  useDebounce,
17
17
  useLocalStorage
@@ -42,7 +42,7 @@ import {
42
42
  } from "./chunk-EVCVBDO5.js";
43
43
  import {
44
44
  Label_default
45
- } from "./chunk-EFSKM3C4.js";
45
+ } from "./chunk-7IGL67EH.js";
46
46
  import "./chunk-5WRI5ZAA.js";
47
47
  export {
48
48
  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.16.0",
5
+ "version": "0.16.2",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.js",
@@ -130,9 +130,9 @@
130
130
  "react": "18.3.1",
131
131
  "react-dom": "18.3.1",
132
132
  "@repo/storybook-config": "0.0.1",
133
- "@repo/tailwind-config": "0.0.1",
133
+ "@repo/vite-config": "0.0.1",
134
134
  "@repo/tsup-config": "0.0.1",
135
- "@repo/vite-config": "0.0.1"
135
+ "@repo/tailwind-config": "0.0.1"
136
136
  },
137
137
  "scripts": {
138
138
  "build": "tsup --config node_modules/@repo/tsup-config/config.ts --dts-resolve",
@@ -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 { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/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 },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport const tooltipPlacementOptions = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n] as const;\nexport type TooltipPlacement = (typeof tooltipPlacementOptions)[number];\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\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 [NextUI Tooltip](https://nextui.org/docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <NextTooltip\n classNames={classNames}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className=\"cursor-pointer\">{children}</span>\n </NextTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"],"mappings":";AAGA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AAkEnC;AA/DC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;AAKM,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAuBA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,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,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAET,8BAAC,UAAK,WAAU,kBAAkB,UAAS;AAAA;AAAA,EAC7C;AAEJ;AAEA,IAAO,kBAAQ;;;ACtEf,IAAOA,mBAAQ;","names":["Tooltip_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":";AAGA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AAkEnC;AA/DC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;AAKM,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAuBA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,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,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAET,8BAAC,UAAK,WAAU,kBAAkB,UAAS;AAAA;AAAA,EAC7C;AAEJ;AAEA,IAAO,kBAAQ;;;ACtEf,IAAOA,mBAAQ","sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/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 },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport const tooltipPlacementOptions = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n] as const;\nexport type TooltipPlacement = (typeof tooltipPlacementOptions)[number];\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\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 [NextUI Tooltip](https://nextui.org/docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <NextTooltip\n classNames={classNames}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className=\"cursor-pointer\">{children}</span>\n </NextTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n content: '',\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** element to be rendered in the left side of the label */\n startContent?: ChipProps['startContent'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)\n */\nconst Label = ({\n children,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n radius = 'full',\n size = 'md',\n startContent = undefined,\n variant = 'solid',\n}: LabelProps) => {\n // classNames from slots\n const variants = labelVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <NextLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n size={size}\n startContent={startContent}\n variant={variant}\n >\n {children}\n </NextLabel>\n );\n};\n\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"],"mappings":";AAIA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,IAAI,4BAA4B;AAkDrC;AA/CG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;AA2BD,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AACZ,MAAkB;AAEhB,QAAM,WAAW,cAAc;AAC/B,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;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;AChEf,IAAOA,iBAAQ;","names":["Label_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":";AAIA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,IAAI,4BAA4B;AAkDrC;AA/CG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AACF,CAAC;AA2BD,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AACZ,MAAkB;AAEhB,QAAM,WAAW,cAAc;AAC/B,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;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;AChEf,IAAOA,iBAAQ","sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n content: '',\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** element to be rendered in the left side of the label */\n startContent?: ChipProps['startContent'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)\n */\nconst Label = ({\n children,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n radius = 'full',\n size = 'md',\n startContent = undefined,\n variant = 'solid',\n}: LabelProps) => {\n // classNames from slots\n const variants = labelVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <NextLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n size={size}\n startContent={startContent}\n variant={variant}\n >\n {children}\n </NextLabel>\n );\n};\n\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"]}