@nccirtu/tablefy 0.1.6 → 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.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.esm.js +226 -1598
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +239 -1611
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
|
@@ -1,1385 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import React__default, { useState, useLayoutEffect } from 'react';
|
|
3
4
|
import { ArrowUpDown, CheckIcon, Calendar, ExternalLink, ChevronDownIcon, ChevronUpIcon, MoreHorizontal } from 'lucide-react';
|
|
4
5
|
import * as ReactDOM from 'react-dom';
|
|
5
6
|
import ReactDOM__default from 'react-dom';
|
|
6
7
|
|
|
7
|
-
var jsxRuntime = {exports: {}};
|
|
8
|
-
|
|
9
|
-
var reactJsxRuntime_production_min = {};
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* @license React
|
|
13
|
-
* react-jsx-runtime.production.min.js
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
-
*
|
|
17
|
-
* This source code is licensed under the MIT license found in the
|
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
var hasRequiredReactJsxRuntime_production_min;
|
|
22
|
-
|
|
23
|
-
function requireReactJsxRuntime_production_min () {
|
|
24
|
-
if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
|
|
25
|
-
hasRequiredReactJsxRuntime_production_min = 1;
|
|
26
|
-
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};
|
|
27
|
-
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;
|
|
28
|
-
return reactJsxRuntime_production_min;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
var reactJsxRuntime_development = {};
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-jsx-runtime.development.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/
|
|
42
|
-
|
|
43
|
-
var hasRequiredReactJsxRuntime_development;
|
|
44
|
-
|
|
45
|
-
function requireReactJsxRuntime_development () {
|
|
46
|
-
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
47
|
-
hasRequiredReactJsxRuntime_development = 1;
|
|
48
|
-
|
|
49
|
-
if (process.env.NODE_ENV !== "production") {
|
|
50
|
-
(function() {
|
|
51
|
-
|
|
52
|
-
var React = React__default;
|
|
53
|
-
|
|
54
|
-
// ATTENTION
|
|
55
|
-
// When adding new symbols to this file,
|
|
56
|
-
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
57
|
-
// The Symbol used to tag the ReactElement-like types.
|
|
58
|
-
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
59
|
-
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
60
|
-
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
61
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
62
|
-
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
63
|
-
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
64
|
-
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
65
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
66
|
-
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
67
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
68
|
-
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
69
|
-
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
70
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
71
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
72
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
73
|
-
function getIteratorFn(maybeIterable) {
|
|
74
|
-
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
79
|
-
|
|
80
|
-
if (typeof maybeIterator === 'function') {
|
|
81
|
-
return maybeIterator;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return null;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
88
|
-
|
|
89
|
-
function error(format) {
|
|
90
|
-
{
|
|
91
|
-
{
|
|
92
|
-
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
93
|
-
args[_key2 - 1] = arguments[_key2];
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
printWarning('error', format, args);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function printWarning(level, format, args) {
|
|
102
|
-
// When changing this logic, you might want to also
|
|
103
|
-
// update consoleWithStackDev.www.js as well.
|
|
104
|
-
{
|
|
105
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
106
|
-
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
107
|
-
|
|
108
|
-
if (stack !== '') {
|
|
109
|
-
format += '%s';
|
|
110
|
-
args = args.concat([stack]);
|
|
111
|
-
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var argsWithFormat = args.map(function (item) {
|
|
115
|
-
return String(item);
|
|
116
|
-
}); // Careful: RN currently depends on this prefix
|
|
117
|
-
|
|
118
|
-
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
119
|
-
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
120
|
-
// eslint-disable-next-line react-internal/no-production-logging
|
|
121
|
-
|
|
122
|
-
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// -----------------------------------------------------------------------------
|
|
127
|
-
|
|
128
|
-
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
129
|
-
var enableCacheElement = false;
|
|
130
|
-
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
131
|
-
|
|
132
|
-
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
133
|
-
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
134
|
-
// issues in DEV builds.
|
|
135
|
-
|
|
136
|
-
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
137
|
-
|
|
138
|
-
var REACT_MODULE_REFERENCE;
|
|
139
|
-
|
|
140
|
-
{
|
|
141
|
-
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function isValidElementType(type) {
|
|
145
|
-
if (typeof type === 'string' || typeof type === 'function') {
|
|
146
|
-
return true;
|
|
147
|
-
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
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 ) {
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
if (typeof type === 'object' && type !== null) {
|
|
155
|
-
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
|
|
156
|
-
// types supported by any Flight configuration anywhere since
|
|
157
|
-
// we don't know which Flight build this will end up being used
|
|
158
|
-
// with.
|
|
159
|
-
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
160
|
-
return true;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return false;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
function getWrappedName(outerType, innerType, wrapperName) {
|
|
168
|
-
var displayName = outerType.displayName;
|
|
169
|
-
|
|
170
|
-
if (displayName) {
|
|
171
|
-
return displayName;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
var functionName = innerType.displayName || innerType.name || '';
|
|
175
|
-
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
176
|
-
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
function getContextName(type) {
|
|
180
|
-
return type.displayName || 'Context';
|
|
181
|
-
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
function getComponentNameFromType(type) {
|
|
185
|
-
if (type == null) {
|
|
186
|
-
// Host root, text node or just invalid type.
|
|
187
|
-
return null;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
if (typeof type.tag === 'number') {
|
|
192
|
-
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
if (typeof type === 'function') {
|
|
197
|
-
return type.displayName || type.name || null;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
if (typeof type === 'string') {
|
|
201
|
-
return type;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
switch (type) {
|
|
205
|
-
case REACT_FRAGMENT_TYPE:
|
|
206
|
-
return 'Fragment';
|
|
207
|
-
|
|
208
|
-
case REACT_PORTAL_TYPE:
|
|
209
|
-
return 'Portal';
|
|
210
|
-
|
|
211
|
-
case REACT_PROFILER_TYPE:
|
|
212
|
-
return 'Profiler';
|
|
213
|
-
|
|
214
|
-
case REACT_STRICT_MODE_TYPE:
|
|
215
|
-
return 'StrictMode';
|
|
216
|
-
|
|
217
|
-
case REACT_SUSPENSE_TYPE:
|
|
218
|
-
return 'Suspense';
|
|
219
|
-
|
|
220
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
221
|
-
return 'SuspenseList';
|
|
222
|
-
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
if (typeof type === 'object') {
|
|
226
|
-
switch (type.$$typeof) {
|
|
227
|
-
case REACT_CONTEXT_TYPE:
|
|
228
|
-
var context = type;
|
|
229
|
-
return getContextName(context) + '.Consumer';
|
|
230
|
-
|
|
231
|
-
case REACT_PROVIDER_TYPE:
|
|
232
|
-
var provider = type;
|
|
233
|
-
return getContextName(provider._context) + '.Provider';
|
|
234
|
-
|
|
235
|
-
case REACT_FORWARD_REF_TYPE:
|
|
236
|
-
return getWrappedName(type, type.render, 'ForwardRef');
|
|
237
|
-
|
|
238
|
-
case REACT_MEMO_TYPE:
|
|
239
|
-
var outerName = type.displayName || null;
|
|
240
|
-
|
|
241
|
-
if (outerName !== null) {
|
|
242
|
-
return outerName;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
return getComponentNameFromType(type.type) || 'Memo';
|
|
246
|
-
|
|
247
|
-
case REACT_LAZY_TYPE:
|
|
248
|
-
{
|
|
249
|
-
var lazyComponent = type;
|
|
250
|
-
var payload = lazyComponent._payload;
|
|
251
|
-
var init = lazyComponent._init;
|
|
252
|
-
|
|
253
|
-
try {
|
|
254
|
-
return getComponentNameFromType(init(payload));
|
|
255
|
-
} catch (x) {
|
|
256
|
-
return null;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// eslint-disable-next-line no-fallthrough
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
return null;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
var assign = Object.assign;
|
|
268
|
-
|
|
269
|
-
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
270
|
-
// replaying on render function. This currently only patches the object
|
|
271
|
-
// lazily which won't cover if the log function was extracted eagerly.
|
|
272
|
-
// We could also eagerly patch the method.
|
|
273
|
-
var disabledDepth = 0;
|
|
274
|
-
var prevLog;
|
|
275
|
-
var prevInfo;
|
|
276
|
-
var prevWarn;
|
|
277
|
-
var prevError;
|
|
278
|
-
var prevGroup;
|
|
279
|
-
var prevGroupCollapsed;
|
|
280
|
-
var prevGroupEnd;
|
|
281
|
-
|
|
282
|
-
function disabledLog() {}
|
|
283
|
-
|
|
284
|
-
disabledLog.__reactDisabledLog = true;
|
|
285
|
-
function disableLogs() {
|
|
286
|
-
{
|
|
287
|
-
if (disabledDepth === 0) {
|
|
288
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
289
|
-
prevLog = console.log;
|
|
290
|
-
prevInfo = console.info;
|
|
291
|
-
prevWarn = console.warn;
|
|
292
|
-
prevError = console.error;
|
|
293
|
-
prevGroup = console.group;
|
|
294
|
-
prevGroupCollapsed = console.groupCollapsed;
|
|
295
|
-
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
296
|
-
|
|
297
|
-
var props = {
|
|
298
|
-
configurable: true,
|
|
299
|
-
enumerable: true,
|
|
300
|
-
value: disabledLog,
|
|
301
|
-
writable: true
|
|
302
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
303
|
-
|
|
304
|
-
Object.defineProperties(console, {
|
|
305
|
-
info: props,
|
|
306
|
-
log: props,
|
|
307
|
-
warn: props,
|
|
308
|
-
error: props,
|
|
309
|
-
group: props,
|
|
310
|
-
groupCollapsed: props,
|
|
311
|
-
groupEnd: props
|
|
312
|
-
});
|
|
313
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
disabledDepth++;
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
function reenableLogs() {
|
|
320
|
-
{
|
|
321
|
-
disabledDepth--;
|
|
322
|
-
|
|
323
|
-
if (disabledDepth === 0) {
|
|
324
|
-
/* eslint-disable react-internal/no-production-logging */
|
|
325
|
-
var props = {
|
|
326
|
-
configurable: true,
|
|
327
|
-
enumerable: true,
|
|
328
|
-
writable: true
|
|
329
|
-
}; // $FlowFixMe Flow thinks console is immutable.
|
|
330
|
-
|
|
331
|
-
Object.defineProperties(console, {
|
|
332
|
-
log: assign({}, props, {
|
|
333
|
-
value: prevLog
|
|
334
|
-
}),
|
|
335
|
-
info: assign({}, props, {
|
|
336
|
-
value: prevInfo
|
|
337
|
-
}),
|
|
338
|
-
warn: assign({}, props, {
|
|
339
|
-
value: prevWarn
|
|
340
|
-
}),
|
|
341
|
-
error: assign({}, props, {
|
|
342
|
-
value: prevError
|
|
343
|
-
}),
|
|
344
|
-
group: assign({}, props, {
|
|
345
|
-
value: prevGroup
|
|
346
|
-
}),
|
|
347
|
-
groupCollapsed: assign({}, props, {
|
|
348
|
-
value: prevGroupCollapsed
|
|
349
|
-
}),
|
|
350
|
-
groupEnd: assign({}, props, {
|
|
351
|
-
value: prevGroupEnd
|
|
352
|
-
})
|
|
353
|
-
});
|
|
354
|
-
/* eslint-enable react-internal/no-production-logging */
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
if (disabledDepth < 0) {
|
|
358
|
-
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
|
364
|
-
var prefix;
|
|
365
|
-
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
366
|
-
{
|
|
367
|
-
if (prefix === undefined) {
|
|
368
|
-
// Extract the VM specific prefix used by each line.
|
|
369
|
-
try {
|
|
370
|
-
throw Error();
|
|
371
|
-
} catch (x) {
|
|
372
|
-
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
373
|
-
prefix = match && match[1] || '';
|
|
374
|
-
}
|
|
375
|
-
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
return '\n' + prefix + name;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
var reentry = false;
|
|
382
|
-
var componentFrameCache;
|
|
383
|
-
|
|
384
|
-
{
|
|
385
|
-
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
386
|
-
componentFrameCache = new PossiblyWeakMap();
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
function describeNativeComponentFrame(fn, construct) {
|
|
390
|
-
// If something asked for a stack inside a fake render, it should get ignored.
|
|
391
|
-
if ( !fn || reentry) {
|
|
392
|
-
return '';
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
{
|
|
396
|
-
var frame = componentFrameCache.get(fn);
|
|
397
|
-
|
|
398
|
-
if (frame !== undefined) {
|
|
399
|
-
return frame;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
var control;
|
|
404
|
-
reentry = true;
|
|
405
|
-
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
406
|
-
|
|
407
|
-
Error.prepareStackTrace = undefined;
|
|
408
|
-
var previousDispatcher;
|
|
409
|
-
|
|
410
|
-
{
|
|
411
|
-
previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
412
|
-
// for warnings.
|
|
413
|
-
|
|
414
|
-
ReactCurrentDispatcher.current = null;
|
|
415
|
-
disableLogs();
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
try {
|
|
419
|
-
// This should throw.
|
|
420
|
-
if (construct) {
|
|
421
|
-
// Something should be setting the props in the constructor.
|
|
422
|
-
var Fake = function () {
|
|
423
|
-
throw Error();
|
|
424
|
-
}; // $FlowFixMe
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
Object.defineProperty(Fake.prototype, 'props', {
|
|
428
|
-
set: function () {
|
|
429
|
-
// We use a throwing setter instead of frozen or non-writable props
|
|
430
|
-
// because that won't throw in a non-strict mode function.
|
|
431
|
-
throw Error();
|
|
432
|
-
}
|
|
433
|
-
});
|
|
434
|
-
|
|
435
|
-
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
436
|
-
// We construct a different control for this case to include any extra
|
|
437
|
-
// frames added by the construct call.
|
|
438
|
-
try {
|
|
439
|
-
Reflect.construct(Fake, []);
|
|
440
|
-
} catch (x) {
|
|
441
|
-
control = x;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
Reflect.construct(fn, [], Fake);
|
|
445
|
-
} else {
|
|
446
|
-
try {
|
|
447
|
-
Fake.call();
|
|
448
|
-
} catch (x) {
|
|
449
|
-
control = x;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
fn.call(Fake.prototype);
|
|
453
|
-
}
|
|
454
|
-
} else {
|
|
455
|
-
try {
|
|
456
|
-
throw Error();
|
|
457
|
-
} catch (x) {
|
|
458
|
-
control = x;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
fn();
|
|
462
|
-
}
|
|
463
|
-
} catch (sample) {
|
|
464
|
-
// This is inlined manually because closure doesn't do it for us.
|
|
465
|
-
if (sample && control && typeof sample.stack === 'string') {
|
|
466
|
-
// This extracts the first frame from the sample that isn't also in the control.
|
|
467
|
-
// Skipping one frame that we assume is the frame that calls the two.
|
|
468
|
-
var sampleLines = sample.stack.split('\n');
|
|
469
|
-
var controlLines = control.stack.split('\n');
|
|
470
|
-
var s = sampleLines.length - 1;
|
|
471
|
-
var c = controlLines.length - 1;
|
|
472
|
-
|
|
473
|
-
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
474
|
-
// We expect at least one stack frame to be shared.
|
|
475
|
-
// Typically this will be the root most one. However, stack frames may be
|
|
476
|
-
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
477
|
-
// earlier than the other. We assume that the sample is longer or the same
|
|
478
|
-
// and there for cut off earlier. So we should find the root most frame in
|
|
479
|
-
// the sample somewhere in the control.
|
|
480
|
-
c--;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
for (; s >= 1 && c >= 0; s--, c--) {
|
|
484
|
-
// Next we find the first one that isn't the same which should be the
|
|
485
|
-
// frame that called our sample function and the control.
|
|
486
|
-
if (sampleLines[s] !== controlLines[c]) {
|
|
487
|
-
// In V8, the first line is describing the message but other VMs don't.
|
|
488
|
-
// If we're about to return the first line, and the control is also on the same
|
|
489
|
-
// line, that's a pretty good indicator that our sample threw at same line as
|
|
490
|
-
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
491
|
-
// This can happen if you passed a class to function component, or non-function.
|
|
492
|
-
if (s !== 1 || c !== 1) {
|
|
493
|
-
do {
|
|
494
|
-
s--;
|
|
495
|
-
c--; // We may still have similar intermediate frames from the construct call.
|
|
496
|
-
// The next one that isn't the same should be our match though.
|
|
497
|
-
|
|
498
|
-
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
499
|
-
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
500
|
-
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
501
|
-
// but we have a user-provided "displayName"
|
|
502
|
-
// splice it in to make the stack more readable.
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
506
|
-
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
{
|
|
510
|
-
if (typeof fn === 'function') {
|
|
511
|
-
componentFrameCache.set(fn, _frame);
|
|
512
|
-
}
|
|
513
|
-
} // Return the line we found.
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
return _frame;
|
|
517
|
-
}
|
|
518
|
-
} while (s >= 1 && c >= 0);
|
|
519
|
-
}
|
|
520
|
-
|
|
521
|
-
break;
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
|
-
} finally {
|
|
526
|
-
reentry = false;
|
|
527
|
-
|
|
528
|
-
{
|
|
529
|
-
ReactCurrentDispatcher.current = previousDispatcher;
|
|
530
|
-
reenableLogs();
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
534
|
-
} // Fallback to just using the name if we couldn't make it throw.
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
var name = fn ? fn.displayName || fn.name : '';
|
|
538
|
-
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
539
|
-
|
|
540
|
-
{
|
|
541
|
-
if (typeof fn === 'function') {
|
|
542
|
-
componentFrameCache.set(fn, syntheticFrame);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
return syntheticFrame;
|
|
547
|
-
}
|
|
548
|
-
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
549
|
-
{
|
|
550
|
-
return describeNativeComponentFrame(fn, false);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
function shouldConstruct(Component) {
|
|
555
|
-
var prototype = Component.prototype;
|
|
556
|
-
return !!(prototype && prototype.isReactComponent);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
560
|
-
|
|
561
|
-
if (type == null) {
|
|
562
|
-
return '';
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
if (typeof type === 'function') {
|
|
566
|
-
{
|
|
567
|
-
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
if (typeof type === 'string') {
|
|
572
|
-
return describeBuiltInComponentFrame(type);
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
switch (type) {
|
|
576
|
-
case REACT_SUSPENSE_TYPE:
|
|
577
|
-
return describeBuiltInComponentFrame('Suspense');
|
|
578
|
-
|
|
579
|
-
case REACT_SUSPENSE_LIST_TYPE:
|
|
580
|
-
return describeBuiltInComponentFrame('SuspenseList');
|
|
581
|
-
}
|
|
582
|
-
|
|
583
|
-
if (typeof type === 'object') {
|
|
584
|
-
switch (type.$$typeof) {
|
|
585
|
-
case REACT_FORWARD_REF_TYPE:
|
|
586
|
-
return describeFunctionComponentFrame(type.render);
|
|
587
|
-
|
|
588
|
-
case REACT_MEMO_TYPE:
|
|
589
|
-
// Memo may contain any component type so we recursively resolve it.
|
|
590
|
-
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
591
|
-
|
|
592
|
-
case REACT_LAZY_TYPE:
|
|
593
|
-
{
|
|
594
|
-
var lazyComponent = type;
|
|
595
|
-
var payload = lazyComponent._payload;
|
|
596
|
-
var init = lazyComponent._init;
|
|
597
|
-
|
|
598
|
-
try {
|
|
599
|
-
// Lazy may contain any component type so we recursively resolve it.
|
|
600
|
-
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
601
|
-
} catch (x) {}
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
|
|
606
|
-
return '';
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
610
|
-
|
|
611
|
-
var loggedTypeFailures = {};
|
|
612
|
-
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
613
|
-
|
|
614
|
-
function setCurrentlyValidatingElement(element) {
|
|
615
|
-
{
|
|
616
|
-
if (element) {
|
|
617
|
-
var owner = element._owner;
|
|
618
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
619
|
-
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
|
620
|
-
} else {
|
|
621
|
-
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
|
622
|
-
}
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
627
|
-
{
|
|
628
|
-
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
629
|
-
var has = Function.call.bind(hasOwnProperty);
|
|
630
|
-
|
|
631
|
-
for (var typeSpecName in typeSpecs) {
|
|
632
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
633
|
-
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
634
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
635
|
-
// After these have been cleaned up, we'll let them throw.
|
|
636
|
-
|
|
637
|
-
try {
|
|
638
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
639
|
-
// behavior as without this statement except with a better message.
|
|
640
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
641
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
|
642
|
-
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`.');
|
|
643
|
-
err.name = 'Invariant Violation';
|
|
644
|
-
throw err;
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
648
|
-
} catch (ex) {
|
|
649
|
-
error$1 = ex;
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
if (error$1 && !(error$1 instanceof Error)) {
|
|
653
|
-
setCurrentlyValidatingElement(element);
|
|
654
|
-
|
|
655
|
-
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);
|
|
656
|
-
|
|
657
|
-
setCurrentlyValidatingElement(null);
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
661
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
662
|
-
// same error.
|
|
663
|
-
loggedTypeFailures[error$1.message] = true;
|
|
664
|
-
setCurrentlyValidatingElement(element);
|
|
665
|
-
|
|
666
|
-
error('Failed %s type: %s', location, error$1.message);
|
|
667
|
-
|
|
668
|
-
setCurrentlyValidatingElement(null);
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
}
|
|
673
|
-
}
|
|
674
|
-
|
|
675
|
-
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
676
|
-
|
|
677
|
-
function isArray(a) {
|
|
678
|
-
return isArrayImpl(a);
|
|
679
|
-
}
|
|
680
|
-
|
|
681
|
-
/*
|
|
682
|
-
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
683
|
-
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
684
|
-
*
|
|
685
|
-
* The functions in this module will throw an easier-to-understand,
|
|
686
|
-
* easier-to-debug exception with a clear errors message message explaining the
|
|
687
|
-
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
688
|
-
* of the `value` object).
|
|
689
|
-
*/
|
|
690
|
-
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
691
|
-
function typeName(value) {
|
|
692
|
-
{
|
|
693
|
-
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
694
|
-
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
695
|
-
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
696
|
-
return type;
|
|
697
|
-
}
|
|
698
|
-
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
function willCoercionThrow(value) {
|
|
702
|
-
{
|
|
703
|
-
try {
|
|
704
|
-
testStringCoercion(value);
|
|
705
|
-
return false;
|
|
706
|
-
} catch (e) {
|
|
707
|
-
return true;
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
function testStringCoercion(value) {
|
|
713
|
-
// If you ended up here by following an exception call stack, here's what's
|
|
714
|
-
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
715
|
-
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
716
|
-
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
717
|
-
//
|
|
718
|
-
// The most common types that will cause this exception are `Symbol` instances
|
|
719
|
-
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
720
|
-
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
721
|
-
// exception. (Library authors do this to prevent users from using built-in
|
|
722
|
-
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
723
|
-
// methods are needed to perform accurate arithmetic or comparison.)
|
|
724
|
-
//
|
|
725
|
-
// To fix the problem, coerce this object or symbol value to a string before
|
|
726
|
-
// passing it to React. The most reliable way is usually `String(value)`.
|
|
727
|
-
//
|
|
728
|
-
// To find which value is throwing, check the browser or debugger console.
|
|
729
|
-
// Before this exception was thrown, there should be `console.error` output
|
|
730
|
-
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
731
|
-
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
732
|
-
// In most cases, this console output also shows the component and its
|
|
733
|
-
// ancestor components where the exception happened.
|
|
734
|
-
//
|
|
735
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
736
|
-
return '' + value;
|
|
737
|
-
}
|
|
738
|
-
function checkKeyStringCoercion(value) {
|
|
739
|
-
{
|
|
740
|
-
if (willCoercionThrow(value)) {
|
|
741
|
-
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
742
|
-
|
|
743
|
-
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
}
|
|
747
|
-
|
|
748
|
-
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
|
|
749
|
-
var RESERVED_PROPS = {
|
|
750
|
-
key: true,
|
|
751
|
-
ref: true,
|
|
752
|
-
__self: true,
|
|
753
|
-
__source: true
|
|
754
|
-
};
|
|
755
|
-
var specialPropKeyWarningShown;
|
|
756
|
-
var specialPropRefWarningShown;
|
|
757
|
-
var didWarnAboutStringRefs;
|
|
758
|
-
|
|
759
|
-
{
|
|
760
|
-
didWarnAboutStringRefs = {};
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
function hasValidRef(config) {
|
|
764
|
-
{
|
|
765
|
-
if (hasOwnProperty.call(config, 'ref')) {
|
|
766
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
767
|
-
|
|
768
|
-
if (getter && getter.isReactWarning) {
|
|
769
|
-
return false;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
return config.ref !== undefined;
|
|
775
|
-
}
|
|
776
|
-
|
|
777
|
-
function hasValidKey(config) {
|
|
778
|
-
{
|
|
779
|
-
if (hasOwnProperty.call(config, 'key')) {
|
|
780
|
-
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
781
|
-
|
|
782
|
-
if (getter && getter.isReactWarning) {
|
|
783
|
-
return false;
|
|
784
|
-
}
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
return config.key !== undefined;
|
|
789
|
-
}
|
|
790
|
-
|
|
791
|
-
function warnIfStringRefCannotBeAutoConverted(config, self) {
|
|
792
|
-
{
|
|
793
|
-
if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
|
|
794
|
-
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
795
|
-
|
|
796
|
-
if (!didWarnAboutStringRefs[componentName]) {
|
|
797
|
-
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);
|
|
798
|
-
|
|
799
|
-
didWarnAboutStringRefs[componentName] = true;
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
function defineKeyPropWarningGetter(props, displayName) {
|
|
806
|
-
{
|
|
807
|
-
var warnAboutAccessingKey = function () {
|
|
808
|
-
if (!specialPropKeyWarningShown) {
|
|
809
|
-
specialPropKeyWarningShown = true;
|
|
810
|
-
|
|
811
|
-
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);
|
|
812
|
-
}
|
|
813
|
-
};
|
|
814
|
-
|
|
815
|
-
warnAboutAccessingKey.isReactWarning = true;
|
|
816
|
-
Object.defineProperty(props, 'key', {
|
|
817
|
-
get: warnAboutAccessingKey,
|
|
818
|
-
configurable: true
|
|
819
|
-
});
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
function defineRefPropWarningGetter(props, displayName) {
|
|
824
|
-
{
|
|
825
|
-
var warnAboutAccessingRef = function () {
|
|
826
|
-
if (!specialPropRefWarningShown) {
|
|
827
|
-
specialPropRefWarningShown = true;
|
|
828
|
-
|
|
829
|
-
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);
|
|
830
|
-
}
|
|
831
|
-
};
|
|
832
|
-
|
|
833
|
-
warnAboutAccessingRef.isReactWarning = true;
|
|
834
|
-
Object.defineProperty(props, 'ref', {
|
|
835
|
-
get: warnAboutAccessingRef,
|
|
836
|
-
configurable: true
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
/**
|
|
841
|
-
* Factory method to create a new React element. This no longer adheres to
|
|
842
|
-
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
843
|
-
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
844
|
-
* if something is a React Element.
|
|
845
|
-
*
|
|
846
|
-
* @param {*} type
|
|
847
|
-
* @param {*} props
|
|
848
|
-
* @param {*} key
|
|
849
|
-
* @param {string|object} ref
|
|
850
|
-
* @param {*} owner
|
|
851
|
-
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
852
|
-
* different from the `owner` when React.createElement is called, so that we
|
|
853
|
-
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
854
|
-
* functions, and as long as `this` and owner are the same, there will be no
|
|
855
|
-
* change in behavior.
|
|
856
|
-
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
857
|
-
* indicating filename, line number, and/or other information.
|
|
858
|
-
* @internal
|
|
859
|
-
*/
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
863
|
-
var element = {
|
|
864
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
865
|
-
$$typeof: REACT_ELEMENT_TYPE,
|
|
866
|
-
// Built-in properties that belong on the element
|
|
867
|
-
type: type,
|
|
868
|
-
key: key,
|
|
869
|
-
ref: ref,
|
|
870
|
-
props: props,
|
|
871
|
-
// Record the component responsible for creating this element.
|
|
872
|
-
_owner: owner
|
|
873
|
-
};
|
|
874
|
-
|
|
875
|
-
{
|
|
876
|
-
// The validation flag is currently mutative. We put it on
|
|
877
|
-
// an external backing store so that we can freeze the whole object.
|
|
878
|
-
// This can be replaced with a WeakMap once they are implemented in
|
|
879
|
-
// commonly used development environments.
|
|
880
|
-
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
881
|
-
// the validation flag non-enumerable (where possible, which should
|
|
882
|
-
// include every environment we run tests in), so the test framework
|
|
883
|
-
// ignores it.
|
|
884
|
-
|
|
885
|
-
Object.defineProperty(element._store, 'validated', {
|
|
886
|
-
configurable: false,
|
|
887
|
-
enumerable: false,
|
|
888
|
-
writable: true,
|
|
889
|
-
value: false
|
|
890
|
-
}); // self and source are DEV only properties.
|
|
891
|
-
|
|
892
|
-
Object.defineProperty(element, '_self', {
|
|
893
|
-
configurable: false,
|
|
894
|
-
enumerable: false,
|
|
895
|
-
writable: false,
|
|
896
|
-
value: self
|
|
897
|
-
}); // Two elements created in two different places should be considered
|
|
898
|
-
// equal for testing purposes and therefore we hide it from enumeration.
|
|
899
|
-
|
|
900
|
-
Object.defineProperty(element, '_source', {
|
|
901
|
-
configurable: false,
|
|
902
|
-
enumerable: false,
|
|
903
|
-
writable: false,
|
|
904
|
-
value: source
|
|
905
|
-
});
|
|
906
|
-
|
|
907
|
-
if (Object.freeze) {
|
|
908
|
-
Object.freeze(element.props);
|
|
909
|
-
Object.freeze(element);
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
return element;
|
|
914
|
-
};
|
|
915
|
-
/**
|
|
916
|
-
* https://github.com/reactjs/rfcs/pull/107
|
|
917
|
-
* @param {*} type
|
|
918
|
-
* @param {object} props
|
|
919
|
-
* @param {string} key
|
|
920
|
-
*/
|
|
921
|
-
|
|
922
|
-
function jsxDEV(type, config, maybeKey, source, self) {
|
|
923
|
-
{
|
|
924
|
-
var propName; // Reserved names are extracted
|
|
925
|
-
|
|
926
|
-
var props = {};
|
|
927
|
-
var key = null;
|
|
928
|
-
var ref = null; // Currently, key can be spread in as a prop. This causes a potential
|
|
929
|
-
// issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
|
|
930
|
-
// or <div key="Hi" {...props} /> ). We want to deprecate key spread,
|
|
931
|
-
// but as an intermediary step, we will use jsxDEV for everything except
|
|
932
|
-
// <div {...props} key="Hi" />, because we aren't currently able to tell if
|
|
933
|
-
// key is explicitly declared to be undefined or not.
|
|
934
|
-
|
|
935
|
-
if (maybeKey !== undefined) {
|
|
936
|
-
{
|
|
937
|
-
checkKeyStringCoercion(maybeKey);
|
|
938
|
-
}
|
|
939
|
-
|
|
940
|
-
key = '' + maybeKey;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
if (hasValidKey(config)) {
|
|
944
|
-
{
|
|
945
|
-
checkKeyStringCoercion(config.key);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
key = '' + config.key;
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
if (hasValidRef(config)) {
|
|
952
|
-
ref = config.ref;
|
|
953
|
-
warnIfStringRefCannotBeAutoConverted(config, self);
|
|
954
|
-
} // Remaining properties are added to a new props object
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
for (propName in config) {
|
|
958
|
-
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
959
|
-
props[propName] = config[propName];
|
|
960
|
-
}
|
|
961
|
-
} // Resolve default props
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
if (type && type.defaultProps) {
|
|
965
|
-
var defaultProps = type.defaultProps;
|
|
966
|
-
|
|
967
|
-
for (propName in defaultProps) {
|
|
968
|
-
if (props[propName] === undefined) {
|
|
969
|
-
props[propName] = defaultProps[propName];
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
if (key || ref) {
|
|
975
|
-
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
976
|
-
|
|
977
|
-
if (key) {
|
|
978
|
-
defineKeyPropWarningGetter(props, displayName);
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
if (ref) {
|
|
982
|
-
defineRefPropWarningGetter(props, displayName);
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
|
|
986
|
-
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
|
|
991
|
-
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
992
|
-
|
|
993
|
-
function setCurrentlyValidatingElement$1(element) {
|
|
994
|
-
{
|
|
995
|
-
if (element) {
|
|
996
|
-
var owner = element._owner;
|
|
997
|
-
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
998
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
999
|
-
} else {
|
|
1000
|
-
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
var propTypesMisspellWarningShown;
|
|
1006
|
-
|
|
1007
|
-
{
|
|
1008
|
-
propTypesMisspellWarningShown = false;
|
|
1009
|
-
}
|
|
1010
|
-
/**
|
|
1011
|
-
* Verifies the object is a ReactElement.
|
|
1012
|
-
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
1013
|
-
* @param {?object} object
|
|
1014
|
-
* @return {boolean} True if `object` is a ReactElement.
|
|
1015
|
-
* @final
|
|
1016
|
-
*/
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
function isValidElement(object) {
|
|
1020
|
-
{
|
|
1021
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
|
-
function getDeclarationErrorAddendum() {
|
|
1026
|
-
{
|
|
1027
|
-
if (ReactCurrentOwner$1.current) {
|
|
1028
|
-
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
|
|
1029
|
-
|
|
1030
|
-
if (name) {
|
|
1031
|
-
return '\n\nCheck the render method of `' + name + '`.';
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
return '';
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
function getSourceInfoErrorAddendum(source) {
|
|
1040
|
-
{
|
|
1041
|
-
if (source !== undefined) {
|
|
1042
|
-
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
1043
|
-
var lineNumber = source.lineNumber;
|
|
1044
|
-
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
return '';
|
|
1048
|
-
}
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
1052
|
-
* object keys are not valid. This allows us to keep track of children between
|
|
1053
|
-
* updates.
|
|
1054
|
-
*/
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
var ownerHasKeyUseWarning = {};
|
|
1058
|
-
|
|
1059
|
-
function getCurrentComponentErrorInfo(parentType) {
|
|
1060
|
-
{
|
|
1061
|
-
var info = getDeclarationErrorAddendum();
|
|
1062
|
-
|
|
1063
|
-
if (!info) {
|
|
1064
|
-
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
1065
|
-
|
|
1066
|
-
if (parentName) {
|
|
1067
|
-
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
return info;
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
/**
|
|
1075
|
-
* Warn if the element doesn't have an explicit key assigned to it.
|
|
1076
|
-
* This element is in an array. The array could grow and shrink or be
|
|
1077
|
-
* reordered. All children that haven't already been validated are required to
|
|
1078
|
-
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
1079
|
-
* will only be shown once.
|
|
1080
|
-
*
|
|
1081
|
-
* @internal
|
|
1082
|
-
* @param {ReactElement} element Element that requires a key.
|
|
1083
|
-
* @param {*} parentType element's parent's type.
|
|
1084
|
-
*/
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
function validateExplicitKey(element, parentType) {
|
|
1088
|
-
{
|
|
1089
|
-
if (!element._store || element._store.validated || element.key != null) {
|
|
1090
|
-
return;
|
|
1091
|
-
}
|
|
1092
|
-
|
|
1093
|
-
element._store.validated = true;
|
|
1094
|
-
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
1095
|
-
|
|
1096
|
-
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
1097
|
-
return;
|
|
1098
|
-
}
|
|
1099
|
-
|
|
1100
|
-
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
1101
|
-
// property, it may be the creator of the child that's responsible for
|
|
1102
|
-
// assigning it a key.
|
|
1103
|
-
|
|
1104
|
-
var childOwner = '';
|
|
1105
|
-
|
|
1106
|
-
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
|
|
1107
|
-
// Give the component that originally created this child.
|
|
1108
|
-
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
1109
|
-
}
|
|
1110
|
-
|
|
1111
|
-
setCurrentlyValidatingElement$1(element);
|
|
1112
|
-
|
|
1113
|
-
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);
|
|
1114
|
-
|
|
1115
|
-
setCurrentlyValidatingElement$1(null);
|
|
1116
|
-
}
|
|
1117
|
-
}
|
|
1118
|
-
/**
|
|
1119
|
-
* Ensure that every element either is passed in a static location, in an
|
|
1120
|
-
* array with an explicit keys property defined, or in an object literal
|
|
1121
|
-
* with valid key property.
|
|
1122
|
-
*
|
|
1123
|
-
* @internal
|
|
1124
|
-
* @param {ReactNode} node Statically passed child of any type.
|
|
1125
|
-
* @param {*} parentType node's parent's type.
|
|
1126
|
-
*/
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
function validateChildKeys(node, parentType) {
|
|
1130
|
-
{
|
|
1131
|
-
if (typeof node !== 'object') {
|
|
1132
|
-
return;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
if (isArray(node)) {
|
|
1136
|
-
for (var i = 0; i < node.length; i++) {
|
|
1137
|
-
var child = node[i];
|
|
1138
|
-
|
|
1139
|
-
if (isValidElement(child)) {
|
|
1140
|
-
validateExplicitKey(child, parentType);
|
|
1141
|
-
}
|
|
1142
|
-
}
|
|
1143
|
-
} else if (isValidElement(node)) {
|
|
1144
|
-
// This element was passed in a valid location.
|
|
1145
|
-
if (node._store) {
|
|
1146
|
-
node._store.validated = true;
|
|
1147
|
-
}
|
|
1148
|
-
} else if (node) {
|
|
1149
|
-
var iteratorFn = getIteratorFn(node);
|
|
1150
|
-
|
|
1151
|
-
if (typeof iteratorFn === 'function') {
|
|
1152
|
-
// Entry iterators used to provide implicit keys,
|
|
1153
|
-
// but now we print a separate warning for them later.
|
|
1154
|
-
if (iteratorFn !== node.entries) {
|
|
1155
|
-
var iterator = iteratorFn.call(node);
|
|
1156
|
-
var step;
|
|
1157
|
-
|
|
1158
|
-
while (!(step = iterator.next()).done) {
|
|
1159
|
-
if (isValidElement(step.value)) {
|
|
1160
|
-
validateExplicitKey(step.value, parentType);
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
}
|
|
1168
|
-
/**
|
|
1169
|
-
* Given an element, validate that its props follow the propTypes definition,
|
|
1170
|
-
* provided by the type.
|
|
1171
|
-
*
|
|
1172
|
-
* @param {ReactElement} element
|
|
1173
|
-
*/
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
function validatePropTypes(element) {
|
|
1177
|
-
{
|
|
1178
|
-
var type = element.type;
|
|
1179
|
-
|
|
1180
|
-
if (type === null || type === undefined || typeof type === 'string') {
|
|
1181
|
-
return;
|
|
1182
|
-
}
|
|
1183
|
-
|
|
1184
|
-
var propTypes;
|
|
1185
|
-
|
|
1186
|
-
if (typeof type === 'function') {
|
|
1187
|
-
propTypes = type.propTypes;
|
|
1188
|
-
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
1189
|
-
// Inner props are checked in the reconciler.
|
|
1190
|
-
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
1191
|
-
propTypes = type.propTypes;
|
|
1192
|
-
} else {
|
|
1193
|
-
return;
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
if (propTypes) {
|
|
1197
|
-
// Intentionally inside to avoid triggering lazy initializers:
|
|
1198
|
-
var name = getComponentNameFromType(type);
|
|
1199
|
-
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
1200
|
-
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
1201
|
-
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
1202
|
-
|
|
1203
|
-
var _name = getComponentNameFromType(type);
|
|
1204
|
-
|
|
1205
|
-
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
1209
|
-
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
}
|
|
1213
|
-
/**
|
|
1214
|
-
* Given a fragment, validate that it can only be provided with fragment props
|
|
1215
|
-
* @param {ReactElement} fragment
|
|
1216
|
-
*/
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
function validateFragmentProps(fragment) {
|
|
1220
|
-
{
|
|
1221
|
-
var keys = Object.keys(fragment.props);
|
|
1222
|
-
|
|
1223
|
-
for (var i = 0; i < keys.length; i++) {
|
|
1224
|
-
var key = keys[i];
|
|
1225
|
-
|
|
1226
|
-
if (key !== 'children' && key !== 'key') {
|
|
1227
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1228
|
-
|
|
1229
|
-
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
1230
|
-
|
|
1231
|
-
setCurrentlyValidatingElement$1(null);
|
|
1232
|
-
break;
|
|
1233
|
-
}
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
if (fragment.ref !== null) {
|
|
1237
|
-
setCurrentlyValidatingElement$1(fragment);
|
|
1238
|
-
|
|
1239
|
-
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
1240
|
-
|
|
1241
|
-
setCurrentlyValidatingElement$1(null);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
var didWarnAboutKeySpread = {};
|
|
1247
|
-
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
|
|
1248
|
-
{
|
|
1249
|
-
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
1250
|
-
// succeed and there will likely be errors in render.
|
|
1251
|
-
|
|
1252
|
-
if (!validType) {
|
|
1253
|
-
var info = '';
|
|
1254
|
-
|
|
1255
|
-
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
1256
|
-
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.";
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
var sourceInfo = getSourceInfoErrorAddendum(source);
|
|
1260
|
-
|
|
1261
|
-
if (sourceInfo) {
|
|
1262
|
-
info += sourceInfo;
|
|
1263
|
-
} else {
|
|
1264
|
-
info += getDeclarationErrorAddendum();
|
|
1265
|
-
}
|
|
1266
|
-
|
|
1267
|
-
var typeString;
|
|
1268
|
-
|
|
1269
|
-
if (type === null) {
|
|
1270
|
-
typeString = 'null';
|
|
1271
|
-
} else if (isArray(type)) {
|
|
1272
|
-
typeString = 'array';
|
|
1273
|
-
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
1274
|
-
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
1275
|
-
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
1276
|
-
} else {
|
|
1277
|
-
typeString = typeof type;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
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);
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
|
|
1284
|
-
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
1285
|
-
|
|
1286
|
-
if (element == null) {
|
|
1287
|
-
return element;
|
|
1288
|
-
} // Skip key warning if the type isn't valid since our key validation logic
|
|
1289
|
-
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
1290
|
-
// We don't want exception behavior to differ between dev and prod.
|
|
1291
|
-
// (Rendering will throw with a helpful message and as soon as the type is
|
|
1292
|
-
// fixed, the key warnings will appear.)
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
if (validType) {
|
|
1296
|
-
var children = props.children;
|
|
1297
|
-
|
|
1298
|
-
if (children !== undefined) {
|
|
1299
|
-
if (isStaticChildren) {
|
|
1300
|
-
if (isArray(children)) {
|
|
1301
|
-
for (var i = 0; i < children.length; i++) {
|
|
1302
|
-
validateChildKeys(children[i], type);
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
if (Object.freeze) {
|
|
1306
|
-
Object.freeze(children);
|
|
1307
|
-
}
|
|
1308
|
-
} else {
|
|
1309
|
-
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.');
|
|
1310
|
-
}
|
|
1311
|
-
} else {
|
|
1312
|
-
validateChildKeys(children, type);
|
|
1313
|
-
}
|
|
1314
|
-
}
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
{
|
|
1318
|
-
if (hasOwnProperty.call(props, 'key')) {
|
|
1319
|
-
var componentName = getComponentNameFromType(type);
|
|
1320
|
-
var keys = Object.keys(props).filter(function (k) {
|
|
1321
|
-
return k !== 'key';
|
|
1322
|
-
});
|
|
1323
|
-
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
|
|
1324
|
-
|
|
1325
|
-
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
|
|
1326
|
-
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
|
|
1327
|
-
|
|
1328
|
-
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);
|
|
1329
|
-
|
|
1330
|
-
didWarnAboutKeySpread[componentName + beforeExample] = true;
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
if (type === REACT_FRAGMENT_TYPE) {
|
|
1336
|
-
validateFragmentProps(element);
|
|
1337
|
-
} else {
|
|
1338
|
-
validatePropTypes(element);
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
|
-
return element;
|
|
1342
|
-
}
|
|
1343
|
-
} // These two functions exist to still get child warnings in dev
|
|
1344
|
-
// even with the prod transform. This means that jsxDEV is purely
|
|
1345
|
-
// opt-in behavior for better messages but that we won't stop
|
|
1346
|
-
// giving you warnings if you use production apis.
|
|
1347
|
-
|
|
1348
|
-
function jsxWithValidationStatic(type, props, key) {
|
|
1349
|
-
{
|
|
1350
|
-
return jsxWithValidation(type, props, key, true);
|
|
1351
|
-
}
|
|
1352
|
-
}
|
|
1353
|
-
function jsxWithValidationDynamic(type, props, key) {
|
|
1354
|
-
{
|
|
1355
|
-
return jsxWithValidation(type, props, key, false);
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
|
-
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
|
|
1360
|
-
// for now we can ship identical prod functions
|
|
1361
|
-
|
|
1362
|
-
var jsxs = jsxWithValidationStatic ;
|
|
1363
|
-
|
|
1364
|
-
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
1365
|
-
reactJsxRuntime_development.jsx = jsx;
|
|
1366
|
-
reactJsxRuntime_development.jsxs = jsxs;
|
|
1367
|
-
})();
|
|
1368
|
-
}
|
|
1369
|
-
return reactJsxRuntime_development;
|
|
1370
|
-
}
|
|
1371
|
-
|
|
1372
|
-
if (process.env.NODE_ENV === 'production') {
|
|
1373
|
-
jsxRuntime.exports = requireReactJsxRuntime_production_min();
|
|
1374
|
-
} else {
|
|
1375
|
-
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
var jsxRuntimeExports = jsxRuntime.exports;
|
|
1379
|
-
|
|
1380
8
|
const AvatarList = ({ items, maxVisible = 5, size = 32, ...props }) => {
|
|
1381
9
|
const sizeValue = typeof size === "string" ? parseInt(size, 10) || 32 : size;
|
|
1382
|
-
return (
|
|
10
|
+
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] }))] }));
|
|
1383
11
|
};
|
|
1384
12
|
|
|
1385
13
|
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}
|
|
@@ -1530,7 +158,7 @@ class AvatarGroupColumn extends BaseColumn {
|
|
|
1530
158
|
const { accessor, label, maxVisible, size, overlap, showTooltip, nameField, srcField, fallbackField, showNames, maxNames, } = config;
|
|
1531
159
|
return {
|
|
1532
160
|
accessorKey: accessor,
|
|
1533
|
-
header: () => (
|
|
161
|
+
header: () => (jsx("span", { className: cn("text-muted-foreground font-medium", this.getAlignmentClass(), this.config.headerClassName), children: label || String(accessor) })),
|
|
1534
162
|
cell: ({ getValue, row }) => {
|
|
1535
163
|
const rawValue = getValue();
|
|
1536
164
|
// Items aus den Daten extrahieren
|
|
@@ -1559,11 +187,11 @@ class AvatarGroupColumn extends BaseColumn {
|
|
|
1559
187
|
});
|
|
1560
188
|
}
|
|
1561
189
|
if (items.length === 0) {
|
|
1562
|
-
return
|
|
190
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
1563
191
|
}
|
|
1564
192
|
// Konvertiere zu Datenstruktur für AvatarList
|
|
1565
193
|
const contacts = this.toContactItems(items);
|
|
1566
|
-
return (
|
|
194
|
+
return (jsx("div", { className: cn("flex items-center", this.config.cellClassName), children: jsx(AvatarList, { items: contacts.map((contact) => ({
|
|
1567
195
|
id: contact.id,
|
|
1568
196
|
src: contact.src,
|
|
1569
197
|
alt: contact.alt,
|
|
@@ -1628,9 +256,9 @@ function createSlot(ownerName) {
|
|
|
1628
256
|
return child;
|
|
1629
257
|
}
|
|
1630
258
|
});
|
|
1631
|
-
return /* @__PURE__ */
|
|
259
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });
|
|
1632
260
|
}
|
|
1633
|
-
return /* @__PURE__ */
|
|
261
|
+
return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
1634
262
|
});
|
|
1635
263
|
Slot2.displayName = `${ownerName}.Slot`;
|
|
1636
264
|
return Slot2;
|
|
@@ -1657,7 +285,7 @@ var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
|
1657
285
|
// @__NO_SIDE_EFFECTS__
|
|
1658
286
|
function createSlottable(ownerName) {
|
|
1659
287
|
const Slottable2 = ({ children }) => {
|
|
1660
|
-
return /* @__PURE__ */
|
|
288
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
1661
289
|
};
|
|
1662
290
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
1663
291
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -1766,7 +394,7 @@ const badgeVariants = cva("inline-flex items-center justify-center rounded-full
|
|
|
1766
394
|
});
|
|
1767
395
|
function Badge({ className, variant = "default", asChild = false, ...props }) {
|
|
1768
396
|
const Comp = asChild ? Slot$2 : "span";
|
|
1769
|
-
return (
|
|
397
|
+
return (jsx(Comp, { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), className), ...props }));
|
|
1770
398
|
}
|
|
1771
399
|
|
|
1772
400
|
// src/primitive.tsx
|
|
@@ -1797,7 +425,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
1797
425
|
if (typeof window !== "undefined") {
|
|
1798
426
|
window[Symbol.for("radix-ui")] = true;
|
|
1799
427
|
}
|
|
1800
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
1801
429
|
});
|
|
1802
430
|
Node.displayName = `Primitive.${node}`;
|
|
1803
431
|
return { ...primitive, [node]: Node };
|
|
@@ -1823,7 +451,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
1823
451
|
var NAME$1 = "VisuallyHidden";
|
|
1824
452
|
var VisuallyHidden = React.forwardRef(
|
|
1825
453
|
(props, forwardedRef) => {
|
|
1826
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ jsx(
|
|
1827
455
|
Primitive.span,
|
|
1828
456
|
{
|
|
1829
457
|
...props,
|
|
@@ -1847,7 +475,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
1847
475
|
const { scope, children, ...context } = props;
|
|
1848
476
|
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
|
1849
477
|
const value = React.useMemo(() => context, Object.values(context));
|
|
1850
|
-
return /* @__PURE__ */
|
|
478
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
1851
479
|
};
|
|
1852
480
|
Provider.displayName = rootComponentName + "Provider";
|
|
1853
481
|
function useContext2(consumerName, scope) {
|
|
@@ -1906,7 +534,7 @@ function createCollection(name) {
|
|
|
1906
534
|
const { scope, children } = props;
|
|
1907
535
|
const ref = React__default.useRef(null);
|
|
1908
536
|
const itemMap = React__default.useRef(/* @__PURE__ */ new Map()).current;
|
|
1909
|
-
return /* @__PURE__ */
|
|
537
|
+
return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
1910
538
|
};
|
|
1911
539
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
1912
540
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
@@ -1916,7 +544,7 @@ function createCollection(name) {
|
|
|
1916
544
|
const { scope, children } = props;
|
|
1917
545
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
1918
546
|
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
|
1919
|
-
return /* @__PURE__ */
|
|
547
|
+
return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
1920
548
|
}
|
|
1921
549
|
);
|
|
1922
550
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
@@ -1933,7 +561,7 @@ function createCollection(name) {
|
|
|
1933
561
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
1934
562
|
return () => void context.itemMap.delete(ref);
|
|
1935
563
|
});
|
|
1936
|
-
return /* @__PURE__ */
|
|
564
|
+
return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
|
1937
565
|
}
|
|
1938
566
|
);
|
|
1939
567
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
@@ -2291,7 +919,7 @@ var DismissableLayer = React.forwardRef(
|
|
|
2291
919
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
2292
920
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
2293
921
|
}, []);
|
|
2294
|
-
return /* @__PURE__ */
|
|
922
|
+
return /* @__PURE__ */ jsx(
|
|
2295
923
|
Primitive.div,
|
|
2296
924
|
{
|
|
2297
925
|
...layerProps,
|
|
@@ -2325,7 +953,7 @@ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
|
|
|
2325
953
|
};
|
|
2326
954
|
}
|
|
2327
955
|
}, [context.branches]);
|
|
2328
|
-
return /* @__PURE__ */
|
|
956
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });
|
|
2329
957
|
});
|
|
2330
958
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
2331
959
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -2523,7 +1151,7 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
|
|
|
2523
1151
|
},
|
|
2524
1152
|
[loop, trapped, focusScope.paused]
|
|
2525
1153
|
);
|
|
2526
|
-
return /* @__PURE__ */
|
|
1154
|
+
return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
2527
1155
|
});
|
|
2528
1156
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
2529
1157
|
function focusFirst$2(candidates, { select = false } = {}) {
|
|
@@ -2612,7 +1240,7 @@ var Portal$3 = React.forwardRef((props, forwardedRef) => {
|
|
|
2612
1240
|
const [mounted, setMounted] = React.useState(false);
|
|
2613
1241
|
useLayoutEffect2(() => setMounted(true), []);
|
|
2614
1242
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
2615
|
-
return container ? ReactDOM__default.createPortal(/* @__PURE__ */
|
|
1243
|
+
return container ? ReactDOM__default.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
2616
1244
|
});
|
|
2617
1245
|
Portal$3.displayName = PORTAL_NAME$4;
|
|
2618
1246
|
|
|
@@ -3636,7 +2264,7 @@ function CheckboxProvider(props) {
|
|
|
3636
2264
|
bubbleInput,
|
|
3637
2265
|
setBubbleInput
|
|
3638
2266
|
};
|
|
3639
|
-
return /* @__PURE__ */
|
|
2267
|
+
return /* @__PURE__ */ jsx(
|
|
3640
2268
|
CheckboxProviderImpl,
|
|
3641
2269
|
{
|
|
3642
2270
|
scope: __scopeCheckbox,
|
|
@@ -3670,7 +2298,7 @@ var CheckboxTrigger = React.forwardRef(
|
|
|
3670
2298
|
return () => form.removeEventListener("reset", reset);
|
|
3671
2299
|
}
|
|
3672
2300
|
}, [control, setChecked]);
|
|
3673
|
-
return /* @__PURE__ */
|
|
2301
|
+
return /* @__PURE__ */ jsx(
|
|
3674
2302
|
Primitive.button,
|
|
3675
2303
|
{
|
|
3676
2304
|
type: "button",
|
|
@@ -3712,7 +2340,7 @@ var Checkbox$1 = React.forwardRef(
|
|
|
3712
2340
|
form,
|
|
3713
2341
|
...checkboxProps
|
|
3714
2342
|
} = props;
|
|
3715
|
-
return /* @__PURE__ */
|
|
2343
|
+
return /* @__PURE__ */ jsx(
|
|
3716
2344
|
CheckboxProvider,
|
|
3717
2345
|
{
|
|
3718
2346
|
__scopeCheckbox,
|
|
@@ -3724,8 +2352,8 @@ var Checkbox$1 = React.forwardRef(
|
|
|
3724
2352
|
name,
|
|
3725
2353
|
form,
|
|
3726
2354
|
value,
|
|
3727
|
-
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */
|
|
3728
|
-
/* @__PURE__ */
|
|
2355
|
+
internal_do_not_use_render: ({ isFormControl }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2356
|
+
/* @__PURE__ */ jsx(
|
|
3729
2357
|
CheckboxTrigger,
|
|
3730
2358
|
{
|
|
3731
2359
|
...checkboxProps,
|
|
@@ -3733,7 +2361,7 @@ var Checkbox$1 = React.forwardRef(
|
|
|
3733
2361
|
__scopeCheckbox
|
|
3734
2362
|
}
|
|
3735
2363
|
),
|
|
3736
|
-
isFormControl && /* @__PURE__ */
|
|
2364
|
+
isFormControl && /* @__PURE__ */ jsx(
|
|
3737
2365
|
CheckboxBubbleInput,
|
|
3738
2366
|
{
|
|
3739
2367
|
__scopeCheckbox
|
|
@@ -3750,11 +2378,11 @@ var CheckboxIndicator = React.forwardRef(
|
|
|
3750
2378
|
(props, forwardedRef) => {
|
|
3751
2379
|
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
|
3752
2380
|
const context = useCheckboxContext(INDICATOR_NAME$2, __scopeCheckbox);
|
|
3753
|
-
return /* @__PURE__ */
|
|
2381
|
+
return /* @__PURE__ */ jsx(
|
|
3754
2382
|
Presence,
|
|
3755
2383
|
{
|
|
3756
2384
|
present: forceMount || isIndeterminate$1(context.checked) || context.checked === true,
|
|
3757
|
-
children: /* @__PURE__ */
|
|
2385
|
+
children: /* @__PURE__ */ jsx(
|
|
3758
2386
|
Primitive.span,
|
|
3759
2387
|
{
|
|
3760
2388
|
"data-state": getState(context.checked),
|
|
@@ -3806,7 +2434,7 @@ var CheckboxBubbleInput = React.forwardRef(
|
|
|
3806
2434
|
}
|
|
3807
2435
|
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
|
3808
2436
|
const defaultCheckedRef = React.useRef(isIndeterminate$1(checked) ? false : checked);
|
|
3809
|
-
return /* @__PURE__ */
|
|
2437
|
+
return /* @__PURE__ */ jsx(
|
|
3810
2438
|
Primitive.input,
|
|
3811
2439
|
{
|
|
3812
2440
|
type: "checkbox",
|
|
@@ -6047,7 +4675,7 @@ const arrow = (options, deps) => ({
|
|
|
6047
4675
|
var NAME = "Arrow";
|
|
6048
4676
|
var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
6049
4677
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
6050
|
-
return /* @__PURE__ */
|
|
4678
|
+
return /* @__PURE__ */ jsx(
|
|
6051
4679
|
Primitive.svg,
|
|
6052
4680
|
{
|
|
6053
4681
|
...arrowProps,
|
|
@@ -6056,7 +4684,7 @@ var Arrow$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
6056
4684
|
height,
|
|
6057
4685
|
viewBox: "0 0 30 10",
|
|
6058
4686
|
preserveAspectRatio: "none",
|
|
6059
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
4687
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx("polygon", { points: "0,0 30,0 15,10" })
|
|
6060
4688
|
}
|
|
6061
4689
|
);
|
|
6062
4690
|
});
|
|
@@ -6069,7 +4697,7 @@ var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
|
6069
4697
|
var Popper = (props) => {
|
|
6070
4698
|
const { __scopePopper, children } = props;
|
|
6071
4699
|
const [anchor, setAnchor] = React.useState(null);
|
|
6072
|
-
return /* @__PURE__ */
|
|
4700
|
+
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
6073
4701
|
};
|
|
6074
4702
|
Popper.displayName = POPPER_NAME;
|
|
6075
4703
|
var ANCHOR_NAME$1 = "PopperAnchor";
|
|
@@ -6087,7 +4715,7 @@ var PopperAnchor = React.forwardRef(
|
|
|
6087
4715
|
context.onAnchorChange(anchorRef.current);
|
|
6088
4716
|
}
|
|
6089
4717
|
});
|
|
6090
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
4718
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
6091
4719
|
}
|
|
6092
4720
|
);
|
|
6093
4721
|
PopperAnchor.displayName = ANCHOR_NAME$1;
|
|
@@ -6180,7 +4808,7 @@ var PopperContent = React.forwardRef(
|
|
|
6180
4808
|
useLayoutEffect2(() => {
|
|
6181
4809
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
6182
4810
|
}, [content]);
|
|
6183
|
-
return /* @__PURE__ */
|
|
4811
|
+
return /* @__PURE__ */ jsx(
|
|
6184
4812
|
"div",
|
|
6185
4813
|
{
|
|
6186
4814
|
ref: refs.setFloating,
|
|
@@ -6204,7 +4832,7 @@ var PopperContent = React.forwardRef(
|
|
|
6204
4832
|
}
|
|
6205
4833
|
},
|
|
6206
4834
|
dir: props.dir,
|
|
6207
|
-
children: /* @__PURE__ */
|
|
4835
|
+
children: /* @__PURE__ */ jsx(
|
|
6208
4836
|
PopperContentProvider,
|
|
6209
4837
|
{
|
|
6210
4838
|
scope: __scopePopper,
|
|
@@ -6213,7 +4841,7 @@ var PopperContent = React.forwardRef(
|
|
|
6213
4841
|
arrowX,
|
|
6214
4842
|
arrowY,
|
|
6215
4843
|
shouldHideArrow: cannotCenterArrow,
|
|
6216
|
-
children: /* @__PURE__ */
|
|
4844
|
+
children: /* @__PURE__ */ jsx(
|
|
6217
4845
|
Primitive.div,
|
|
6218
4846
|
{
|
|
6219
4847
|
"data-side": placedSide,
|
|
@@ -6250,7 +4878,7 @@ var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
|
6250
4878
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
6251
4879
|
// doesn't report size as we'd expect on SVG elements.
|
|
6252
4880
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
6253
|
-
/* @__PURE__ */
|
|
4881
|
+
/* @__PURE__ */ jsx(
|
|
6254
4882
|
"span",
|
|
6255
4883
|
{
|
|
6256
4884
|
ref: contentContext.onArrowChange,
|
|
@@ -6273,7 +4901,7 @@ var PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
|
6273
4901
|
}[contentContext.placedSide],
|
|
6274
4902
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
6275
4903
|
},
|
|
6276
|
-
children: /* @__PURE__ */
|
|
4904
|
+
children: /* @__PURE__ */ jsx(
|
|
6277
4905
|
Root$2,
|
|
6278
4906
|
{
|
|
6279
4907
|
...arrowProps,
|
|
@@ -6344,7 +4972,7 @@ var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContext
|
|
|
6344
4972
|
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME$3);
|
|
6345
4973
|
var RovingFocusGroup = React.forwardRef(
|
|
6346
4974
|
(props, forwardedRef) => {
|
|
6347
|
-
return /* @__PURE__ */
|
|
4975
|
+
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 }) }) });
|
|
6348
4976
|
}
|
|
6349
4977
|
);
|
|
6350
4978
|
RovingFocusGroup.displayName = GROUP_NAME$3;
|
|
@@ -6382,7 +5010,7 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
6382
5010
|
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
|
|
6383
5011
|
}
|
|
6384
5012
|
}, [handleEntryFocus]);
|
|
6385
|
-
return /* @__PURE__ */
|
|
5013
|
+
return /* @__PURE__ */ jsx(
|
|
6386
5014
|
RovingFocusProvider,
|
|
6387
5015
|
{
|
|
6388
5016
|
scope: __scopeRovingFocusGroup,
|
|
@@ -6403,7 +5031,7 @@ var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
6403
5031
|
() => setFocusableItemsCount((prevCount) => prevCount - 1),
|
|
6404
5032
|
[]
|
|
6405
5033
|
),
|
|
6406
|
-
children: /* @__PURE__ */
|
|
5034
|
+
children: /* @__PURE__ */ jsx(
|
|
6407
5035
|
Primitive.div,
|
|
6408
5036
|
{
|
|
6409
5037
|
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
@@ -6461,14 +5089,14 @@ var RovingFocusGroupItem = React.forwardRef(
|
|
|
6461
5089
|
return () => onFocusableItemRemove();
|
|
6462
5090
|
}
|
|
6463
5091
|
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
|
6464
|
-
return /* @__PURE__ */
|
|
5092
|
+
return /* @__PURE__ */ jsx(
|
|
6465
5093
|
Collection$2.ItemSlot,
|
|
6466
5094
|
{
|
|
6467
5095
|
scope: __scopeRovingFocusGroup,
|
|
6468
5096
|
id,
|
|
6469
5097
|
focusable,
|
|
6470
5098
|
active,
|
|
6471
|
-
children: /* @__PURE__ */
|
|
5099
|
+
children: /* @__PURE__ */ jsx(
|
|
6472
5100
|
Primitive.span,
|
|
6473
5101
|
{
|
|
6474
5102
|
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
@@ -6587,7 +5215,7 @@ var Menu = (props) => {
|
|
|
6587
5215
|
document.removeEventListener("pointermove", handlePointer, { capture: true });
|
|
6588
5216
|
};
|
|
6589
5217
|
}, []);
|
|
6590
|
-
return /* @__PURE__ */
|
|
5218
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
6591
5219
|
MenuProvider,
|
|
6592
5220
|
{
|
|
6593
5221
|
scope: __scopeMenu,
|
|
@@ -6595,7 +5223,7 @@ var Menu = (props) => {
|
|
|
6595
5223
|
onOpenChange: handleOpenChange,
|
|
6596
5224
|
content,
|
|
6597
5225
|
onContentChange: setContent,
|
|
6598
|
-
children: /* @__PURE__ */
|
|
5226
|
+
children: /* @__PURE__ */ jsx(
|
|
6599
5227
|
MenuRootProvider,
|
|
6600
5228
|
{
|
|
6601
5229
|
scope: __scopeMenu,
|
|
@@ -6615,7 +5243,7 @@ var MenuAnchor = React.forwardRef(
|
|
|
6615
5243
|
(props, forwardedRef) => {
|
|
6616
5244
|
const { __scopeMenu, ...anchorProps } = props;
|
|
6617
5245
|
const popperScope = usePopperScope$2(__scopeMenu);
|
|
6618
|
-
return /* @__PURE__ */
|
|
5246
|
+
return /* @__PURE__ */ jsx(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
6619
5247
|
}
|
|
6620
5248
|
);
|
|
6621
5249
|
MenuAnchor.displayName = ANCHOR_NAME;
|
|
@@ -6626,7 +5254,7 @@ var [PortalProvider$1, usePortalContext$1] = createMenuContext(PORTAL_NAME$3, {
|
|
|
6626
5254
|
var MenuPortal = (props) => {
|
|
6627
5255
|
const { __scopeMenu, forceMount, children, container } = props;
|
|
6628
5256
|
const context = useMenuContext(PORTAL_NAME$3, __scopeMenu);
|
|
6629
|
-
return /* @__PURE__ */
|
|
5257
|
+
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 }) }) });
|
|
6630
5258
|
};
|
|
6631
5259
|
MenuPortal.displayName = PORTAL_NAME$3;
|
|
6632
5260
|
var CONTENT_NAME$3 = "MenuContent";
|
|
@@ -6637,7 +5265,7 @@ var MenuContent = React.forwardRef(
|
|
|
6637
5265
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
6638
5266
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
6639
5267
|
const rootContext = useMenuRootContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
6640
|
-
return /* @__PURE__ */
|
|
5268
|
+
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 }) }) }) });
|
|
6641
5269
|
}
|
|
6642
5270
|
);
|
|
6643
5271
|
var MenuRootContentModal = React.forwardRef(
|
|
@@ -6649,7 +5277,7 @@ var MenuRootContentModal = React.forwardRef(
|
|
|
6649
5277
|
const content = ref.current;
|
|
6650
5278
|
if (content) return hideOthers(content);
|
|
6651
5279
|
}, []);
|
|
6652
|
-
return /* @__PURE__ */
|
|
5280
|
+
return /* @__PURE__ */ jsx(
|
|
6653
5281
|
MenuContentImpl,
|
|
6654
5282
|
{
|
|
6655
5283
|
...props,
|
|
@@ -6669,7 +5297,7 @@ var MenuRootContentModal = React.forwardRef(
|
|
|
6669
5297
|
);
|
|
6670
5298
|
var MenuRootContentNonModal = React.forwardRef((props, forwardedRef) => {
|
|
6671
5299
|
const context = useMenuContext(CONTENT_NAME$3, props.__scopeMenu);
|
|
6672
|
-
return /* @__PURE__ */
|
|
5300
|
+
return /* @__PURE__ */ jsx(
|
|
6673
5301
|
MenuContentImpl,
|
|
6674
5302
|
{
|
|
6675
5303
|
...props,
|
|
@@ -6741,7 +5369,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6741
5369
|
const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;
|
|
6742
5370
|
return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);
|
|
6743
5371
|
}, []);
|
|
6744
|
-
return /* @__PURE__ */
|
|
5372
|
+
return /* @__PURE__ */ jsx(
|
|
6745
5373
|
MenuContentProvider,
|
|
6746
5374
|
{
|
|
6747
5375
|
scope: __scopeMenu,
|
|
@@ -6770,7 +5398,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6770
5398
|
onPointerGraceIntentChange: React.useCallback((intent) => {
|
|
6771
5399
|
pointerGraceIntentRef.current = intent;
|
|
6772
5400
|
}, []),
|
|
6773
|
-
children: /* @__PURE__ */
|
|
5401
|
+
children: /* @__PURE__ */ jsx(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ jsx(
|
|
6774
5402
|
FocusScope,
|
|
6775
5403
|
{
|
|
6776
5404
|
asChild: true,
|
|
@@ -6780,7 +5408,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6780
5408
|
contentRef.current?.focus({ preventScroll: true });
|
|
6781
5409
|
}),
|
|
6782
5410
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
6783
|
-
children: /* @__PURE__ */
|
|
5411
|
+
children: /* @__PURE__ */ jsx(
|
|
6784
5412
|
DismissableLayer,
|
|
6785
5413
|
{
|
|
6786
5414
|
asChild: true,
|
|
@@ -6790,7 +5418,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6790
5418
|
onFocusOutside,
|
|
6791
5419
|
onInteractOutside,
|
|
6792
5420
|
onDismiss,
|
|
6793
|
-
children: /* @__PURE__ */
|
|
5421
|
+
children: /* @__PURE__ */ jsx(
|
|
6794
5422
|
Root$1,
|
|
6795
5423
|
{
|
|
6796
5424
|
asChild: true,
|
|
@@ -6804,7 +5432,7 @@ var MenuContentImpl = React.forwardRef(
|
|
|
6804
5432
|
if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();
|
|
6805
5433
|
}),
|
|
6806
5434
|
preventScrollOnEntryFocus: true,
|
|
6807
|
-
children: /* @__PURE__ */
|
|
5435
|
+
children: /* @__PURE__ */ jsx(
|
|
6808
5436
|
Content,
|
|
6809
5437
|
{
|
|
6810
5438
|
role: "menu",
|
|
@@ -6869,7 +5497,7 @@ var GROUP_NAME$2 = "MenuGroup";
|
|
|
6869
5497
|
var MenuGroup = React.forwardRef(
|
|
6870
5498
|
(props, forwardedRef) => {
|
|
6871
5499
|
const { __scopeMenu, ...groupProps } = props;
|
|
6872
|
-
return /* @__PURE__ */
|
|
5500
|
+
return /* @__PURE__ */ jsx(Primitive.div, { role: "group", ...groupProps, ref: forwardedRef });
|
|
6873
5501
|
}
|
|
6874
5502
|
);
|
|
6875
5503
|
MenuGroup.displayName = GROUP_NAME$2;
|
|
@@ -6877,7 +5505,7 @@ var LABEL_NAME$2 = "MenuLabel";
|
|
|
6877
5505
|
var MenuLabel = React.forwardRef(
|
|
6878
5506
|
(props, forwardedRef) => {
|
|
6879
5507
|
const { __scopeMenu, ...labelProps } = props;
|
|
6880
|
-
return /* @__PURE__ */
|
|
5508
|
+
return /* @__PURE__ */ jsx(Primitive.div, { ...labelProps, ref: forwardedRef });
|
|
6881
5509
|
}
|
|
6882
5510
|
);
|
|
6883
5511
|
MenuLabel.displayName = LABEL_NAME$2;
|
|
@@ -6904,7 +5532,7 @@ var MenuItem = React.forwardRef(
|
|
|
6904
5532
|
}
|
|
6905
5533
|
}
|
|
6906
5534
|
};
|
|
6907
|
-
return /* @__PURE__ */
|
|
5535
|
+
return /* @__PURE__ */ jsx(
|
|
6908
5536
|
MenuItemImpl,
|
|
6909
5537
|
{
|
|
6910
5538
|
...itemProps,
|
|
@@ -6946,13 +5574,13 @@ var MenuItemImpl = React.forwardRef(
|
|
|
6946
5574
|
setTextContent((menuItem.textContent ?? "").trim());
|
|
6947
5575
|
}
|
|
6948
5576
|
}, [itemProps.children]);
|
|
6949
|
-
return /* @__PURE__ */
|
|
5577
|
+
return /* @__PURE__ */ jsx(
|
|
6950
5578
|
Collection$1.ItemSlot,
|
|
6951
5579
|
{
|
|
6952
5580
|
scope: __scopeMenu,
|
|
6953
5581
|
disabled,
|
|
6954
5582
|
textValue: textValue ?? textContent,
|
|
6955
|
-
children: /* @__PURE__ */
|
|
5583
|
+
children: /* @__PURE__ */ jsx(Item$1, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ jsx(
|
|
6956
5584
|
Primitive.div,
|
|
6957
5585
|
{
|
|
6958
5586
|
role: "menuitem",
|
|
@@ -6991,7 +5619,7 @@ var CHECKBOX_ITEM_NAME$1 = "MenuCheckboxItem";
|
|
|
6991
5619
|
var MenuCheckboxItem = React.forwardRef(
|
|
6992
5620
|
(props, forwardedRef) => {
|
|
6993
5621
|
const { checked = false, onCheckedChange, ...checkboxItemProps } = props;
|
|
6994
|
-
return /* @__PURE__ */
|
|
5622
|
+
return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(
|
|
6995
5623
|
MenuItem,
|
|
6996
5624
|
{
|
|
6997
5625
|
role: "menuitemcheckbox",
|
|
@@ -7019,7 +5647,7 @@ var MenuRadioGroup = React.forwardRef(
|
|
|
7019
5647
|
(props, forwardedRef) => {
|
|
7020
5648
|
const { value, onValueChange, ...groupProps } = props;
|
|
7021
5649
|
const handleValueChange = useCallbackRef$1(onValueChange);
|
|
7022
|
-
return /* @__PURE__ */
|
|
5650
|
+
return /* @__PURE__ */ jsx(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
|
|
7023
5651
|
}
|
|
7024
5652
|
);
|
|
7025
5653
|
MenuRadioGroup.displayName = RADIO_GROUP_NAME$1;
|
|
@@ -7029,7 +5657,7 @@ var MenuRadioItem = React.forwardRef(
|
|
|
7029
5657
|
const { value, ...radioItemProps } = props;
|
|
7030
5658
|
const context = useRadioGroupContext(RADIO_ITEM_NAME$1, props.__scopeMenu);
|
|
7031
5659
|
const checked = value === context.value;
|
|
7032
|
-
return /* @__PURE__ */
|
|
5660
|
+
return /* @__PURE__ */ jsx(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ jsx(
|
|
7033
5661
|
MenuItem,
|
|
7034
5662
|
{
|
|
7035
5663
|
role: "menuitemradio",
|
|
@@ -7056,11 +5684,11 @@ var MenuItemIndicator = React.forwardRef(
|
|
|
7056
5684
|
(props, forwardedRef) => {
|
|
7057
5685
|
const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;
|
|
7058
5686
|
const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME$1, __scopeMenu);
|
|
7059
|
-
return /* @__PURE__ */
|
|
5687
|
+
return /* @__PURE__ */ jsx(
|
|
7060
5688
|
Presence,
|
|
7061
5689
|
{
|
|
7062
5690
|
present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,
|
|
7063
|
-
children: /* @__PURE__ */
|
|
5691
|
+
children: /* @__PURE__ */ jsx(
|
|
7064
5692
|
Primitive.span,
|
|
7065
5693
|
{
|
|
7066
5694
|
...itemIndicatorProps,
|
|
@@ -7077,7 +5705,7 @@ var SEPARATOR_NAME$2 = "MenuSeparator";
|
|
|
7077
5705
|
var MenuSeparator = React.forwardRef(
|
|
7078
5706
|
(props, forwardedRef) => {
|
|
7079
5707
|
const { __scopeMenu, ...separatorProps } = props;
|
|
7080
|
-
return /* @__PURE__ */
|
|
5708
|
+
return /* @__PURE__ */ jsx(
|
|
7081
5709
|
Primitive.div,
|
|
7082
5710
|
{
|
|
7083
5711
|
role: "separator",
|
|
@@ -7094,7 +5722,7 @@ var MenuArrow = React.forwardRef(
|
|
|
7094
5722
|
(props, forwardedRef) => {
|
|
7095
5723
|
const { __scopeMenu, ...arrowProps } = props;
|
|
7096
5724
|
const popperScope = usePopperScope$2(__scopeMenu);
|
|
7097
|
-
return /* @__PURE__ */
|
|
5725
|
+
return /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
7098
5726
|
}
|
|
7099
5727
|
);
|
|
7100
5728
|
MenuArrow.displayName = ARROW_NAME$3;
|
|
@@ -7122,7 +5750,7 @@ var MenuSubTrigger = React.forwardRef(
|
|
|
7122
5750
|
onPointerGraceIntentChange(null);
|
|
7123
5751
|
};
|
|
7124
5752
|
}, [pointerGraceTimerRef, onPointerGraceIntentChange]);
|
|
7125
|
-
return /* @__PURE__ */
|
|
5753
|
+
return /* @__PURE__ */ jsx(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(
|
|
7126
5754
|
MenuItemImpl,
|
|
7127
5755
|
{
|
|
7128
5756
|
id: subContext.triggerId,
|
|
@@ -7211,7 +5839,7 @@ var MenuSubContent = React.forwardRef(
|
|
|
7211
5839
|
const subContext = useMenuSubContext(SUB_CONTENT_NAME$1, props.__scopeMenu);
|
|
7212
5840
|
const ref = React.useRef(null);
|
|
7213
5841
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
7214
|
-
return /* @__PURE__ */
|
|
5842
|
+
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(
|
|
7215
5843
|
MenuContentImpl,
|
|
7216
5844
|
{
|
|
7217
5845
|
id: subContext.contentId,
|
|
@@ -7345,7 +5973,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
7345
5973
|
onChange: onOpenChange,
|
|
7346
5974
|
caller: DROPDOWN_MENU_NAME
|
|
7347
5975
|
});
|
|
7348
|
-
return /* @__PURE__ */
|
|
5976
|
+
return /* @__PURE__ */ jsx(
|
|
7349
5977
|
DropdownMenuProvider,
|
|
7350
5978
|
{
|
|
7351
5979
|
scope: __scopeDropdownMenu,
|
|
@@ -7356,7 +5984,7 @@ var DropdownMenu$1 = (props) => {
|
|
|
7356
5984
|
onOpenChange: setOpen,
|
|
7357
5985
|
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
7358
5986
|
modal,
|
|
7359
|
-
children: /* @__PURE__ */
|
|
5987
|
+
children: /* @__PURE__ */ jsx(Root3$1, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })
|
|
7360
5988
|
}
|
|
7361
5989
|
);
|
|
7362
5990
|
};
|
|
@@ -7367,7 +5995,7 @@ var DropdownMenuTrigger$1 = React.forwardRef(
|
|
|
7367
5995
|
const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;
|
|
7368
5996
|
const context = useDropdownMenuContext(TRIGGER_NAME$2, __scopeDropdownMenu);
|
|
7369
5997
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7370
|
-
return /* @__PURE__ */
|
|
5998
|
+
return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...menuScope, children: /* @__PURE__ */ jsx(
|
|
7371
5999
|
Primitive.button,
|
|
7372
6000
|
{
|
|
7373
6001
|
type: "button",
|
|
@@ -7401,7 +6029,7 @@ var PORTAL_NAME$2 = "DropdownMenuPortal";
|
|
|
7401
6029
|
var DropdownMenuPortal = (props) => {
|
|
7402
6030
|
const { __scopeDropdownMenu, ...portalProps } = props;
|
|
7403
6031
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7404
|
-
return /* @__PURE__ */
|
|
6032
|
+
return /* @__PURE__ */ jsx(Portal$2, { ...menuScope, ...portalProps });
|
|
7405
6033
|
};
|
|
7406
6034
|
DropdownMenuPortal.displayName = PORTAL_NAME$2;
|
|
7407
6035
|
var CONTENT_NAME$2 = "DropdownMenuContent";
|
|
@@ -7411,7 +6039,7 @@ var DropdownMenuContent$1 = React.forwardRef(
|
|
|
7411
6039
|
const context = useDropdownMenuContext(CONTENT_NAME$2, __scopeDropdownMenu);
|
|
7412
6040
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7413
6041
|
const hasInteractedOutsideRef = React.useRef(false);
|
|
7414
|
-
return /* @__PURE__ */
|
|
6042
|
+
return /* @__PURE__ */ jsx(
|
|
7415
6043
|
Content2$3,
|
|
7416
6044
|
{
|
|
7417
6045
|
id: context.contentId,
|
|
@@ -7451,7 +6079,7 @@ var DropdownMenuGroup = React.forwardRef(
|
|
|
7451
6079
|
(props, forwardedRef) => {
|
|
7452
6080
|
const { __scopeDropdownMenu, ...groupProps } = props;
|
|
7453
6081
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7454
|
-
return /* @__PURE__ */
|
|
6082
|
+
return /* @__PURE__ */ jsx(Group, { ...menuScope, ...groupProps, ref: forwardedRef });
|
|
7455
6083
|
}
|
|
7456
6084
|
);
|
|
7457
6085
|
DropdownMenuGroup.displayName = GROUP_NAME$1;
|
|
@@ -7460,7 +6088,7 @@ var DropdownMenuLabel = React.forwardRef(
|
|
|
7460
6088
|
(props, forwardedRef) => {
|
|
7461
6089
|
const { __scopeDropdownMenu, ...labelProps } = props;
|
|
7462
6090
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7463
|
-
return /* @__PURE__ */
|
|
6091
|
+
return /* @__PURE__ */ jsx(Label, { ...menuScope, ...labelProps, ref: forwardedRef });
|
|
7464
6092
|
}
|
|
7465
6093
|
);
|
|
7466
6094
|
DropdownMenuLabel.displayName = LABEL_NAME$1;
|
|
@@ -7469,7 +6097,7 @@ var DropdownMenuItem$1 = React.forwardRef(
|
|
|
7469
6097
|
(props, forwardedRef) => {
|
|
7470
6098
|
const { __scopeDropdownMenu, ...itemProps } = props;
|
|
7471
6099
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7472
|
-
return /* @__PURE__ */
|
|
6100
|
+
return /* @__PURE__ */ jsx(Item2$1, { ...menuScope, ...itemProps, ref: forwardedRef });
|
|
7473
6101
|
}
|
|
7474
6102
|
);
|
|
7475
6103
|
DropdownMenuItem$1.displayName = ITEM_NAME$1;
|
|
@@ -7477,35 +6105,35 @@ var CHECKBOX_ITEM_NAME = "DropdownMenuCheckboxItem";
|
|
|
7477
6105
|
var DropdownMenuCheckboxItem = React.forwardRef((props, forwardedRef) => {
|
|
7478
6106
|
const { __scopeDropdownMenu, ...checkboxItemProps } = props;
|
|
7479
6107
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7480
|
-
return /* @__PURE__ */
|
|
6108
|
+
return /* @__PURE__ */ jsx(CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });
|
|
7481
6109
|
});
|
|
7482
6110
|
DropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;
|
|
7483
6111
|
var RADIO_GROUP_NAME = "DropdownMenuRadioGroup";
|
|
7484
6112
|
var DropdownMenuRadioGroup = React.forwardRef((props, forwardedRef) => {
|
|
7485
6113
|
const { __scopeDropdownMenu, ...radioGroupProps } = props;
|
|
7486
6114
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7487
|
-
return /* @__PURE__ */
|
|
6115
|
+
return /* @__PURE__ */ jsx(RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });
|
|
7488
6116
|
});
|
|
7489
6117
|
DropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;
|
|
7490
6118
|
var RADIO_ITEM_NAME = "DropdownMenuRadioItem";
|
|
7491
6119
|
var DropdownMenuRadioItem = React.forwardRef((props, forwardedRef) => {
|
|
7492
6120
|
const { __scopeDropdownMenu, ...radioItemProps } = props;
|
|
7493
6121
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7494
|
-
return /* @__PURE__ */
|
|
6122
|
+
return /* @__PURE__ */ jsx(RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });
|
|
7495
6123
|
});
|
|
7496
6124
|
DropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;
|
|
7497
6125
|
var INDICATOR_NAME$1 = "DropdownMenuItemIndicator";
|
|
7498
6126
|
var DropdownMenuItemIndicator = React.forwardRef((props, forwardedRef) => {
|
|
7499
6127
|
const { __scopeDropdownMenu, ...itemIndicatorProps } = props;
|
|
7500
6128
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7501
|
-
return /* @__PURE__ */
|
|
6129
|
+
return /* @__PURE__ */ jsx(ItemIndicator$1, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });
|
|
7502
6130
|
});
|
|
7503
6131
|
DropdownMenuItemIndicator.displayName = INDICATOR_NAME$1;
|
|
7504
6132
|
var SEPARATOR_NAME$1 = "DropdownMenuSeparator";
|
|
7505
6133
|
var DropdownMenuSeparator$1 = React.forwardRef((props, forwardedRef) => {
|
|
7506
6134
|
const { __scopeDropdownMenu, ...separatorProps } = props;
|
|
7507
6135
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7508
|
-
return /* @__PURE__ */
|
|
6136
|
+
return /* @__PURE__ */ jsx(Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });
|
|
7509
6137
|
});
|
|
7510
6138
|
DropdownMenuSeparator$1.displayName = SEPARATOR_NAME$1;
|
|
7511
6139
|
var ARROW_NAME$2 = "DropdownMenuArrow";
|
|
@@ -7513,7 +6141,7 @@ var DropdownMenuArrow = React.forwardRef(
|
|
|
7513
6141
|
(props, forwardedRef) => {
|
|
7514
6142
|
const { __scopeDropdownMenu, ...arrowProps } = props;
|
|
7515
6143
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7516
|
-
return /* @__PURE__ */
|
|
6144
|
+
return /* @__PURE__ */ jsx(Arrow2$1, { ...menuScope, ...arrowProps, ref: forwardedRef });
|
|
7517
6145
|
}
|
|
7518
6146
|
);
|
|
7519
6147
|
DropdownMenuArrow.displayName = ARROW_NAME$2;
|
|
@@ -7521,14 +6149,14 @@ var SUB_TRIGGER_NAME = "DropdownMenuSubTrigger";
|
|
|
7521
6149
|
var DropdownMenuSubTrigger = React.forwardRef((props, forwardedRef) => {
|
|
7522
6150
|
const { __scopeDropdownMenu, ...subTriggerProps } = props;
|
|
7523
6151
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7524
|
-
return /* @__PURE__ */
|
|
6152
|
+
return /* @__PURE__ */ jsx(SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });
|
|
7525
6153
|
});
|
|
7526
6154
|
DropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;
|
|
7527
6155
|
var SUB_CONTENT_NAME = "DropdownMenuSubContent";
|
|
7528
6156
|
var DropdownMenuSubContent = React.forwardRef((props, forwardedRef) => {
|
|
7529
6157
|
const { __scopeDropdownMenu, ...subContentProps } = props;
|
|
7530
6158
|
const menuScope = useMenuScope(__scopeDropdownMenu);
|
|
7531
|
-
return /* @__PURE__ */
|
|
6159
|
+
return /* @__PURE__ */ jsx(
|
|
7532
6160
|
SubContent,
|
|
7533
6161
|
{
|
|
7534
6162
|
...menuScope,
|
|
@@ -7583,7 +6211,7 @@ var Progress$1 = React.forwardRef(
|
|
|
7583
6211
|
}
|
|
7584
6212
|
const value = isValidValueNumber(valueProp, max) ? valueProp : null;
|
|
7585
6213
|
const valueLabel = isNumber(value) ? getValueLabel(value, max) : void 0;
|
|
7586
|
-
return /* @__PURE__ */
|
|
6214
|
+
return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max, children: /* @__PURE__ */ jsx(
|
|
7587
6215
|
Primitive.div,
|
|
7588
6216
|
{
|
|
7589
6217
|
"aria-valuemax": max,
|
|
@@ -7606,7 +6234,7 @@ var ProgressIndicator = React.forwardRef(
|
|
|
7606
6234
|
(props, forwardedRef) => {
|
|
7607
6235
|
const { __scopeProgress, ...indicatorProps } = props;
|
|
7608
6236
|
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
7609
|
-
return /* @__PURE__ */
|
|
6237
|
+
return /* @__PURE__ */ jsx(
|
|
7610
6238
|
Primitive.div,
|
|
7611
6239
|
{
|
|
7612
6240
|
"data-state": getProgressState(context.value, context.max),
|
|
@@ -7697,7 +6325,7 @@ var Select$1 = (props) => {
|
|
|
7697
6325
|
const isFormControl = trigger ? form || !!trigger.closest("form") : true;
|
|
7698
6326
|
const [nativeOptionsSet, setNativeOptionsSet] = React.useState(/* @__PURE__ */ new Set());
|
|
7699
6327
|
const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
|
|
7700
|
-
return /* @__PURE__ */
|
|
6328
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsxs(
|
|
7701
6329
|
SelectProvider,
|
|
7702
6330
|
{
|
|
7703
6331
|
required,
|
|
@@ -7717,7 +6345,7 @@ var Select$1 = (props) => {
|
|
|
7717
6345
|
triggerPointerDownPosRef,
|
|
7718
6346
|
disabled,
|
|
7719
6347
|
children: [
|
|
7720
|
-
/* @__PURE__ */
|
|
6348
|
+
/* @__PURE__ */ jsx(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
7721
6349
|
SelectNativeOptionsProvider,
|
|
7722
6350
|
{
|
|
7723
6351
|
scope: props.__scopeSelect,
|
|
@@ -7734,7 +6362,7 @@ var Select$1 = (props) => {
|
|
|
7734
6362
|
children
|
|
7735
6363
|
}
|
|
7736
6364
|
) }),
|
|
7737
|
-
isFormControl ? /* @__PURE__ */
|
|
6365
|
+
isFormControl ? /* @__PURE__ */ jsxs(
|
|
7738
6366
|
SelectBubbleInput,
|
|
7739
6367
|
{
|
|
7740
6368
|
"aria-hidden": true,
|
|
@@ -7747,7 +6375,7 @@ var Select$1 = (props) => {
|
|
|
7747
6375
|
disabled,
|
|
7748
6376
|
form,
|
|
7749
6377
|
children: [
|
|
7750
|
-
value === void 0 ? /* @__PURE__ */
|
|
6378
|
+
value === void 0 ? /* @__PURE__ */ jsx("option", { value: "" }) : null,
|
|
7751
6379
|
Array.from(nativeOptionsSet)
|
|
7752
6380
|
]
|
|
7753
6381
|
},
|
|
@@ -7788,7 +6416,7 @@ var SelectTrigger$1 = React.forwardRef(
|
|
|
7788
6416
|
};
|
|
7789
6417
|
}
|
|
7790
6418
|
};
|
|
7791
|
-
return /* @__PURE__ */
|
|
6419
|
+
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
7792
6420
|
Primitive.button,
|
|
7793
6421
|
{
|
|
7794
6422
|
type: "button",
|
|
@@ -7847,13 +6475,13 @@ var SelectValue$1 = React.forwardRef(
|
|
|
7847
6475
|
useLayoutEffect2(() => {
|
|
7848
6476
|
onValueNodeHasChildrenChange(hasChildren);
|
|
7849
6477
|
}, [onValueNodeHasChildrenChange, hasChildren]);
|
|
7850
|
-
return /* @__PURE__ */
|
|
6478
|
+
return /* @__PURE__ */ jsx(
|
|
7851
6479
|
Primitive.span,
|
|
7852
6480
|
{
|
|
7853
6481
|
...valueProps,
|
|
7854
6482
|
ref: composedRefs,
|
|
7855
6483
|
style: { pointerEvents: "none" },
|
|
7856
|
-
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */
|
|
6484
|
+
children: shouldShowPlaceholder(context.value) ? /* @__PURE__ */ jsx(Fragment, { children: placeholder }) : children
|
|
7857
6485
|
}
|
|
7858
6486
|
);
|
|
7859
6487
|
}
|
|
@@ -7863,13 +6491,13 @@ var ICON_NAME = "SelectIcon";
|
|
|
7863
6491
|
var SelectIcon = React.forwardRef(
|
|
7864
6492
|
(props, forwardedRef) => {
|
|
7865
6493
|
const { __scopeSelect, children, ...iconProps } = props;
|
|
7866
|
-
return /* @__PURE__ */
|
|
6494
|
+
return /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "\u25BC" });
|
|
7867
6495
|
}
|
|
7868
6496
|
);
|
|
7869
6497
|
SelectIcon.displayName = ICON_NAME;
|
|
7870
6498
|
var PORTAL_NAME$1 = "SelectPortal";
|
|
7871
6499
|
var SelectPortal = (props) => {
|
|
7872
|
-
return /* @__PURE__ */
|
|
6500
|
+
return /* @__PURE__ */ jsx(Portal$3, { asChild: true, ...props });
|
|
7873
6501
|
};
|
|
7874
6502
|
SelectPortal.displayName = PORTAL_NAME$1;
|
|
7875
6503
|
var CONTENT_NAME$1 = "SelectContent";
|
|
@@ -7883,11 +6511,11 @@ var SelectContent$1 = React.forwardRef(
|
|
|
7883
6511
|
if (!context.open) {
|
|
7884
6512
|
const frag = fragment;
|
|
7885
6513
|
return frag ? ReactDOM.createPortal(
|
|
7886
|
-
/* @__PURE__ */
|
|
6514
|
+
/* @__PURE__ */ jsx(SelectContentProvider, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeSelect, children: /* @__PURE__ */ jsx("div", { children: props.children }) }) }),
|
|
7887
6515
|
frag
|
|
7888
6516
|
) : null;
|
|
7889
6517
|
}
|
|
7890
|
-
return /* @__PURE__ */
|
|
6518
|
+
return /* @__PURE__ */ jsx(SelectContentImpl, { ...props, ref: forwardedRef });
|
|
7891
6519
|
}
|
|
7892
6520
|
);
|
|
7893
6521
|
SelectContent$1.displayName = CONTENT_NAME$1;
|
|
@@ -8041,7 +6669,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
8041
6669
|
hideWhenDetached,
|
|
8042
6670
|
avoidCollisions
|
|
8043
6671
|
} : {};
|
|
8044
|
-
return /* @__PURE__ */
|
|
6672
|
+
return /* @__PURE__ */ jsx(
|
|
8045
6673
|
SelectContentProvider,
|
|
8046
6674
|
{
|
|
8047
6675
|
scope: __scopeSelect,
|
|
@@ -8057,7 +6685,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
8057
6685
|
position,
|
|
8058
6686
|
isPositioned,
|
|
8059
6687
|
searchRef,
|
|
8060
|
-
children: /* @__PURE__ */
|
|
6688
|
+
children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
|
|
8061
6689
|
FocusScope,
|
|
8062
6690
|
{
|
|
8063
6691
|
asChild: true,
|
|
@@ -8069,7 +6697,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
8069
6697
|
context.trigger?.focus({ preventScroll: true });
|
|
8070
6698
|
event.preventDefault();
|
|
8071
6699
|
}),
|
|
8072
|
-
children: /* @__PURE__ */
|
|
6700
|
+
children: /* @__PURE__ */ jsx(
|
|
8073
6701
|
DismissableLayer,
|
|
8074
6702
|
{
|
|
8075
6703
|
asChild: true,
|
|
@@ -8078,7 +6706,7 @@ var SelectContentImpl = React.forwardRef(
|
|
|
8078
6706
|
onPointerDownOutside,
|
|
8079
6707
|
onFocusOutside: (event) => event.preventDefault(),
|
|
8080
6708
|
onDismiss: () => context.onOpenChange(false),
|
|
8081
|
-
children: /* @__PURE__ */
|
|
6709
|
+
children: /* @__PURE__ */ jsx(
|
|
8082
6710
|
SelectPosition,
|
|
8083
6711
|
{
|
|
8084
6712
|
role: "listbox",
|
|
@@ -8254,14 +6882,14 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
8254
6882
|
},
|
|
8255
6883
|
[position, focusSelectedItem]
|
|
8256
6884
|
);
|
|
8257
|
-
return /* @__PURE__ */
|
|
6885
|
+
return /* @__PURE__ */ jsx(
|
|
8258
6886
|
SelectViewportProvider,
|
|
8259
6887
|
{
|
|
8260
6888
|
scope: __scopeSelect,
|
|
8261
6889
|
contentWrapper,
|
|
8262
6890
|
shouldExpandOnScrollRef,
|
|
8263
6891
|
onScrollButtonChange: handleScrollButtonChange,
|
|
8264
|
-
children: /* @__PURE__ */
|
|
6892
|
+
children: /* @__PURE__ */ jsx(
|
|
8265
6893
|
"div",
|
|
8266
6894
|
{
|
|
8267
6895
|
ref: setContentWrapper,
|
|
@@ -8271,7 +6899,7 @@ var SelectItemAlignedPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
8271
6899
|
position: "fixed",
|
|
8272
6900
|
zIndex: contentZIndex
|
|
8273
6901
|
},
|
|
8274
|
-
children: /* @__PURE__ */
|
|
6902
|
+
children: /* @__PURE__ */ jsx(
|
|
8275
6903
|
Primitive.div,
|
|
8276
6904
|
{
|
|
8277
6905
|
...popperProps,
|
|
@@ -8301,7 +6929,7 @@ var SelectPopperPosition = React.forwardRef((props, forwardedRef) => {
|
|
|
8301
6929
|
...popperProps
|
|
8302
6930
|
} = props;
|
|
8303
6931
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
8304
|
-
return /* @__PURE__ */
|
|
6932
|
+
return /* @__PURE__ */ jsx(
|
|
8305
6933
|
Content,
|
|
8306
6934
|
{
|
|
8307
6935
|
...popperScope,
|
|
@@ -8335,8 +6963,8 @@ var SelectViewport = React.forwardRef(
|
|
|
8335
6963
|
const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
|
|
8336
6964
|
const composedRefs = useComposedRefs(forwardedRef, contentContext.onViewportChange);
|
|
8337
6965
|
const prevScrollTopRef = React.useRef(0);
|
|
8338
|
-
return /* @__PURE__ */
|
|
8339
|
-
/* @__PURE__ */
|
|
6966
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6967
|
+
/* @__PURE__ */ jsx(
|
|
8340
6968
|
"style",
|
|
8341
6969
|
{
|
|
8342
6970
|
dangerouslySetInnerHTML: {
|
|
@@ -8345,7 +6973,7 @@ var SelectViewport = React.forwardRef(
|
|
|
8345
6973
|
nonce
|
|
8346
6974
|
}
|
|
8347
6975
|
),
|
|
8348
|
-
/* @__PURE__ */
|
|
6976
|
+
/* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeSelect, children: /* @__PURE__ */ jsx(
|
|
8349
6977
|
Primitive.div,
|
|
8350
6978
|
{
|
|
8351
6979
|
"data-radix-select-viewport": "",
|
|
@@ -8401,7 +7029,7 @@ var SelectGroup = React.forwardRef(
|
|
|
8401
7029
|
(props, forwardedRef) => {
|
|
8402
7030
|
const { __scopeSelect, ...groupProps } = props;
|
|
8403
7031
|
const groupId = useId();
|
|
8404
|
-
return /* @__PURE__ */
|
|
7032
|
+
return /* @__PURE__ */ jsx(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
|
|
8405
7033
|
}
|
|
8406
7034
|
);
|
|
8407
7035
|
SelectGroup.displayName = GROUP_NAME;
|
|
@@ -8410,7 +7038,7 @@ var SelectLabel = React.forwardRef(
|
|
|
8410
7038
|
(props, forwardedRef) => {
|
|
8411
7039
|
const { __scopeSelect, ...labelProps } = props;
|
|
8412
7040
|
const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
|
|
8413
|
-
return /* @__PURE__ */
|
|
7041
|
+
return /* @__PURE__ */ jsx(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
|
|
8414
7042
|
}
|
|
8415
7043
|
);
|
|
8416
7044
|
SelectLabel.displayName = LABEL_NAME;
|
|
@@ -8447,7 +7075,7 @@ var SelectItem$1 = React.forwardRef(
|
|
|
8447
7075
|
"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."
|
|
8448
7076
|
);
|
|
8449
7077
|
}
|
|
8450
|
-
return /* @__PURE__ */
|
|
7078
|
+
return /* @__PURE__ */ jsx(
|
|
8451
7079
|
SelectItemContextProvider,
|
|
8452
7080
|
{
|
|
8453
7081
|
scope: __scopeSelect,
|
|
@@ -8458,14 +7086,14 @@ var SelectItem$1 = React.forwardRef(
|
|
|
8458
7086
|
onItemTextChange: React.useCallback((node) => {
|
|
8459
7087
|
setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
|
|
8460
7088
|
}, []),
|
|
8461
|
-
children: /* @__PURE__ */
|
|
7089
|
+
children: /* @__PURE__ */ jsx(
|
|
8462
7090
|
Collection.ItemSlot,
|
|
8463
7091
|
{
|
|
8464
7092
|
scope: __scopeSelect,
|
|
8465
7093
|
value,
|
|
8466
7094
|
disabled,
|
|
8467
7095
|
textValue,
|
|
8468
|
-
children: /* @__PURE__ */
|
|
7096
|
+
children: /* @__PURE__ */ jsx(
|
|
8469
7097
|
Primitive.div,
|
|
8470
7098
|
{
|
|
8471
7099
|
role: "option",
|
|
@@ -8534,7 +7162,7 @@ var SelectItemText = React.forwardRef(
|
|
|
8534
7162
|
);
|
|
8535
7163
|
const textContent = itemTextNode?.textContent;
|
|
8536
7164
|
const nativeOption = React.useMemo(
|
|
8537
|
-
() => /* @__PURE__ */
|
|
7165
|
+
() => /* @__PURE__ */ jsx("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value),
|
|
8538
7166
|
[itemContext.disabled, itemContext.value, textContent]
|
|
8539
7167
|
);
|
|
8540
7168
|
const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
|
|
@@ -8542,8 +7170,8 @@ var SelectItemText = React.forwardRef(
|
|
|
8542
7170
|
onNativeOptionAdd(nativeOption);
|
|
8543
7171
|
return () => onNativeOptionRemove(nativeOption);
|
|
8544
7172
|
}, [onNativeOptionAdd, onNativeOptionRemove, nativeOption]);
|
|
8545
|
-
return /* @__PURE__ */
|
|
8546
|
-
/* @__PURE__ */
|
|
7173
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7174
|
+
/* @__PURE__ */ jsx(Primitive.span, { id: itemContext.textId, ...itemTextProps, ref: composedRefs }),
|
|
8547
7175
|
itemContext.isSelected && context.valueNode && !context.valueNodeHasChildren ? ReactDOM.createPortal(itemTextProps.children, context.valueNode) : null
|
|
8548
7176
|
] });
|
|
8549
7177
|
}
|
|
@@ -8554,7 +7182,7 @@ var SelectItemIndicator = React.forwardRef(
|
|
|
8554
7182
|
(props, forwardedRef) => {
|
|
8555
7183
|
const { __scopeSelect, ...itemIndicatorProps } = props;
|
|
8556
7184
|
const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
|
|
8557
|
-
return itemContext.isSelected ? /* @__PURE__ */
|
|
7185
|
+
return itemContext.isSelected ? /* @__PURE__ */ jsx(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
|
|
8558
7186
|
}
|
|
8559
7187
|
);
|
|
8560
7188
|
SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
|
|
@@ -8576,7 +7204,7 @@ var SelectScrollUpButton$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
8576
7204
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
8577
7205
|
}
|
|
8578
7206
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
8579
|
-
return canScrollUp ? /* @__PURE__ */
|
|
7207
|
+
return canScrollUp ? /* @__PURE__ */ jsx(
|
|
8580
7208
|
SelectScrollButtonImpl,
|
|
8581
7209
|
{
|
|
8582
7210
|
...props,
|
|
@@ -8610,7 +7238,7 @@ var SelectScrollDownButton$1 = React.forwardRef((props, forwardedRef) => {
|
|
|
8610
7238
|
return () => viewport.removeEventListener("scroll", handleScroll2);
|
|
8611
7239
|
}
|
|
8612
7240
|
}, [contentContext.viewport, contentContext.isPositioned]);
|
|
8613
|
-
return canScrollDown ? /* @__PURE__ */
|
|
7241
|
+
return canScrollDown ? /* @__PURE__ */ jsx(
|
|
8614
7242
|
SelectScrollButtonImpl,
|
|
8615
7243
|
{
|
|
8616
7244
|
...props,
|
|
@@ -8643,7 +7271,7 @@ var SelectScrollButtonImpl = React.forwardRef((props, forwardedRef) => {
|
|
|
8643
7271
|
const activeItem = getItems().find((item) => item.ref.current === document.activeElement);
|
|
8644
7272
|
activeItem?.ref.current?.scrollIntoView({ block: "nearest" });
|
|
8645
7273
|
}, [getItems]);
|
|
8646
|
-
return /* @__PURE__ */
|
|
7274
|
+
return /* @__PURE__ */ jsx(
|
|
8647
7275
|
Primitive.div,
|
|
8648
7276
|
{
|
|
8649
7277
|
"aria-hidden": true,
|
|
@@ -8671,7 +7299,7 @@ var SEPARATOR_NAME = "SelectSeparator";
|
|
|
8671
7299
|
var SelectSeparator = React.forwardRef(
|
|
8672
7300
|
(props, forwardedRef) => {
|
|
8673
7301
|
const { __scopeSelect, ...separatorProps } = props;
|
|
8674
|
-
return /* @__PURE__ */
|
|
7302
|
+
return /* @__PURE__ */ jsx(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
|
|
8675
7303
|
}
|
|
8676
7304
|
);
|
|
8677
7305
|
SelectSeparator.displayName = SEPARATOR_NAME;
|
|
@@ -8682,7 +7310,7 @@ var SelectArrow = React.forwardRef(
|
|
|
8682
7310
|
const popperScope = usePopperScope$1(__scopeSelect);
|
|
8683
7311
|
const context = useSelectContext(ARROW_NAME$1, __scopeSelect);
|
|
8684
7312
|
const contentContext = useSelectContentContext(ARROW_NAME$1, __scopeSelect);
|
|
8685
|
-
return context.open && contentContext.position === "popper" ? /* @__PURE__ */
|
|
7313
|
+
return context.open && contentContext.position === "popper" ? /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef }) : null;
|
|
8686
7314
|
}
|
|
8687
7315
|
);
|
|
8688
7316
|
SelectArrow.displayName = ARROW_NAME$1;
|
|
@@ -8707,7 +7335,7 @@ var SelectBubbleInput = React.forwardRef(
|
|
|
8707
7335
|
select.dispatchEvent(event);
|
|
8708
7336
|
}
|
|
8709
7337
|
}, [prevValue, value]);
|
|
8710
|
-
return /* @__PURE__ */
|
|
7338
|
+
return /* @__PURE__ */ jsx(
|
|
8711
7339
|
Primitive.select,
|
|
8712
7340
|
{
|
|
8713
7341
|
...props,
|
|
@@ -8798,7 +7426,7 @@ var TooltipProvider$1 = (props) => {
|
|
|
8798
7426
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
8799
7427
|
return () => window.clearTimeout(skipDelayTimer);
|
|
8800
7428
|
}, []);
|
|
8801
|
-
return /* @__PURE__ */
|
|
7429
|
+
return /* @__PURE__ */ jsx(
|
|
8802
7430
|
TooltipProviderContextProvider,
|
|
8803
7431
|
{
|
|
8804
7432
|
scope: __scopeTooltip,
|
|
@@ -8889,7 +7517,7 @@ var Tooltip$1 = (props) => {
|
|
|
8889
7517
|
}
|
|
8890
7518
|
};
|
|
8891
7519
|
}, []);
|
|
8892
|
-
return /* @__PURE__ */
|
|
7520
|
+
return /* @__PURE__ */ jsx(Root2$2, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
8893
7521
|
TooltipContextProvider,
|
|
8894
7522
|
{
|
|
8895
7523
|
scope: __scopeTooltip,
|
|
@@ -8933,7 +7561,7 @@ var TooltipTrigger$1 = React.forwardRef(
|
|
|
8933
7561
|
React.useEffect(() => {
|
|
8934
7562
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
8935
7563
|
}, [handlePointerUp]);
|
|
8936
|
-
return /* @__PURE__ */
|
|
7564
|
+
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
8937
7565
|
Primitive.button,
|
|
8938
7566
|
{
|
|
8939
7567
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
@@ -8975,7 +7603,7 @@ var [PortalProvider, usePortalContext] = createTooltipContext(PORTAL_NAME, {
|
|
|
8975
7603
|
var TooltipPortal = (props) => {
|
|
8976
7604
|
const { __scopeTooltip, forceMount, children, container } = props;
|
|
8977
7605
|
const context = useTooltipContext(PORTAL_NAME, __scopeTooltip);
|
|
8978
|
-
return /* @__PURE__ */
|
|
7606
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$3, { asChild: true, container, children }) }) });
|
|
8979
7607
|
};
|
|
8980
7608
|
TooltipPortal.displayName = PORTAL_NAME;
|
|
8981
7609
|
var CONTENT_NAME = "TooltipContent";
|
|
@@ -8984,7 +7612,7 @@ var TooltipContent$1 = React.forwardRef(
|
|
|
8984
7612
|
const portalContext = usePortalContext(CONTENT_NAME, props.__scopeTooltip);
|
|
8985
7613
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
8986
7614
|
const context = useTooltipContext(CONTENT_NAME, props.__scopeTooltip);
|
|
8987
|
-
return /* @__PURE__ */
|
|
7615
|
+
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 }) });
|
|
8988
7616
|
}
|
|
8989
7617
|
);
|
|
8990
7618
|
var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
@@ -9046,7 +7674,7 @@ var TooltipContentHoverable = React.forwardRef((props, forwardedRef) => {
|
|
|
9046
7674
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
9047
7675
|
}
|
|
9048
7676
|
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
9049
|
-
return /* @__PURE__ */
|
|
7677
|
+
return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
9050
7678
|
});
|
|
9051
7679
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
9052
7680
|
var Slottable = createSlottable("TooltipContent");
|
|
@@ -9077,7 +7705,7 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
9077
7705
|
return () => window.removeEventListener("scroll", handleScroll, { capture: true });
|
|
9078
7706
|
}
|
|
9079
7707
|
}, [context.trigger, onClose]);
|
|
9080
|
-
return /* @__PURE__ */
|
|
7708
|
+
return /* @__PURE__ */ jsx(
|
|
9081
7709
|
DismissableLayer,
|
|
9082
7710
|
{
|
|
9083
7711
|
asChild: true,
|
|
@@ -9086,7 +7714,7 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
9086
7714
|
onPointerDownOutside,
|
|
9087
7715
|
onFocusOutside: (event) => event.preventDefault(),
|
|
9088
7716
|
onDismiss: onClose,
|
|
9089
|
-
children: /* @__PURE__ */
|
|
7717
|
+
children: /* @__PURE__ */ jsxs(
|
|
9090
7718
|
Content,
|
|
9091
7719
|
{
|
|
9092
7720
|
"data-state": context.stateAttribute,
|
|
@@ -9105,8 +7733,8 @@ var TooltipContentImpl = React.forwardRef(
|
|
|
9105
7733
|
}
|
|
9106
7734
|
},
|
|
9107
7735
|
children: [
|
|
9108
|
-
/* @__PURE__ */
|
|
9109
|
-
/* @__PURE__ */
|
|
7736
|
+
/* @__PURE__ */ jsx(Slottable, { children }),
|
|
7737
|
+
/* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(Root$3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
9110
7738
|
]
|
|
9111
7739
|
}
|
|
9112
7740
|
)
|
|
@@ -9124,7 +7752,7 @@ var TooltipArrow = React.forwardRef(
|
|
|
9124
7752
|
ARROW_NAME,
|
|
9125
7753
|
__scopeTooltip
|
|
9126
7754
|
);
|
|
9127
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */
|
|
7755
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
9128
7756
|
}
|
|
9129
7757
|
);
|
|
9130
7758
|
TooltipArrow.displayName = ARROW_NAME;
|
|
@@ -9280,7 +7908,7 @@ const buttonVariants = cva("focus-visible:border-ring focus-visible:ring-ring/50
|
|
|
9280
7908
|
});
|
|
9281
7909
|
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
9282
7910
|
const Comp = asChild ? Slot$2 : "button";
|
|
9283
|
-
return (
|
|
7911
|
+
return (jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
|
|
9284
7912
|
}
|
|
9285
7913
|
|
|
9286
7914
|
class BadgeColumn extends BaseColumn {
|
|
@@ -9320,17 +7948,17 @@ class BadgeColumn extends BaseColumn {
|
|
|
9320
7948
|
header: ({ column }) => {
|
|
9321
7949
|
const displayLabel = label || String(accessor);
|
|
9322
7950
|
if (!sortable) {
|
|
9323
|
-
return (
|
|
7951
|
+
return (jsx("span", { className: cn("text-muted-foreground font-medium", this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9324
7952
|
}
|
|
9325
|
-
return (
|
|
7953
|
+
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" })] }));
|
|
9326
7954
|
},
|
|
9327
7955
|
cell: ({ getValue }) => {
|
|
9328
7956
|
const value = String(getValue());
|
|
9329
7957
|
const variantConfig = variants?.[value];
|
|
9330
7958
|
if (!variantConfig) {
|
|
9331
|
-
return (
|
|
7959
|
+
return (jsx(Badge, { variant: "outline", className: this.config.cellClassName, children: value }));
|
|
9332
7960
|
}
|
|
9333
|
-
return (
|
|
7961
|
+
return (jsxs(Badge, { variant: variantConfig.variant === "success" ||
|
|
9334
7962
|
variantConfig.variant === "warning" ||
|
|
9335
7963
|
variantConfig.variant === "info" ||
|
|
9336
7964
|
variantConfig.variant === "muted"
|
|
@@ -9348,13 +7976,13 @@ const ButtonColumn = (config) => {
|
|
|
9348
7976
|
header: config.header || "Button",
|
|
9349
7977
|
cell: ({ row }) => {
|
|
9350
7978
|
const value = row.getValue(accessorKey);
|
|
9351
|
-
return (
|
|
7979
|
+
return (jsx(Button, { onClick: () => config.onClick && config.onClick(row.original), children: value || config.label || "Click" }));
|
|
9352
7980
|
},
|
|
9353
7981
|
};
|
|
9354
7982
|
};
|
|
9355
7983
|
|
|
9356
7984
|
function Checkbox({ className, ...props }) {
|
|
9357
|
-
return (
|
|
7985
|
+
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, {}) }) }));
|
|
9358
7986
|
}
|
|
9359
7987
|
|
|
9360
7988
|
class CheckboxColumn {
|
|
@@ -9364,8 +7992,8 @@ class CheckboxColumn {
|
|
|
9364
7992
|
build() {
|
|
9365
7993
|
return {
|
|
9366
7994
|
id: 'select',
|
|
9367
|
-
header: ({ table }) => (
|
|
9368
|
-
cell: ({ row }) => (
|
|
7995
|
+
header: ({ table }) => (jsx(Checkbox, { checked: table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate'), onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value), "aria-label": "Alle ausw\u00E4hlen" })),
|
|
7996
|
+
cell: ({ row }) => (jsx(Checkbox, { checked: row.getIsSelected(), onCheckedChange: (value) => row.toggleSelected(!!value), "aria-label": "Zeile ausw\u00E4hlen" })),
|
|
9369
7997
|
enableSorting: false,
|
|
9370
7998
|
enableHiding: false,
|
|
9371
7999
|
};
|
|
@@ -9451,40 +8079,40 @@ class DateColumn extends BaseColumn {
|
|
|
9451
8079
|
header: ({ column }) => {
|
|
9452
8080
|
const displayLabel = label || String(accessor);
|
|
9453
8081
|
if (!sortable) {
|
|
9454
|
-
return (
|
|
8082
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9455
8083
|
}
|
|
9456
|
-
return (
|
|
8084
|
+
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" })] }));
|
|
9457
8085
|
},
|
|
9458
8086
|
cell: ({ getValue }) => {
|
|
9459
8087
|
const value = getValue();
|
|
9460
8088
|
if (!value) {
|
|
9461
|
-
return
|
|
8089
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
9462
8090
|
}
|
|
9463
8091
|
const date = value instanceof Date ? value : new Date(value);
|
|
9464
8092
|
if (isNaN(date.getTime())) {
|
|
9465
|
-
return
|
|
8093
|
+
return jsx("span", { className: "text-muted-foreground", children: "Ung\u00FCltiges Datum" });
|
|
9466
8094
|
}
|
|
9467
8095
|
const formatted = this.formatDate(date, format || 'short', locale || 'de-DE');
|
|
9468
|
-
return (
|
|
8096
|
+
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] }));
|
|
9469
8097
|
},
|
|
9470
8098
|
};
|
|
9471
8099
|
}
|
|
9472
8100
|
}
|
|
9473
8101
|
|
|
9474
8102
|
function DropdownMenu({ ...props }) {
|
|
9475
|
-
return
|
|
8103
|
+
return jsx(Root2$1, { "data-slot": "dropdown-menu", ...props });
|
|
9476
8104
|
}
|
|
9477
8105
|
function DropdownMenuTrigger({ ...props }) {
|
|
9478
|
-
return (
|
|
8106
|
+
return (jsx(Trigger$2, { "data-slot": "dropdown-menu-trigger", ...props }));
|
|
9479
8107
|
}
|
|
9480
8108
|
function DropdownMenuContent({ className, align = "start", sideOffset = 4, ...props }) {
|
|
9481
|
-
return (
|
|
8109
|
+
return (jsx(Portal2, { children: jsx(Content2$2, { "data-slot": "dropdown-menu-content", sideOffset: sideOffset, align: align, className: className, ...props }) }));
|
|
9482
8110
|
}
|
|
9483
8111
|
function DropdownMenuItem({ className, inset, variant = "default", ...props }) {
|
|
9484
|
-
return (
|
|
8112
|
+
return (jsx(Item2, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: className, ...props }));
|
|
9485
8113
|
}
|
|
9486
8114
|
function DropdownMenuSeparator({ className, ...props }) {
|
|
9487
|
-
return (
|
|
8115
|
+
return (jsx(Separator2, { "data-slot": "dropdown-menu-separator", className: className, ...props }));
|
|
9488
8116
|
}
|
|
9489
8117
|
|
|
9490
8118
|
const DropdownColumn = (config) => {
|
|
@@ -9494,22 +8122,22 @@ const DropdownColumn = (config) => {
|
|
|
9494
8122
|
header: config.header || "Options",
|
|
9495
8123
|
cell: ({ row }) => {
|
|
9496
8124
|
const value = row.getValue(accessorKey);
|
|
9497
|
-
return (
|
|
8125
|
+
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))) })] }));
|
|
9498
8126
|
},
|
|
9499
8127
|
};
|
|
9500
8128
|
};
|
|
9501
8129
|
|
|
9502
8130
|
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
9503
|
-
return (
|
|
8131
|
+
return (jsx(Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
|
|
9504
8132
|
}
|
|
9505
8133
|
function Tooltip({ ...props }) {
|
|
9506
|
-
return (
|
|
8134
|
+
return (jsx(TooltipProvider, { children: jsx(Root3, { "data-slot": "tooltip", ...props }) }));
|
|
9507
8135
|
}
|
|
9508
8136
|
function TooltipTrigger({ ...props }) {
|
|
9509
|
-
return
|
|
8137
|
+
return jsx(Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
9510
8138
|
}
|
|
9511
8139
|
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
9512
|
-
return (
|
|
8140
|
+
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)]" })] }) }));
|
|
9513
8141
|
}
|
|
9514
8142
|
|
|
9515
8143
|
class IconColumn extends BaseColumn {
|
|
@@ -9679,34 +8307,34 @@ class IconColumn extends BaseColumn {
|
|
|
9679
8307
|
}
|
|
9680
8308
|
// === ICON HELPERS (inline SVGs um Lucide-Abhängigkeit zu vermeiden) ===
|
|
9681
8309
|
createCheckIcon() {
|
|
9682
|
-
return (
|
|
8310
|
+
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" }) }));
|
|
9683
8311
|
}
|
|
9684
8312
|
createXIcon() {
|
|
9685
|
-
return (
|
|
8313
|
+
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" })] }));
|
|
9686
8314
|
}
|
|
9687
8315
|
createCircleIcon() {
|
|
9688
|
-
return (
|
|
8316
|
+
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" }) }));
|
|
9689
8317
|
}
|
|
9690
8318
|
createArrowUpIcon() {
|
|
9691
|
-
return (
|
|
8319
|
+
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" })] }));
|
|
9692
8320
|
}
|
|
9693
8321
|
createArrowDownIcon() {
|
|
9694
|
-
return (
|
|
8322
|
+
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" })] }));
|
|
9695
8323
|
}
|
|
9696
8324
|
createMinusIcon() {
|
|
9697
|
-
return (
|
|
8325
|
+
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" }) }));
|
|
9698
8326
|
}
|
|
9699
8327
|
createAlertIcon() {
|
|
9700
|
-
return (
|
|
8328
|
+
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" })] }));
|
|
9701
8329
|
}
|
|
9702
8330
|
createShieldCheckIcon() {
|
|
9703
|
-
return (
|
|
8331
|
+
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" })] }));
|
|
9704
8332
|
}
|
|
9705
8333
|
createShieldXIcon() {
|
|
9706
|
-
return (
|
|
8334
|
+
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" })] }));
|
|
9707
8335
|
}
|
|
9708
8336
|
createClockIcon() {
|
|
9709
|
-
return (
|
|
8337
|
+
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" })] }));
|
|
9710
8338
|
}
|
|
9711
8339
|
build() {
|
|
9712
8340
|
const config = this.config;
|
|
@@ -9734,9 +8362,9 @@ class IconColumn extends BaseColumn {
|
|
|
9734
8362
|
header: ({ column }) => {
|
|
9735
8363
|
const displayLabel = label || String(accessor);
|
|
9736
8364
|
if (!sortable) {
|
|
9737
|
-
return (
|
|
8365
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9738
8366
|
}
|
|
9739
|
-
return (
|
|
8367
|
+
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" })] }));
|
|
9740
8368
|
},
|
|
9741
8369
|
cell: ({ getValue }) => {
|
|
9742
8370
|
const value = String(getValue());
|
|
@@ -9748,14 +8376,14 @@ class IconColumn extends BaseColumn {
|
|
|
9748
8376
|
const bgColor = stateConfig?.bgColor;
|
|
9749
8377
|
const tooltip = stateConfig?.tooltip || stateLabel;
|
|
9750
8378
|
if (!icon) {
|
|
9751
|
-
return
|
|
8379
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
9752
8380
|
}
|
|
9753
8381
|
// Icon als Element rendern (falls LucideIcon übergeben wurde)
|
|
9754
8382
|
const IconElement = typeof icon === 'function' ? icon : null;
|
|
9755
|
-
const renderedIcon = IconElement ?
|
|
9756
|
-
const iconElement = (
|
|
8383
|
+
const renderedIcon = IconElement ? jsx(IconElement, { className: "h-full w-full" }) : icon;
|
|
8384
|
+
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 })] }));
|
|
9757
8385
|
if (showTooltip) {
|
|
9758
|
-
return (
|
|
8386
|
+
return (jsx(TooltipProvider, { children: jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: iconElement }), jsx(TooltipContent, { children: jsx("p", { children: tooltip }) })] }) }));
|
|
9759
8387
|
}
|
|
9760
8388
|
return iconElement;
|
|
9761
8389
|
},
|
|
@@ -9811,11 +8439,11 @@ class ImageColumn extends BaseColumn {
|
|
|
9811
8439
|
};
|
|
9812
8440
|
return {
|
|
9813
8441
|
accessorKey: accessor,
|
|
9814
|
-
header: () =>
|
|
8442
|
+
header: () => jsx("span", { className: cn('text-muted-foreground font-medium', this.config.headerClassName), children: label || '' }),
|
|
9815
8443
|
cell: ({ getValue, row }) => {
|
|
9816
8444
|
const src = getValue();
|
|
9817
8445
|
const altText = alt ? alt(row.original) : 'Bild';
|
|
9818
|
-
return (
|
|
8446
|
+
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) => {
|
|
9819
8447
|
if (fallback) {
|
|
9820
8448
|
e.target.src = fallback;
|
|
9821
8449
|
}
|
|
@@ -9826,7 +8454,7 @@ class ImageColumn extends BaseColumn {
|
|
|
9826
8454
|
}
|
|
9827
8455
|
|
|
9828
8456
|
function Input({ className, type, ...props }) {
|
|
9829
|
-
return (
|
|
8457
|
+
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 }));
|
|
9830
8458
|
}
|
|
9831
8459
|
|
|
9832
8460
|
const InputColumn = (config) => {
|
|
@@ -9836,7 +8464,7 @@ const InputColumn = (config) => {
|
|
|
9836
8464
|
header: config.header || "Input",
|
|
9837
8465
|
cell: ({ row }) => {
|
|
9838
8466
|
const value = row.getValue(accessorKey);
|
|
9839
|
-
return (
|
|
8467
|
+
return (jsx(Input, { value: value || "", onChange: (e) => config.onChange && config.onChange(row.original, e.target.value), placeholder: config.placeholder || "Enter value" }));
|
|
9840
8468
|
},
|
|
9841
8469
|
};
|
|
9842
8470
|
};
|
|
@@ -9909,14 +8537,14 @@ class LinkColumn extends BaseColumn {
|
|
|
9909
8537
|
header: ({ column }) => {
|
|
9910
8538
|
const displayLabel = label || String(accessor);
|
|
9911
8539
|
if (!sortable) {
|
|
9912
|
-
return (
|
|
8540
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9913
8541
|
}
|
|
9914
|
-
return (
|
|
8542
|
+
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" })] }));
|
|
9915
8543
|
},
|
|
9916
8544
|
cell: ({ getValue, row }) => {
|
|
9917
8545
|
const value = getValue();
|
|
9918
8546
|
if (!value) {
|
|
9919
|
-
return
|
|
8547
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
9920
8548
|
}
|
|
9921
8549
|
// URL berechnen
|
|
9922
8550
|
const url = typeof href === 'function' ? href(row.original) : href || value;
|
|
@@ -9928,7 +8556,7 @@ class LinkColumn extends BaseColumn {
|
|
|
9928
8556
|
};
|
|
9929
8557
|
// Alignment ohne text-muted-foreground für Links
|
|
9930
8558
|
const alignmentClass = this.config.align === 'center' ? 'text-center' : this.config.align === 'right' ? 'text-right' : 'text-left';
|
|
9931
|
-
return (
|
|
8559
|
+
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" })] }));
|
|
9932
8560
|
},
|
|
9933
8561
|
};
|
|
9934
8562
|
}
|
|
@@ -9979,14 +8607,14 @@ class NumberColumn extends BaseColumn {
|
|
|
9979
8607
|
header: ({ column }) => {
|
|
9980
8608
|
const displayLabel = label || String(accessor);
|
|
9981
8609
|
if (!sortable) {
|
|
9982
|
-
return (
|
|
8610
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
9983
8611
|
}
|
|
9984
|
-
return (
|
|
8612
|
+
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" })] }));
|
|
9985
8613
|
},
|
|
9986
8614
|
cell: ({ getValue }) => {
|
|
9987
8615
|
const value = getValue();
|
|
9988
8616
|
if (value === null || value === undefined) {
|
|
9989
|
-
return
|
|
8617
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
9990
8618
|
}
|
|
9991
8619
|
let formatted;
|
|
9992
8620
|
if (currency) {
|
|
@@ -10011,14 +8639,14 @@ class NumberColumn extends BaseColumn {
|
|
|
10011
8639
|
}).format(value);
|
|
10012
8640
|
}
|
|
10013
8641
|
const displayValue = `${prefix || ''}${formatted}${suffix || ''}`;
|
|
10014
|
-
return
|
|
8642
|
+
return jsx("span", { className: cn('tabular-nums', this.getAlignmentClass(), this.config.cellClassName), children: displayValue });
|
|
10015
8643
|
},
|
|
10016
8644
|
};
|
|
10017
8645
|
}
|
|
10018
8646
|
}
|
|
10019
8647
|
|
|
10020
8648
|
function Progress({ className, value, ...props }) {
|
|
10021
|
-
return (
|
|
8649
|
+
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)}%)` } }) }));
|
|
10022
8650
|
}
|
|
10023
8651
|
|
|
10024
8652
|
class ProgressColumn extends BaseColumn {
|
|
@@ -10118,15 +8746,15 @@ class ProgressColumn extends BaseColumn {
|
|
|
10118
8746
|
header: ({ column }) => {
|
|
10119
8747
|
const displayLabel = label || String(accessor);
|
|
10120
8748
|
if (!sortable) {
|
|
10121
|
-
return (
|
|
8749
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
10122
8750
|
}
|
|
10123
|
-
return (
|
|
8751
|
+
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" })] }));
|
|
10124
8752
|
},
|
|
10125
8753
|
cell: ({ getValue }) => {
|
|
10126
8754
|
const value = getValue();
|
|
10127
8755
|
const maxValue = max || 100;
|
|
10128
8756
|
if (value === null || value === undefined) {
|
|
10129
|
-
return
|
|
8757
|
+
return jsx("span", { className: "text-muted-foreground", children: "\u2014" });
|
|
10130
8758
|
}
|
|
10131
8759
|
const percentage = Math.min(100, Math.max(0, (value / maxValue) * 100));
|
|
10132
8760
|
// Farbe berechnen
|
|
@@ -10142,32 +8770,32 @@ class ProgressColumn extends BaseColumn {
|
|
|
10142
8770
|
else if (showPercentage) {
|
|
10143
8771
|
labelText = `${Math.round(percentage)}%`;
|
|
10144
8772
|
}
|
|
10145
|
-
return (
|
|
8773
|
+
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 })] }));
|
|
10146
8774
|
},
|
|
10147
8775
|
};
|
|
10148
8776
|
}
|
|
10149
8777
|
}
|
|
10150
8778
|
|
|
10151
8779
|
function Select({ ...props }) {
|
|
10152
|
-
return
|
|
8780
|
+
return jsx(Root2, { "data-slot": "select", ...props });
|
|
10153
8781
|
}
|
|
10154
8782
|
function SelectValue({ ...props }) {
|
|
10155
|
-
return
|
|
8783
|
+
return jsx(Value, { "data-slot": "select-value", ...props });
|
|
10156
8784
|
}
|
|
10157
8785
|
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
10158
|
-
return (
|
|
8786
|
+
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" }) })] }));
|
|
10159
8787
|
}
|
|
10160
8788
|
function SelectContent({ className, children, position = "item-aligned", align = "center", ...props }) {
|
|
10161
|
-
return (
|
|
8789
|
+
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, {})] }) }));
|
|
10162
8790
|
}
|
|
10163
8791
|
function SelectItem({ className, children, ...props }) {
|
|
10164
|
-
return (
|
|
8792
|
+
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 })] }));
|
|
10165
8793
|
}
|
|
10166
8794
|
function SelectScrollUpButton({ className, ...props }) {
|
|
10167
|
-
return (
|
|
8795
|
+
return (jsx(ScrollUpButton, { "data-slot": "select-scroll-up-button", className: className, ...props, children: jsx(ChevronUpIcon, {}) }));
|
|
10168
8796
|
}
|
|
10169
8797
|
function SelectScrollDownButton({ className, ...props }) {
|
|
10170
|
-
return (
|
|
8798
|
+
return (jsx(ScrollDownButton, { "data-slot": "select-scroll-down-button", className: className, ...props, children: jsx(ChevronDownIcon, {}) }));
|
|
10171
8799
|
}
|
|
10172
8800
|
|
|
10173
8801
|
const SelectColumn = (config) => {
|
|
@@ -10177,7 +8805,7 @@ const SelectColumn = (config) => {
|
|
|
10177
8805
|
header: config.header || "Select",
|
|
10178
8806
|
cell: ({ row }) => {
|
|
10179
8807
|
const value = row.getValue(accessorKey);
|
|
10180
|
-
return (
|
|
8808
|
+
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))) })] }));
|
|
10181
8809
|
},
|
|
10182
8810
|
};
|
|
10183
8811
|
};
|
|
@@ -10237,9 +8865,9 @@ class TextColumn extends BaseColumn {
|
|
|
10237
8865
|
header: ({ column }) => {
|
|
10238
8866
|
const displayLabel = label || String(accessor);
|
|
10239
8867
|
if (!sortable) {
|
|
10240
|
-
return (
|
|
8868
|
+
return (jsx("span", { className: cn('text-muted-foreground font-medium', this.getAlignmentClass(), this.config.headerClassName), children: displayLabel }));
|
|
10241
8869
|
}
|
|
10242
|
-
return (
|
|
8870
|
+
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" })] }));
|
|
10243
8871
|
},
|
|
10244
8872
|
cell: ({ row, getValue }) => {
|
|
10245
8873
|
let value = getValue();
|
|
@@ -10249,11 +8877,11 @@ class TextColumn extends BaseColumn {
|
|
|
10249
8877
|
}
|
|
10250
8878
|
// Placeholder wenn leer
|
|
10251
8879
|
if (value === null || value === undefined || value === '') {
|
|
10252
|
-
return (
|
|
8880
|
+
return (jsx("span", { className: cn('text-muted-foreground', this.getAlignmentClass(), this.config.cellClassName), children: placeholder || '—' }));
|
|
10253
8881
|
}
|
|
10254
8882
|
// Prefix/Suffix hinzufügen
|
|
10255
8883
|
const displayValue = `${prefix || ''}${value}${suffix || ''}`;
|
|
10256
|
-
return
|
|
8884
|
+
return jsx("span", { className: cn(this.getAlignmentClass(), this.config.cellClassName), children: displayValue });
|
|
10257
8885
|
},
|
|
10258
8886
|
};
|
|
10259
8887
|
}
|
|
@@ -10308,20 +8936,20 @@ class ActionsColumn {
|
|
|
10308
8936
|
const { actions, label, triggerIcon } = this.config;
|
|
10309
8937
|
return {
|
|
10310
8938
|
id: 'actions',
|
|
10311
|
-
header: () =>
|
|
8939
|
+
header: () => jsx("span", { className: "sr-only", children: label }),
|
|
10312
8940
|
cell: ({ row }) => {
|
|
10313
8941
|
const data = row.original;
|
|
10314
8942
|
const visibleActions = actions.filter((action) => !action.hidden || !action.hidden(data));
|
|
10315
8943
|
if (visibleActions.length === 0)
|
|
10316
8944
|
return null;
|
|
10317
|
-
return (
|
|
8945
|
+
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: () => {
|
|
10318
8946
|
if (action.href) {
|
|
10319
8947
|
window.location.href = action.href(data);
|
|
10320
8948
|
}
|
|
10321
8949
|
else if (action.onClick) {
|
|
10322
8950
|
action.onClick(data);
|
|
10323
8951
|
}
|
|
10324
|
-
}, children: [action.icon &&
|
|
8952
|
+
}, children: [action.icon && jsx("span", { className: "mr-2", children: action.icon }), action.label] }), action.separator && index < visibleActions.length - 1 && jsx(DropdownMenuSeparator, {})] }, index))) })] }));
|
|
10325
8953
|
},
|
|
10326
8954
|
};
|
|
10327
8955
|
}
|