@radix-ui/react-toolbar 1.1.18 → 1.1.19

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.d.mts CHANGED
@@ -40,5 +40,11 @@ type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPri
40
40
  interface ToolbarToggleItemProps extends ToggleGroupItemProps {
41
41
  }
42
42
  declare const ToolbarToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
43
+ declare const Root: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
44
+ declare const Separator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
45
+ declare const Button: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
46
+ declare const Link: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
47
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
48
+ declare const ToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
43
49
 
44
- export { ToolbarButton as Button, ToolbarLink as Link, Toolbar as Root, ToolbarSeparator as Separator, ToolbarToggleGroup as ToggleGroup, ToolbarToggleItem as ToggleItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, ToolbarToggleGroup, type ToolbarToggleGroupMultipleProps, type ToolbarToggleGroupSingleProps, ToolbarToggleItem, type ToolbarToggleItemProps, createToolbarScope };
50
+ 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 };
package/dist/index.d.ts CHANGED
@@ -40,5 +40,11 @@ type ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPri
40
40
  interface ToolbarToggleItemProps extends ToggleGroupItemProps {
41
41
  }
42
42
  declare const ToolbarToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
43
+ declare const Root: React.ForwardRefExoticComponent<ToolbarProps & React.RefAttributes<HTMLDivElement>>;
44
+ declare const Separator: React.ForwardRefExoticComponent<ToolbarSeparatorProps & React.RefAttributes<HTMLDivElement>>;
45
+ declare const Button: React.ForwardRefExoticComponent<ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
46
+ declare const Link: React.ForwardRefExoticComponent<ToolbarLinkProps & React.RefAttributes<HTMLAnchorElement>>;
47
+ declare const ToggleGroup: React.ForwardRefExoticComponent<(ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps) & React.RefAttributes<HTMLDivElement>>;
48
+ declare const ToggleItem: React.ForwardRefExoticComponent<ToolbarToggleItemProps & React.RefAttributes<HTMLButtonElement>>;
43
49
 
44
- export { ToolbarButton as Button, ToolbarLink as Link, Toolbar as Root, ToolbarSeparator as Separator, ToolbarToggleGroup as ToggleGroup, ToolbarToggleItem as ToggleItem, Toolbar, ToolbarButton, type ToolbarButtonProps, ToolbarLink, type ToolbarLinkProps, type ToolbarProps, ToolbarSeparator, type ToolbarSeparatorProps, ToolbarToggleGroup, type ToolbarToggleGroupMultipleProps, type ToolbarToggleGroupSingleProps, ToolbarToggleItem, type ToolbarToggleItemProps, createToolbarScope };
50
+ 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 };
package/dist/index.js CHANGED
@@ -32,12 +32,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
32
32
  // src/index.ts
33
33
  var index_exports = {};
34
34
  __export(index_exports, {
35
- Button: () => ToolbarButton,
36
- Link: () => ToolbarLink,
37
- Root: () => Toolbar,
38
- Separator: () => ToolbarSeparator,
39
- ToggleGroup: () => ToolbarToggleGroup,
40
- ToggleItem: () => ToolbarToggleItem,
35
+ Button: () => Button,
36
+ Link: () => Link,
37
+ Root: () => Root4,
38
+ Separator: () => Separator,
39
+ ToggleGroup: () => ToggleGroup,
40
+ ToggleItem: () => ToggleItem,
41
41
  Toolbar: () => Toolbar,
42
42
  ToolbarButton: () => ToolbarButton,
43
43
  ToolbarLink: () => ToolbarLink,
@@ -169,4 +169,10 @@ var ToolbarToggleItem = /* @__PURE__ */ React.forwardRef(
169
169
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToolbarButton, { asChild: true, ...scope, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ToggleGroupPrimitive.Item, { ...toggleGroupScope, ...toggleItemProps, ref: forwardedRef }) });
170
170
  }, "ToolbarToggleItem")
171
171
  );
172
+ var Root4 = Toolbar;
173
+ var Separator = ToolbarSeparator;
174
+ var Button = ToolbarButton;
175
+ var Link = ToolbarLink;
176
+ var ToggleGroup = ToolbarToggleGroup;
177
+ var ToggleItem = ToolbarToggleItem;
172
178
  //# sourceMappingURL=index.js.map
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 = /* @__PURE__ */ React.forwardRef<ToolbarElement, ToolbarProps>(\n // blank line to reduce diff noise\n function Toolbar(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\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarSeparatorElement,\n ToolbarSeparatorProps\n>(\n // blank line to reduce diff noise\n function ToolbarSeparator(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = /* @__PURE__ */ React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n function ToolbarButton(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = /* @__PURE__ */ React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n function ToolbarLink(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 // Only react to keys originating from the link itself. Focusable\n // descendants (eg. content portaled out of the link's DOM subtree)\n // bubble their key events here through React's event system.\n // See: https://github.com/radix-ui/primitives/issues/3232\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (event.key === ' ') {\n event.currentTarget.click();\n }\n })}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleGroup(\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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleItemElement,\n ToolbarToggleItemProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleItem(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\n/* ---------------------------------------------------------------------------------------------- */\n\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Toolbar as Root,\n ToolbarSeparator as Separator,\n ToolbarButton as Button,\n ToolbarLink as Link,\n ToolbarToggleGroup as ToggleGroup,\n ToolbarToggleItem as ToggleItem,\n};\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,2BAAmC;AACnC,uBAAkC;AAClC,gCAA4C;AAC5C,6BAA0B;AAC1B,yBAAoC;AACpC,2BAAsC;AACtC,gCAAuC;AACvC,6BAA6B;AAiDnB;AAzCV,IAAM,eAAe;AAGrB,IAAM,CAAC,sBAAsB,kBAAkB,QAAI,yCAAmB,cAAc;AAAA,EAClF;AAAA,EACA;AACF,CAAC;AACD,IAAM,+BAA2B,uDAA4B;AAC7D,IAAM,0BAAsB,kDAAuB;AAOnD,IAAM,CAAC,iBAAiB,iBAAiB,IACvC,qBAA0C,YAAY;AAUxD,IAAM,UAA0B,gBAAM;AAAA;AAAA,EAEpC,gCAASA,SAAQ,OAAkC,cAAc;AAC/D,UAAM,EAAE,gBAAgB,cAAc,cAAc,KAAK,OAAO,MAAM,GAAG,aAAa,IAAI;AAC1F,UAAM,wBAAwB,yBAAyB,cAAc;AACrE,UAAM,gBAAY,qCAAa,GAAG;AAClC,WACE,4CAAC,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AAAA,MAAC,iCAAU;AAAA,MAAV;AAAA,QACE,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,eAAW,uCAAqB,MAAM,WAAW,CAAC,UAAU;AAK1D,cAAI,MAAM,WAAW,MAAM,eAAe;AACxC;AAAA,UACF;AAEA,cAAI,MAAM,QAAQ,KAAK;AACrB,kBAAM,cAAc,MAAM;AAAA,UAC5B;AAAA,QACF,CAAC;AAAA;AAAA,IACH,GACF;AAAA,EAEJ,GAxBA;AAyBF;AAMA,IAAM,oBAAoB;AAO1B,IAAM,qBAAqC,gBAAM;AAAA;AAAA,EAK/C,gCAASC,oBACP,OACA,cACA;AACA,UAAM,EAAE,gBAAgB,GAAG,iBAAiB,IAAI;AAChD,UAAM,UAAU,kBAAkB,mBAAmB,cAAc;AACnE,UAAM,mBAAmB,oBAAoB,cAAc;AAC3D,WACE;AAAA,MAAsB;AAAA,MAArB;AAAA,QACC,oBAAkB,QAAQ;AAAA,QAC1B,KAAK,QAAQ;AAAA,QACZ,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,aAAa;AAAA;AAAA,IACf;AAAA,EAEJ,GAjBA;AAkBF;AAUA,IAAM,oBAAoC,gBAAM;AAAA;AAAA,EAK9C,gCAASC,mBAAkB,OAA4C,cAAc;AACnF,UAAM,EAAE,gBAAgB,GAAG,gBAAgB,IAAI;AAC/C,UAAM,mBAAmB,oBAAoB,cAAc;AAC3D,UAAM,QAAQ,EAAE,gBAAgB,MAAM,eAAe;AAErD,WACE,4CAAC,iBAAc,SAAO,MAAE,GAAG,OACzB,sDAAsB,2BAArB,EAA2B,GAAG,kBAAmB,GAAG,iBAAiB,KAAK,cAAc,GAC3F;AAAA,EAEJ,GAVA;AAWF;",
6
- "names": ["Toolbar", "ToolbarSeparator", "ToolbarButton", "ToolbarLink", "ToolbarToggleGroup", "ToolbarToggleItem"]
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 = /* @__PURE__ */ React.forwardRef<ToolbarElement, ToolbarProps>(\n // blank line to reduce diff noise\n function Toolbar(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\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarSeparatorElement,\n ToolbarSeparatorProps\n>(\n // blank line to reduce diff noise\n function ToolbarSeparator(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = /* @__PURE__ */ React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n function ToolbarButton(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = /* @__PURE__ */ React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n function ToolbarLink(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 // Only react to keys originating from the link itself. Focusable\n // descendants (eg. content portaled out of the link's DOM subtree)\n // bubble their key events here through React's event system.\n // See: https://github.com/radix-ui/primitives/issues/3232\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (event.key === ' ') {\n event.currentTarget.click();\n }\n })}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleGroup(\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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleItemElement,\n ToolbarToggleItemProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleItem(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\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
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,cAAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AACvB,uBAAqC;AACrC,2BAAmC;AACnC,uBAAkC;AAClC,gCAA4C;AAC5C,6BAA0B;AAC1B,yBAAoC;AACpC,2BAAsC;AACtC,gCAAuC;AACvC,6BAA6B;AAiDnB;AAzCV,IAAM,eAAe;AAGrB,IAAM,CAAC,sBAAsB,kBAAkB,QAAI,yCAAmB,cAAc;AAAA,EAClF;AAAA,EACA;AACF,CAAC;AACD,IAAM,+BAA2B,uDAA4B;AAC7D,IAAM,0BAAsB,kDAAuB;AAOnD,IAAM,CAAC,iBAAiB,iBAAiB,IACvC,qBAA0C,YAAY;AAUxD,IAAM,UAA0B,gBAAM;AAAA;AAAA,EAEpC,gCAASC,SAAQ,OAAkC,cAAc;AAC/D,UAAM,EAAE,gBAAgB,cAAc,c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YAAY;AAClB,IAAM,SAAS;AACf,IAAM,OAAO;AACb,IAAM,cAAc;AACpB,IAAM,aAAa;",
6
+ "names": ["Root", "Toolbar", "ToolbarSeparator", "ToolbarButton", "ToolbarLink", "ToolbarToggleGroup", "ToolbarToggleItem", "Root"]
7
7
  }
package/dist/index.mjs CHANGED
@@ -123,13 +123,19 @@ var ToolbarToggleItem = /* @__PURE__ */ React.forwardRef(
123
123
  return /* @__PURE__ */ jsx(ToolbarButton, { asChild: true, ...scope, children: /* @__PURE__ */ jsx(ToggleGroupPrimitive.Item, { ...toggleGroupScope, ...toggleItemProps, ref: forwardedRef }) });
124
124
  }, "ToolbarToggleItem")
125
125
  );
126
+ var Root4 = Toolbar;
127
+ var Separator = ToolbarSeparator;
128
+ var Button = ToolbarButton;
129
+ var Link = ToolbarLink;
130
+ var ToggleGroup = ToolbarToggleGroup;
131
+ var ToggleItem = ToolbarToggleItem;
126
132
  export {
127
- ToolbarButton as Button,
128
- ToolbarLink as Link,
129
- Toolbar as Root,
130
- ToolbarSeparator as Separator,
131
- ToolbarToggleGroup as ToggleGroup,
132
- ToolbarToggleItem as ToggleItem,
133
+ Button,
134
+ Link,
135
+ Root4 as Root,
136
+ Separator,
137
+ ToggleGroup,
138
+ ToggleItem,
133
139
  Toolbar,
134
140
  ToolbarButton,
135
141
  ToolbarLink,
@@ -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 = /* @__PURE__ */ React.forwardRef<ToolbarElement, ToolbarProps>(\n // blank line to reduce diff noise\n function Toolbar(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\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarSeparatorElement,\n ToolbarSeparatorProps\n>(\n // blank line to reduce diff noise\n function ToolbarSeparator(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = /* @__PURE__ */ React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n function ToolbarButton(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = /* @__PURE__ */ React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n function ToolbarLink(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 // Only react to keys originating from the link itself. Focusable\n // descendants (eg. content portaled out of the link's DOM subtree)\n // bubble their key events here through React's event system.\n // See: https://github.com/radix-ui/primitives/issues/3232\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (event.key === ' ') {\n event.currentTarget.click();\n }\n })}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleGroup(\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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleItemElement,\n ToolbarToggleItemProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleItem(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\n/* ---------------------------------------------------------------------------------------------- */\n\nexport {\n createToolbarScope,\n //\n Toolbar,\n ToolbarSeparator,\n ToolbarButton,\n ToolbarLink,\n ToolbarToggleGroup,\n ToolbarToggleItem,\n //\n Toolbar as Root,\n ToolbarSeparator as Separator,\n ToolbarButton as Button,\n ToolbarLink as Link,\n ToolbarToggleGroup as ToggleGroup,\n ToolbarToggleItem as ToggleItem,\n};\nexport type {\n ToolbarProps,\n ToolbarSeparatorProps,\n ToolbarButtonProps,\n ToolbarLinkProps,\n ToolbarToggleGroupSingleProps,\n ToolbarToggleGroupMultipleProps,\n ToolbarToggleItemProps,\n};\n"],
5
- "mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,0B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Z,GAAG;AAAA,QACH,GAAG;AAAA,QACJ,KAAK;AAAA,QACL,aAAa;AAAA;AAAA,IACf;AAAA,EAEJ,GAjBA;AAkBF;AAUA,IAAM,oBAAoC,gBAAM;AAAA;AAAA,EAK9C,gCAASC,mBAAkB,OAA4C,cAAc;AACnF,UAAM,EAAE,gBAAgB,GAAG,gBAAgB,IAAI;AAC/C,UAAM,mBAAmB,oBAAoB,cAAc;AAC3D,UAAM,QAAQ,EAAE,gBAAgB,MAAM,eAAe;AAErD,WACE,oBAAC,iBAAc,SAAO,MAAE,GAAG,OACzB,8BAAsB,2BAArB,EAA2B,GAAG,kBAAmB,GAAG,iBAAiB,KAAK,cAAc,GAC3F;AAAA,EAEJ,GAVA;AAWF;",
6
- "names": ["Toolbar", "ToolbarSeparator", "ToolbarButton", "ToolbarLink", "ToolbarToggleGroup", "ToolbarToggleItem"]
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 = /* @__PURE__ */ React.forwardRef<ToolbarElement, ToolbarProps>(\n // blank line to reduce diff noise\n function Toolbar(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\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarSeparatorElement,\n ToolbarSeparatorProps\n>(\n // blank line to reduce diff noise\n function ToolbarSeparator(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarButton\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarButtonElement = React.ComponentRef<typeof Primitive.button>;\ntype PrimitiveButtonProps = React.ComponentPropsWithoutRef<typeof Primitive.button>;\ninterface ToolbarButtonProps extends PrimitiveButtonProps {}\n\nconst ToolbarButton = /* @__PURE__ */ React.forwardRef<ToolbarButtonElement, ToolbarButtonProps>(\n function ToolbarButton(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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarLink\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarLinkElement = React.ComponentRef<typeof Primitive.a>;\ntype PrimitiveLinkProps = React.ComponentPropsWithoutRef<typeof Primitive.a>;\ninterface ToolbarLinkProps extends PrimitiveLinkProps {}\n\nconst ToolbarLink = /* @__PURE__ */ React.forwardRef<ToolbarLinkElement, ToolbarLinkProps>(\n function ToolbarLink(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 // Only react to keys originating from the link itself. Focusable\n // descendants (eg. content portaled out of the link's DOM subtree)\n // bubble their key events here through React's event system.\n // See: https://github.com/radix-ui/primitives/issues/3232\n if (event.target !== event.currentTarget) {\n return;\n }\n\n if (event.key === ' ') {\n event.currentTarget.click();\n }\n })}\n />\n </RovingFocusGroup.Item>\n );\n },\n);\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 = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleGroupElement,\n ToolbarToggleGroupSingleProps | ToolbarToggleGroupMultipleProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleGroup(\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\n/* -------------------------------------------------------------------------------------------------\n * ToolbarToggleItem\n * -----------------------------------------------------------------------------------------------*/\n\ntype ToolbarToggleItemElement = React.ComponentRef<typeof ToggleGroupPrimitive.Item>;\ntype ToggleGroupItemProps = React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>;\ninterface ToolbarToggleItemProps extends ToggleGroupItemProps {}\n\nconst ToolbarToggleItem = /* @__PURE__ */ React.forwardRef<\n ToolbarToggleItemElement,\n ToolbarToggleItemProps\n>(\n // blank line to reduce diff noise\n function ToolbarToggleItem(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\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
+ "mappings": ";;;;;AAAA,YAAY,WAAW;AACvB,SAAS,4BAA4B;AACrC,SAAS,0BAA0B;AACnC,YAAY,sBAAsB;AAClC,SAAS,mCAAmC;AAC5C,SAAS,iBAAiB;AAC1B,YAAY,wBAAwB;AACpC,YAAY,0BAA0B;AACtC,SAAS,8BAA8B;AACvC,SAAS,oBAAoB;AAiDnB;AAzCV,IAAM,eAAe;AAGrB,IAAM,CAAC,sBAAsB,kBAAkB,IAAI,mBAAmB,cAAc;AAAA,EAClF;AAAA,EACA;AACF,CAAC;AACD,IAAM,2BAA2B,4B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gBAAgB,MAAM,eAAe;AAErD,WACE,oBAAC,iBAAc,SAAO,MAAE,GAAG,OACzB,8BAAsB,2BAArB,EAA2B,GAAG,kBAAmB,GAAG,iBAAiB,KAAK,cAAc,GAC3F;AAAA,EAEJ,GAVA;AAWF;AAIA,IAAMC,QAAO;AACb,IAAM,YAAY;AAClB,IAAM,SAAS;AACf,IAAM,OAAO;AACb,IAAM,cAAc;AACpB,IAAM,aAAa;",
6
+ "names": ["Toolbar", "ToolbarSeparator", "ToolbarButton", "ToolbarLink", "ToolbarToggleGroup", "ToolbarToggleItem", "Root"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-toolbar",
3
- "version": "1.1.18",
3
+ "version": "1.1.19",
4
4
  "license": "MIT",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -12,18 +12,18 @@
12
12
  "sideEffects": false,
13
13
  "dependencies": {
14
14
  "@radix-ui/primitive": "1.1.7",
15
- "@radix-ui/react-context": "1.2.1",
16
- "@radix-ui/react-direction": "1.1.3",
17
- "@radix-ui/react-primitive": "2.1.9",
18
- "@radix-ui/react-roving-focus": "1.1.18",
19
- "@radix-ui/react-separator": "1.1.14",
20
- "@radix-ui/react-toggle-group": "1.1.18"
15
+ "@radix-ui/react-context": "1.2.2",
16
+ "@radix-ui/react-direction": "1.1.4",
17
+ "@radix-ui/react-primitive": "2.1.10",
18
+ "@radix-ui/react-roving-focus": "1.1.19",
19
+ "@radix-ui/react-separator": "1.1.15",
20
+ "@radix-ui/react-toggle-group": "1.1.19"
21
21
  },
22
22
  "devDependencies": {
23
- "@types/react": "^19.2.17",
24
- "@types/react-dom": "^19.2.3",
25
- "react": "^19.2.7",
26
- "react-dom": "^19.2.7",
23
+ "@types/react": "^19.2.2",
24
+ "@types/react-dom": "^19.2.2",
25
+ "react": "^19.2.0",
26
+ "react-dom": "^19.2.0",
27
27
  "typescript": "^5.9.3",
28
28
  "@repo/builder": "0.0.0",
29
29
  "@repo/typescript-config": "0.0.0"