@fuf-stack/pixels 0.5.3 → 0.5.5
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/Button/index.cjs +4 -2
- package/dist/Button/index.d.cts +4 -2
- package/dist/Button/index.d.ts +4 -2
- package/dist/Button/index.js +4 -2
- package/dist/Button-DS4qK4Lf.d.cts +169 -0
- package/dist/Button-DS4qK4Lf.d.ts +169 -0
- package/dist/Card/index.cjs +4 -2
- package/dist/Card/index.d.cts +2 -2
- package/dist/Card/index.d.ts +2 -2
- package/dist/Card/index.js +4 -2
- package/dist/{Card-C3mjLa6d.d.cts → Card-D5kspciY.d.cts} +1 -1
- package/dist/{Card-C3mjLa6d.d.ts → Card-D5kspciY.d.ts} +1 -1
- package/dist/Json/index.cjs +3 -3
- package/dist/Json/index.js +2 -2
- package/dist/Modal/index.cjs +2 -2
- package/dist/Modal/index.js +1 -1
- package/dist/Tooltip/index.cjs +2 -2
- package/dist/Tooltip/index.js +1 -1
- package/dist/{chunk-4Q6KBGE5.js → chunk-236GX7PP.js} +2 -4
- package/dist/{chunk-4Q6KBGE5.js.map → chunk-236GX7PP.js.map} +1 -1
- package/dist/{chunk-MBKSGWDJ.cjs → chunk-7GYTJLD6.cjs} +3 -3
- package/dist/{chunk-3PQUCG6P.cjs → chunk-BSBPQXNG.cjs} +2 -4
- package/dist/chunk-BSBPQXNG.cjs.map +1 -0
- package/dist/{chunk-CNELFUYE.js → chunk-BTBF633Q.js} +2 -2
- package/dist/{chunk-WL6ENU44.cjs → chunk-GIM2W4JH.cjs} +3 -2
- package/dist/{chunk-WL6ENU44.cjs.map → chunk-GIM2W4JH.cjs.map} +1 -1
- package/dist/{chunk-2Q6M4DC3.js → chunk-HYXTFS4R.js} +40 -3
- package/dist/chunk-HYXTFS4R.js.map +1 -0
- package/dist/{chunk-2BPC6HYE.js → chunk-IEZVKZFP.js} +2 -1
- package/dist/{chunk-2BPC6HYE.js.map → chunk-IEZVKZFP.js.map} +1 -1
- package/dist/{chunk-IAE5EJ7Z.cjs → chunk-ND4VZZVU.cjs} +42 -5
- package/dist/chunk-ND4VZZVU.cjs.map +1 -0
- package/dist/{chunk-7VAHMR2W.js → chunk-O6OLR36Y.js} +2 -2
- package/dist/{chunk-7VAHMR2W.js.map → chunk-O6OLR36Y.js.map} +1 -1
- package/dist/{chunk-YO6VJ2OU.cjs → chunk-X2MUU2ZI.cjs} +2 -2
- package/dist/chunk-X2MUU2ZI.cjs.map +1 -0
- package/dist/index.cjs +10 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/Button-BgDaXYKX.d.cts +0 -38
- package/dist/Button-BgDaXYKX.d.ts +0 -38
- package/dist/chunk-2Q6M4DC3.js.map +0 -1
- package/dist/chunk-3PQUCG6P.cjs.map +0 -1
- package/dist/chunk-IAE5EJ7Z.cjs.map +0 -1
- package/dist/chunk-YO6VJ2OU.cjs.map +0 -1
- /package/dist/{chunk-MBKSGWDJ.cjs.map → chunk-7GYTJLD6.cjs.map} +0 -0
- /package/dist/{chunk-CNELFUYE.js.map → chunk-BTBF633Q.js.map} +0 -0
package/dist/Button/index.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var _chunkIAE5EJ7Zcjs = require('../chunk-IAE5EJ7Z.cjs');
|
|
5
4
|
|
|
5
|
+
var _chunkND4VZZVUcjs = require('../chunk-ND4VZZVU.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.Button = _chunkND4VZZVUcjs.Button_default; exports.buttonVariants = _chunkND4VZZVUcjs.buttonVariants; exports.default = _chunkND4VZZVUcjs.Button_default2;
|
|
9
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Button/index.d.cts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { B as Button } from '../Button-
|
|
2
|
-
export { a as ButtonProps } from '../Button-
|
|
1
|
+
import { B as Button } from '../Button-DS4qK4Lf.cjs';
|
|
2
|
+
export { a as ButtonProps, b as buttonVariants } from '../Button-DS4qK4Lf.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants';
|
|
5
|
+
import 'tailwind-variants/dist/config.js';
|
|
4
6
|
import '@nextui-org/button';
|
|
5
7
|
import 'react';
|
|
6
8
|
|
package/dist/Button/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { B as Button } from '../Button-
|
|
2
|
-
export { a as ButtonProps } from '../Button-
|
|
1
|
+
import { B as Button } from '../Button-DS4qK4Lf.js';
|
|
2
|
+
export { a as ButtonProps, b as buttonVariants } from '../Button-DS4qK4Lf.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants';
|
|
5
|
+
import 'tailwind-variants/dist/config.js';
|
|
4
6
|
import '@nextui-org/button';
|
|
5
7
|
import 'react';
|
|
6
8
|
|
package/dist/Button/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button_default,
|
|
3
|
-
Button_default2
|
|
4
|
-
|
|
3
|
+
Button_default2,
|
|
4
|
+
buttonVariants
|
|
5
|
+
} from "../chunk-HYXTFS4R.js";
|
|
5
6
|
export {
|
|
6
7
|
Button_default as Button,
|
|
8
|
+
buttonVariants,
|
|
7
9
|
Button_default2 as default
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import { VariantProps } from 'tailwind-variants';
|
|
4
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
5
|
+
import { ButtonProps as ButtonProps$1 } from '@nextui-org/button';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const buttonVariants: tailwind_variants.TVReturnType<{
|
|
9
|
+
color: {
|
|
10
|
+
default: string;
|
|
11
|
+
primary: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
success: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
danger: string;
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
solid: string;
|
|
19
|
+
bordered: string;
|
|
20
|
+
light: string;
|
|
21
|
+
flat: string;
|
|
22
|
+
faded: string;
|
|
23
|
+
shadow: string;
|
|
24
|
+
ghost: string;
|
|
25
|
+
};
|
|
26
|
+
}, undefined, "", tailwind_variants_dist_config_js.TVConfig<{
|
|
27
|
+
color: {
|
|
28
|
+
default: string;
|
|
29
|
+
primary: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
success: string;
|
|
32
|
+
warning: string;
|
|
33
|
+
danger: string;
|
|
34
|
+
};
|
|
35
|
+
variant: {
|
|
36
|
+
solid: string;
|
|
37
|
+
bordered: string;
|
|
38
|
+
light: string;
|
|
39
|
+
flat: string;
|
|
40
|
+
faded: string;
|
|
41
|
+
shadow: string;
|
|
42
|
+
ghost: string;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
color: {
|
|
46
|
+
default: string;
|
|
47
|
+
primary: string;
|
|
48
|
+
secondary: string;
|
|
49
|
+
success: string;
|
|
50
|
+
warning: string;
|
|
51
|
+
danger: string;
|
|
52
|
+
};
|
|
53
|
+
variant: {
|
|
54
|
+
solid: string;
|
|
55
|
+
bordered: string;
|
|
56
|
+
light: string;
|
|
57
|
+
flat: string;
|
|
58
|
+
faded: string;
|
|
59
|
+
shadow: string;
|
|
60
|
+
ghost: string;
|
|
61
|
+
};
|
|
62
|
+
}>, {
|
|
63
|
+
color: {
|
|
64
|
+
default: string;
|
|
65
|
+
primary: string;
|
|
66
|
+
secondary: string;
|
|
67
|
+
success: string;
|
|
68
|
+
warning: string;
|
|
69
|
+
danger: string;
|
|
70
|
+
};
|
|
71
|
+
variant: {
|
|
72
|
+
solid: string;
|
|
73
|
+
bordered: string;
|
|
74
|
+
light: string;
|
|
75
|
+
flat: string;
|
|
76
|
+
faded: string;
|
|
77
|
+
shadow: string;
|
|
78
|
+
ghost: string;
|
|
79
|
+
};
|
|
80
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
81
|
+
color: {
|
|
82
|
+
default: string;
|
|
83
|
+
primary: string;
|
|
84
|
+
secondary: string;
|
|
85
|
+
success: string;
|
|
86
|
+
warning: string;
|
|
87
|
+
danger: string;
|
|
88
|
+
};
|
|
89
|
+
variant: {
|
|
90
|
+
solid: string;
|
|
91
|
+
bordered: string;
|
|
92
|
+
light: string;
|
|
93
|
+
flat: string;
|
|
94
|
+
faded: string;
|
|
95
|
+
shadow: string;
|
|
96
|
+
ghost: string;
|
|
97
|
+
};
|
|
98
|
+
}, undefined, "", tailwind_variants_dist_config_js.TVConfig<{
|
|
99
|
+
color: {
|
|
100
|
+
default: string;
|
|
101
|
+
primary: string;
|
|
102
|
+
secondary: string;
|
|
103
|
+
success: string;
|
|
104
|
+
warning: string;
|
|
105
|
+
danger: string;
|
|
106
|
+
};
|
|
107
|
+
variant: {
|
|
108
|
+
solid: string;
|
|
109
|
+
bordered: string;
|
|
110
|
+
light: string;
|
|
111
|
+
flat: string;
|
|
112
|
+
faded: string;
|
|
113
|
+
shadow: string;
|
|
114
|
+
ghost: string;
|
|
115
|
+
};
|
|
116
|
+
}, {
|
|
117
|
+
color: {
|
|
118
|
+
default: string;
|
|
119
|
+
primary: string;
|
|
120
|
+
secondary: string;
|
|
121
|
+
success: string;
|
|
122
|
+
warning: string;
|
|
123
|
+
danger: string;
|
|
124
|
+
};
|
|
125
|
+
variant: {
|
|
126
|
+
solid: string;
|
|
127
|
+
bordered: string;
|
|
128
|
+
light: string;
|
|
129
|
+
flat: string;
|
|
130
|
+
faded: string;
|
|
131
|
+
shadow: string;
|
|
132
|
+
ghost: string;
|
|
133
|
+
};
|
|
134
|
+
}>, unknown, unknown, undefined>>;
|
|
135
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
136
|
+
interface ButtonProps extends ButtonVariantProps {
|
|
137
|
+
/** sets HTML aria-label attribute */
|
|
138
|
+
ariaLabel?: string;
|
|
139
|
+
/** child components */
|
|
140
|
+
children?: ReactNode;
|
|
141
|
+
/** CSS class name */
|
|
142
|
+
className?: string | string[];
|
|
143
|
+
/** next ui button color */
|
|
144
|
+
color?: ButtonProps$1['color'];
|
|
145
|
+
/** disables function of the button. */
|
|
146
|
+
disabled?: boolean;
|
|
147
|
+
/** disables all button animations */
|
|
148
|
+
disableAnimation?: boolean;
|
|
149
|
+
/** If set loading animation is shown */
|
|
150
|
+
loading?: boolean;
|
|
151
|
+
/** optional icon */
|
|
152
|
+
icon?: ReactNode;
|
|
153
|
+
/** on click event */
|
|
154
|
+
onClick?: ButtonProps$1['onPress'];
|
|
155
|
+
/** 3 size options */
|
|
156
|
+
size?: ButtonProps$1['size'];
|
|
157
|
+
/** HTML data-testid attribute used in e2e tests */
|
|
158
|
+
testId?: string;
|
|
159
|
+
/** sets the button type. */
|
|
160
|
+
type?: 'button' | 'submit' | 'reset' | undefined;
|
|
161
|
+
/** next ui button variants */
|
|
162
|
+
variant?: ButtonProps$1['variant'];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Button component based on [NextUI Button](https://nextui.org/docs/components/button)
|
|
166
|
+
*/
|
|
167
|
+
declare const Button: ({ ariaLabel, children, className, color, disabled, disableAnimation, icon, loading, onClick, size, testId, type, variant, }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
168
|
+
|
|
169
|
+
export { Button as B, type ButtonProps as a, buttonVariants as b };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import { VariantProps } from 'tailwind-variants';
|
|
4
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
5
|
+
import { ButtonProps as ButtonProps$1 } from '@nextui-org/button';
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
declare const buttonVariants: tailwind_variants.TVReturnType<{
|
|
9
|
+
color: {
|
|
10
|
+
default: string;
|
|
11
|
+
primary: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
success: string;
|
|
14
|
+
warning: string;
|
|
15
|
+
danger: string;
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
solid: string;
|
|
19
|
+
bordered: string;
|
|
20
|
+
light: string;
|
|
21
|
+
flat: string;
|
|
22
|
+
faded: string;
|
|
23
|
+
shadow: string;
|
|
24
|
+
ghost: string;
|
|
25
|
+
};
|
|
26
|
+
}, undefined, "", tailwind_variants_dist_config_js.TVConfig<{
|
|
27
|
+
color: {
|
|
28
|
+
default: string;
|
|
29
|
+
primary: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
success: string;
|
|
32
|
+
warning: string;
|
|
33
|
+
danger: string;
|
|
34
|
+
};
|
|
35
|
+
variant: {
|
|
36
|
+
solid: string;
|
|
37
|
+
bordered: string;
|
|
38
|
+
light: string;
|
|
39
|
+
flat: string;
|
|
40
|
+
faded: string;
|
|
41
|
+
shadow: string;
|
|
42
|
+
ghost: string;
|
|
43
|
+
};
|
|
44
|
+
}, {
|
|
45
|
+
color: {
|
|
46
|
+
default: string;
|
|
47
|
+
primary: string;
|
|
48
|
+
secondary: string;
|
|
49
|
+
success: string;
|
|
50
|
+
warning: string;
|
|
51
|
+
danger: string;
|
|
52
|
+
};
|
|
53
|
+
variant: {
|
|
54
|
+
solid: string;
|
|
55
|
+
bordered: string;
|
|
56
|
+
light: string;
|
|
57
|
+
flat: string;
|
|
58
|
+
faded: string;
|
|
59
|
+
shadow: string;
|
|
60
|
+
ghost: string;
|
|
61
|
+
};
|
|
62
|
+
}>, {
|
|
63
|
+
color: {
|
|
64
|
+
default: string;
|
|
65
|
+
primary: string;
|
|
66
|
+
secondary: string;
|
|
67
|
+
success: string;
|
|
68
|
+
warning: string;
|
|
69
|
+
danger: string;
|
|
70
|
+
};
|
|
71
|
+
variant: {
|
|
72
|
+
solid: string;
|
|
73
|
+
bordered: string;
|
|
74
|
+
light: string;
|
|
75
|
+
flat: string;
|
|
76
|
+
faded: string;
|
|
77
|
+
shadow: string;
|
|
78
|
+
ghost: string;
|
|
79
|
+
};
|
|
80
|
+
}, undefined, tailwind_variants.TVReturnType<{
|
|
81
|
+
color: {
|
|
82
|
+
default: string;
|
|
83
|
+
primary: string;
|
|
84
|
+
secondary: string;
|
|
85
|
+
success: string;
|
|
86
|
+
warning: string;
|
|
87
|
+
danger: string;
|
|
88
|
+
};
|
|
89
|
+
variant: {
|
|
90
|
+
solid: string;
|
|
91
|
+
bordered: string;
|
|
92
|
+
light: string;
|
|
93
|
+
flat: string;
|
|
94
|
+
faded: string;
|
|
95
|
+
shadow: string;
|
|
96
|
+
ghost: string;
|
|
97
|
+
};
|
|
98
|
+
}, undefined, "", tailwind_variants_dist_config_js.TVConfig<{
|
|
99
|
+
color: {
|
|
100
|
+
default: string;
|
|
101
|
+
primary: string;
|
|
102
|
+
secondary: string;
|
|
103
|
+
success: string;
|
|
104
|
+
warning: string;
|
|
105
|
+
danger: string;
|
|
106
|
+
};
|
|
107
|
+
variant: {
|
|
108
|
+
solid: string;
|
|
109
|
+
bordered: string;
|
|
110
|
+
light: string;
|
|
111
|
+
flat: string;
|
|
112
|
+
faded: string;
|
|
113
|
+
shadow: string;
|
|
114
|
+
ghost: string;
|
|
115
|
+
};
|
|
116
|
+
}, {
|
|
117
|
+
color: {
|
|
118
|
+
default: string;
|
|
119
|
+
primary: string;
|
|
120
|
+
secondary: string;
|
|
121
|
+
success: string;
|
|
122
|
+
warning: string;
|
|
123
|
+
danger: string;
|
|
124
|
+
};
|
|
125
|
+
variant: {
|
|
126
|
+
solid: string;
|
|
127
|
+
bordered: string;
|
|
128
|
+
light: string;
|
|
129
|
+
flat: string;
|
|
130
|
+
faded: string;
|
|
131
|
+
shadow: string;
|
|
132
|
+
ghost: string;
|
|
133
|
+
};
|
|
134
|
+
}>, unknown, unknown, undefined>>;
|
|
135
|
+
type ButtonVariantProps = VariantProps<typeof buttonVariants>;
|
|
136
|
+
interface ButtonProps extends ButtonVariantProps {
|
|
137
|
+
/** sets HTML aria-label attribute */
|
|
138
|
+
ariaLabel?: string;
|
|
139
|
+
/** child components */
|
|
140
|
+
children?: ReactNode;
|
|
141
|
+
/** CSS class name */
|
|
142
|
+
className?: string | string[];
|
|
143
|
+
/** next ui button color */
|
|
144
|
+
color?: ButtonProps$1['color'];
|
|
145
|
+
/** disables function of the button. */
|
|
146
|
+
disabled?: boolean;
|
|
147
|
+
/** disables all button animations */
|
|
148
|
+
disableAnimation?: boolean;
|
|
149
|
+
/** If set loading animation is shown */
|
|
150
|
+
loading?: boolean;
|
|
151
|
+
/** optional icon */
|
|
152
|
+
icon?: ReactNode;
|
|
153
|
+
/** on click event */
|
|
154
|
+
onClick?: ButtonProps$1['onPress'];
|
|
155
|
+
/** 3 size options */
|
|
156
|
+
size?: ButtonProps$1['size'];
|
|
157
|
+
/** HTML data-testid attribute used in e2e tests */
|
|
158
|
+
testId?: string;
|
|
159
|
+
/** sets the button type. */
|
|
160
|
+
type?: 'button' | 'submit' | 'reset' | undefined;
|
|
161
|
+
/** next ui button variants */
|
|
162
|
+
variant?: ButtonProps$1['variant'];
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Button component based on [NextUI Button](https://nextui.org/docs/components/button)
|
|
166
|
+
*/
|
|
167
|
+
declare const Button: ({ ariaLabel, children, className, color, disabled, disableAnimation, icon, loading, onClick, size, testId, type, variant, }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
168
|
+
|
|
169
|
+
export { Button as B, type ButtonProps as a, buttonVariants as b };
|
package/dist/Card/index.cjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var _chunkWL6ENU44cjs = require('../chunk-WL6ENU44.cjs');
|
|
5
4
|
|
|
5
|
+
var _chunkGIM2W4JHcjs = require('../chunk-GIM2W4JH.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.Card = _chunkGIM2W4JHcjs.Card_default; exports.cardVariants = _chunkGIM2W4JHcjs.cardVariants; exports.default = _chunkGIM2W4JHcjs.Card_default2;
|
|
9
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Card/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Card } from '../Card-
|
|
2
|
-
export { a as CardProps } from '../Card-
|
|
1
|
+
import { C as Card } from '../Card-D5kspciY.cjs';
|
|
2
|
+
export { a as CardProps, c as cardVariants } from '../Card-D5kspciY.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Card/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Card } from '../Card-
|
|
2
|
-
export { a as CardProps } from '../Card-
|
|
1
|
+
import { C as Card } from '../Card-D5kspciY.js';
|
|
2
|
+
export { a as CardProps, c as cardVariants } from '../Card-D5kspciY.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Card/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Card_default,
|
|
3
|
-
Card_default2
|
|
4
|
-
|
|
3
|
+
Card_default2,
|
|
4
|
+
cardVariants
|
|
5
|
+
} from "../chunk-IEZVKZFP.js";
|
|
5
6
|
export {
|
|
6
7
|
Card_default as Card,
|
|
8
|
+
cardVariants,
|
|
7
9
|
Card_default2 as default
|
|
8
10
|
};
|
|
9
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -92,4 +92,4 @@ interface CardProps extends CardVariantProps {
|
|
|
92
92
|
*/
|
|
93
93
|
declare const Card: ({ children, className, testId, header, footer, }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
94
94
|
|
|
95
|
-
export { Card as C, type CardProps as a };
|
|
95
|
+
export { Card as C, type CardProps as a, cardVariants as c };
|
|
@@ -92,4 +92,4 @@ interface CardProps extends CardVariantProps {
|
|
|
92
92
|
*/
|
|
93
93
|
declare const Card: ({ children, className, testId, header, footer, }: CardProps) => react_jsx_runtime.JSX.Element;
|
|
94
94
|
|
|
95
|
-
export { Card as C, type CardProps as a };
|
|
95
|
+
export { Card as C, type CardProps as a, cardVariants as c };
|
package/dist/Json/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunk7GYTJLD6cjs = require('../chunk-7GYTJLD6.cjs');
|
|
5
|
+
require('../chunk-ND4VZZVU.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
exports.Json =
|
|
9
|
+
exports.Json = _chunk7GYTJLD6cjs.Json_default; exports.default = _chunk7GYTJLD6cjs.Json_default2;
|
|
10
10
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Json/index.js
CHANGED
package/dist/Modal/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkX2MUU2ZIcjs = require('../chunk-X2MUU2ZI.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.Modal =
|
|
10
|
+
exports.Modal = _chunkX2MUU2ZIcjs.Modal_default; exports.default = _chunkX2MUU2ZIcjs.Modal_default2; exports.modalVariants = _chunkX2MUU2ZIcjs.modalVariants;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Modal/index.js
CHANGED
package/dist/Tooltip/index.cjs
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBSBPQXNGcjs = require('../chunk-BSBPQXNG.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.Tooltip =
|
|
10
|
+
exports.Tooltip = _chunkBSBPQXNGcjs.Tooltip_default; exports.default = _chunkBSBPQXNGcjs.Tooltip_default2; exports.tooltipPlacementOptions = _chunkBSBPQXNGcjs.tooltipPlacementOptions;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Tooltip/index.js
CHANGED
|
@@ -23,9 +23,7 @@ var Tooltip = ({
|
|
|
23
23
|
containerPadding,
|
|
24
24
|
content,
|
|
25
25
|
defaultOpen,
|
|
26
|
-
onClick: (e) =>
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
},
|
|
26
|
+
onClick: (e) => e.preventDefault(),
|
|
29
27
|
onOpenChange,
|
|
30
28
|
placement,
|
|
31
29
|
shouldFlip: true,
|
|
@@ -43,4 +41,4 @@ export {
|
|
|
43
41
|
Tooltip_default,
|
|
44
42
|
Tooltip_default2
|
|
45
43
|
};
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-236GX7PP.js.map
|
|
@@ -1 +1 @@
|
|
|
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';\nimport cn from 'classnames';\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) =>
|
|
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';\nimport cn from 'classnames';\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;AACvC,OAAO,QAAQ;AAkDX;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;;;ACnDf,IAAOA,mBAAQ;","names":["Tooltip_default"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkND4VZZVUcjs = require('./chunk-ND4VZZVU.cjs');
|
|
4
4
|
|
|
5
5
|
// src/Json/Json.tsx
|
|
6
6
|
var _react = require('react');
|
|
@@ -79,7 +79,7 @@ var Json = ({ className = null, collapsed = false, value }) => {
|
|
|
79
79
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium", children: "Failed to parse JSON data" })
|
|
80
80
|
] }),
|
|
81
81
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
82
|
-
|
|
82
|
+
_chunkND4VZZVUcjs.Button_default2,
|
|
83
83
|
{
|
|
84
84
|
color: "danger",
|
|
85
85
|
size: "sm",
|
|
@@ -124,4 +124,4 @@ var Json_default2 = Json_default;
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
exports.Json_default = Json_default; exports.Json_default2 = Json_default2;
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-7GYTJLD6.cjs.map
|
|
@@ -23,9 +23,7 @@ var Tooltip = ({
|
|
|
23
23
|
containerPadding,
|
|
24
24
|
content,
|
|
25
25
|
defaultOpen,
|
|
26
|
-
onClick: (e) =>
|
|
27
|
-
e.preventDefault();
|
|
28
|
-
},
|
|
26
|
+
onClick: (e) => e.preventDefault(),
|
|
29
27
|
onOpenChange,
|
|
30
28
|
placement,
|
|
31
29
|
shouldFlip: true,
|
|
@@ -43,4 +41,4 @@ var Tooltip_default2 = Tooltip_default;
|
|
|
43
41
|
|
|
44
42
|
|
|
45
43
|
exports.tooltipPlacementOptions = tooltipPlacementOptions; exports.Tooltip_default = Tooltip_default; exports.Tooltip_default2 = Tooltip_default2;
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
44
|
+
//# sourceMappingURL=chunk-BSBPQXNG.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":";AAEA,SAAS,WAAW,mBAAmB;AACvC,OAAO,QAAQ;AAkDX;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;;;ACnDf,IAAOA,mBAAQ","sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/tooltip';\nimport cn from 'classnames';\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"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button_default2 as Button_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HYXTFS4R.js";
|
|
4
4
|
|
|
5
5
|
// src/Json/Json.tsx
|
|
6
6
|
import { useState } from "react";
|
|
@@ -124,4 +124,4 @@ export {
|
|
|
124
124
|
Json_default,
|
|
125
125
|
Json_default2
|
|
126
126
|
};
|
|
127
|
-
//# sourceMappingURL=chunk-
|
|
127
|
+
//# sourceMappingURL=chunk-BTBF633Q.js.map
|
|
@@ -70,5 +70,6 @@ var Card_default2 = Card_default;
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
|
|
74
|
+
exports.cardVariants = cardVariants; exports.Card_default = Card_default; exports.Card_default2 = Card_default2;
|
|
75
|
+
//# sourceMappingURL=chunk-GIM2W4JH.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Card/Card.tsx","../src/Card/index.ts"],"names":["Card_default"],"mappings":";AAGA;AAAA,EACE,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,OACT;AACP,SAAS,WAAW,mBAAmB;AACvC,SAAS,UAAU;AAsDf,SAcI,UAdJ,KAcI,YAdJ;AAnDG,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF,CAAC;AAuBD,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,MAAiB;AAEf,QAAM,WAAW,aAAa;AAC9B,QAAM,eAAgB,OAAO,cAAc,YAAY,aAAc,CAAC;AACtE,QAAM,aAAa;AAAA,IACjB,MAAM,SAAS,KAAK;AAAA,MAClB,WAAW,aAAa,QAAS;AAAA,IACnC,CAAC;AAAA,IACD,QAAQ,SAAS,OAAO,EAAE,WAAW,aAAa,OAAO,CAAC;AAAA,IAC1D,MAAM,SAAS,KAAK,EAAE,WAAW,aAAa,KAAK,CAAC;AAAA,IACpD,QAAQ,SAAS,OAAO,EAAE,WAAW,aAAa,OAAO,CAAC;AAAA,EAC5D;AAEA,QAAM,UACJ;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,SAAS,QAAQ,EAAE,WAAW,aAAa,QAAQ,CAAC;AAAA;AAAA,EACjE;AAGF,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC,WAAS;AAAA,MACT,QAAO;AAAA,MACP,QAAO;AAAA,MAEN;AAAA,kBACC,iCACE;AAAA,8BAAC,kBAAe,eAAa,UAAU,eAAe,MAAM,IACzD,kBACH;AAAA,UACC;AAAA,WACH;AAAA,QAEF,oBAAC,gBAAa,eAAa,UAAU,aAAa,MAAM,IACrD,UACH;AAAA,QACC,UACC,iCACG;AAAA;AAAA,UACD,oBAAC,kBAAe,eAAa,UAAU,eAAe,MAAM,IACzD,kBACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,eAAQ;;;AC9Ff,IAAOA,gBAAQ","sourcesContent":["import type { ReactNode } from 'react';\nimport type { VariantProps } from 'tailwind-variants';\n\nimport {\n Card as NextCard,\n CardBody as NextCardBody,\n CardFooter as NextCardFooter,\n CardHeader as NextCardHeader,\n} from '@nextui-org/card';\nimport { Divider as NextDivider } from '@nextui-org/divider';\nimport { tv } from 'tailwind-variants';\n\n// card styling variants\nexport const cardVariants = tv({\n slots: {\n base: 'border border-divider',\n body: '',\n divider: 'my-0 border-divider',\n footer: '',\n header: 'text-base font-semibold',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\ntype CardVariantSlots = Partial<\n Record<keyof ReturnType<typeof cardVariants>, string>\n>;\n\nexport interface CardProps extends CardVariantProps {\n /** card body content */\n children?: ReactNode;\n /** CSS class name */\n className?: string | CardVariantSlots;\n /** footer content */\n footer?: ReactNode;\n /** header content */\n header?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Card component based on [NextUI Card](https://nextui.org/docs/components/card)\n */\nconst Card = ({\n children = null,\n className = undefined,\n testId = undefined,\n header = undefined,\n footer = undefined,\n}: CardProps) => {\n // classNames from slots\n const variants = cardVariants();\n const classNameObj = (typeof className === 'object' && className) || {};\n const classNames = {\n base: variants.base({\n className: classNameObj.base || (className as string),\n }),\n header: variants.header({ className: classNameObj.header }),\n body: variants.body({ className: classNameObj.body }),\n footer: variants.footer({ className: classNameObj.footer }),\n };\n\n const divider = (\n <NextDivider\n className={variants.divider({ className: classNameObj.divider })}\n />\n );\n\n return (\n <NextCard\n classNames={classNames}\n data-testid={testId && `card_${testId}`}\n fullWidth\n radius=\"sm\"\n shadow=\"none\"\n >\n {header && (\n <>\n <NextCardHeader data-testid={testId && `card_header_${testId}`}>\n {header}\n </NextCardHeader>\n {divider}\n </>\n )}\n <NextCardBody data-testid={testId && `card_body_${testId}`}>\n {children}\n </NextCardBody>\n {footer && (\n <>\n {divider}\n <NextCardFooter data-testid={testId && `card_footer_${testId}`}>\n {footer}\n </NextCardFooter>\n </>\n )}\n </NextCard>\n );\n};\n\nexport default Card;\n","import Card from './Card';\n\nexport type { CardProps } from './Card';\n\nexport { Card };\n\nexport default Card;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/Card/Card.tsx","../src/Card/index.ts"],"names":["Card_default"],"mappings":";AAGA;AAAA,EACE,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,OACT;AACP,SAAS,WAAW,mBAAmB;AACvC,SAAS,UAAU;AAsDf,SAcI,UAdJ,KAcI,YAdJ;AAnDG,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF,CAAC;AAuBD,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,MAAiB;AAEf,QAAM,WAAW,aAAa;AAC9B,QAAM,eAAgB,OAAO,cAAc,YAAY,aAAc,CAAC;AACtE,QAAM,aAAa;AAAA,IACjB,MAAM,SAAS,KAAK;AAAA,MAClB,WAAW,aAAa,QAAS;AAAA,IACnC,CAAC;AAAA,IACD,QAAQ,SAAS,OAAO,EAAE,WAAW,aAAa,OAAO,CAAC;AAAA,IAC1D,MAAM,SAAS,KAAK,EAAE,WAAW,aAAa,KAAK,CAAC;AAAA,IACpD,QAAQ,SAAS,OAAO,EAAE,WAAW,aAAa,OAAO,CAAC;AAAA,EAC5D;AAEA,QAAM,UACJ;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,SAAS,QAAQ,EAAE,WAAW,aAAa,QAAQ,CAAC;AAAA;AAAA,EACjE;AAGF,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC,WAAS;AAAA,MACT,QAAO;AAAA,MACP,QAAO;AAAA,MAEN;AAAA,kBACC,iCACE;AAAA,8BAAC,kBAAe,eAAa,UAAU,eAAe,MAAM,IACzD,kBACH;AAAA,UACC;AAAA,WACH;AAAA,QAEF,oBAAC,gBAAa,eAAa,UAAU,aAAa,MAAM,IACrD,UACH;AAAA,QACC,UACC,iCACG;AAAA;AAAA,UACD,oBAAC,kBAAe,eAAa,UAAU,eAAe,MAAM,IACzD,kBACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,eAAQ;;;AC9Ff,IAAOA,gBAAQ","sourcesContent":["import type { ReactNode } from 'react';\nimport type { VariantProps } from 'tailwind-variants';\n\nimport {\n Card as NextCard,\n CardBody as NextCardBody,\n CardFooter as NextCardFooter,\n CardHeader as NextCardHeader,\n} from '@nextui-org/card';\nimport { Divider as NextDivider } from '@nextui-org/divider';\nimport { tv } from 'tailwind-variants';\n\n// card styling variants\nexport const cardVariants = tv({\n slots: {\n base: 'border border-divider',\n body: '',\n divider: 'my-0 border-divider',\n footer: '',\n header: 'text-base font-semibold',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\ntype CardVariantSlots = Partial<\n Record<keyof ReturnType<typeof cardVariants>, string>\n>;\n\nexport interface CardProps extends CardVariantProps {\n /** card body content */\n children?: ReactNode;\n /** CSS class name */\n className?: string | CardVariantSlots;\n /** footer content */\n footer?: ReactNode;\n /** header content */\n header?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Card component based on [NextUI Card](https://nextui.org/docs/components/card)\n */\nconst Card = ({\n children = null,\n className = undefined,\n testId = undefined,\n header = undefined,\n footer = undefined,\n}: CardProps) => {\n // classNames from slots\n const variants = cardVariants();\n const classNameObj = (typeof className === 'object' && className) || {};\n const classNames = {\n base: variants.base({\n className: classNameObj.base || (className as string),\n }),\n header: variants.header({ className: classNameObj.header }),\n body: variants.body({ className: classNameObj.body }),\n footer: variants.footer({ className: classNameObj.footer }),\n };\n\n const divider = (\n <NextDivider\n className={variants.divider({ className: classNameObj.divider })}\n />\n );\n\n return (\n <NextCard\n classNames={classNames}\n data-testid={testId && `card_${testId}`}\n fullWidth\n radius=\"sm\"\n shadow=\"none\"\n >\n {header && (\n <>\n <NextCardHeader data-testid={testId && `card_header_${testId}`}>\n {header}\n </NextCardHeader>\n {divider}\n </>\n )}\n <NextCardBody data-testid={testId && `card_body_${testId}`}>\n {children}\n </NextCardBody>\n {footer && (\n <>\n {divider}\n <NextCardFooter data-testid={testId && `card_footer_${testId}`}>\n {footer}\n </NextCardFooter>\n </>\n )}\n </NextCard>\n );\n};\n\nexport default Card;\n","import Card, { cardVariants } from './Card';\n\nexport type { CardProps } from './Card';\n\nexport { Card, cardVariants };\n\nexport default Card;\n"]}
|