@radix-ui/react-toolbar 1.1.11 → 1.1.12-rc.1762291353631

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/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/toolbar.tsx"],
4
- "sourcesContent": ["'use client';\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Root,\n Separator,\n Button,\n Link,\n ToggleGroup,\n ToggleItem,\n} from './toolbar';\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n} from './toolbar';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Toolbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOOLBAR_NAME = 'Toolbar';\n\ntype ScopedProps<P> = P & { __scopeToolbar?: Scope };\nconst [createToolbarContext, createToolbarScope] = createContextScope(TOOLBAR_NAME, [\n createRovingFocusGroupScope,\n createToggleGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useToggleGroupScope = createToggleGroupScope();\n\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype ToolbarContextValue = {\n orientation: RovingFocusGroupProps['orientation'];\n dir: RovingFocusGroupProps['dir'];\n};\nconst [ToolbarProvider, useToolbarContext] =\n createToolbarContext<ToolbarContextValue>(TOOLBAR_NAME);\n\ntype ToolbarElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ToolbarProps extends PrimitiveDivProps {\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Toolbar = React.forwardRef<ToolbarElement, ToolbarProps>(\n (props: ScopedProps<ToolbarProps>, forwardedRef) => {\n const { __scopeToolbar, orientation = 'horizontal', dir, loop = true, ...toolbarProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n const direction = useDirection(dir);\n return (\n <ToolbarProvider scope={__scopeToolbar} orientation={orientation} dir={direction}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation={orientation}\n dir={direction}\n loop={loop}\n >\n <Primitive.div\n role=\"toolbar\"\n aria-orientation={orientation}\n dir={direction}\n {...toolbarProps}\n ref={forwardedRef}\n />\n </RovingFocusGroup.Root>\n </ToolbarProvider>\n );\n }\n);\n\nToolbar.displayName = TOOLBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ToolbarSeparator';\n\ntype ToolbarSeparatorElement = React.ComponentRef<typeof SeparatorPrimitive.Root>;\ntype SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;\ninterface ToolbarSeparatorProps extends SeparatorProps {}\n\nconst ToolbarSeparator = React.forwardRef<ToolbarSeparatorElement, ToolbarSeparatorProps>(\n (props: ScopedProps<ToolbarSeparatorProps>, forwardedRef) => {\n const { __scopeToolbar, ...separatorProps } = props;\n const context = useToolbarContext(SEPARATOR_NAME, __scopeToolbar);\n return (\n <SeparatorPrimitive.Root\n orientation={context.orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n {...separatorProps}\n ref={forwardedRef}\n />\n );\n }\n);\n\nToolbarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUTTON_NAME = 'ToolbarButton';\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n (props: ScopedProps<ToolbarButtonProps>, forwardedRef) => {\n const { __scopeToolbar, ...buttonProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable={!props.disabled}>\n <Primitive.button type=\"button\" {...buttonProps} ref={forwardedRef} />\n </RovingFocusGroup.Item>\n );\n }\n);\n\nToolbarButton.displayName = BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\nconst LINK_NAME = 'ToolbarLink';\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n (props: ScopedProps<ToolbarLinkProps>, forwardedRef) => {\n const { __scopeToolbar, ...linkProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable>\n <Primitive.a\n {...linkProps}\n ref={forwardedRef}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === ' ') event.currentTarget.click();\n })}\n />\n </RovingFocusGroup.Item>\n );\n }\n);\n\nToolbarLink.displayName = LINK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_GROUP_NAME = 'ToolbarToggleGroup';\n\ntype ToolbarToggleGroupElement = React.ComponentRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;\ninterface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, { type: 'single' }> {}\ninterface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, { type: 'multiple' }> {}\n\nconst ToolbarToggleGroup = React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n (\n props: ScopedProps<ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps>,\n forwardedRef\n ) => {\n const { __scopeToolbar, ...toggleGroupProps } = props;\n const context = useToolbarContext(TOGGLE_GROUP_NAME, __scopeToolbar);\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n return (\n <ToggleGroupPrimitive.Root\n data-orientation={context.orientation}\n dir={context.dir}\n {...toggleGroupScope}\n {...toggleGroupProps}\n ref={forwardedRef}\n rovingFocus={false}\n />\n );\n }\n);\n\nToolbarToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_ITEM_NAME = 'ToolbarToggleItem';\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = React.forwardRef<ToolbarToggleItemElement, ToolbarToggleItemProps>(\n (props: ScopedProps<ToolbarToggleItemProps>, forwardedRef) => {\n const { __scopeToolbar, ...toggleItemProps } = props;\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n const scope = { __scopeToolbar: props.__scopeToolbar };\n\n return (\n <ToolbarButton asChild {...scope}>\n <ToggleGroupPrimitive.Item {...toggleGroupScope} {...toggleItemProps} ref={forwardedRef} />\n </ToolbarButton>\n );\n }\n);\n\nToolbarToggleItem.displayName = TOGGLE_ITEM_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = Toolbar;\nconst Separator = ToolbarSeparator;\nconst Button = ToolbarButton;\nconst Link = ToolbarLink;\nconst ToggleGroup = ToolbarToggleGroup;\nconst ToggleItem = ToolbarToggleItem;\n\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Root,\n Separator,\n Button,\n Link,\n ToggleGroup,\n ToggleItem,\n};\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n};\n"],
4
+ "sourcesContent": ["'use client';\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Root,\n Separator,\n Button,\n Link,\n ToggleGroup,\n ToggleItem,\n} from './toolbar';\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n} from './toolbar';\n", "import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Toolbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOOLBAR_NAME = 'Toolbar';\n\ntype ScopedProps<P> = P & { __scopeToolbar?: Scope };\nconst [createToolbarContext, createToolbarScope] = createContextScope(TOOLBAR_NAME, [\n createRovingFocusGroupScope,\n createToggleGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useToggleGroupScope = createToggleGroupScope();\n\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype ToolbarContextValue = {\n orientation: RovingFocusGroupProps['orientation'];\n dir: RovingFocusGroupProps['dir'];\n};\nconst [ToolbarProvider, useToolbarContext] =\n createToolbarContext<ToolbarContextValue>(TOOLBAR_NAME);\n\ntype ToolbarElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ToolbarProps extends PrimitiveDivProps {\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Toolbar = React.forwardRef<ToolbarElement, ToolbarProps>(\n (props: ScopedProps<ToolbarProps>, forwardedRef) => {\n const { __scopeToolbar, orientation = 'horizontal', dir, loop = true, ...toolbarProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n const direction = useDirection(dir);\n return (\n <ToolbarProvider scope={__scopeToolbar} orientation={orientation} dir={direction}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation={orientation}\n dir={direction}\n loop={loop}\n >\n <Primitive.div\n role=\"toolbar\"\n aria-orientation={orientation}\n dir={direction}\n {...toolbarProps}\n ref={forwardedRef}\n />\n </RovingFocusGroup.Root>\n </ToolbarProvider>\n );\n },\n);\n\nToolbar.displayName = TOOLBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ToolbarSeparator';\n\ntype ToolbarSeparatorElement = React.ComponentRef<typeof SeparatorPrimitive.Root>;\ntype SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;\ninterface ToolbarSeparatorProps extends SeparatorProps {}\n\nconst ToolbarSeparator = React.forwardRef<ToolbarSeparatorElement, ToolbarSeparatorProps>(\n (props: ScopedProps<ToolbarSeparatorProps>, forwardedRef) => {\n const { __scopeToolbar, ...separatorProps } = props;\n const context = useToolbarContext(SEPARATOR_NAME, __scopeToolbar);\n return (\n <SeparatorPrimitive.Root\n orientation={context.orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n {...separatorProps}\n ref={forwardedRef}\n />\n );\n },\n);\n\nToolbarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUTTON_NAME = 'ToolbarButton';\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n (props: ScopedProps<ToolbarButtonProps>, forwardedRef) => {\n const { __scopeToolbar, ...buttonProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable={!props.disabled}>\n <Primitive.button type=\"button\" {...buttonProps} ref={forwardedRef} />\n </RovingFocusGroup.Item>\n );\n },\n);\n\nToolbarButton.displayName = BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\nconst LINK_NAME = 'ToolbarLink';\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n (props: ScopedProps<ToolbarLinkProps>, forwardedRef) => {\n const { __scopeToolbar, ...linkProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable>\n <Primitive.a\n {...linkProps}\n ref={forwardedRef}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === ' ') event.currentTarget.click();\n })}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\n\nToolbarLink.displayName = LINK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_GROUP_NAME = 'ToolbarToggleGroup';\n\ntype ToolbarToggleGroupElement = React.ComponentRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;\ninterface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, { type: 'single' }> {}\ninterface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, { type: 'multiple' }> {}\n\nconst ToolbarToggleGroup = React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n (\n props: ScopedProps<ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps>,\n forwardedRef,\n ) => {\n const { __scopeToolbar, ...toggleGroupProps } = props;\n const context = useToolbarContext(TOGGLE_GROUP_NAME, __scopeToolbar);\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n return (\n <ToggleGroupPrimitive.Root\n data-orientation={context.orientation}\n dir={context.dir}\n {...toggleGroupScope}\n {...toggleGroupProps}\n ref={forwardedRef}\n rovingFocus={false}\n />\n );\n },\n);\n\nToolbarToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_ITEM_NAME = 'ToolbarToggleItem';\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = React.forwardRef<ToolbarToggleItemElement, ToolbarToggleItemProps>(\n (props: ScopedProps<ToolbarToggleItemProps>, forwardedRef) => {\n const { __scopeToolbar, ...toggleItemProps } = props;\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n const scope = { __scopeToolbar: props.__scopeToolbar };\n\n return (\n <ToolbarButton asChild {...scope}>\n <ToggleGroupPrimitive.Item {...toggleGroupScope} {...toggleItemProps} ref={forwardedRef} />\n </ToolbarButton>\n );\n },\n);\n\nToolbarToggleItem.displayName = TOGGLE_ITEM_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = Toolbar;\nconst Separator = ToolbarSeparator;\nconst Button = ToolbarButton;\nconst Link = ToolbarLink;\nconst ToggleGroup = ToolbarToggleGroup;\nconst ToggleItem = ToolbarToggleItem;\n\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Root,\n Separator,\n Button,\n Link,\n ToggleGroup,\n ToggleItem,\n};\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n};\n"],
5
5
  "mappings": "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",
6
6
  "names": ["Root", "Root"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/toolbar.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Toolbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOOLBAR_NAME = 'Toolbar';\n\ntype ScopedProps<P> = P & { __scopeToolbar?: Scope };\nconst [createToolbarContext, createToolbarScope] = createContextScope(TOOLBAR_NAME, [\n createRovingFocusGroupScope,\n createToggleGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useToggleGroupScope = createToggleGroupScope();\n\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype ToolbarContextValue = {\n orientation: RovingFocusGroupProps['orientation'];\n dir: RovingFocusGroupProps['dir'];\n};\nconst [ToolbarProvider, useToolbarContext] =\n createToolbarContext<ToolbarContextValue>(TOOLBAR_NAME);\n\ntype ToolbarElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ToolbarProps extends PrimitiveDivProps {\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Toolbar = React.forwardRef<ToolbarElement, ToolbarProps>(\n (props: ScopedProps<ToolbarProps>, forwardedRef) => {\n const { __scopeToolbar, orientation = 'horizontal', dir, loop = true, ...toolbarProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n const direction = useDirection(dir);\n return (\n <ToolbarProvider scope={__scopeToolbar} orientation={orientation} dir={direction}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation={orientation}\n dir={direction}\n loop={loop}\n >\n <Primitive.div\n role=\"toolbar\"\n aria-orientation={orientation}\n dir={direction}\n {...toolbarProps}\n ref={forwardedRef}\n />\n </RovingFocusGroup.Root>\n </ToolbarProvider>\n );\n }\n);\n\nToolbar.displayName = TOOLBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ToolbarSeparator';\n\ntype ToolbarSeparatorElement = React.ComponentRef<typeof SeparatorPrimitive.Root>;\ntype SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;\ninterface ToolbarSeparatorProps extends SeparatorProps {}\n\nconst ToolbarSeparator = React.forwardRef<ToolbarSeparatorElement, ToolbarSeparatorProps>(\n (props: ScopedProps<ToolbarSeparatorProps>, forwardedRef) => {\n const { __scopeToolbar, ...separatorProps } = props;\n const context = useToolbarContext(SEPARATOR_NAME, __scopeToolbar);\n return (\n <SeparatorPrimitive.Root\n orientation={context.orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n {...separatorProps}\n ref={forwardedRef}\n />\n );\n }\n);\n\nToolbarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUTTON_NAME = 'ToolbarButton';\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n (props: ScopedProps<ToolbarButtonProps>, forwardedRef) => {\n const { __scopeToolbar, ...buttonProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable={!props.disabled}>\n <Primitive.button type=\"button\" {...buttonProps} ref={forwardedRef} />\n </RovingFocusGroup.Item>\n );\n }\n);\n\nToolbarButton.displayName = BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\nconst LINK_NAME = 'ToolbarLink';\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n (props: ScopedProps<ToolbarLinkProps>, forwardedRef) => {\n const { __scopeToolbar, ...linkProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable>\n <Primitive.a\n {...linkProps}\n ref={forwardedRef}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === ' ') event.currentTarget.click();\n })}\n />\n </RovingFocusGroup.Item>\n );\n }\n);\n\nToolbarLink.displayName = LINK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_GROUP_NAME = 'ToolbarToggleGroup';\n\ntype ToolbarToggleGroupElement = React.ComponentRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;\ninterface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, { type: 'single' }> {}\ninterface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, { type: 'multiple' }> {}\n\nconst ToolbarToggleGroup = React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n (\n props: ScopedProps<ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps>,\n forwardedRef\n ) => {\n const { __scopeToolbar, ...toggleGroupProps } = props;\n const context = useToolbarContext(TOGGLE_GROUP_NAME, __scopeToolbar);\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n return (\n <ToggleGroupPrimitive.Root\n data-orientation={context.orientation}\n dir={context.dir}\n {...toggleGroupScope}\n {...toggleGroupProps}\n ref={forwardedRef}\n rovingFocus={false}\n />\n );\n }\n);\n\nToolbarToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_ITEM_NAME = 'ToolbarToggleItem';\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = React.forwardRef<ToolbarToggleItemElement, ToolbarToggleItemProps>(\n (props: ScopedProps<ToolbarToggleItemProps>, forwardedRef) => {\n const { __scopeToolbar, ...toggleItemProps } = props;\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n const scope = { __scopeToolbar: props.__scopeToolbar };\n\n return (\n <ToolbarButton asChild {...scope}>\n <ToggleGroupPrimitive.Item {...toggleGroupScope} {...toggleItemProps} ref={forwardedRef} />\n </ToolbarButton>\n );\n }\n);\n\nToolbarToggleItem.displayName = TOGGLE_ITEM_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = Toolbar;\nconst Separator = ToolbarSeparator;\nconst Button = ToolbarButton;\nconst Link = ToolbarLink;\nconst ToggleGroup = ToolbarToggleGroup;\nconst ToggleItem = ToolbarToggleItem;\n\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Root,\n Separator,\n Button,\n Link,\n ToggleGroup,\n ToggleItem,\n};\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n};\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createContextScope } from '@radix-ui/react-context';\nimport * as RovingFocusGroup from '@radix-ui/react-roving-focus';\nimport { createRovingFocusGroupScope } from '@radix-ui/react-roving-focus';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\nimport * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';\nimport { createToggleGroupScope } from '@radix-ui/react-toggle-group';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type { Scope } from '@radix-ui/react-context';\n\n/* -------------------------------------------------------------------------------------------------\n * Toolbar\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOOLBAR_NAME = 'Toolbar';\n\ntype ScopedProps<P> = P & { __scopeToolbar?: Scope };\nconst [createToolbarContext, createToolbarScope] = createContextScope(TOOLBAR_NAME, [\n createRovingFocusGroupScope,\n createToggleGroupScope,\n]);\nconst useRovingFocusGroupScope = createRovingFocusGroupScope();\nconst useToggleGroupScope = createToggleGroupScope();\n\ntype RovingFocusGroupProps = React.ComponentPropsWithoutRef<typeof RovingFocusGroup.Root>;\ntype ToolbarContextValue = {\n orientation: RovingFocusGroupProps['orientation'];\n dir: RovingFocusGroupProps['dir'];\n};\nconst [ToolbarProvider, useToolbarContext] =\n createToolbarContext<ToolbarContextValue>(TOOLBAR_NAME);\n\ntype ToolbarElement = React.ComponentRef<typeof Primitive.div>;\ntype PrimitiveDivProps = React.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface ToolbarProps extends PrimitiveDivProps {\n orientation?: RovingFocusGroupProps['orientation'];\n loop?: RovingFocusGroupProps['loop'];\n dir?: RovingFocusGroupProps['dir'];\n}\n\nconst Toolbar = React.forwardRef<ToolbarElement, ToolbarProps>(\n (props: ScopedProps<ToolbarProps>, forwardedRef) => {\n const { __scopeToolbar, orientation = 'horizontal', dir, loop = true, ...toolbarProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n const direction = useDirection(dir);\n return (\n <ToolbarProvider scope={__scopeToolbar} orientation={orientation} dir={direction}>\n <RovingFocusGroup.Root\n asChild\n {...rovingFocusGroupScope}\n orientation={orientation}\n dir={direction}\n loop={loop}\n >\n <Primitive.div\n role=\"toolbar\"\n aria-orientation={orientation}\n dir={direction}\n {...toolbarProps}\n ref={forwardedRef}\n />\n </RovingFocusGroup.Root>\n </ToolbarProvider>\n );\n },\n);\n\nToolbar.displayName = TOOLBAR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarSeparator\n * -----------------------------------------------------------------------------------------------*/\n\nconst SEPARATOR_NAME = 'ToolbarSeparator';\n\ntype ToolbarSeparatorElement = React.ComponentRef<typeof SeparatorPrimitive.Root>;\ntype SeparatorProps = React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>;\ninterface ToolbarSeparatorProps extends SeparatorProps {}\n\nconst ToolbarSeparator = React.forwardRef<ToolbarSeparatorElement, ToolbarSeparatorProps>(\n (props: ScopedProps<ToolbarSeparatorProps>, forwardedRef) => {\n const { __scopeToolbar, ...separatorProps } = props;\n const context = useToolbarContext(SEPARATOR_NAME, __scopeToolbar);\n return (\n <SeparatorPrimitive.Root\n orientation={context.orientation === 'horizontal' ? 'vertical' : 'horizontal'}\n {...separatorProps}\n ref={forwardedRef}\n />\n );\n },\n);\n\nToolbarSeparator.displayName = SEPARATOR_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\nconst BUTTON_NAME = 'ToolbarButton';\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n (props: ScopedProps<ToolbarButtonProps>, forwardedRef) => {\n const { __scopeToolbar, ...buttonProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable={!props.disabled}>\n <Primitive.button type=\"button\" {...buttonProps} ref={forwardedRef} />\n </RovingFocusGroup.Item>\n );\n },\n);\n\nToolbarButton.displayName = BUTTON_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\nconst LINK_NAME = 'ToolbarLink';\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n (props: ScopedProps<ToolbarLinkProps>, forwardedRef) => {\n const { __scopeToolbar, ...linkProps } = props;\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeToolbar);\n return (\n <RovingFocusGroup.Item asChild {...rovingFocusGroupScope} focusable>\n <Primitive.a\n {...linkProps}\n ref={forwardedRef}\n onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === ' ') event.currentTarget.click();\n })}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\n\nToolbarLink.displayName = LINK_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_GROUP_NAME = 'ToolbarToggleGroup';\n\ntype ToolbarToggleGroupElement = React.ComponentRef<typeof ToggleGroupPrimitive.Root>;\ntype ToggleGroupProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root>;\ninterface ToolbarToggleGroupSingleProps extends Extract<ToggleGroupProps, { type: 'single' }> {}\ninterface ToolbarToggleGroupMultipleProps extends Extract<ToggleGroupProps, { type: 'multiple' }> {}\n\nconst ToolbarToggleGroup = React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n (\n props: ScopedProps<ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps>,\n forwardedRef,\n ) => {\n const { __scopeToolbar, ...toggleGroupProps } = props;\n const context = useToolbarContext(TOGGLE_GROUP_NAME, __scopeToolbar);\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n return (\n <ToggleGroupPrimitive.Root\n data-orientation={context.orientation}\n dir={context.dir}\n {...toggleGroupScope}\n {...toggleGroupProps}\n ref={forwardedRef}\n rovingFocus={false}\n />\n );\n },\n);\n\nToolbarToggleGroup.displayName = TOGGLE_GROUP_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst TOGGLE_ITEM_NAME = 'ToolbarToggleItem';\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = React.forwardRef<ToolbarToggleItemElement, ToolbarToggleItemProps>(\n (props: ScopedProps<ToolbarToggleItemProps>, forwardedRef) => {\n const { __scopeToolbar, ...toggleItemProps } = props;\n const toggleGroupScope = useToggleGroupScope(__scopeToolbar);\n const scope = { __scopeToolbar: props.__scopeToolbar };\n\n return (\n <ToolbarButton asChild {...scope}>\n <ToggleGroupPrimitive.Item {...toggleGroupScope} {...toggleItemProps} ref={forwardedRef} />\n </ToolbarButton>\n );\n },\n);\n\nToolbarToggleItem.displayName = TOGGLE_ITEM_NAME;\n\n/* ---------------------------------------------------------------------------------------------- */\n\nconst Root = Toolbar;\nconst Separator = ToolbarSeparator;\nconst Button = ToolbarButton;\nconst Link = ToolbarLink;\nconst ToggleGroup = ToolbarToggleGroup;\nconst ToggleItem = ToolbarToggleItem;\n\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Root,\n Separator,\n Button,\n Link,\n ToggleGroup,\n ToggleItem,\n};\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n};\n"],
5
5
  "mappings": "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",
6
6
  "names": ["Root"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-toolbar",
3
- "version": "1.1.11",
3
+ "version": "1.1.12-rc.1762291353631",
4
4
  "license": "MIT",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -12,22 +12,22 @@
12
12
  "sideEffects": false,
13
13
  "dependencies": {
14
14
  "@radix-ui/primitive": "1.1.3",
15
- "@radix-ui/react-direction": "1.1.1",
16
- "@radix-ui/react-context": "1.1.2",
17
- "@radix-ui/react-primitive": "2.1.3",
18
- "@radix-ui/react-separator": "1.1.7",
19
- "@radix-ui/react-toggle-group": "1.1.11",
20
- "@radix-ui/react-roving-focus": "1.1.11"
15
+ "@radix-ui/react-context": "1.1.3",
16
+ "@radix-ui/react-primitive": "2.1.4",
17
+ "@radix-ui/react-roving-focus": "1.1.12-rc.1762291353631",
18
+ "@radix-ui/react-direction": "1.1.2-rc.1762291353631",
19
+ "@radix-ui/react-separator": "1.1.8",
20
+ "@radix-ui/react-toggle-group": "1.1.12-rc.1762291353631"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/react": "^19.0.7",
24
- "@types/react-dom": "^19.0.3",
25
- "eslint": "^9.18.0",
26
- "react": "^19.1.0",
27
- "react-dom": "^19.1.0",
28
- "typescript": "^5.7.3",
29
- "@repo/eslint-config": "0.0.0",
23
+ "@types/react": "^19.2.2",
24
+ "@types/react-dom": "^19.2.2",
25
+ "eslint": "^9.38.0",
26
+ "react": "^19.2.0",
27
+ "react-dom": "^19.2.0",
28
+ "typescript": "^5.9.3",
30
29
  "@repo/builder": "0.0.0",
30
+ "@repo/eslint-config": "0.0.0",
31
31
  "@repo/typescript-config": "0.0.0"
32
32
  },
33
33
  "peerDependencies": {
@@ -55,6 +55,7 @@
55
55
  "scripts": {
56
56
  "lint": "eslint --max-warnings 0 src",
57
57
  "clean": "rm -rf dist",
58
+ "reset": "rm -rf dist node_modules",
58
59
  "typecheck": "tsc --noEmit",
59
60
  "build": "radix-build"
60
61
  },