Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@plasmicpkgs/plasmic-tabs

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasmicpkgs/plasmic-tabs - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

140

dist/plasmic-tabs.cjs.development.js

@@ -31,7 +31,7 @@ 'use strict';

return {
type: "default-component",
kind: "button",
type: 'default-component',
kind: 'button',
props: {
children: {
type: "text",
type: 'text',
value: label

@@ -63,73 +63,73 @@ }

var result = useTabsContextUnsafe();
return "setTabKey" in result ? result : undefined;
return 'setTabKey' in result ? result : undefined;
}
var modulePath = "@plasmicpkgs/plasmic-tabs";
var modulePath = '@plasmicpkgs/plasmic-tabs';
var TabsContainerMeta = {
name: "hostless-tabs-container",
displayName: "Tabs Container",
importName: "TabsContainer",
name: 'hostless-tabs-container',
displayName: 'Tabs Container',
importName: 'TabsContainer',
importPath: modulePath,
providesData: true,
defaultStyles: {
width: "stretch",
padding: "8px"
width: 'stretch',
padding: '8px'
},
props: {
initialKey: {
type: "string",
description: "Key of the initially selected tab",
defaultValue: "tab1"
type: 'string',
description: 'Key of the initially selected tab',
defaultValue: 'tab1'
},
previewKey: {
type: "string",
description: "SShow this key while editing in Plasmic Studio"
type: 'string',
description: 'SShow this key while editing in Plasmic Studio'
},
previewAll: {
type: "boolean",
description: "Reveal all tab contents while editing in Plasmic Studio"
type: 'boolean',
description: 'Reveal all tab contents while editing in Plasmic Studio'
},
children: {
type: "slot",
type: 'slot',
defaultValue: {
type: "vbox",
type: 'vbox',
children: [{
type: "hbox",
type: 'hbox',
children: [{
type: "component",
name: "hostless-tab-button",
type: 'component',
name: 'hostless-tab-button',
props: {
tabKey: "tab1",
children: /*#__PURE__*/defaultButtonChildren("Tab 1")
tabKey: 'tab1',
children: /*#__PURE__*/defaultButtonChildren('Tab 1')
}
}, {
type: "component",
name: "hostless-tab-button",
type: 'component',
name: 'hostless-tab-button',
props: {
tabKey: "tab2",
children: /*#__PURE__*/defaultButtonChildren("Tab 2")
tabKey: 'tab2',
children: /*#__PURE__*/defaultButtonChildren('Tab 2')
}
}, {
type: "component",
name: "hostless-tab-underline"
type: 'component',
name: 'hostless-tab-underline'
}]
}, {
type: "vbox",
type: 'vbox',
children: [{
type: "component",
name: "hostless-tab-content",
type: 'component',
name: 'hostless-tab-content',
props: {
tabKey: "tab1",
tabKey: 'tab1',
children: [{
type: "vbox",
children: ["Some content for tab 1"]
type: 'vbox',
children: ['Some content for tab 1']
}]
}
}, {
type: "component",
name: "hostless-tab-content",
type: 'component',
name: 'hostless-tab-content',
props: {
tabKey: "tab2",
tabKey: 'tab2',
children: [{
type: "vbox",
children: ["Some content for tab 2"]
type: 'vbox',
children: ['Some content for tab 2']
}]

@@ -160,3 +160,3 @@ }

if (!x) {
throw new Error("unexpected nil");
throw new Error('unexpected nil');
}

@@ -173,3 +173,3 @@ return x;

return React__default.createElement(host.DataProvider, {
name: "currentTabKey",
name: 'currentTabKey',
data: effectiveKey

@@ -179,14 +179,10 @@ }, children);

var TabUnderlineMeta = {
name: "hostless-tab-underline",
displayName: "Tab Underline",
importName: "TabUnderline",
name: 'hostless-tab-underline',
displayName: 'Tab Underline',
importName: 'TabUnderline',
importPath: modulePath,
props: {
children: {
type: "slot"
}
},
props: {},
defaultStyles: {
background: "#7777ff",
height: "2px"
background: '#7777ff',
height: '2px'
}

@@ -206,4 +202,4 @@ };

bottom: 0,
position: "absolute",
transition: ".4s ease all"
position: 'absolute',
transition: '.4s ease all'
})

@@ -213,19 +209,19 @@ }) : null;

var TabButtonMeta = {
name: "hostless-tab-button",
name: 'hostless-tab-button',
isAttachment: true,
displayName: "Tab Button",
importName: "TabButton",
displayName: 'Tab Button',
importName: 'TabButton',
importPath: modulePath,
props: {
tabKey: {
type: "string",
description: "The answer value selecting this choice sets"
type: 'string',
description: 'The answer value selecting this choice sets'
},
children: {
type: "slot",
defaultValue: /*#__PURE__*/defaultButtonChildren("Some tab")
type: 'slot',
defaultValue: /*#__PURE__*/defaultButtonChildren('Some tab')
}
},
defaultStyles: {
width: "hug"
width: 'hug'
}

@@ -268,19 +264,19 @@ };

var TabContentMeta = {
name: "hostless-tab-content",
name: 'hostless-tab-content',
isAttachment: true,
displayName: "Tab Content",
importName: "TabContent",
displayName: 'Tab Content',
importName: 'TabContent',
importPath: modulePath,
props: {
tabKey: {
type: "string",
description: "The answer value selecting this choice sets"
type: 'string',
description: 'The answer value selecting this choice sets'
},
children: {
type: "slot",
type: 'slot',
defaultValue: {
type: "vbox",
type: 'vbox',
children: {
type: "text",
value: "This is some tab content"
type: 'text',
value: 'This is some tab content'
}

@@ -287,0 +283,0 @@ }

@@ -1,2 +0,2 @@

"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerComponent")),n=require("@plasmicapp/host"),a=e(require("constate")),r=require("react"),i=e(r);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var s=function(){};function l(e){return{type:"default-component",kind:"button",props:{children:{type:"text",value:e}}}}var p=r.createContext(!1);function c(e){var t=r.useState(e.initialKey),n=t[0],a=t[1],i=r.useState(void 0);return{tabKey:n,bbox:i[0],setTabKey:a,setBbox:i[1]}}var b=a(c),u=b[0],d=b[1];function y(){var e=d();return"setTabKey"in e?e:void 0}var h="@plasmicpkgs/plasmic-tabs",m={name:"hostless-tabs-container",displayName:"Tabs Container",importName:"TabsContainer",importPath:h,providesData:!0,defaultStyles:{width:"stretch",padding:"8px"},props:{initialKey:{type:"string",description:"Key of the initially selected tab",defaultValue:"tab1"},previewKey:{type:"string",description:"SShow this key while editing in Plasmic Studio"},previewAll:{type:"boolean",description:"Reveal all tab contents while editing in Plasmic Studio"},children:{type:"slot",defaultValue:{type:"vbox",children:[{type:"hbox",children:[{type:"component",name:"hostless-tab-button",props:{tabKey:"tab1",children:l("Tab 1")}},{type:"component",name:"hostless-tab-button",props:{tabKey:"tab2",children:l("Tab 2")}},{type:"component",name:"hostless-tab-underline"}]},{type:"vbox",children:[{type:"component",name:"hostless-tab-content",props:{tabKey:"tab1",children:[{type:"vbox",children:["Some content for tab 1"]}]}},{type:"component",name:"hostless-tab-content",props:{tabKey:"tab2",children:[{type:"vbox",children:["Some content for tab 2"]}]}}]}]}}}};function v(e){var t=e.children,a=e.initialKey,r=e.previewKey,o=e.previewAll,s=void 0!==o&&o,l=!!n.usePlasmicCanvasContext();return i.createElement(u,{initialKey:a},i.createElement(p.Provider,{value:l&&s},i.createElement(f,{previewKey:r||a},t)))}function f(e){var t=e.children,a=e.previewKey,r=n.usePlasmicCanvasContext(),o=function(e){if(!e)throw new Error("unexpected nil");return e}(y()).tabKey;return i.createElement(n.DataProvider,{name:"currentTabKey",data:r&&a||o},t)}var x={name:"hostless-tab-underline",displayName:"Tab Underline",importName:"TabUnderline",importPath:h,props:{children:{type:"slot"}},defaultStyles:{background:"#7777ff",height:"2px"}};function K(e){var t,n=e.className,a=(null!=(t=y())?t:{bbox:void 0}).bbox;return a?i.createElement("div",{className:n,style:o({},JSON.parse(JSON.stringify(a)),{top:void 0,bottom:0,position:"absolute",transition:".4s ease all"})}):null}var T={name:"hostless-tab-button",isAttachment:!0,displayName:"Tab Button",importName:"TabButton",importPath:h,props:{tabKey:{type:"string",description:"The answer value selecting this choice sets"},children:{type:"slot",defaultValue:l("Some tab")}},defaultStyles:{width:"hug"}};function g(e){var t=e.className,n=e.children,a=e.tabKey,o=y(),l=r.useRef(null),p=null!=o?o:{tabKey:void 0,setTabKey:s,bbox:void 0,setBbox:s},c=p.tabKey,b=p.setTabKey,u=p.setBbox;return r.useEffect((function(){a===c&&u({width:l.current.offsetWidth,left:l.current.offsetLeft})}),[l.current,u,JSON.stringify(p.bbox),a,c]),i.createElement("div",{className:t,ref:l},r.cloneElement(i.Children.toArray(n)[0],{isActive:a&&c&&c===a,onClick:function(){b(a)}}))}var C={name:"hostless-tab-content",isAttachment:!0,displayName:"Tab Content",importName:"TabContent",importPath:h,props:{tabKey:{type:"string",description:"The answer value selecting this choice sets"},children:{type:"slot",defaultValue:{type:"vbox",children:{type:"text",value:"This is some tab content"}}}}};function w(e){var t=e.children,n=e.tabKey,a=y(),o=r.useContext(p);return i.createElement(i.Fragment,null,void 0===a||(null!=a?a:{tabKey:void 0}).tabKey===n||o?t:null)}exports.TabButton=g,exports.TabButtonMeta=T,exports.TabContent=w,exports.TabContentMeta=C,exports.TabUnderline=K,exports.TabUnderlineMeta=x,exports.TabsContainer=v,exports.TabsContainerMeta=m,exports.registerAll=function(e){var n=function(n,a){e?e.registerComponent(n,a):t(n,a)};n(v,m),n(K,x),n(g,T),n(w,C)};
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("@plasmicapp/host/registerComponent")),n=require("@plasmicapp/host"),a=e(require("constate")),r=require("react"),i=e(r);function o(){return(o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var s=function(){};function l(e){return{type:"default-component",kind:"button",props:{children:{type:"text",value:e}}}}var p=r.createContext(!1);function c(e){var t=r.useState(e.initialKey),n=t[0],a=t[1],i=r.useState(void 0);return{tabKey:n,bbox:i[0],setTabKey:a,setBbox:i[1]}}var b=a(c),u=b[0],d=b[1];function y(){var e=d();return"setTabKey"in e?e:void 0}var m="@plasmicpkgs/plasmic-tabs",h={name:"hostless-tabs-container",displayName:"Tabs Container",importName:"TabsContainer",importPath:m,providesData:!0,defaultStyles:{width:"stretch",padding:"8px"},props:{initialKey:{type:"string",description:"Key of the initially selected tab",defaultValue:"tab1"},previewKey:{type:"string",description:"SShow this key while editing in Plasmic Studio"},previewAll:{type:"boolean",description:"Reveal all tab contents while editing in Plasmic Studio"},children:{type:"slot",defaultValue:{type:"vbox",children:[{type:"hbox",children:[{type:"component",name:"hostless-tab-button",props:{tabKey:"tab1",children:l("Tab 1")}},{type:"component",name:"hostless-tab-button",props:{tabKey:"tab2",children:l("Tab 2")}},{type:"component",name:"hostless-tab-underline"}]},{type:"vbox",children:[{type:"component",name:"hostless-tab-content",props:{tabKey:"tab1",children:[{type:"vbox",children:["Some content for tab 1"]}]}},{type:"component",name:"hostless-tab-content",props:{tabKey:"tab2",children:[{type:"vbox",children:["Some content for tab 2"]}]}}]}]}}}};function v(e){var t=e.children,a=e.initialKey,r=e.previewKey,o=e.previewAll,s=void 0!==o&&o,l=!!n.usePlasmicCanvasContext();return i.createElement(u,{initialKey:a},i.createElement(p.Provider,{value:l&&s},i.createElement(f,{previewKey:r||a},t)))}function f(e){var t=e.children,a=e.previewKey,r=n.usePlasmicCanvasContext(),o=function(e){if(!e)throw new Error("unexpected nil");return e}(y()).tabKey;return i.createElement(n.DataProvider,{name:"currentTabKey",data:r&&a||o},t)}var x={name:"hostless-tab-underline",displayName:"Tab Underline",importName:"TabUnderline",importPath:m,props:{},defaultStyles:{background:"#7777ff",height:"2px"}};function K(e){var t,n=e.className,a=(null!=(t=y())?t:{bbox:void 0}).bbox;return a?i.createElement("div",{className:n,style:o({},JSON.parse(JSON.stringify(a)),{top:void 0,bottom:0,position:"absolute",transition:".4s ease all"})}):null}var T={name:"hostless-tab-button",isAttachment:!0,displayName:"Tab Button",importName:"TabButton",importPath:m,props:{tabKey:{type:"string",description:"The answer value selecting this choice sets"},children:{type:"slot",defaultValue:l("Some tab")}},defaultStyles:{width:"hug"}};function g(e){var t=e.className,n=e.children,a=e.tabKey,o=y(),l=r.useRef(null),p=null!=o?o:{tabKey:void 0,setTabKey:s,bbox:void 0,setBbox:s},c=p.tabKey,b=p.setTabKey,u=p.setBbox;return r.useEffect((function(){a===c&&u({width:l.current.offsetWidth,left:l.current.offsetLeft})}),[l.current,u,JSON.stringify(p.bbox),a,c]),i.createElement("div",{className:t,ref:l},r.cloneElement(i.Children.toArray(n)[0],{isActive:a&&c&&c===a,onClick:function(){b(a)}}))}var C={name:"hostless-tab-content",isAttachment:!0,displayName:"Tab Content",importName:"TabContent",importPath:m,props:{tabKey:{type:"string",description:"The answer value selecting this choice sets"},children:{type:"slot",defaultValue:{type:"vbox",children:{type:"text",value:"This is some tab content"}}}}};function w(e){var t=e.children,n=e.tabKey,a=y(),o=r.useContext(p);return i.createElement(i.Fragment,null,void 0===a||(null!=a?a:{tabKey:void 0}).tabKey===n||o?t:null)}exports.TabButton=g,exports.TabButtonMeta=T,exports.TabContent=w,exports.TabContentMeta=C,exports.TabUnderline=K,exports.TabUnderlineMeta=x,exports.TabsContainer=v,exports.TabsContainerMeta=h,exports.registerAll=function(e){var n=function(n,a){e?e.registerComponent(n,a):t(n,a)};n(v,h),n(K,x),n(g,T),n(w,C)};
//# sourceMappingURL=plasmic-tabs.cjs.production.min.js.map

@@ -24,7 +24,7 @@ import registerComponent from '@plasmicapp/host/registerComponent';

return {
type: "default-component",
kind: "button",
type: 'default-component',
kind: 'button',
props: {
children: {
type: "text",
type: 'text',
value: label

@@ -56,73 +56,73 @@ }

var result = useTabsContextUnsafe();
return "setTabKey" in result ? result : undefined;
return 'setTabKey' in result ? result : undefined;
}
var modulePath = "@plasmicpkgs/plasmic-tabs";
var modulePath = '@plasmicpkgs/plasmic-tabs';
var TabsContainerMeta = {
name: "hostless-tabs-container",
displayName: "Tabs Container",
importName: "TabsContainer",
name: 'hostless-tabs-container',
displayName: 'Tabs Container',
importName: 'TabsContainer',
importPath: modulePath,
providesData: true,
defaultStyles: {
width: "stretch",
padding: "8px"
width: 'stretch',
padding: '8px'
},
props: {
initialKey: {
type: "string",
description: "Key of the initially selected tab",
defaultValue: "tab1"
type: 'string',
description: 'Key of the initially selected tab',
defaultValue: 'tab1'
},
previewKey: {
type: "string",
description: "SShow this key while editing in Plasmic Studio"
type: 'string',
description: 'SShow this key while editing in Plasmic Studio'
},
previewAll: {
type: "boolean",
description: "Reveal all tab contents while editing in Plasmic Studio"
type: 'boolean',
description: 'Reveal all tab contents while editing in Plasmic Studio'
},
children: {
type: "slot",
type: 'slot',
defaultValue: {
type: "vbox",
type: 'vbox',
children: [{
type: "hbox",
type: 'hbox',
children: [{
type: "component",
name: "hostless-tab-button",
type: 'component',
name: 'hostless-tab-button',
props: {
tabKey: "tab1",
children: /*#__PURE__*/defaultButtonChildren("Tab 1")
tabKey: 'tab1',
children: /*#__PURE__*/defaultButtonChildren('Tab 1')
}
}, {
type: "component",
name: "hostless-tab-button",
type: 'component',
name: 'hostless-tab-button',
props: {
tabKey: "tab2",
children: /*#__PURE__*/defaultButtonChildren("Tab 2")
tabKey: 'tab2',
children: /*#__PURE__*/defaultButtonChildren('Tab 2')
}
}, {
type: "component",
name: "hostless-tab-underline"
type: 'component',
name: 'hostless-tab-underline'
}]
}, {
type: "vbox",
type: 'vbox',
children: [{
type: "component",
name: "hostless-tab-content",
type: 'component',
name: 'hostless-tab-content',
props: {
tabKey: "tab1",
tabKey: 'tab1',
children: [{
type: "vbox",
children: ["Some content for tab 1"]
type: 'vbox',
children: ['Some content for tab 1']
}]
}
}, {
type: "component",
name: "hostless-tab-content",
type: 'component',
name: 'hostless-tab-content',
props: {
tabKey: "tab2",
tabKey: 'tab2',
children: [{
type: "vbox",
children: ["Some content for tab 2"]
type: 'vbox',
children: ['Some content for tab 2']
}]

@@ -153,3 +153,3 @@ }

if (!x) {
throw new Error("unexpected nil");
throw new Error('unexpected nil');
}

@@ -166,3 +166,3 @@ return x;

return React.createElement(DataProvider, {
name: "currentTabKey",
name: 'currentTabKey',
data: effectiveKey

@@ -172,14 +172,10 @@ }, children);

var TabUnderlineMeta = {
name: "hostless-tab-underline",
displayName: "Tab Underline",
importName: "TabUnderline",
name: 'hostless-tab-underline',
displayName: 'Tab Underline',
importName: 'TabUnderline',
importPath: modulePath,
props: {
children: {
type: "slot"
}
},
props: {},
defaultStyles: {
background: "#7777ff",
height: "2px"
background: '#7777ff',
height: '2px'
}

@@ -199,4 +195,4 @@ };

bottom: 0,
position: "absolute",
transition: ".4s ease all"
position: 'absolute',
transition: '.4s ease all'
})

@@ -206,19 +202,19 @@ }) : null;

var TabButtonMeta = {
name: "hostless-tab-button",
name: 'hostless-tab-button',
isAttachment: true,
displayName: "Tab Button",
importName: "TabButton",
displayName: 'Tab Button',
importName: 'TabButton',
importPath: modulePath,
props: {
tabKey: {
type: "string",
description: "The answer value selecting this choice sets"
type: 'string',
description: 'The answer value selecting this choice sets'
},
children: {
type: "slot",
defaultValue: /*#__PURE__*/defaultButtonChildren("Some tab")
type: 'slot',
defaultValue: /*#__PURE__*/defaultButtonChildren('Some tab')
}
},
defaultStyles: {
width: "hug"
width: 'hug'
}

@@ -261,19 +257,19 @@ };

var TabContentMeta = {
name: "hostless-tab-content",
name: 'hostless-tab-content',
isAttachment: true,
displayName: "Tab Content",
importName: "TabContent",
displayName: 'Tab Content',
importName: 'TabContent',
importPath: modulePath,
props: {
tabKey: {
type: "string",
description: "The answer value selecting this choice sets"
type: 'string',
description: 'The answer value selecting this choice sets'
},
children: {
type: "slot",
type: 'slot',
defaultValue: {
type: "vbox",
type: 'vbox',
children: {
type: "text",
value: "This is some tab content"
type: 'text',
value: 'This is some tab content'
}

@@ -280,0 +276,0 @@ }

@@ -1,3 +0,3 @@

import { ComponentMeta } from "@plasmicapp/host";
import { ReactNode } from "react";
import { ComponentMeta } from '@plasmicapp/host';
import { ReactNode } from 'react';
export interface TabsProviderProps {

@@ -4,0 +4,0 @@ children?: ReactNode;

{
"version": "0.0.4",
"version": "0.0.5",
"license": "MIT",

@@ -66,3 +66,3 @@ "main": "dist/index.js",

},
"gitHead": "1a11e260711c67b16c0703de62e6d108a12fa2d9"
"gitHead": "aa76cffecca904270776e3de48960defac03e4d5"
}

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc