mirror of
https://github.com/hex248/ob248.com.git
synced 2026-02-08 10:43:38 +00:00
merge new into master
This commit is contained in:
50
node_modules/@radix-ui/react-toolbar/dist/index.d.mts
generated
vendored
Normal file
50
node_modules/@radix-ui/react-toolbar/dist/index.d.mts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
||||
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
||||
|
||||
declare const createToolbarScope: _radix_ui_react_context.CreateScope;
|
||||
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface ToolbarProps extends PrimitiveDivProps {
|
||||
orientation?: RovingFocusGroupProps['orientation'];
|
||||
loop?: RovingFocusGroupProps['loop'];
|
||||
dir?: RovingFocusGroupProps['dir'];
|
||||
}
|
||||
declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;
|
||||
interface ToolbarSeparatorProps extends SeparatorProps {
|
||||
}
|
||||
declare const ToolbarSeparator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
||||
interface ToolbarButtonProps extends PrimitiveButtonProps {
|
||||
}
|
||||
declare const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
type PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;
|
||||
interface ToolbarLinkProps extends PrimitiveLinkProps {
|
||||
}
|
||||
declare const ToolbarLink: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
||||
type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;
|
||||
interface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, {
|
||||
type: 'single';
|
||||
}> {
|
||||
}
|
||||
interface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, {
|
||||
type: 'multiple';
|
||||
}> {
|
||||
}
|
||||
declare const ToolbarToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;
|
||||
interface ToolbarToggleItemProps extends ToggleGroupItemProps {
|
||||
}
|
||||
declare const ToolbarToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Separator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Button: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Link: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
||||
declare const ToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const ToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
|
||||
export { Button, Link, Root, Separator, ToggleGroup, ToggleItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, ToolbarToggleGroup, type ToolbarToggleGroupMultipleProps, type ToolbarToggleGroupSingleProps, ToolbarToggleItem, type ToolbarToggleItemProps, createToolbarScope };
|
||||
50
node_modules/@radix-ui/react-toolbar/dist/index.d.ts
generated
vendored
Normal file
50
node_modules/@radix-ui/react-toolbar/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
import * as _radix_ui_react_context from '@radix-ui/react-context';
|
||||
import * as React from 'react';
|
||||
import * as RovingFocusGroup from '@radix-ui/react-roving-focus';
|
||||
import { Primitive } from '@radix-ui/react-primitive';
|
||||
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
||||
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
||||
|
||||
declare const createToolbarScope: _radix_ui_react_context.CreateScope;
|
||||
type RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;
|
||||
type PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;
|
||||
interface ToolbarProps extends PrimitiveDivProps {
|
||||
orientation?: RovingFocusGroupProps['orientation'];
|
||||
loop?: RovingFocusGroupProps['loop'];
|
||||
dir?: RovingFocusGroupProps['dir'];
|
||||
}
|
||||
declare const Toolbar: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;
|
||||
interface ToolbarSeparatorProps extends SeparatorProps {
|
||||
}
|
||||
declare const ToolbarSeparator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
type PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;
|
||||
interface ToolbarButtonProps extends PrimitiveButtonProps {
|
||||
}
|
||||
declare const ToolbarButton: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
type PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;
|
||||
interface ToolbarLinkProps extends PrimitiveLinkProps {
|
||||
}
|
||||
declare const ToolbarLink: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
||||
type ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;
|
||||
interface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, {
|
||||
type: 'single';
|
||||
}> {
|
||||
}
|
||||
interface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, {
|
||||
type: 'multiple';
|
||||
}> {
|
||||
}
|
||||
declare const ToolbarToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;
|
||||
interface ToolbarToggleItemProps extends ToggleGroupItemProps {
|
||||
}
|
||||
declare const ToolbarToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Root: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Separator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const Button: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
declare const Link: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
||||
declare const ToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
||||
declare const ToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
|
||||
|
||||
export { Button, Link, Root, Separator, ToggleGroup, ToggleItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, ToolbarToggleGroup, type ToolbarToggleGroupMultipleProps, type ToolbarToggleGroupSingleProps, ToolbarToggleItem, type ToolbarToggleItemProps, createToolbarScope };
|
||||
177
node_modules/@radix-ui/react-toolbar/dist/index.js
generated
vendored
Normal file
177
node_modules/@radix-ui/react-toolbar/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,177 @@
|
||||
"use strict";
|
||||
"use client";
|
||||
var __create = Object.create;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
var __copyProps = (to, from, except, desc) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(to, key) && key !== except)
|
||||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
||||
// If the importer is in node compatibility mode or this is not an ESM
|
||||
// file that has been converted to a CommonJS file using a Babel-
|
||||
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
||||
mod
|
||||
));
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
||||
|
||||
// src/index.ts
|
||||
var index_exports = {};
|
||||
__export(index_exports, {
|
||||
Button: () => Button,
|
||||
Link: () => Link,
|
||||
Root: () => Root4,
|
||||
Separator: () => Separator,
|
||||
ToggleGroup: () => ToggleGroup,
|
||||
ToggleItem: () => ToggleItem,
|
||||
Toolbar: () => Toolbar,
|
||||
ToolbarButton: () => ToolbarButton,
|
||||
ToolbarLink: () => ToolbarLink,
|
||||
ToolbarSeparator: () => ToolbarSeparator,
|
||||
ToolbarToggleGroup: () => ToolbarToggleGroup,
|
||||
ToolbarToggleItem: () => ToolbarToggleItem,
|
||||
createToolbarScope: () => createToolbarScope
|
||||
});
|
||||
module.exports = __toCommonJS(index_exports);
|
||||
|
||||
// src/toolbar.tsx
|
||||
var React = __toESM(require("react"));
|
||||
var import_primitive = require("@radix-ui/primitive");
|
||||
var import_react_context = require("@radix-ui/react-context");
|
||||
var RovingFocusGroup = __toESM(require("@radix-ui/react-roving-focus"));
|
||||
var import_react_roving_focus = require("@radix-ui/react-roving-focus");
|
||||
var import_react_primitive = require("@radix-ui/react-primitive");
|
||||
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"));
|
||||
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"));
|
||||
var import_react_toggle_group = require("@radix-ui/react-toggle-group");
|
||||
var import_react_direction = require("@radix-ui/react-direction");
|
||||
var import_jsx_runtime = require("react/jsx-runtime");
|
||||
var TOOLBAR_NAME = "Toolbar";
|
||||
var [createToolbarContext, createToolbarScope] = (0, import_react_context.createContextScope)(TOOLBAR_NAME, [
|
||||
import_react_roving_focus.createRovingFocusGroupScope,
|
||||
import_react_toggle_group.createToggleGroupScope
|
||||
]);
|
||||
var useRovingFocusGroupScope = (0, import_react_roving_focus.createRovingFocusGroupScope)();
|
||||
var useToggleGroupScope = (0, import_react_toggle_group.createToggleGroupScope)();
|
||||
var [ToolbarProvider, useToolbarContext] = createToolbarContext(TOOLBAR_NAME);
|
||||
var Toolbar = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, orientation = "horizontal", dir, loop = true, ...toolbarProps } = props;
|
||||
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);
|
||||
const direction = (0, import_react_direction.useDirection)(dir);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolbarProvider, { scope: __scopeToolbar, orientation, dir: direction, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
RovingFocusGroup.Root,
|
||||
{
|
||||
asChild: true,
|
||||
...rovingFocusGroupScope,
|
||||
orientation,
|
||||
dir: direction,
|
||||
loop,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.div,
|
||||
{
|
||||
role: "toolbar",
|
||||
"aria-orientation": orientation,
|
||||
dir: direction,
|
||||
...toolbarProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
)
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
Toolbar.displayName = TOOLBAR_NAME;
|
||||
var SEPARATOR_NAME = "ToolbarSeparator";
|
||||
var ToolbarSeparator = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...separatorProps } = props;
|
||||
const context = useToolbarContext(SEPARATOR_NAME, __scopeToolbar);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
SeparatorPrimitive.Root,
|
||||
{
|
||||
orientation: context.orientation === "horizontal" ? "vertical" : "horizontal",
|
||||
...separatorProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ToolbarSeparator.displayName = SEPARATOR_NAME;
|
||||
var BUTTON_NAME = "ToolbarButton";
|
||||
var ToolbarButton = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...buttonProps } = props;
|
||||
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !props.disabled, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_primitive.Primitive.button, { type: "button", ...buttonProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
ToolbarButton.displayName = BUTTON_NAME;
|
||||
var LINK_NAME = "ToolbarLink";
|
||||
var ToolbarLink = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...linkProps } = props;
|
||||
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
import_react_primitive.Primitive.a,
|
||||
{
|
||||
...linkProps,
|
||||
ref: forwardedRef,
|
||||
onKeyDown: (0, import_primitive.composeEventHandlers)(props.onKeyDown, (event) => {
|
||||
if (event.key === " ") event.currentTarget.click();
|
||||
})
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
ToolbarLink.displayName = LINK_NAME;
|
||||
var TOGGLE_GROUP_NAME = "ToolbarToggleGroup";
|
||||
var ToolbarToggleGroup = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...toggleGroupProps } = props;
|
||||
const context = useToolbarContext(TOGGLE_GROUP_NAME, __scopeToolbar);
|
||||
const toggleGroupScope = useToggleGroupScope(__scopeToolbar);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
||||
ToggleGroupPrimitive.Root,
|
||||
{
|
||||
"data-orientation": context.orientation,
|
||||
dir: context.dir,
|
||||
...toggleGroupScope,
|
||||
...toggleGroupProps,
|
||||
ref: forwardedRef,
|
||||
rovingFocus: false
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ToolbarToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
||||
var TOGGLE_ITEM_NAME = "ToolbarToggleItem";
|
||||
var ToolbarToggleItem = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...toggleItemProps } = props;
|
||||
const toggleGroupScope = useToggleGroupScope(__scopeToolbar);
|
||||
const scope = { __scopeToolbar: props.__scopeToolbar };
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolbarButton, { asChild: true, ...scope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupPrimitive.Item, { ...toggleGroupScope, ...toggleItemProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
ToolbarToggleItem.displayName = TOGGLE_ITEM_NAME;
|
||||
var Root4 = Toolbar;
|
||||
var Separator = ToolbarSeparator;
|
||||
var Button = ToolbarButton;
|
||||
var Link = ToolbarLink;
|
||||
var ToggleGroup = ToolbarToggleGroup;
|
||||
var ToggleItem = ToolbarToggleItem;
|
||||
//# sourceMappingURL=index.js.map
|
||||
7
node_modules/@radix-ui/react-toolbar/dist/index.js.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-toolbar/dist/index.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
145
node_modules/@radix-ui/react-toolbar/dist/index.mjs
generated
vendored
Normal file
145
node_modules/@radix-ui/react-toolbar/dist/index.mjs
generated
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
"use client";
|
||||
|
||||
// src/toolbar.tsx
|
||||
import * as React from "react";
|
||||
import { composeEventHandlers } from "@radix-ui/primitive";
|
||||
import { createContextScope } from "@radix-ui/react-context";
|
||||
import * as RovingFocusGroup from "@radix-ui/react-roving-focus";
|
||||
import { createRovingFocusGroupScope } from "@radix-ui/react-roving-focus";
|
||||
import { Primitive } from "@radix-ui/react-primitive";
|
||||
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
||||
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
||||
import { createToggleGroupScope } from "@radix-ui/react-toggle-group";
|
||||
import { useDirection } from "@radix-ui/react-direction";
|
||||
import { jsx } from "react/jsx-runtime";
|
||||
var TOOLBAR_NAME = "Toolbar";
|
||||
var [createToolbarContext, createToolbarScope] = createContextScope(TOOLBAR_NAME, [
|
||||
createRovingFocusGroupScope,
|
||||
createToggleGroupScope
|
||||
]);
|
||||
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
||||
var useToggleGroupScope = createToggleGroupScope();
|
||||
var [ToolbarProvider, useToolbarContext] = createToolbarContext(TOOLBAR_NAME);
|
||||
var Toolbar = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, orientation = "horizontal", dir, loop = true, ...toolbarProps } = props;
|
||||
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);
|
||||
const direction = useDirection(dir);
|
||||
return /* @__PURE__ */ jsx(ToolbarProvider, { scope: __scopeToolbar, orientation, dir: direction, children: /* @__PURE__ */ jsx(
|
||||
RovingFocusGroup.Root,
|
||||
{
|
||||
asChild: true,
|
||||
...rovingFocusGroupScope,
|
||||
orientation,
|
||||
dir: direction,
|
||||
loop,
|
||||
children: /* @__PURE__ */ jsx(
|
||||
Primitive.div,
|
||||
{
|
||||
role: "toolbar",
|
||||
"aria-orientation": orientation,
|
||||
dir: direction,
|
||||
...toolbarProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
)
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
Toolbar.displayName = TOOLBAR_NAME;
|
||||
var SEPARATOR_NAME = "ToolbarSeparator";
|
||||
var ToolbarSeparator = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...separatorProps } = props;
|
||||
const context = useToolbarContext(SEPARATOR_NAME, __scopeToolbar);
|
||||
return /* @__PURE__ */ jsx(
|
||||
SeparatorPrimitive.Root,
|
||||
{
|
||||
orientation: context.orientation === "horizontal" ? "vertical" : "horizontal",
|
||||
...separatorProps,
|
||||
ref: forwardedRef
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ToolbarSeparator.displayName = SEPARATOR_NAME;
|
||||
var BUTTON_NAME = "ToolbarButton";
|
||||
var ToolbarButton = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...buttonProps } = props;
|
||||
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);
|
||||
return /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !props.disabled, children: /* @__PURE__ */ jsx(Primitive.button, { type: "button", ...buttonProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
ToolbarButton.displayName = BUTTON_NAME;
|
||||
var LINK_NAME = "ToolbarLink";
|
||||
var ToolbarLink = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...linkProps } = props;
|
||||
const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);
|
||||
return /* @__PURE__ */ jsx(RovingFocusGroup.Item, { asChild: true, ...rovingFocusGroupScope, focusable: true, children: /* @__PURE__ */ jsx(
|
||||
Primitive.a,
|
||||
{
|
||||
...linkProps,
|
||||
ref: forwardedRef,
|
||||
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
|
||||
if (event.key === " ") event.currentTarget.click();
|
||||
})
|
||||
}
|
||||
) });
|
||||
}
|
||||
);
|
||||
ToolbarLink.displayName = LINK_NAME;
|
||||
var TOGGLE_GROUP_NAME = "ToolbarToggleGroup";
|
||||
var ToolbarToggleGroup = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...toggleGroupProps } = props;
|
||||
const context = useToolbarContext(TOGGLE_GROUP_NAME, __scopeToolbar);
|
||||
const toggleGroupScope = useToggleGroupScope(__scopeToolbar);
|
||||
return /* @__PURE__ */ jsx(
|
||||
ToggleGroupPrimitive.Root,
|
||||
{
|
||||
"data-orientation": context.orientation,
|
||||
dir: context.dir,
|
||||
...toggleGroupScope,
|
||||
...toggleGroupProps,
|
||||
ref: forwardedRef,
|
||||
rovingFocus: false
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
ToolbarToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
||||
var TOGGLE_ITEM_NAME = "ToolbarToggleItem";
|
||||
var ToolbarToggleItem = React.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeToolbar, ...toggleItemProps } = props;
|
||||
const toggleGroupScope = useToggleGroupScope(__scopeToolbar);
|
||||
const scope = { __scopeToolbar: props.__scopeToolbar };
|
||||
return /* @__PURE__ */ jsx(ToolbarButton, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, { ...toggleGroupScope, ...toggleItemProps, ref: forwardedRef }) });
|
||||
}
|
||||
);
|
||||
ToolbarToggleItem.displayName = TOGGLE_ITEM_NAME;
|
||||
var Root4 = Toolbar;
|
||||
var Separator = ToolbarSeparator;
|
||||
var Button = ToolbarButton;
|
||||
var Link = ToolbarLink;
|
||||
var ToggleGroup = ToolbarToggleGroup;
|
||||
var ToggleItem = ToolbarToggleItem;
|
||||
export {
|
||||
Button,
|
||||
Link,
|
||||
Root4 as Root,
|
||||
Separator,
|
||||
ToggleGroup,
|
||||
ToggleItem,
|
||||
Toolbar,
|
||||
ToolbarButton,
|
||||
ToolbarLink,
|
||||
ToolbarSeparator,
|
||||
ToolbarToggleGroup,
|
||||
ToolbarToggleItem,
|
||||
createToolbarScope
|
||||
};
|
||||
//# sourceMappingURL=index.mjs.map
|
||||
7
node_modules/@radix-ui/react-toolbar/dist/index.mjs.map
generated
vendored
Normal file
7
node_modules/@radix-ui/react-toolbar/dist/index.mjs.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user