@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
package/dist/router/router.cjs
CHANGED
|
@@ -1,206 +1,158 @@
|
|
|
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
|
+
Router: ()=>Router
|
|
37
29
|
});
|
|
38
|
-
const jsx_runtime_namespaceObject = require(
|
|
39
|
-
const external_lucide_react_namespaceObject = require(
|
|
40
|
-
const react_namespaceObject = require(
|
|
41
|
-
const external_react_namespaceObject = require(
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
const
|
|
30
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
32
|
+
const react_namespaceObject = require("motion/react");
|
|
33
|
+
const external_react_namespaceObject = require("react");
|
|
34
|
+
const badge_cjs_namespaceObject = require("../components/ui/badge.cjs");
|
|
35
|
+
const expandable_tabs_cjs_namespaceObject = require("../components/ui/expandable-tabs.cjs");
|
|
36
|
+
const scroll_area_cjs_namespaceObject = require("../components/ui/scroll-area.cjs");
|
|
37
|
+
const external_dev_tool_cjs_namespaceObject = require("../dev-tool.cjs");
|
|
46
38
|
const tabs = [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
{
|
|
40
|
+
title: 'Consents',
|
|
41
|
+
icon: external_lucide_react_namespaceObject.ToggleLeft
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
title: 'Compliance',
|
|
45
|
+
icon: external_lucide_react_namespaceObject.GanttChartSquare
|
|
46
|
+
}
|
|
55
47
|
];
|
|
56
48
|
function Router({ onClose: _onClose }) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
children: [
|
|
160
|
-
/*#__PURE__*/ (0,
|
|
161
|
-
jsx_runtime_namespaceObject.jsx)('span', {
|
|
162
|
-
className: 'font-medium text-sm',
|
|
163
|
-
children: item.title,
|
|
164
|
-
}),
|
|
165
|
-
item.details &&
|
|
166
|
-
/*#__PURE__*/ (0,
|
|
167
|
-
jsx_runtime_namespaceObject.jsx)('span', {
|
|
168
|
-
className: 'text-muted-foreground text-xs',
|
|
169
|
-
children: item.details,
|
|
170
|
-
}),
|
|
171
|
-
],
|
|
172
|
-
}
|
|
173
|
-
),
|
|
174
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
175
|
-
badge_cjs_namespaceObject.Badge,
|
|
176
|
-
{
|
|
177
|
-
variant:
|
|
178
|
-
'Enabled' === item.status ||
|
|
179
|
-
'Active' === item.status ||
|
|
180
|
-
'active' === item.status ||
|
|
181
|
-
'Rendered' === item.status
|
|
182
|
-
? 'default'
|
|
183
|
-
: 'destructive',
|
|
184
|
-
children: item.status,
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
],
|
|
188
|
-
},
|
|
189
|
-
`${activeSection}-${item.title}`
|
|
190
|
-
)
|
|
191
|
-
),
|
|
192
|
-
}
|
|
193
|
-
),
|
|
194
|
-
}
|
|
195
|
-
),
|
|
196
|
-
],
|
|
197
|
-
}
|
|
198
|
-
);
|
|
49
|
+
const privacyConsent = (0, external_dev_tool_cjs_namespaceObject.getStore)();
|
|
50
|
+
const [activeSection, setActiveSection] = (0, external_react_namespaceObject.useState)('Consents');
|
|
51
|
+
const handleTabChange = (0, external_react_namespaceObject.useCallback)((index)=>{
|
|
52
|
+
if (null !== index) setActiveSection(tabs[index].title);
|
|
53
|
+
}, []);
|
|
54
|
+
const renderingState = [
|
|
55
|
+
{
|
|
56
|
+
componentName: 'MarketingContent',
|
|
57
|
+
consentType: 'marketing'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
componentName: 'AnalyticsContent',
|
|
61
|
+
consentType: 'measurement'
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
componentName: 'PersonalizationComponent',
|
|
65
|
+
consentType: 'ad_personalization'
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
const contentItems = (()=>{
|
|
69
|
+
switch(activeSection){
|
|
70
|
+
case 'Consents':
|
|
71
|
+
return Object.entries(privacyConsent.consents).map(([name, value])=>({
|
|
72
|
+
title: name,
|
|
73
|
+
status: value ? 'Enabled' : 'Disabled'
|
|
74
|
+
}));
|
|
75
|
+
case 'Compliance':
|
|
76
|
+
return Object.entries(privacyConsent.complianceSettings).map(([region, settings])=>({
|
|
77
|
+
title: region,
|
|
78
|
+
status: settings.enabled ? 'Active' : 'Inactive'
|
|
79
|
+
}));
|
|
80
|
+
case 'Conditional':
|
|
81
|
+
return renderingState.map((item)=>({
|
|
82
|
+
title: item.componentName,
|
|
83
|
+
status: 'Rendered',
|
|
84
|
+
details: `Requires: ${item.consentType}`
|
|
85
|
+
}));
|
|
86
|
+
default:
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
})();
|
|
90
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
91
|
+
children: [
|
|
92
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
93
|
+
className: "border-b p-4",
|
|
94
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(expandable_tabs_cjs_namespaceObject.ExpandableTabs, {
|
|
95
|
+
tabs: Array.from(tabs),
|
|
96
|
+
activeColor: "text-primary",
|
|
97
|
+
className: "border-muted",
|
|
98
|
+
onChange: handleTabChange
|
|
99
|
+
})
|
|
100
|
+
}),
|
|
101
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(scroll_area_cjs_namespaceObject.ScrollArea, {
|
|
102
|
+
className: "h-[300px]",
|
|
103
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_namespaceObject.motion.div, {
|
|
104
|
+
className: "space-y-2 p-4",
|
|
105
|
+
initial: {
|
|
106
|
+
opacity: 0
|
|
107
|
+
},
|
|
108
|
+
animate: {
|
|
109
|
+
opacity: 1
|
|
110
|
+
},
|
|
111
|
+
exit: {
|
|
112
|
+
opacity: 0
|
|
113
|
+
},
|
|
114
|
+
children: contentItems.map((item, index)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_namespaceObject.motion.div, {
|
|
115
|
+
className: "flex items-center justify-between rounded-lg border bg-card p-3",
|
|
116
|
+
initial: {
|
|
117
|
+
opacity: 0,
|
|
118
|
+
y: 20
|
|
119
|
+
},
|
|
120
|
+
animate: {
|
|
121
|
+
opacity: 1,
|
|
122
|
+
y: 0
|
|
123
|
+
},
|
|
124
|
+
transition: {
|
|
125
|
+
delay: 0.05 * index
|
|
126
|
+
},
|
|
127
|
+
children: [
|
|
128
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
129
|
+
className: "flex flex-col",
|
|
130
|
+
children: [
|
|
131
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
132
|
+
className: "font-medium text-sm",
|
|
133
|
+
children: item.title
|
|
134
|
+
}),
|
|
135
|
+
item.details && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
136
|
+
className: "text-muted-foreground text-xs",
|
|
137
|
+
children: item.details
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(badge_cjs_namespaceObject.Badge, {
|
|
142
|
+
variant: 'Enabled' === item.status || 'Active' === item.status || 'active' === item.status || 'Rendered' === item.status ? 'default' : 'destructive',
|
|
143
|
+
children: item.status
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}, `${activeSection}-${item.title}`))
|
|
147
|
+
})
|
|
148
|
+
})
|
|
149
|
+
]
|
|
150
|
+
});
|
|
199
151
|
}
|
|
200
|
-
|
|
201
|
-
for
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
152
|
+
exports.Router = __webpack_exports__.Router;
|
|
153
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
154
|
+
"Router"
|
|
155
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
156
|
+
Object.defineProperty(exports, '__esModule', {
|
|
157
|
+
value: true
|
|
158
|
+
});
|
package/dist/router/router.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
interface RouterProps {
|
|
2
|
-
|
|
2
|
+
onClose: () => void;
|
|
3
3
|
}
|
|
4
|
-
export declare function Router({
|
|
5
|
-
onClose: _onClose,
|
|
6
|
-
}: RouterProps): import('react/jsx-runtime').JSX.Element;
|
|
4
|
+
export declare function Router({ onClose: _onClose }: RouterProps): import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
export {};
|
|
8
|
-
//# sourceMappingURL=router.d.ts.map
|
|
6
|
+
//# sourceMappingURL=router.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/router/router.tsx"],"names":[],"mappings":"AAyBA,UAAU,WAAW;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/router/router.tsx"],"names":[],"mappings":"AAyBA,UAAU,WAAW;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,WAAW,2CAoHxD"}
|