@radix-ui/react-toolbar
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -5,3 +5,3 @@ import * as React from "react"; | ||
import * as SeparatorPrimitive from "@radix-ui/react-separator"; | ||
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group"; | ||
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group"; | ||
import * as Polymorphic from "@radix-ui/react-polymorphic"; | ||
@@ -43,8 +43,8 @@ type RovingFocusGroupProps = React.ComponentProps<typeof RovingFocusGroup>; | ||
export const ToolbarLink: ToolbarLinkPrimitive; | ||
type ToolbarRadioGroupOwnProps = Polymorphic.OwnProps<typeof RadioGroupPrimitive.Root>; | ||
type ToolbarRadioGroupPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof RadioGroupPrimitive.Root>, ToolbarRadioGroupOwnProps>; | ||
export const ToolbarRadioGroup: ToolbarRadioGroupPrimitive; | ||
type ToolbarRadioOwnProps = Polymorphic.Merge<Polymorphic.OwnProps<typeof ToolbarButton>, Polymorphic.OwnProps<typeof RadioGroupPrimitive.Item>>; | ||
type ToolbarRadioPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof RadioGroupPrimitive.Item>, ToolbarRadioOwnProps>; | ||
export const ToolbarRadioItem: ToolbarRadioPrimitive; | ||
type ToolbarToggleGroupOwnProps = Polymorphic.OwnProps<typeof ToggleGroupPrimitive.Root>; | ||
type ToolbarToggleGroupPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof ToggleGroupPrimitive.Root>, ToolbarToggleGroupOwnProps>; | ||
export const ToolbarToggleGroup: ToolbarToggleGroupPrimitive; | ||
type ToolbarRadioOwnProps = Polymorphic.Merge<Polymorphic.OwnProps<typeof ToolbarButton>, Polymorphic.OwnProps<typeof ToggleGroupPrimitive.Item>>; | ||
type ToolbarRadioPrimitive = Polymorphic.ForwardRefComponent<Polymorphic.IntrinsicElement<typeof ToggleGroupPrimitive.Item>, ToolbarRadioOwnProps>; | ||
export const ToolbarToggleItem: ToolbarRadioPrimitive; | ||
export const Root: ToolbarPrimitive; | ||
@@ -54,5 +54,5 @@ export const Separator: ToolbarSeparatorPrimitive; | ||
export const Link: ToolbarLinkPrimitive; | ||
export const RadioGroup: ToolbarRadioGroupPrimitive; | ||
export const RadioItem: ToolbarRadioPrimitive; | ||
export const ToggleGroup: ToolbarToggleGroupPrimitive; | ||
export const ToggleItem: ToolbarRadioPrimitive; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
var r=s({},require("@radix-ui/react-radio-group")),e=s({},require("@radix-ui/react-separator")),o=require("@radix-ui/react-slot").Slot,t=require("@radix-ui/react-primitive").Primitive,a=require("@radix-ui/react-roving-focus"),n=a.RovingFocusGroup,i=a.useRovingFocus,u=require("@radix-ui/react-context").createContext,l=require("@radix-ui/primitive").composeEventHandlers,c=s({},require("react"));function s(r,e){return Object.keys(e).forEach((function(o){"default"!==o&&"__esModule"!==o&&Object.defineProperty(r,o,{enumerable:!0,get:function(){return e[o]}})})),r}function f(){return(f=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var t in o)Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t])}return r}).apply(this,arguments)}function d(r,e){if(null==r)return{};var o,t,a=function(r,e){if(null==r)return{};var o,t,a={},n=Object.keys(r);for(t=0;t<n.length;t++)o=n[t],e.indexOf(o)>=0||(a[o]=r[o]);return a}(r,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);for(t=0;t<n.length;t++)o=n[t],e.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(r,o)&&(a[o]=r[o])}return a}function p(r,e){(null==e||e>r.length)&&(e=r.length);for(var o=0,t=new Array(e);o<e;o++)t[o]=r[o];return t}var v,b,y=u("Toolbar"),m=(b=2,function(r){if(Array.isArray(r))return r}(v=y)||function(r,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(r)){var o=[],t=!0,a=!1,n=void 0;try{for(var i,u=r[Symbol.iterator]();!(t=(i=u.next()).done)&&(o.push(i.value),!e||o.length!==e);t=!0);}catch(r){a=!0,n=r}finally{try{t||null==u.return||u.return()}finally{if(a)throw n}}return o}}(v,b)||function(r,e){if(r){if("string"==typeof r)return p(r,e);var o=Object.prototype.toString.call(r).slice(8,-1);return"Object"===o&&r.constructor&&(o=r.constructor.name),"Map"===o||"Set"===o?Array.from(r):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?p(r,e):void 0}}(v,b)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),x=m[0],w=m[1],g=c.forwardRef((function(r,e){var o=r.orientation,a=void 0===o?"horizontal":o,i=r.dir,u=void 0===i?"ltr":i,l=r.loop,s=void 0===l||l,p=d(r,["orientation","dir","loop"]);return c.createElement(x,{orientation:a},c.createElement(n,{orientation:a,dir:u,loop:s},c.createElement(t,f({role:"toolbar","aria-orientation":a,"data-orientation":a},p,{ref:e}))))}));exports.Toolbar=g;var h=c.forwardRef((function(r,o){var t=w("ToolbarSeparator");return c.createElement(e.Root,f({orientation:"horizontal"===t.orientation?"vertical":"horizontal"},r,{ref:o}))}));exports.ToolbarSeparator=h,h.displayName="ToolbarSeparator";var R=c.forwardRef((function(r,e){var o=r.as,a=void 0===o?"button":o,n=r.disabled,u=d(r,["as","disabled"]),s=i({disabled:n,active:!1});return c.createElement(t,f({role:"toolbaritem",disabled:n},u,{as:a,ref:e},s,{onFocus:l(u.onFocus,s.onFocus),onKeyDown:l(u.onKeyDown,s.onKeyDown),onMouseDown:l(u.onMouseDown,s.onMouseDown)}))}));exports.ToolbarButton=R,R.displayName="ToolbarButton";var O=c.forwardRef((function(r,e){var o=r.as,t=void 0===o?"a":o,a=d(r,["as"]);return c.createElement(R,f({},a,{as:t,ref:e,onKeyDown:l(a.onKeyDown,(function(r){" "===r.key&&r.currentTarget.click()}))}))}));exports.ToolbarLink=O,O.displayName="ToolbarLink";var T=c.forwardRef((function(e,o){var t=w("ToolbarRadioGroup");return c.createElement(r.Root,f({"data-orientation":t.orientation},e,{ref:o,rovingFocus:!1}))}));exports.ToolbarRadioGroup=T,T.displayName="ToolbarRadioGroup";var E=c.forwardRef((function(e,t){return c.createElement(R,{as:o},c.createElement(r.Item,f({},e,{ref:t})))}));exports.ToolbarRadioItem=E,E.displayName="ToolbarRadioItem";var S=g;exports.Root=S;var j=h;exports.Separator=j;var q=R;exports.Button=q;var D=O;exports.Link=D;var I=T;exports.RadioGroup=I;var k=E;exports.RadioItem=k; | ||
function o(o,r,t){Object.defineProperty(o,r,{get:t,enumerable:!0})}var r=require("@radix-ui/react-toggle-group"),t=r.Root,e=r.Item,n=require("@radix-ui/react-separator").Root,a=require("@radix-ui/react-slot").Slot,i=require("@radix-ui/react-primitive").Primitive,u=require("@radix-ui/react-roving-focus"),l=u.RovingFocusGroup,s=u.useRovingFocus,c=require("@radix-ui/react-context").createContext,p=require("@radix-ui/primitive").composeEventHandlers,g=require("react"),T=g.forwardRef,b=g.createElement,f={};function d(){return(d=Object.assign||function(o){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(o[e]=t[e])}return o}).apply(this,arguments)}const[x,m]=c("Toolbar"),y=T(((o,r)=>{const{orientation:t="horizontal",dir:e="ltr",loop:n=!0,...a}=o;return b(x,{orientation:t},b(l,{orientation:t,dir:e,loop:n},b(i,d({role:"toolbar","aria-orientation":t,"data-orientation":t},a,{ref:r}))))}));exports.Toolbar=y;const v=T(((o,r)=>{const t=m("ToolbarSeparator");return b(n,d({orientation:"horizontal"===t.orientation?"vertical":"horizontal"},o,{ref:r}))}));exports.ToolbarSeparator=v,v.displayName="ToolbarSeparator";const w="button",q=T(((o,r)=>{const{as:t=w,disabled:e,...n}=o,a=s({disabled:e,active:!1});return b(i,d({role:"toolbaritem",disabled:e},n,{as:t,ref:r},a,{onFocus:p(n.onFocus,a.onFocus),onKeyDown:p(n.onKeyDown,a.onKeyDown),onMouseDown:p(n.onMouseDown,a.onMouseDown)}))}));exports.ToolbarButton=q,q.displayName="ToolbarButton";const D="a",k=T(((o,r)=>{const{as:t=D,...e}=o;return b(q,d({},e,{as:t,ref:r,onKeyDown:p(e.onKeyDown,(o=>{" "===o.key&&o.currentTarget.click()}))}))}));exports.ToolbarLink=k,k.displayName="ToolbarLink";const G=T(((o,r)=>{const e=m("ToolbarToggleGroup");return b(t,d({"data-orientation":e.orientation},o,{ref:r,rovingFocus:!1}))}));exports.ToolbarToggleGroup=G,G.displayName="ToolbarToggleGroup";const R=T(((o,r)=>b(q,{as:a},b(e,d({},o,{ref:r})))));exports.ToolbarToggleItem=R,R.displayName="ToolbarToggleItem";const S=y;exports.Root=S;const h=v;exports.Separator=h;const F=q;exports.Button=F;const I=k;exports.Link=I;const B=G;exports.ToggleGroup=B;const K=R;exports.ToggleItem=K,o(f,"ToggleItem",(function(){return K})),o(f,"ToggleGroup",(function(){return B})),o(f,"Link",(function(){return I})),o(f,"Button",(function(){return F})),o(f,"Separator",(function(){return h})),o(f,"Root",(function(){return S})),o(f,"ToolbarToggleItem",(function(){return R})),o(f,"ToolbarToggleGroup",(function(){return G})),o(f,"ToolbarLink",(function(){return k})),o(f,"ToolbarButton",(function(){return q})),o(f,"ToolbarSeparator",(function(){return v})),o(f,"Toolbar",(function(){return y})); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import*as o from"@radix-ui/react-radio-group";import*as r from"@radix-ui/react-separator";import{Slot as t}from"@radix-ui/react-slot";import{Primitive as a}from"@radix-ui/react-primitive";import{RovingFocusGroup as e,useRovingFocus as n}from"@radix-ui/react-roving-focus";import{createContext as i}from"@radix-ui/react-context";import{composeEventHandlers as l}from"@radix-ui/primitive";import*as c from"react";function s(){return(s=Object.assign||function(o){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(o[a]=t[a])}return o}).apply(this,arguments)}const[p,d]=i("Toolbar");export const Toolbar=c.forwardRef(((o,r)=>{const{orientation:t="horizontal",dir:n="ltr",loop:i=!0,...l}=o;return c.createElement(p,{orientation:t},c.createElement(e,{orientation:t,dir:n,loop:i},c.createElement(a,s({role:"toolbar","aria-orientation":t,"data-orientation":t},l,{ref:r}))))}));export const ToolbarSeparator=c.forwardRef(((o,t)=>{const a=d("ToolbarSeparator");return c.createElement(r.Root,s({orientation:"horizontal"===a.orientation?"vertical":"horizontal"},o,{ref:t}))}));ToolbarSeparator.displayName="ToolbarSeparator";const u="button";export const ToolbarButton=c.forwardRef(((o,r)=>{const{as:t=u,disabled:e,...i}=o,p=n({disabled:e,active:!1});return c.createElement(a,s({role:"toolbaritem",disabled:e},i,{as:t,ref:r},p,{onFocus:l(i.onFocus,p.onFocus),onKeyDown:l(i.onKeyDown,p.onKeyDown),onMouseDown:l(i.onMouseDown,p.onMouseDown)}))}));ToolbarButton.displayName="ToolbarButton";const m="a";export const ToolbarLink=c.forwardRef(((o,r)=>{const{as:t=m,...a}=o;return c.createElement(ToolbarButton,s({},a,{as:t,ref:r,onKeyDown:l(a.onKeyDown,(o=>{" "===o.key&&o.currentTarget.click()}))}))}));ToolbarLink.displayName="ToolbarLink";export const ToolbarRadioGroup=c.forwardRef(((r,t)=>{const a=d("ToolbarRadioGroup");return c.createElement(o.Root,s({"data-orientation":a.orientation},r,{ref:t,rovingFocus:!1}))}));ToolbarRadioGroup.displayName="ToolbarRadioGroup";export const ToolbarRadioItem=c.forwardRef(((r,a)=>c.createElement(ToolbarButton,{as:t},c.createElement(o.Item,s({},r,{ref:a})))));ToolbarRadioItem.displayName="ToolbarRadioItem";export const Root=Toolbar;export const Separator=ToolbarSeparator;export const Button=ToolbarButton;export const Link=ToolbarLink;export const RadioGroup=ToolbarRadioGroup;export const RadioItem=ToolbarRadioItem; | ||
function o(o,r,t){Object.defineProperty(o,r,{get:t,enumerable:!0})}import{Root as r,Item as t}from"@radix-ui/react-toggle-group";import{Root as n}from"@radix-ui/react-separator";import{Slot as e}from"@radix-ui/react-slot";import{Primitive as a}from"@radix-ui/react-primitive";import{RovingFocusGroup as i,useRovingFocus as l}from"@radix-ui/react-roving-focus";import{createContext as u}from"@radix-ui/react-context";import{composeEventHandlers as T}from"@radix-ui/primitive";import{forwardRef as c,createElement as p}from"react";var b={};function s(){return(s=Object.assign||function(o){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(o[n]=t[n])}return o}).apply(this,arguments)}const[g,m]=u("Toolbar");export const Toolbar=c(((o,r)=>{const{orientation:t="horizontal",dir:n="ltr",loop:e=!0,...l}=o;return p(g,{orientation:t},p(i,{orientation:t,dir:n,loop:e},p(a,s({role:"toolbar","aria-orientation":t,"data-orientation":t},l,{ref:r}))))}));export const ToolbarSeparator=c(((o,r)=>{const t=m("ToolbarSeparator");return p(n,s({orientation:"horizontal"===t.orientation?"vertical":"horizontal"},o,{ref:r}))}));ToolbarSeparator.displayName="ToolbarSeparator";const f="button";export const ToolbarButton=c(((o,r)=>{const{as:t=f,disabled:n,...e}=o,i=l({disabled:n,active:!1});return p(a,s({role:"toolbaritem",disabled:n},e,{as:t,ref:r},i,{onFocus:T(e.onFocus,i.onFocus),onKeyDown:T(e.onKeyDown,i.onKeyDown),onMouseDown:T(e.onMouseDown,i.onMouseDown)}))}));ToolbarButton.displayName="ToolbarButton";const d="a";export const ToolbarLink=c(((o,r)=>{const{as:t=d,...n}=o;return p(ToolbarButton,s({},n,{as:t,ref:r,onKeyDown:T(n.onKeyDown,(o=>{" "===o.key&&o.currentTarget.click()}))}))}));ToolbarLink.displayName="ToolbarLink";export const ToolbarToggleGroup=c(((o,t)=>{const n=m("ToolbarToggleGroup");return p(r,s({"data-orientation":n.orientation},o,{ref:t,rovingFocus:!1}))}));ToolbarToggleGroup.displayName="ToolbarToggleGroup";export const ToolbarToggleItem=c(((o,r)=>p(ToolbarButton,{as:e},p(t,s({},o,{ref:r})))));ToolbarToggleItem.displayName="ToolbarToggleItem";export const Root=Toolbar;export const Separator=ToolbarSeparator;export const Button=ToolbarButton;export const Link=ToolbarLink;export const ToggleGroup=ToolbarToggleGroup;export const ToggleItem=ToolbarToggleItem;o(b,"ToggleItem",(function(){return ToggleItem})),o(b,"ToggleGroup",(function(){return ToggleGroup})),o(b,"Link",(function(){return Link})),o(b,"Button",(function(){return Button})),o(b,"Separator",(function(){return Separator})),o(b,"Root",(function(){return Root})),o(b,"ToolbarToggleItem",(function(){return ToolbarToggleItem})),o(b,"ToolbarToggleGroup",(function(){return ToolbarToggleGroup})),o(b,"ToolbarLink",(function(){return ToolbarLink})),o(b,"ToolbarButton",(function(){return ToolbarButton})),o(b,"ToolbarSeparator",(function(){return ToolbarSeparator})),o(b,"Toolbar",(function(){return Toolbar})); | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-toolbar", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"license": "MIT", | ||
@@ -23,6 +23,6 @@ "source": "src/index.ts", | ||
"@radix-ui/react-primitive": "0.0.6", | ||
"@radix-ui/react-radio-group": "0.0.8", | ||
"@radix-ui/react-roving-focus": "0.0.6", | ||
"@radix-ui/react-separator": "0.0.6", | ||
"@radix-ui/react-slot": "0.0.4" | ||
"@radix-ui/react-slot": "0.0.4", | ||
"@radix-ui/react-toggle-group": "0.0.1" | ||
}, | ||
@@ -29,0 +29,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34434
79
+ Added@radix-ui/react-toggle@0.0.1(transitive)
+ Added@radix-ui/react-toggle-group@0.0.1(transitive)
- Removed@radix-ui/react-radio-group@0.0.8
- Removed@radix-ui/react-label@0.0.6(transitive)
- Removed@radix-ui/react-presence@0.0.7(transitive)
- Removed@radix-ui/react-radio-group@0.0.8(transitive)