@docsplain-kit/core 0.0.49 → 0.0.51
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/README.md +36 -0
- package/SERVER_COMPONENTS.md +256 -0
- package/auto-complete/auto-complete-theme.d.ts +29 -0
- package/auto-complete/auto-complete-theme.js +53 -0
- package/auto-complete/auto-complete-theme.js.map +1 -0
- package/auto-complete/auto-complete.js +23 -3
- package/auto-complete/auto-complete.js.map +1 -1
- package/index.d.ts +1 -0
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/label/label-theme.d.ts +17 -0
- package/label/label-theme.js +35 -0
- package/label/label-theme.js.map +1 -0
- package/label/label.js +21 -3
- package/label/label.js.map +1 -1
- package/media/media.js +1 -1
- package/media/media.js.map +1 -1
- package/modal/modal-theme.d.ts +17 -0
- package/modal/modal-theme.js +32 -0
- package/modal/modal-theme.js.map +1 -0
- package/modal/modal.d.ts +1 -1
- package/modal/modal.js +22 -5
- package/modal/modal.js.map +1 -1
- package/mouse-popup/mouse-popup-theme.d.ts +17 -0
- package/mouse-popup/mouse-popup-theme.js +32 -0
- package/mouse-popup/mouse-popup-theme.js.map +1 -0
- package/mouse-popup/mouse-popup.js +19 -1
- package/mouse-popup/mouse-popup.js.map +1 -1
- package/multi-select/index.js.map +1 -1
- package/multi-select/multi-select-theme.d.ts +54 -0
- package/multi-select/multi-select-theme.js +127 -0
- package/multi-select/multi-select-theme.js.map +1 -0
- package/multi-select/multi-select.js +44 -10
- package/multi-select/multi-select.js.map +1 -1
- package/multi-select/multi-select.style.d.ts +97 -1
- package/multi-select/multi-select.style.js +99 -3
- package/multi-select/multi-select.style.js.map +1 -1
- package/package.json +1 -1
- package/popper/popper-content/popper-content.js +19 -1
- package/popper/popper-content/popper-content.js.map +1 -1
- package/popper/popper-theme.d.ts +21 -0
- package/popper/popper-theme.js +39 -0
- package/popper/popper-theme.js.map +1 -0
- package/select/select-theme.d.ts +50 -0
- package/select/select-theme.js +120 -0
- package/select/select-theme.js.map +1 -0
- package/select/select.js +44 -10
- package/select/select.js.map +1 -1
- package/select/select.style.d.ts +48 -16
- package/select/select.style.js +97 -65
- package/select/select.style.js.map +1 -1
- package/server/client-wrapper.d.ts +116 -0
- package/server/client-wrapper.js +249 -0
- package/server/client-wrapper.js.map +1 -0
- package/server/index.d.ts +22 -0
- package/server/index.js +40 -0
- package/server/index.js.map +1 -0
- package/tab/tab-item/tab-item.style.js +21 -6
- package/tab/tab-item/tab-item.style.js.map +1 -1
- package/tab/tab-theme.d.ts +42 -0
- package/tab/tab-theme.js +242 -0
- package/tab/tab-theme.js.map +1 -0
- package/tab/tab.js +21 -3
- package/tab/tab.js.map +1 -1
- package/text-input/text-input-theme.d.ts +30 -0
- package/text-input/text-input-theme.js +73 -0
- package/text-input/text-input-theme.js.map +1 -0
- package/text-input/text-input.js +26 -4
- package/text-input/text-input.js.map +1 -1
- package/text-input/text-input.style.d.ts +33 -1
- package/text-input/text-input.style.js +34 -2
- package/text-input/text-input.style.js.map +1 -1
- package/textarea/textarea-theme.d.ts +30 -0
- package/textarea/textarea-theme.js +73 -0
- package/textarea/textarea-theme.js.map +1 -0
- package/textarea/textarea.js +26 -4
- package/textarea/textarea.js.map +1 -1
- package/textarea/textarea.style.d.ts +33 -1
- package/textarea/textarea.style.js +34 -2
- package/textarea/textarea.style.js.map +1 -1
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Client Wrapper Utility
|
|
4
|
+
*
|
|
5
|
+
* This utility helps create client component wrappers for use in server components.
|
|
6
|
+
* Since all Docsplain UI Kit components are client components, you need to create
|
|
7
|
+
* wrapper files with 'use client' directive to use them in server components.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // components/docsplain.tsx
|
|
12
|
+
* 'use client';
|
|
13
|
+
*
|
|
14
|
+
* export {
|
|
15
|
+
* Tab,
|
|
16
|
+
* TabItem,
|
|
17
|
+
* Button,
|
|
18
|
+
* } from '@docsplain-kit/core';
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* Then use in server components:
|
|
22
|
+
* ```tsx
|
|
23
|
+
* // app/page.tsx
|
|
24
|
+
* import { Tab, TabItem } from './components/docsplain';
|
|
25
|
+
*
|
|
26
|
+
* export default function Page() {
|
|
27
|
+
* return (
|
|
28
|
+
* <Tab selectedValue="tab1" onTabSelect={() => {}}>
|
|
29
|
+
* <TabItem value="tab1">Home</TabItem>
|
|
30
|
+
* </Tab>
|
|
31
|
+
* );
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
'use client';
|
|
36
|
+
/**
|
|
37
|
+
* Client Wrapper Utility
|
|
38
|
+
*
|
|
39
|
+
* This utility helps create client component wrappers for use in server components.
|
|
40
|
+
* Since all Docsplain UI Kit components are client components, you need to create
|
|
41
|
+
* wrapper files with 'use client' directive to use them in server components.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* // components/docsplain.tsx
|
|
46
|
+
* 'use client';
|
|
47
|
+
*
|
|
48
|
+
* export {
|
|
49
|
+
* Tab,
|
|
50
|
+
* TabItem,
|
|
51
|
+
* Button,
|
|
52
|
+
* } from '@docsplain-kit/core';
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* Then use in server components:
|
|
56
|
+
* ```tsx
|
|
57
|
+
* // app/page.tsx
|
|
58
|
+
* import { Tab, TabItem } from './components/docsplain';
|
|
59
|
+
*
|
|
60
|
+
* export default function Page() {
|
|
61
|
+
* return (
|
|
62
|
+
* <Tab selectedValue="tab1" onTabSelect={() => {}}>
|
|
63
|
+
* <TabItem value="tab1">Home</TabItem>
|
|
64
|
+
* </Tab>
|
|
65
|
+
* );
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
exports.__esModule = true;
|
|
70
|
+
exports.clientWrapperTemplates = exports.generateClientWrapper = exports.createClientWrapper = void 0;
|
|
71
|
+
var tslib_1 = require("tslib");
|
|
72
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
73
|
+
/**
|
|
74
|
+
* Creates client component wrappers from dynamic imports
|
|
75
|
+
*
|
|
76
|
+
* This is useful when you want to lazy-load components or create
|
|
77
|
+
* wrappers that can be used in server components.
|
|
78
|
+
*
|
|
79
|
+
* @param config - Object mapping component names to their import functions
|
|
80
|
+
* @returns Object with component wrappers
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* const { Tab, TabItem } = createClientWrapper({
|
|
85
|
+
* Tab: () => import('@docsplain-kit/core').then(mod => ({ default: mod.Tab })),
|
|
86
|
+
* TabItem: () => import('@docsplain-kit/core').then(mod => ({ default: mod.TabItem })),
|
|
87
|
+
* });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
function createClientWrapper(config) {
|
|
91
|
+
var _this = this;
|
|
92
|
+
var wrappers = {};
|
|
93
|
+
var _loop_1 = function (name_1, importFn) {
|
|
94
|
+
var LazyComponent = react_1["default"].lazy(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
|
|
95
|
+
var module;
|
|
96
|
+
return tslib_1.__generator(this, function (_a) {
|
|
97
|
+
switch (_a.label) {
|
|
98
|
+
case 0: return [4 /*yield*/, importFn()];
|
|
99
|
+
case 1:
|
|
100
|
+
module = _a.sent();
|
|
101
|
+
return [2 /*return*/, {
|
|
102
|
+
"default": module["default"] || module[name_1]
|
|
103
|
+
}];
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}); });
|
|
107
|
+
// Create a wrapper that handles Suspense
|
|
108
|
+
wrappers[name_1] = function (props) { return (react_1["default"].createElement(react_1["default"].Suspense, { fallback: react_1["default"].createElement("div", null, "Loading...") },
|
|
109
|
+
react_1["default"].createElement(LazyComponent, tslib_1.__assign({}, props)))); };
|
|
110
|
+
};
|
|
111
|
+
for (var _i = 0, _a = Object.entries(config); _i < _a.length; _i++) {
|
|
112
|
+
var _b = _a[_i], name_1 = _b[0], importFn = _b[1];
|
|
113
|
+
_loop_1(name_1, importFn);
|
|
114
|
+
}
|
|
115
|
+
return wrappers;
|
|
116
|
+
}
|
|
117
|
+
exports.createClientWrapper = createClientWrapper;
|
|
118
|
+
/**
|
|
119
|
+
* Helper to create a simple client wrapper file content
|
|
120
|
+
*
|
|
121
|
+
* This generates the content for a client wrapper file that you can
|
|
122
|
+
* copy into your project.
|
|
123
|
+
*
|
|
124
|
+
* @param componentNames - Array of component names to export
|
|
125
|
+
* @returns String content for the wrapper file
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* const content = generateClientWrapper(['Tab', 'TabItem', 'Button']);
|
|
130
|
+
* // Returns: 'use client';\n\nexport { Tab, TabItem, Button } from '@docsplain-kit/core';
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
function generateClientWrapper(componentNames) {
|
|
134
|
+
var exports = componentNames.join(', ');
|
|
135
|
+
return "'use client';\n\nexport { ".concat(exports, " } from '@docsplain-kit/core';");
|
|
136
|
+
}
|
|
137
|
+
exports.generateClientWrapper = generateClientWrapper;
|
|
138
|
+
/**
|
|
139
|
+
* Pre-configured client wrapper exports
|
|
140
|
+
*
|
|
141
|
+
* These are ready-to-use exports for common component groups.
|
|
142
|
+
* You can copy these into your own client wrapper files.
|
|
143
|
+
*/
|
|
144
|
+
exports.clientWrapperTemplates = {
|
|
145
|
+
/**
|
|
146
|
+
* All form components
|
|
147
|
+
*/
|
|
148
|
+
forms: generateClientWrapper([
|
|
149
|
+
'TextInput',
|
|
150
|
+
'Textarea',
|
|
151
|
+
'Select',
|
|
152
|
+
'MultiSelect',
|
|
153
|
+
'Checkbox',
|
|
154
|
+
'RadioButton',
|
|
155
|
+
'SwitchBox',
|
|
156
|
+
'Slider',
|
|
157
|
+
'Label',
|
|
158
|
+
'AutoComplete',
|
|
159
|
+
]),
|
|
160
|
+
/**
|
|
161
|
+
* All navigation components
|
|
162
|
+
*/
|
|
163
|
+
navigation: generateClientWrapper([
|
|
164
|
+
'Tab',
|
|
165
|
+
'TabItem',
|
|
166
|
+
'Button',
|
|
167
|
+
'Chip',
|
|
168
|
+
]),
|
|
169
|
+
/**
|
|
170
|
+
* All layout components
|
|
171
|
+
*/
|
|
172
|
+
layout: generateClientWrapper([
|
|
173
|
+
'Div',
|
|
174
|
+
'Card',
|
|
175
|
+
'CardHeader',
|
|
176
|
+
'CardBody',
|
|
177
|
+
'CardFooter',
|
|
178
|
+
'Divider',
|
|
179
|
+
'List',
|
|
180
|
+
'ListItem',
|
|
181
|
+
]),
|
|
182
|
+
/**
|
|
183
|
+
* All feedback components
|
|
184
|
+
*/
|
|
185
|
+
feedback: generateClientWrapper([
|
|
186
|
+
'Alert',
|
|
187
|
+
'Snackbar',
|
|
188
|
+
'Modal',
|
|
189
|
+
'Tooltip',
|
|
190
|
+
'MousePopup',
|
|
191
|
+
]),
|
|
192
|
+
/**
|
|
193
|
+
* All data display components
|
|
194
|
+
*/
|
|
195
|
+
display: generateClientWrapper([
|
|
196
|
+
'Avatar',
|
|
197
|
+
'Badge',
|
|
198
|
+
'Skeleton',
|
|
199
|
+
'Spinner',
|
|
200
|
+
'Text',
|
|
201
|
+
'Media',
|
|
202
|
+
]),
|
|
203
|
+
/**
|
|
204
|
+
* All components
|
|
205
|
+
*/
|
|
206
|
+
all: generateClientWrapper([
|
|
207
|
+
'Accordion',
|
|
208
|
+
'AccordionContent',
|
|
209
|
+
'AccordionHeader',
|
|
210
|
+
'AccordionItem',
|
|
211
|
+
'Alert',
|
|
212
|
+
'AutoComplete',
|
|
213
|
+
'Avatar',
|
|
214
|
+
'Badge',
|
|
215
|
+
'Button',
|
|
216
|
+
'Card',
|
|
217
|
+
'CardBody',
|
|
218
|
+
'CardFooter',
|
|
219
|
+
'CardHeader',
|
|
220
|
+
'Checkbox',
|
|
221
|
+
'Chip',
|
|
222
|
+
'Div',
|
|
223
|
+
'Divider',
|
|
224
|
+
'Label',
|
|
225
|
+
'List',
|
|
226
|
+
'ListItem',
|
|
227
|
+
'Media',
|
|
228
|
+
'Modal',
|
|
229
|
+
'MousePopup',
|
|
230
|
+
'MultiSelect',
|
|
231
|
+
'Popper',
|
|
232
|
+
'PopperContent',
|
|
233
|
+
'PopperHandler',
|
|
234
|
+
'RadioButton',
|
|
235
|
+
'Select',
|
|
236
|
+
'Skeleton',
|
|
237
|
+
'Slider',
|
|
238
|
+
'Snackbar',
|
|
239
|
+
'Spinner',
|
|
240
|
+
'SwitchBox',
|
|
241
|
+
'Tab',
|
|
242
|
+
'TabItem',
|
|
243
|
+
'Text',
|
|
244
|
+
'Textarea',
|
|
245
|
+
'TextInput',
|
|
246
|
+
'Tooltip',
|
|
247
|
+
])
|
|
248
|
+
};
|
|
249
|
+
//# sourceMappingURL=client-wrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-wrapper.js","sourceRoot":"","sources":["../../server/client-wrapper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,YAAY,CAAC;AAlCb;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;;;;AAIH,wDAA0B;AAc1B;;;;;;;;;;;;;;;;GAgBG;AACH,SAAgB,mBAAmB,CACjC,MAAS;IADX,iBAwBC;IAnBC,IAAM,QAAQ,GAA6C,EAAE,CAAC;4BAElD,MAAI,EAAE,QAAQ;QACxB,IAAM,aAAa,GAAG,kBAAK,CAAC,IAAI,CAAC;;;;4BAChB,qBAAM,QAAQ,EAAE,EAAA;;wBAAzB,MAAM,GAAG,SAAgB;wBAC/B,sBAAO;gCACL,SAAO,EAAE,MAAM,CAAC,SAAO,CAAA,IAAI,MAAM,CAAC,MAAI,CAAC;6BACxC,EAAC;;;aACH,CAAC,CAAC;QAEH,yCAAyC;QACzC,QAAQ,CAAC,MA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,QAAQ;QACR,OAAO;QACP,UAAU;QACV,SAAS;QACT,MAAM;QACN,OAAO;KACR,CAAC;IAEF;;OAEG;IACH,GAAG,EAAE,qBAAqB,CAAC;QACzB,WAAW;QACX,kBAAkB;QAClB,iBAAiB;QACjB,eAAe;QACf,OAAO;QACP,cAAc;QACd,QAAQ;QACR,OAAO;QACP,QAAQ;QACR,MAAM;QACN,UAAU;QACV,YAAY;QACZ,YAAY;QACZ,UAAU;QACV,MAAM;QACN,KAAK;QACL,SAAS;QACT,OAAO;QACP,MAAM;QACN,UAAU;QACV,OAAO;QACP,OAAO;QACP,YAAY;QACZ,aAAa;QACb,QAAQ;QACR,eAAe;QACf,eAAe;QACf,aAAa;QACb,QAAQ;QACR,UAAU;QACV,QAAQ;QACR,UAAU;QACV,SAAS;QACT,WAAW;QACX,KAAK;QACL,SAAS;QACT,MAAM;QACN,UAAU;QACV,WAAW;QACX,SAAS;KACV,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Server Component Utilities
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities and helpers for using Docsplain UI Kit
|
|
5
|
+
* components in React Server Components (Next.js App Router, etc.)
|
|
6
|
+
*
|
|
7
|
+
* Since all Docsplain UI Kit components are client components, you need
|
|
8
|
+
* to create wrapper files with 'use client' directive to use them in server components.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* // components/docsplain.tsx
|
|
13
|
+
* 'use client';
|
|
14
|
+
*
|
|
15
|
+
* export {
|
|
16
|
+
* Tab,
|
|
17
|
+
* TabItem,
|
|
18
|
+
* Button,
|
|
19
|
+
* } from '@docsplain-kit/core';
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export { createClientWrapper, generateClientWrapper, clientWrapperTemplates, type ComponentImport, } from './client-wrapper';
|
package/server/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Server Component Utilities
|
|
4
|
+
*
|
|
5
|
+
* This module provides utilities and helpers for using Docsplain UI Kit
|
|
6
|
+
* components in React Server Components (Next.js App Router, etc.)
|
|
7
|
+
*
|
|
8
|
+
* Since all Docsplain UI Kit components are client components, you need
|
|
9
|
+
* to create wrapper files with 'use client' directive to use them in server components.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // components/docsplain.tsx
|
|
14
|
+
* 'use client';
|
|
15
|
+
*
|
|
16
|
+
* export {
|
|
17
|
+
* Tab,
|
|
18
|
+
* TabItem,
|
|
19
|
+
* Button,
|
|
20
|
+
* } from '@docsplain-kit/core';
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
24
|
+
if (k2 === undefined) k2 = k;
|
|
25
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
26
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
27
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
28
|
+
}
|
|
29
|
+
Object.defineProperty(o, k2, desc);
|
|
30
|
+
}) : (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
o[k2] = m[k];
|
|
33
|
+
}));
|
|
34
|
+
exports.__esModule = true;
|
|
35
|
+
exports.clientWrapperTemplates = exports.generateClientWrapper = exports.createClientWrapper = void 0;
|
|
36
|
+
var client_wrapper_1 = require("./client-wrapper");
|
|
37
|
+
__createBinding(exports, client_wrapper_1, "createClientWrapper");
|
|
38
|
+
__createBinding(exports, client_wrapper_1, "generateClientWrapper");
|
|
39
|
+
__createBinding(exports, client_wrapper_1, "clientWrapperTemplates");
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;;;;;;;;;;AAEH,mDAK0B;AAJxB,kEAAmB;AACnB,oEAAqB;AACrB,qEAAsB"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
exports.getTabStyles = exports.ICON_SIZES = exports.TAB_COLORS = exports.TAB_SIZES = void 0;
|
|
4
|
+
var tab_theme_1 = require("../tab-theme");
|
|
5
|
+
// Try to import the theme provider, but make it optional
|
|
6
|
+
var useThemeSafe = function () { return 'light'; };
|
|
7
|
+
try {
|
|
8
|
+
var useTheme = require('../../provider').useTheme;
|
|
9
|
+
useThemeSafe = useTheme;
|
|
10
|
+
}
|
|
11
|
+
catch (_a) {
|
|
12
|
+
// Provider not available, use default
|
|
13
|
+
}
|
|
4
14
|
exports.TAB_SIZES = {
|
|
5
15
|
tiny: 'px-2 py-1 text-xs min-h-6',
|
|
6
16
|
small: 'px-3 py-1.5 text-sm min-h-8',
|
|
@@ -8,6 +18,8 @@ exports.TAB_SIZES = {
|
|
|
8
18
|
large: 'px-5 py-2.5 text-lg min-h-12',
|
|
9
19
|
huge: 'px-6 py-3 text-xl min-h-14'
|
|
10
20
|
};
|
|
21
|
+
// Legacy TAB_COLORS kept for backwards compatibility
|
|
22
|
+
// New code should use getTabColors from tab-theme.ts
|
|
11
23
|
exports.TAB_COLORS = {
|
|
12
24
|
primary: {
|
|
13
25
|
selected: 'text-primary',
|
|
@@ -165,14 +177,17 @@ exports.ICON_SIZES = {
|
|
|
165
177
|
var getTabStyles = function (color, size, selected, disabled, vertical) {
|
|
166
178
|
var baseStyles = "flex items-center justify-start gap-2 transition-all duration-200 ease-in-out cursor-pointer whitespace-nowrap ".concat(vertical ? 'w-full' : '');
|
|
167
179
|
var sizeStyles = exports.TAB_SIZES[size];
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
180
|
+
// Try to get theme from provider, fallback to 'light'
|
|
181
|
+
var theme = 'light';
|
|
182
|
+
try {
|
|
183
|
+
theme = useThemeSafe();
|
|
171
184
|
}
|
|
172
|
-
|
|
173
|
-
|
|
185
|
+
catch (_a) {
|
|
186
|
+
// Not in provider, use default
|
|
174
187
|
}
|
|
175
|
-
|
|
188
|
+
// Use theme-aware colors
|
|
189
|
+
var colorStyles = (0, tab_theme_1.getTabColors)(theme, color, selected, disabled);
|
|
190
|
+
return "".concat(baseStyles, " ").concat(sizeStyles, " ").concat(colorStyles);
|
|
176
191
|
};
|
|
177
192
|
exports.getTabStyles = getTabStyles;
|
|
178
193
|
//# sourceMappingURL=tab-item.style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-item.style.js","sourceRoot":"","sources":["../../../tab/tab-item/tab-item.style.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"tab-item.style.js","sourceRoot":"","sources":["../../../tab/tab-item/tab-item.style.ts"],"names":[],"mappings":";;;AACA,0CAA4C;AAE5C,yDAAyD;AACzD,IAAI,YAAY,GAA2B,cAAM,OAAA,OAAO,EAAP,CAAO,CAAC;AACzD,IAAI;IACM,IAAA,QAAQ,GAAK,OAAO,CAAC,gBAAgB,CAAC,SAA9B,CAA+B;IAC/C,YAAY,GAAG,QAAQ,CAAC;CACzB;AAAC,WAAM;IACN,sCAAsC;CACvC;AAEY,QAAA,SAAS,GAAG;IACvB,IAAI,EAAE,2BAA2B;IACjC,KAAK,EAAE,6BAA6B;IACpC,MAAM,EAAE,8BAA8B;IACtC,KAAK,EAAE,8BAA8B;IACrC,IAAI,EAAE,4BAA4B;CACnC,CAAC;AAEF,qDAAqD;AACrD,qDAAqD;AACxC,QAAA,UAAU,GAAG;IACxB,OAAO,EAAE;QACP,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,qDAAqD;QACjE,QAAQ,EAAE,uCAAuC;KAClD;IACD,SAAS,EAAE;QACT,QAAQ,EAAE,gB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|
2
|
+
import { Colors } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Light Theme Tab Colors - Selected
|
|
5
|
+
*/
|
|
6
|
+
export declare const TAB_SELECTED_LIGHT: Record<Colors, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Dark Theme Tab Colors - Selected
|
|
9
|
+
*/
|
|
10
|
+
export declare const TAB_SELECTED_DARK: Record<Colors, string>;
|
|
11
|
+
/**
|
|
12
|
+
* Light Theme Tab Colors - Unselected
|
|
13
|
+
*/
|
|
14
|
+
export declare const TAB_UNSELECTED_LIGHT: Record<Colors, string>;
|
|
15
|
+
/**
|
|
16
|
+
* Dark Theme Tab Colors - Unselected
|
|
17
|
+
*/
|
|
18
|
+
export declare const TAB_UNSELECTED_DARK: Record<Colors, string>;
|
|
19
|
+
/**
|
|
20
|
+
* Light Theme Tab Colors - Disabled
|
|
21
|
+
*/
|
|
22
|
+
export declare const TAB_DISABLED_LIGHT: Record<Colors, string>;
|
|
23
|
+
/**
|
|
24
|
+
* Dark Theme Tab Colors - Disabled
|
|
25
|
+
*/
|
|
26
|
+
export declare const TAB_DISABLED_DARK: Record<Colors, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Get scroll button background based on theme
|
|
29
|
+
*/
|
|
30
|
+
export declare const getScrollButtonBackground: (theme: Theme) => string;
|
|
31
|
+
/**
|
|
32
|
+
* Get overflow menu background based on theme
|
|
33
|
+
*/
|
|
34
|
+
export declare const getOverflowMenuBackground: (theme: Theme) => string;
|
|
35
|
+
/**
|
|
36
|
+
* Get overflow menu border based on theme
|
|
37
|
+
*/
|
|
38
|
+
export declare const getOverflowMenuBorder: (theme: Theme) => string;
|
|
39
|
+
/**
|
|
40
|
+
* Helper function to get tab colors based on theme
|
|
41
|
+
*/
|
|
42
|
+
export declare const getTabColors: (theme: Theme, color: Colors, selected: boolean, disabled: boolean) => string;
|
package/tab/tab-theme.js
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.getTabColors = exports.getOverflowMenuBorder = exports.getOverflowMenuBackground = exports.getScrollButtonBackground = exports.TAB_DISABLED_DARK = exports.TAB_DISABLED_LIGHT = exports.TAB_UNSELECTED_DARK = exports.TAB_UNSELECTED_LIGHT = exports.TAB_SELECTED_DARK = exports.TAB_SELECTED_LIGHT = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Light Theme Tab Colors - Selected
|
|
6
|
+
*/
|
|
7
|
+
exports.TAB_SELECTED_LIGHT = {
|
|
8
|
+
primary: 'text-primary',
|
|
9
|
+
secondary: 'text-secondary',
|
|
10
|
+
info: 'text-info',
|
|
11
|
+
success: 'text-success',
|
|
12
|
+
warning: 'text-warning',
|
|
13
|
+
danger: 'text-danger',
|
|
14
|
+
control: 'text-control-dark',
|
|
15
|
+
inherit: 'text-inherit',
|
|
16
|
+
slate: 'text-slate-600',
|
|
17
|
+
zinc: 'text-zinc-600',
|
|
18
|
+
neutral: 'text-neutral-600',
|
|
19
|
+
stone: 'text-stone-600',
|
|
20
|
+
red: 'text-red-600',
|
|
21
|
+
orange: 'text-orange-600',
|
|
22
|
+
amber: 'text-amber-600',
|
|
23
|
+
yellow: 'text-yellow-600',
|
|
24
|
+
lime: 'text-lime-600',
|
|
25
|
+
green: 'text-green-600',
|
|
26
|
+
emerald: 'text-emerald-600',
|
|
27
|
+
teal: 'text-teal-600',
|
|
28
|
+
cyan: 'text-cyan-600',
|
|
29
|
+
sky: 'text-sky-600',
|
|
30
|
+
blue: 'text-blue-600',
|
|
31
|
+
indigo: 'text-indigo-600',
|
|
32
|
+
violet: 'text-violet-600',
|
|
33
|
+
purple: 'text-purple-600',
|
|
34
|
+
fuchsia: 'text-fuchsia-600',
|
|
35
|
+
pink: 'text-pink-600',
|
|
36
|
+
rose: 'text-rose-600'
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Dark Theme Tab Colors - Selected
|
|
40
|
+
*/
|
|
41
|
+
exports.TAB_SELECTED_DARK = {
|
|
42
|
+
primary: 'text-primary-400',
|
|
43
|
+
secondary: 'text-secondary-400',
|
|
44
|
+
info: 'text-info-400',
|
|
45
|
+
success: 'text-success-400',
|
|
46
|
+
warning: 'text-warning-400',
|
|
47
|
+
danger: 'text-danger-400',
|
|
48
|
+
control: 'text-gray-300',
|
|
49
|
+
inherit: 'text-inherit',
|
|
50
|
+
slate: 'text-slate-400',
|
|
51
|
+
zinc: 'text-zinc-400',
|
|
52
|
+
neutral: 'text-neutral-400',
|
|
53
|
+
stone: 'text-stone-400',
|
|
54
|
+
red: 'text-red-400',
|
|
55
|
+
orange: 'text-orange-400',
|
|
56
|
+
amber: 'text-amber-400',
|
|
57
|
+
yellow: 'text-yellow-400',
|
|
58
|
+
lime: 'text-lime-400',
|
|
59
|
+
green: 'text-green-400',
|
|
60
|
+
emerald: 'text-emerald-400',
|
|
61
|
+
teal: 'text-teal-400',
|
|
62
|
+
cyan: 'text-cyan-400',
|
|
63
|
+
sky: 'text-sky-400',
|
|
64
|
+
blue: 'text-blue-400',
|
|
65
|
+
indigo: 'text-indigo-400',
|
|
66
|
+
violet: 'text-violet-400',
|
|
67
|
+
purple: 'text-purple-400',
|
|
68
|
+
fuchsia: 'text-fuchsia-400',
|
|
69
|
+
pink: 'text-pink-400',
|
|
70
|
+
rose: 'text-rose-400'
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* Light Theme Tab Colors - Unselected
|
|
74
|
+
*/
|
|
75
|
+
exports.TAB_UNSELECTED_LIGHT = {
|
|
76
|
+
primary: 'text-control hover:text-primary hover:bg-primary-50',
|
|
77
|
+
secondary: 'text-control hover:text-secondary hover:bg-secondary-50',
|
|
78
|
+
info: 'text-control hover:text-info hover:bg-info-50',
|
|
79
|
+
success: 'text-control hover:text-success hover:bg-success-50',
|
|
80
|
+
warning: 'text-control hover:text-warning hover:bg-warning-50',
|
|
81
|
+
danger: 'text-control hover:text-danger hover:bg-danger-50',
|
|
82
|
+
control: 'text-control hover:text-control-dark hover:bg-control-50',
|
|
83
|
+
inherit: 'text-inherit hover:opacity-80',
|
|
84
|
+
slate: 'text-control hover:text-slate-600 hover:bg-slate-50',
|
|
85
|
+
zinc: 'text-control hover:text-zinc-600 hover:bg-zinc-50',
|
|
86
|
+
neutral: 'text-control hover:text-neutral-600 hover:bg-neutral-50',
|
|
87
|
+
stone: 'text-control hover:text-stone-600 hover:bg-stone-50',
|
|
88
|
+
red: 'text-control hover:text-red-600 hover:bg-red-50',
|
|
89
|
+
orange: 'text-control hover:text-orange-600 hover:bg-orange-50',
|
|
90
|
+
amber: 'text-control hover:text-amber-600 hover:bg-amber-50',
|
|
91
|
+
yellow: 'text-control hover:text-yellow-600 hover:bg-yellow-50',
|
|
92
|
+
lime: 'text-control hover:text-lime-600 hover:bg-lime-50',
|
|
93
|
+
green: 'text-control hover:text-green-600 hover:bg-green-50',
|
|
94
|
+
emerald: 'text-control hover:text-emerald-600 hover:bg-emerald-50',
|
|
95
|
+
teal: 'text-control hover:text-teal-600 hover:bg-teal-50',
|
|
96
|
+
cyan: 'text-control hover:text-cyan-600 hover:bg-cyan-50',
|
|
97
|
+
sky: 'text-control hover:text-sky-600 hover:bg-sky-50',
|
|
98
|
+
blue: 'text-control hover:text-blue-600 hover:bg-blue-50',
|
|
99
|
+
indigo: 'text-control hover:text-indigo-600 hover:bg-indigo-50',
|
|
100
|
+
violet: 'text-control hover:text-violet-600 hover:bg-violet-50',
|
|
101
|
+
purple: 'text-control hover:text-purple-600 hover:bg-purple-50',
|
|
102
|
+
fuchsia: 'text-control hover:text-fuchsia-600 hover:bg-fuchsia-50',
|
|
103
|
+
pink: 'text-control hover:text-pink-600 hover:bg-pink-50',
|
|
104
|
+
rose: 'text-control hover:text-rose-600 hover:bg-rose-50'
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Dark Theme Tab Colors - Unselected
|
|
108
|
+
*/
|
|
109
|
+
exports.TAB_UNSELECTED_DARK = {
|
|
110
|
+
primary: 'text-gray-400 hover:text-primary-300 hover:bg-primary-950',
|
|
111
|
+
secondary: 'text-gray-400 hover:text-secondary-300 hover:bg-secondary-950',
|
|
112
|
+
info: 'text-gray-400 hover:text-info-300 hover:bg-info-950',
|
|
113
|
+
success: 'text-gray-400 hover:text-success-300 hover:bg-success-950',
|
|
114
|
+
warning: 'text-gray-400 hover:text-warning-300 hover:bg-warning-950',
|
|
115
|
+
danger: 'text-gray-400 hover:text-danger-300 hover:bg-danger-950',
|
|
116
|
+
control: 'text-gray-500 hover:text-gray-300 hover:bg-gray-800',
|
|
117
|
+
inherit: 'text-inherit hover:opacity-80',
|
|
118
|
+
slate: 'text-gray-400 hover:text-slate-300 hover:bg-slate-950',
|
|
119
|
+
zinc: 'text-gray-400 hover:text-zinc-300 hover:bg-zinc-950',
|
|
120
|
+
neutral: 'text-gray-400 hover:text-neutral-300 hover:bg-neutral-950',
|
|
121
|
+
stone: 'text-gray-400 hover:text-stone-300 hover:bg-stone-950',
|
|
122
|
+
red: 'text-gray-400 hover:text-red-300 hover:bg-red-950',
|
|
123
|
+
orange: 'text-gray-400 hover:text-orange-300 hover:bg-orange-950',
|
|
124
|
+
amber: 'text-gray-400 hover:text-amber-300 hover:bg-amber-950',
|
|
125
|
+
yellow: 'text-gray-400 hover:text-yellow-300 hover:bg-yellow-950',
|
|
126
|
+
lime: 'text-gray-400 hover:text-lime-300 hover:bg-lime-950',
|
|
127
|
+
green: 'text-gray-400 hover:text-green-300 hover:bg-green-950',
|
|
128
|
+
emerald: 'text-gray-400 hover:text-emerald-300 hover:bg-emerald-950',
|
|
129
|
+
teal: 'text-gray-400 hover:text-teal-300 hover:bg-teal-950',
|
|
130
|
+
cyan: 'text-gray-400 hover:text-cyan-300 hover:bg-cyan-950',
|
|
131
|
+
sky: 'text-gray-400 hover:text-sky-300 hover:bg-sky-950',
|
|
132
|
+
blue: 'text-gray-400 hover:text-blue-300 hover:bg-blue-950',
|
|
133
|
+
indigo: 'text-gray-400 hover:text-indigo-300 hover:bg-indigo-950',
|
|
134
|
+
violet: 'text-gray-400 hover:text-violet-300 hover:bg-violet-950',
|
|
135
|
+
purple: 'text-gray-400 hover:text-purple-300 hover:bg-purple-950',
|
|
136
|
+
fuchsia: 'text-gray-400 hover:text-fuchsia-300 hover:bg-fuchsia-950',
|
|
137
|
+
pink: 'text-gray-400 hover:text-pink-300 hover:bg-pink-950',
|
|
138
|
+
rose: 'text-gray-400 hover:text-rose-300 hover:bg-rose-950'
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Light Theme Tab Colors - Disabled
|
|
142
|
+
*/
|
|
143
|
+
exports.TAB_DISABLED_LIGHT = {
|
|
144
|
+
primary: 'text-control-light cursor-not-allowed',
|
|
145
|
+
secondary: 'text-control-light cursor-not-allowed',
|
|
146
|
+
info: 'text-control-light cursor-not-allowed',
|
|
147
|
+
success: 'text-control-light cursor-not-allowed',
|
|
148
|
+
warning: 'text-control-light cursor-not-allowed',
|
|
149
|
+
danger: 'text-control-light cursor-not-allowed',
|
|
150
|
+
control: 'text-control-light cursor-not-allowed',
|
|
151
|
+
inherit: 'text-inherit opacity-50 cursor-not-allowed',
|
|
152
|
+
slate: 'text-control-light cursor-not-allowed',
|
|
153
|
+
zinc: 'text-control-light cursor-not-allowed',
|
|
154
|
+
neutral: 'text-control-light cursor-not-allowed',
|
|
155
|
+
stone: 'text-control-light cursor-not-allowed',
|
|
156
|
+
red: 'text-control-light cursor-not-allowed',
|
|
157
|
+
orange: 'text-control-light cursor-not-allowed',
|
|
158
|
+
amber: 'text-control-light cursor-not-allowed',
|
|
159
|
+
yellow: 'text-control-light cursor-not-allowed',
|
|
160
|
+
lime: 'text-control-light cursor-not-allowed',
|
|
161
|
+
green: 'text-control-light cursor-not-allowed',
|
|
162
|
+
emerald: 'text-control-light cursor-not-allowed',
|
|
163
|
+
teal: 'text-control-light cursor-not-allowed',
|
|
164
|
+
cyan: 'text-control-light cursor-not-allowed',
|
|
165
|
+
sky: 'text-control-light cursor-not-allowed',
|
|
166
|
+
blue: 'text-control-light cursor-not-allowed',
|
|
167
|
+
indigo: 'text-control-light cursor-not-allowed',
|
|
168
|
+
violet: 'text-control-light cursor-not-allowed',
|
|
169
|
+
purple: 'text-control-light cursor-not-allowed',
|
|
170
|
+
fuchsia: 'text-control-light cursor-not-allowed',
|
|
171
|
+
pink: 'text-control-light cursor-not-allowed',
|
|
172
|
+
rose: 'text-control-light cursor-not-allowed'
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Dark Theme Tab Colors - Disabled
|
|
176
|
+
*/
|
|
177
|
+
exports.TAB_DISABLED_DARK = {
|
|
178
|
+
primary: 'text-gray-600 cursor-not-allowed',
|
|
179
|
+
secondary: 'text-gray-600 cursor-not-allowed',
|
|
180
|
+
info: 'text-gray-600 cursor-not-allowed',
|
|
181
|
+
success: 'text-gray-600 cursor-not-allowed',
|
|
182
|
+
warning: 'text-gray-600 cursor-not-allowed',
|
|
183
|
+
danger: 'text-gray-600 cursor-not-allowed',
|
|
184
|
+
control: 'text-gray-600 cursor-not-allowed',
|
|
185
|
+
inherit: 'text-inherit opacity-50 cursor-not-allowed',
|
|
186
|
+
slate: 'text-gray-600 cursor-not-allowed',
|
|
187
|
+
zinc: 'text-gray-600 cursor-not-allowed',
|
|
188
|
+
neutral: 'text-gray-600 cursor-not-allowed',
|
|
189
|
+
stone: 'text-gray-600 cursor-not-allowed',
|
|
190
|
+
red: 'text-gray-600 cursor-not-allowed',
|
|
191
|
+
orange: 'text-gray-600 cursor-not-allowed',
|
|
192
|
+
amber: 'text-gray-600 cursor-not-allowed',
|
|
193
|
+
yellow: 'text-gray-600 cursor-not-allowed',
|
|
194
|
+
lime: 'text-gray-600 cursor-not-allowed',
|
|
195
|
+
green: 'text-gray-600 cursor-not-allowed',
|
|
196
|
+
emerald: 'text-gray-600 cursor-not-allowed',
|
|
197
|
+
teal: 'text-gray-600 cursor-not-allowed',
|
|
198
|
+
cyan: 'text-gray-600 cursor-not-allowed',
|
|
199
|
+
sky: 'text-gray-600 cursor-not-allowed',
|
|
200
|
+
blue: 'text-gray-600 cursor-not-allowed',
|
|
201
|
+
indigo: 'text-gray-600 cursor-not-allowed',
|
|
202
|
+
violet: 'text-gray-600 cursor-not-allowed',
|
|
203
|
+
purple: 'text-gray-600 cursor-not-allowed',
|
|
204
|
+
fuchsia: 'text-gray-600 cursor-not-allowed',
|
|
205
|
+
pink: 'text-gray-600 cursor-not-allowed',
|
|
206
|
+
rose: 'text-gray-600 cursor-not-allowed'
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Get scroll button background based on theme
|
|
210
|
+
*/
|
|
211
|
+
var getScrollButtonBackground = function (theme) {
|
|
212
|
+
return theme === 'dark' ? 'bg-gray-800' : 'bg-white';
|
|
213
|
+
};
|
|
214
|
+
exports.getScrollButtonBackground = getScrollButtonBackground;
|
|
215
|
+
/**
|
|
216
|
+
* Get overflow menu background based on theme
|
|
217
|
+
*/
|
|
218
|
+
var getOverflowMenuBackground = function (theme) {
|
|
219
|
+
return theme === 'dark' ? 'bg-gray-800' : 'bg-white';
|
|
220
|
+
};
|
|
221
|
+
exports.getOverflowMenuBackground = getOverflowMenuBackground;
|
|
222
|
+
/**
|
|
223
|
+
* Get overflow menu border based on theme
|
|
224
|
+
*/
|
|
225
|
+
var getOverflowMenuBorder = function (theme) {
|
|
226
|
+
return theme === 'dark' ? 'border-gray-700' : 'border-control-300';
|
|
227
|
+
};
|
|
228
|
+
exports.getOverflowMenuBorder = getOverflowMenuBorder;
|
|
229
|
+
/**
|
|
230
|
+
* Helper function to get tab colors based on theme
|
|
231
|
+
*/
|
|
232
|
+
var getTabColors = function (theme, color, selected, disabled) {
|
|
233
|
+
if (disabled) {
|
|
234
|
+
return theme === 'dark' ? exports.TAB_DISABLED_DARK[color] : exports.TAB_DISABLED_LIGHT[color];
|
|
235
|
+
}
|
|
236
|
+
if (selected) {
|
|
237
|
+
return theme === 'dark' ? exports.TAB_SELECTED_DARK[color] : exports.TAB_SELECTED_LIGHT[color];
|
|
238
|
+
}
|
|
239
|
+
return theme === 'dark' ? exports.TAB_UNSELECTED_DARK[color] : exports.TAB_UNSELECTED_LIGHT[color];
|
|
240
|
+
};
|
|
241
|
+
exports.getTabColors = getTabColors;
|
|
242
|
+
//# sourceMappingURL=tab-theme.js.map
|