@fuf-stack/pixels 0.31.1 → 0.31.3
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/Drawer/index.cjs +4 -80
- package/dist/Drawer/index.cjs.map +1 -1
- package/dist/Drawer/index.d.cts +10 -140
- package/dist/Drawer/index.d.ts +10 -140
- package/dist/Drawer/index.js +10 -86
- package/dist/Drawer/index.js.map +1 -1
- package/dist/Drawer-DvEDC3UK.d.cts +142 -0
- package/dist/Drawer-DvEDC3UK.d.ts +142 -0
- package/dist/Label/index.d.cts +2 -2
- package/dist/Label/index.d.ts +2 -2
- package/dist/chunk-7ZJ6LE2P.cjs +96 -0
- package/dist/chunk-7ZJ6LE2P.cjs.map +1 -0
- package/dist/chunk-OQIMB45E.js +96 -0
- package/dist/chunk-OQIMB45E.js.map +1 -0
- package/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +17 -3
- package/package.json +4 -4
- package/dist/{Label-DSBpvzTK.d.cts → Label--qRYiJs-.d.cts} +5 -5
- package/dist/{Label-DSBpvzTK.d.ts → Label--qRYiJs-.d.ts} +5 -5
package/dist/Drawer/index.cjs
CHANGED
|
@@ -1,90 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
// src/Drawer/Drawer.tsx
|
|
4
3
|
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
13
|
-
var drawerVariants = _pixelutils.tv.call(void 0, {
|
|
14
|
-
slots: {
|
|
15
|
-
wrapper: "",
|
|
16
|
-
base: "",
|
|
17
|
-
backdrop: "",
|
|
18
|
-
header: "",
|
|
19
|
-
body: "",
|
|
20
|
-
footer: "",
|
|
21
|
-
closeButton: ""
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var drawerSizes = [
|
|
25
|
-
"xs",
|
|
26
|
-
"sm",
|
|
27
|
-
"md",
|
|
28
|
-
"lg",
|
|
29
|
-
"xl",
|
|
30
|
-
"2xl",
|
|
31
|
-
"3xl",
|
|
32
|
-
"4xl",
|
|
33
|
-
"5xl",
|
|
34
|
-
"full"
|
|
35
|
-
];
|
|
36
|
-
var drawerRadii = ["none", "sm", "md", "lg"];
|
|
37
|
-
var drawerBackdrops = ["opaque", "transparent", "blur"];
|
|
38
|
-
var drawerPlacements = ["left", "right", "top", "bottom"];
|
|
39
|
-
var Drawer = ({
|
|
40
|
-
backdrop = "opaque",
|
|
41
|
-
children = null,
|
|
42
|
-
className = void 0,
|
|
43
|
-
closeButton = void 0,
|
|
44
|
-
footer = void 0,
|
|
45
|
-
header = void 0,
|
|
46
|
-
hideCloseButton = false,
|
|
47
|
-
isOpen = void 0,
|
|
48
|
-
isDismissable = true,
|
|
49
|
-
onClose = void 0,
|
|
50
|
-
onOpenChange = void 0,
|
|
51
|
-
placement = "right",
|
|
52
|
-
portalContainer = void 0,
|
|
53
|
-
radius = "none",
|
|
54
|
-
size = "md",
|
|
55
|
-
testId = void 0
|
|
56
|
-
}) => {
|
|
57
|
-
const variants = drawerVariants();
|
|
58
|
-
const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, className, "base");
|
|
59
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
60
|
-
_drawer.Drawer,
|
|
61
|
-
{
|
|
62
|
-
backdrop,
|
|
63
|
-
classNames,
|
|
64
|
-
closeButton,
|
|
65
|
-
"data-testid": testId,
|
|
66
|
-
hideCloseButton,
|
|
67
|
-
isDismissable,
|
|
68
|
-
isOpen,
|
|
69
|
-
onClose,
|
|
70
|
-
onOpenChange,
|
|
71
|
-
placement,
|
|
72
|
-
portalContainer,
|
|
73
|
-
radius,
|
|
74
|
-
scrollBehavior: "inside",
|
|
75
|
-
size,
|
|
76
|
-
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _drawer.DrawerContent, { "data-testid": testId ? `drawer_${testId}` : "drawer", children: () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
77
|
-
header && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _drawer.DrawerHeader, { children: header }),
|
|
78
|
-
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _drawer.DrawerBody, { id: "drawer_body", children }),
|
|
79
|
-
footer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _drawer.DrawerFooter, { children: footer })
|
|
80
|
-
] }) })
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
var Drawer_default = Drawer;
|
|
9
|
+
var _chunk7ZJ6LE2Pcjs = require('../chunk-7ZJ6LE2P.cjs');
|
|
10
|
+
require('../chunk-D4TLDLEX.cjs');
|
|
85
11
|
|
|
86
|
-
// src/Drawer/index.ts
|
|
87
|
-
var Drawer_default2 = Drawer_default;
|
|
88
12
|
|
|
89
13
|
|
|
90
14
|
|
|
@@ -92,5 +16,5 @@ var Drawer_default2 = Drawer_default;
|
|
|
92
16
|
|
|
93
17
|
|
|
94
18
|
|
|
95
|
-
exports.default = Drawer_default2; exports.drawerBackdrops = drawerBackdrops; exports.drawerPlacements = drawerPlacements; exports.drawerRadii = drawerRadii; exports.drawerSizes = drawerSizes; exports.drawerVariants = drawerVariants;
|
|
19
|
+
exports.Drawer = _chunk7ZJ6LE2Pcjs.Drawer_default; exports.default = _chunk7ZJ6LE2Pcjs.Drawer_default2; exports.drawerBackdrops = _chunk7ZJ6LE2Pcjs.drawerBackdrops; exports.drawerPlacements = _chunk7ZJ6LE2Pcjs.drawerPlacements; exports.drawerRadii = _chunk7ZJ6LE2Pcjs.drawerRadii; exports.drawerSizes = _chunk7ZJ6LE2Pcjs.drawerSizes; exports.drawerVariants = _chunk7ZJ6LE2Pcjs.drawerVariants;
|
|
96
20
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Drawer/index.cjs"
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Drawer/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wYAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/Drawer/index.cjs"}
|
package/dist/Drawer/index.d.cts
CHANGED
|
@@ -1,142 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { D as Drawer } from '../Drawer-DvEDC3UK.cjs';
|
|
2
|
+
export { f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from '../Drawer-DvEDC3UK.cjs';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants/dist/config.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
7
|
+
import '@nextui-org/drawer';
|
|
8
|
+
import 'react';
|
|
7
9
|
|
|
8
|
-
declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
9
|
-
[key: string]: {
|
|
10
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
11
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
12
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
13
|
-
base?: tailwind_variants.ClassValue;
|
|
14
|
-
header?: tailwind_variants.ClassValue;
|
|
15
|
-
body?: tailwind_variants.ClassValue;
|
|
16
|
-
footer?: tailwind_variants.ClassValue;
|
|
17
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
} | {
|
|
21
|
-
[x: string]: {
|
|
22
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
23
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
24
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
25
|
-
base?: tailwind_variants.ClassValue;
|
|
26
|
-
header?: tailwind_variants.ClassValue;
|
|
27
|
-
body?: tailwind_variants.ClassValue;
|
|
28
|
-
footer?: tailwind_variants.ClassValue;
|
|
29
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
} | {}, {
|
|
33
|
-
wrapper: string;
|
|
34
|
-
base: string;
|
|
35
|
-
backdrop: string;
|
|
36
|
-
header: string;
|
|
37
|
-
body: string;
|
|
38
|
-
footer: string;
|
|
39
|
-
closeButton: string;
|
|
40
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
41
|
-
[key: string]: {
|
|
42
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
43
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
44
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
45
|
-
base?: tailwind_variants.ClassValue;
|
|
46
|
-
header?: tailwind_variants.ClassValue;
|
|
47
|
-
body?: tailwind_variants.ClassValue;
|
|
48
|
-
footer?: tailwind_variants.ClassValue;
|
|
49
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
} | {}>, {
|
|
53
|
-
[key: string]: {
|
|
54
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
55
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
56
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
57
|
-
base?: tailwind_variants.ClassValue;
|
|
58
|
-
header?: tailwind_variants.ClassValue;
|
|
59
|
-
body?: tailwind_variants.ClassValue;
|
|
60
|
-
footer?: tailwind_variants.ClassValue;
|
|
61
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
} | {}, {
|
|
65
|
-
wrapper: string;
|
|
66
|
-
base: string;
|
|
67
|
-
backdrop: string;
|
|
68
|
-
header: string;
|
|
69
|
-
body: string;
|
|
70
|
-
footer: string;
|
|
71
|
-
closeButton: string;
|
|
72
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
73
|
-
wrapper: string;
|
|
74
|
-
base: string;
|
|
75
|
-
backdrop: string;
|
|
76
|
-
header: string;
|
|
77
|
-
body: string;
|
|
78
|
-
footer: string;
|
|
79
|
-
closeButton: string;
|
|
80
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
81
|
-
[key: string]: {
|
|
82
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
83
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
84
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
85
|
-
base?: tailwind_variants.ClassValue;
|
|
86
|
-
header?: tailwind_variants.ClassValue;
|
|
87
|
-
body?: tailwind_variants.ClassValue;
|
|
88
|
-
footer?: tailwind_variants.ClassValue;
|
|
89
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
93
|
-
declare const drawerSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "full"];
|
|
94
|
-
type DrawerSizes = (typeof drawerSizes)[number];
|
|
95
|
-
declare const drawerRadii: readonly ["none", "sm", "md", "lg"];
|
|
96
|
-
type DrawerRadius = (typeof drawerRadii)[number];
|
|
97
|
-
declare const drawerBackdrops: readonly ["opaque", "transparent", "blur"];
|
|
98
|
-
type DrawerBackdrop = (typeof drawerBackdrops)[number];
|
|
99
|
-
declare const drawerPlacements: readonly ["left", "right", "top", "bottom"];
|
|
100
|
-
type DrawerPlacement = (typeof drawerPlacements)[number];
|
|
101
|
-
type VariantProps = TVProps<typeof drawerVariants>;
|
|
102
|
-
type ClassName = TVClassName<typeof drawerVariants>;
|
|
103
|
-
interface DrawerProps extends VariantProps {
|
|
104
|
-
/** The backdrop style of the Drawer. */
|
|
105
|
-
backdrop?: DrawerBackdrop;
|
|
106
|
-
/** Drawer body content */
|
|
107
|
-
children?: ReactNode;
|
|
108
|
-
/** CSS class name */
|
|
109
|
-
className?: ClassName;
|
|
110
|
-
/** Custom close button to display on top right corner. */
|
|
111
|
-
closeButton?: ReactNode;
|
|
112
|
-
/** Footer of the Drawer. */
|
|
113
|
-
footer?: ReactNode;
|
|
114
|
-
/** Header of the Drawer. */
|
|
115
|
-
header?: ReactNode;
|
|
116
|
-
/** Whether to hide the drawer close button. */
|
|
117
|
-
hideCloseButton?: boolean;
|
|
118
|
-
/** Whether the drawer is open by default (controlled). */
|
|
119
|
-
isOpen?: boolean;
|
|
120
|
-
/** Whether the drawer can be closed by clicking on the overlay or pressing the Esc key. */
|
|
121
|
-
isDismissable?: boolean;
|
|
122
|
-
/** Handler that is called when the drawer is closed. */
|
|
123
|
-
onClose?: () => void;
|
|
124
|
-
/** Handler that is called when the drawer's open state changes. */
|
|
125
|
-
onOpenChange?: (isOpen: boolean) => void;
|
|
126
|
-
/** The drawer position. */
|
|
127
|
-
placement?: DrawerPlacement | undefined;
|
|
128
|
-
/** The container element in which the overlay portal will be placed */
|
|
129
|
-
portalContainer?: DrawerProps$1['portalContainer'];
|
|
130
|
-
/** The drawer border radius. */
|
|
131
|
-
radius?: DrawerRadius | undefined;
|
|
132
|
-
/** The drawer size. */
|
|
133
|
-
size?: DrawerSizes | undefined;
|
|
134
|
-
/** HTML data-testid attribute used in e2e tests */
|
|
135
|
-
testId?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Drawer component based on [NextUI Drawer](https://nextui.org/docs/components/drawer)
|
|
139
|
-
*/
|
|
140
|
-
declare const Drawer: ({ backdrop, children, className, closeButton, footer, header, hideCloseButton, isOpen, isDismissable, onClose, onOpenChange, placement, portalContainer, radius, size, testId, }: DrawerProps) => react_jsx_runtime.JSX.Element;
|
|
141
10
|
|
|
142
|
-
|
|
11
|
+
|
|
12
|
+
export { Drawer, Drawer as default };
|
package/dist/Drawer/index.d.ts
CHANGED
|
@@ -1,142 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
1
|
+
import { D as Drawer } from '../Drawer-DvEDC3UK.js';
|
|
2
|
+
export { f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from '../Drawer-DvEDC3UK.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'tailwind-variants/dist/config.js';
|
|
5
|
+
import 'tailwind-variants';
|
|
6
|
+
import '@fuf-stack/pixel-utils';
|
|
7
|
+
import '@nextui-org/drawer';
|
|
8
|
+
import 'react';
|
|
7
9
|
|
|
8
|
-
declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
9
|
-
[key: string]: {
|
|
10
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
11
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
12
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
13
|
-
base?: tailwind_variants.ClassValue;
|
|
14
|
-
header?: tailwind_variants.ClassValue;
|
|
15
|
-
body?: tailwind_variants.ClassValue;
|
|
16
|
-
footer?: tailwind_variants.ClassValue;
|
|
17
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
} | {
|
|
21
|
-
[x: string]: {
|
|
22
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
23
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
24
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
25
|
-
base?: tailwind_variants.ClassValue;
|
|
26
|
-
header?: tailwind_variants.ClassValue;
|
|
27
|
-
body?: tailwind_variants.ClassValue;
|
|
28
|
-
footer?: tailwind_variants.ClassValue;
|
|
29
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
} | {}, {
|
|
33
|
-
wrapper: string;
|
|
34
|
-
base: string;
|
|
35
|
-
backdrop: string;
|
|
36
|
-
header: string;
|
|
37
|
-
body: string;
|
|
38
|
-
footer: string;
|
|
39
|
-
closeButton: string;
|
|
40
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
41
|
-
[key: string]: {
|
|
42
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
43
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
44
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
45
|
-
base?: tailwind_variants.ClassValue;
|
|
46
|
-
header?: tailwind_variants.ClassValue;
|
|
47
|
-
body?: tailwind_variants.ClassValue;
|
|
48
|
-
footer?: tailwind_variants.ClassValue;
|
|
49
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
} | {}>, {
|
|
53
|
-
[key: string]: {
|
|
54
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
55
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
56
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
57
|
-
base?: tailwind_variants.ClassValue;
|
|
58
|
-
header?: tailwind_variants.ClassValue;
|
|
59
|
-
body?: tailwind_variants.ClassValue;
|
|
60
|
-
footer?: tailwind_variants.ClassValue;
|
|
61
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
} | {}, {
|
|
65
|
-
wrapper: string;
|
|
66
|
-
base: string;
|
|
67
|
-
backdrop: string;
|
|
68
|
-
header: string;
|
|
69
|
-
body: string;
|
|
70
|
-
footer: string;
|
|
71
|
-
closeButton: string;
|
|
72
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
73
|
-
wrapper: string;
|
|
74
|
-
base: string;
|
|
75
|
-
backdrop: string;
|
|
76
|
-
header: string;
|
|
77
|
-
body: string;
|
|
78
|
-
footer: string;
|
|
79
|
-
closeButton: string;
|
|
80
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
81
|
-
[key: string]: {
|
|
82
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
83
|
-
backdrop?: tailwind_variants.ClassValue;
|
|
84
|
-
wrapper?: tailwind_variants.ClassValue;
|
|
85
|
-
base?: tailwind_variants.ClassValue;
|
|
86
|
-
header?: tailwind_variants.ClassValue;
|
|
87
|
-
body?: tailwind_variants.ClassValue;
|
|
88
|
-
footer?: tailwind_variants.ClassValue;
|
|
89
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
93
|
-
declare const drawerSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "full"];
|
|
94
|
-
type DrawerSizes = (typeof drawerSizes)[number];
|
|
95
|
-
declare const drawerRadii: readonly ["none", "sm", "md", "lg"];
|
|
96
|
-
type DrawerRadius = (typeof drawerRadii)[number];
|
|
97
|
-
declare const drawerBackdrops: readonly ["opaque", "transparent", "blur"];
|
|
98
|
-
type DrawerBackdrop = (typeof drawerBackdrops)[number];
|
|
99
|
-
declare const drawerPlacements: readonly ["left", "right", "top", "bottom"];
|
|
100
|
-
type DrawerPlacement = (typeof drawerPlacements)[number];
|
|
101
|
-
type VariantProps = TVProps<typeof drawerVariants>;
|
|
102
|
-
type ClassName = TVClassName<typeof drawerVariants>;
|
|
103
|
-
interface DrawerProps extends VariantProps {
|
|
104
|
-
/** The backdrop style of the Drawer. */
|
|
105
|
-
backdrop?: DrawerBackdrop;
|
|
106
|
-
/** Drawer body content */
|
|
107
|
-
children?: ReactNode;
|
|
108
|
-
/** CSS class name */
|
|
109
|
-
className?: ClassName;
|
|
110
|
-
/** Custom close button to display on top right corner. */
|
|
111
|
-
closeButton?: ReactNode;
|
|
112
|
-
/** Footer of the Drawer. */
|
|
113
|
-
footer?: ReactNode;
|
|
114
|
-
/** Header of the Drawer. */
|
|
115
|
-
header?: ReactNode;
|
|
116
|
-
/** Whether to hide the drawer close button. */
|
|
117
|
-
hideCloseButton?: boolean;
|
|
118
|
-
/** Whether the drawer is open by default (controlled). */
|
|
119
|
-
isOpen?: boolean;
|
|
120
|
-
/** Whether the drawer can be closed by clicking on the overlay or pressing the Esc key. */
|
|
121
|
-
isDismissable?: boolean;
|
|
122
|
-
/** Handler that is called when the drawer is closed. */
|
|
123
|
-
onClose?: () => void;
|
|
124
|
-
/** Handler that is called when the drawer's open state changes. */
|
|
125
|
-
onOpenChange?: (isOpen: boolean) => void;
|
|
126
|
-
/** The drawer position. */
|
|
127
|
-
placement?: DrawerPlacement | undefined;
|
|
128
|
-
/** The container element in which the overlay portal will be placed */
|
|
129
|
-
portalContainer?: DrawerProps$1['portalContainer'];
|
|
130
|
-
/** The drawer border radius. */
|
|
131
|
-
radius?: DrawerRadius | undefined;
|
|
132
|
-
/** The drawer size. */
|
|
133
|
-
size?: DrawerSizes | undefined;
|
|
134
|
-
/** HTML data-testid attribute used in e2e tests */
|
|
135
|
-
testId?: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Drawer component based on [NextUI Drawer](https://nextui.org/docs/components/drawer)
|
|
139
|
-
*/
|
|
140
|
-
declare const Drawer: ({ backdrop, children, className, closeButton, footer, header, hideCloseButton, isOpen, isDismissable, onClose, onOpenChange, placement, portalContainer, radius, size, testId, }: DrawerProps) => react_jsx_runtime.JSX.Element;
|
|
141
10
|
|
|
142
|
-
|
|
11
|
+
|
|
12
|
+
export { Drawer, Drawer as default };
|
package/dist/Drawer/index.js
CHANGED
|
@@ -1,91 +1,15 @@
|
|
|
1
|
-
import "../chunk-J7N2552D.js";
|
|
2
|
-
|
|
3
|
-
// src/Drawer/Drawer.tsx
|
|
4
1
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
slots: {
|
|
15
|
-
wrapper: "",
|
|
16
|
-
base: "",
|
|
17
|
-
backdrop: "",
|
|
18
|
-
header: "",
|
|
19
|
-
body: "",
|
|
20
|
-
footer: "",
|
|
21
|
-
closeButton: ""
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var drawerSizes = [
|
|
25
|
-
"xs",
|
|
26
|
-
"sm",
|
|
27
|
-
"md",
|
|
28
|
-
"lg",
|
|
29
|
-
"xl",
|
|
30
|
-
"2xl",
|
|
31
|
-
"3xl",
|
|
32
|
-
"4xl",
|
|
33
|
-
"5xl",
|
|
34
|
-
"full"
|
|
35
|
-
];
|
|
36
|
-
var drawerRadii = ["none", "sm", "md", "lg"];
|
|
37
|
-
var drawerBackdrops = ["opaque", "transparent", "blur"];
|
|
38
|
-
var drawerPlacements = ["left", "right", "top", "bottom"];
|
|
39
|
-
var Drawer = ({
|
|
40
|
-
backdrop = "opaque",
|
|
41
|
-
children = null,
|
|
42
|
-
className = void 0,
|
|
43
|
-
closeButton = void 0,
|
|
44
|
-
footer = void 0,
|
|
45
|
-
header = void 0,
|
|
46
|
-
hideCloseButton = false,
|
|
47
|
-
isOpen = void 0,
|
|
48
|
-
isDismissable = true,
|
|
49
|
-
onClose = void 0,
|
|
50
|
-
onOpenChange = void 0,
|
|
51
|
-
placement = "right",
|
|
52
|
-
portalContainer = void 0,
|
|
53
|
-
radius = "none",
|
|
54
|
-
size = "md",
|
|
55
|
-
testId = void 0
|
|
56
|
-
}) => {
|
|
57
|
-
const variants = drawerVariants();
|
|
58
|
-
const classNames = variantsToClassNames(variants, className, "base");
|
|
59
|
-
return /* @__PURE__ */ jsx(
|
|
60
|
-
NextDrawer,
|
|
61
|
-
{
|
|
62
|
-
backdrop,
|
|
63
|
-
classNames,
|
|
64
|
-
closeButton,
|
|
65
|
-
"data-testid": testId,
|
|
66
|
-
hideCloseButton,
|
|
67
|
-
isDismissable,
|
|
68
|
-
isOpen,
|
|
69
|
-
onClose,
|
|
70
|
-
onOpenChange,
|
|
71
|
-
placement,
|
|
72
|
-
portalContainer,
|
|
73
|
-
radius,
|
|
74
|
-
scrollBehavior: "inside",
|
|
75
|
-
size,
|
|
76
|
-
children: /* @__PURE__ */ jsx(NextDrawerContent, { "data-testid": testId ? `drawer_${testId}` : "drawer", children: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
77
|
-
header && /* @__PURE__ */ jsx(NextDrawerHeader, { children: header }),
|
|
78
|
-
/* @__PURE__ */ jsx(NextDrawerBody, { id: "drawer_body", children }),
|
|
79
|
-
footer && /* @__PURE__ */ jsx(NextDrawerFooter, { children: footer })
|
|
80
|
-
] }) })
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
};
|
|
84
|
-
var Drawer_default = Drawer;
|
|
85
|
-
|
|
86
|
-
// src/Drawer/index.ts
|
|
87
|
-
var Drawer_default2 = Drawer_default;
|
|
2
|
+
Drawer_default,
|
|
3
|
+
Drawer_default2,
|
|
4
|
+
drawerBackdrops,
|
|
5
|
+
drawerPlacements,
|
|
6
|
+
drawerRadii,
|
|
7
|
+
drawerSizes,
|
|
8
|
+
drawerVariants
|
|
9
|
+
} from "../chunk-OQIMB45E.js";
|
|
10
|
+
import "../chunk-J7N2552D.js";
|
|
88
11
|
export {
|
|
12
|
+
Drawer_default as Drawer,
|
|
89
13
|
Drawer_default2 as default,
|
|
90
14
|
drawerBackdrops,
|
|
91
15
|
drawerPlacements,
|
package/dist/Drawer/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|