node_modules ignore

This commit is contained in:
2025-05-08 23:43:47 +02:00
parent e19d52f172
commit 4574544c9f
65041 changed files with 10593536 additions and 0 deletions

13
server/node_modules/@radix-ui/react-tabs/README.md generated vendored Normal file
View File

@@ -0,0 +1,13 @@
# `react-tabs`
## Installation
```sh
$ yarn add @radix-ui/react-tabs
# or
$ npm install @radix-ui/react-tabs
```
## Usage
View docs [here](https://radix-ui.com/primitives/docs/components/tabs).

View File

@@ -0,0 +1,55 @@
import * as React from "react";
import * as Radix from "@radix-ui/react-primitive";
import { Primitive } from "@radix-ui/react-primitive";
import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
export const createTabsScope: import("@radix-ui/react-context").CreateScope;
type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
export interface TabsProps extends PrimitiveDivProps {
/** The value for the selected tab, if controlled */
value?: string;
/** The value of the tab to select by default, if uncontrolled */
defaultValue?: string;
/** A function called when a new tab is selected */
onValueChange?: (value: string) => void;
/**
* The orientation the tabs are layed out.
* Mainly so arrow navigation is done accordingly (left & right vs. up & down)
* @defaultValue horizontal
*/
orientation?: RovingFocusGroupProps['orientation'];
/**
* The direction of navigation between toolbar items.
*/
dir?: RovingFocusGroupProps['dir'];
/**
* Whether a tab is activated automatically or manually.
* @defaultValue automatic
* */
activationMode?: 'automatic' | 'manual';
}
export const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
export interface TabsListProps extends PrimitiveDivProps {
loop?: RovingFocusGroupProps['loop'];
}
export const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
export interface TabsTriggerProps extends PrimitiveButtonProps {
value: string;
}
export const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export interface TabsContentProps extends PrimitiveDivProps {
value: string;
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
export const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
export const Root: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
export const List: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
export const Trigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export const Content: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,55 @@
import * as React from "react";
import * as Radix from "@radix-ui/react-primitive";
import { Primitive } from "@radix-ui/react-primitive";
import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
export const createTabsScope: import("@radix-ui/react-context").CreateScope;
type RovingFocusGroupProps = Radix.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
export interface TabsProps extends PrimitiveDivProps {
/** The value for the selected tab, if controlled */
value?: string;
/** The value of the tab to select by default, if uncontrolled */
defaultValue?: string;
/** A function called when a new tab is selected */
onValueChange?: (value: string) => void;
/**
* The orientation the tabs are layed out.
* Mainly so arrow navigation is done accordingly (left & right vs. up & down)
* @defaultValue horizontal
*/
orientation?: RovingFocusGroupProps['orientation'];
/**
* The direction of navigation between toolbar items.
*/
dir?: RovingFocusGroupProps['dir'];
/**
* Whether a tab is activated automatically or manually.
* @defaultValue automatic
* */
activationMode?: 'automatic' | 'manual';
}
export const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
export interface TabsListProps extends PrimitiveDivProps {
loop?: RovingFocusGroupProps['loop'];
}
export const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
export interface TabsTriggerProps extends PrimitiveButtonProps {
value: string;
}
export const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export interface TabsContentProps extends PrimitiveDivProps {
value: string;
/**
* Used to force mounting when more control is needed. Useful when
* controlling animation with React animation libraries.
*/
forceMount?: true;
}
export const TabsContent: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
export const Root: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
export const List: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>;
export const Trigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>;
export const Content: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"mappings":";;;;AAqBA,OAAA,sFAEE,CAAC;AAeH,6BAA6B,MAAM,wBAAwB,CAAC,OAAO,iBAAiB,IAAI,CAAC,CAAC;AAC1F,yBAAyB,MAAM,wBAAwB,CAAC,OAAO,UAAU,GAAG,CAAC,CAAC;AAC9E,0BAAoB,SAAQ,iBAAiB;IAC3C,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;OAIG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACnD;;OAEG;IACH,GAAG,CAAC,EAAE,qBAAqB,CAAC,KAAK,CAAC,CAAC;IACnC;;;SAGK;IACL,cAAc,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;CACzC;AAED,OAAA,MAAM,sFAsCL,CAAC;AAWF,8BAAwB,SAAQ,iBAAiB;IAC/C,IAAI,CAAC,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAC;CACtC;AAED,OAAA,MAAM,8FAsBL,CAAC;AAWF,4BAA4B,MAAM,wBAAwB,CAAC,OAAO,UAAU,MAAM,CAAC,CAAC;AACpF,iCAA2B,SAAQ,oBAAoB;IACrD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,OAAA,MAAM,uGAmDL,CAAC;AAWF,iCAA2B,SAAQ,iBAAiB;IAClD,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC;CACnB;AAED,OAAA,MAAM,oGAsCL,CAAC;AAcF,OAAA,MAAM,sFAAW,CAAC;AAClB,OAAA,MAAM,0FAAe,CAAC;AACtB,OAAA,MAAM,mGAAqB,CAAC;AAC5B,OAAA,MAAM,gGAAqB,CAAC","sources":["packages/react/tabs/src/packages/react/tabs/src/Tabs.tsx","packages/react/tabs/src/packages/react/tabs/src/index.ts","packages/react/tabs/src/index.ts"],"sourcesContent":[null,null,"export {\n createTabsScope,\n //\n Tabs,\n TabsList,\n TabsTrigger,\n TabsContent,\n //\n Root,\n List,\n Trigger,\n Content,\n} from './Tabs';\nexport type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps } from './Tabs';\n"],"names":[],"version":3,"file":"index.d.ts.map"}

198
server/node_modules/@radix-ui/react-tabs/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,198 @@
var $8oLOM$babelruntimehelpersextends = require("@babel/runtime/helpers/extends");
var $8oLOM$react = require("react");
var $8oLOM$radixuiprimitive = require("@radix-ui/primitive");
var $8oLOM$radixuireactcontext = require("@radix-ui/react-context");
var $8oLOM$radixuireactrovingfocus = require("@radix-ui/react-roving-focus");
var $8oLOM$radixuireactpresence = require("@radix-ui/react-presence");
var $8oLOM$radixuireactprimitive = require("@radix-ui/react-primitive");
var $8oLOM$radixuireactdirection = require("@radix-ui/react-direction");
var $8oLOM$radixuireactusecontrollablestate = require("@radix-ui/react-use-controllable-state");
var $8oLOM$radixuireactid = require("@radix-ui/react-id");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
$parcel$export(module.exports, "createTabsScope", () => $2bbff03427f8eaee$export$355f5bd209d7b13a);
$parcel$export(module.exports, "Tabs", () => $2bbff03427f8eaee$export$b2539bed5023c21c);
$parcel$export(module.exports, "TabsList", () => $2bbff03427f8eaee$export$9712d22edc0d78c1);
$parcel$export(module.exports, "TabsTrigger", () => $2bbff03427f8eaee$export$8114b9fdfdf9f3ba);
$parcel$export(module.exports, "TabsContent", () => $2bbff03427f8eaee$export$bd905d70e8fd2ebb);
$parcel$export(module.exports, "Root", () => $2bbff03427f8eaee$export$be92b6f5f03c0fe9);
$parcel$export(module.exports, "List", () => $2bbff03427f8eaee$export$54c2e3dc7acea9f5);
$parcel$export(module.exports, "Trigger", () => $2bbff03427f8eaee$export$41fb9f06171c75f4);
$parcel$export(module.exports, "Content", () => $2bbff03427f8eaee$export$7c6e2c02157bb7d2);
/* -------------------------------------------------------------------------------------------------
* Tabs
* -----------------------------------------------------------------------------------------------*/ const $2bbff03427f8eaee$var$TABS_NAME = 'Tabs';
const [$2bbff03427f8eaee$var$createTabsContext, $2bbff03427f8eaee$export$355f5bd209d7b13a] = $8oLOM$radixuireactcontext.createContextScope($2bbff03427f8eaee$var$TABS_NAME, [
$8oLOM$radixuireactrovingfocus.createRovingFocusGroupScope
]);
const $2bbff03427f8eaee$var$useRovingFocusGroupScope = $8oLOM$radixuireactrovingfocus.createRovingFocusGroupScope();
const [$2bbff03427f8eaee$var$TabsProvider, $2bbff03427f8eaee$var$useTabsContext] = $2bbff03427f8eaee$var$createTabsContext($2bbff03427f8eaee$var$TABS_NAME);
const $2bbff03427f8eaee$export$b2539bed5023c21c = /*#__PURE__*/ $8oLOM$react.forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , value: valueProp , onValueChange: onValueChange , defaultValue: defaultValue , orientation: orientation = 'horizontal' , dir: dir , activationMode: activationMode = 'automatic' , ...tabsProps } = props;
const direction = $8oLOM$radixuireactdirection.useDirection(dir);
const [value, setValue] = $8oLOM$radixuireactusecontrollablestate.useControllableState({
prop: valueProp,
onChange: onValueChange,
defaultProp: defaultValue
});
return /*#__PURE__*/ $8oLOM$react.createElement($2bbff03427f8eaee$var$TabsProvider, {
scope: __scopeTabs,
baseId: $8oLOM$radixuireactid.useId(),
value: value,
onValueChange: setValue,
orientation: orientation,
dir: direction,
activationMode: activationMode
}, /*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactprimitive.Primitive.div, ($parcel$interopDefault($8oLOM$babelruntimehelpersextends))({
dir: direction,
"data-orientation": orientation
}, tabsProps, {
ref: forwardedRef
})));
});
/*#__PURE__*/ Object.assign($2bbff03427f8eaee$export$b2539bed5023c21c, {
displayName: $2bbff03427f8eaee$var$TABS_NAME
});
/* -------------------------------------------------------------------------------------------------
* TabsList
* -----------------------------------------------------------------------------------------------*/ const $2bbff03427f8eaee$var$TAB_LIST_NAME = 'TabsList';
const $2bbff03427f8eaee$export$9712d22edc0d78c1 = /*#__PURE__*/ $8oLOM$react.forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , loop: loop = true , ...listProps } = props;
const context = $2bbff03427f8eaee$var$useTabsContext($2bbff03427f8eaee$var$TAB_LIST_NAME, __scopeTabs);
const rovingFocusGroupScope = $2bbff03427f8eaee$var$useRovingFocusGroupScope(__scopeTabs);
return /*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactrovingfocus.Root, ($parcel$interopDefault($8oLOM$babelruntimehelpersextends))({
asChild: true
}, rovingFocusGroupScope, {
orientation: context.orientation,
dir: context.dir,
loop: loop
}), /*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactprimitive.Primitive.div, ($parcel$interopDefault($8oLOM$babelruntimehelpersextends))({
role: "tablist",
"aria-orientation": context.orientation
}, listProps, {
ref: forwardedRef
})));
});
/*#__PURE__*/ Object.assign($2bbff03427f8eaee$export$9712d22edc0d78c1, {
displayName: $2bbff03427f8eaee$var$TAB_LIST_NAME
});
/* -------------------------------------------------------------------------------------------------
* TabsTrigger
* -----------------------------------------------------------------------------------------------*/ const $2bbff03427f8eaee$var$TRIGGER_NAME = 'TabsTrigger';
const $2bbff03427f8eaee$export$8114b9fdfdf9f3ba = /*#__PURE__*/ $8oLOM$react.forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , value: value , disabled: disabled = false , ...triggerProps } = props;
const context = $2bbff03427f8eaee$var$useTabsContext($2bbff03427f8eaee$var$TRIGGER_NAME, __scopeTabs);
const rovingFocusGroupScope = $2bbff03427f8eaee$var$useRovingFocusGroupScope(__scopeTabs);
const triggerId = $2bbff03427f8eaee$var$makeTriggerId(context.baseId, value);
const contentId = $2bbff03427f8eaee$var$makeContentId(context.baseId, value);
const isSelected = value === context.value;
return /*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactrovingfocus.Item, ($parcel$interopDefault($8oLOM$babelruntimehelpersextends))({
asChild: true
}, rovingFocusGroupScope, {
focusable: !disabled,
active: isSelected
}), /*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactprimitive.Primitive.button, ($parcel$interopDefault($8oLOM$babelruntimehelpersextends))({
type: "button",
role: "tab",
"aria-selected": isSelected,
"aria-controls": contentId,
"data-state": isSelected ? 'active' : 'inactive',
"data-disabled": disabled ? '' : undefined,
disabled: disabled,
id: triggerId
}, triggerProps, {
ref: forwardedRef,
onMouseDown: $8oLOM$radixuiprimitive.composeEventHandlers(props.onMouseDown, (event)=>{
// only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
// but not when the control key is pressed (avoiding MacOS right click)
if (!disabled && event.button === 0 && event.ctrlKey === false) context.onValueChange(value);
else // prevent focus to avoid accidental activation
event.preventDefault();
}),
onKeyDown: $8oLOM$radixuiprimitive.composeEventHandlers(props.onKeyDown, (event)=>{
if ([
' ',
'Enter'
].includes(event.key)) context.onValueChange(value);
}),
onFocus: $8oLOM$radixuiprimitive.composeEventHandlers(props.onFocus, ()=>{
// handle "automatic" activation if necessary
// ie. activate tab following focus
const isAutomaticActivation = context.activationMode !== 'manual';
if (!isSelected && !disabled && isAutomaticActivation) context.onValueChange(value);
})
})));
});
/*#__PURE__*/ Object.assign($2bbff03427f8eaee$export$8114b9fdfdf9f3ba, {
displayName: $2bbff03427f8eaee$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
* TabsContent
* -----------------------------------------------------------------------------------------------*/ const $2bbff03427f8eaee$var$CONTENT_NAME = 'TabsContent';
const $2bbff03427f8eaee$export$bd905d70e8fd2ebb = /*#__PURE__*/ $8oLOM$react.forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , value: value , forceMount: forceMount , children: children , ...contentProps } = props;
const context = $2bbff03427f8eaee$var$useTabsContext($2bbff03427f8eaee$var$CONTENT_NAME, __scopeTabs);
const triggerId = $2bbff03427f8eaee$var$makeTriggerId(context.baseId, value);
const contentId = $2bbff03427f8eaee$var$makeContentId(context.baseId, value);
const isSelected = value === context.value;
const isMountAnimationPreventedRef = $8oLOM$react.useRef(isSelected);
$8oLOM$react.useEffect(()=>{
const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false
);
return ()=>cancelAnimationFrame(rAF)
;
}, []);
return /*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactpresence.Presence, {
present: forceMount || isSelected
}, ({ present: present })=>/*#__PURE__*/ $8oLOM$react.createElement($8oLOM$radixuireactprimitive.Primitive.div, ($parcel$interopDefault($8oLOM$babelruntimehelpersextends))({
"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' : undefined
}
}), present && children)
);
});
/*#__PURE__*/ Object.assign($2bbff03427f8eaee$export$bd905d70e8fd2ebb, {
displayName: $2bbff03427f8eaee$var$CONTENT_NAME
});
/* ---------------------------------------------------------------------------------------------- */ function $2bbff03427f8eaee$var$makeTriggerId(baseId, value) {
return `${baseId}-trigger-${value}`;
}
function $2bbff03427f8eaee$var$makeContentId(baseId, value) {
return `${baseId}-content-${value}`;
}
const $2bbff03427f8eaee$export$be92b6f5f03c0fe9 = $2bbff03427f8eaee$export$b2539bed5023c21c;
const $2bbff03427f8eaee$export$54c2e3dc7acea9f5 = $2bbff03427f8eaee$export$9712d22edc0d78c1;
const $2bbff03427f8eaee$export$41fb9f06171c75f4 = $2bbff03427f8eaee$export$8114b9fdfdf9f3ba;
const $2bbff03427f8eaee$export$7c6e2c02157bb7d2 = $2bbff03427f8eaee$export$bd905d70e8fd2ebb;
//# sourceMappingURL=index.js.map

File diff suppressed because one or more lines are too long

183
server/node_modules/@radix-ui/react-tabs/dist/index.mjs generated vendored Normal file
View File

@@ -0,0 +1,183 @@
import $1IHzk$babelruntimehelpersesmextends from "@babel/runtime/helpers/esm/extends";
import {forwardRef as $1IHzk$forwardRef, createElement as $1IHzk$createElement, useRef as $1IHzk$useRef, useEffect as $1IHzk$useEffect} from "react";
import {composeEventHandlers as $1IHzk$composeEventHandlers} from "@radix-ui/primitive";
import {createContextScope as $1IHzk$createContextScope} from "@radix-ui/react-context";
import {createRovingFocusGroupScope as $1IHzk$createRovingFocusGroupScope, Root as $1IHzk$Root, Item as $1IHzk$Item} from "@radix-ui/react-roving-focus";
import {Presence as $1IHzk$Presence} from "@radix-ui/react-presence";
import {Primitive as $1IHzk$Primitive} from "@radix-ui/react-primitive";
import {useDirection as $1IHzk$useDirection} from "@radix-ui/react-direction";
import {useControllableState as $1IHzk$useControllableState} from "@radix-ui/react-use-controllable-state";
import {useId as $1IHzk$useId} from "@radix-ui/react-id";
/* -------------------------------------------------------------------------------------------------
* Tabs
* -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TABS_NAME = 'Tabs';
const [$69cb30bb0017df05$var$createTabsContext, $69cb30bb0017df05$export$355f5bd209d7b13a] = $1IHzk$createContextScope($69cb30bb0017df05$var$TABS_NAME, [
$1IHzk$createRovingFocusGroupScope
]);
const $69cb30bb0017df05$var$useRovingFocusGroupScope = $1IHzk$createRovingFocusGroupScope();
const [$69cb30bb0017df05$var$TabsProvider, $69cb30bb0017df05$var$useTabsContext] = $69cb30bb0017df05$var$createTabsContext($69cb30bb0017df05$var$TABS_NAME);
const $69cb30bb0017df05$export$b2539bed5023c21c = /*#__PURE__*/ $1IHzk$forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , value: valueProp , onValueChange: onValueChange , defaultValue: defaultValue , orientation: orientation = 'horizontal' , dir: dir , activationMode: activationMode = 'automatic' , ...tabsProps } = props;
const direction = $1IHzk$useDirection(dir);
const [value, setValue] = $1IHzk$useControllableState({
prop: valueProp,
onChange: onValueChange,
defaultProp: defaultValue
});
return /*#__PURE__*/ $1IHzk$createElement($69cb30bb0017df05$var$TabsProvider, {
scope: __scopeTabs,
baseId: $1IHzk$useId(),
value: value,
onValueChange: setValue,
orientation: orientation,
dir: direction,
activationMode: activationMode
}, /*#__PURE__*/ $1IHzk$createElement($1IHzk$Primitive.div, $1IHzk$babelruntimehelpersesmextends({
dir: direction,
"data-orientation": orientation
}, tabsProps, {
ref: forwardedRef
})));
});
/*#__PURE__*/ Object.assign($69cb30bb0017df05$export$b2539bed5023c21c, {
displayName: $69cb30bb0017df05$var$TABS_NAME
});
/* -------------------------------------------------------------------------------------------------
* TabsList
* -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TAB_LIST_NAME = 'TabsList';
const $69cb30bb0017df05$export$9712d22edc0d78c1 = /*#__PURE__*/ $1IHzk$forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , loop: loop = true , ...listProps } = props;
const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TAB_LIST_NAME, __scopeTabs);
const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
return /*#__PURE__*/ $1IHzk$createElement($1IHzk$Root, $1IHzk$babelruntimehelpersesmextends({
asChild: true
}, rovingFocusGroupScope, {
orientation: context.orientation,
dir: context.dir,
loop: loop
}), /*#__PURE__*/ $1IHzk$createElement($1IHzk$Primitive.div, $1IHzk$babelruntimehelpersesmextends({
role: "tablist",
"aria-orientation": context.orientation
}, listProps, {
ref: forwardedRef
})));
});
/*#__PURE__*/ Object.assign($69cb30bb0017df05$export$9712d22edc0d78c1, {
displayName: $69cb30bb0017df05$var$TAB_LIST_NAME
});
/* -------------------------------------------------------------------------------------------------
* TabsTrigger
* -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$TRIGGER_NAME = 'TabsTrigger';
const $69cb30bb0017df05$export$8114b9fdfdf9f3ba = /*#__PURE__*/ $1IHzk$forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , value: value , disabled: disabled = false , ...triggerProps } = props;
const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$TRIGGER_NAME, __scopeTabs);
const rovingFocusGroupScope = $69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);
const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
const isSelected = value === context.value;
return /*#__PURE__*/ $1IHzk$createElement($1IHzk$Item, $1IHzk$babelruntimehelpersesmextends({
asChild: true
}, rovingFocusGroupScope, {
focusable: !disabled,
active: isSelected
}), /*#__PURE__*/ $1IHzk$createElement($1IHzk$Primitive.button, $1IHzk$babelruntimehelpersesmextends({
type: "button",
role: "tab",
"aria-selected": isSelected,
"aria-controls": contentId,
"data-state": isSelected ? 'active' : 'inactive',
"data-disabled": disabled ? '' : undefined,
disabled: disabled,
id: triggerId
}, triggerProps, {
ref: forwardedRef,
onMouseDown: $1IHzk$composeEventHandlers(props.onMouseDown, (event)=>{
// only call handler if it's the left button (mousedown gets triggered by all mouse buttons)
// but not when the control key is pressed (avoiding MacOS right click)
if (!disabled && event.button === 0 && event.ctrlKey === false) context.onValueChange(value);
else // prevent focus to avoid accidental activation
event.preventDefault();
}),
onKeyDown: $1IHzk$composeEventHandlers(props.onKeyDown, (event)=>{
if ([
' ',
'Enter'
].includes(event.key)) context.onValueChange(value);
}),
onFocus: $1IHzk$composeEventHandlers(props.onFocus, ()=>{
// handle "automatic" activation if necessary
// ie. activate tab following focus
const isAutomaticActivation = context.activationMode !== 'manual';
if (!isSelected && !disabled && isAutomaticActivation) context.onValueChange(value);
})
})));
});
/*#__PURE__*/ Object.assign($69cb30bb0017df05$export$8114b9fdfdf9f3ba, {
displayName: $69cb30bb0017df05$var$TRIGGER_NAME
});
/* -------------------------------------------------------------------------------------------------
* TabsContent
* -----------------------------------------------------------------------------------------------*/ const $69cb30bb0017df05$var$CONTENT_NAME = 'TabsContent';
const $69cb30bb0017df05$export$bd905d70e8fd2ebb = /*#__PURE__*/ $1IHzk$forwardRef((props, forwardedRef)=>{
const { __scopeTabs: __scopeTabs , value: value , forceMount: forceMount , children: children , ...contentProps } = props;
const context = $69cb30bb0017df05$var$useTabsContext($69cb30bb0017df05$var$CONTENT_NAME, __scopeTabs);
const triggerId = $69cb30bb0017df05$var$makeTriggerId(context.baseId, value);
const contentId = $69cb30bb0017df05$var$makeContentId(context.baseId, value);
const isSelected = value === context.value;
const isMountAnimationPreventedRef = $1IHzk$useRef(isSelected);
$1IHzk$useEffect(()=>{
const rAF = requestAnimationFrame(()=>isMountAnimationPreventedRef.current = false
);
return ()=>cancelAnimationFrame(rAF)
;
}, []);
return /*#__PURE__*/ $1IHzk$createElement($1IHzk$Presence, {
present: forceMount || isSelected
}, ({ present: present })=>/*#__PURE__*/ $1IHzk$createElement($1IHzk$Primitive.div, $1IHzk$babelruntimehelpersesmextends({
"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' : undefined
}
}), present && children)
);
});
/*#__PURE__*/ Object.assign($69cb30bb0017df05$export$bd905d70e8fd2ebb, {
displayName: $69cb30bb0017df05$var$CONTENT_NAME
});
/* ---------------------------------------------------------------------------------------------- */ function $69cb30bb0017df05$var$makeTriggerId(baseId, value) {
return `${baseId}-trigger-${value}`;
}
function $69cb30bb0017df05$var$makeContentId(baseId, value) {
return `${baseId}-content-${value}`;
}
const $69cb30bb0017df05$export$be92b6f5f03c0fe9 = $69cb30bb0017df05$export$b2539bed5023c21c;
const $69cb30bb0017df05$export$54c2e3dc7acea9f5 = $69cb30bb0017df05$export$9712d22edc0d78c1;
const $69cb30bb0017df05$export$41fb9f06171c75f4 = $69cb30bb0017df05$export$8114b9fdfdf9f3ba;
const $69cb30bb0017df05$export$7c6e2c02157bb7d2 = $69cb30bb0017df05$export$bd905d70e8fd2ebb;
export {$69cb30bb0017df05$export$355f5bd209d7b13a as createTabsScope, $69cb30bb0017df05$export$b2539bed5023c21c as Tabs, $69cb30bb0017df05$export$9712d22edc0d78c1 as TabsList, $69cb30bb0017df05$export$8114b9fdfdf9f3ba as TabsTrigger, $69cb30bb0017df05$export$bd905d70e8fd2ebb as TabsContent, $69cb30bb0017df05$export$be92b6f5f03c0fe9 as Root, $69cb30bb0017df05$export$54c2e3dc7acea9f5 as List, $69cb30bb0017df05$export$41fb9f06171c75f4 as Trigger, $69cb30bb0017df05$export$7c6e2c02157bb7d2 as Content};
//# sourceMappingURL=index.mjs.map

File diff suppressed because one or more lines are too long

63
server/node_modules/@radix-ui/react-tabs/package.json generated vendored Normal file
View File

@@ -0,0 +1,63 @@
{
"name": "@radix-ui/react-tabs",
"version": "1.0.4",
"license": "MIT",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
},
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"scripts": {
"clean": "rm -rf dist",
"version": "yarn version"
},
"dependencies": {
"@babel/runtime": "^7.13.10",
"@radix-ui/primitive": "1.0.1",
"@radix-ui/react-context": "1.0.1",
"@radix-ui/react-direction": "1.0.1",
"@radix-ui/react-id": "1.0.1",
"@radix-ui/react-presence": "1.0.1",
"@radix-ui/react-primitive": "1.0.3",
"@radix-ui/react-roving-focus": "1.0.4",
"@radix-ui/react-use-controllable-state": "1.0.1"
},
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"react": "^16.8 || ^17.0 || ^18.0",
"react-dom": "^16.8 || ^17.0 || ^18.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
}
}