bc518174
王天杨
提交两个项目文件
|
1
2
|
"use client";
import {
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
3
4
5
6
7
8
9
10
11
12
13
14
|
Presence,
Primitive,
Slot,
composeEventHandlers,
createContextScope,
useCallbackRef,
useComposedRefs,
useControllableState,
useId
} from "./chunk-GAKU2354.js";
import "./chunk-NXESFFTV.js";
import {
|
bc518174
王天杨
提交两个项目文件
|
15
16
17
|
require_jsx_runtime
} from "./chunk-6PXSGDAH.js";
import {
|
bc518174
王天杨
提交两个项目文件
|
18
19
20
21
22
23
24
|
require_react
} from "./chunk-DRWLMN53.js";
import {
__toESM
} from "./chunk-G3PMV62Z.js";
// node_modules/@radix-ui/react-tabs/dist/index.mjs
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
25
|
var React4 = __toESM(require_react(), 1);
|
bc518174
王天杨
提交两个项目文件
|
26
27
|
// node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
bc518174
王天杨
提交两个项目文件
|
28
|
var React3 = __toESM(require_react(), 1);
|
bc518174
王天杨
提交两个项目文件
|
29
30
|
// node_modules/@radix-ui/react-collection/dist/index.mjs
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
31
32
|
var import_react = __toESM(require_react(), 1);
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
bc518174
王天杨
提交两个项目文件
|
33
34
35
36
37
38
39
40
41
42
43
|
function createCollection(name) {
const PROVIDER_NAME = name + "CollectionProvider";
const [createCollectionContext, createCollectionScope2] = createContextScope(PROVIDER_NAME);
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
PROVIDER_NAME,
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
);
const CollectionProvider = (props) => {
const { scope, children } = props;
const ref = import_react.default.useRef(null);
const itemMap = import_react.default.useRef(/* @__PURE__ */ new Map()).current;
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
44
|
return (0, import_jsx_runtime.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
bc518174
王天杨
提交两个项目文件
|
45
46
47
48
49
50
51
52
|
};
CollectionProvider.displayName = PROVIDER_NAME;
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
const CollectionSlot = import_react.default.forwardRef(
(props, forwardedRef) => {
const { scope, children } = props;
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
53
|
return (0, import_jsx_runtime.jsx)(Slot, { ref: composedRefs, children });
|
bc518174
王天杨
提交两个项目文件
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
}
);
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
const ITEM_DATA_ATTR = "data-radix-collection-item";
const CollectionItemSlot = import_react.default.forwardRef(
(props, forwardedRef) => {
const { scope, children, ...itemData } = props;
const ref = import_react.default.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
import_react.default.useEffect(() => {
context.itemMap.set(ref, { ref, ...itemData });
return () => void context.itemMap.delete(ref);
});
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
69
|
return (0, import_jsx_runtime.jsx)(Slot, { ...{ [ITEM_DATA_ATTR]: "" }, ref: composedRefs, children });
|
bc518174
王天杨
提交两个项目文件
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
}
);
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
function useCollection2(scope) {
const context = useCollectionContext(name + "CollectionConsumer", scope);
const getItems = import_react.default.useCallback(() => {
const collectionNode = context.collectionRef.current;
if (!collectionNode) return [];
const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));
const items = Array.from(context.itemMap.values());
const orderedItems = items.sort(
(a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)
);
return orderedItems;
}, [context.collectionRef, context.itemMap]);
return getItems;
}
return [
{ Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },
useCollection2,
createCollectionScope2
];
}
|
bc518174
王天杨
提交两个项目文件
|
94
|
// node_modules/@radix-ui/react-direction/dist/index.mjs
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
95
96
97
|
var React2 = __toESM(require_react(), 1);
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
var DirectionContext = React2.createContext(void 0);
|
bc518174
王天杨
提交两个项目文件
|
98
|
function useDirection(localDir) {
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
99
|
const globalDir = React2.useContext(DirectionContext);
|
bc518174
王天杨
提交两个项目文件
|
100
101
102
103
|
return localDir || globalDir || "ltr";
}
// node_modules/@radix-ui/react-roving-focus/dist/index.mjs
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
104
|
var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
|
bc518174
王天杨
提交两个项目文件
|
105
106
107
108
109
110
111
112
113
|
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
var GROUP_NAME = "RovingFocusGroup";
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
GROUP_NAME,
[createCollectionScope]
);
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
114
|
var RovingFocusGroup = React3.forwardRef(
|
bc518174
王天杨
提交两个项目文件
|
115
|
(props, forwardedRef) => {
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
116
|
return (0, import_jsx_runtime3.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: (0, import_jsx_runtime3.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: (0, import_jsx_runtime3.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
|
bc518174
王天杨
提交两个项目文件
|
117
118
119
|
}
);
RovingFocusGroup.displayName = GROUP_NAME;
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
120
|
var RovingFocusGroupImpl = React3.forwardRef((props, forwardedRef) => {
|
bc518174
王天杨
提交两个项目文件
|
121
122
123
124
125
126
127
128
129
130
131
132
|
const {
__scopeRovingFocusGroup,
orientation,
loop = false,
dir,
currentTabStopId: currentTabStopIdProp,
defaultCurrentTabStopId,
onCurrentTabStopIdChange,
onEntryFocus,
preventScrollOnEntryFocus = false,
...groupProps
} = props;
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
133
|
const ref = React3.useRef(null);
|
bc518174
王天杨
提交两个项目文件
|
134
135
136
137
138
139
140
|
const composedRefs = useComposedRefs(forwardedRef, ref);
const direction = useDirection(dir);
const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({
prop: currentTabStopIdProp,
defaultProp: defaultCurrentTabStopId,
onChange: onCurrentTabStopIdChange
});
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
141
|
const [isTabbingBackOut, setIsTabbingBackOut] = React3.useState(false);
|
bc518174
王天杨
提交两个项目文件
|
142
143
|
const handleEntryFocus = useCallbackRef(onEntryFocus);
const getItems = useCollection(__scopeRovingFocusGroup);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
144
145
146
|
const isClickFocusRef = React3.useRef(false);
const [focusableItemsCount, setFocusableItemsCount] = React3.useState(0);
React3.useEffect(() => {
|
bc518174
王天杨
提交两个项目文件
|
147
148
149
150
151
152
|
const node = ref.current;
if (node) {
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
}
}, [handleEntryFocus]);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
153
|
return (0, import_jsx_runtime3.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
154
155
156
157
158
159
160
|
RovingFocusProvider,
{
scope: __scopeRovingFocusGroup,
orientation,
dir: direction,
loop,
currentTabStopId,
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
161
|
onItemFocus: React3.useCallback(
|
bc518174
王天杨
提交两个项目文件
|
162
163
164
|
(tabStopId) => setCurrentTabStopId(tabStopId),
[setCurrentTabStopId]
),
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
165
166
|
onItemShiftTab: React3.useCallback(() => setIsTabbingBackOut(true), []),
onFocusableItemAdd: React3.useCallback(
|
bc518174
王天杨
提交两个项目文件
|
167
168
169
|
() => setFocusableItemsCount((prevCount) => prevCount + 1),
[]
),
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
170
|
onFocusableItemRemove: React3.useCallback(
|
bc518174
王天杨
提交两个项目文件
|
171
172
173
|
() => setFocusableItemsCount((prevCount) => prevCount - 1),
[]
),
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
174
|
children: (0, import_jsx_runtime3.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
Primitive.div,
{
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
"data-orientation": orientation,
...groupProps,
ref: composedRefs,
style: { outline: "none", ...props.style },
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
isClickFocusRef.current = true;
}),
onFocus: composeEventHandlers(props.onFocus, (event) => {
const isKeyboardFocus = !isClickFocusRef.current;
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
event.currentTarget.dispatchEvent(entryFocusEvent);
if (!entryFocusEvent.defaultPrevented) {
const items = getItems().filter((item) => item.focusable);
const activeItem = items.find((item) => item.active);
const currentItem = items.find((item) => item.id === currentTabStopId);
const candidateItems = [activeItem, currentItem, ...items].filter(
Boolean
);
const candidateNodes = candidateItems.map((item) => item.ref.current);
focusFirst(candidateNodes, preventScrollOnEntryFocus);
}
}
isClickFocusRef.current = false;
}),
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
}
)
}
);
});
var ITEM_NAME = "RovingFocusGroupItem";
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
210
|
var RovingFocusGroupItem = React3.forwardRef(
|
bc518174
王天杨
提交两个项目文件
|
211
212
213
214
215
216
217
218
219
220
221
222
223
224
|
(props, forwardedRef) => {
const {
__scopeRovingFocusGroup,
focusable = true,
active = false,
tabStopId,
...itemProps
} = props;
const autoId = useId();
const id = tabStopId || autoId;
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
const isCurrentTabStop = context.currentTabStopId === id;
const getItems = useCollection(__scopeRovingFocusGroup);
const { onFocusableItemAdd, onFocusableItemRemove } = context;
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
225
|
React3.useEffect(() => {
|
bc518174
王天杨
提交两个项目文件
|
226
227
228
229
230
|
if (focusable) {
onFocusableItemAdd();
return () => onFocusableItemRemove();
}
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
231
|
return (0, import_jsx_runtime3.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
232
233
234
235
236
237
|
Collection.ItemSlot,
{
scope: __scopeRovingFocusGroup,
id,
focusable,
active,
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
238
|
children: (0, import_jsx_runtime3.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
Primitive.span,
{
tabIndex: isCurrentTabStop ? 0 : -1,
"data-orientation": context.orientation,
...itemProps,
ref: forwardedRef,
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
if (!focusable) event.preventDefault();
else context.onItemFocus(id);
}),
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
if (event.key === "Tab" && event.shiftKey) {
context.onItemShiftTab();
return;
}
if (event.target !== event.currentTarget) return;
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
if (focusIntent !== void 0) {
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
event.preventDefault();
const items = getItems().filter((item) => item.focusable);
let candidateNodes = items.map((item) => item.ref.current);
if (focusIntent === "last") candidateNodes.reverse();
else if (focusIntent === "prev" || focusIntent === "next") {
if (focusIntent === "prev") candidateNodes.reverse();
const currentIndex = candidateNodes.indexOf(event.currentTarget);
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
}
setTimeout(() => focusFirst(candidateNodes));
}
})
}
)
}
);
}
);
RovingFocusGroupItem.displayName = ITEM_NAME;
var MAP_KEY_TO_FOCUS_INTENT = {
ArrowLeft: "prev",
ArrowUp: "prev",
ArrowRight: "next",
ArrowDown: "next",
PageUp: "first",
Home: "first",
PageDown: "last",
End: "last"
};
function getDirectionAwareKey(key, dir) {
if (dir !== "rtl") return key;
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
}
function getFocusIntent(event, orientation, dir) {
const key = getDirectionAwareKey(event.key, dir);
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
return MAP_KEY_TO_FOCUS_INTENT[key];
}
function focusFirst(candidates, preventScroll = false) {
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
for (const candidate of candidates) {
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
candidate.focus({ preventScroll });
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
}
}
function wrapArray(array, startIndex) {
return array.map((_, index) => array[(startIndex + index) % array.length]);
}
var Root = RovingFocusGroup;
var Item = RovingFocusGroupItem;
|
bc518174
王天杨
提交两个项目文件
|
312
|
// node_modules/@radix-ui/react-tabs/dist/index.mjs
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
313
|
var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
|
bc518174
王天杨
提交两个项目文件
|
314
315
316
317
318
319
|
var TABS_NAME = "Tabs";
var [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [
createRovingFocusGroupScope
]);
var useRovingFocusGroupScope = createRovingFocusGroupScope();
var [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
320
|
var Tabs = React4.forwardRef(
|
bc518174
王天杨
提交两个项目文件
|
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
(props, forwardedRef) => {
const {
__scopeTabs,
value: valueProp,
onValueChange,
defaultValue,
orientation = "horizontal",
dir,
activationMode = "automatic",
...tabsProps
} = props;
const direction = useDirection(dir);
const [value, setValue] = useControllableState({
prop: valueProp,
onChange: onValueChange,
defaultProp: defaultValue
});
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
338
|
return (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
339
340
341
342
343
344
345
346
347
|
TabsProvider,
{
scope: __scopeTabs,
baseId: useId(),
value,
onValueChange: setValue,
orientation,
dir: direction,
activationMode,
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
348
|
children: (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
349
350
351
352
353
354
355
356
357
358
359
360
361
362
|
Primitive.div,
{
dir: direction,
"data-orientation": orientation,
...tabsProps,
ref: forwardedRef
}
)
}
);
}
);
Tabs.displayName = TABS_NAME;
var TAB_LIST_NAME = "TabsList";
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
363
|
var TabsList = React4.forwardRef(
|
bc518174
王天杨
提交两个项目文件
|
364
365
366
367
|
(props, forwardedRef) => {
const { __scopeTabs, loop = true, ...listProps } = props;
const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
368
|
return (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
369
370
371
372
373
374
375
|
Root,
{
asChild: true,
...rovingFocusGroupScope,
orientation: context.orientation,
dir: context.dir,
loop,
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
376
|
children: (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
377
378
379
380
381
382
383
384
385
386
387
388
389
390
|
Primitive.div,
{
role: "tablist",
"aria-orientation": context.orientation,
...listProps,
ref: forwardedRef
}
)
}
);
}
);
TabsList.displayName = TAB_LIST_NAME;
var TRIGGER_NAME = "TabsTrigger";
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
391
|
var TabsTrigger = React4.forwardRef(
|
bc518174
王天杨
提交两个项目文件
|
392
393
394
395
396
397
398
|
(props, forwardedRef) => {
const { __scopeTabs, value, disabled = false, ...triggerProps } = props;
const context = useTabsContext(TRIGGER_NAME, __scopeTabs);
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);
const triggerId = makeTriggerId(context.baseId, value);
const contentId = makeContentId(context.baseId, value);
const isSelected = value === context.value;
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
399
|
return (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
400
401
402
403
404
405
|
Item,
{
asChild: true,
...rovingFocusGroupScope,
focusable: !disabled,
active: isSelected,
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
406
|
children: (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
|
Primitive.button,
{
type: "button",
role: "tab",
"aria-selected": isSelected,
"aria-controls": contentId,
"data-state": isSelected ? "active" : "inactive",
"data-disabled": disabled ? "" : void 0,
disabled,
id: triggerId,
...triggerProps,
ref: forwardedRef,
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
if (!disabled && event.button === 0 && event.ctrlKey === false) {
context.onValueChange(value);
} else {
event.preventDefault();
}
}),
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
if ([" ", "Enter"].includes(event.key)) context.onValueChange(value);
}),
onFocus: composeEventHandlers(props.onFocus, () => {
const isAutomaticActivation = context.activationMode !== "manual";
if (!isSelected && !disabled && isAutomaticActivation) {
context.onValueChange(value);
}
})
}
)
}
);
}
);
TabsTrigger.displayName = TRIGGER_NAME;
var CONTENT_NAME = "TabsContent";
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
443
|
var TabsContent = React4.forwardRef(
|
bc518174
王天杨
提交两个项目文件
|
444
445
446
447
448
449
|
(props, forwardedRef) => {
const { __scopeTabs, value, forceMount, children, ...contentProps } = props;
const context = useTabsContext(CONTENT_NAME, __scopeTabs);
const triggerId = makeTriggerId(context.baseId, value);
const contentId = makeContentId(context.baseId, value);
const isSelected = value === context.value;
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
450
451
|
const isMountAnimationPreventedRef = React4.useRef(isSelected);
React4.useEffect(() => {
|
bc518174
王天杨
提交两个项目文件
|
452
453
454
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
return () => cancelAnimationFrame(rAF);
}, []);
|
3a3dc915
王天杨
feat: 稻城亚丁项目批量更新
|
455
|
return (0, import_jsx_runtime4.jsx)(Presence, { present: forceMount || isSelected, children: ({ present }) => (0, import_jsx_runtime4.jsx)(
|
bc518174
王天杨
提交两个项目文件
|
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
|
Primitive.div,
{
"data-state": isSelected ? "active" : "inactive",
"data-orientation": context.orientation,
role: "tabpanel",
"aria-labelledby": triggerId,
hidden: !present,
id: contentId,
tabIndex: 0,
...contentProps,
ref: forwardedRef,
style: {
...props.style,
animationDuration: isMountAnimationPreventedRef.current ? "0s" : void 0
},
children: present && children
}
) });
}
);
TabsContent.displayName = CONTENT_NAME;
function makeTriggerId(baseId, value) {
return `${baseId}-trigger-${value}`;
}
function makeContentId(baseId, value) {
return `${baseId}-content-${value}`;
}
var Root2 = Tabs;
var List = TabsList;
var Trigger = TabsTrigger;
var Content = TabsContent;
export {
Content,
List,
Root2 as Root,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
Trigger,
createTabsScope
};
//# sourceMappingURL=@radix-ui_react-tabs.js.map
|