@nccirtu/tablefy 0.1.5 → 0.1.7
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/columns/index.d.ts +15 -11
- package/dist/columns/index.esm.js +206 -1578
- package/dist/columns/index.esm.js.map +1 -1
- package/dist/columns/index.js +219 -1591
- package/dist/columns/index.js.map +1 -1
- package/dist/index.d.ts +15 -11
- package/dist/index.esm.js +526 -1588
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +552 -1599
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,1400 +1,28 @@
|
|
|
1
|
+
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import React__default, { useState, useLayoutEffect } from 'react';
|
|
3
4
|
import { useReactTable, getCoreRowModel, getSortedRowModel, getFilteredRowModel, getPaginationRowModel, flexRender } from '@tanstack/react-table';
|
|
4
|
-
import { Search, X, ChevronDown, ChevronDownIcon, CheckIcon, ChevronUpIcon, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ArrowUpDown, Calendar } from 'lucide-react';
|
|
5
|
+
import { Search, X, ChevronDown, ChevronDownIcon, CheckIcon, ChevronUpIcon, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, ArrowUpDown, Calendar, ExternalLink, MoreHorizontal } from 'lucide-react';
|
|
5
6
|
import * as ReactDOM from 'react-dom';
|
|
6
7
|
import ReactDOM__default from 'react-dom';
|
|
7
8
|
|
|
8
|
-
var jsxRuntime = {exports: {}};
|
|
9
|
-
|
|
10
|
-
var reactJsxRuntime_production_min = {};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @license React
|
|
14
|
-
* react-jsx-runtime.production.min.js
|
|
15
|
-
*
|
|
16
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
17
|
-
*
|
|
18
|
-
* This source code is licensed under the MIT license found in the
|
|
19
|
-
* LICENSE file in the root directory of this source tree.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
var hasRequiredReactJsxRuntime_production_min;
|
|
23
|
-
|
|
24
|
-
function requireReactJsxRuntime_production_min () {
|
|
25
|
-
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
26
|
-
hasRequiredReactJsxRuntime_production_min = 1;
|
|
27
|
-
var f=React__default,k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
28
|
-
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return {$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}reactJsxRuntime_production_min.Fragment=l;reactJsxRuntime_production_min.jsx=q;reactJsxRuntime_production_min.jsxs=q;
|
|
29
|
-
return reactJsxRuntime_production_min;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
var reactJsxRuntime_development = {};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-jsx-runtime.development.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/
|
|
43
|
-
|
|
44
|
-
var hasRequiredReactJsxRuntime_development;
|
|
45
|
-
|
|
46
|
-
function requireReactJsxRuntime_development () {
|
|
47
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
48
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
49
|
-
|
|
50
|
-
if (process.env.NODE_ENV !== "production") {
|
|
51
|
-
(function() {
|
|
52
|
-
|
|
53
|
-
var React = React__default;
|
|
54
|
-
|
|
55
|
-
// ATTENTION
|
|
56
|
-
// When adding new symbols to this file,
|
|
57
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
58
|
-
// The Symbol used to tag the ReactElement-like types.
|
|
59
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
60
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
61
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
62
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
63
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
64
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
65
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
66
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
67
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
68
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
69
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
70
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
71
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
72
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
73
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
74
|
-
function getIteratorFn(maybeIterable) {
|
|
75
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
76
|
-
return null;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
80
|
-
|
|
81
|
-
if (typeof maybeIterator === 'function') {
|
|
82
|
-
return maybeIterator;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return null;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
89
|
-
|
|
90
|
-
function error(format) {
|
|
91
|
-
{
|
|
92
|
-
{
|
|
93
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
94
|
-
args[_key2 - 1] = arguments[_key2];
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
printWarning('error', format, args);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function printWarning(level, format, args) {
|
|
103
|
-
// When changing this logic, you might want to also
|
|
104
|
-
// update consoleWithStackDev.www.js as well.
|
|
105
|
-
{
|
|
106
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
107
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
108
|
-
|
|
109
|
-
if (stack !== '') {
|
|
110
|
-
format += '%s';
|
|
111
|
-
args = args.concat([stack]);
|
|
112
|
-
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
var argsWithFormat = args.map(function (item) {
|
|
116
|
-
return String(item);
|
|
117
|
-
}); // Careful: RN currently depends on this prefix
|
|
118
|
-
|
|
119
|
-
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
120
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
121
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
|
122
|
-
|
|
123
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// -----------------------------------------------------------------------------
|
|
128
|
-
|
|
129
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
130
|
-
var enableCacheElement = false;
|
|
131
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
132
|
-
|
|
133
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
134
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
135
|
-
// issues in DEV builds.
|
|
136
|
-
|
|
137
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
138
|
-
|
|
139
|
-
var REACT_MODULE_REFERENCE;
|
|
140
|
-
|
|
141
|
-
{
|
|
142
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function isValidElementType(type) {
|
|
146
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
147
|
-
return true;
|
|
148
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
152
|
-
return true;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
if (typeof type === 'object' && type !== null) {
|
|
156
|
-
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
157
|
-
// types supported by any Flight configuration anywhere since
|
|
158
|
-
// we don't know which Flight build this will end up being used
|
|
159
|
-
// with.
|
|
160
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
169
|
-
var displayName = outerType.displayName;
|
|
170
|
-
|
|
171
|
-
if (displayName) {
|
|
172
|
-
return displayName;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
176
|
-
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
177
|
-
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
function getContextName(type) {
|
|
181
|
-
return type.displayName || 'Context';
|
|
182
|
-
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
function getComponentNameFromType(type) {
|
|
186
|
-
if (type == null) {
|
|
187
|
-
// Host root, text node or just invalid type.
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
if (typeof type.tag === 'number') {
|
|
193
|
-
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
if (typeof type === 'function') {
|
|
198
|
-
return type.displayName || type.name || null;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
if (typeof type === 'string') {
|
|
202
|
-
return type;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
switch (type) {
|
|
206
|
-
case REACT_FRAGMENT_TYPE:
|
|
207
|
-
return 'Fragment';
|
|
208
|
-
|
|
209
|
-
case REACT_PORTAL_TYPE:
|
|
210
|
-
return 'Portal';
|
|
211
|
-
|
|
212
|
-
case REACT_PROFILER_TYPE:
|
|
213
|
-
return 'Profiler';
|
|
214
|
-
|
|
215
|
-
case REACT_STRICT_MODE_TYPE:
|
|
216
|
-
return 'StrictMode';
|
|
217
|
-
|
|
218
|
-
case REACT_SUSPENSE_TYPE:
|
|
219
|
-
return 'Suspense';
|
|
220
|
-
|
|
221
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
222
|
-
return 'SuspenseList';
|
|
223
|
-
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
if (typeof type === 'object') {
|
|
227
|
-
switch (type.$$typeof) {
|
|
228
|
-
case REACT_CONTEXT_TYPE:
|
|
229
|
-
var context = type;
|
|
230
|
-
return getContextName(context) + '.Consumer';
|
|
231
|
-
|
|
232
|
-
case REACT_PROVIDER_TYPE:
|
|
233
|
-
var provider = type;
|
|
234
|
-
return getContextName(provider._context) + '.Provider';
|
|
235
|
-
|
|
236
|
-
case REACT_FORWARD_REF_TYPE:
|
|
237
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
238
|
-
|
|
239
|
-
case REACT_MEMO_TYPE:
|
|
240
|
-
var outerName = type.displayName || null;
|
|
241
|
-
|
|
242
|
-
if (outerName !== null) {
|
|
243
|
-
return outerName;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
247
|
-
|
|
248
|
-
case REACT_LAZY_TYPE:
|
|
249
|
-
{
|
|
250
|
-
var lazyComponent = type;
|
|
251
|
-
var payload = lazyComponent._payload;
|
|
252
|
-
var init = lazyComponent._init;
|
|
253
|
-
|
|
254
|
-
try {
|
|
255
|
-
return getComponentNameFromType(init(payload));
|
|
256
|
-
} catch (x) {
|
|
257
|
-
return null;
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
// eslint-disable-next-line no-fallthrough
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return null;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
var assign = Object.assign;
|
|
269
|
-
|
|
270
|
-
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
271
|
-
// replaying on render function. This currently only patches the object
|
|
272
|
-
// lazily which won't cover if the log function was extracted eagerly.
|
|
273
|
-
// We could also eagerly patch the method.
|
|
274
|
-
var disabledDepth = 0;
|
|
275
|
-
var prevLog;
|
|
276
|
-
var prevInfo;
|
|
277
|
-
var prevWarn;
|
|
278
|
-
var prevError;
|
|
279
|
-
var prevGroup;
|
|
280
|
-
var prevGroupCollapsed;
|
|
281
|
-
var prevGroupEnd;
|
|
282
|
-
|
|
283
|
-
function disabledLog() {}
|
|
284
|
-
|
|
285
|
-
disabledLog.__reactDisabledLog = true;
|
|
286
|
-
function disableLogs() {
|
|
287
|
-
{
|
|
288
|
-
if (disabledDepth === 0) {
|
|
289
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
290
|
-
prevLog = console.log;
|
|
291
|
-
prevInfo = console.info;
|
|
292
|
-
prevWarn = console.warn;
|
|
293
|
-
prevError = console.error;
|
|
294
|
-
prevGroup = console.group;
|
|
295
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
296
|
-
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
297
|
-
|
|
298
|
-
var props = {
|
|
299
|
-
configurable: true,
|
|
300
|
-
enumerable: true,
|
|
301
|
-
value: disabledLog,
|
|
302
|
-
writable: true
|
|
303
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
304
|
-
|
|
305
|
-
Object.defineProperties(console, {
|
|
306
|
-
info: props,
|
|
307
|
-
log: props,
|
|
308
|
-
warn: props,
|
|
309
|
-
error: props,
|
|
310
|
-
group: props,
|
|
311
|
-
groupCollapsed: props,
|
|
312
|
-
groupEnd: props
|
|
313
|
-
});
|
|
314
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
disabledDepth++;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
function reenableLogs() {
|
|
321
|
-
{
|
|
322
|
-
disabledDepth--;
|
|
323
|
-
|
|
324
|
-
if (disabledDepth === 0) {
|
|
325
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
326
|
-
var props = {
|
|
327
|
-
configurable: true,
|
|
328
|
-
enumerable: true,
|
|
329
|
-
writable: true
|
|
330
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
331
|
-
|
|
332
|
-
Object.defineProperties(console, {
|
|
333
|
-
log: assign({}, props, {
|
|
334
|
-
value: prevLog
|
|
335
|
-
}),
|
|
336
|
-
info: assign({}, props, {
|
|
337
|
-
value: prevInfo
|
|
338
|
-
}),
|
|
339
|
-
warn: assign({}, props, {
|
|
340
|
-
value: prevWarn
|
|
341
|
-
}),
|
|
342
|
-
error: assign({}, props, {
|
|
343
|
-
value: prevError
|
|
344
|
-
}),
|
|
345
|
-
group: assign({}, props, {
|
|
346
|
-
value: prevGroup
|
|
347
|
-
}),
|
|
348
|
-
groupCollapsed: assign({}, props, {
|
|
349
|
-
value: prevGroupCollapsed
|
|
350
|
-
}),
|
|
351
|
-
groupEnd: assign({}, props, {
|
|
352
|
-
value: prevGroupEnd
|
|
353
|
-
})
|
|
354
|
-
});
|
|
355
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
if (disabledDepth < 0) {
|
|
359
|
-
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
365
|
-
var prefix;
|
|
366
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
367
|
-
{
|
|
368
|
-
if (prefix === undefined) {
|
|
369
|
-
// Extract the VM specific prefix used by each line.
|
|
370
|
-
try {
|
|
371
|
-
throw Error();
|
|
372
|
-
} catch (x) {
|
|
373
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
374
|
-
prefix = match && match[1] || '';
|
|
375
|
-
}
|
|
376
|
-
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
return '\n' + prefix + name;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
var reentry = false;
|
|
383
|
-
var componentFrameCache;
|
|
384
|
-
|
|
385
|
-
{
|
|
386
|
-
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
387
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
391
|
-
// If something asked for a stack inside a fake render, it should get ignored.
|
|
392
|
-
if ( !fn || reentry) {
|
|
393
|
-
return '';
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
{
|
|
397
|
-
var frame = componentFrameCache.get(fn);
|
|
398
|
-
|
|
399
|
-
if (frame !== undefined) {
|
|
400
|
-
return frame;
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
var control;
|
|
405
|
-
reentry = true;
|
|
406
|
-
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
407
|
-
|
|
408
|
-
Error.prepareStackTrace = undefined;
|
|
409
|
-
var previousDispatcher;
|
|
410
|
-
|
|
411
|
-
{
|
|
412
|
-
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
413
|
-
// for warnings.
|
|
414
|
-
|
|
415
|
-
ReactCurrentDispatcher.current = null;
|
|
416
|
-
disableLogs();
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
try {
|
|
420
|
-
// This should throw.
|
|
421
|
-
if (construct) {
|
|
422
|
-
// Something should be setting the props in the constructor.
|
|
423
|
-
var Fake = function () {
|
|
424
|
-
throw Error();
|
|
425
|
-
}; // $FlowFixMe
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
429
|
-
set: function () {
|
|
430
|
-
// We use a throwing setter instead of frozen or non-writable props
|
|
431
|
-
// because that won't throw in a non-strict mode function.
|
|
432
|
-
throw Error();
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
437
|
-
// We construct a different control for this case to include any extra
|
|
438
|
-
// frames added by the construct call.
|
|
439
|
-
try {
|
|
440
|
-
Reflect.construct(Fake, []);
|
|
441
|
-
} catch (x) {
|
|
442
|
-
control = x;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
Reflect.construct(fn, [], Fake);
|
|
446
|
-
} else {
|
|
447
|
-
try {
|
|
448
|
-
Fake.call();
|
|
449
|
-
} catch (x) {
|
|
450
|
-
control = x;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
fn.call(Fake.prototype);
|
|
454
|
-
}
|
|
455
|
-
} else {
|
|
456
|
-
try {
|
|
457
|
-
throw Error();
|
|
458
|
-
} catch (x) {
|
|
459
|
-
control = x;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
fn();
|
|
463
|
-
}
|
|
464
|
-
} catch (sample) {
|
|
465
|
-
// This is inlined manually because closure doesn't do it for us.
|
|
466
|
-
if (sample && control && typeof sample.stack === 'string') {
|
|
467
|
-
// This extracts the first frame from the sample that isn't also in the control.
|
|
468
|
-
// Skipping one frame that we assume is the frame that calls the two.
|
|
469
|
-
var sampleLines = sample.stack.split('\n');
|
|
470
|
-
var controlLines = control.stack.split('\n');
|
|
471
|
-
var s = sampleLines.length - 1;
|
|
472
|
-
var c = controlLines.length - 1;
|
|
473
|
-
|
|
474
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
475
|
-
// We expect at least one stack frame to be shared.
|
|
476
|
-
// Typically this will be the root most one. However, stack frames may be
|
|
477
|
-
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
478
|
-
// earlier than the other. We assume that the sample is longer or the same
|
|
479
|
-
// and there for cut off earlier. So we should find the root most frame in
|
|
480
|
-
// the sample somewhere in the control.
|
|
481
|
-
c--;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
485
|
-
// Next we find the first one that isn't the same which should be the
|
|
486
|
-
// frame that called our sample function and the control.
|
|
487
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
488
|
-
// In V8, the first line is describing the message but other VMs don't.
|
|
489
|
-
// If we're about to return the first line, and the control is also on the same
|
|
490
|
-
// line, that's a pretty good indicator that our sample threw at same line as
|
|
491
|
-
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
492
|
-
// This can happen if you passed a class to function component, or non-function.
|
|
493
|
-
if (s !== 1 || c !== 1) {
|
|
494
|
-
do {
|
|
495
|
-
s--;
|
|
496
|
-
c--; // We may still have similar intermediate frames from the construct call.
|
|
497
|
-
// The next one that isn't the same should be our match though.
|
|
498
|
-
|
|
499
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
500
|
-
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
501
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
502
|
-
// but we have a user-provided "displayName"
|
|
503
|
-
// splice it in to make the stack more readable.
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
507
|
-
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
{
|
|
511
|
-
if (typeof fn === 'function') {
|
|
512
|
-
componentFrameCache.set(fn, _frame);
|
|
513
|
-
}
|
|
514
|
-
} // Return the line we found.
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
return _frame;
|
|
518
|
-
}
|
|
519
|
-
} while (s >= 1 && c >= 0);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
break;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
} finally {
|
|
527
|
-
reentry = false;
|
|
528
|
-
|
|
529
|
-
{
|
|
530
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
531
|
-
reenableLogs();
|
|
532
|
-
}
|
|
533
|
-
|
|
534
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
535
|
-
} // Fallback to just using the name if we couldn't make it throw.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
539
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
540
|
-
|
|
541
|
-
{
|
|
542
|
-
if (typeof fn === 'function') {
|
|
543
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
return syntheticFrame;
|
|
548
|
-
}
|
|
549
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
550
|
-
{
|
|
551
|
-
return describeNativeComponentFrame(fn, false);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
function shouldConstruct(Component) {
|
|
556
|
-
var prototype = Component.prototype;
|
|
557
|
-
return !!(prototype && prototype.isReactComponent);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
561
|
-
|
|
562
|
-
if (type == null) {
|
|
563
|
-
return '';
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
if (typeof type === 'function') {
|
|
567
|
-
{
|
|
568
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
if (typeof type === 'string') {
|
|
573
|
-
return describeBuiltInComponentFrame(type);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
switch (type) {
|
|
577
|
-
case REACT_SUSPENSE_TYPE:
|
|
578
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
579
|
-
|
|
580
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
581
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
if (typeof type === 'object') {
|
|
585
|
-
switch (type.$$typeof) {
|
|
586
|
-
case REACT_FORWARD_REF_TYPE:
|
|
587
|
-
return describeFunctionComponentFrame(type.render);
|
|
588
|
-
|
|
589
|
-
case REACT_MEMO_TYPE:
|
|
590
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
591
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
592
|
-
|
|
593
|
-
case REACT_LAZY_TYPE:
|
|
594
|
-
{
|
|
595
|
-
var lazyComponent = type;
|
|
596
|
-
var payload = lazyComponent._payload;
|
|
597
|
-
var init = lazyComponent._init;
|
|
598
|
-
|
|
599
|
-
try {
|
|
600
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
601
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
602
|
-
} catch (x) {}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
return '';
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
611
|
-
|
|
612
|
-
var loggedTypeFailures = {};
|
|
613
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
614
|
-
|
|
615
|
-
function setCurrentlyValidatingElement(element) {
|
|
616
|
-
{
|
|
617
|
-
if (element) {
|
|
618
|
-
var owner = element._owner;
|
|
619
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
620
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
621
|
-
} else {
|
|
622
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
628
|
-
{
|
|
629
|
-
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
630
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
631
|
-
|
|
632
|
-
for (var typeSpecName in typeSpecs) {
|
|
633
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
634
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
635
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
636
|
-
// After these have been cleaned up, we'll let them throw.
|
|
637
|
-
|
|
638
|
-
try {
|
|
639
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
640
|
-
// behavior as without this statement except with a better message.
|
|
641
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
642
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
643
|
-
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
644
|
-
err.name = 'Invariant Violation';
|
|
645
|
-
throw err;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
649
|
-
} catch (ex) {
|
|
650
|
-
error$1 = ex;
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
654
|
-
setCurrentlyValidatingElement(element);
|
|
655
|
-
|
|
656
|
-
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
|
657
|
-
|
|
658
|
-
setCurrentlyValidatingElement(null);
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
662
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
663
|
-
// same error.
|
|
664
|
-
loggedTypeFailures[error$1.message] = true;
|
|
665
|
-
setCurrentlyValidatingElement(element);
|
|
666
|
-
|
|
667
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
668
|
-
|
|
669
|
-
setCurrentlyValidatingElement(null);
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
677
|
-
|
|
678
|
-
function isArray(a) {
|
|
679
|
-
return isArrayImpl(a);
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
/*
|
|
683
|
-
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
684
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
685
|
-
*
|
|
686
|
-
* The functions in this module will throw an easier-to-understand,
|
|
687
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
688
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
689
|
-
* of the `value` object).
|
|
690
|
-
*/
|
|
691
|
-
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
692
|
-
function typeName(value) {
|
|
693
|
-
{
|
|
694
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
695
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
696
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
697
|
-
return type;
|
|
698
|
-
}
|
|
699
|
-
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
function willCoercionThrow(value) {
|
|
703
|
-
{
|
|
704
|
-
try {
|
|
705
|
-
testStringCoercion(value);
|
|
706
|
-
return false;
|
|
707
|
-
} catch (e) {
|
|
708
|
-
return true;
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
function testStringCoercion(value) {
|
|
714
|
-
// If you ended up here by following an exception call stack, here's what's
|
|
715
|
-
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
716
|
-
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
717
|
-
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
718
|
-
//
|
|
719
|
-
// The most common types that will cause this exception are `Symbol` instances
|
|
720
|
-
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
721
|
-
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
722
|
-
// exception. (Library authors do this to prevent users from using built-in
|
|
723
|
-
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
724
|
-
// methods are needed to perform accurate arithmetic or comparison.)
|
|
725
|
-
//
|
|
726
|
-
// To fix the problem, coerce this object or symbol value to a string before
|
|
727
|
-
// passing it to React. The most reliable way is usually `String(value)`.
|
|
728
|
-
//
|
|
729
|
-
// To find which value is throwing, check the browser or debugger console.
|
|
730
|
-
// Before this exception was thrown, there should be `console.error` output
|
|
731
|
-
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
732
|
-
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
733
|
-
// In most cases, this console output also shows the component and its
|
|
734
|
-
// ancestor components where the exception happened.
|
|
735
|
-
//
|
|
736
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
737
|
-
return '' + value;
|
|
738
|
-
}
|
|
739
|
-
function checkKeyStringCoercion(value) {
|
|
740
|
-
{
|
|
741
|
-
if (willCoercionThrow(value)) {
|
|
742
|
-
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
743
|
-
|
|
744
|
-
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
750
|
-
var RESERVED_PROPS = {
|
|
751
|
-
key: true,
|
|
752
|
-
ref: true,
|
|
753
|
-
__self: true,
|
|
754
|
-
__source: true
|
|
755
|
-
};
|
|
756
|
-
var specialPropKeyWarningShown;
|
|
757
|
-
var specialPropRefWarningShown;
|
|
758
|
-
var didWarnAboutStringRefs;
|
|
759
|
-
|
|
760
|
-
{
|
|
761
|
-
didWarnAboutStringRefs = {};
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
function hasValidRef(config) {
|
|
765
|
-
{
|
|
766
|
-
if (hasOwnProperty.call(config, 'ref')) {
|
|
767
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
768
|
-
|
|
769
|
-
if (getter && getter.isReactWarning) {
|
|
770
|
-
return false;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
|
|
775
|
-
return config.ref !== undefined;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
function hasValidKey(config) {
|
|
779
|
-
{
|
|
780
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
781
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
782
|
-
|
|
783
|
-
if (getter && getter.isReactWarning) {
|
|
784
|
-
return false;
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
return config.key !== undefined;
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
793
|
-
{
|
|
794
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
795
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
796
|
-
|
|
797
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
798
|
-
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
|
|
799
|
-
|
|
800
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
}
|
|
805
|
-
|
|
806
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
807
|
-
{
|
|
808
|
-
var warnAboutAccessingKey = function () {
|
|
809
|
-
if (!specialPropKeyWarningShown) {
|
|
810
|
-
specialPropKeyWarningShown = true;
|
|
811
|
-
|
|
812
|
-
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
813
|
-
}
|
|
814
|
-
};
|
|
815
|
-
|
|
816
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
817
|
-
Object.defineProperty(props, 'key', {
|
|
818
|
-
get: warnAboutAccessingKey,
|
|
819
|
-
configurable: true
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
|
|
824
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
825
|
-
{
|
|
826
|
-
var warnAboutAccessingRef = function () {
|
|
827
|
-
if (!specialPropRefWarningShown) {
|
|
828
|
-
specialPropRefWarningShown = true;
|
|
829
|
-
|
|
830
|
-
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
|
|
834
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
835
|
-
Object.defineProperty(props, 'ref', {
|
|
836
|
-
get: warnAboutAccessingRef,
|
|
837
|
-
configurable: true
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
/**
|
|
842
|
-
* Factory method to create a new React element. This no longer adheres to
|
|
843
|
-
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
844
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
845
|
-
* if something is a React Element.
|
|
846
|
-
*
|
|
847
|
-
* @param {*} type
|
|
848
|
-
* @param {*} props
|
|
849
|
-
* @param {*} key
|
|
850
|
-
* @param {string|object} ref
|
|
851
|
-
* @param {*} owner
|
|
852
|
-
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
853
|
-
* different from the `owner` when React.createElement is called, so that we
|
|
854
|
-
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
855
|
-
* functions, and as long as `this` and owner are the same, there will be no
|
|
856
|
-
* change in behavior.
|
|
857
|
-
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
858
|
-
* indicating filename, line number, and/or other information.
|
|
859
|
-
* @internal
|
|
860
|
-
*/
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
864
|
-
var element = {
|
|
865
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
866
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
867
|
-
// Built-in properties that belong on the element
|
|
868
|
-
type: type,
|
|
869
|
-
key: key,
|
|
870
|
-
ref: ref,
|
|
871
|
-
props: props,
|
|
872
|
-
// Record the component responsible for creating this element.
|
|
873
|
-
_owner: owner
|
|
874
|
-
};
|
|
875
|
-
|
|
876
|
-
{
|
|
877
|
-
// The validation flag is currently mutative. We put it on
|
|
878
|
-
// an external backing store so that we can freeze the whole object.
|
|
879
|
-
// This can be replaced with a WeakMap once they are implemented in
|
|
880
|
-
// commonly used development environments.
|
|
881
|
-
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
882
|
-
// the validation flag non-enumerable (where possible, which should
|
|
883
|
-
// include every environment we run tests in), so the test framework
|
|
884
|
-
// ignores it.
|
|
885
|
-
|
|
886
|
-
Object.defineProperty(element._store, 'validated', {
|
|
887
|
-
configurable: false,
|
|
888
|
-
enumerable: false,
|
|
889
|
-
writable: true,
|
|
890
|
-
value: false
|
|
891
|
-
}); // self and source are DEV only properties.
|
|
892
|
-
|
|
893
|
-
Object.defineProperty(element, '_self', {
|
|
894
|
-
configurable: false,
|
|
895
|
-
enumerable: false,
|
|
896
|
-
writable: false,
|
|
897
|
-
value: self
|
|
898
|
-
}); // Two elements created in two different places should be considered
|
|
899
|
-
// equal for testing purposes and therefore we hide it from enumeration.
|
|
900
|
-
|
|
901
|
-
Object.defineProperty(element, '_source', {
|
|
902
|
-
configurable: false,
|
|
903
|
-
enumerable: false,
|
|
904
|
-
writable: false,
|
|
905
|
-
value: source
|
|
906
|
-
});
|
|
907
|
-
|
|
908
|
-
if (Object.freeze) {
|
|
909
|
-
Object.freeze(element.props);
|
|
910
|
-
Object.freeze(element);
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
return element;
|
|
915
|
-
};
|
|
916
|
-
/**
|
|
917
|
-
* https://github.com/reactjs/rfcs/pull/107
|
|
918
|
-
* @param {*} type
|
|
919
|
-
* @param {object} props
|
|
920
|
-
* @param {string} key
|
|
921
|
-
*/
|
|
922
|
-
|
|
923
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
924
|
-
{
|
|
925
|
-
var propName; // Reserved names are extracted
|
|
926
|
-
|
|
927
|
-
var props = {};
|
|
928
|
-
var key = null;
|
|
929
|
-
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
930
|
-
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
931
|
-
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
932
|
-
// but as an intermediary step, we will use jsxDEV for everything except
|
|
933
|
-
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
934
|
-
// key is explicitly declared to be undefined or not.
|
|
935
|
-
|
|
936
|
-
if (maybeKey !== undefined) {
|
|
937
|
-
{
|
|
938
|
-
checkKeyStringCoercion(maybeKey);
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
key = '' + maybeKey;
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
if (hasValidKey(config)) {
|
|
945
|
-
{
|
|
946
|
-
checkKeyStringCoercion(config.key);
|
|
947
|
-
}
|
|
948
|
-
|
|
949
|
-
key = '' + config.key;
|
|
950
|
-
}
|
|
951
|
-
|
|
952
|
-
if (hasValidRef(config)) {
|
|
953
|
-
ref = config.ref;
|
|
954
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
955
|
-
} // Remaining properties are added to a new props object
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
for (propName in config) {
|
|
959
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
960
|
-
props[propName] = config[propName];
|
|
961
|
-
}
|
|
962
|
-
} // Resolve default props
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
if (type && type.defaultProps) {
|
|
966
|
-
var defaultProps = type.defaultProps;
|
|
967
|
-
|
|
968
|
-
for (propName in defaultProps) {
|
|
969
|
-
if (props[propName] === undefined) {
|
|
970
|
-
props[propName] = defaultProps[propName];
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
if (key || ref) {
|
|
976
|
-
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
977
|
-
|
|
978
|
-
if (key) {
|
|
979
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
980
|
-
}
|
|
981
|
-
|
|
982
|
-
if (ref) {
|
|
983
|
-
defineRefPropWarningGetter(props, displayName);
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
992
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
993
|
-
|
|
994
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
995
|
-
{
|
|
996
|
-
if (element) {
|
|
997
|
-
var owner = element._owner;
|
|
998
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
999
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
1000
|
-
} else {
|
|
1001
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
var propTypesMisspellWarningShown;
|
|
1007
|
-
|
|
1008
|
-
{
|
|
1009
|
-
propTypesMisspellWarningShown = false;
|
|
1010
|
-
}
|
|
1011
|
-
/**
|
|
1012
|
-
* Verifies the object is a ReactElement.
|
|
1013
|
-
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
1014
|
-
* @param {?object} object
|
|
1015
|
-
* @return {boolean} True if `object` is a ReactElement.
|
|
1016
|
-
* @final
|
|
1017
|
-
*/
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
function isValidElement(object) {
|
|
1021
|
-
{
|
|
1022
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1023
|
-
}
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
function getDeclarationErrorAddendum() {
|
|
1027
|
-
{
|
|
1028
|
-
if (ReactCurrentOwner$1.current) {
|
|
1029
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
1030
|
-
|
|
1031
|
-
if (name) {
|
|
1032
|
-
return '\n\nCheck the render method of `' + name + '`.';
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
|
-
return '';
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1041
|
-
{
|
|
1042
|
-
if (source !== undefined) {
|
|
1043
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
1044
|
-
var lineNumber = source.lineNumber;
|
|
1045
|
-
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
1046
|
-
}
|
|
1047
|
-
|
|
1048
|
-
return '';
|
|
1049
|
-
}
|
|
1050
|
-
}
|
|
1051
|
-
/**
|
|
1052
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1053
|
-
* object keys are not valid. This allows us to keep track of children between
|
|
1054
|
-
* updates.
|
|
1055
|
-
*/
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
var ownerHasKeyUseWarning = {};
|
|
1059
|
-
|
|
1060
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1061
|
-
{
|
|
1062
|
-
var info = getDeclarationErrorAddendum();
|
|
1063
|
-
|
|
1064
|
-
if (!info) {
|
|
1065
|
-
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1066
|
-
|
|
1067
|
-
if (parentName) {
|
|
1068
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1069
|
-
}
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
return info;
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
/**
|
|
1076
|
-
* Warn if the element doesn't have an explicit key assigned to it.
|
|
1077
|
-
* This element is in an array. The array could grow and shrink or be
|
|
1078
|
-
* reordered. All children that haven't already been validated are required to
|
|
1079
|
-
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
1080
|
-
* will only be shown once.
|
|
1081
|
-
*
|
|
1082
|
-
* @internal
|
|
1083
|
-
* @param {ReactElement} element Element that requires a key.
|
|
1084
|
-
* @param {*} parentType element's parent's type.
|
|
1085
|
-
*/
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
function validateExplicitKey(element, parentType) {
|
|
1089
|
-
{
|
|
1090
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1091
|
-
return;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
element._store.validated = true;
|
|
1095
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1096
|
-
|
|
1097
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1098
|
-
return;
|
|
1099
|
-
}
|
|
1100
|
-
|
|
1101
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1102
|
-
// property, it may be the creator of the child that's responsible for
|
|
1103
|
-
// assigning it a key.
|
|
1104
|
-
|
|
1105
|
-
var childOwner = '';
|
|
1106
|
-
|
|
1107
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
1108
|
-
// Give the component that originally created this child.
|
|
1109
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1110
|
-
}
|
|
1111
|
-
|
|
1112
|
-
setCurrentlyValidatingElement$1(element);
|
|
1113
|
-
|
|
1114
|
-
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
1115
|
-
|
|
1116
|
-
setCurrentlyValidatingElement$1(null);
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
* Ensure that every element either is passed in a static location, in an
|
|
1121
|
-
* array with an explicit keys property defined, or in an object literal
|
|
1122
|
-
* with valid key property.
|
|
1123
|
-
*
|
|
1124
|
-
* @internal
|
|
1125
|
-
* @param {ReactNode} node Statically passed child of any type.
|
|
1126
|
-
* @param {*} parentType node's parent's type.
|
|
1127
|
-
*/
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
function validateChildKeys(node, parentType) {
|
|
1131
|
-
{
|
|
1132
|
-
if (typeof node !== 'object') {
|
|
1133
|
-
return;
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
if (isArray(node)) {
|
|
1137
|
-
for (var i = 0; i < node.length; i++) {
|
|
1138
|
-
var child = node[i];
|
|
1139
|
-
|
|
1140
|
-
if (isValidElement(child)) {
|
|
1141
|
-
validateExplicitKey(child, parentType);
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
} else if (isValidElement(node)) {
|
|
1145
|
-
// This element was passed in a valid location.
|
|
1146
|
-
if (node._store) {
|
|
1147
|
-
node._store.validated = true;
|
|
1148
|
-
}
|
|
1149
|
-
} else if (node) {
|
|
1150
|
-
var iteratorFn = getIteratorFn(node);
|
|
1151
|
-
|
|
1152
|
-
if (typeof iteratorFn === 'function') {
|
|
1153
|
-
// Entry iterators used to provide implicit keys,
|
|
1154
|
-
// but now we print a separate warning for them later.
|
|
1155
|
-
if (iteratorFn !== node.entries) {
|
|
1156
|
-
var iterator = iteratorFn.call(node);
|
|
1157
|
-
var step;
|
|
1158
|
-
|
|
1159
|
-
while (!(step = iterator.next()).done) {
|
|
1160
|
-
if (isValidElement(step.value)) {
|
|
1161
|
-
validateExplicitKey(step.value, parentType);
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
/**
|
|
1170
|
-
* Given an element, validate that its props follow the propTypes definition,
|
|
1171
|
-
* provided by the type.
|
|
1172
|
-
*
|
|
1173
|
-
* @param {ReactElement} element
|
|
1174
|
-
*/
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
function validatePropTypes(element) {
|
|
1178
|
-
{
|
|
1179
|
-
var type = element.type;
|
|
1180
|
-
|
|
1181
|
-
if (type === null || type === undefined || typeof type === 'string') {
|
|
1182
|
-
return;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
var propTypes;
|
|
1186
|
-
|
|
1187
|
-
if (typeof type === 'function') {
|
|
1188
|
-
propTypes = type.propTypes;
|
|
1189
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1190
|
-
// Inner props are checked in the reconciler.
|
|
1191
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1192
|
-
propTypes = type.propTypes;
|
|
1193
|
-
} else {
|
|
1194
|
-
return;
|
|
1195
|
-
}
|
|
1196
|
-
|
|
1197
|
-
if (propTypes) {
|
|
1198
|
-
// Intentionally inside to avoid triggering lazy initializers:
|
|
1199
|
-
var name = getComponentNameFromType(type);
|
|
1200
|
-
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
1201
|
-
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1202
|
-
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
1203
|
-
|
|
1204
|
-
var _name = getComponentNameFromType(type);
|
|
1205
|
-
|
|
1206
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
1210
|
-
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
}
|
|
1214
|
-
/**
|
|
1215
|
-
* Given a fragment, validate that it can only be provided with fragment props
|
|
1216
|
-
* @param {ReactElement} fragment
|
|
1217
|
-
*/
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
function validateFragmentProps(fragment) {
|
|
1221
|
-
{
|
|
1222
|
-
var keys = Object.keys(fragment.props);
|
|
1223
|
-
|
|
1224
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1225
|
-
var key = keys[i];
|
|
1226
|
-
|
|
1227
|
-
if (key !== 'children' && key !== 'key') {
|
|
1228
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1229
|
-
|
|
1230
|
-
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
1231
|
-
|
|
1232
|
-
setCurrentlyValidatingElement$1(null);
|
|
1233
|
-
break;
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
if (fragment.ref !== null) {
|
|
1238
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1239
|
-
|
|
1240
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
1241
|
-
|
|
1242
|
-
setCurrentlyValidatingElement$1(null);
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
var didWarnAboutKeySpread = {};
|
|
1248
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1249
|
-
{
|
|
1250
|
-
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
1251
|
-
// succeed and there will likely be errors in render.
|
|
1252
|
-
|
|
1253
|
-
if (!validType) {
|
|
1254
|
-
var info = '';
|
|
1255
|
-
|
|
1256
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1257
|
-
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
1261
|
-
|
|
1262
|
-
if (sourceInfo) {
|
|
1263
|
-
info += sourceInfo;
|
|
1264
|
-
} else {
|
|
1265
|
-
info += getDeclarationErrorAddendum();
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
var typeString;
|
|
1269
|
-
|
|
1270
|
-
if (type === null) {
|
|
1271
|
-
typeString = 'null';
|
|
1272
|
-
} else if (isArray(type)) {
|
|
1273
|
-
typeString = 'array';
|
|
1274
|
-
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1275
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
1276
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
1277
|
-
} else {
|
|
1278
|
-
typeString = typeof type;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
1285
|
-
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
1286
|
-
|
|
1287
|
-
if (element == null) {
|
|
1288
|
-
return element;
|
|
1289
|
-
} // Skip key warning if the type isn't valid since our key validation logic
|
|
1290
|
-
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
1291
|
-
// We don't want exception behavior to differ between dev and prod.
|
|
1292
|
-
// (Rendering will throw with a helpful message and as soon as the type is
|
|
1293
|
-
// fixed, the key warnings will appear.)
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
if (validType) {
|
|
1297
|
-
var children = props.children;
|
|
1298
|
-
|
|
1299
|
-
if (children !== undefined) {
|
|
1300
|
-
if (isStaticChildren) {
|
|
1301
|
-
if (isArray(children)) {
|
|
1302
|
-
for (var i = 0; i < children.length; i++) {
|
|
1303
|
-
validateChildKeys(children[i], type);
|
|
1304
|
-
}
|
|
1305
|
-
|
|
1306
|
-
if (Object.freeze) {
|
|
1307
|
-
Object.freeze(children);
|
|
1308
|
-
}
|
|
1309
|
-
} else {
|
|
1310
|
-
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
|
|
1311
|
-
}
|
|
1312
|
-
} else {
|
|
1313
|
-
validateChildKeys(children, type);
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
{
|
|
1319
|
-
if (hasOwnProperty.call(props, 'key')) {
|
|
1320
|
-
var componentName = getComponentNameFromType(type);
|
|
1321
|
-
var keys = Object.keys(props).filter(function (k) {
|
|
1322
|
-
return k !== 'key';
|
|
1323
|
-
});
|
|
1324
|
-
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
|
|
1325
|
-
|
|
1326
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
1327
|
-
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
|
|
1328
|
-
|
|
1329
|
-
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
|
|
1330
|
-
|
|
1331
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
1337
|
-
validateFragmentProps(element);
|
|
1338
|
-
} else {
|
|
1339
|
-
validatePropTypes(element);
|
|
1340
|
-
}
|
|
1341
|
-
|
|
1342
|
-
return element;
|
|
1343
|
-
}
|
|
1344
|
-
} // These two functions exist to still get child warnings in dev
|
|
1345
|
-
// even with the prod transform. This means that jsxDEV is purely
|
|
1346
|
-
// opt-in behavior for better messages but that we won't stop
|
|
1347
|
-
// giving you warnings if you use production apis.
|
|
1348
|
-
|
|
1349
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
1350
|
-
{
|
|
1351
|
-
return jsxWithValidation(type, props, key, true);
|
|
1352
|
-
}
|
|
1353
|
-
}
|
|
1354
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
1355
|
-
{
|
|
1356
|
-
return jsxWithValidation(type, props, key, false);
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
|
1361
|
-
// for now we can ship identical prod functions
|
|
1362
|
-
|
|
1363
|
-
var jsxs = jsxWithValidationStatic ;
|
|
1364
|
-
|
|
1365
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
1366
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
1367
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
1368
|
-
})();
|
|
1369
|
-
}
|
|
1370
|
-
return reactJsxRuntime_development;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1374
|
-
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
1375
|
-
} else {
|
|
1376
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
1377
|
-
}
|
|
1378
|
-
|
|
1379
|
-
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1380
|
-
|
|
1381
9
|
function Table({ className, ...props }) {
|
|
1382
|
-
return (
|
|
10
|
+
return (jsx("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: jsx("table", { "data-slot": "table", className: className, ...props }) }));
|
|
1383
11
|
}
|
|
1384
12
|
function TableHeader({ className, ...props }) {
|
|
1385
|
-
return
|
|
13
|
+
return jsx("thead", { "data-slot": "table-header", className: className, ...props });
|
|
1386
14
|
}
|
|
1387
15
|
function TableBody({ className, ...props }) {
|
|
1388
|
-
return
|
|
16
|
+
return jsx("tbody", { "data-slot": "table-body", className: className, ...props });
|
|
1389
17
|
}
|
|
1390
18
|
function TableRow({ className, ...props }) {
|
|
1391
|
-
return
|
|
19
|
+
return jsx("tr", { "data-slot": "table-row", className: className, ...props });
|
|
1392
20
|
}
|
|
1393
21
|
function TableHead({ className, ...props }) {
|
|
1394
|
-
return
|
|
22
|
+
return jsx("th", { "data-slot": "table-head", className: className, ...props });
|
|
1395
23
|
}
|
|
1396
24
|
function TableCell({ className, ...props }) {
|
|
1397
|
-
return
|
|
25
|
+
return jsx("td", { "data-slot": "table-cell", className: className, ...props });
|
|
1398
26
|
}
|
|
1399
27
|
|
|
1400
28
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
@@ -1498,9 +126,9 @@ function createSlot(ownerName) {
|
|
|
1498
126
|
return child;
|
|
1499
127
|
}
|
|
1500
128
|
});
|
|
1501
|
-
return /* @__PURE__ */
|
|
129
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
1502
130
|
}
|
|
1503
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
1504
132
|
});
|
|
1505
133
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
1506
134
|
return Slot2;
|
|
@@ -1527,7 +155,7 @@ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
|
1527
155
|
// @__NO_SIDE_EFFECTS__
|
|
1528
156
|
function createSlottable(ownerName) {
|
|
1529
157
|
const Slottable2 = ({ children }) => {
|
|
1530
|
-
return /* @__PURE__ */
|
|
158
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1531
159
|
};
|
|
1532
160
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
1533
161
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -1602,7 +230,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
1602
230
|
if (typeof window !== "undefined") {
|
|
1603
231
|
window[Symbol.for("radix-ui")] = true;
|
|
1604
232
|
}
|
|
1605
|
-
return /* @__PURE__ */
|
|
233
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
1606
234
|
});
|
|
1607
235
|
Node.displayName = `Primitive.${node}`;
|
|
1608
236
|
return { ...primitive, [node]: Node };
|
|
@@ -1628,7 +256,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
1628
256
|
var NAME$1 = "VisuallyHidden";
|
|
1629
257
|
var VisuallyHidden = React.forwardRef(
|
|
1630
258
|
(props, forwardedRef) => {
|
|
1631
|
-
return /* @__PURE__ */
|
|
259
|
+
return /* @__PURE__ */ jsx(
|
|
1632
260
|
Primitive.span,
|
|
1633
261
|
{
|
|
1634
262
|
...props,
|
|
@@ -1652,7 +280,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
1652
280
|
const { scope, children, ...context } = props;
|
|
1653
281
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
1654
282
|
const value = React.useMemo(() => context, Object.values(context));
|
|
1655
|
-
return /* @__PURE__ */
|
|
283
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
1656
284
|
};
|
|
1657
285
|
Provider.displayName = rootComponentName + "Provider";
|
|
1658
286
|
function useContext2(consumerName, scope) {
|
|
@@ -1711,7 +339,7 @@ function createCollection(name) {
|
|
|
1711
339
|
const { scope, children } = props;
|
|
1712
340
|
const ref = React__default.useRef(null);
|
|
1713
341
|
const itemMap = React__default.useRef(/* @__PURE__ */ new Map()).current;
|
|
1714
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
1715
343
|
};
|
|
1716
344
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
1717
345
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -1721,7 +349,7 @@ function createCollection(name) {
|
|
|
1721
349
|
const { scope, children } = props;
|
|
1722
350
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
1723
351
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
1724
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
1725
353
|
}
|
|
1726
354
|
);
|
|
1727
355
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
@@ -1738,7 +366,7 @@ function createCollection(name) {
|
|
|
1738
366
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
1739
367
|
return () => void context.itemMap.delete(ref);
|
|
1740
368
|
});
|
|
1741
|
-
return /* @__PURE__ */
|
|
369
|
+
return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
1742
370
|
}
|
|
1743
371
|
);
|
|
1744
372
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -2096,7 +724,7 @@ var DismissableLayer = React.forwardRef(
|
|
|
2096
724
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
2097
725
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
2098
726
|
}, []);
|
|
2099
|
-
return /* @__PURE__ */
|
|
727
|
+
return /* @__PURE__ */ jsx(
|
|
2100
728
|
Primitive.div,
|
|
2101
729
|
{
|
|
2102
730
|
...layerProps,
|
|
@@ -2130,7 +758,7 @@ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
|
2130
758
|
};
|
|
2131
759
|
}
|
|
2132
760
|
}, [context.branches]);
|
|
2133
|
-
return /* @__PURE__ */
|
|
761
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
2134
762
|
});
|
|
2135
763
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
2136
764
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -2328,7 +956,7 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
2328
956
|
},
|
|
2329
957
|
[loop, trapped, focusScope.paused]
|
|
2330
958
|
);
|
|
2331
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
2332
960
|
});
|
|
2333
961
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
2334
962
|
function focusFirst$2(candidates, { select = false } = {}) {
|
|
@@ -2417,7 +1045,7 @@ var Portal$3 = React.forwardRef((props, forwardedRef) => {
|
|
|
2417
1045
|
const [mounted, setMounted] = React.useState(false);
|
|
2418
1046
|
useLayoutEffect2(() => setMounted(true), []);
|
|
2419
1047
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
2420
|
-
return container ? ReactDOM__default.createPortal(/* @__PURE__ */
|
|
1048
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
2421
1049
|
});
|
|
2422
1050
|
Portal$3.displayName = PORTAL_NAME$4;
|
|
2423
1051
|
|
|
@@ -3441,7 +2069,7 @@ function CheckboxProvider(props) {
|
|
|
3441
2069
|
bubbleInput,
|
|
3442
2070
|
setBubbleInput
|
|
3443
2071
|
};
|
|
3444
|
-
return /* @__PURE__ */
|
|
2072
|
+
return /* @__PURE__ */ jsx(
|
|
3445
2073
|
CheckboxProviderImpl,
|
|
3446
2074
|
{
|
|
3447
2075
|
scope: __scopeCheckbox,
|
|
@@ -3475,7 +2103,7 @@ var CheckboxTrigger = React.forwardRef(
|
|
|
3475
2103
|
return () => form.removeEventListener("reset", reset);
|
|
3476
2104
|
}
|
|
3477
2105
|
}, [control, setChecked]);
|
|
3478
|
-
return /* @__PURE__ */
|
|
2106
|
+
return /* @__PURE__ */ jsx(
|
|
3479
2107
|
Primitive.button,
|
|
3480
2108
|
{
|
|
3481
2109
|
type: "button",
|
|
@@ -3517,7 +2145,7 @@ var Checkbox$1 = React.forwardRef(
|
|
|
3517
2145
|
form,
|
|
3518
2146
|
...checkboxProps
|
|
3519
2147
|
} = props;
|
|
3520
|
-
return /* @__PURE__ */
|
|
2148
|
+
return /* @__PURE__ */ jsx(
|
|
3521
2149
|
CheckboxProvider,
|
|
3522
2150
|
{
|
|
3523
2151
|
__scopeCheckbox,
|
|
@@ -3529,8 +2157,8 @@ var Checkbox$1 = React.forwardRef(
|
|
|
3529
2157
|
name,
|
|
3530
2158
|
form,
|
|
3531
2159
|
value,
|
|
3532
|
-
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */
|
|
3533
|
-
/* @__PURE__ */
|
|
2160
|
+
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2161
|
+
/* @__PURE__ */ jsx(
|
|
3534
2162
|
CheckboxTrigger,
|
|
3535
2163
|
{
|
|
3536
2164
|
...checkboxProps,
|
|
@@ -3538,7 +2166,7 @@ var Checkbox$1 = React.forwardRef(
|
|
|
3538
2166
|
__scopeCheckbox
|
|
3539
2167
|
}
|
|
3540
2168
|
),
|
|
3541
|
-
isFormControl && /* @__PURE__ */
|
|
2169
|
+
isFormControl && /* @__PURE__ */ jsx(
|
|
3542
2170
|
CheckboxBubbleInput,
|
|
3543
2171
|
{
|
|
3544
2172
|
__scopeCheckbox
|
|
@@ -3555,11 +2183,11 @@ var CheckboxIndicator = React.forwardRef(
|
|
|
3555
2183
|
(props, forwardedRef) => {
|
|
3556
2184
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
3557
2185
|
const context = useCheckboxContext(INDICATOR_NAME$2, __scopeCheckbox);
|
|
3558
|
-
return /* @__PURE__ */
|
|
2186
|
+
return /* @__PURE__ */ jsx(
|
|
3559
2187
|
Presence,
|
|
3560
2188
|
{
|
|
3561
2189
|
present: forceMount || isIndeterminate$1(context.checked) || context.checked === true,
|
|
3562
|
-
children: /* @__PURE__ */
|
|
2190
|
+
children: /* @__PURE__ */ jsx(
|
|
3563
2191
|
Primitive.span,
|
|
3564
2192
|
{
|
|
3565
2193
|
"data-state": getState(context.checked),
|
|
@@ -3611,7 +2239,7 @@ var CheckboxBubbleInput = React.forwardRef(
|
|
|
3611
2239
|
}
|
|
3612
2240
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
3613
2241
|
const defaultCheckedRef = React.useRef(isIndeterminate$1(checked) ? false : checked);
|
|
3614
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ jsx(
|
|
3615
2243
|
Primitive.input,
|
|
3616
2244
|
{
|
|
3617
2245
|
type: "checkbox",
|
|
@@ -5852,7 +4480,7 @@ const arrow = (options, deps) => ({
|
|
|
5852
4480
|
var NAME = "Arrow";
|
|
5853
4481
|
var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
5854
4482
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
5855
|
-
return /* @__PURE__ */
|
|
4483
|
+
return /* @__PURE__ */ jsx(
|
|
5856
4484
|
Primitive.svg,
|
|
5857
4485
|
{
|
|
5858
4486
|
...arrowProps,
|
|
@@ -5861,7 +4489,7 @@ var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
5861
4489
|
height,
|
|
5862
4490
|
viewBox: "0 0 30 10",
|
|
5863
4491
|
preserveAspectRatio: "none",
|
|
5864
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
4492
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
5865
4493
|
}
|
|
5866
4494
|
);
|
|
5867
4495
|
});
|
|
@@ -5874,7 +4502,7 @@ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
|
5874
4502
|
var Popper = (props) => {
|
|
5875
4503
|
const { __scopePopper, children } = props;
|
|
5876
4504
|
const [anchor, setAnchor] = React.useState(null);
|
|
5877
|
-
return /* @__PURE__ */
|
|
4505
|
+
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
5878
4506
|
};
|
|
5879
4507
|
Popper.displayName = POPPER_NAME;
|
|
5880
4508
|
var ANCHOR_NAME$1 = "PopperAnchor";
|
|
@@ -5892,7 +4520,7 @@ var PopperAnchor = React.forwardRef(
|
|
|
5892
4520
|
context.onAnchorChange(anchorRef.current);
|
|
5893
4521
|
}
|
|
5894
4522
|
});
|
|
5895
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
4523
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
5896
4524
|
}
|
|
5897
4525
|
);
|
|
5898
4526
|
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
@@ -5985,7 +4613,7 @@ var PopperContent = React.forwardRef(
|
|
|
5985
4613
|
useLayoutEffect2(() => {
|
|
5986
4614
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
5987
4615
|
}, [content]);
|
|
5988
|
-
return /* @__PURE__ */
|
|
4616
|
+
return /* @__PURE__ */ jsx(
|
|
5989
4617
|
"div",
|
|
5990
4618
|
{
|
|
5991
4619
|
ref: refs.setFloating,
|
|
@@ -6009,7 +4637,7 @@ var PopperContent = React.forwardRef(
|
|
|
6009
4637
|
}
|
|
6010
4638
|
},
|
|
6011
4639
|
dir: props.dir,
|
|
6012
|
-
children: /* @__PURE__ */
|
|
4640
|
+
children: /* @__PURE__ */ jsx(
|
|
6013
4641
|
PopperContentProvider,
|
|
6014
4642
|
{
|
|
6015
4643
|
scope: __scopePopper,
|
|
@@ -6018,7 +4646,7 @@ var PopperContent = React.forwardRef(
|
|
|
6018
4646
|
arrowX,
|
|
6019
4647
|
arrowY,
|
|
6020
4648
|
shouldHideArrow: cannotCenterArrow,
|
|
6021
|
-
children: /* @__PURE__ */
|
|
4649
|
+
children: /* @__PURE__ */ jsx(
|
|
6022
4650
|
Primitive.div,
|
|
6023
4651
|
{
|
|
6024
4652
|
"data-side": placedSide,
|
|
@@ -6055,7 +4683,7 @@ var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
|
6055
4683
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
6056
4684
|
// doesn't report size as we'd expect on SVG elements.
|
|
6057
4685
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
6058
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsx(
|
|
6059
4687
|
"span",
|
|
6060
4688
|
{
|
|
6061
4689
|
ref: contentContext.onArrowChange,
|
|
@@ -6078,7 +4706,7 @@ var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
|
6078
4706
|
}[contentContext.placedSide],
|
|
6079
4707
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
6080
4708
|
},
|
|
6081
|
-
children: /* @__PURE__ */
|
|
4709
|
+
children: /* @__PURE__ */ jsx(
|
|
6082
4710
|
Root$2,
|
|
6083
4711
|
{
|
|
6084
4712
|
...arrowProps,
|
|
@@ -6149,7 +4777,7 @@ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContext
|
|
|
6149
4777
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$3);
|
|
6150
4778
|
var RovingFocusGroup = React.forwardRef(
|
|
6151
4779
|
(props, forwardedRef) => {
|
|
6152
|
-
return /* @__PURE__ */
|
|
4780
|
+
return /* @__PURE__ */ jsx(Collection$2.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection$2.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
|
6153
4781
|
}
|
|
6154
4782
|
);
|
|
6155
4783
|
RovingFocusGroup.displayName = GROUP_NAME$3;
|
|
@@ -6187,7 +4815,7 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
6187
4815
|
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
6188
4816
|
}
|
|
6189
4817
|
}, [handleEntryFocus]);
|
|
6190
|
-
return /* @__PURE__ */
|
|
4818
|
+
return /* @__PURE__ */ jsx(
|
|
6191
4819
|
RovingFocusProvider,
|
|
6192
4820
|
{
|
|
6193
4821
|
scope: __scopeRovingFocusGroup,
|
|
@@ -6208,7 +4836,7 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
6208
4836
|
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
6209
4837
|
[]
|
|
6210
4838
|
),
|
|
6211
|
-
children: /* @__PURE__ */
|
|
4839
|
+
children: /* @__PURE__ */ jsx(
|
|
6212
4840
|
Primitive.div,
|
|
6213
4841
|
{
|
|
6214
4842
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
@@ -6266,14 +4894,14 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
6266
4894
|
return () => onFocusableItemRemove();
|
|
6267
4895
|
}
|
|
6268
4896
|
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
6269
|
-
return /* @__PURE__ */
|
|
4897
|
+
return /* @__PURE__ */ jsx(
|
|
6270
4898
|
Collection$2.ItemSlot,
|
|
6271
4899
|
{
|
|
6272
4900
|
scope: __scopeRovingFocusGroup,
|
|
6273
4901
|
id,
|
|
6274
4902
|
focusable,
|
|
6275
4903
|
active,
|
|
6276
|
-
children: /* @__PURE__ */
|
|
4904
|
+
children: /* @__PURE__ */ jsx(
|
|
6277
4905
|
Primitive.span,
|
|
6278
4906
|
{
|
|
6279
4907
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
@@ -6392,7 +5020,7 @@ var Menu = (props) => {
|
|
|
6392
5020
|
document.removeEventListener("pointermove", handlePointer, { capture: true });
|
|
6393
5021
|
};
|
|
6394
5022
|
}, []);
|
|
6395
|
-
return /* @__PURE__ */
|
|
5023
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
6396
5024
|
MenuProvider,
|
|
6397
5025
|
{
|
|
6398
5026
|
scope: __scopeMenu,
|
|
@@ -6400,7 +5028,7 @@ var Menu = (props) => {
|
|
|
6400
5028
|
onOpenChange: handleOpenChange,
|
|
6401
5029
|
content,
|
|
6402
5030
|
onContentChange: setContent,
|
|
6403
|
-
children: /* @__PURE__ */
|
|
5031
|
+
children: /* @__PURE__ */ jsx(
|
|
6404
5032
|
MenuRootProvider,
|
|
6405
5033
|
{
|
|
6406
5034
|
scope: __scopeMenu,
|
|
@@ -6420,7 +5048,7 @@ var MenuAnchor = React.forwardRef(
|
|
|
6420
5048
|
(props, forwardedRef) => {
|
|
6421
5049
|
const { __scopeMenu, ...anchorProps } = props;
|
|
6422
5050
|
const popperScope = usePopperScope$2(__scopeMenu);
|
|
6423
|
-
return /* @__PURE__ */
|
|
5051
|
+
return /* @__PURE__ */ jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
6424
5052
|
}
|
|
6425
5053
|
);
|
|
6426
5054
|
MenuAnchor.displayName = ANCHOR_NAME;
|
|
@@ -6431,7 +5059,7 @@ var [PortalProvider$1, usePortalContext$1] = createMenuContext(PORTAL_NAME$3, {
|
|
|
6431
5059
|
var MenuPortal = (props) => {
|
|
6432
5060
|
const { __scopeMenu, forceMount, children, container } = props;
|
|
6433
5061
|
const context = useMenuContext(PORTAL_NAME$3, __scopeMenu);
|
|
6434
|
-
return /* @__PURE__ */
|
|
5062
|
+
return /* @__PURE__ */ jsx(PortalProvider$1, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$3, { asChild: true, container, children }) }) });
|
|
6435
5063
|
};
|
|
6436
5064
|
MenuPortal.displayName = PORTAL_NAME$3;
|
|
6437
5065
|
var CONTENT_NAME$3 = "MenuContent";
|
|
@@ -6442,7 +5070,7 @@ var MenuContent = React.forwardRef(
|
|
|
6442
5070
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
6443
5071
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
6444
5072
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
6445
|
-
return /* @__PURE__ */
|
|
5073
|
+
return /* @__PURE__ */ jsx(Collection$1.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ jsx(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });
|
|
6446
5074
|
}
|
|
6447
5075
|
);
|
|
6448
5076
|
var MenuRootContentModal = React.forwardRef(
|
|
@@ -6454,7 +5082,7 @@ var MenuRootContentModal = React.forwardRef(
|
|
|
6454
5082
|
const content = ref.current;
|
|
6455
5083
|
if (content) return hideOthers(content);
|
|
6456
5084
|
}, []);
|
|
6457
|
-
return /* @__PURE__ */
|
|
5085
|
+
return /* @__PURE__ */ jsx(
|
|
6458
5086
|
MenuContentImpl,
|
|
6459
5087
|
{
|
|
6460
5088
|
...props,
|
|
@@ -6474,7 +5102,7 @@ var MenuRootContentModal = React.forwardRef(
|
|
|
6474
5102
|
);
|
|
6475
5103
|
var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {
|
|
6476
5104
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
6477
|
-
return /* @__PURE__ */
|
|
5105
|
+
return /* @__PURE__ */ jsx(
|
|
6478
5106
|
MenuContentImpl,
|
|
6479
5107
|
{
|
|
6480
5108
|
...props,
|
|
@@ -6546,7 +5174,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6546
5174
|
const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
|
|
6547
5175
|
return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
|
|
6548
5176
|
}, []);
|
|
6549
|
-
return /* @__PURE__ */
|
|
5177
|
+
return /* @__PURE__ */ jsx(
|
|
6550
5178
|
MenuContentProvider,
|
|
6551
5179
|
{
|
|
6552
5180
|
scope: __scopeMenu,
|
|
@@ -6575,7 +5203,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6575
5203
|
onPointerGraceIntentChange: React.useCallback((intent) => {
|
|
6576
5204
|
pointerGraceIntentRef.current = intent;
|
|
6577
5205
|
}, []),
|
|
6578
|
-
children: /* @__PURE__ */
|
|
5206
|
+
children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(
|
|
6579
5207
|
FocusScope,
|
|
6580
5208
|
{
|
|
6581
5209
|
asChild: true,
|
|
@@ -6585,7 +5213,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6585
5213
|
contentRef.current?.focus({ preventScroll: true });
|
|
6586
5214
|
}),
|
|
6587
5215
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
6588
|
-
children: /* @__PURE__ */
|
|
5216
|
+
children: /* @__PURE__ */ jsx(
|
|
6589
5217
|
DismissableLayer,
|
|
6590
5218
|
{
|
|
6591
5219
|
asChild: true,
|
|
@@ -6595,7 +5223,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6595
5223
|
onFocusOutside,
|
|
6596
5224
|
onInteractOutside,
|
|
6597
5225
|
onDismiss,
|
|
6598
|
-
children: /* @__PURE__ */
|
|
5226
|
+
children: /* @__PURE__ */ jsx(
|
|
6599
5227
|
Root$1,
|
|
6600
5228
|
{
|
|
6601
5229
|
asChild: true,
|
|
@@ -6609,7 +5237,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6609
5237
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
6610
5238
|
}),
|
|
6611
5239
|
preventScrollOnEntryFocus: true,
|
|
6612
|
-
children: /* @__PURE__ */
|
|
5240
|
+
children: /* @__PURE__ */ jsx(
|
|
6613
5241
|
Content,
|
|
6614
5242
|
{
|
|
6615
5243
|
role: "menu",
|
|
@@ -6674,7 +5302,7 @@ var GROUP_NAME$2 = "MenuGroup";
|
|
|
6674
5302
|
var MenuGroup = React.forwardRef(
|
|
6675
5303
|
(props, forwardedRef) => {
|
|
6676
5304
|
const { __scopeMenu, ...groupProps } = props;
|
|
6677
|
-
return /* @__PURE__ */
|
|
5305
|
+
return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
6678
5306
|
}
|
|
6679
5307
|
);
|
|
6680
5308
|
MenuGroup.displayName = GROUP_NAME$2;
|
|
@@ -6682,7 +5310,7 @@ var LABEL_NAME$2 = "MenuLabel";
|
|
|
6682
5310
|
var MenuLabel = React.forwardRef(
|
|
6683
5311
|
(props, forwardedRef) => {
|
|
6684
5312
|
const { __scopeMenu, ...labelProps } = props;
|
|
6685
|
-
return /* @__PURE__ */
|
|
5313
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
6686
5314
|
}
|
|
6687
5315
|
);
|
|
6688
5316
|
MenuLabel.displayName = LABEL_NAME$2;
|
|
@@ -6709,7 +5337,7 @@ var MenuItem = React.forwardRef(
|
|
|
6709
5337
|
}
|
|
6710
5338
|
}
|
|
6711
5339
|
};
|
|
6712
|
-
return /* @__PURE__ */
|
|
5340
|
+
return /* @__PURE__ */ jsx(
|
|
6713
5341
|
MenuItemImpl,
|
|
6714
5342
|
{
|
|
6715
5343
|
...itemProps,
|
|
@@ -6751,13 +5379,13 @@ var MenuItemImpl = React.forwardRef(
|
|
|
6751
5379
|
setTextContent((menuItem.textContent ?? "").trim());
|
|
6752
5380
|
}
|
|
6753
5381
|
}, [itemProps.children]);
|
|
6754
|
-
return /* @__PURE__ */
|
|
5382
|
+
return /* @__PURE__ */ jsx(
|
|
6755
5383
|
Collection$1.ItemSlot,
|
|
6756
5384
|
{
|
|
6757
5385
|
scope: __scopeMenu,
|
|
6758
5386
|
disabled,
|
|
6759
5387
|
textValue: textValue ?? textContent,
|
|
6760
|
-
children: /* @__PURE__ */
|
|
5388
|
+
children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
|
|
6761
5389
|
Primitive.div,
|
|
6762
5390
|
{
|
|
6763
5391
|
role: "menuitem",
|
|
@@ -6796,7 +5424,7 @@ var CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem";
|
|
|
6796
5424
|
var MenuCheckboxItem = React.forwardRef(
|
|
6797
5425
|
(props, forwardedRef) => {
|
|
6798
5426
|
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
6799
|
-
return /* @__PURE__ */
|
|
5427
|
+
return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(
|
|
6800
5428
|
MenuItem,
|
|
6801
5429
|
{
|
|
6802
5430
|
role: "menuitemcheckbox",
|
|
@@ -6824,7 +5452,7 @@ var MenuRadioGroup = React.forwardRef(
|
|
|
6824
5452
|
(props, forwardedRef) => {
|
|
6825
5453
|
const { value, onValueChange, ...groupProps } = props;
|
|
6826
5454
|
const handleValueChange = useCallbackRef$1(onValueChange);
|
|
6827
|
-
return /* @__PURE__ */
|
|
5455
|
+
return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
6828
5456
|
}
|
|
6829
5457
|
);
|
|
6830
5458
|
MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
@@ -6834,7 +5462,7 @@ var MenuRadioItem = React.forwardRef(
|
|
|
6834
5462
|
const { value, ...radioItemProps } = props;
|
|
6835
5463
|
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
6836
5464
|
const checked = value === context.value;
|
|
6837
|
-
return /* @__PURE__ */
|
|
5465
|
+
return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(
|
|
6838
5466
|
MenuItem,
|
|
6839
5467
|
{
|
|
6840
5468
|
role: "menuitemradio",
|
|
@@ -6861,11 +5489,11 @@ var MenuItemIndicator = React.forwardRef(
|
|
|
6861
5489
|
(props, forwardedRef) => {
|
|
6862
5490
|
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
6863
5491
|
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME$1, __scopeMenu);
|
|
6864
|
-
return /* @__PURE__ */
|
|
5492
|
+
return /* @__PURE__ */ jsx(
|
|
6865
5493
|
Presence,
|
|
6866
5494
|
{
|
|
6867
5495
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
6868
|
-
children: /* @__PURE__ */
|
|
5496
|
+
children: /* @__PURE__ */ jsx(
|
|
6869
5497
|
Primitive.span,
|
|
6870
5498
|
{
|
|
6871
5499
|
...itemIndicatorProps,
|
|
@@ -6882,7 +5510,7 @@ var SEPARATOR_NAME$2 = "MenuSeparator";
|
|
|
6882
5510
|
var MenuSeparator = React.forwardRef(
|
|
6883
5511
|
(props, forwardedRef) => {
|
|
6884
5512
|
const { __scopeMenu, ...separatorProps } = props;
|
|
6885
|
-
return /* @__PURE__ */
|
|
5513
|
+
return /* @__PURE__ */ jsx(
|
|
6886
5514
|
Primitive.div,
|
|
6887
5515
|
{
|
|
6888
5516
|
role: "separator",
|
|
@@ -6899,7 +5527,7 @@ var MenuArrow = React.forwardRef(
|
|
|
6899
5527
|
(props, forwardedRef) => {
|
|
6900
5528
|
const { __scopeMenu, ...arrowProps } = props;
|
|
6901
5529
|
const popperScope = usePopperScope$2(__scopeMenu);
|
|
6902
|
-
return /* @__PURE__ */
|
|
5530
|
+
return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
6903
5531
|
}
|
|
6904
5532
|
);
|
|
6905
5533
|
MenuArrow.displayName = ARROW_NAME$3;
|
|
@@ -6927,7 +5555,7 @@ var MenuSubTrigger = React.forwardRef(
|
|
|
6927
5555
|
onPointerGraceIntentChange(null);
|
|
6928
5556
|
};
|
|
6929
5557
|
}, [pointerGraceTimerRef, onPointerGraceIntentChange]);
|
|
6930
|
-
return /* @__PURE__ */
|
|
5558
|
+
return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(
|
|
6931
5559
|
MenuItemImpl,
|
|
6932
5560
|
{
|
|
6933
5561
|
id: subContext.triggerId,
|
|
@@ -7016,7 +5644,7 @@ var MenuSubContent = React.forwardRef(
|
|
|
7016
5644
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
7017
5645
|
const ref = React.useRef(null);
|
|
7018
5646
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
7019
|
-
return /* @__PURE__ */
|
|
5647
|
+
return /* @__PURE__ */ jsx(Collection$1.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Collection$1.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ jsx(
|
|
7020
5648
|
MenuContentImpl,
|
|
7021
5649
|
{
|
|
7022
5650
|
id: subContext.contentId,
|
|
@@ -7150,7 +5778,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
7150
5778
|
onChange: onOpenChange,
|
|
7151
5779
|
caller: DROPDOWN_MENU_NAME
|
|
7152
5780
|
});
|
|
7153
|
-
return /* @__PURE__ */
|
|
5781
|
+
return /* @__PURE__ */ jsx(
|
|
7154
5782
|
DropdownMenuProvider,
|
|
7155
5783
|
{
|
|
7156
5784
|
scope: __scopeDropdownMenu,
|
|
@@ -7161,7 +5789,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
7161
5789
|
onOpenChange: setOpen,
|
|
7162
5790
|
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
7163
5791
|
modal,
|
|
7164
|
-
children: /* @__PURE__ */
|
|
5792
|
+
children: /* @__PURE__ */ jsx(Root3$1, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
|
|
7165
5793
|
}
|
|
7166
5794
|
);
|
|
7167
5795
|
};
|
|
@@ -7172,7 +5800,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
|
|
|
7172
5800
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
7173
5801
|
const context = useDropdownMenuContext(TRIGGER_NAME$2, __scopeDropdownMenu);
|
|
7174
5802
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7175
|
-
return /* @__PURE__ */
|
|
5803
|
+
return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
|
|
7176
5804
|
Primitive.button,
|
|
7177
5805
|
{
|
|
7178
5806
|
type: "button",
|
|
@@ -7206,7 +5834,7 @@ var PORTAL_NAME$2 = "DropdownMenuPortal";
|
|
|
7206
5834
|
var DropdownMenuPortal = (props) => {
|
|
7207
5835
|
const { __scopeDropdownMenu, ...portalProps } = props;
|
|
7208
5836
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7209
|
-
return /* @__PURE__ */
|
|
5837
|
+
return /* @__PURE__ */ jsx(Portal$2, { ...menuScope, ...portalProps });
|
|
7210
5838
|
};
|
|
7211
5839
|
DropdownMenuPortal.displayName = PORTAL_NAME$2;
|
|
7212
5840
|
var CONTENT_NAME$2 = "DropdownMenuContent";
|
|
@@ -7216,7 +5844,7 @@ var DropdownMenuContent$1 = React.forwardRef(
|
|
|
7216
5844
|
const context = useDropdownMenuContext(CONTENT_NAME$2, __scopeDropdownMenu);
|
|
7217
5845
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7218
5846
|
const hasInteractedOutsideRef = React.useRef(false);
|
|
7219
|
-
return /* @__PURE__ */
|
|
5847
|
+
return /* @__PURE__ */ jsx(
|
|
7220
5848
|
Content2$3,
|
|
7221
5849
|
{
|
|
7222
5850
|
id: context.contentId,
|
|
@@ -7256,7 +5884,7 @@ var DropdownMenuGroup = React.forwardRef(
|
|
|
7256
5884
|
(props, forwardedRef) => {
|
|
7257
5885
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
7258
5886
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7259
|
-
return /* @__PURE__ */
|
|
5887
|
+
return /* @__PURE__ */ jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
7260
5888
|
}
|
|
7261
5889
|
);
|
|
7262
5890
|
DropdownMenuGroup.displayName = GROUP_NAME$1;
|
|
@@ -7265,7 +5893,7 @@ var DropdownMenuLabel = React.forwardRef(
|
|
|
7265
5893
|
(props, forwardedRef) => {
|
|
7266
5894
|
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
7267
5895
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7268
|
-
return /* @__PURE__ */
|
|
5896
|
+
return /* @__PURE__ */ jsx(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
|
|
7269
5897
|
}
|
|
7270
5898
|
);
|
|
7271
5899
|
DropdownMenuLabel.displayName = LABEL_NAME$1;
|
|
@@ -7274,7 +5902,7 @@ var DropdownMenuItem$1 = React.forwardRef(
|
|
|
7274
5902
|
(props, forwardedRef) => {
|
|
7275
5903
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
7276
5904
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7277
|
-
return /* @__PURE__ */
|
|
5905
|
+
return /* @__PURE__ */ jsx(Item2$1, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
7278
5906
|
}
|
|
7279
5907
|
);
|
|
7280
5908
|
DropdownMenuItem$1.displayName = ITEM_NAME$1;
|
|
@@ -7282,43 +5910,43 @@ var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
|
7282
5910
|
var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {
|
|
7283
5911
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
7284
5912
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7285
|
-
return /* @__PURE__ */
|
|
5913
|
+
return /* @__PURE__ */ jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
7286
5914
|
});
|
|
7287
5915
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
7288
5916
|
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
7289
5917
|
var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {
|
|
7290
5918
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
7291
5919
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7292
|
-
return /* @__PURE__ */
|
|
5920
|
+
return /* @__PURE__ */ jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
7293
5921
|
});
|
|
7294
5922
|
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
7295
5923
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
7296
5924
|
var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {
|
|
7297
5925
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
7298
5926
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7299
|
-
return /* @__PURE__ */
|
|
5927
|
+
return /* @__PURE__ */ jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
7300
5928
|
});
|
|
7301
5929
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
7302
5930
|
var INDICATOR_NAME$1 = "DropdownMenuItemIndicator";
|
|
7303
5931
|
var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {
|
|
7304
5932
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
7305
5933
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7306
|
-
return /* @__PURE__ */
|
|
5934
|
+
return /* @__PURE__ */ jsx(ItemIndicator$1, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
7307
5935
|
});
|
|
7308
5936
|
DropdownMenuItemIndicator.displayName = INDICATOR_NAME$1;
|
|
7309
5937
|
var SEPARATOR_NAME$1 = "DropdownMenuSeparator";
|
|
7310
|
-
var DropdownMenuSeparator = React.forwardRef((props, forwardedRef) => {
|
|
5938
|
+
var DropdownMenuSeparator$1 = React.forwardRef((props, forwardedRef) => {
|
|
7311
5939
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
7312
5940
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7313
|
-
return /* @__PURE__ */
|
|
5941
|
+
return /* @__PURE__ */ jsx(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
7314
5942
|
});
|
|
7315
|
-
DropdownMenuSeparator.displayName = SEPARATOR_NAME$1;
|
|
5943
|
+
DropdownMenuSeparator$1.displayName = SEPARATOR_NAME$1;
|
|
7316
5944
|
var ARROW_NAME$2 = "DropdownMenuArrow";
|
|
7317
5945
|
var DropdownMenuArrow = React.forwardRef(
|
|
7318
5946
|
(props, forwardedRef) => {
|
|
7319
5947
|
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
7320
5948
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7321
|
-
return /* @__PURE__ */
|
|
5949
|
+
return /* @__PURE__ */ jsx(Arrow2$1, { ...menuScope, ...arrowProps, ref: forwardedRef });
|
|
7322
5950
|
}
|
|
7323
5951
|
);
|
|
7324
5952
|
DropdownMenuArrow.displayName = ARROW_NAME$2;
|
|
@@ -7326,14 +5954,14 @@ var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
|
7326
5954
|
var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {
|
|
7327
5955
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
7328
5956
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7329
|
-
return /* @__PURE__ */
|
|
5957
|
+
return /* @__PURE__ */ jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
7330
5958
|
});
|
|
7331
5959
|
DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
7332
5960
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
7333
5961
|
var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {
|
|
7334
5962
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
7335
5963
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7336
|
-
return /* @__PURE__ */
|
|
5964
|
+
return /* @__PURE__ */ jsx(
|
|
7337
5965
|
SubContent,
|
|
7338
5966
|
{
|
|
7339
5967
|
...menuScope,
|
|
@@ -7359,6 +5987,7 @@ var Trigger$2 = DropdownMenuTrigger$1;
|
|
|
7359
5987
|
var Portal2 = DropdownMenuPortal;
|
|
7360
5988
|
var Content2$2 = DropdownMenuContent$1;
|
|
7361
5989
|
var Item2 = DropdownMenuItem$1;
|
|
5990
|
+
var Separator2 = DropdownMenuSeparator$1;
|
|
7362
5991
|
|
|
7363
5992
|
// packages/core/number/src/number.ts
|
|
7364
5993
|
function clamp(value, [min, max]) {
|
|
@@ -7387,7 +6016,7 @@ var Progress$1 = React.forwardRef(
|
|
|
7387
6016
|
}
|
|
7388
6017
|
const value = isValidValueNumber(valueProp, max) ? valueProp : null;
|
|
7389
6018
|
const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
7390
|
-
return /* @__PURE__ */
|
|
6019
|
+
return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(
|
|
7391
6020
|
Primitive.div,
|
|
7392
6021
|
{
|
|
7393
6022
|
"aria-valuemax": max,
|
|
@@ -7410,7 +6039,7 @@ var ProgressIndicator = React.forwardRef(
|
|
|
7410
6039
|
(props, forwardedRef) => {
|
|
7411
6040
|
const { __scopeProgress, ...indicatorProps } = props;
|
|
7412
6041
|
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
7413
|
-
return /* @__PURE__ */
|
|
6042
|
+
return /* @__PURE__ */ jsx(
|
|
7414
6043
|
Primitive.div,
|
|
7415
6044
|
{
|
|
7416
6045
|
"data-state": getProgressState(context.value, context.max),
|
|
@@ -7501,7 +6130,7 @@ var Select$1 = (props) => {
|
|
|
7501
6130
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
7502
6131
|
const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set());
|
|
7503
6132
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
7504
|
-
return /* @__PURE__ */
|
|
6133
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsxs(
|
|
7505
6134
|
SelectProvider,
|
|
7506
6135
|
{
|
|
7507
6136
|
required,
|
|
@@ -7521,7 +6150,7 @@ var Select$1 = (props) => {
|
|
|
7521
6150
|
triggerPointerDownPosRef,
|
|
7522
6151
|
disabled,
|
|
7523
6152
|
children: [
|
|
7524
|
-
/* @__PURE__ */
|
|
6153
|
+
/* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
7525
6154
|
SelectNativeOptionsProvider,
|
|
7526
6155
|
{
|
|
7527
6156
|
scope: props.__scopeSelect,
|
|
@@ -7538,7 +6167,7 @@ var Select$1 = (props) => {
|
|
|
7538
6167
|
children
|
|
7539
6168
|
}
|
|
7540
6169
|
) }),
|
|
7541
|
-
isFormControl ? /* @__PURE__ */
|
|
6170
|
+
isFormControl ? /* @__PURE__ */ jsxs(
|
|
7542
6171
|
SelectBubbleInput,
|
|
7543
6172
|
{
|
|
7544
6173
|
"aria-hidden": true,
|
|
@@ -7551,7 +6180,7 @@ var Select$1 = (props) => {
|
|
|
7551
6180
|
disabled,
|
|
7552
6181
|
form,
|
|
7553
6182
|
children: [
|
|
7554
|
-
value === void 0 ? /* @__PURE__ */
|
|
6183
|
+
value === void 0 ? /* @__PURE__ */ jsx("option", { value: "" }) : null,
|
|
7555
6184
|
Array.from(nativeOptionsSet)
|
|
7556
6185
|
]
|
|
7557
6186
|
},
|
|
@@ -7592,7 +6221,7 @@ var SelectTrigger$1 = React.forwardRef(
|
|
|
7592
6221
|
};
|
|
7593
6222
|
}
|
|
7594
6223
|
};
|
|
7595
|
-
return /* @__PURE__ */
|
|
6224
|
+
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
7596
6225
|
Primitive.button,
|
|
7597
6226
|
{
|
|
7598
6227
|
type: "button",
|
|
@@ -7651,13 +6280,13 @@ var SelectValue$1 = React.forwardRef(
|
|
|
7651
6280
|
useLayoutEffect2(() => {
|
|
7652
6281
|
onValueNodeHasChildrenChange(hasChildren);
|
|
7653
6282
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
7654
|
-
return /* @__PURE__ */
|
|
6283
|
+
return /* @__PURE__ */ jsx(
|
|
7655
6284
|
Primitive.span,
|
|
7656
6285
|
{
|
|
7657
6286
|
...valueProps,
|
|
7658
6287
|
ref: composedRefs,
|
|
7659
6288
|
style: { pointerEvents: "none" },
|
|
7660
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
6289
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx(Fragment, { children: placeholder }) : children
|
|
7661
6290
|
}
|
|
7662
6291
|
);
|
|
7663
6292
|
}
|
|
@@ -7667,13 +6296,13 @@ var ICON_NAME = "SelectIcon";
|
|
|
7667
6296
|
var SelectIcon = React.forwardRef(
|
|
7668
6297
|
(props, forwardedRef) => {
|
|
7669
6298
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
7670
|
-
return /* @__PURE__ */
|
|
6299
|
+
return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
7671
6300
|
}
|
|
7672
6301
|
);
|
|
7673
6302
|
SelectIcon.displayName = ICON_NAME;
|
|
7674
6303
|
var PORTAL_NAME$1 = "SelectPortal";
|
|
7675
6304
|
var SelectPortal = (props) => {
|
|
7676
|
-
return /* @__PURE__ */
|
|
6305
|
+
return /* @__PURE__ */ jsx(Portal$3, { asChild: true, ...props });
|
|
7677
6306
|
};
|
|
7678
6307
|
SelectPortal.displayName = PORTAL_NAME$1;
|
|
7679
6308
|
var CONTENT_NAME$1 = "SelectContent";
|
|
@@ -7687,11 +6316,11 @@ var SelectContent$1 = React.forwardRef(
|
|
|
7687
6316
|
if (!context.open) {
|
|
7688
6317
|
const frag = fragment;
|
|
7689
6318
|
return frag ? ReactDOM.createPortal(
|
|
7690
|
-
/* @__PURE__ */
|
|
6319
|
+
/* @__PURE__ */ jsx(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx("div", { children: props.children }) }) }),
|
|
7691
6320
|
frag
|
|
7692
6321
|
) : null;
|
|
7693
6322
|
}
|
|
7694
|
-
return /* @__PURE__ */
|
|
6323
|
+
return /* @__PURE__ */ jsx(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
7695
6324
|
}
|
|
7696
6325
|
);
|
|
7697
6326
|
SelectContent$1.displayName = CONTENT_NAME$1;
|
|
@@ -7845,7 +6474,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7845
6474
|
hideWhenDetached,
|
|
7846
6475
|
avoidCollisions
|
|
7847
6476
|
} : {};
|
|
7848
|
-
return /* @__PURE__ */
|
|
6477
|
+
return /* @__PURE__ */ jsx(
|
|
7849
6478
|
SelectContentProvider,
|
|
7850
6479
|
{
|
|
7851
6480
|
scope: __scopeSelect,
|
|
@@ -7861,7 +6490,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7861
6490
|
position,
|
|
7862
6491
|
isPositioned,
|
|
7863
6492
|
searchRef,
|
|
7864
|
-
children: /* @__PURE__ */
|
|
6493
|
+
children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
7865
6494
|
FocusScope,
|
|
7866
6495
|
{
|
|
7867
6496
|
asChild: true,
|
|
@@ -7873,7 +6502,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7873
6502
|
context.trigger?.focus({ preventScroll: true });
|
|
7874
6503
|
event.preventDefault();
|
|
7875
6504
|
}),
|
|
7876
|
-
children: /* @__PURE__ */
|
|
6505
|
+
children: /* @__PURE__ */ jsx(
|
|
7877
6506
|
DismissableLayer,
|
|
7878
6507
|
{
|
|
7879
6508
|
asChild: true,
|
|
@@ -7882,7 +6511,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
7882
6511
|
onPointerDownOutside,
|
|
7883
6512
|
onFocusOutside: (event) => event.preventDefault(),
|
|
7884
6513
|
onDismiss: () => context.onOpenChange(false),
|
|
7885
|
-
children: /* @__PURE__ */
|
|
6514
|
+
children: /* @__PURE__ */ jsx(
|
|
7886
6515
|
SelectPosition,
|
|
7887
6516
|
{
|
|
7888
6517
|
role: "listbox",
|
|
@@ -8058,14 +6687,14 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
8058
6687
|
},
|
|
8059
6688
|
[position, focusSelectedItem]
|
|
8060
6689
|
);
|
|
8061
|
-
return /* @__PURE__ */
|
|
6690
|
+
return /* @__PURE__ */ jsx(
|
|
8062
6691
|
SelectViewportProvider,
|
|
8063
6692
|
{
|
|
8064
6693
|
scope: __scopeSelect,
|
|
8065
6694
|
contentWrapper,
|
|
8066
6695
|
shouldExpandOnScrollRef,
|
|
8067
6696
|
onScrollButtonChange: handleScrollButtonChange,
|
|
8068
|
-
children: /* @__PURE__ */
|
|
6697
|
+
children: /* @__PURE__ */ jsx(
|
|
8069
6698
|
"div",
|
|
8070
6699
|
{
|
|
8071
6700
|
ref: setContentWrapper,
|
|
@@ -8075,7 +6704,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
8075
6704
|
position: "fixed",
|
|
8076
6705
|
zIndex: contentZIndex
|
|
8077
6706
|
},
|
|
8078
|
-
children: /* @__PURE__ */
|
|
6707
|
+
children: /* @__PURE__ */ jsx(
|
|
8079
6708
|
Primitive.div,
|
|
8080
6709
|
{
|
|
8081
6710
|
...popperProps,
|
|
@@ -8105,7 +6734,7 @@ var SelectPopperPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
8105
6734
|
...popperProps
|
|
8106
6735
|
} = props;
|
|
8107
6736
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
8108
|
-
return /* @__PURE__ */
|
|
6737
|
+
return /* @__PURE__ */ jsx(
|
|
8109
6738
|
Content,
|
|
8110
6739
|
{
|
|
8111
6740
|
...popperScope,
|
|
@@ -8139,8 +6768,8 @@ var SelectViewport = React.forwardRef(
|
|
|
8139
6768
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
8140
6769
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
8141
6770
|
const prevScrollTopRef = React.useRef(0);
|
|
8142
|
-
return /* @__PURE__ */
|
|
8143
|
-
/* @__PURE__ */
|
|
6771
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6772
|
+
/* @__PURE__ */ jsx(
|
|
8144
6773
|
"style",
|
|
8145
6774
|
{
|
|
8146
6775
|
dangerouslySetInnerHTML: {
|
|
@@ -8149,7 +6778,7 @@ var SelectViewport = React.forwardRef(
|
|
|
8149
6778
|
nonce
|
|
8150
6779
|
}
|
|
8151
6780
|
),
|
|
8152
|
-
/* @__PURE__ */
|
|
6781
|
+
/* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
8153
6782
|
Primitive.div,
|
|
8154
6783
|
{
|
|
8155
6784
|
"data-radix-select-viewport": "",
|
|
@@ -8205,7 +6834,7 @@ var SelectGroup = React.forwardRef(
|
|
|
8205
6834
|
(props, forwardedRef) => {
|
|
8206
6835
|
const { __scopeSelect, ...groupProps } = props;
|
|
8207
6836
|
const groupId = useId();
|
|
8208
|
-
return /* @__PURE__ */
|
|
6837
|
+
return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
8209
6838
|
}
|
|
8210
6839
|
);
|
|
8211
6840
|
SelectGroup.displayName = GROUP_NAME;
|
|
@@ -8214,7 +6843,7 @@ var SelectLabel = React.forwardRef(
|
|
|
8214
6843
|
(props, forwardedRef) => {
|
|
8215
6844
|
const { __scopeSelect, ...labelProps } = props;
|
|
8216
6845
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
8217
|
-
return /* @__PURE__ */
|
|
6846
|
+
return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
8218
6847
|
}
|
|
8219
6848
|
);
|
|
8220
6849
|
SelectLabel.displayName = LABEL_NAME;
|
|
@@ -8251,7 +6880,7 @@ var SelectItem$1 = React.forwardRef(
|
|
|
8251
6880
|
"A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
|
|
8252
6881
|
);
|
|
8253
6882
|
}
|
|
8254
|
-
return /* @__PURE__ */
|
|
6883
|
+
return /* @__PURE__ */ jsx(
|
|
8255
6884
|
SelectItemContextProvider,
|
|
8256
6885
|
{
|
|
8257
6886
|
scope: __scopeSelect,
|
|
@@ -8262,14 +6891,14 @@ var SelectItem$1 = React.forwardRef(
|
|
|
8262
6891
|
onItemTextChange: React.useCallback((node) => {
|
|
8263
6892
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
8264
6893
|
}, []),
|
|
8265
|
-
children: /* @__PURE__ */
|
|
6894
|
+
children: /* @__PURE__ */ jsx(
|
|
8266
6895
|
Collection.ItemSlot,
|
|
8267
6896
|
{
|
|
8268
6897
|
scope: __scopeSelect,
|
|
8269
6898
|
value,
|
|
8270
6899
|
disabled,
|
|
8271
6900
|
textValue,
|
|
8272
|
-
children: /* @__PURE__ */
|
|
6901
|
+
children: /* @__PURE__ */ jsx(
|
|
8273
6902
|
Primitive.div,
|
|
8274
6903
|
{
|
|
8275
6904
|
role: "option",
|
|
@@ -8338,7 +6967,7 @@ var SelectItemText = React.forwardRef(
|
|
|
8338
6967
|
);
|
|
8339
6968
|
const textContent = itemTextNode?.textContent;
|
|
8340
6969
|
const nativeOption = React.useMemo(
|
|
8341
|
-
() => /* @__PURE__ */
|
|
6970
|
+
() => /* @__PURE__ */ jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
8342
6971
|
[itemContext.disabled, itemContext.value, textContent]
|
|
8343
6972
|
);
|
|
8344
6973
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
@@ -8346,8 +6975,8 @@ var SelectItemText = React.forwardRef(
|
|
|
8346
6975
|
onNativeOptionAdd(nativeOption);
|
|
8347
6976
|
return () => onNativeOptionRemove(nativeOption);
|
|
8348
6977
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
8349
|
-
return /* @__PURE__ */
|
|
8350
|
-
/* @__PURE__ */
|
|
6978
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6979
|
+
/* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
8351
6980
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
|
|
8352
6981
|
] });
|
|
8353
6982
|
}
|
|
@@ -8358,7 +6987,7 @@ var SelectItemIndicator = React.forwardRef(
|
|
|
8358
6987
|
(props, forwardedRef) => {
|
|
8359
6988
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
8360
6989
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
8361
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
6990
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
8362
6991
|
}
|
|
8363
6992
|
);
|
|
8364
6993
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
@@ -8380,7 +7009,7 @@ var SelectScrollUpButton$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
8380
7009
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
8381
7010
|
}
|
|
8382
7011
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
8383
|
-
return canScrollUp ? /* @__PURE__ */
|
|
7012
|
+
return canScrollUp ? /* @__PURE__ */ jsx(
|
|
8384
7013
|
SelectScrollButtonImpl,
|
|
8385
7014
|
{
|
|
8386
7015
|
...props,
|
|
@@ -8414,7 +7043,7 @@ var SelectScrollDownButton$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
8414
7043
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
8415
7044
|
}
|
|
8416
7045
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
8417
|
-
return canScrollDown ? /* @__PURE__ */
|
|
7046
|
+
return canScrollDown ? /* @__PURE__ */ jsx(
|
|
8418
7047
|
SelectScrollButtonImpl,
|
|
8419
7048
|
{
|
|
8420
7049
|
...props,
|
|
@@ -8447,7 +7076,7 @@ var SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
8447
7076
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
8448
7077
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
8449
7078
|
}, [getItems]);
|
|
8450
|
-
return /* @__PURE__ */
|
|
7079
|
+
return /* @__PURE__ */ jsx(
|
|
8451
7080
|
Primitive.div,
|
|
8452
7081
|
{
|
|
8453
7082
|
"aria-hidden": true,
|
|
@@ -8475,7 +7104,7 @@ var SEPARATOR_NAME = "SelectSeparator";
|
|
|
8475
7104
|
var SelectSeparator = React.forwardRef(
|
|
8476
7105
|
(props, forwardedRef) => {
|
|
8477
7106
|
const { __scopeSelect, ...separatorProps } = props;
|
|
8478
|
-
return /* @__PURE__ */
|
|
7107
|
+
return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
8479
7108
|
}
|
|
8480
7109
|
);
|
|
8481
7110
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
@@ -8486,7 +7115,7 @@ var SelectArrow = React.forwardRef(
|
|
|
8486
7115
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
8487
7116
|
const context = useSelectContext(ARROW_NAME$1, __scopeSelect);
|
|
8488
7117
|
const contentContext = useSelectContentContext(ARROW_NAME$1, __scopeSelect);
|
|
8489
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
7118
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
8490
7119
|
}
|
|
8491
7120
|
);
|
|
8492
7121
|
SelectArrow.displayName = ARROW_NAME$1;
|
|
@@ -8511,7 +7140,7 @@ var SelectBubbleInput = React.forwardRef(
|
|
|
8511
7140
|
select.dispatchEvent(event);
|
|
8512
7141
|
}
|
|
8513
7142
|
}, [prevValue, value]);
|
|
8514
|
-
return /* @__PURE__ */
|
|
7143
|
+
return /* @__PURE__ */ jsx(
|
|
8515
7144
|
Primitive.select,
|
|
8516
7145
|
{
|
|
8517
7146
|
...props,
|
|
@@ -8602,7 +7231,7 @@ var TooltipProvider$1 = (props) => {
|
|
|
8602
7231
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
8603
7232
|
return () => window.clearTimeout(skipDelayTimer);
|
|
8604
7233
|
}, []);
|
|
8605
|
-
return /* @__PURE__ */
|
|
7234
|
+
return /* @__PURE__ */ jsx(
|
|
8606
7235
|
TooltipProviderContextProvider,
|
|
8607
7236
|
{
|
|
8608
7237
|
scope: __scopeTooltip,
|
|
@@ -8693,7 +7322,7 @@ var Tooltip$1 = (props) => {
|
|
|
8693
7322
|
}
|
|
8694
7323
|
};
|
|
8695
7324
|
}, []);
|
|
8696
|
-
return /* @__PURE__ */
|
|
7325
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
8697
7326
|
TooltipContextProvider,
|
|
8698
7327
|
{
|
|
8699
7328
|
scope: __scopeTooltip,
|
|
@@ -8737,7 +7366,7 @@ var TooltipTrigger$1 = React.forwardRef(
|
|
|
8737
7366
|
React.useEffect(() => {
|
|
8738
7367
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
8739
7368
|
}, [handlePointerUp]);
|
|
8740
|
-
return /* @__PURE__ */
|
|
7369
|
+
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
8741
7370
|
Primitive.button,
|
|
8742
7371
|
{
|
|
8743
7372
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
@@ -8779,7 +7408,7 @@ var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {
|
|
|
8779
7408
|
var TooltipPortal = (props) => {
|
|
8780
7409
|
const { __scopeTooltip, forceMount, children, container } = props;
|
|
8781
7410
|
const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);
|
|
8782
|
-
return /* @__PURE__ */
|
|
7411
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$3, { asChild: true, container, children }) }) });
|
|
8783
7412
|
};
|
|
8784
7413
|
TooltipPortal.displayName = PORTAL_NAME;
|
|
8785
7414
|
var CONTENT_NAME = "TooltipContent";
|
|
@@ -8788,7 +7417,7 @@ var TooltipContent$1 = React.forwardRef(
|
|
|
8788
7417
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);
|
|
8789
7418
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
8790
7419
|
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
|
8791
|
-
return /* @__PURE__ */
|
|
7420
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
|
8792
7421
|
}
|
|
8793
7422
|
);
|
|
8794
7423
|
var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
@@ -8850,7 +7479,7 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
8850
7479
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
8851
7480
|
}
|
|
8852
7481
|
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
8853
|
-
return /* @__PURE__ */
|
|
7482
|
+
return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
8854
7483
|
});
|
|
8855
7484
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
8856
7485
|
var Slottable = createSlottable("TooltipContent");
|
|
@@ -8881,7 +7510,7 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
8881
7510
|
return () => window.removeEventListener("scroll", handleScroll, { capture: true });
|
|
8882
7511
|
}
|
|
8883
7512
|
}, [context.trigger, onClose]);
|
|
8884
|
-
return /* @__PURE__ */
|
|
7513
|
+
return /* @__PURE__ */ jsx(
|
|
8885
7514
|
DismissableLayer,
|
|
8886
7515
|
{
|
|
8887
7516
|
asChild: true,
|
|
@@ -8890,7 +7519,7 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
8890
7519
|
onPointerDownOutside,
|
|
8891
7520
|
onFocusOutside: (event) => event.preventDefault(),
|
|
8892
7521
|
onDismiss: onClose,
|
|
8893
|
-
children: /* @__PURE__ */
|
|
7522
|
+
children: /* @__PURE__ */ jsxs(
|
|
8894
7523
|
Content,
|
|
8895
7524
|
{
|
|
8896
7525
|
"data-state": context.stateAttribute,
|
|
@@ -8909,8 +7538,8 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
8909
7538
|
}
|
|
8910
7539
|
},
|
|
8911
7540
|
children: [
|
|
8912
|
-
/* @__PURE__ */
|
|
8913
|
-
/* @__PURE__ */
|
|
7541
|
+
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
7542
|
+
/* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(Root$3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
8914
7543
|
]
|
|
8915
7544
|
}
|
|
8916
7545
|
)
|
|
@@ -8928,7 +7557,7 @@ var TooltipArrow = React.forwardRef(
|
|
|
8928
7557
|
ARROW_NAME,
|
|
8929
7558
|
__scopeTooltip
|
|
8930
7559
|
);
|
|
8931
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */
|
|
7560
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
8932
7561
|
}
|
|
8933
7562
|
);
|
|
8934
7563
|
TooltipArrow.displayName = ARROW_NAME;
|
|
@@ -9084,24 +7713,27 @@ const buttonVariants = cva("focus-visible:border-ring focus-visible:ring-ring/50
|
|
|
9084
7713
|
});
|
|
9085
7714
|
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
9086
7715
|
const Comp = asChild ? Slot$2 : "button";
|
|
9087
|
-
return (
|
|
7716
|
+
return (jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
9088
7717
|
}
|
|
9089
7718
|
|
|
9090
7719
|
function Input({ className, type, ...props }) {
|
|
9091
|
-
return (
|
|
7720
|
+
return (jsx("input", { type: type, "data-slot": "input", className: cn("dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 disabled:bg-input/50 dark:disabled:bg-input/80 h-8 rounded-lg border bg-transparent px-2.5 py-1 text-base transition-colors file:h-6 file:text-sm file:font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", className), ...props }));
|
|
9092
7721
|
}
|
|
9093
7722
|
|
|
9094
7723
|
function DropdownMenu({ ...props }) {
|
|
9095
|
-
return
|
|
7724
|
+
return jsx(Root2$1, { "data-slot": "dropdown-menu", ...props });
|
|
9096
7725
|
}
|
|
9097
7726
|
function DropdownMenuTrigger({ ...props }) {
|
|
9098
|
-
return (
|
|
7727
|
+
return (jsx(Trigger$2, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
9099
7728
|
}
|
|
9100
7729
|
function DropdownMenuContent({ className, align = "start", sideOffset = 4, ...props }) {
|
|
9101
|
-
return (
|
|
7730
|
+
return (jsx(Portal2, { children: jsx(Content2$2, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, align: align, className: className, ...props }) }));
|
|
9102
7731
|
}
|
|
9103
7732
|
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
9104
|
-
return (
|
|
7733
|
+
return (jsx(Item2, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: className, ...props }));
|
|
7734
|
+
}
|
|
7735
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
7736
|
+
return (jsx(Separator2, { "data-slot": "dropdown-menu-separator", className: className, ...props }));
|
|
9105
7737
|
}
|
|
9106
7738
|
|
|
9107
7739
|
function DataTableHeader({ title, description, actions = [], search, searchValue = "", onSearchChange, table, selectedCount = 0, className, }) {
|
|
@@ -9118,22 +7750,22 @@ function DataTableHeader({ title, description, actions = [], search, searchValue
|
|
|
9118
7750
|
const renderAction = (action, index) => {
|
|
9119
7751
|
// Dropdown Action
|
|
9120
7752
|
if (action.children && action.children.length > 0) {
|
|
9121
|
-
return (
|
|
9122
|
-
"text-destructive focus:text-destructive"), children: [child.icon &&
|
|
7753
|
+
return (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: action.variant || "outline", size: action.size || "default", disabled: action.disabled || action.loading, children: [action.icon, jsx("span", { className: cn(action.icon ? "ml-2" : ""), children: action.label }), jsx(ChevronDown, { className: "ml-2 h-4 w-4" })] }) }), jsx(DropdownMenuContent, { align: "end", children: action.children.map((child, childIndex) => (jsxs(DropdownMenuItem, { onClick: child.onClick, className: cn(child.variant === "destructive" &&
|
|
7754
|
+
"text-destructive focus:text-destructive"), children: [child.icon && jsx("span", { className: "mr-2", children: child.icon }), child.label] }, child.id || childIndex))) })] }, action.id || index));
|
|
9123
7755
|
}
|
|
9124
7756
|
// Link Action
|
|
9125
7757
|
if (action.href) {
|
|
9126
|
-
return (
|
|
7758
|
+
return (jsx(Button, { variant: action.variant || "outline", size: action.size || "default", disabled: action.disabled || action.loading, asChild: true, children: jsxs("a", { href: action.href, children: [action.icon, action.size !== "icon" && (jsx("span", { className: cn(action.icon ? "ml-2" : ""), children: action.label }))] }) }, action.id || index));
|
|
9127
7759
|
}
|
|
9128
7760
|
// Normal Button Action
|
|
9129
|
-
return (
|
|
7761
|
+
return (jsxs(Button, { variant: action.variant || "outline", size: action.size || "default", disabled: action.disabled || action.loading, onClick: () => {
|
|
9130
7762
|
if (action.bulk && action.bulkOnClick) {
|
|
9131
7763
|
action.bulkOnClick(getSelectedRows());
|
|
9132
7764
|
}
|
|
9133
7765
|
else if (action.onClick) {
|
|
9134
7766
|
action.onClick();
|
|
9135
7767
|
}
|
|
9136
|
-
}, children: [action.loading ? (
|
|
7768
|
+
}, children: [action.loading ? (jsxs("svg", { className: "animate-spin h-4 w-4", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4", fill: "none" }), jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })] })) : (action.icon), action.size !== "icon" && (jsx("span", { className: cn(action.icon || action.loading ? "ml-2" : ""), children: action.label }))] }, action.id || index));
|
|
9137
7769
|
};
|
|
9138
7770
|
// Kein Header wenn nichts konfiguriert
|
|
9139
7771
|
if (!title &&
|
|
@@ -9142,7 +7774,7 @@ function DataTableHeader({ title, description, actions = [], search, searchValue
|
|
|
9142
7774
|
!search?.enabled) {
|
|
9143
7775
|
return null;
|
|
9144
7776
|
}
|
|
9145
|
-
return (
|
|
7777
|
+
return (jsxs("div", { className: cn("flex flex-col gap-4", className), children: [(title || description) && (jsxs("div", { className: "space-y-1", children: [title && (jsx("h2", { className: "text-xl font-semibold tracking-tight", children: title })), description && (jsx("p", { className: "text-sm text-muted-foreground", children: description }))] })), (search?.enabled || normalActions.length > 0 || showBulkActions) && (jsxs("div", { className: "flex items-center justify-between gap-4 mb-4", children: [search?.enabled && (jsxs("div", { className: "relative max-w-sm flex-1", children: [jsx(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), jsx(Input, { placeholder: search.placeholder || "Suchen...", value: searchValue, onChange: (e) => onSearchChange?.(e.target.value), className: "pl-9 pr-9" }), searchValue && (jsx("button", { onClick: () => onSearchChange?.(""), className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground", children: jsx(X, { className: "h-4 w-4" }) }))] })), jsxs("div", { className: "flex items-center gap-2", children: [showBulkActions && (jsxs("span", { className: "text-sm text-muted-foreground", children: [selectedCount, " ausgew\u00E4hlt"] })), showBulkActions &&
|
|
9146
7778
|
bulkActions.map((action, index) => renderAction(action, index)), normalActions.length > 0 &&
|
|
9147
7779
|
normalActions.map((action, index) => renderAction(action, index))] })] }))] }));
|
|
9148
7780
|
}
|
|
@@ -9150,29 +7782,29 @@ function DataTableHeader({ title, description, actions = [], search, searchValue
|
|
|
9150
7782
|
// components/ui/data-table/data-table-empty.tsx
|
|
9151
7783
|
function DataTableEmpty({ config, colSpan, className, }) {
|
|
9152
7784
|
const { icon, imageUrl, title, description, action, variant } = config;
|
|
9153
|
-
return (
|
|
7785
|
+
return (jsx("tr", { children: jsx("td", { colSpan: colSpan, className: cn("h-[400px]", className), children: jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-4 text-center p-8", children: [imageUrl ? (jsx("img", { className: "w-24 h-24", src: imageUrl, alt: "Empty State" })) : icon ? (jsx("div", { className: cn("rounded-full p-4", variant === "error" ? "bg-destructive/10" : "bg-muted"), children: icon })) : null, jsxs("div", { className: "w-full flex flex-col items-center justify-center gap-2", children: [jsx("h3", { className: "text-sm font-semibold text-foreground whitespace-normal break-words", children: title }), description && (jsx("p", { className: "text-xs text-muted-foreground font-normal whitespace-normal break-words leading-relaxed", children: description }))] }), action && (jsx(Button, { variant: variant === "error" ? "outline" : "default", onClick: action.onClick, asChild: !!action.href, className: "mt-2", children: action.href ? (jsxs("a", { href: action.href, children: [action.icon, jsx("span", { className: cn(action.icon ? "ml-2" : ""), children: action.label })] })) : (jsxs(Fragment, { children: [action.icon, jsx("span", { className: cn(action.icon ? "ml-2" : ""), children: action.label })] })) }))] }) }) }));
|
|
9154
7786
|
}
|
|
9155
7787
|
|
|
9156
7788
|
function Select({ ...props }) {
|
|
9157
|
-
return
|
|
7789
|
+
return jsx(Root2, { "data-slot": "select", ...props });
|
|
9158
7790
|
}
|
|
9159
7791
|
function SelectValue({ ...props }) {
|
|
9160
|
-
return
|
|
7792
|
+
return jsx(Value, { "data-slot": "select-value", ...props });
|
|
9161
7793
|
}
|
|
9162
7794
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
9163
|
-
return (
|
|
7795
|
+
return (jsxs(Trigger$1, { "data-slot": "select-trigger", "data-size": size, className: className, ...props, children: [children, jsx(Icon, { asChild: true, children: jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" }) })] }));
|
|
9164
7796
|
}
|
|
9165
7797
|
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
9166
|
-
return (
|
|
7798
|
+
return (jsx(Portal$1, { children: jsxs(Content2$1, { "data-slot": "select-content", "data-align-trigger": position === "item-aligned", className: className, position: position, align: align, ...props, children: [jsx(SelectScrollUpButton, {}), jsx(Viewport, { "data-position": position, className: className, children: children }), jsx(SelectScrollDownButton, {})] }) }));
|
|
9167
7799
|
}
|
|
9168
7800
|
function SelectItem({ className, children, ...props }) {
|
|
9169
|
-
return (
|
|
7801
|
+
return (jsxs(Item, { "data-slot": "select-item", className: className, ...props, children: [jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: jsx(ItemIndicator, { children: jsx(CheckIcon, { className: "pointer-events-none" }) }) }), jsx(ItemText, { children: children })] }));
|
|
9170
7802
|
}
|
|
9171
7803
|
function SelectScrollUpButton({ className, ...props }) {
|
|
9172
|
-
return (
|
|
7804
|
+
return (jsx(ScrollUpButton, { "data-slot": "select-scroll-up-button", className: className, ...props, children: jsx(ChevronUpIcon, {}) }));
|
|
9173
7805
|
}
|
|
9174
7806
|
function SelectScrollDownButton({ className, ...props }) {
|
|
9175
|
-
return (
|
|
7807
|
+
return (jsx(ScrollDownButton, { "data-slot": "select-scroll-down-button", className: className, ...props, children: jsx(ChevronDownIcon, {}) }));
|
|
9176
7808
|
}
|
|
9177
7809
|
|
|
9178
7810
|
// components/ui/data-table/data-table-pagination.tsx
|
|
@@ -9180,7 +7812,7 @@ function DataTablePagination({ table, config, className, }) {
|
|
|
9180
7812
|
if (!config?.enabled)
|
|
9181
7813
|
return null;
|
|
9182
7814
|
const { showPageInfo = true, showPageSizeSelector = true, pageSizeOptions = [10, 20, 30, 50, 100], } = config;
|
|
9183
|
-
return (
|
|
7815
|
+
return (jsxs("div", { className: cn("flex flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:justify-between", className), children: [jsx("div", { className: "text-sm text-muted-foreground", children: table.getFilteredSelectedRowModel().rows.length > 0 ? (jsxs("span", { children: [table.getFilteredSelectedRowModel().rows.length, " von", " ", table.getFilteredRowModel().rows.length, " Zeile(n) ausgew\u00E4hlt"] })) : showPageInfo ? (jsxs("span", { children: [table.getFilteredRowModel().rows.length, " Eintr\u00E4ge"] })) : null }), jsxs("div", { className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:gap-6", children: [showPageSizeSelector && (jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-sm text-muted-foreground whitespace-nowrap", children: "Zeilen pro Seite" }), jsxs(Select, { value: `${table.getState().pagination.pageSize}`, onValueChange: (value) => table.setPageSize(Number(value)), children: [jsx(SelectTrigger, { className: "h-8 w-[70px]", children: jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), jsx(SelectContent, { side: "top", children: pageSizeOptions.map((pageSize) => (jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] })), showPageInfo && (jsxs("div", { className: "text-sm text-muted-foreground whitespace-nowrap", children: ["Seite ", table.getState().pagination.pageIndex + 1, " von", " ", table.getPageCount()] })), jsxs("div", { className: "flex items-center gap-1", children: [jsxs(Button, { variant: "outline", size: "icon", className: "h-8 w-8", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: [jsx(ChevronsLeft, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: "Erste Seite" })] }), jsxs(Button, { variant: "outline", size: "icon", className: "h-8 w-8", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [jsx(ChevronLeft, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: "Vorherige Seite" })] }), jsxs(Button, { variant: "outline", size: "icon", className: "h-8 w-8", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [jsx(ChevronRight, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: "N\u00E4chste Seite" })] }), jsxs(Button, { variant: "outline", size: "icon", className: "h-8 w-8", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: [jsx(ChevronsRight, { className: "h-4 w-4" }), jsx("span", { className: "sr-only", children: "Letzte Seite" })] })] })] })] }));
|
|
9184
7816
|
}
|
|
9185
7817
|
|
|
9186
7818
|
/**
|
|
@@ -9330,24 +7962,24 @@ function DataTable({ columns, data, config = {}, className, isLoading = false, i
|
|
|
9330
7962
|
};
|
|
9331
7963
|
const selectedCount = table.getFilteredSelectedRowModel().rows.length;
|
|
9332
7964
|
const hasRows = table.getRowModel().rows?.length > 0;
|
|
9333
|
-
return (
|
|
7965
|
+
return (jsxs("div", { className: cn("flex flex-col", className), children: [jsx(DataTableHeader, { title: config.title, description: config.description, actions: config.headerActions, search: config.search, searchValue: globalFilter, onSearchChange: setGlobalFilter, table: table, selectedCount: selectedCount }), jsx("div", { className: cn("overflow-hidden", config.bordered !== false && "rounded-md border"), children: jsxs(Table, { className: cn(densityClasses[config.density || "default"], config.striped ? "[&_tr:nth-child(even)]:bg-muted/50" : "", config.hoverable !== false && "[&_tr:hover]:bg-muted/50"), children: [jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => (jsx(TableRow, { children: headerGroup.headers.map((header) => (jsx(TableHead, { children: header.isPlaceholder
|
|
9334
7966
|
? null
|
|
9335
|
-
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }),
|
|
7967
|
+
: flexRender(header.column.columnDef.header, header.getContext()) }, header.id))) }, headerGroup.id))) }), jsx(TableBody, { children: isLoading ? (
|
|
9336
7968
|
// Loading State
|
|
9337
|
-
|
|
7969
|
+
jsx("tr", { children: jsx("td", { colSpan: columns.length, className: "h-[400px]", children: jsx("div", { className: "flex h-full items-center justify-center", children: jsxs("div", { className: "flex flex-col items-center gap-4", children: [jsxs("svg", { className: "animate-spin h-8 w-8 text-muted-foreground", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4", fill: "none" }), jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" })] }), jsx("span", { className: "text-sm text-muted-foreground", children: "Laden..." })] }) }) }) })) : hasRows ? (
|
|
9338
7970
|
// Data Rows
|
|
9339
|
-
table.getRowModel().rows.map((row) => (
|
|
7971
|
+
table.getRowModel().rows.map((row) => (jsx(TableRow, { "data-state": row.getIsSelected() && "selected", children: row.getVisibleCells().map((cell) => (jsx(TableCell, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))) }, row.id)))) : (
|
|
9340
7972
|
// Empty State
|
|
9341
|
-
|
|
7973
|
+
jsx(DataTableEmpty, { config: getEmptyState(), colSpan: columns.length })) })] }) }), config.pagination?.enabled && hasRows && (jsx(DataTablePagination, { table: table, config: config.pagination }))] }));
|
|
9342
7974
|
}
|
|
9343
7975
|
|
|
9344
7976
|
const DataTableSchema = (props) => {
|
|
9345
|
-
return (
|
|
7977
|
+
return (jsx("div", { className: "data-table-schema", children: jsx("p", { children: "TableSchema Placeholder" }) }));
|
|
9346
7978
|
};
|
|
9347
7979
|
|
|
9348
7980
|
const AvatarList = ({ items, maxVisible = 5, size = 32, ...props }) => {
|
|
9349
7981
|
const sizeValue = typeof size === "string" ? parseInt(size, 10) || 32 : size;
|
|
9350
|
-
return (
|
|
7982
|
+
return (jsxs("div", { className: "avatar-list", style: { "--avatar-size": `${sizeValue}px` }, ...props, children: [items.slice(0, maxVisible).map((item) => (jsx("div", { className: "avatar-item", children: item.src ? (jsx("img", { src: item.src, alt: item.alt || "Avatar", style: { width: `${sizeValue}px`, height: `${sizeValue}px` } })) : (jsx("div", { className: "avatar-initials", style: { width: `${sizeValue}px`, height: `${sizeValue}px` }, children: item.initials || "?" })) }, item.id))), items.length > maxVisible && (jsxs("div", { className: "avatar-count", style: { width: `${sizeValue}px`, height: `${sizeValue}px` }, children: ["+", items.length - maxVisible] }))] }));
|
|
9351
7983
|
};
|
|
9352
7984
|
|
|
9353
7985
|
class BaseColumn {
|
|
@@ -9492,7 +8124,7 @@ class AvatarGroupColumn extends BaseColumn {
|
|
|
9492
8124
|
const { accessor, label, maxVisible, size, overlap, showTooltip, nameField, srcField, fallbackField, showNames, maxNames, } = config;
|
|
9493
8125
|
return {
|
|
9494
8126
|
accessorKey: accessor,
|
|
9495
|
-
header: () => (
|
|
8127
|
+
header: () => (jsx("span", { className: cn("text-muted-foreground font-medium", this.getAlignmentClass(), this.config.headerClassName), children: label || String(accessor) })),
|
|
9496
8128
|
cell: ({ getValue, row }) => {
|
|
9497
8129
|
const rawValue = getValue();
|
|
9498
8130
|
// Items aus den Daten extrahieren
|
|
@@ -9521,11 +8153,11 @@ class AvatarGroupColumn extends BaseColumn {
|
|
|
9521
8153
|
});
|
|
9522
8154
|
}
|
|
9523
8155
|
if (items.length === 0) {
|
|
9524
|
-
return
|
|
8156
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
9525
8157
|
}
|
|
9526
8158
|
// Konvertiere zu Datenstruktur für AvatarList
|
|
9527
8159
|
const contacts = this.toContactItems(items);
|
|
9528
|
-
return (
|
|
8160
|
+
return (jsx("div", { className: cn("flex items-center", this.config.cellClassName), children: jsx(AvatarList, { items: contacts.map((contact) => ({
|
|
9529
8161
|
id: contact.id,
|
|
9530
8162
|
src: contact.src,
|
|
9531
8163
|
alt: contact.alt,
|
|
@@ -9557,7 +8189,7 @@ const badgeVariants = cva("inline-flex items-center justify-center rounded-full
|
|
|
9557
8189
|
});
|
|
9558
8190
|
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
9559
8191
|
const Comp = asChild ? Slot$2 : "span";
|
|
9560
|
-
return (
|
|
8192
|
+
return (jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
|
|
9561
8193
|
}
|
|
9562
8194
|
|
|
9563
8195
|
class BadgeColumn extends BaseColumn {
|
|
@@ -9597,17 +8229,17 @@ class BadgeColumn extends BaseColumn {
|
|
|
9597
8229
|
header: ({ column }) => {
|
|
9598
8230
|
const displayLabel = label || String(accessor);
|
|
9599
8231
|
if (!sortable) {
|
|
9600
|
-
return (
|
|
8232
|
+
return (jsx("span", { className: cn("text-muted-foreground font-medium", this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9601
8233
|
}
|
|
9602
|
-
return (
|
|
8234
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === "asc"), className: cn("text-muted-foreground font-medium", this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
9603
8235
|
},
|
|
9604
8236
|
cell: ({ getValue }) => {
|
|
9605
8237
|
const value = String(getValue());
|
|
9606
8238
|
const variantConfig = variants?.[value];
|
|
9607
8239
|
if (!variantConfig) {
|
|
9608
|
-
return (
|
|
8240
|
+
return (jsx(Badge, { variant: "outline", className: this.config.cellClassName, children: value }));
|
|
9609
8241
|
}
|
|
9610
|
-
return (
|
|
8242
|
+
return (jsxs(Badge, { variant: variantConfig.variant === "success" ||
|
|
9611
8243
|
variantConfig.variant === "warning" ||
|
|
9612
8244
|
variantConfig.variant === "info" ||
|
|
9613
8245
|
variantConfig.variant === "muted"
|
|
@@ -9625,13 +8257,13 @@ const ButtonColumn = (config) => {
|
|
|
9625
8257
|
header: config.header || "Button",
|
|
9626
8258
|
cell: ({ row }) => {
|
|
9627
8259
|
const value = row.getValue(accessorKey);
|
|
9628
|
-
return (
|
|
8260
|
+
return (jsx(Button, { onClick: () => config.onClick && config.onClick(row.original), children: value || config.label || "Click" }));
|
|
9629
8261
|
},
|
|
9630
8262
|
};
|
|
9631
8263
|
};
|
|
9632
8264
|
|
|
9633
8265
|
function Checkbox({ className, ...props }) {
|
|
9634
|
-
return (
|
|
8266
|
+
return (jsx(Checkbox$1, { "data-slot": "checkbox", className: className, ...props, children: jsx(CheckboxIndicator, { "data-slot": "checkbox-indicator", className: "[&>svg]:size-3.5 grid place-content-center text-current transition-none", children: jsx(CheckIcon, {}) }) }));
|
|
9635
8267
|
}
|
|
9636
8268
|
|
|
9637
8269
|
class CheckboxColumn {
|
|
@@ -9641,8 +8273,8 @@ class CheckboxColumn {
|
|
|
9641
8273
|
build() {
|
|
9642
8274
|
return {
|
|
9643
8275
|
id: 'select',
|
|
9644
|
-
header: ({ table }) => (
|
|
9645
|
-
cell: ({ row }) => (
|
|
8276
|
+
header: ({ table }) => (jsx(Checkbox, { checked: table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate'), onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value), "aria-label": "Alle ausw\u00E4hlen" })),
|
|
8277
|
+
cell: ({ row }) => (jsx(Checkbox, { checked: row.getIsSelected(), onCheckedChange: (value) => row.toggleSelected(!!value), "aria-label": "Zeile ausw\u00E4hlen" })),
|
|
9646
8278
|
enableSorting: false,
|
|
9647
8279
|
enableHiding: false,
|
|
9648
8280
|
};
|
|
@@ -9728,21 +8360,21 @@ class DateColumn extends BaseColumn {
|
|
|
9728
8360
|
header: ({ column }) => {
|
|
9729
8361
|
const displayLabel = label || String(accessor);
|
|
9730
8362
|
if (!sortable) {
|
|
9731
|
-
return (
|
|
8363
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9732
8364
|
}
|
|
9733
|
-
return (
|
|
8365
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
9734
8366
|
},
|
|
9735
8367
|
cell: ({ getValue }) => {
|
|
9736
8368
|
const value = getValue();
|
|
9737
8369
|
if (!value) {
|
|
9738
|
-
return
|
|
8370
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
9739
8371
|
}
|
|
9740
8372
|
const date = value instanceof Date ? value : new Date(value);
|
|
9741
8373
|
if (isNaN(date.getTime())) {
|
|
9742
|
-
return
|
|
8374
|
+
return jsx("span", { className: "text-muted-foreground", children: "Ung\u00FCltiges Datum" });
|
|
9743
8375
|
}
|
|
9744
8376
|
const formatted = this.formatDate(date, format || 'short', locale || 'de-DE');
|
|
9745
|
-
return (
|
|
8377
|
+
return (jsxs("span", { className: cn('flex items-center gap-2', this.getAlignmentClass(), this.config.cellClassName), children: [showIcon && jsx(Calendar, { className: "text-muted-foreground h-4 w-4" }), formatted] }));
|
|
9746
8378
|
},
|
|
9747
8379
|
};
|
|
9748
8380
|
}
|
|
@@ -9755,22 +8387,22 @@ const DropdownColumn = (config) => {
|
|
|
9755
8387
|
header: config.header || "Options",
|
|
9756
8388
|
cell: ({ row }) => {
|
|
9757
8389
|
const value = row.getValue(accessorKey);
|
|
9758
|
-
return (
|
|
8390
|
+
return (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button, { variant: "outline", children: value || "Options" }) }), jsx(DropdownMenuContent, { children: config.options.map((option, index) => (jsx(DropdownMenuItem, { onClick: () => option.onClick && option.onClick(row.original), children: option.label }, index))) })] }));
|
|
9759
8391
|
},
|
|
9760
8392
|
};
|
|
9761
8393
|
};
|
|
9762
8394
|
|
|
9763
8395
|
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
9764
|
-
return (
|
|
8396
|
+
return (jsx(Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
9765
8397
|
}
|
|
9766
8398
|
function Tooltip({ ...props }) {
|
|
9767
|
-
return (
|
|
8399
|
+
return (jsx(TooltipProvider, { children: jsx(Root3, { "data-slot": "tooltip", ...props }) }));
|
|
9768
8400
|
}
|
|
9769
8401
|
function TooltipTrigger({ ...props }) {
|
|
9770
|
-
return
|
|
8402
|
+
return jsx(Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
9771
8403
|
}
|
|
9772
8404
|
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
9773
|
-
return (
|
|
8405
|
+
return (jsx(Portal, { children: jsxs(Content2, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: className, ...props, children: [children, jsx(Arrow2, { className: "size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%_-_2px)]" })] }) }));
|
|
9774
8406
|
}
|
|
9775
8407
|
|
|
9776
8408
|
class IconColumn extends BaseColumn {
|
|
@@ -9940,34 +8572,34 @@ class IconColumn extends BaseColumn {
|
|
|
9940
8572
|
}
|
|
9941
8573
|
// === ICON HELPERS (inline SVGs um Lucide-Abhängigkeit zu vermeiden) ===
|
|
9942
8574
|
createCheckIcon() {
|
|
9943
|
-
return (
|
|
8575
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: jsx("polyline", { points: "20 6 9 17 4 12" }) }));
|
|
9944
8576
|
}
|
|
9945
8577
|
createXIcon() {
|
|
9946
|
-
return (
|
|
8578
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })] }));
|
|
9947
8579
|
}
|
|
9948
8580
|
createCircleIcon() {
|
|
9949
|
-
return (
|
|
8581
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", className: "h-full w-full", children: jsx("circle", { cx: "12", cy: "12", r: "6" }) }));
|
|
9950
8582
|
}
|
|
9951
8583
|
createArrowUpIcon() {
|
|
9952
|
-
return (
|
|
8584
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("line", { x1: "12", y1: "19", x2: "12", y2: "5" }), jsx("polyline", { points: "5 12 12 5 19 12" })] }));
|
|
9953
8585
|
}
|
|
9954
8586
|
createArrowDownIcon() {
|
|
9955
|
-
return (
|
|
8587
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("line", { x1: "12", y1: "5", x2: "12", y2: "19" }), jsx("polyline", { points: "19 12 12 19 5 12" })] }));
|
|
9956
8588
|
}
|
|
9957
8589
|
createMinusIcon() {
|
|
9958
|
-
return (
|
|
8590
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) }));
|
|
9959
8591
|
}
|
|
9960
8592
|
createAlertIcon() {
|
|
9961
|
-
return (
|
|
8593
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }), jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }), jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })] }));
|
|
9962
8594
|
}
|
|
9963
8595
|
createShieldCheckIcon() {
|
|
9964
|
-
return (
|
|
8596
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), jsx("polyline", { points: "9 12 11 14 15 10" })] }));
|
|
9965
8597
|
}
|
|
9966
8598
|
createShieldXIcon() {
|
|
9967
|
-
return (
|
|
8599
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }), jsx("line", { x1: "9", y1: "9", x2: "15", y2: "15" }), jsx("line", { x1: "15", y1: "9", x2: "9", y2: "15" })] }));
|
|
9968
8600
|
}
|
|
9969
8601
|
createClockIcon() {
|
|
9970
|
-
return (
|
|
8602
|
+
return (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-full w-full", children: [jsx("circle", { cx: "12", cy: "12", r: "10" }), jsx("polyline", { points: "12 6 12 12 16 14" })] }));
|
|
9971
8603
|
}
|
|
9972
8604
|
build() {
|
|
9973
8605
|
const config = this.config;
|
|
@@ -9995,9 +8627,9 @@ class IconColumn extends BaseColumn {
|
|
|
9995
8627
|
header: ({ column }) => {
|
|
9996
8628
|
const displayLabel = label || String(accessor);
|
|
9997
8629
|
if (!sortable) {
|
|
9998
|
-
return (
|
|
8630
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9999
8631
|
}
|
|
10000
|
-
return (
|
|
8632
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
10001
8633
|
},
|
|
10002
8634
|
cell: ({ getValue }) => {
|
|
10003
8635
|
const value = String(getValue());
|
|
@@ -10009,14 +8641,14 @@ class IconColumn extends BaseColumn {
|
|
|
10009
8641
|
const bgColor = stateConfig?.bgColor;
|
|
10010
8642
|
const tooltip = stateConfig?.tooltip || stateLabel;
|
|
10011
8643
|
if (!icon) {
|
|
10012
|
-
return
|
|
8644
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10013
8645
|
}
|
|
10014
8646
|
// Icon als Element rendern (falls LucideIcon übergeben wurde)
|
|
10015
8647
|
const IconElement = typeof icon === 'function' ? icon : null;
|
|
10016
|
-
const renderedIcon = IconElement ?
|
|
10017
|
-
const iconElement = (
|
|
8648
|
+
const renderedIcon = IconElement ? jsx(IconElement, { className: "h-full w-full" }) : icon;
|
|
8649
|
+
const iconElement = (jsxs("div", { className: cn('flex items-center gap-2', this.getAlignmentClass(), this.config.cellClassName), children: [withBackground ? (jsx("div", { className: cn('inline-flex items-center justify-center rounded-md', bgSizeClasses[size || 'md'], bgColor || 'bg-blue-50'), children: jsx("div", { className: cn(iconInBgSizeClasses[size || 'md'], color), children: renderedIcon }) })) : (jsx("div", { className: cn(sizeClasses[size || 'md'], color), children: renderedIcon })), showLabel && jsx("span", { className: cn('text-sm', color), children: stateLabel })] }));
|
|
10018
8650
|
if (showTooltip) {
|
|
10019
|
-
return (
|
|
8651
|
+
return (jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: iconElement }), jsx(TooltipContent, { children: jsx("p", { children: tooltip }) })] }) }));
|
|
10020
8652
|
}
|
|
10021
8653
|
return iconElement;
|
|
10022
8654
|
},
|
|
@@ -10024,6 +8656,68 @@ class IconColumn extends BaseColumn {
|
|
|
10024
8656
|
}
|
|
10025
8657
|
}
|
|
10026
8658
|
|
|
8659
|
+
class ImageColumn extends BaseColumn {
|
|
8660
|
+
constructor(accessor) {
|
|
8661
|
+
super(accessor);
|
|
8662
|
+
this.config.size = 'md';
|
|
8663
|
+
this.config.rounded = 'md';
|
|
8664
|
+
}
|
|
8665
|
+
static make(accessor) {
|
|
8666
|
+
return new ImageColumn(accessor);
|
|
8667
|
+
}
|
|
8668
|
+
size(size) {
|
|
8669
|
+
this.config.size = size;
|
|
8670
|
+
return this;
|
|
8671
|
+
}
|
|
8672
|
+
rounded(rounded) {
|
|
8673
|
+
this.config.rounded = rounded;
|
|
8674
|
+
return this;
|
|
8675
|
+
}
|
|
8676
|
+
circular() {
|
|
8677
|
+
return this.rounded('full');
|
|
8678
|
+
}
|
|
8679
|
+
square() {
|
|
8680
|
+
return this.rounded('none');
|
|
8681
|
+
}
|
|
8682
|
+
fallback(url) {
|
|
8683
|
+
this.config.fallback = url;
|
|
8684
|
+
return this;
|
|
8685
|
+
}
|
|
8686
|
+
alt(fn) {
|
|
8687
|
+
this.config.alt = fn;
|
|
8688
|
+
return this;
|
|
8689
|
+
}
|
|
8690
|
+
build() {
|
|
8691
|
+
const config = this.config;
|
|
8692
|
+
const { accessor, label, size, rounded, fallback, alt } = config;
|
|
8693
|
+
const sizeClasses = {
|
|
8694
|
+
sm: 'h-8 w-8',
|
|
8695
|
+
md: 'h-10 w-10',
|
|
8696
|
+
lg: 'h-12 w-12',
|
|
8697
|
+
};
|
|
8698
|
+
const roundedClasses = {
|
|
8699
|
+
none: 'rounded-none',
|
|
8700
|
+
sm: 'rounded-sm',
|
|
8701
|
+
md: 'rounded-md',
|
|
8702
|
+
lg: 'rounded-lg',
|
|
8703
|
+
full: 'rounded-full',
|
|
8704
|
+
};
|
|
8705
|
+
return {
|
|
8706
|
+
accessorKey: accessor,
|
|
8707
|
+
header: () => jsx("span", { className: cn('text-muted-foreground font-medium', this.config.headerClassName), children: label || '' }),
|
|
8708
|
+
cell: ({ getValue, row }) => {
|
|
8709
|
+
const src = getValue();
|
|
8710
|
+
const altText = alt ? alt(row.original) : 'Bild';
|
|
8711
|
+
return (jsx("img", { src: src || fallback || '/placeholder.png', alt: altText, className: cn('object-cover', sizeClasses[size || 'md'], roundedClasses[rounded || 'md'], this.config.cellClassName), onError: (e) => {
|
|
8712
|
+
if (fallback) {
|
|
8713
|
+
e.target.src = fallback;
|
|
8714
|
+
}
|
|
8715
|
+
} }));
|
|
8716
|
+
},
|
|
8717
|
+
};
|
|
8718
|
+
}
|
|
8719
|
+
}
|
|
8720
|
+
|
|
10027
8721
|
const InputColumn = (config) => {
|
|
10028
8722
|
const accessorKey = config.accessorKey || "input";
|
|
10029
8723
|
return {
|
|
@@ -10031,13 +8725,189 @@ const InputColumn = (config) => {
|
|
|
10031
8725
|
header: config.header || "Input",
|
|
10032
8726
|
cell: ({ row }) => {
|
|
10033
8727
|
const value = row.getValue(accessorKey);
|
|
10034
|
-
return (
|
|
8728
|
+
return (jsx(Input, { value: value || "", onChange: (e) => config.onChange && config.onChange(row.original, e.target.value), placeholder: config.placeholder || "Enter value" }));
|
|
10035
8729
|
},
|
|
10036
8730
|
};
|
|
10037
8731
|
};
|
|
10038
8732
|
|
|
8733
|
+
class LinkColumn extends BaseColumn {
|
|
8734
|
+
constructor(accessor) {
|
|
8735
|
+
super(accessor);
|
|
8736
|
+
const config = this.config;
|
|
8737
|
+
config.external = false;
|
|
8738
|
+
config.showExternalIcon = false;
|
|
8739
|
+
config.underline = 'hover';
|
|
8740
|
+
config.openInNewTab = false;
|
|
8741
|
+
}
|
|
8742
|
+
static make(accessor) {
|
|
8743
|
+
return new LinkColumn(accessor);
|
|
8744
|
+
}
|
|
8745
|
+
// URL setzen (statisch oder dynamisch)
|
|
8746
|
+
href(href) {
|
|
8747
|
+
this.config.href = href;
|
|
8748
|
+
return this;
|
|
8749
|
+
}
|
|
8750
|
+
// URL aus einem anderen Feld nehmen
|
|
8751
|
+
urlFromField(field) {
|
|
8752
|
+
this.config.href = (row) => String(row[field]);
|
|
8753
|
+
return this;
|
|
8754
|
+
}
|
|
8755
|
+
// Externer Link (zeigt Icon)
|
|
8756
|
+
external(external = true) {
|
|
8757
|
+
const config = this.config;
|
|
8758
|
+
config.external = external;
|
|
8759
|
+
config.showExternalIcon = external;
|
|
8760
|
+
config.openInNewTab = external;
|
|
8761
|
+
return this;
|
|
8762
|
+
}
|
|
8763
|
+
// Icon vor dem Text
|
|
8764
|
+
icon(icon) {
|
|
8765
|
+
this.config.icon = icon;
|
|
8766
|
+
return this;
|
|
8767
|
+
}
|
|
8768
|
+
// External-Icon anzeigen
|
|
8769
|
+
showExternalIcon(show = true) {
|
|
8770
|
+
this.config.showExternalIcon = show;
|
|
8771
|
+
return this;
|
|
8772
|
+
}
|
|
8773
|
+
// Unterstreichung
|
|
8774
|
+
underline(style) {
|
|
8775
|
+
this.config.underline = style;
|
|
8776
|
+
return this;
|
|
8777
|
+
}
|
|
8778
|
+
// In neuem Tab öffnen
|
|
8779
|
+
openInNewTab(open = true) {
|
|
8780
|
+
this.config.openInNewTab = open;
|
|
8781
|
+
return this;
|
|
8782
|
+
}
|
|
8783
|
+
// Click-Handler (für programmatische Navigation)
|
|
8784
|
+
onClick(handler) {
|
|
8785
|
+
this.config.onClick = handler;
|
|
8786
|
+
return this;
|
|
8787
|
+
}
|
|
8788
|
+
build() {
|
|
8789
|
+
const config = this.config;
|
|
8790
|
+
const { accessor, label, sortable, href, icon, showExternalIcon, underline, openInNewTab, onClick } = config;
|
|
8791
|
+
const underlineClasses = {
|
|
8792
|
+
always: 'underline',
|
|
8793
|
+
hover: 'hover:underline',
|
|
8794
|
+
never: 'no-underline',
|
|
8795
|
+
};
|
|
8796
|
+
return {
|
|
8797
|
+
accessorKey: accessor,
|
|
8798
|
+
header: ({ column }) => {
|
|
8799
|
+
const displayLabel = label || String(accessor);
|
|
8800
|
+
if (!sortable) {
|
|
8801
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
8802
|
+
}
|
|
8803
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
8804
|
+
},
|
|
8805
|
+
cell: ({ getValue, row }) => {
|
|
8806
|
+
const value = getValue();
|
|
8807
|
+
if (!value) {
|
|
8808
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
8809
|
+
}
|
|
8810
|
+
// URL berechnen
|
|
8811
|
+
const url = typeof href === 'function' ? href(row.original) : href || value;
|
|
8812
|
+
const handleClick = (e) => {
|
|
8813
|
+
if (onClick) {
|
|
8814
|
+
e.preventDefault();
|
|
8815
|
+
onClick(row.original);
|
|
8816
|
+
}
|
|
8817
|
+
};
|
|
8818
|
+
// Alignment ohne text-muted-foreground für Links
|
|
8819
|
+
const alignmentClass = this.config.align === 'center' ? 'text-center' : this.config.align === 'right' ? 'text-right' : 'text-left';
|
|
8820
|
+
return (jsxs("a", { href: url, target: openInNewTab ? '_blank' : undefined, rel: openInNewTab ? 'noopener noreferrer' : undefined, onClick: onClick ? handleClick : undefined, className: cn('inline-flex items-center gap-1.5 text-sm text-blue-500', underlineClasses[underline || 'hover'], 'hover:text-blue-500/80', alignmentClass, this.config.cellClassName), children: [icon, jsx("span", { children: value }), showExternalIcon && jsx(ExternalLink, { className: "text-muted-foreground h-3 w-3" })] }));
|
|
8821
|
+
},
|
|
8822
|
+
};
|
|
8823
|
+
}
|
|
8824
|
+
}
|
|
8825
|
+
|
|
8826
|
+
class NumberColumn extends BaseColumn {
|
|
8827
|
+
constructor(accessor) {
|
|
8828
|
+
super(accessor);
|
|
8829
|
+
this.config.align = 'right'; // Zahlen standardmäßig rechtsbündig
|
|
8830
|
+
this.config.decimals = 0;
|
|
8831
|
+
this.config.locale = 'de-DE';
|
|
8832
|
+
}
|
|
8833
|
+
static make(accessor) {
|
|
8834
|
+
return new NumberColumn(accessor);
|
|
8835
|
+
}
|
|
8836
|
+
decimals(decimals) {
|
|
8837
|
+
this.config.decimals = decimals;
|
|
8838
|
+
return this;
|
|
8839
|
+
}
|
|
8840
|
+
locale(locale) {
|
|
8841
|
+
this.config.locale = locale;
|
|
8842
|
+
return this;
|
|
8843
|
+
}
|
|
8844
|
+
// Währungsformatierung
|
|
8845
|
+
money(currency = 'EUR') {
|
|
8846
|
+
this.config.currency = currency;
|
|
8847
|
+
this.config.decimals = 2;
|
|
8848
|
+
return this;
|
|
8849
|
+
}
|
|
8850
|
+
// Prozentformatierung
|
|
8851
|
+
percent() {
|
|
8852
|
+
this.config.percent = true;
|
|
8853
|
+
return this;
|
|
8854
|
+
}
|
|
8855
|
+
prefix(prefix) {
|
|
8856
|
+
this.config.prefix = prefix;
|
|
8857
|
+
return this;
|
|
8858
|
+
}
|
|
8859
|
+
suffix(suffix) {
|
|
8860
|
+
this.config.suffix = suffix;
|
|
8861
|
+
return this;
|
|
8862
|
+
}
|
|
8863
|
+
build() {
|
|
8864
|
+
const config = this.config;
|
|
8865
|
+
const { accessor, label, sortable, decimals, locale, currency, percent, prefix, suffix } = config;
|
|
8866
|
+
return {
|
|
8867
|
+
accessorKey: accessor,
|
|
8868
|
+
header: ({ column }) => {
|
|
8869
|
+
const displayLabel = label || String(accessor);
|
|
8870
|
+
if (!sortable) {
|
|
8871
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
8872
|
+
}
|
|
8873
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
8874
|
+
},
|
|
8875
|
+
cell: ({ getValue }) => {
|
|
8876
|
+
const value = getValue();
|
|
8877
|
+
if (value === null || value === undefined) {
|
|
8878
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
8879
|
+
}
|
|
8880
|
+
let formatted;
|
|
8881
|
+
if (currency) {
|
|
8882
|
+
formatted = new Intl.NumberFormat(locale, {
|
|
8883
|
+
style: 'currency',
|
|
8884
|
+
currency,
|
|
8885
|
+
minimumFractionDigits: decimals,
|
|
8886
|
+
maximumFractionDigits: decimals,
|
|
8887
|
+
}).format(value);
|
|
8888
|
+
}
|
|
8889
|
+
else if (percent) {
|
|
8890
|
+
formatted = new Intl.NumberFormat(locale, {
|
|
8891
|
+
style: 'percent',
|
|
8892
|
+
minimumFractionDigits: decimals,
|
|
8893
|
+
maximumFractionDigits: decimals,
|
|
8894
|
+
}).format(value / 100);
|
|
8895
|
+
}
|
|
8896
|
+
else {
|
|
8897
|
+
formatted = new Intl.NumberFormat(locale, {
|
|
8898
|
+
minimumFractionDigits: decimals,
|
|
8899
|
+
maximumFractionDigits: decimals,
|
|
8900
|
+
}).format(value);
|
|
8901
|
+
}
|
|
8902
|
+
const displayValue = `${prefix || ''}${formatted}${suffix || ''}`;
|
|
8903
|
+
return jsx("span", { className: cn('tabular-nums', this.getAlignmentClass(), this.config.cellClassName), children: displayValue });
|
|
8904
|
+
},
|
|
8905
|
+
};
|
|
8906
|
+
}
|
|
8907
|
+
}
|
|
8908
|
+
|
|
10039
8909
|
function Progress({ className, value, ...props }) {
|
|
10040
|
-
return (
|
|
8910
|
+
return (jsx(Root, { "data-slot": "progress", className: className, ...props, children: jsx(Indicator, { "data-slot": "progress-indicator", className: "bg-primary size-full flex-1 transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
|
|
10041
8911
|
}
|
|
10042
8912
|
|
|
10043
8913
|
class ProgressColumn extends BaseColumn {
|
|
@@ -10137,15 +9007,15 @@ class ProgressColumn extends BaseColumn {
|
|
|
10137
9007
|
header: ({ column }) => {
|
|
10138
9008
|
const displayLabel = label || String(accessor);
|
|
10139
9009
|
if (!sortable) {
|
|
10140
|
-
return (
|
|
9010
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
10141
9011
|
}
|
|
10142
|
-
return (
|
|
9012
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
10143
9013
|
},
|
|
10144
9014
|
cell: ({ getValue }) => {
|
|
10145
9015
|
const value = getValue();
|
|
10146
9016
|
const maxValue = max || 100;
|
|
10147
9017
|
if (value === null || value === undefined) {
|
|
10148
|
-
return
|
|
9018
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10149
9019
|
}
|
|
10150
9020
|
const percentage = Math.min(100, Math.max(0, (value / maxValue) * 100));
|
|
10151
9021
|
// Farbe berechnen
|
|
@@ -10161,7 +9031,7 @@ class ProgressColumn extends BaseColumn {
|
|
|
10161
9031
|
else if (showPercentage) {
|
|
10162
9032
|
labelText = `${Math.round(percentage)}%`;
|
|
10163
9033
|
}
|
|
10164
|
-
return (
|
|
9034
|
+
return (jsxs("div", { className: cn('flex min-w-[120px] items-center gap-3', this.config.cellClassName), children: [jsx(Progress, { value: percentage, className: cn('flex-1', sizeClasses[size || 'md'], colorClasses[currentColor]) }), labelText && jsx("span", { className: "text-muted-foreground min-w-[3rem] text-right text-sm tabular-nums", children: labelText })] }));
|
|
10165
9035
|
},
|
|
10166
9036
|
};
|
|
10167
9037
|
}
|
|
@@ -10174,7 +9044,7 @@ const SelectColumn = (config) => {
|
|
|
10174
9044
|
header: config.header || "Select",
|
|
10175
9045
|
cell: ({ row }) => {
|
|
10176
9046
|
const value = row.getValue(accessorKey);
|
|
10177
|
-
return (
|
|
9047
|
+
return (jsxs(Select, { value: value || "", onValueChange: (value) => config.onChange && config.onChange(row.original, value), children: [jsx(SelectTrigger, { children: jsx(SelectValue, { placeholder: config.placeholder || "Select an option" }) }), jsx(SelectContent, { children: config.options.map((option, index) => (jsx(SelectItem, { value: option.value, children: option.label }, index))) })] }));
|
|
10178
9048
|
},
|
|
10179
9049
|
};
|
|
10180
9050
|
};
|
|
@@ -10234,9 +9104,9 @@ class TextColumn extends BaseColumn {
|
|
|
10234
9104
|
header: ({ column }) => {
|
|
10235
9105
|
const displayLabel = label || String(accessor);
|
|
10236
9106
|
if (!sortable) {
|
|
10237
|
-
return (
|
|
9107
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
10238
9108
|
}
|
|
10239
|
-
return (
|
|
9109
|
+
return (jsxs(Button, { variant: "table_header", size: "table_header", onClick: () => column.toggleSorting(column.getIsSorted() === 'asc'), className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: [displayLabel, jsx(ArrowUpDown, { className: "ml-2 h-4 w-4" })] }));
|
|
10240
9110
|
},
|
|
10241
9111
|
cell: ({ row, getValue }) => {
|
|
10242
9112
|
let value = getValue();
|
|
@@ -10246,15 +9116,83 @@ class TextColumn extends BaseColumn {
|
|
|
10246
9116
|
}
|
|
10247
9117
|
// Placeholder wenn leer
|
|
10248
9118
|
if (value === null || value === undefined || value === '') {
|
|
10249
|
-
return (
|
|
9119
|
+
return (jsx("span", { className: cn('text-muted-foreground', this.getAlignmentClass(), this.config.cellClassName), children: placeholder || '—' }));
|
|
10250
9120
|
}
|
|
10251
9121
|
// Prefix/Suffix hinzufügen
|
|
10252
9122
|
const displayValue = `${prefix || ''}${value}${suffix || ''}`;
|
|
10253
|
-
return
|
|
9123
|
+
return jsx("span", { className: cn(this.getAlignmentClass(), this.config.cellClassName), children: displayValue });
|
|
9124
|
+
},
|
|
9125
|
+
};
|
|
9126
|
+
}
|
|
9127
|
+
}
|
|
9128
|
+
|
|
9129
|
+
class ActionsColumn {
|
|
9130
|
+
config = {
|
|
9131
|
+
actions: [],
|
|
9132
|
+
label: 'Aktionen',
|
|
9133
|
+
};
|
|
9134
|
+
static make() {
|
|
9135
|
+
return new ActionsColumn();
|
|
9136
|
+
}
|
|
9137
|
+
label(label) {
|
|
9138
|
+
this.config.label = label;
|
|
9139
|
+
return this;
|
|
9140
|
+
}
|
|
9141
|
+
triggerIcon(icon) {
|
|
9142
|
+
this.config.triggerIcon = icon;
|
|
9143
|
+
return this;
|
|
9144
|
+
}
|
|
9145
|
+
// Action hinzufügen
|
|
9146
|
+
action(action) {
|
|
9147
|
+
this.config.actions.push(action);
|
|
9148
|
+
return this;
|
|
9149
|
+
}
|
|
9150
|
+
// Shortcuts für gängige Actions
|
|
9151
|
+
view(onClick) {
|
|
9152
|
+
return this.action({ label: 'Anzeigen', onClick });
|
|
9153
|
+
}
|
|
9154
|
+
edit(onClick) {
|
|
9155
|
+
return this.action({ label: 'Bearbeiten', onClick });
|
|
9156
|
+
}
|
|
9157
|
+
delete(onClick) {
|
|
9158
|
+
return this.action({
|
|
9159
|
+
label: 'Löschen',
|
|
9160
|
+
onClick,
|
|
9161
|
+
variant: 'destructive',
|
|
9162
|
+
separator: true,
|
|
9163
|
+
});
|
|
9164
|
+
}
|
|
9165
|
+
link(label, href) {
|
|
9166
|
+
return this.action({ label, href });
|
|
9167
|
+
}
|
|
9168
|
+
separator() {
|
|
9169
|
+
if (this.config.actions.length > 0) {
|
|
9170
|
+
this.config.actions[this.config.actions.length - 1].separator = true;
|
|
9171
|
+
}
|
|
9172
|
+
return this;
|
|
9173
|
+
}
|
|
9174
|
+
build() {
|
|
9175
|
+
const { actions, label, triggerIcon } = this.config;
|
|
9176
|
+
return {
|
|
9177
|
+
id: 'actions',
|
|
9178
|
+
header: () => jsx("span", { className: "sr-only", children: label }),
|
|
9179
|
+
cell: ({ row }) => {
|
|
9180
|
+
const data = row.original;
|
|
9181
|
+
const visibleActions = actions.filter((action) => !action.hidden || !action.hidden(data));
|
|
9182
|
+
if (visibleActions.length === 0)
|
|
9183
|
+
return null;
|
|
9184
|
+
return (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button, { variant: "ghost", className: "h-10 w-10 p-0", children: [jsx("span", { className: "sr-only", children: label }), triggerIcon || jsx(MoreHorizontal, { className: "h-8 w-8" })] }) }), jsx(DropdownMenuContent, { align: "end", children: visibleActions.map((action, index) => (jsxs("div", { children: [jsxs(DropdownMenuItem, { disabled: action.disabled?.(data), className: cn(action.variant === 'destructive' && 'text-destructive focus:text-destructive'), onClick: () => {
|
|
9185
|
+
if (action.href) {
|
|
9186
|
+
window.location.href = action.href(data);
|
|
9187
|
+
}
|
|
9188
|
+
else if (action.onClick) {
|
|
9189
|
+
action.onClick(data);
|
|
9190
|
+
}
|
|
9191
|
+
}, children: [action.icon && jsx("span", { className: "mr-2", children: action.icon }), action.label] }), action.separator && index < visibleActions.length - 1 && jsx(DropdownMenuSeparator, {})] }, index))) })] }));
|
|
10254
9192
|
},
|
|
10255
9193
|
};
|
|
10256
9194
|
}
|
|
10257
9195
|
}
|
|
10258
9196
|
|
|
10259
|
-
export { DataTable, DataTableSchema, EmptyStateBuilder, TableSchema, AvatarGroupColumn as avatarGroupColumn, BadgeColumn as badgeColumn, ButtonColumn as buttonColumn, CheckboxColumn as checkboxColumn, DateColumn as dateColumn, DropdownColumn as dropdownColumn, IconColumn as iconColumn, InputColumn as inputColumn, ProgressColumn as progressColumn, SelectColumn as selectColumn, TextColumn as textColumn };
|
|
9197
|
+
export { ActionsColumn, AvatarGroupColumn, BadgeColumn, ButtonColumn, CheckboxColumn, DataTable, DataTableSchema, DateColumn, DropdownColumn, EmptyStateBuilder, IconColumn, ImageColumn, InputColumn, LinkColumn, NumberColumn, ProgressColumn, SelectColumn, TableSchema, TextColumn, AvatarGroupColumn as avatarGroupColumn, BadgeColumn as badgeColumn, ButtonColumn as buttonColumn, CheckboxColumn as checkboxColumn, DateColumn as dateColumn, DropdownColumn as dropdownColumn, IconColumn as iconColumn, InputColumn as inputColumn, ProgressColumn as progressColumn, SelectColumn as selectColumn, TextColumn as textColumn };
|
|
10260
9198
|
//# sourceMappingURL=index.esm.js.map
|