-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponents-tabs-tabs-web-stories.61a3fba8.iframe.bundle.js
2 lines (2 loc) · 14.8 KB
/
components-tabs-tabs-web-stories.61a3fba8.iframe.bundle.js
1
2
/*! For license information please see components-tabs-tabs-web-stories.61a3fba8.iframe.bundle.js.LICENSE.txt */
"use strict";(self.webpackChunk_leather_io_ui=self.webpackChunk_leather_io_ui||[]).push([[7664],{"../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.2.79_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache;__webpack_require__.d(__webpack_exports__,{B:()=>$1746a345f3d73bb7$export$f680877a34711e37});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.0.1_@types+react@18.2.79_react@18.2.0/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs");const $1746a345f3d73bb7$var$useReactId=(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache||(react__WEBPACK_IMPORTED_MODULE_0___namespace_cache=__webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__,2)))["useId".toString()]||(()=>{});let $1746a345f3d73bb7$var$count=0;function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId){const[id,setId]=react__WEBPACK_IMPORTED_MODULE_0__.useState($1746a345f3d73bb7$var$useReactId());return(0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.N)((()=>{deterministicId||setId((reactId=>null!=reactId?reactId:String($1746a345f3d73bb7$var$count++)))}),[deterministicId]),deterministicId||(id?`radix-${id}`:"")}},"../../node_modules/.pnpm/@radix-ui+react-tabs@1.0.4_@types+react-dom@18.2.25_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-tabs/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{B8:()=>$69cb30bb0017df05$export$54c2e3dc7acea9f5,UC:()=>$69cb30bb0017df05$export$7c6e2c02157bb7d2,bL:()=>$69cb30bb0017df05$export$be92b6f5f03c0fe9,l9:()=>$69cb30bb0017df05$export$41fb9f06171c75f4});var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.26.0/node_modules/@babel/runtime/helpers/esm/extends.js"),react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+primitive@1.0.1/node_modules/@radix-ui/primitive/dist/index.mjs"),_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-context@1.0.1_@types+react@18.2.79_react@18.2.0/node_modules/@radix-ui/react-context/dist/index.mjs"),_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-roving-focus@1.0.4_@types+react-dom@18.2.25_@types+react@18.2.79_react-dom@18_gwziov6bewyhzrap5bbufmv4f4/node_modules/@radix-ui/react-roving-focus/dist/index.mjs"),_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-presence@1.0.1_@types+react-dom@18.2.25_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-presence/dist/index.mjs"),_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-primitive@1.0.3_@types+react-dom@18.2.25_@types+react@18.2.79_react-dom@18.2._q2hdzynczbqlprxkwgklkdriia/node_modules/@radix-ui/react-primitive/dist/index.mjs"),_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-direction@1.0.1_@types+react@18.2.79_react@18.2.0/node_modules/@radix-ui/react-direction/dist/index.mjs"),_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.0.1_@types+react@18.2.79_react@18.2.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"),_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-id@1.0.1_@types+react@18.2.79_react@18.2.0/node_modules/@radix-ui/react-id/dist/index.mjs");const[$69cb30bb0017df05$var$createTabsContext,$69cb30bb0017df05$export$355f5bd209d7b13a]=(0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__.A)("Tabs",[_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_2__.RG]),$69cb30bb0017df05$var$useRovingFocusGroupScope=(0,_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_2__.RG)(),[$69cb30bb0017df05$var$TabsProvider,$69cb30bb0017df05$var$useTabsContext]=$69cb30bb0017df05$var$createTabsContext("Tabs"),$69cb30bb0017df05$export$b2539bed5023c21c=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeTabs,value:valueProp,onValueChange,defaultValue,orientation="horizontal",dir,activationMode="automatic",...tabsProps}=props,direction=(0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_3__.jH)(dir),[value,setValue]=(0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.i)({prop:valueProp,onChange:onValueChange,defaultProp:defaultValue});return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($69cb30bb0017df05$var$TabsProvider,{scope:__scopeTabs,baseId:(0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.B)(),value,onValueChange:setValue,orientation,dir:direction,activationMode},(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.sG.div,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__.A)({dir:direction,"data-orientation":orientation},tabsProps,{ref:forwardedRef})))})),$69cb30bb0017df05$export$9712d22edc0d78c1=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeTabs,loop=!0,...listProps}=props,context=$69cb30bb0017df05$var$useTabsContext("TabsList",__scopeTabs),rovingFocusGroupScope=$69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs);return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_2__.bL,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__.A)({asChild:!0},rovingFocusGroupScope,{orientation:context.orientation,dir:context.dir,loop}),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.sG.div,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__.A)({role:"tablist","aria-orientation":context.orientation},listProps,{ref:forwardedRef})))})),$69cb30bb0017df05$export$8114b9fdfdf9f3ba=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeTabs,value,disabled=!1,...triggerProps}=props,context=$69cb30bb0017df05$var$useTabsContext("TabsTrigger",__scopeTabs),rovingFocusGroupScope=$69cb30bb0017df05$var$useRovingFocusGroupScope(__scopeTabs),triggerId=$69cb30bb0017df05$var$makeTriggerId(context.baseId,value),contentId=$69cb30bb0017df05$var$makeContentId(context.baseId,value),isSelected=value===context.value;return(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_2__.q7,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__.A)({asChild:!0},rovingFocusGroupScope,{focusable:!disabled,active:isSelected}),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.sG.button,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__.A)({type:"button",role:"tab","aria-selected":isSelected,"aria-controls":contentId,"data-state":isSelected?"active":"inactive","data-disabled":disabled?"":void 0,disabled,id:triggerId},triggerProps,{ref:forwardedRef,onMouseDown:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.m)(props.onMouseDown,(event=>{disabled||0!==event.button||!1!==event.ctrlKey?event.preventDefault():context.onValueChange(value)})),onKeyDown:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.m)(props.onKeyDown,(event=>{[" ","Enter"].includes(event.key)&&context.onValueChange(value)})),onFocus:(0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.m)(props.onFocus,(()=>{const isAutomaticActivation="manual"!==context.activationMode;isSelected||disabled||!isAutomaticActivation||context.onValueChange(value)}))})))})),$69cb30bb0017df05$export$bd905d70e8fd2ebb=(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(((props,forwardedRef)=>{const{__scopeTabs,value,forceMount,children,...contentProps}=props,context=$69cb30bb0017df05$var$useTabsContext("TabsContent",__scopeTabs),triggerId=$69cb30bb0017df05$var$makeTriggerId(context.baseId,value),contentId=$69cb30bb0017df05$var$makeContentId(context.baseId,value),isSelected=value===context.value,isMountAnimationPreventedRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(isSelected);return(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{const rAF=requestAnimationFrame((()=>isMountAnimationPreventedRef.current=!1));return()=>cancelAnimationFrame(rAF)}),[]),(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.C,{present:forceMount||isSelected},(({present})=>(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.sG.div,(0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_7__.A)({"data-state":isSelected?"active":"inactive","data-orientation":context.orientation,role:"tabpanel","aria-labelledby":triggerId,hidden:!present,id:contentId,tabIndex:0},contentProps,{ref:forwardedRef,style:{...props.style,animationDuration:isMountAnimationPreventedRef.current?"0s":void 0}}),present&&children)))}));function $69cb30bb0017df05$var$makeTriggerId(baseId,value){return`${baseId}-trigger-${value}`}function $69cb30bb0017df05$var$makeContentId(baseId,value){return`${baseId}-content-${value}`}const $69cb30bb0017df05$export$be92b6f5f03c0fe9=$69cb30bb0017df05$export$b2539bed5023c21c,$69cb30bb0017df05$export$54c2e3dc7acea9f5=$69cb30bb0017df05$export$9712d22edc0d78c1,$69cb30bb0017df05$export$41fb9f06171c75f4=$69cb30bb0017df05$export$8114b9fdfdf9f3ba,$69cb30bb0017df05$export$7c6e2c02157bb7d2=$69cb30bb0017df05$export$bd905d70e8fd2ebb},"./src/components/tabs/tabs.web.stories.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Tabs:()=>Tabs,__namedExportsOrder:()=>__namedExportsOrder,default:()=>__WEBPACK_DEFAULT_EXPORT__});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"),_tabs_web__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/components/tabs/tabs.web.tsx");const __WEBPACK_DEFAULT_EXPORT__={component:_tabs_web__WEBPACK_IMPORTED_MODULE_1__.t.Root,tags:["autodocs"],title:"Tabs"},Tabs={render:()=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabs_web__WEBPACK_IMPORTED_MODULE_1__.t.Root,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_tabs_web__WEBPACK_IMPORTED_MODULE_1__.t.List,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabs_web__WEBPACK_IMPORTED_MODULE_1__.t.Trigger,{value:"0",children:"Asset"}),(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_tabs_web__WEBPACK_IMPORTED_MODULE_1__.t.Trigger,{value:"1",children:"Activity"})]})})},__namedExportsOrder=["Tabs"]},"../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{var f=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;for(b in void 0!==g&&(e=""+g),void 0!==a.key&&(e=""+a.key),void 0!==a.ref&&(h=a.ref),a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l,exports.jsx=q,exports.jsxs=q},"../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{module.exports=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react-jsx-runtime.production.min.js")},"./src/components/tabs/tabs.web.tsx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{t:()=>Tabs});var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js"),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"),_radix_ui_react_tabs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("../../node_modules/.pnpm/@radix-ui+react-tabs@1.0.4_@types+react-dom@18.2.25_@types+react@18.2.79_react-dom@18.2.0_react@18.2.0__react@18.2.0/node_modules/@radix-ui/react-tabs/dist/index.mjs"),leather_styles_css__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./leather-styles/css/index.js");const tabRootStyles=(0,leather_styles_css__WEBPACK_IMPORTED_MODULE_2__.AH)({display:"flex",flexDirection:"column"}),Root=(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(((props,ref)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_radix_ui_react_tabs__WEBPACK_IMPORTED_MODULE_3__.bL,{className:tabRootStyles,ref,...props})));Root.displayName="Tabs.Root";const tabsTriggerStyles=(0,leather_styles_css__WEBPACK_IMPORTED_MODULE_2__.AH)({position:"relative",textStyle:"label.01",flex:1,display:"flex",alignItems:"center",justifyContent:"center",py:"space.04",userSelect:"none",color:"ink.text-subdued",_hover:{background:"ink.component-background-hover"},'&[data-state="active"]':{color:"ink.text-primary",_before:{content:'""',position:"absolute",bottom:0,height:"2px",width:"100%",bg:"ink.text-subdued",zIndex:10}},_focusVisible:{outline:0,_before:{bg:"lightModeBlue.500"}}}),Trigger=(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(((props,ref)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_radix_ui_react_tabs__WEBPACK_IMPORTED_MODULE_3__.l9,{className:tabsTriggerStyles,ref,...props})));Trigger.displayName="Tabs.Trigger";const tabsListStyles=(0,leather_styles_css__WEBPACK_IMPORTED_MODULE_2__.AH)({flexShrink:0,display:"flex",position:"relative",_before:{content:'""',position:"absolute",bottom:0,height:"2px",width:"100%",bg:"ink.border-default",zIndex:9}}),List=(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(((props,ref)=>(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_radix_ui_react_tabs__WEBPACK_IMPORTED_MODULE_3__.B8,{className:tabsListStyles,ref,...props})));List.displayName="Tabs.List";const Tabs={Root,List,Trigger,Content:_radix_ui_react_tabs__WEBPACK_IMPORTED_MODULE_3__.UC}}}]);