@c15t/dev-tools 0.0.1-rc.9 → 1.0.0

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.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/dist/components/error-state.cjs +88 -117
  3. package/dist/components/error-state.css +25 -28
  4. package/dist/components/error-state.d.ts +4 -6
  5. package/dist/components/error-state.js +61 -108
  6. package/dist/components/header.cjs +55 -74
  7. package/dist/components/header.css +18 -17
  8. package/dist/components/header.d.ts +3 -5
  9. package/dist/components/header.js +28 -45
  10. package/dist/components/ui/accordion.cjs +71 -101
  11. package/dist/components/ui/accordion.css +39 -39
  12. package/dist/components/ui/accordion.d.ts +5 -32
  13. package/dist/components/ui/accordion.js +36 -70
  14. package/dist/components/ui/alert.cjs +66 -80
  15. package/dist/components/ui/alert.css +27 -30
  16. package/dist/components/ui/alert.d.ts +6 -22
  17. package/dist/components/ui/alert.js +34 -54
  18. package/dist/components/ui/badge.cjs +52 -62
  19. package/dist/components/ui/badge.css +27 -39
  20. package/dist/components/ui/badge.d.ts +7 -22
  21. package/dist/components/ui/badge.d.ts.map +1 -1
  22. package/dist/components/ui/badge.js +23 -31
  23. package/dist/components/ui/button.cjs +67 -76
  24. package/dist/components/ui/button.css +40 -43
  25. package/dist/components/ui/button.d.ts +8 -24
  26. package/dist/components/ui/button.js +38 -47
  27. package/dist/components/ui/card.cjs +76 -92
  28. package/dist/components/ui/card.css +21 -20
  29. package/dist/components/ui/card.d.ts +8 -29
  30. package/dist/components/ui/card.js +35 -76
  31. package/dist/components/ui/error-state.css +20 -19
  32. package/dist/components/ui/expandable-tabs.cjs +118 -158
  33. package/dist/components/ui/expandable-tabs.css +34 -33
  34. package/dist/components/ui/expandable-tabs.d.ts +13 -20
  35. package/dist/components/ui/expandable-tabs.js +91 -131
  36. package/dist/components/ui/logo.cjs +93 -106
  37. package/dist/components/ui/logo.d.ts +5 -11
  38. package/dist/components/ui/logo.d.ts.map +1 -1
  39. package/dist/components/ui/logo.js +67 -82
  40. package/dist/components/ui/scroll-area.cjs +57 -85
  41. package/dist/components/ui/scroll-area.css +25 -24
  42. package/dist/components/ui/scroll-area.d.ts +3 -17
  43. package/dist/components/ui/scroll-area.js +28 -62
  44. package/dist/components/ui/switch.cjs +39 -56
  45. package/dist/components/ui/switch.css +26 -25
  46. package/dist/components/ui/switch.d.ts +2 -9
  47. package/dist/components/ui/switch.js +13 -25
  48. package/dist/components/ui/tooltip.cjs +48 -60
  49. package/dist/components/ui/tooltip.css +64 -63
  50. package/dist/components/ui/tooltip.d.ts +5 -17
  51. package/dist/components/ui/tooltip.js +16 -32
  52. package/dist/components/wrapper.cjs +148 -205
  53. package/dist/components/wrapper.css +49 -48
  54. package/dist/components/wrapper.d.ts +7 -12
  55. package/dist/components/wrapper.js +119 -186
  56. package/dist/dev-tool.cjs +112 -153
  57. package/dist/dev-tool.d.ts +6 -6
  58. package/dist/dev-tool.d.ts.map +1 -1
  59. package/dist/dev-tool.js +71 -108
  60. package/dist/index.cjs +28 -36
  61. package/dist/index.d.ts +1 -1
  62. package/dist/index.js +2 -3
  63. package/dist/libs/utils.cjs +39 -58
  64. package/dist/libs/utils.d.ts +1 -1
  65. package/dist/libs/utils.js +3 -5
  66. package/dist/router/router.cjs +145 -193
  67. package/dist/router/router.d.ts +3 -5
  68. package/dist/router/router.d.ts.map +1 -1
  69. package/dist/router/router.js +118 -174
  70. package/dist/styles/theme.css +37 -36
  71. package/package.json +12 -12
@@ -1,206 +1,158 @@
1
1
  'use client';
2
- 'use strict';
2
+ "use strict";
3
3
  var __webpack_require__ = {};
4
- (() => {
5
- __webpack_require__.d = function (exports1, definition) {
6
- for (var key in definition)
7
- if (
8
- __webpack_require__.o(definition, key) &&
9
- !__webpack_require__.o(exports1, key)
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
- __webpack_require__.o = function (obj, prop) {
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
- __webpack_require__.r = function (exports1) {
24
- if ('undefined' != typeof Symbol && Symbol.toStringTag)
25
- Object.defineProperty(exports1, Symbol.toStringTag, {
26
- value: 'Module',
27
- });
28
- Object.defineProperty(exports1, '__esModule', {
29
- value: true,
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
- Router: () => Router,
28
+ Router: ()=>Router
37
29
  });
38
- const jsx_runtime_namespaceObject = require('react/jsx-runtime');
39
- const external_lucide_react_namespaceObject = require('lucide-react');
40
- const react_namespaceObject = require('motion/react');
41
- const external_react_namespaceObject = require('react');
42
- const expandable_tabs_cjs_namespaceObject = require('../components/ui/expandable-tabs.cjs');
43
- const scroll_area_cjs_namespaceObject = require('../components/ui/scroll-area.cjs');
44
- const external_dev_tool_cjs_namespaceObject = require('../dev-tool.cjs');
45
- const badge_cjs_namespaceObject = require('../components/ui/badge.cjs');
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
- title: 'Consents',
49
- icon: external_lucide_react_namespaceObject.ToggleLeft,
50
- },
51
- {
52
- title: 'Compliance',
53
- icon: external_lucide_react_namespaceObject.GanttChartSquare,
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
- const privacyConsent = (0, external_dev_tool_cjs_namespaceObject.getStore)();
58
- const [activeSection, setActiveSection] = (0,
59
- external_react_namespaceObject.useState)('Consents');
60
- const handleTabChange = (0, external_react_namespaceObject.useCallback)(
61
- (index) => {
62
- if (null !== index) setActiveSection(tabs[index].title);
63
- },
64
- []
65
- );
66
- const renderingState = [
67
- {
68
- componentName: 'MarketingContent',
69
- consentType: 'marketing',
70
- },
71
- {
72
- componentName: 'AnalyticsContent',
73
- consentType: 'measurement',
74
- },
75
- {
76
- componentName: 'PersonalizationComponent',
77
- consentType: 'ad_personalization',
78
- },
79
- ];
80
- const contentItems = (() => {
81
- switch (activeSection) {
82
- case 'Consents':
83
- return Object.entries(privacyConsent.consents).map(([name, value]) => ({
84
- title: name,
85
- status: value ? 'Enabled' : 'Disabled',
86
- }));
87
- case 'Compliance':
88
- return Object.entries(privacyConsent.complianceSettings).map(
89
- ([region, settings]) => ({
90
- title: region,
91
- status: settings.enabled ? 'Active' : 'Inactive',
92
- })
93
- );
94
- case 'Conditional':
95
- return renderingState.map((item) => ({
96
- title: item.componentName,
97
- status: 'Rendered',
98
- details: `Requires: ${item.consentType}`,
99
- }));
100
- default:
101
- return [];
102
- }
103
- })();
104
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
105
- jsx_runtime_namespaceObject.Fragment,
106
- {
107
- children: [
108
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)('div', {
109
- className: 'border-b p-4',
110
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
111
- expandable_tabs_cjs_namespaceObject.ExpandableTabs,
112
- {
113
- tabs: Array.from(tabs),
114
- activeColor: 'text-primary',
115
- className: 'border-muted',
116
- onChange: handleTabChange,
117
- }
118
- ),
119
- }),
120
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
121
- scroll_area_cjs_namespaceObject.ScrollArea,
122
- {
123
- className: 'h-[300px]',
124
- children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
125
- react_namespaceObject.motion.div,
126
- {
127
- className: 'space-y-2 p-4',
128
- initial: {
129
- opacity: 0,
130
- },
131
- animate: {
132
- opacity: 1,
133
- },
134
- exit: {
135
- opacity: 0,
136
- },
137
- children: contentItems.map((item, index) =>
138
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
139
- react_namespaceObject.motion.div,
140
- {
141
- className:
142
- 'flex items-center justify-between rounded-lg border bg-card p-3',
143
- initial: {
144
- opacity: 0,
145
- y: 20,
146
- },
147
- animate: {
148
- opacity: 1,
149
- y: 0,
150
- },
151
- transition: {
152
- delay: 0.05 * index,
153
- },
154
- children: [
155
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
156
- 'div',
157
- {
158
- className: 'flex flex-col',
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
- var __webpack_export_target__ = exports;
201
- for (var __webpack_i__ in __webpack_exports__)
202
- __webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
203
- if (__webpack_exports__.__esModule)
204
- Object.defineProperty(__webpack_export_target__, '__esModule', {
205
- value: true,
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
+ });
@@ -1,8 +1,6 @@
1
1
  interface RouterProps {
2
- onClose: () => void;
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,2CAkIxD"}
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"}