@radix-ui/react-tabs
Advanced tools
Comparing version 0.1.2-rc.6 to 0.1.2-rc.7
@@ -37,7 +37,7 @@ import * as React from "react"; | ||
export const TabsList: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>; | ||
export interface TabsTriggerProps extends PrimitiveDivProps { | ||
type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>; | ||
export interface TabsTriggerProps extends PrimitiveButtonProps { | ||
value: string; | ||
disabled?: boolean; | ||
} | ||
export const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLDivElement>>; | ||
export const TabsTrigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>; | ||
export interface TabsContentProps extends PrimitiveDivProps { | ||
@@ -49,5 +49,5 @@ value: string; | ||
export const List: React.ForwardRefExoticComponent<TabsListProps & React.RefAttributes<HTMLDivElement>>; | ||
export const Trigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLDivElement>>; | ||
export const Trigger: React.ForwardRefExoticComponent<TabsTriggerProps & React.RefAttributes<HTMLButtonElement>>; | ||
export const Content: React.ForwardRefExoticComponent<TabsContentProps & React.RefAttributes<HTMLDivElement>>; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,2 @@ | ||
var e,t=require("@radix-ui/react-id").useId,a=require("@radix-ui/react-roving-focus"),r=b({},a),o=a.createRovingFocusGroupScope,i=require("@radix-ui/react-primitive").Primitive,n=require("@radix-ui/react-use-controllable-state").useControllableState,s=require("@radix-ui/react-use-callback-ref").useCallbackRef,c=require("@radix-ui/react-context").createContextScope,d=require("@radix-ui/primitive").composeEventHandlers,u=b({},require("react")),l=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function b(e,t){return Object.keys(t).forEach((function(a){"default"!==a&&"__esModule"!==a&&Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[a]}})})),e}const[p,f]=c("Tabs",[o]);exports.createTabsScope=f;const v=o(),[x,T]=p("Tabs"),m=/*#__PURE__*/u.forwardRef(((e,a)=>{const{__scopeTabs:r,value:o,onValueChange:s,defaultValue:c,orientation:d="horizontal",dir:b="ltr",activationMode:p="automatic",...f}=e,[v,T]=n({prop:o,onChange:s,defaultProp:c});/*#__PURE__*/return u.createElement(x,{scope:r,baseId:t(),value:v,onValueChange:T,orientation:d,dir:b,activationMode:p},/*#__PURE__*/u.createElement(i.div,l({"data-orientation":d},f,{ref:a})))}));exports.Tabs=m;const g=/*#__PURE__*/u.forwardRef(((e,t)=>{const{__scopeTabs:a,loop:o=!0,...n}=e,s=T("TabsList",a),c=v(a);/*#__PURE__*/return u.createElement(r.Root,l({asChild:!0},c,{orientation:s.orientation,dir:s.dir,loop:o}),/*#__PURE__*/u.createElement(i.div,l({role:"tablist","aria-orientation":s.orientation,dir:s.dir},n,{ref:t})))}));exports.TabsList=g;const C=/*#__PURE__*/u.forwardRef(((e,t)=>{const{__scopeTabs:a,value:o,disabled:n=!1,...c}=e,b=T("TabsTrigger",a),p=v(a),f=h(b.baseId,o),x=E(b.baseId,o),m=o===b.value,g=s((()=>b.onValueChange(o)));/*#__PURE__*/return u.createElement(r.Item,l({asChild:!0},p,{focusable:!n,active:m}),/*#__PURE__*/u.createElement(i.div,l({role:"tab","aria-selected":m,"aria-controls":x,"aria-disabled":n||void 0,"data-state":m?"active":"inactive","data-disabled":n?"":void 0,id:f},c,{ref:t,onKeyDown:d(e.onKeyDown,(e=>{n||" "!==e.key&&"Enter"!==e.key||g()})),onMouseDown:d(e.onMouseDown,(e=>{n||0!==e.button||!1!==e.ctrlKey||g()})),onFocus:d(e.onFocus,(()=>{const e="manual"!==b.activationMode;m||n||!e||g()}))})))}));exports.TabsTrigger=C;const _=/*#__PURE__*/u.forwardRef(((e,t)=>{const{__scopeTabs:a,value:r,children:o,...n}=e,s=T("TabsContent",a),c=h(s.baseId,r),d=E(s.baseId,r),b=r===s.value;/*#__PURE__*/return u.createElement(i.div,l({"data-state":b?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!b,id:d,tabIndex:0},n,{ref:t}),b&&o)}));function h(e,t){return`${e}-trigger-${t}`}function E(e,t){return`${e}-content-${t}`}exports.TabsContent=_;const q=m;exports.Root=q;const w=g;exports.List=w;const y=C;exports.Trigger=y;const I=_;exports.Content=I; | ||
var e,t=require("@radix-ui/react-id").useId,a=require("@radix-ui/react-roving-focus"),r=b({},a),o=a.createRovingFocusGroupScope,i=require("@radix-ui/react-primitive").Primitive,n=require("@radix-ui/react-use-controllable-state").useControllableState,s=require("@radix-ui/react-use-callback-ref").useCallbackRef,c=require("@radix-ui/react-context").createContextScope,u=require("@radix-ui/primitive").composeEventHandlers,l=b({},require("react")),d=(e=require("@babel/runtime/helpers/extends"))&&e.__esModule?e.default:e;function b(e,t){return Object.keys(t).forEach((function(a){"default"!==a&&"__esModule"!==a&&Object.defineProperty(e,a,{enumerable:!0,get:function(){return t[a]}})})),e}const[p,f]=c("Tabs",[o]);exports.createTabsScope=f;const v=o(),[x,T]=p("Tabs"),m=/*#__PURE__*/l.forwardRef(((e,a)=>{const{__scopeTabs:r,value:o,onValueChange:s,defaultValue:c,orientation:u="horizontal",dir:b="ltr",activationMode:p="automatic",...f}=e,[v,T]=n({prop:o,onChange:s,defaultProp:c});/*#__PURE__*/return l.createElement(x,{scope:r,baseId:t(),value:v,onValueChange:T,orientation:u,dir:b,activationMode:p},/*#__PURE__*/l.createElement(i.div,d({"data-orientation":u},f,{ref:a})))}));exports.Tabs=m;const g=/*#__PURE__*/l.forwardRef(((e,t)=>{const{__scopeTabs:a,loop:o=!0,...n}=e,s=T("TabsList",a),c=v(a);/*#__PURE__*/return l.createElement(r.Root,d({asChild:!0},c,{orientation:s.orientation,dir:s.dir,loop:o}),/*#__PURE__*/l.createElement(i.div,d({role:"tablist","aria-orientation":s.orientation,dir:s.dir},n,{ref:t})))}));exports.TabsList=g;const C=/*#__PURE__*/l.forwardRef(((e,t)=>{const{__scopeTabs:a,value:o,disabled:n=!1,...c}=e,b=T("TabsTrigger",a),p=v(a),f=h(b.baseId,o),x=q(b.baseId,o),m=o===b.value,g=s((()=>b.onValueChange(o)));/*#__PURE__*/return l.createElement(r.Item,d({asChild:!0},p,{focusable:!n,active:m}),/*#__PURE__*/l.createElement(i.button,d({type:"button",role:"tab","aria-selected":m,"aria-controls":x,"data-state":m?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:f},c,{ref:t,onClick:u(e.onClick,g),onMouseDown:u(e.onMouseDown,(e=>{n||0!==e.button||!1!==e.ctrlKey||g()})),onFocus:u(e.onFocus,(()=>{const e="manual"!==b.activationMode;m||n||!e||g()}))})))}));exports.TabsTrigger=C;const _=/*#__PURE__*/l.forwardRef(((e,t)=>{const{__scopeTabs:a,value:r,children:o,...n}=e,s=T("TabsContent",a),c=h(s.baseId,r),u=q(s.baseId,r),b=r===s.value;/*#__PURE__*/return l.createElement(i.div,d({"data-state":b?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!b,id:u,tabIndex:0},n,{ref:t}),b&&o)}));function h(e,t){return`${e}-trigger-${t}`}function q(e,t){return`${e}-content-${t}`}exports.TabsContent=_;const E=m;exports.Root=E;const I=g;exports.List=I;const R=C;exports.Trigger=R;const M=_;exports.Content=M; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{useId as e}from"@radix-ui/react-id";import*as t from"@radix-ui/react-roving-focus";import{createRovingFocusGroupScope as a}from"@radix-ui/react-roving-focus";import{Primitive as o}from"@radix-ui/react-primitive";import{useControllableState as r}from"@radix-ui/react-use-controllable-state";import{useCallbackRef as i}from"@radix-ui/react-use-callback-ref";import{createContextScope as n}from"@radix-ui/react-context";import{composeEventHandlers as s}from"@radix-ui/primitive";import*as c from"react";import d from"@babel/runtime/helpers/esm/extends";const[l,u]=n("Tabs",[a]);export{u as createTabsScope};const b=a(),[m,p]=l("Tabs");export const Tabs=/*#__PURE__*/c.forwardRef(((t,a)=>{const{__scopeTabs:i,value:n,onValueChange:s,defaultValue:l,orientation:u="horizontal",dir:b="ltr",activationMode:p="automatic",...f}=t,[v,T]=r({prop:n,onChange:s,defaultProp:l});/*#__PURE__*/return c.createElement(m,{scope:i,baseId:e(),value:v,onValueChange:T,orientation:u,dir:b,activationMode:p},/*#__PURE__*/c.createElement(o.div,d({"data-orientation":u},f,{ref:a})))}));/*#__PURE__*/export const TabsList=/*#__PURE__*/c.forwardRef(((e,a)=>{const{__scopeTabs:r,loop:i=!0,...n}=e,s=p("TabsList",r),l=b(r);/*#__PURE__*/return c.createElement(t.Root,d({asChild:!0},l,{orientation:s.orientation,dir:s.dir,loop:i}),/*#__PURE__*/c.createElement(o.div,d({role:"tablist","aria-orientation":s.orientation,dir:s.dir},n,{ref:a})))}));/*#__PURE__*/export const TabsTrigger=/*#__PURE__*/c.forwardRef(((e,a)=>{const{__scopeTabs:r,value:n,disabled:l=!1,...u}=e,m=p("TabsTrigger",r),T=b(r),x=f(m.baseId,n),g=v(m.baseId,n),h=n===m.value,C=i((()=>m.onValueChange(n)));/*#__PURE__*/return c.createElement(t.Item,d({asChild:!0},T,{focusable:!l,active:h}),/*#__PURE__*/c.createElement(o.div,d({role:"tab","aria-selected":h,"aria-controls":g,"aria-disabled":l||void 0,"data-state":h?"active":"inactive","data-disabled":l?"":void 0,id:x},u,{ref:a,onKeyDown:s(e.onKeyDown,(e=>{l||" "!==e.key&&"Enter"!==e.key||C()})),onMouseDown:s(e.onMouseDown,(e=>{l||0!==e.button||!1!==e.ctrlKey||C()})),onFocus:s(e.onFocus,(()=>{const e="manual"!==m.activationMode;h||l||!e||C()}))})))}));/*#__PURE__*/export const TabsContent=/*#__PURE__*/c.forwardRef(((e,t)=>{const{__scopeTabs:a,value:r,children:i,...n}=e,s=p("TabsContent",a),l=f(s.baseId,r),u=v(s.baseId,r),b=r===s.value;/*#__PURE__*/return c.createElement(o.div,d({"data-state":b?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:u,tabIndex:0},n,{ref:t}),b&&i)}));/*#__PURE__*/function f(e,t){return`${e}-trigger-${t}`}function v(e,t){return`${e}-content-${t}`}export const Root=Tabs;export const List=TabsList;export const Trigger=TabsTrigger;export const Content=TabsContent; | ||
import{useId as e}from"@radix-ui/react-id";import*as t from"@radix-ui/react-roving-focus";import{createRovingFocusGroupScope as o}from"@radix-ui/react-roving-focus";import{Primitive as a}from"@radix-ui/react-primitive";import{useControllableState as r}from"@radix-ui/react-use-controllable-state";import{useCallbackRef as i}from"@radix-ui/react-use-callback-ref";import{createContextScope as n}from"@radix-ui/react-context";import{composeEventHandlers as s}from"@radix-ui/primitive";import*as c from"react";import d from"@babel/runtime/helpers/esm/extends";const[l,u]=n("Tabs",[o]);export{u as createTabsScope};const b=o(),[m,p]=l("Tabs");export const Tabs=/*#__PURE__*/c.forwardRef(((t,o)=>{const{__scopeTabs:i,value:n,onValueChange:s,defaultValue:l,orientation:u="horizontal",dir:b="ltr",activationMode:p="automatic",...f}=t,[v,T]=r({prop:n,onChange:s,defaultProp:l});/*#__PURE__*/return c.createElement(m,{scope:i,baseId:e(),value:v,onValueChange:T,orientation:u,dir:b,activationMode:p},/*#__PURE__*/c.createElement(a.div,d({"data-orientation":u},f,{ref:o})))}));/*#__PURE__*/export const TabsList=/*#__PURE__*/c.forwardRef(((e,o)=>{const{__scopeTabs:r,loop:i=!0,...n}=e,s=p("TabsList",r),l=b(r);/*#__PURE__*/return c.createElement(t.Root,d({asChild:!0},l,{orientation:s.orientation,dir:s.dir,loop:i}),/*#__PURE__*/c.createElement(a.div,d({role:"tablist","aria-orientation":s.orientation,dir:s.dir},n,{ref:o})))}));/*#__PURE__*/export const TabsTrigger=/*#__PURE__*/c.forwardRef(((e,o)=>{const{__scopeTabs:r,value:n,disabled:l=!1,...u}=e,m=p("TabsTrigger",r),T=b(r),x=f(m.baseId,n),g=v(m.baseId,n),C=n===m.value,h=i((()=>m.onValueChange(n)));/*#__PURE__*/return c.createElement(t.Item,d({asChild:!0},T,{focusable:!l,active:C}),/*#__PURE__*/c.createElement(a.button,d({type:"button",role:"tab","aria-selected":C,"aria-controls":g,"data-state":C?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:x},u,{ref:o,onClick:s(e.onClick,h),onMouseDown:s(e.onMouseDown,(e=>{l||0!==e.button||!1!==e.ctrlKey||h()})),onFocus:s(e.onFocus,(()=>{const e="manual"!==m.activationMode;C||l||!e||h()}))})))}));/*#__PURE__*/export const TabsContent=/*#__PURE__*/c.forwardRef(((e,t)=>{const{__scopeTabs:o,value:r,children:i,...n}=e,s=p("TabsContent",o),l=f(s.baseId,r),u=v(s.baseId,r),b=r===s.value;/*#__PURE__*/return c.createElement(a.div,d({"data-state":b?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:u,tabIndex:0},n,{ref:t}),b&&i)}));/*#__PURE__*/function f(e,t){return`${e}-trigger-${t}`}function v(e,t){return`${e}-content-${t}`}export const Root=Tabs;export const List=TabsList;export const Trigger=TabsTrigger;export const Content=TabsContent; | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/react-tabs", | ||
"version": "0.1.2-rc.6", | ||
"version": "0.1.2-rc.7", | ||
"license": "MIT", | ||
@@ -24,3 +24,3 @@ "source": "src/index.ts", | ||
"@radix-ui/react-primitive": "0.1.1", | ||
"@radix-ui/react-roving-focus": "0.1.2-rc.6", | ||
"@radix-ui/react-roving-focus": "0.1.2-rc.7", | ||
"@radix-ui/react-use-callback-ref": "0.1.0", | ||
@@ -27,0 +27,0 @@ "@radix-ui/react-use-controllable-state": "0.1.0" |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
37736
+ Added@radix-ui/react-roving-focus@0.1.2-rc.7(transitive)
- Removed@radix-ui/react-roving-focus@0.1.2-rc.6(transitive)