@c15t/dev-tools 0.0.1-rc.9 → 1.0.1
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/CHANGELOG.md +8 -1
- package/README.md +1 -1
- package/dist/components/error-state.cjs +88 -117
- package/dist/components/error-state.css +25 -28
- package/dist/components/error-state.d.ts +4 -6
- package/dist/components/error-state.js +61 -108
- package/dist/components/header.cjs +55 -74
- package/dist/components/header.css +18 -17
- package/dist/components/header.d.ts +3 -5
- package/dist/components/header.js +28 -45
- package/dist/components/ui/accordion.cjs +71 -101
- package/dist/components/ui/accordion.css +39 -39
- package/dist/components/ui/accordion.d.ts +5 -32
- package/dist/components/ui/accordion.js +36 -70
- package/dist/components/ui/alert.cjs +66 -80
- package/dist/components/ui/alert.css +27 -30
- package/dist/components/ui/alert.d.ts +6 -22
- package/dist/components/ui/alert.js +34 -54
- package/dist/components/ui/badge.cjs +52 -62
- package/dist/components/ui/badge.css +27 -39
- package/dist/components/ui/badge.d.ts +7 -22
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/badge.js +23 -31
- package/dist/components/ui/button.cjs +67 -76
- package/dist/components/ui/button.css +40 -43
- package/dist/components/ui/button.d.ts +8 -24
- package/dist/components/ui/button.js +38 -47
- package/dist/components/ui/card.cjs +76 -92
- package/dist/components/ui/card.css +21 -20
- package/dist/components/ui/card.d.ts +8 -29
- package/dist/components/ui/card.js +35 -76
- package/dist/components/ui/error-state.css +20 -19
- package/dist/components/ui/expandable-tabs.cjs +118 -158
- package/dist/components/ui/expandable-tabs.css +34 -33
- package/dist/components/ui/expandable-tabs.d.ts +13 -20
- package/dist/components/ui/expandable-tabs.js +91 -131
- package/dist/components/ui/logo.cjs +93 -106
- package/dist/components/ui/logo.d.ts +5 -11
- package/dist/components/ui/logo.d.ts.map +1 -1
- package/dist/components/ui/logo.js +67 -82
- package/dist/components/ui/scroll-area.cjs +57 -85
- package/dist/components/ui/scroll-area.css +25 -24
- package/dist/components/ui/scroll-area.d.ts +3 -17
- package/dist/components/ui/scroll-area.js +28 -62
- package/dist/components/ui/switch.cjs +39 -56
- package/dist/components/ui/switch.css +26 -25
- package/dist/components/ui/switch.d.ts +2 -9
- package/dist/components/ui/switch.js +13 -25
- package/dist/components/ui/tooltip.cjs +48 -60
- package/dist/components/ui/tooltip.css +64 -63
- package/dist/components/ui/tooltip.d.ts +5 -17
- package/dist/components/ui/tooltip.js +16 -32
- package/dist/components/wrapper.cjs +148 -205
- package/dist/components/wrapper.css +49 -48
- package/dist/components/wrapper.d.ts +7 -12
- package/dist/components/wrapper.js +119 -186
- package/dist/dev-tool.cjs +112 -153
- package/dist/dev-tool.d.ts +6 -6
- package/dist/dev-tool.d.ts.map +1 -1
- package/dist/dev-tool.js +71 -108
- package/dist/index.cjs +28 -36
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/libs/utils.cjs +39 -58
- package/dist/libs/utils.d.ts +1 -1
- package/dist/libs/utils.js +3 -5
- package/dist/router/router.cjs +145 -193
- package/dist/router/router.d.ts +3 -5
- package/dist/router/router.d.ts.map +1 -1
- package/dist/router/router.js +118 -174
- package/dist/styles/theme.css +37 -36
- package/package.json +12 -12
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
.c15t-devtool-card {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
border: 1px solid var(--c15t-dev-tools-border);
|
|
3
|
+
background-color: var(--c15t-dev-tools-card);
|
|
4
|
+
color: var(--c15t-dev-tools-card-foreground);
|
|
5
|
+
border-radius: .5rem;
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
box-shadow: 0 1px 2px #0000000d;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.c15t-devtool-card-header {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
padding: 1.5rem;
|
|
13
|
+
display: flex;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
.c15t-devtool-card-header > * + * {
|
|
17
|
-
|
|
17
|
+
margin-top: .375rem;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.c15t-devtool-card-title {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
letter-spacing: -.025em;
|
|
22
|
+
font-size: 1.5rem;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
line-height: 1;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
.c15t-devtool-card-description {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
color: var(--c15t-dev-tools-muted-foreground);
|
|
29
|
+
font-size: .875rem;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.c15t-devtool-card-content {
|
|
33
|
-
|
|
33
|
+
padding: 0 1.5rem 1.5rem;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.c15t-devtool-card-footer {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
align-items: center;
|
|
38
|
+
padding: 0 1.5rem 1.5rem;
|
|
39
|
+
display: flex;
|
|
40
40
|
}
|
|
41
|
+
|
|
@@ -1,31 +1,10 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
2
|
import './card.css';
|
|
3
|
-
declare const Card: import(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import('react').RefAttributes<HTMLParagraphElement>
|
|
12
|
-
>;
|
|
13
|
-
declare const CardDescription: import('react').ForwardRefExoticComponent<
|
|
14
|
-
HTMLAttributes<HTMLParagraphElement> &
|
|
15
|
-
import('react').RefAttributes<HTMLParagraphElement>
|
|
16
|
-
>;
|
|
17
|
-
declare const CardContent: import('react').ForwardRefExoticComponent<
|
|
18
|
-
HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>
|
|
19
|
-
>;
|
|
20
|
-
declare const CardFooter: import('react').ForwardRefExoticComponent<
|
|
21
|
-
HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>
|
|
22
|
-
>;
|
|
23
|
-
export {
|
|
24
|
-
Card,
|
|
25
|
-
CardHeader,
|
|
26
|
-
CardFooter,
|
|
27
|
-
CardTitle,
|
|
28
|
-
CardDescription,
|
|
29
|
-
CardContent,
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=card.d.ts.map
|
|
3
|
+
declare const Card: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CardHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const CardTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
6
|
+
declare const CardDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
7
|
+
declare const CardContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const CardFooter: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, };
|
|
10
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1,81 +1,40 @@
|
|
|
1
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from
|
|
2
|
-
import * as __WEBPACK_EXTERNAL_MODULE_react__ from
|
|
3
|
-
import
|
|
4
|
-
const Card = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
className: `c15t-devtool-card ${className || ''}`,
|
|
10
|
-
...props,
|
|
11
|
-
})
|
|
12
|
-
);
|
|
1
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
|
|
2
|
+
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
3
|
+
import "./card.css";
|
|
4
|
+
const Card = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
5
|
+
ref: ref,
|
|
6
|
+
className: `c15t-devtool-card ${className || ''}`,
|
|
7
|
+
...props
|
|
8
|
+
}));
|
|
13
9
|
Card.displayName = 'Card';
|
|
14
|
-
const CardHeader = /*#__PURE__*/ (0,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
ref: ref,
|
|
20
|
-
className: `c15t-devtool-card-header ${className || ''}`,
|
|
21
|
-
...props,
|
|
22
|
-
}
|
|
23
|
-
)
|
|
24
|
-
);
|
|
10
|
+
const CardHeader = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
11
|
+
ref: ref,
|
|
12
|
+
className: `c15t-devtool-card-header ${className || ''}`,
|
|
13
|
+
...props
|
|
14
|
+
}));
|
|
25
15
|
CardHeader.displayName = 'CardHeader';
|
|
26
|
-
const CardTitle = /*#__PURE__*/ (0,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ref: ref,
|
|
32
|
-
className: `c15t-devtool-card-title ${className || ''}`,
|
|
33
|
-
...props,
|
|
34
|
-
}
|
|
35
|
-
)
|
|
36
|
-
);
|
|
16
|
+
const CardTitle = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("h3", {
|
|
17
|
+
ref: ref,
|
|
18
|
+
className: `c15t-devtool-card-title ${className || ''}`,
|
|
19
|
+
...props
|
|
20
|
+
}));
|
|
37
21
|
CardTitle.displayName = 'CardTitle';
|
|
38
|
-
const CardDescription = /*#__PURE__*/ (0,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
);
|
|
49
|
-
CardDescription.displayName = 'CardDescription';
|
|
50
|
-
const CardContent = /*#__PURE__*/ (0,
|
|
51
|
-
__WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref) =>
|
|
52
|
-
/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
|
|
53
|
-
'div',
|
|
54
|
-
{
|
|
55
|
-
ref: ref,
|
|
56
|
-
className: `c15t-devtool-card-content ${className || ''}`,
|
|
57
|
-
...props,
|
|
58
|
-
}
|
|
59
|
-
)
|
|
60
|
-
);
|
|
22
|
+
const CardDescription = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("p", {
|
|
23
|
+
ref: ref,
|
|
24
|
+
className: `c15t-devtool-card-description ${className || ''}`,
|
|
25
|
+
...props
|
|
26
|
+
}));
|
|
27
|
+
CardDescription.displayName = "CardDescription";
|
|
28
|
+
const CardContent = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
29
|
+
ref: ref,
|
|
30
|
+
className: `c15t-devtool-card-content ${className || ''}`,
|
|
31
|
+
...props
|
|
32
|
+
}));
|
|
61
33
|
CardContent.displayName = 'CardContent';
|
|
62
|
-
const CardFooter = /*#__PURE__*/ (0,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
ref: ref,
|
|
68
|
-
className: `c15t-devtool-card-footer ${className || ''}`,
|
|
69
|
-
...props,
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
);
|
|
34
|
+
const CardFooter = /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react__.forwardRef)(({ className, ...props }, ref)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
|
|
35
|
+
ref: ref,
|
|
36
|
+
className: `c15t-devtool-card-footer ${className || ''}`,
|
|
37
|
+
...props
|
|
38
|
+
}));
|
|
73
39
|
CardFooter.displayName = 'CardFooter';
|
|
74
|
-
export {
|
|
75
|
-
Card,
|
|
76
|
-
CardContent,
|
|
77
|
-
CardDescription,
|
|
78
|
-
CardFooter,
|
|
79
|
-
CardHeader,
|
|
80
|
-
CardTitle,
|
|
81
|
-
};
|
|
40
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
.c15t-devtool-error-state {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
text-align: center;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
align-items: center;
|
|
6
|
+
min-height: 400px;
|
|
7
|
+
display: flex;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
.c15t-devtool-error-state-icon {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
color: var(--c15t-dev-tools-muted-foreground);
|
|
12
|
+
margin-bottom: 1.5rem;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.c15t-devtool-error-state-title {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
margin-bottom: .5rem;
|
|
17
|
+
font-size: 1.5rem;
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
line-height: 1;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.c15t-devtool-error-state-description {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
max-width: 400px;
|
|
24
|
+
color: var(--c15t-dev-tools-muted-foreground);
|
|
25
|
+
margin-bottom: 1.5rem;
|
|
26
|
+
font-size: .875rem;
|
|
27
|
+
line-height: 1.5;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.c15t-devtool-error-state-actions {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
gap: .5rem;
|
|
32
|
+
display: flex;
|
|
33
33
|
}
|
|
34
|
+
|
|
@@ -1,176 +1,136 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
"use strict";
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
|
-
(()
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports1, key, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: definition[key],
|
|
14
|
-
});
|
|
15
|
-
};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
16
11
|
})();
|
|
17
|
-
(()
|
|
18
|
-
|
|
19
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
20
|
-
};
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
21
14
|
})();
|
|
22
|
-
(()
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
32
24
|
})();
|
|
33
25
|
var __webpack_exports__ = {};
|
|
34
26
|
__webpack_require__.r(__webpack_exports__);
|
|
35
27
|
__webpack_require__.d(__webpack_exports__, {
|
|
36
|
-
|
|
28
|
+
ExpandableTabs: ()=>ExpandableTabs
|
|
37
29
|
});
|
|
38
|
-
const jsx_runtime_namespaceObject = require(
|
|
39
|
-
const react_namespaceObject = require(
|
|
40
|
-
const external_react_namespaceObject = require(
|
|
41
|
-
require(
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const react_namespaceObject = require("motion/react");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
require("./expandable-tabs.css");
|
|
42
34
|
const buttonVariants = {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
initial: {
|
|
36
|
+
gap: 0,
|
|
37
|
+
paddingLeft: '.5rem',
|
|
38
|
+
paddingRight: '.5rem'
|
|
39
|
+
},
|
|
40
|
+
animate: (isSelected)=>({
|
|
41
|
+
gap: isSelected ? '.5rem' : 0,
|
|
42
|
+
paddingLeft: isSelected ? '1rem' : '.5rem',
|
|
43
|
+
paddingRight: isSelected ? '1rem' : '.5rem'
|
|
44
|
+
})
|
|
53
45
|
};
|
|
54
46
|
const spanVariants = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
initial: {
|
|
48
|
+
width: 0,
|
|
49
|
+
opacity: 0
|
|
50
|
+
},
|
|
51
|
+
animate: {
|
|
52
|
+
width: 'auto',
|
|
53
|
+
opacity: 1
|
|
54
|
+
},
|
|
55
|
+
exit: {
|
|
56
|
+
width: 0,
|
|
57
|
+
opacity: 0
|
|
58
|
+
}
|
|
67
59
|
};
|
|
68
60
|
const transition = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
delay: 0.1,
|
|
62
|
+
type: 'spring',
|
|
63
|
+
bounce: 0,
|
|
64
|
+
duration: 0.6
|
|
73
65
|
};
|
|
74
|
-
const Separator = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(()
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
})
|
|
79
|
-
);
|
|
66
|
+
const Separator = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
67
|
+
className: "c15t-devtool-tab-separator",
|
|
68
|
+
"aria-hidden": "true"
|
|
69
|
+
}));
|
|
80
70
|
Separator.displayName = 'Separator';
|
|
81
|
-
const TabButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
exit: 'exit',
|
|
111
|
-
transition: transition,
|
|
112
|
-
className: 'c15t-devtool-tab-title',
|
|
113
|
-
children: tab.title,
|
|
114
|
-
}
|
|
115
|
-
),
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
],
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
);
|
|
71
|
+
const TabButton = /*#__PURE__*/ (0, external_react_namespaceObject.memo)(({ tab, index, isSelected, activeColor, onClick })=>{
|
|
72
|
+
const Icon = tab.icon;
|
|
73
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_namespaceObject.motion.button, {
|
|
74
|
+
variants: buttonVariants,
|
|
75
|
+
initial: false,
|
|
76
|
+
animate: "animate",
|
|
77
|
+
custom: isSelected,
|
|
78
|
+
onClick: ()=>onClick(index),
|
|
79
|
+
transition: transition,
|
|
80
|
+
className: `c15t-devtool-tab-button ${isSelected ? `selected ${activeColor}` : ''}`,
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Icon, {
|
|
83
|
+
size: 20
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.AnimatePresence, {
|
|
86
|
+
initial: false,
|
|
87
|
+
children: isSelected && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.motion.span, {
|
|
88
|
+
variants: spanVariants,
|
|
89
|
+
initial: "initial",
|
|
90
|
+
animate: "animate",
|
|
91
|
+
exit: "exit",
|
|
92
|
+
transition: transition,
|
|
93
|
+
className: "c15t-devtool-tab-title",
|
|
94
|
+
children: tab.title
|
|
95
|
+
})
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
});
|
|
99
|
+
});
|
|
123
100
|
TabButton.displayName = 'TabButton';
|
|
124
|
-
function ExpandableTabs({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
Separator,
|
|
153
|
-
{},
|
|
154
|
-
`separator-${index}`
|
|
155
|
-
)
|
|
156
|
-
: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
157
|
-
TabButton,
|
|
158
|
-
{
|
|
159
|
-
tab: tab,
|
|
160
|
-
index: index,
|
|
161
|
-
isSelected: selected === index,
|
|
162
|
-
activeColor: activeColor,
|
|
163
|
-
onClick: handleSelect,
|
|
164
|
-
},
|
|
165
|
-
`${tab.title}-${index}`
|
|
166
|
-
)
|
|
167
|
-
),
|
|
168
|
-
});
|
|
101
|
+
function ExpandableTabs({ tabs, className, activeColor = 'primary', onChange }) {
|
|
102
|
+
const [selected, setSelected] = (0, external_react_namespaceObject.useState)(0);
|
|
103
|
+
const handleInitialChange = (0, external_react_namespaceObject.useCallback)(()=>{
|
|
104
|
+
onChange?.(0);
|
|
105
|
+
}, [
|
|
106
|
+
onChange
|
|
107
|
+
]);
|
|
108
|
+
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
109
|
+
handleInitialChange();
|
|
110
|
+
}, [
|
|
111
|
+
handleInitialChange
|
|
112
|
+
]);
|
|
113
|
+
const handleSelect = (0, external_react_namespaceObject.useCallback)((index)=>{
|
|
114
|
+
setSelected(index);
|
|
115
|
+
onChange?.(index);
|
|
116
|
+
}, [
|
|
117
|
+
onChange
|
|
118
|
+
]);
|
|
119
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
120
|
+
className: `c15t-devtool-tabs-container ${className || ''}`,
|
|
121
|
+
children: tabs.map((tab, index)=>'separator' === tab.type ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(Separator, {}, `separator-${index}`) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabButton, {
|
|
122
|
+
tab: tab,
|
|
123
|
+
index: index,
|
|
124
|
+
isSelected: selected === index,
|
|
125
|
+
activeColor: activeColor,
|
|
126
|
+
onClick: handleSelect
|
|
127
|
+
}, `${tab.title}-${index}`))
|
|
128
|
+
});
|
|
169
129
|
}
|
|
170
|
-
|
|
171
|
-
for
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
130
|
+
exports.ExpandableTabs = __webpack_exports__.ExpandableTabs;
|
|
131
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
132
|
+
"ExpandableTabs"
|
|
133
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
134
|
+
Object.defineProperty(exports, '__esModule', {
|
|
135
|
+
value: true
|
|
136
|
+
});
|
|
@@ -1,56 +1,57 @@
|
|
|
1
1
|
.c15t-devtool-tabs-container {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
border: 1px solid var(--c15t-dev-tools-border);
|
|
3
|
+
background-color: var(--c15t-dev-tools-background);
|
|
4
|
+
border-radius: 1rem;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: .5rem;
|
|
8
|
+
padding: .25rem;
|
|
9
|
+
display: flex;
|
|
10
|
+
box-shadow: 0 1px 2px #0000000d;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.c15t-devtool-tab-separator {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
background-color: var(--border);
|
|
15
|
+
width: 1.2px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
margin-left: .25rem;
|
|
18
|
+
margin-right: .25rem;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.c15t-devtool-tab-button {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
border-radius: .75rem;
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
align-items: center;
|
|
26
|
+
padding: .5rem 1rem;
|
|
27
|
+
font-size: .875rem;
|
|
28
|
+
font-weight: 500;
|
|
29
|
+
transition-property: color, background-color;
|
|
30
|
+
transition-duration: .3s;
|
|
31
|
+
transition-timing-function: cubic-bezier(.4, 0, .2, 1);
|
|
32
|
+
display: flex;
|
|
33
|
+
position: relative;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
.c15t-devtool-tab-button:not(.selected) {
|
|
37
|
-
|
|
37
|
+
color: var(--c15t-dev-tools-muted-foreground);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.c15t-devtool-tab-button:not(.selected):hover {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
background-color: var(--c15t-dev-tools-muted);
|
|
42
|
+
color: var(--c15t-dev-tools-foreground);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.c15t-devtool-tab-button.selected {
|
|
46
|
-
|
|
46
|
+
background-color: var(--c15t-dev-tools-muted);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.c15t-devtool-tab-button.selected.primary {
|
|
50
|
-
|
|
50
|
+
color: var(--c15t-dev-tools-primary);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.c15t-devtool-tab-title {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
overflow: hidden;
|
|
56
56
|
}
|
|
57
|
+
|