@fuf-stack/pixels 0.15.4 → 0.16.0
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.
- package/dist/Label/index.cjs +2 -2
- package/dist/Label/index.d.cts +5 -2
- package/dist/Label/index.d.ts +5 -2
- package/dist/Label/index.js +1 -1
- package/dist/Label-BpKnEJWi.d.cts +78 -0
- package/dist/Label-BpKnEJWi.d.ts +78 -0
- package/dist/Tooltip/index.cjs +2 -2
- package/dist/Tooltip/index.d.cts +5 -2
- package/dist/Tooltip/index.d.ts +5 -2
- package/dist/Tooltip/index.js +1 -1
- package/dist/Tooltip-B-1BAE62.d.cts +77 -0
- package/dist/Tooltip-B-1BAE62.d.ts +77 -0
- package/dist/chunk-62KNHHTT.js +54 -0
- package/dist/chunk-62KNHHTT.js.map +1 -0
- package/dist/chunk-73EN2DZB.cjs +54 -0
- package/dist/chunk-73EN2DZB.cjs.map +1 -0
- package/dist/chunk-EFSKM3C4.js +46 -0
- package/dist/chunk-EFSKM3C4.js.map +1 -0
- package/dist/{chunk-DN2BMTWI.cjs → chunk-MMZG5BW3.cjs} +25 -15
- package/dist/chunk-MMZG5BW3.cjs.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/dist/Label-BGMbtZK_.d.cts +0 -28
- package/dist/Label-BGMbtZK_.d.ts +0 -28
- package/dist/Tooltip-D4znH2L3.d.cts +0 -27
- package/dist/Tooltip-D4znH2L3.d.ts +0 -27
- package/dist/chunk-DN2BMTWI.cjs.map +0 -1
- package/dist/chunk-Q5NSBKHR.js +0 -36
- package/dist/chunk-Q5NSBKHR.js.map +0 -1
- package/dist/chunk-RS7HBBUF.cjs +0 -44
- package/dist/chunk-RS7HBBUF.cjs.map +0 -1
- package/dist/chunk-ZN6DLACS.js +0 -44
- package/dist/chunk-ZN6DLACS.js.map +0 -1
package/dist/Label/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkMMZG5BW3cjs = require('../chunk-MMZG5BW3.cjs');
|
|
5
5
|
require('../chunk-DZUJEN5N.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.Label =
|
|
9
|
+
exports.Label = _chunkMMZG5BW3cjs.Label_default; exports.default = _chunkMMZG5BW3cjs.Label_default2;
|
|
10
10
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Label/index.d.cts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { L as Label } from '../Label-
|
|
2
|
-
export { a as LabelProps } from '../Label-
|
|
1
|
+
import { L as Label } from '../Label-BpKnEJWi.cjs';
|
|
2
|
+
export { a as LabelProps } from '../Label-BpKnEJWi.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants/dist/config.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
4
7
|
import '@nextui-org/chip';
|
|
5
8
|
import 'react';
|
|
6
9
|
|
package/dist/Label/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { L as Label } from '../Label-
|
|
2
|
-
export { a as LabelProps } from '../Label-
|
|
1
|
+
import { L as Label } from '../Label-BpKnEJWi.js';
|
|
2
|
+
export { a as LabelProps } from '../Label-BpKnEJWi.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants/dist/config.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
4
7
|
import '@nextui-org/chip';
|
|
5
8
|
import 'react';
|
|
6
9
|
|
package/dist/Label/index.js
CHANGED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
3
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ChipProps } from '@nextui-org/chip';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const labelVariants: tailwind_variants.TVReturnType<{
|
|
9
|
+
[key: string]: {
|
|
10
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
11
|
+
base?: tailwind_variants.ClassValue;
|
|
12
|
+
content?: tailwind_variants.ClassValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
[x: string]: {
|
|
17
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
18
|
+
base?: tailwind_variants.ClassValue;
|
|
19
|
+
content?: tailwind_variants.ClassValue;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
} | {}, {
|
|
23
|
+
base: string;
|
|
24
|
+
content: string;
|
|
25
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
28
|
+
base?: tailwind_variants.ClassValue;
|
|
29
|
+
content?: tailwind_variants.ClassValue;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
} | {}>, {
|
|
33
|
+
[key: string]: {
|
|
34
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
35
|
+
base?: tailwind_variants.ClassValue;
|
|
36
|
+
content?: tailwind_variants.ClassValue;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
} | {}, {
|
|
40
|
+
base: string;
|
|
41
|
+
content: string;
|
|
42
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
|
43
|
+
base: string;
|
|
44
|
+
content: string;
|
|
45
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
48
|
+
base?: tailwind_variants.ClassValue;
|
|
49
|
+
content?: tailwind_variants.ClassValue;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
53
|
+
type VariantProps = TVProps<typeof labelVariants>;
|
|
54
|
+
type ClassName = TVClassName<typeof labelVariants>;
|
|
55
|
+
interface LabelProps extends VariantProps {
|
|
56
|
+
/** content of the label */
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
/** CSS class name */
|
|
59
|
+
className?: ClassName;
|
|
60
|
+
/** color of the label */
|
|
61
|
+
color?: ChipProps['color'];
|
|
62
|
+
/** element to be rendered in the right side of the label */
|
|
63
|
+
endContent?: ChipProps['endContent'];
|
|
64
|
+
/** radius of the label */
|
|
65
|
+
radius?: ChipProps['radius'];
|
|
66
|
+
/** size of the label */
|
|
67
|
+
size?: ChipProps['size'];
|
|
68
|
+
/** element to be rendered in the left side of the label */
|
|
69
|
+
startContent?: ChipProps['startContent'];
|
|
70
|
+
/** style variant of the label */
|
|
71
|
+
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)
|
|
75
|
+
*/
|
|
76
|
+
declare const Label: ({ children, className: _className, color, endContent, radius, size, startContent, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
77
|
+
|
|
78
|
+
export { Label as L, type LabelProps as a };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
3
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ChipProps } from '@nextui-org/chip';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const labelVariants: tailwind_variants.TVReturnType<{
|
|
9
|
+
[key: string]: {
|
|
10
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
11
|
+
base?: tailwind_variants.ClassValue;
|
|
12
|
+
content?: tailwind_variants.ClassValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
[x: string]: {
|
|
17
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
18
|
+
base?: tailwind_variants.ClassValue;
|
|
19
|
+
content?: tailwind_variants.ClassValue;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
} | {}, {
|
|
23
|
+
base: string;
|
|
24
|
+
content: string;
|
|
25
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
28
|
+
base?: tailwind_variants.ClassValue;
|
|
29
|
+
content?: tailwind_variants.ClassValue;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
} | {}>, {
|
|
33
|
+
[key: string]: {
|
|
34
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
35
|
+
base?: tailwind_variants.ClassValue;
|
|
36
|
+
content?: tailwind_variants.ClassValue;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
} | {}, {
|
|
40
|
+
base: string;
|
|
41
|
+
content: string;
|
|
42
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
|
43
|
+
base: string;
|
|
44
|
+
content: string;
|
|
45
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
46
|
+
[key: string]: {
|
|
47
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
48
|
+
base?: tailwind_variants.ClassValue;
|
|
49
|
+
content?: tailwind_variants.ClassValue;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
53
|
+
type VariantProps = TVProps<typeof labelVariants>;
|
|
54
|
+
type ClassName = TVClassName<typeof labelVariants>;
|
|
55
|
+
interface LabelProps extends VariantProps {
|
|
56
|
+
/** content of the label */
|
|
57
|
+
children: ReactNode;
|
|
58
|
+
/** CSS class name */
|
|
59
|
+
className?: ClassName;
|
|
60
|
+
/** color of the label */
|
|
61
|
+
color?: ChipProps['color'];
|
|
62
|
+
/** element to be rendered in the right side of the label */
|
|
63
|
+
endContent?: ChipProps['endContent'];
|
|
64
|
+
/** radius of the label */
|
|
65
|
+
radius?: ChipProps['radius'];
|
|
66
|
+
/** size of the label */
|
|
67
|
+
size?: ChipProps['size'];
|
|
68
|
+
/** element to be rendered in the left side of the label */
|
|
69
|
+
startContent?: ChipProps['startContent'];
|
|
70
|
+
/** style variant of the label */
|
|
71
|
+
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)
|
|
75
|
+
*/
|
|
76
|
+
declare const Label: ({ children, className: _className, color, endContent, radius, size, startContent, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
77
|
+
|
|
78
|
+
export { Label as L, type LabelProps as a };
|
package/dist/Tooltip/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk73EN2DZBcjs = require('../chunk-73EN2DZB.cjs');
|
|
6
6
|
require('../chunk-DZUJEN5N.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.Tooltip =
|
|
11
|
+
exports.Tooltip = _chunk73EN2DZBcjs.Tooltip_default; exports.default = _chunk73EN2DZBcjs.Tooltip_default2; exports.tooltipPlacementOptions = _chunk73EN2DZBcjs.tooltipPlacementOptions;
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Tooltip/index.d.cts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { T as Tooltip } from '../Tooltip-
|
|
2
|
-
export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-
|
|
1
|
+
import { T as Tooltip } from '../Tooltip-B-1BAE62.cjs';
|
|
2
|
+
export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-B-1BAE62.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants/dist/config.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
4
7
|
import 'react';
|
|
5
8
|
|
|
6
9
|
|
package/dist/Tooltip/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { T as Tooltip } from '../Tooltip-
|
|
2
|
-
export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-
|
|
1
|
+
import { T as Tooltip } from '../Tooltip-B-1BAE62.js';
|
|
2
|
+
export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-B-1BAE62.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants/dist/config.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
4
7
|
import 'react';
|
|
5
8
|
|
|
6
9
|
|
package/dist/Tooltip/index.js
CHANGED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
3
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
declare const tooltipVariants: tailwind_variants.TVReturnType<{
|
|
8
|
+
[key: string]: {
|
|
9
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
10
|
+
base?: tailwind_variants.ClassValue;
|
|
11
|
+
content?: tailwind_variants.ClassValue;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
[x: string]: {
|
|
16
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
17
|
+
base?: tailwind_variants.ClassValue;
|
|
18
|
+
content?: tailwind_variants.ClassValue;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | {}, {
|
|
22
|
+
base: string;
|
|
23
|
+
content: string;
|
|
24
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
27
|
+
base?: tailwind_variants.ClassValue;
|
|
28
|
+
content?: tailwind_variants.ClassValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {}>, {
|
|
32
|
+
[key: string]: {
|
|
33
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
34
|
+
base?: tailwind_variants.ClassValue;
|
|
35
|
+
content?: tailwind_variants.ClassValue;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
} | {}, {
|
|
39
|
+
base: string;
|
|
40
|
+
content: string;
|
|
41
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
|
42
|
+
base: string;
|
|
43
|
+
content: string;
|
|
44
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
45
|
+
[key: string]: {
|
|
46
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
47
|
+
base?: tailwind_variants.ClassValue;
|
|
48
|
+
content?: tailwind_variants.ClassValue;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
52
|
+
type VariantProps = TVProps<typeof tooltipVariants>;
|
|
53
|
+
type ClassName = TVClassName<typeof tooltipVariants>;
|
|
54
|
+
declare const tooltipPlacementOptions: readonly ["top", "bottom", "left", "right"];
|
|
55
|
+
type TooltipPlacement = (typeof tooltipPlacementOptions)[number];
|
|
56
|
+
interface TooltipProps extends VariantProps {
|
|
57
|
+
/** trigger child components */
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
/** CSS class name */
|
|
60
|
+
className?: ClassName;
|
|
61
|
+
/** placement padding in px */
|
|
62
|
+
containerPadding?: number;
|
|
63
|
+
/** content displayed in the tooltip */
|
|
64
|
+
content: ReactNode;
|
|
65
|
+
/** open overlay initially when uncontrolled */
|
|
66
|
+
defaultOpen?: boolean;
|
|
67
|
+
/** handler that is called when the overlay's open state changes */
|
|
68
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
69
|
+
/** placement if the tooltip */
|
|
70
|
+
placement?: TooltipPlacement;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Tooltip component based on [NextUI Tooltip](https://nextui.org/docs/components/tooltip)
|
|
74
|
+
*/
|
|
75
|
+
declare const Tooltip: ({ children, className: _className, content, placement, defaultOpen, onOpenChange, containerPadding, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
export { Tooltip as T, type TooltipProps as a, tooltipPlacementOptions as t };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
3
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
declare const tooltipVariants: tailwind_variants.TVReturnType<{
|
|
8
|
+
[key: string]: {
|
|
9
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
10
|
+
base?: tailwind_variants.ClassValue;
|
|
11
|
+
content?: tailwind_variants.ClassValue;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
[x: string]: {
|
|
16
|
+
[x: string]: tailwind_variants.ClassValue | {
|
|
17
|
+
base?: tailwind_variants.ClassValue;
|
|
18
|
+
content?: tailwind_variants.ClassValue;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
} | {}, {
|
|
22
|
+
base: string;
|
|
23
|
+
content: string;
|
|
24
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
25
|
+
[key: string]: {
|
|
26
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
27
|
+
base?: tailwind_variants.ClassValue;
|
|
28
|
+
content?: tailwind_variants.ClassValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {}>, {
|
|
32
|
+
[key: string]: {
|
|
33
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
34
|
+
base?: tailwind_variants.ClassValue;
|
|
35
|
+
content?: tailwind_variants.ClassValue;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
} | {}, {
|
|
39
|
+
base: string;
|
|
40
|
+
content: string;
|
|
41
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
|
42
|
+
base: string;
|
|
43
|
+
content: string;
|
|
44
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
45
|
+
[key: string]: {
|
|
46
|
+
[key: string]: tailwind_variants.ClassValue | {
|
|
47
|
+
base?: tailwind_variants.ClassValue;
|
|
48
|
+
content?: tailwind_variants.ClassValue;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
52
|
+
type VariantProps = TVProps<typeof tooltipVariants>;
|
|
53
|
+
type ClassName = TVClassName<typeof tooltipVariants>;
|
|
54
|
+
declare const tooltipPlacementOptions: readonly ["top", "bottom", "left", "right"];
|
|
55
|
+
type TooltipPlacement = (typeof tooltipPlacementOptions)[number];
|
|
56
|
+
interface TooltipProps extends VariantProps {
|
|
57
|
+
/** trigger child components */
|
|
58
|
+
children: ReactNode;
|
|
59
|
+
/** CSS class name */
|
|
60
|
+
className?: ClassName;
|
|
61
|
+
/** placement padding in px */
|
|
62
|
+
containerPadding?: number;
|
|
63
|
+
/** content displayed in the tooltip */
|
|
64
|
+
content: ReactNode;
|
|
65
|
+
/** open overlay initially when uncontrolled */
|
|
66
|
+
defaultOpen?: boolean;
|
|
67
|
+
/** handler that is called when the overlay's open state changes */
|
|
68
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
69
|
+
/** placement if the tooltip */
|
|
70
|
+
placement?: TooltipPlacement;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Tooltip component based on [NextUI Tooltip](https://nextui.org/docs/components/tooltip)
|
|
74
|
+
*/
|
|
75
|
+
declare const Tooltip: ({ children, className: _className, content, placement, defaultOpen, onOpenChange, containerPadding, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
export { Tooltip as T, type TooltipProps as a, tooltipPlacementOptions as t };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// src/Tooltip/Tooltip.tsx
|
|
2
|
+
import { Tooltip as NextTooltip } from "@nextui-org/tooltip";
|
|
3
|
+
import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var tooltipVariants = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
base: "",
|
|
8
|
+
content: ""
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var tooltipPlacementOptions = [
|
|
12
|
+
"top",
|
|
13
|
+
"bottom",
|
|
14
|
+
"left",
|
|
15
|
+
"right"
|
|
16
|
+
];
|
|
17
|
+
var Tooltip = ({
|
|
18
|
+
children,
|
|
19
|
+
className: _className = void 0,
|
|
20
|
+
content,
|
|
21
|
+
placement = "top",
|
|
22
|
+
defaultOpen = false,
|
|
23
|
+
onOpenChange = void 0,
|
|
24
|
+
containerPadding = 0
|
|
25
|
+
}) => {
|
|
26
|
+
const variants = tooltipVariants();
|
|
27
|
+
const classNames = variantsToClassNames(variants, _className, "base");
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
NextTooltip,
|
|
30
|
+
{
|
|
31
|
+
classNames,
|
|
32
|
+
containerPadding,
|
|
33
|
+
content,
|
|
34
|
+
defaultOpen,
|
|
35
|
+
onClick: (e) => e.preventDefault(),
|
|
36
|
+
onOpenChange,
|
|
37
|
+
placement,
|
|
38
|
+
shouldFlip: true,
|
|
39
|
+
showArrow: true,
|
|
40
|
+
children: /* @__PURE__ */ jsx("span", { className: "cursor-pointer", children })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
var Tooltip_default = Tooltip;
|
|
45
|
+
|
|
46
|
+
// src/Tooltip/index.ts
|
|
47
|
+
var Tooltip_default2 = Tooltip_default;
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
tooltipPlacementOptions,
|
|
51
|
+
Tooltip_default,
|
|
52
|
+
Tooltip_default2
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=chunk-62KNHHTT.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 },\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"]}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/Tooltip/Tooltip.tsx
|
|
2
|
+
var _tooltip = require('@nextui-org/tooltip');
|
|
3
|
+
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
4
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
5
|
+
var tooltipVariants = _pixelutils.tv.call(void 0, {
|
|
6
|
+
slots: {
|
|
7
|
+
base: "",
|
|
8
|
+
content: ""
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var tooltipPlacementOptions = [
|
|
12
|
+
"top",
|
|
13
|
+
"bottom",
|
|
14
|
+
"left",
|
|
15
|
+
"right"
|
|
16
|
+
];
|
|
17
|
+
var Tooltip = ({
|
|
18
|
+
children,
|
|
19
|
+
className: _className = void 0,
|
|
20
|
+
content,
|
|
21
|
+
placement = "top",
|
|
22
|
+
defaultOpen = false,
|
|
23
|
+
onOpenChange = void 0,
|
|
24
|
+
containerPadding = 0
|
|
25
|
+
}) => {
|
|
26
|
+
const variants = tooltipVariants();
|
|
27
|
+
const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, _className, "base");
|
|
28
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
29
|
+
_tooltip.Tooltip,
|
|
30
|
+
{
|
|
31
|
+
classNames,
|
|
32
|
+
containerPadding,
|
|
33
|
+
content,
|
|
34
|
+
defaultOpen,
|
|
35
|
+
onClick: (e) => e.preventDefault(),
|
|
36
|
+
onOpenChange,
|
|
37
|
+
placement,
|
|
38
|
+
shouldFlip: true,
|
|
39
|
+
showArrow: true,
|
|
40
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "cursor-pointer", children })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
};
|
|
44
|
+
var Tooltip_default = Tooltip;
|
|
45
|
+
|
|
46
|
+
// src/Tooltip/index.ts
|
|
47
|
+
var Tooltip_default2 = Tooltip_default;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
exports.tooltipPlacementOptions = tooltipPlacementOptions; exports.Tooltip_default = Tooltip_default; exports.Tooltip_default2 = Tooltip_default2;
|
|
54
|
+
//# sourceMappingURL=chunk-73EN2DZB.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;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"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// src/Label/Label.tsx
|
|
2
|
+
import { Chip as NextLabel } from "@nextui-org/chip";
|
|
3
|
+
import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var labelVariants = tv({
|
|
6
|
+
slots: {
|
|
7
|
+
base: "",
|
|
8
|
+
content: ""
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
var Label = ({
|
|
12
|
+
children,
|
|
13
|
+
className: _className = void 0,
|
|
14
|
+
color = "default",
|
|
15
|
+
endContent = void 0,
|
|
16
|
+
radius = "full",
|
|
17
|
+
size = "md",
|
|
18
|
+
startContent = void 0,
|
|
19
|
+
variant = "solid"
|
|
20
|
+
}) => {
|
|
21
|
+
const variants = labelVariants();
|
|
22
|
+
const classNames = variantsToClassNames(variants, _className, "base");
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
NextLabel,
|
|
25
|
+
{
|
|
26
|
+
classNames,
|
|
27
|
+
color,
|
|
28
|
+
endContent,
|
|
29
|
+
radius,
|
|
30
|
+
size,
|
|
31
|
+
startContent,
|
|
32
|
+
variant,
|
|
33
|
+
children
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
var Label_default = Label;
|
|
38
|
+
|
|
39
|
+
// src/Label/index.ts
|
|
40
|
+
var Label_default2 = Label_default;
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
Label_default,
|
|
44
|
+
Label_default2
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=chunk-EFSKM3C4.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 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"]}
|
|
@@ -2,28 +2,38 @@
|
|
|
2
2
|
var _chip = require('@nextui-org/chip');
|
|
3
3
|
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
4
4
|
var _jsxruntime = require('react/jsx-runtime');
|
|
5
|
+
var labelVariants = _pixelutils.tv.call(void 0, {
|
|
6
|
+
slots: {
|
|
7
|
+
base: "",
|
|
8
|
+
content: ""
|
|
9
|
+
}
|
|
10
|
+
});
|
|
5
11
|
var Label = ({
|
|
6
12
|
children,
|
|
7
|
-
className = void 0,
|
|
13
|
+
className: _className = void 0,
|
|
8
14
|
color = "default",
|
|
9
15
|
endContent = void 0,
|
|
10
16
|
radius = "full",
|
|
11
17
|
size = "md",
|
|
12
18
|
startContent = void 0,
|
|
13
19
|
variant = "solid"
|
|
14
|
-
}) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
}) => {
|
|
21
|
+
const variants = labelVariants();
|
|
22
|
+
const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, _className, "base");
|
|
23
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24
|
+
_chip.Chip,
|
|
25
|
+
{
|
|
26
|
+
classNames,
|
|
27
|
+
color,
|
|
28
|
+
endContent,
|
|
29
|
+
radius,
|
|
30
|
+
size,
|
|
31
|
+
startContent,
|
|
32
|
+
variant,
|
|
33
|
+
children
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
27
37
|
var Label_default = Label;
|
|
28
38
|
|
|
29
39
|
// src/Label/index.ts
|
|
@@ -33,4 +43,4 @@ var Label_default2 = Label_default;
|
|
|
33
43
|
|
|
34
44
|
|
|
35
45
|
exports.Label_default = Label_default; exports.Label_default2 = Label_default2;
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
46
|
+
//# sourceMappingURL=chunk-MMZG5BW3.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;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"]}
|
package/dist/index.cjs
CHANGED
|
@@ -11,7 +11,7 @@ var _chunkZCA555Q7cjs = require('./chunk-ZCA555Q7.cjs');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk73EN2DZBcjs = require('./chunk-73EN2DZB.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
|
|
45
|
+
var _chunkMMZG5BW3cjs = require('./chunk-MMZG5BW3.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 =
|
|
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;
|
|
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-
|
|
8
|
+
export { L as Label, a as LabelProps } from './Label-BpKnEJWi.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-
|
|
12
|
+
export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-B-1BAE62.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-
|
|
8
|
+
export { L as Label, a as LabelProps } from './Label-BpKnEJWi.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-
|
|
12
|
+
export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-B-1BAE62.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-
|
|
14
|
+
} from "./chunk-62KNHHTT.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-
|
|
45
|
+
} from "./chunk-EFSKM3C4.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.
|
|
5
|
+
"version": "0.16.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@nextui-org/tooltip": "2.0.35",
|
|
121
121
|
"react-icons": "5.2.1",
|
|
122
122
|
"react-json-view": "1.21.3",
|
|
123
|
-
"@fuf-stack/pixel-utils": "0.0.
|
|
123
|
+
"@fuf-stack/pixel-utils": "0.0.2"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@types/debug": "4.1.12",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ChipProps } from '@nextui-org/chip';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
interface LabelProps {
|
|
6
|
-
/** content of the label */
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
/** CSS class name */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** color of the label */
|
|
11
|
-
color?: ChipProps['color'];
|
|
12
|
-
/** element to be rendered in the right side of the label */
|
|
13
|
-
endContent?: ChipProps['endContent'];
|
|
14
|
-
/** radius of the label */
|
|
15
|
-
radius?: ChipProps['radius'];
|
|
16
|
-
/** size of the label */
|
|
17
|
-
size?: ChipProps['size'];
|
|
18
|
-
/** element to be rendered in the left side of the label */
|
|
19
|
-
startContent?: ChipProps['startContent'];
|
|
20
|
-
/** style variant of the label */
|
|
21
|
-
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)
|
|
25
|
-
*/
|
|
26
|
-
declare const Label: ({ children, className, color, endContent, radius, size, startContent, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { Label as L, type LabelProps as a };
|
package/dist/Label-BGMbtZK_.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ChipProps } from '@nextui-org/chip';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
|
|
5
|
-
interface LabelProps {
|
|
6
|
-
/** content of the label */
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
/** CSS class name */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** color of the label */
|
|
11
|
-
color?: ChipProps['color'];
|
|
12
|
-
/** element to be rendered in the right side of the label */
|
|
13
|
-
endContent?: ChipProps['endContent'];
|
|
14
|
-
/** radius of the label */
|
|
15
|
-
radius?: ChipProps['radius'];
|
|
16
|
-
/** size of the label */
|
|
17
|
-
size?: ChipProps['size'];
|
|
18
|
-
/** element to be rendered in the left side of the label */
|
|
19
|
-
startContent?: ChipProps['startContent'];
|
|
20
|
-
/** style variant of the label */
|
|
21
|
-
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)
|
|
25
|
-
*/
|
|
26
|
-
declare const Label: ({ children, className, color, endContent, radius, size, startContent, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
-
|
|
28
|
-
export { Label as L, type LabelProps as a };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
declare const tooltipPlacementOptions: readonly ["top", "bottom", "left", "right"];
|
|
5
|
-
type TooltipPlacement = (typeof tooltipPlacementOptions)[number];
|
|
6
|
-
interface TooltipProps {
|
|
7
|
-
/** trigger child components */
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
/** CSS class name */
|
|
10
|
-
className?: string;
|
|
11
|
-
/** placement padding in px */
|
|
12
|
-
containerPadding?: number;
|
|
13
|
-
/** content displayed in the tooltip */
|
|
14
|
-
content: ReactNode;
|
|
15
|
-
/** open overlay initially when uncontrolled */
|
|
16
|
-
defaultOpen?: boolean;
|
|
17
|
-
/** handler that is called when the overlay's open state changes */
|
|
18
|
-
onOpenChange?: (isOpen: boolean) => void;
|
|
19
|
-
/** placement if the tooltip */
|
|
20
|
-
placement?: TooltipPlacement;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Tooltip component based on [NextUI Tooltip](https://nextui.org/docs/components/tooltip)
|
|
24
|
-
*/
|
|
25
|
-
declare const Tooltip: ({ children, className, content, placement, defaultOpen, onOpenChange, containerPadding, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
-
|
|
27
|
-
export { Tooltip as T, type TooltipProps as a, tooltipPlacementOptions as t };
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
declare const tooltipPlacementOptions: readonly ["top", "bottom", "left", "right"];
|
|
5
|
-
type TooltipPlacement = (typeof tooltipPlacementOptions)[number];
|
|
6
|
-
interface TooltipProps {
|
|
7
|
-
/** trigger child components */
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
/** CSS class name */
|
|
10
|
-
className?: string;
|
|
11
|
-
/** placement padding in px */
|
|
12
|
-
containerPadding?: number;
|
|
13
|
-
/** content displayed in the tooltip */
|
|
14
|
-
content: ReactNode;
|
|
15
|
-
/** open overlay initially when uncontrolled */
|
|
16
|
-
defaultOpen?: boolean;
|
|
17
|
-
/** handler that is called when the overlay's open state changes */
|
|
18
|
-
onOpenChange?: (isOpen: boolean) => void;
|
|
19
|
-
/** placement if the tooltip */
|
|
20
|
-
placement?: TooltipPlacement;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Tooltip component based on [NextUI Tooltip](https://nextui.org/docs/components/tooltip)
|
|
24
|
-
*/
|
|
25
|
-
declare const Tooltip: ({ children, className, content, placement, defaultOpen, onOpenChange, containerPadding, }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
26
|
-
|
|
27
|
-
export { Tooltip as T, type TooltipProps as a, tooltipPlacementOptions as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":";AAGA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,UAAU;AAkCjB;AAVF,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AACZ,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAGF,IAAO,gBAAQ;;;AC9Cf,IAAOA,iBAAQ","sourcesContent":["import type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nexport interface LabelProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: string;\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 = undefined,\n color = 'default',\n endContent = undefined,\n radius = 'full',\n size = 'md',\n startContent = undefined,\n variant = 'solid',\n}: LabelProps) => (\n <NextLabel\n className={cn(className)}\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\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"]}
|
package/dist/chunk-Q5NSBKHR.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
// src/Label/Label.tsx
|
|
2
|
-
import { Chip as NextLabel } from "@nextui-org/chip";
|
|
3
|
-
import { cn } from "@fuf-stack/pixel-utils";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var Label = ({
|
|
6
|
-
children,
|
|
7
|
-
className = void 0,
|
|
8
|
-
color = "default",
|
|
9
|
-
endContent = void 0,
|
|
10
|
-
radius = "full",
|
|
11
|
-
size = "md",
|
|
12
|
-
startContent = void 0,
|
|
13
|
-
variant = "solid"
|
|
14
|
-
}) => /* @__PURE__ */ jsx(
|
|
15
|
-
NextLabel,
|
|
16
|
-
{
|
|
17
|
-
className: cn(className),
|
|
18
|
-
color,
|
|
19
|
-
endContent,
|
|
20
|
-
radius,
|
|
21
|
-
size,
|
|
22
|
-
startContent,
|
|
23
|
-
variant,
|
|
24
|
-
children
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
var Label_default = Label;
|
|
28
|
-
|
|
29
|
-
// src/Label/index.ts
|
|
30
|
-
var Label_default2 = Label_default;
|
|
31
|
-
|
|
32
|
-
export {
|
|
33
|
-
Label_default,
|
|
34
|
-
Label_default2
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=chunk-Q5NSBKHR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"sourcesContent":["import type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\n\nimport { cn } from '@fuf-stack/pixel-utils';\n\nexport interface LabelProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: string;\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 = undefined,\n color = 'default',\n endContent = undefined,\n radius = 'full',\n size = 'md',\n startContent = undefined,\n variant = 'solid',\n}: LabelProps) => (\n <NextLabel\n className={cn(className)}\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\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"],"mappings":";AAGA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,UAAU;AAkCjB;AAVF,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,EACT,OAAO;AAAA,EACP,eAAe;AAAA,EACf,UAAU;AACZ,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAGF,IAAO,gBAAQ;;;AC9Cf,IAAOA,iBAAQ;","names":["Label_default"]}
|
package/dist/chunk-RS7HBBUF.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/Tooltip/Tooltip.tsx
|
|
2
|
-
var _tooltip = require('@nextui-org/tooltip');
|
|
3
|
-
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
4
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
5
|
-
var tooltipPlacementOptions = [
|
|
6
|
-
"top",
|
|
7
|
-
"bottom",
|
|
8
|
-
"left",
|
|
9
|
-
"right"
|
|
10
|
-
];
|
|
11
|
-
var Tooltip = ({
|
|
12
|
-
children,
|
|
13
|
-
className = void 0,
|
|
14
|
-
content,
|
|
15
|
-
placement = "top",
|
|
16
|
-
defaultOpen = false,
|
|
17
|
-
onOpenChange = void 0,
|
|
18
|
-
containerPadding = 0
|
|
19
|
-
}) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
20
|
-
_tooltip.Tooltip,
|
|
21
|
-
{
|
|
22
|
-
className: _pixelutils.cn.call(void 0, className),
|
|
23
|
-
containerPadding,
|
|
24
|
-
content,
|
|
25
|
-
defaultOpen,
|
|
26
|
-
onClick: (e) => e.preventDefault(),
|
|
27
|
-
onOpenChange,
|
|
28
|
-
placement,
|
|
29
|
-
shouldFlip: true,
|
|
30
|
-
showArrow: true,
|
|
31
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "cursor-pointer", children })
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
var Tooltip_default = Tooltip;
|
|
35
|
-
|
|
36
|
-
// src/Tooltip/index.ts
|
|
37
|
-
var Tooltip_default2 = Tooltip_default;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
exports.tooltipPlacementOptions = tooltipPlacementOptions; exports.Tooltip_default = Tooltip_default; exports.Tooltip_default2 = Tooltip_default2;
|
|
44
|
-
//# sourceMappingURL=chunk-RS7HBBUF.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":";AAEA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,UAAU;AAkDf;AAhDG,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAuBA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,IACjC;AAAA,IACA;AAAA,IACA,YAAU;AAAA,IACV,WAAS;AAAA,IAET,8BAAC,UAAK,WAAU,kBAAkB,UAAS;AAAA;AAC7C;AAGF,IAAO,kBAAQ;;;ACpDf,IAAOA,mBAAQ","sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/tooltip';\n\nimport { cn } from '@fuf-stack/pixel-utils';\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 {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: string;\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 = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => (\n <NextTooltip\n className={cn(className)}\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\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"]}
|
package/dist/chunk-ZN6DLACS.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// src/Tooltip/Tooltip.tsx
|
|
2
|
-
import { Tooltip as NextTooltip } from "@nextui-org/tooltip";
|
|
3
|
-
import { cn } from "@fuf-stack/pixel-utils";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
var tooltipPlacementOptions = [
|
|
6
|
-
"top",
|
|
7
|
-
"bottom",
|
|
8
|
-
"left",
|
|
9
|
-
"right"
|
|
10
|
-
];
|
|
11
|
-
var Tooltip = ({
|
|
12
|
-
children,
|
|
13
|
-
className = void 0,
|
|
14
|
-
content,
|
|
15
|
-
placement = "top",
|
|
16
|
-
defaultOpen = false,
|
|
17
|
-
onOpenChange = void 0,
|
|
18
|
-
containerPadding = 0
|
|
19
|
-
}) => /* @__PURE__ */ jsx(
|
|
20
|
-
NextTooltip,
|
|
21
|
-
{
|
|
22
|
-
className: cn(className),
|
|
23
|
-
containerPadding,
|
|
24
|
-
content,
|
|
25
|
-
defaultOpen,
|
|
26
|
-
onClick: (e) => e.preventDefault(),
|
|
27
|
-
onOpenChange,
|
|
28
|
-
placement,
|
|
29
|
-
shouldFlip: true,
|
|
30
|
-
showArrow: true,
|
|
31
|
-
children: /* @__PURE__ */ jsx("span", { className: "cursor-pointer", children })
|
|
32
|
-
}
|
|
33
|
-
);
|
|
34
|
-
var Tooltip_default = Tooltip;
|
|
35
|
-
|
|
36
|
-
// src/Tooltip/index.ts
|
|
37
|
-
var Tooltip_default2 = Tooltip_default;
|
|
38
|
-
|
|
39
|
-
export {
|
|
40
|
-
tooltipPlacementOptions,
|
|
41
|
-
Tooltip_default,
|
|
42
|
-
Tooltip_default2
|
|
43
|
-
};
|
|
44
|
-
//# sourceMappingURL=chunk-ZN6DLACS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/tooltip';\n\nimport { cn } from '@fuf-stack/pixel-utils';\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 {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: string;\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 = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => (\n <NextTooltip\n className={cn(className)}\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\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":";AAEA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,UAAU;AAkDf;AAhDG,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAuBA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,IACjC;AAAA,IACA;AAAA,IACA,YAAU;AAAA,IACV,WAAS;AAAA,IAET,8BAAC,UAAK,WAAU,kBAAkB,UAAS;AAAA;AAC7C;AAGF,IAAO,kBAAQ;;;ACpDf,IAAOA,mBAAQ;","names":["Tooltip_default"]}
|