@fuf-stack/pixels 0.39.1 → 0.39.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.
- package/dist/Label/index.cjs +2 -2
- package/dist/Label/index.d.cts +3 -3
- package/dist/Label/index.d.ts +3 -3
- package/dist/Label/index.js +1 -1
- package/dist/Label-Do4CCE7E.d.cts +152 -0
- package/dist/Label-Do4CCE7E.d.ts +152 -0
- package/dist/{chunk-NQVSANDI.js → chunk-COETB4MT.js} +30 -9
- package/dist/chunk-COETB4MT.js.map +1 -0
- package/dist/{chunk-2XYKRMUN.cjs → chunk-YCVYLEC5.cjs} +29 -8
- package/dist/chunk-YCVYLEC5.cjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
- package/dist/Label-BH0taC2T.d.cts +0 -102
- package/dist/Label-BH0taC2T.d.ts +0 -102
- package/dist/chunk-2XYKRMUN.cjs.map +0 -1
- package/dist/chunk-NQVSANDI.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 _chunkYCVYLEC5cjs = require('../chunk-YCVYLEC5.cjs');
|
|
5
5
|
require('../chunk-D4TLDLEX.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.Label =
|
|
9
|
+
exports.Label = _chunkYCVYLEC5cjs.Label_default; exports.default = _chunkYCVYLEC5cjs.Label_default2;
|
|
10
10
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Label/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { L as Label } from '../Label-
|
|
2
|
-
export { a as LabelProps } from '../Label-
|
|
1
|
+
import { L as Label } from '../Label-Do4CCE7E.cjs';
|
|
2
|
+
export { a as LabelProps } from '../Label-Do4CCE7E.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import 'tailwind-variants/dist/config.js';
|
|
5
4
|
import 'tailwind-variants';
|
|
5
|
+
import 'tailwind-variants/dist/config.js';
|
|
6
6
|
import '@fuf-stack/pixel-utils';
|
|
7
7
|
import '@heroui/chip';
|
|
8
8
|
import 'react';
|
package/dist/Label/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { L as Label } from '../Label-
|
|
2
|
-
export { a as LabelProps } from '../Label-
|
|
1
|
+
import { L as Label } from '../Label-Do4CCE7E.js';
|
|
2
|
+
export { a as LabelProps } from '../Label-Do4CCE7E.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import 'tailwind-variants/dist/config.js';
|
|
5
4
|
import 'tailwind-variants';
|
|
5
|
+
import 'tailwind-variants/dist/config.js';
|
|
6
6
|
import '@fuf-stack/pixel-utils';
|
|
7
7
|
import '@heroui/chip';
|
|
8
8
|
import 'react';
|
package/dist/Label/index.js
CHANGED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ChipProps } from '@heroui/chip';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const labelVariants: tailwind_variants.TVReturnType<{
|
|
9
|
+
isIconOnly: {
|
|
10
|
+
true: {
|
|
11
|
+
content: string;
|
|
12
|
+
};
|
|
13
|
+
false: {
|
|
14
|
+
content: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
hasEndContent: {
|
|
18
|
+
true: {
|
|
19
|
+
base: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
base: string;
|
|
24
|
+
closeButton: string;
|
|
25
|
+
content: string;
|
|
26
|
+
dot: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
29
|
+
isIconOnly: {
|
|
30
|
+
true: {
|
|
31
|
+
content: string;
|
|
32
|
+
};
|
|
33
|
+
false: {
|
|
34
|
+
content: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
hasEndContent: {
|
|
38
|
+
true: {
|
|
39
|
+
base: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
isIconOnly: {
|
|
44
|
+
true: {
|
|
45
|
+
content: string;
|
|
46
|
+
};
|
|
47
|
+
false: {
|
|
48
|
+
content: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
hasEndContent: {
|
|
52
|
+
true: {
|
|
53
|
+
base: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}>, {
|
|
57
|
+
isIconOnly: {
|
|
58
|
+
true: {
|
|
59
|
+
content: string;
|
|
60
|
+
};
|
|
61
|
+
false: {
|
|
62
|
+
content: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
hasEndContent: {
|
|
66
|
+
true: {
|
|
67
|
+
base: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
base: string;
|
|
72
|
+
closeButton: string;
|
|
73
|
+
content: string;
|
|
74
|
+
dot: string;
|
|
75
|
+
icon: string;
|
|
76
|
+
}, tailwind_variants.TVReturnType<{
|
|
77
|
+
isIconOnly: {
|
|
78
|
+
true: {
|
|
79
|
+
content: string;
|
|
80
|
+
};
|
|
81
|
+
false: {
|
|
82
|
+
content: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
hasEndContent: {
|
|
86
|
+
true: {
|
|
87
|
+
base: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
base: string;
|
|
92
|
+
closeButton: string;
|
|
93
|
+
content: string;
|
|
94
|
+
dot: string;
|
|
95
|
+
icon: string;
|
|
96
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
97
|
+
isIconOnly: {
|
|
98
|
+
true: {
|
|
99
|
+
content: string;
|
|
100
|
+
};
|
|
101
|
+
false: {
|
|
102
|
+
content: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
hasEndContent: {
|
|
106
|
+
true: {
|
|
107
|
+
base: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
isIconOnly: {
|
|
112
|
+
true: {
|
|
113
|
+
content: string;
|
|
114
|
+
};
|
|
115
|
+
false: {
|
|
116
|
+
content: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
hasEndContent: {
|
|
120
|
+
true: {
|
|
121
|
+
base: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}>, unknown, unknown, undefined>>;
|
|
125
|
+
type VariantProps = TVProps<typeof labelVariants>;
|
|
126
|
+
type ClassName = TVClassName<typeof labelVariants>;
|
|
127
|
+
interface LabelProps extends VariantProps {
|
|
128
|
+
/** content of the label */
|
|
129
|
+
children: ReactNode;
|
|
130
|
+
/** CSS class name */
|
|
131
|
+
className?: ClassName;
|
|
132
|
+
/** color of the label */
|
|
133
|
+
color?: ChipProps['color'];
|
|
134
|
+
/** element to be rendered in the right side of the label */
|
|
135
|
+
endContent?: ChipProps['endContent'];
|
|
136
|
+
/** optional label icon, when only icon provided without children and endContent */
|
|
137
|
+
icon?: ReactNode;
|
|
138
|
+
/** add close button to endContent */
|
|
139
|
+
onClose?: ChipProps['onClose'];
|
|
140
|
+
/** radius of the label */
|
|
141
|
+
radius?: ChipProps['radius'];
|
|
142
|
+
/** size of the label */
|
|
143
|
+
size?: ChipProps['size'];
|
|
144
|
+
/** style variant of the label */
|
|
145
|
+
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)
|
|
149
|
+
*/
|
|
150
|
+
declare const Label: ({ children, className: _className, color, endContent, icon, onClose, radius, size, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
export { Label as L, type LabelProps as a };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
+
import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
|
|
5
|
+
import { ChipProps } from '@heroui/chip';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const labelVariants: tailwind_variants.TVReturnType<{
|
|
9
|
+
isIconOnly: {
|
|
10
|
+
true: {
|
|
11
|
+
content: string;
|
|
12
|
+
};
|
|
13
|
+
false: {
|
|
14
|
+
content: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
hasEndContent: {
|
|
18
|
+
true: {
|
|
19
|
+
base: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
base: string;
|
|
24
|
+
closeButton: string;
|
|
25
|
+
content: string;
|
|
26
|
+
dot: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
29
|
+
isIconOnly: {
|
|
30
|
+
true: {
|
|
31
|
+
content: string;
|
|
32
|
+
};
|
|
33
|
+
false: {
|
|
34
|
+
content: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
hasEndContent: {
|
|
38
|
+
true: {
|
|
39
|
+
base: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
}, {
|
|
43
|
+
isIconOnly: {
|
|
44
|
+
true: {
|
|
45
|
+
content: string;
|
|
46
|
+
};
|
|
47
|
+
false: {
|
|
48
|
+
content: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
hasEndContent: {
|
|
52
|
+
true: {
|
|
53
|
+
base: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
}>, {
|
|
57
|
+
isIconOnly: {
|
|
58
|
+
true: {
|
|
59
|
+
content: string;
|
|
60
|
+
};
|
|
61
|
+
false: {
|
|
62
|
+
content: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
hasEndContent: {
|
|
66
|
+
true: {
|
|
67
|
+
base: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
}, {
|
|
71
|
+
base: string;
|
|
72
|
+
closeButton: string;
|
|
73
|
+
content: string;
|
|
74
|
+
dot: string;
|
|
75
|
+
icon: string;
|
|
76
|
+
}, tailwind_variants.TVReturnType<{
|
|
77
|
+
isIconOnly: {
|
|
78
|
+
true: {
|
|
79
|
+
content: string;
|
|
80
|
+
};
|
|
81
|
+
false: {
|
|
82
|
+
content: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
hasEndContent: {
|
|
86
|
+
true: {
|
|
87
|
+
base: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
}, {
|
|
91
|
+
base: string;
|
|
92
|
+
closeButton: string;
|
|
93
|
+
content: string;
|
|
94
|
+
dot: string;
|
|
95
|
+
icon: string;
|
|
96
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
97
|
+
isIconOnly: {
|
|
98
|
+
true: {
|
|
99
|
+
content: string;
|
|
100
|
+
};
|
|
101
|
+
false: {
|
|
102
|
+
content: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
hasEndContent: {
|
|
106
|
+
true: {
|
|
107
|
+
base: string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}, {
|
|
111
|
+
isIconOnly: {
|
|
112
|
+
true: {
|
|
113
|
+
content: string;
|
|
114
|
+
};
|
|
115
|
+
false: {
|
|
116
|
+
content: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
hasEndContent: {
|
|
120
|
+
true: {
|
|
121
|
+
base: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}>, unknown, unknown, undefined>>;
|
|
125
|
+
type VariantProps = TVProps<typeof labelVariants>;
|
|
126
|
+
type ClassName = TVClassName<typeof labelVariants>;
|
|
127
|
+
interface LabelProps extends VariantProps {
|
|
128
|
+
/** content of the label */
|
|
129
|
+
children: ReactNode;
|
|
130
|
+
/** CSS class name */
|
|
131
|
+
className?: ClassName;
|
|
132
|
+
/** color of the label */
|
|
133
|
+
color?: ChipProps['color'];
|
|
134
|
+
/** element to be rendered in the right side of the label */
|
|
135
|
+
endContent?: ChipProps['endContent'];
|
|
136
|
+
/** optional label icon, when only icon provided without children and endContent */
|
|
137
|
+
icon?: ReactNode;
|
|
138
|
+
/** add close button to endContent */
|
|
139
|
+
onClose?: ChipProps['onClose'];
|
|
140
|
+
/** radius of the label */
|
|
141
|
+
radius?: ChipProps['radius'];
|
|
142
|
+
/** size of the label */
|
|
143
|
+
size?: ChipProps['size'];
|
|
144
|
+
/** style variant of the label */
|
|
145
|
+
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)
|
|
149
|
+
*/
|
|
150
|
+
declare const Label: ({ children, className: _className, color, endContent, icon, onClose, radius, size, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
export { Label as L, type LabelProps as a };
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
// src/Label/Label.tsx
|
|
2
2
|
import { Chip as HeroLabel } from "@heroui/chip";
|
|
3
3
|
import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
var labelVariants = tv({
|
|
6
6
|
slots: {
|
|
7
|
-
avatar: "",
|
|
8
7
|
base: "",
|
|
9
8
|
closeButton: "",
|
|
10
9
|
content: "",
|
|
11
|
-
dot: ""
|
|
10
|
+
dot: "",
|
|
11
|
+
icon: ""
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
isIconOnly: {
|
|
15
|
+
true: {
|
|
16
|
+
content: "px-1"
|
|
17
|
+
},
|
|
18
|
+
false: {
|
|
19
|
+
content: "flex items-center gap-2"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
hasEndContent: {
|
|
23
|
+
true: {
|
|
24
|
+
base: "pr-2"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
12
27
|
}
|
|
13
28
|
});
|
|
14
29
|
var Label = ({
|
|
@@ -16,24 +31,30 @@ var Label = ({
|
|
|
16
31
|
className: _className = void 0,
|
|
17
32
|
color = "default",
|
|
18
33
|
endContent = void 0,
|
|
34
|
+
icon = void 0,
|
|
35
|
+
onClose = void 0,
|
|
19
36
|
radius = "full",
|
|
20
37
|
size = "md",
|
|
21
|
-
startContent = void 0,
|
|
22
38
|
variant = "solid"
|
|
23
39
|
}) => {
|
|
24
|
-
const
|
|
40
|
+
const isIconOnly = !!icon && !children && !endContent;
|
|
41
|
+
const hasEndContent = !!endContent;
|
|
42
|
+
const variants = labelVariants({ isIconOnly, hasEndContent });
|
|
25
43
|
const classNames = variantsToClassNames(variants, _className, "base");
|
|
26
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ jsxs(
|
|
27
45
|
HeroLabel,
|
|
28
46
|
{
|
|
29
47
|
classNames,
|
|
30
48
|
color,
|
|
31
49
|
endContent,
|
|
32
50
|
radius,
|
|
51
|
+
onClose,
|
|
33
52
|
size,
|
|
34
|
-
startContent,
|
|
35
53
|
variant,
|
|
36
|
-
children
|
|
54
|
+
children: [
|
|
55
|
+
icon && /* @__PURE__ */ jsx("span", { className: classNames.icon, children: icon }),
|
|
56
|
+
children
|
|
57
|
+
]
|
|
37
58
|
}
|
|
38
59
|
);
|
|
39
60
|
};
|
|
@@ -46,4 +67,4 @@ export {
|
|
|
46
67
|
Label_default,
|
|
47
68
|
Label_default2
|
|
48
69
|
};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-COETB4MT.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 '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n icon: '',\n },\n variants: {\n isIconOnly: {\n true: {\n content: 'px-1',\n },\n false: {\n content: 'flex items-center gap-2',\n },\n },\n hasEndContent: {\n true: {\n base: 'pr-2',\n },\n },\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 /** optional label icon, when only icon provided without children and endContent */\n icon?: ReactNode;\n /** add close button to endContent */\n onClose?: ChipProps['onClose'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)\n */\nconst Label = ({\n children,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n icon = undefined,\n onClose = undefined,\n radius = 'full',\n size = 'md',\n variant = 'solid',\n}: LabelProps) => {\n // determine variants based on props\n const isIconOnly = !!icon && !children && !endContent;\n const hasEndContent = !!endContent;\n\n // classNames from slots\n const variants = labelVariants({ isIconOnly, hasEndContent });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n onClose={onClose}\n size={size}\n variant={variant}\n >\n {icon && <span className={classNames.icon}>{icon}</span>}\n {children}\n </HeroLabel>\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;AA2ErC,SASW,KATX;AAxEG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,SAAS;AAAA,MACX;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF,CAAC;AA6BD,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAkB;AAEhB,QAAM,aAAa,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;AAC3C,QAAM,gBAAgB,CAAC,CAAC;AAGxB,QAAM,WAAW,cAAc,EAAE,YAAY,cAAc,CAAC;AAC5D,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,gBAAQ,oBAAC,UAAK,WAAW,WAAW,MAAO,gBAAK;AAAA,QAChD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;AC1Ff,IAAOA,iBAAQ;","names":["Label_default"]}
|
|
@@ -4,11 +4,26 @@ 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: "",
|
|
8
7
|
base: "",
|
|
9
8
|
closeButton: "",
|
|
10
9
|
content: "",
|
|
11
|
-
dot: ""
|
|
10
|
+
dot: "",
|
|
11
|
+
icon: ""
|
|
12
|
+
},
|
|
13
|
+
variants: {
|
|
14
|
+
isIconOnly: {
|
|
15
|
+
true: {
|
|
16
|
+
content: "px-1"
|
|
17
|
+
},
|
|
18
|
+
false: {
|
|
19
|
+
content: "flex items-center gap-2"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
hasEndContent: {
|
|
23
|
+
true: {
|
|
24
|
+
base: "pr-2"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
12
27
|
}
|
|
13
28
|
});
|
|
14
29
|
var Label = ({
|
|
@@ -16,24 +31,30 @@ var Label = ({
|
|
|
16
31
|
className: _className = void 0,
|
|
17
32
|
color = "default",
|
|
18
33
|
endContent = void 0,
|
|
34
|
+
icon = void 0,
|
|
35
|
+
onClose = void 0,
|
|
19
36
|
radius = "full",
|
|
20
37
|
size = "md",
|
|
21
|
-
startContent = void 0,
|
|
22
38
|
variant = "solid"
|
|
23
39
|
}) => {
|
|
24
|
-
const
|
|
40
|
+
const isIconOnly = !!icon && !children && !endContent;
|
|
41
|
+
const hasEndContent = !!endContent;
|
|
42
|
+
const variants = labelVariants({ isIconOnly, hasEndContent });
|
|
25
43
|
const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, _className, "base");
|
|
26
|
-
return /* @__PURE__ */ _jsxruntime.
|
|
44
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
27
45
|
_chip.Chip,
|
|
28
46
|
{
|
|
29
47
|
classNames,
|
|
30
48
|
color,
|
|
31
49
|
endContent,
|
|
32
50
|
radius,
|
|
51
|
+
onClose,
|
|
33
52
|
size,
|
|
34
|
-
startContent,
|
|
35
53
|
variant,
|
|
36
|
-
children
|
|
54
|
+
children: [
|
|
55
|
+
icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: classNames.icon, children: icon }),
|
|
56
|
+
children
|
|
57
|
+
]
|
|
37
58
|
}
|
|
38
59
|
);
|
|
39
60
|
};
|
|
@@ -46,4 +67,4 @@ var Label_default2 = Label_default;
|
|
|
46
67
|
|
|
47
68
|
|
|
48
69
|
exports.Label_default = Label_default; exports.Label_default2 = Label_default2;
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-YCVYLEC5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-YCVYLEC5.cjs","../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":"AAAA;ACIA,oCAAkC;AAElC,oDAAyC;AA2ErC,+CAAA;AAxEG,IAAM,cAAA,EAAgB,4BAAA;AAAG,EAC9B,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,WAAA,EAAa,EAAA;AAAA,IACb,OAAA,EAAS,EAAA;AAAA,IACT,GAAA,EAAK,EAAA;AAAA,IACL,IAAA,EAAM;AAAA,EACR,CAAA;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS;AAAA,MACX,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAA,EAAS;AAAA,MACX;AAAA,IACF,CAAA;AAAA,IACA,aAAA,EAAe;AAAA,MACb,IAAA,EAAM;AAAA,QACJ,IAAA,EAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF,CAAC,CAAA;AA6BD,IAAM,MAAA,EAAQ,CAAC;AAAA,EACb,QAAA;AAAA,EACA,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,MAAA,EAAQ,SAAA;AAAA,EACR,WAAA,EAAa,KAAA,CAAA;AAAA,EACb,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,QAAA,EAAU,KAAA,CAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,KAAA,EAAO,IAAA;AAAA,EACP,QAAA,EAAU;AACZ,CAAA,EAAA,GAAkB;AAEhB,EAAA,MAAM,WAAA,EAAa,CAAC,CAAC,KAAA,GAAQ,CAAC,SAAA,GAAY,CAAC,UAAA;AAC3C,EAAA,MAAM,cAAA,EAAgB,CAAC,CAAC,UAAA;AAGxB,EAAA,MAAM,SAAA,EAAW,aAAA,CAAc,EAAE,UAAA,EAAY,cAAc,CAAC,CAAA;AAC5D,EAAA,MAAM,WAAA,EAAa,8CAAA,QAAqB,EAAU,UAAA,EAAY,MAAM,CAAA;AAEpE,EAAA,uBACE,8BAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,KAAA,mBAAQ,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,IAAA,EAAO,QAAA,EAAA,KAAA,CAAK,CAAA;AAAA,QAChD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADnCf;AACA;AExDA,IAAOA,eAAAA,EAAQ,aAAA;AF0Df;AACA;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-YCVYLEC5.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n icon: '',\n },\n variants: {\n isIconOnly: {\n true: {\n content: 'px-1',\n },\n false: {\n content: 'flex items-center gap-2',\n },\n },\n hasEndContent: {\n true: {\n base: 'pr-2',\n },\n },\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 /** optional label icon, when only icon provided without children and endContent */\n icon?: ReactNode;\n /** add close button to endContent */\n onClose?: ChipProps['onClose'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)\n */\nconst Label = ({\n children,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n icon = undefined,\n onClose = undefined,\n radius = 'full',\n size = 'md',\n variant = 'solid',\n}: LabelProps) => {\n // determine variants based on props\n const isIconOnly = !!icon && !children && !endContent;\n const hasEndContent = !!endContent;\n\n // classNames from slots\n const variants = labelVariants({ isIconOnly, hasEndContent });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n onClose={onClose}\n size={size}\n variant={variant}\n >\n {icon && <span className={classNames.icon}>{icon}</span>}\n {children}\n </HeroLabel>\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
|
@@ -33,7 +33,7 @@ var _chunk7RVUB6I5cjs = require('./chunk-7RVUB6I5.cjs');
|
|
|
33
33
|
var _chunkZASS525Kcjs = require('./chunk-ZASS525K.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkYCVYLEC5cjs = require('./chunk-YCVYLEC5.cjs');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
var _chunkXHOAZB2Zcjs = require('./chunk-XHOAZB2Z.cjs');
|
|
@@ -270,5 +270,5 @@ var ToastProvider_default = ToastProvider;
|
|
|
270
270
|
|
|
271
271
|
|
|
272
272
|
|
|
273
|
-
exports.Accordion = _chunk2P5WWVQ6cjs.Accordion_default; exports.Alert = _chunkYVPRFCWIcjs.Alert_default; exports.Avatar = _chunk77J7NZYBcjs.Avatar_default; exports.AvatarGroup = _chunkLIZGYO24cjs.AvatarGroup_default; exports.Badge = _chunkJSANDW3Wcjs.Badge_default; exports.Breadcrumb = _chunkZZOEFQWQcjs.Breadcrumb_default; exports.Button = _chunk4X43AGXEcjs.Button_default; exports.ButtonGroup = _chunkY3RSI2KVcjs.ButtonGroup_default; exports.Card = _chunkMHZAWSFJcjs.Card_default; exports.Drawer = _chunk7RVUB6I5cjs.Drawer_default; exports.Json = _chunkZASS525Kcjs.Json_default; exports.Label =
|
|
273
|
+
exports.Accordion = _chunk2P5WWVQ6cjs.Accordion_default; exports.Alert = _chunkYVPRFCWIcjs.Alert_default; exports.Avatar = _chunk77J7NZYBcjs.Avatar_default; exports.AvatarGroup = _chunkLIZGYO24cjs.AvatarGroup_default; exports.Badge = _chunkJSANDW3Wcjs.Badge_default; exports.Breadcrumb = _chunkZZOEFQWQcjs.Breadcrumb_default; exports.Button = _chunk4X43AGXEcjs.Button_default; exports.ButtonGroup = _chunkY3RSI2KVcjs.ButtonGroup_default; exports.Card = _chunkMHZAWSFJcjs.Card_default; exports.Drawer = _chunk7RVUB6I5cjs.Drawer_default; exports.Json = _chunkZASS525Kcjs.Json_default; exports.Label = _chunkYCVYLEC5cjs.Label_default; exports.Menu = _chunkXHOAZB2Zcjs.Menu_default; exports.Modal = _chunkPEUUQMJScjs.Modal_default; exports.Popover = _chunkEAX5J2I2cjs.Popover_default; exports.Table = _chunkAJCAIA6Hcjs.Table_default; exports.Tabs = _chunkJUHSESWBcjs.Tabs_default; exports.ToastProvider = ToastProvider_default; exports.Tooltip = _chunk25AJSW5Ecjs.Tooltip_default; exports.accordionVariants = _chunk2P5WWVQ6cjs.accordionVariants; exports.addToast = addToast; exports.alertVariants = _chunkYVPRFCWIcjs.alertVariants; exports.breadcrumbVariants = _chunkZZOEFQWQcjs.breadcrumbVariants; exports.buttonVariants = _chunk4X43AGXEcjs.buttonVariants; exports.cardVariants = _chunkMHZAWSFJcjs.cardVariants; exports.drawerBackdrops = _chunk7RVUB6I5cjs.drawerBackdrops; exports.drawerPlacements = _chunk7RVUB6I5cjs.drawerPlacements; exports.drawerRadii = _chunk7RVUB6I5cjs.drawerRadii; exports.drawerSizes = _chunk7RVUB6I5cjs.drawerSizes; exports.drawerVariants = _chunk7RVUB6I5cjs.drawerVariants; exports.modalVariants = _chunkPEUUQMJScjs.modalVariants; exports.tableVariants = _chunkAJCAIA6Hcjs.tableVariants; exports.tabsVariants = _chunkJUHSESWBcjs.tabsVariants; exports.toastVariants = toastVariants; exports.useDebounce = _chunkMWNBYTRNcjs.useDebounce; exports.useLocalStorage = _chunkMWNBYTRNcjs.useLocalStorage;
|
|
274
274
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -9,7 +9,7 @@ export { B as ButtonGroup } from './ButtonGroup-CUxpALRo.cjs';
|
|
|
9
9
|
export { C as Card, a as CardProps, c as cardVariants } from './Card-BdciRqJz.cjs';
|
|
10
10
|
export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-BnV9qxPA.cjs';
|
|
11
11
|
export { J as Json, a as JsonProps } from './Json-ngM0f9n2.cjs';
|
|
12
|
-
export { L as Label, a as LabelProps } from './Label-
|
|
12
|
+
export { L as Label, a as LabelProps } from './Label-Do4CCE7E.cjs';
|
|
13
13
|
export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-DYi8oagz.cjs';
|
|
14
14
|
export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DI5ZdS_3.cjs';
|
|
15
15
|
export { _ as Popover, P as PopoverProps } from './Popover-BXyk9y8I.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { B as ButtonGroup } from './ButtonGroup-CUxpALRo.js';
|
|
|
9
9
|
export { C as Card, a as CardProps, c as cardVariants } from './Card-BdciRqJz.js';
|
|
10
10
|
export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-BnV9qxPA.js';
|
|
11
11
|
export { J as Json, a as JsonProps } from './Json-ngM0f9n2.js';
|
|
12
|
-
export { L as Label, a as LabelProps } from './Label-
|
|
12
|
+
export { L as Label, a as LabelProps } from './Label-Do4CCE7E.js';
|
|
13
13
|
export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-DYi8oagz.js';
|
|
14
14
|
export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DI5ZdS_3.js';
|
|
15
15
|
export { _ as Popover, P as PopoverProps } from './Popover-BHPrdRy6.js';
|
package/dist/index.js
CHANGED
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.39.
|
|
5
|
+
"version": "0.39.2",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -166,10 +166,10 @@
|
|
|
166
166
|
"@heroui/tabs": "2.2.13",
|
|
167
167
|
"@heroui/toast": "2.0.6",
|
|
168
168
|
"@heroui/tooltip": "2.2.13",
|
|
169
|
-
"framer-motion": "12.6.
|
|
169
|
+
"framer-motion": "12.6.3",
|
|
170
170
|
"next-themes": "0.4.6",
|
|
171
171
|
"react-icons": "5.5.0",
|
|
172
|
-
"@fuf-stack/pixel-utils": "0.5.
|
|
172
|
+
"@fuf-stack/pixel-utils": "0.5.2"
|
|
173
173
|
},
|
|
174
174
|
"devDependencies": {
|
|
175
175
|
"@types/debug": "4.1.12",
|
|
@@ -179,8 +179,8 @@
|
|
|
179
179
|
"react": "19.0.0",
|
|
180
180
|
"react-dom": "19.0.0",
|
|
181
181
|
"@repo/storybook-config": "0.0.1",
|
|
182
|
-
"@repo/tsup-config": "0.0.1",
|
|
183
182
|
"@repo/tailwind-config": "0.0.1",
|
|
183
|
+
"@repo/tsup-config": "0.0.1",
|
|
184
184
|
"@repo/vite-config": "0.0.1"
|
|
185
185
|
},
|
|
186
186
|
"scripts": {
|
|
@@ -1,102 +0,0 @@
|
|
|
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 '@heroui/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
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
14
|
-
dot?: tailwind_variants.ClassValue;
|
|
15
|
-
avatar?: tailwind_variants.ClassValue;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
} | {
|
|
19
|
-
[x: string]: {
|
|
20
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
21
|
-
base?: tailwind_variants.ClassValue;
|
|
22
|
-
content?: tailwind_variants.ClassValue;
|
|
23
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
24
|
-
dot?: tailwind_variants.ClassValue;
|
|
25
|
-
avatar?: tailwind_variants.ClassValue;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
} | {}, {
|
|
29
|
-
avatar: string;
|
|
30
|
-
base: string;
|
|
31
|
-
closeButton: string;
|
|
32
|
-
content: string;
|
|
33
|
-
dot: string;
|
|
34
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
35
|
-
[key: string]: {
|
|
36
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
37
|
-
base?: tailwind_variants.ClassValue;
|
|
38
|
-
content?: tailwind_variants.ClassValue;
|
|
39
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
40
|
-
dot?: tailwind_variants.ClassValue;
|
|
41
|
-
avatar?: tailwind_variants.ClassValue;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
} | {}>, {
|
|
45
|
-
[key: string]: {
|
|
46
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
47
|
-
base?: tailwind_variants.ClassValue;
|
|
48
|
-
content?: tailwind_variants.ClassValue;
|
|
49
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
50
|
-
dot?: tailwind_variants.ClassValue;
|
|
51
|
-
avatar?: tailwind_variants.ClassValue;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
} | {}, {
|
|
55
|
-
avatar: string;
|
|
56
|
-
base: string;
|
|
57
|
-
closeButton: string;
|
|
58
|
-
content: string;
|
|
59
|
-
dot: string;
|
|
60
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
61
|
-
avatar: string;
|
|
62
|
-
base: string;
|
|
63
|
-
closeButton: string;
|
|
64
|
-
content: string;
|
|
65
|
-
dot: string;
|
|
66
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
67
|
-
[key: string]: {
|
|
68
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
69
|
-
base?: tailwind_variants.ClassValue;
|
|
70
|
-
content?: tailwind_variants.ClassValue;
|
|
71
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
72
|
-
dot?: tailwind_variants.ClassValue;
|
|
73
|
-
avatar?: tailwind_variants.ClassValue;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
77
|
-
type VariantProps = TVProps<typeof labelVariants>;
|
|
78
|
-
type ClassName = TVClassName<typeof labelVariants>;
|
|
79
|
-
interface LabelProps extends VariantProps {
|
|
80
|
-
/** content of the label */
|
|
81
|
-
children: ReactNode;
|
|
82
|
-
/** CSS class name */
|
|
83
|
-
className?: ClassName;
|
|
84
|
-
/** color of the label */
|
|
85
|
-
color?: ChipProps['color'];
|
|
86
|
-
/** element to be rendered in the right side of the label */
|
|
87
|
-
endContent?: ChipProps['endContent'];
|
|
88
|
-
/** radius of the label */
|
|
89
|
-
radius?: ChipProps['radius'];
|
|
90
|
-
/** size of the label */
|
|
91
|
-
size?: ChipProps['size'];
|
|
92
|
-
/** element to be rendered in the left side of the label */
|
|
93
|
-
startContent?: ChipProps['startContent'];
|
|
94
|
-
/** style variant of the label */
|
|
95
|
-
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)
|
|
99
|
-
*/
|
|
100
|
-
declare const Label: ({ children, className: _className, color, endContent, radius, size, startContent, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
101
|
-
|
|
102
|
-
export { Label as L, type LabelProps as a };
|
package/dist/Label-BH0taC2T.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
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 '@heroui/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
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
14
|
-
dot?: tailwind_variants.ClassValue;
|
|
15
|
-
avatar?: tailwind_variants.ClassValue;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
} | {
|
|
19
|
-
[x: string]: {
|
|
20
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
21
|
-
base?: tailwind_variants.ClassValue;
|
|
22
|
-
content?: tailwind_variants.ClassValue;
|
|
23
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
24
|
-
dot?: tailwind_variants.ClassValue;
|
|
25
|
-
avatar?: tailwind_variants.ClassValue;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
} | {}, {
|
|
29
|
-
avatar: string;
|
|
30
|
-
base: string;
|
|
31
|
-
closeButton: string;
|
|
32
|
-
content: string;
|
|
33
|
-
dot: string;
|
|
34
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
35
|
-
[key: string]: {
|
|
36
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
37
|
-
base?: tailwind_variants.ClassValue;
|
|
38
|
-
content?: tailwind_variants.ClassValue;
|
|
39
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
40
|
-
dot?: tailwind_variants.ClassValue;
|
|
41
|
-
avatar?: tailwind_variants.ClassValue;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
} | {}>, {
|
|
45
|
-
[key: string]: {
|
|
46
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
47
|
-
base?: tailwind_variants.ClassValue;
|
|
48
|
-
content?: tailwind_variants.ClassValue;
|
|
49
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
50
|
-
dot?: tailwind_variants.ClassValue;
|
|
51
|
-
avatar?: tailwind_variants.ClassValue;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
} | {}, {
|
|
55
|
-
avatar: string;
|
|
56
|
-
base: string;
|
|
57
|
-
closeButton: string;
|
|
58
|
-
content: string;
|
|
59
|
-
dot: string;
|
|
60
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
61
|
-
avatar: string;
|
|
62
|
-
base: string;
|
|
63
|
-
closeButton: string;
|
|
64
|
-
content: string;
|
|
65
|
-
dot: string;
|
|
66
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
67
|
-
[key: string]: {
|
|
68
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
69
|
-
base?: tailwind_variants.ClassValue;
|
|
70
|
-
content?: tailwind_variants.ClassValue;
|
|
71
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
72
|
-
dot?: tailwind_variants.ClassValue;
|
|
73
|
-
avatar?: tailwind_variants.ClassValue;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
77
|
-
type VariantProps = TVProps<typeof labelVariants>;
|
|
78
|
-
type ClassName = TVClassName<typeof labelVariants>;
|
|
79
|
-
interface LabelProps extends VariantProps {
|
|
80
|
-
/** content of the label */
|
|
81
|
-
children: ReactNode;
|
|
82
|
-
/** CSS class name */
|
|
83
|
-
className?: ClassName;
|
|
84
|
-
/** color of the label */
|
|
85
|
-
color?: ChipProps['color'];
|
|
86
|
-
/** element to be rendered in the right side of the label */
|
|
87
|
-
endContent?: ChipProps['endContent'];
|
|
88
|
-
/** radius of the label */
|
|
89
|
-
radius?: ChipProps['radius'];
|
|
90
|
-
/** size of the label */
|
|
91
|
-
size?: ChipProps['size'];
|
|
92
|
-
/** element to be rendered in the left side of the label */
|
|
93
|
-
startContent?: ChipProps['startContent'];
|
|
94
|
-
/** style variant of the label */
|
|
95
|
-
variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)
|
|
99
|
-
*/
|
|
100
|
-
declare const Label: ({ children, className: _className, color, endContent, radius, size, startContent, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
101
|
-
|
|
102
|
-
export { Label as L, type LabelProps as a };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-2XYKRMUN.cjs","../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":"AAAA;ACIA,oCAAkC;AAElC,oDAAyC;AAqDrC,+CAAA;AAlDG,IAAM,cAAA,EAAgB,4BAAA;AAAG,EAC9B,KAAA,EAAO;AAAA,IACL,MAAA,EAAQ,EAAA;AAAA,IACR,IAAA,EAAM,EAAA;AAAA,IACN,WAAA,EAAa,EAAA;AAAA,IACb,OAAA,EAAS,EAAA;AAAA,IACT,GAAA,EAAK;AAAA,EACP;AACF,CAAC,CAAA;AA2BD,IAAM,MAAA,EAAQ,CAAC;AAAA,EACb,QAAA;AAAA,EACA,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,MAAA,EAAQ,SAAA;AAAA,EACR,WAAA,EAAa,KAAA,CAAA;AAAA,EACb,OAAA,EAAS,MAAA;AAAA,EACT,KAAA,EAAO,IAAA;AAAA,EACP,aAAA,EAAe,KAAA,CAAA;AAAA,EACf,QAAA,EAAU;AACZ,CAAA,EAAA,GAAkB;AAEhB,EAAA,MAAM,SAAA,EAAW,aAAA,CAAc,CAAA;AAC/B,EAAA,MAAM,WAAA,EAAa,8CAAA,QAAqB,EAAU,UAAA,EAAY,MAAM,CAAA;AAEpE,EAAA,uBACE,6BAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,IAAA;AAAA,MACA,YAAA;AAAA,MACA,OAAA;AAAA,MAEC;AAAA,IAAA;AAAA,EACH,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADjCf;AACA;AEnCA,IAAOA,eAAAA,EAAQ,aAAA;AFqCf;AACA;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-2XYKRMUN.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/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 [HeroUI Chip](https://www.heroui.com//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 <HeroLabel\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 </HeroLabel>\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"]}
|
|
@@ -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 '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/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 [HeroUI Chip](https://www.heroui.com//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 <HeroLabel\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 </HeroLabel>\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"]}
|