Changeset 2930254
- Timestamp:
- 06/23/2023 10:01:08 PM (3 years ago)
- Location:
- simple-tabs-block
- Files:
-
- 6 added
- 2 deleted
- 24 edited
- 1 copied
-
assets/icon-128x128.png (added)
-
assets/icon-256x256.png (added)
-
assets/icon.svg (added)
-
assets/screenshot-1.jpg (added)
-
assets/screenshot-2.jpg (added)
-
assets/screenshot-3.jpg (added)
-
tags/2.0.0 (copied) (copied from simple-tabs-block/trunk)
-
tags/2.0.0/build/tab/block.json (modified) (1 diff)
-
tags/2.0.0/build/tab/index.asset.php (modified) (1 diff)
-
tags/2.0.0/build/tab/index.js (modified) (1 diff)
-
tags/2.0.0/build/tabs/block.json (modified) (1 diff)
-
tags/2.0.0/build/tabs/index.asset.php (modified) (1 diff)
-
tags/2.0.0/build/tabs/index.css (modified) (1 diff)
-
tags/2.0.0/build/tabs/index.js (modified) (1 diff)
-
tags/2.0.0/build/tabs/style-index.css (modified) (1 diff)
-
tags/2.0.0/build/tabs/view.asset.php (modified) (1 diff)
-
tags/2.0.0/build/tabs/view.js (modified) (1 diff)
-
tags/2.0.0/changelog.txt (deleted)
-
tags/2.0.0/readme.txt (modified) (2 diffs)
-
tags/2.0.0/simple-tabs-block.php (modified) (3 diffs)
-
trunk/build/tab/block.json (modified) (1 diff)
-
trunk/build/tab/index.asset.php (modified) (1 diff)
-
trunk/build/tab/index.js (modified) (1 diff)
-
trunk/build/tabs/block.json (modified) (1 diff)
-
trunk/build/tabs/index.asset.php (modified) (1 diff)
-
trunk/build/tabs/index.css (modified) (1 diff)
-
trunk/build/tabs/index.js (modified) (1 diff)
-
trunk/build/tabs/style-index.css (modified) (1 diff)
-
trunk/build/tabs/view.asset.php (modified) (1 diff)
-
trunk/build/tabs/view.js (modified) (1 diff)
-
trunk/changelog.txt (deleted)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/simple-tabs-block.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-tabs-block/tags/2.0.0/build/tab/block.json
r2811130 r2930254 1 1 { 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tab", 5 "version": "1.3.0", 6 "title": "Tab", 7 "category": "design", 8 "parent": ["cloudcatch/tabs"], 9 "keywords": [ 10 "tab", 11 "tabs" 12 ], 13 "attributes": { 14 "index": { 15 "type": "number" 16 }, 17 "label": { 18 "type": "string", 19 "default": "Title" 20 }, 21 "showDescription": { 22 "type": "boolean", 23 "default": false 24 }, 25 "description": { 26 "type": "string", 27 "default": "" 28 } 29 }, 30 "usesContext": [ 31 "cloudcatch/tabs/activeTab" 32 ], 33 "description": "Tab", 34 "supports": { 35 "html": false 36 }, 37 "textdomain": "simple-tabs-block", 38 "editorScript": "file:./index.js", 39 "editorStyle": "file:./index.css", 40 "style": "file:./style-index.css" 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tab", 5 "version": "2.0.0", 6 "title": "Tab", 7 "category": "design", 8 "parent": [ 9 "cloudcatch/tabs" 10 ], 11 "keywords": [ 12 "tab", 13 "tabs" 14 ], 15 "description": "Customize your tabs look and feel using the Styles panel. Use any block within the tab content below.", 16 "attributes": { 17 "id": { 18 "type": "string" 19 }, 20 "index": { 21 "type": "number" 22 }, 23 "label": { 24 "type": "string", 25 "default": "Title" 26 }, 27 "showDescription": { 28 "type": "boolean", 29 "default": false 30 }, 31 "description": { 32 "type": "string", 33 "default": "" 34 } 35 }, 36 "usesContext": [ 37 "cloudcatch/tabs/activeTab", 38 "cloudcatch/tabs/defaultTab" 39 ], 40 "supports": { 41 "html": false, 42 "color": { 43 "gradients": true, 44 "link": false, 45 "__experimentalDefaultControls": { 46 "background": true, 47 "text": true 48 } 49 }, 50 "__experimentalBorder": { 51 "color": true, 52 "radius": true, 53 "style": true, 54 "width": true, 55 "__experimentalDefaultControls": { 56 "color": true, 57 "radius": true, 58 "style": true, 59 "width": true 60 } 61 }, 62 "spacing": { 63 "margin": false, 64 "padding": true, 65 "blockGap": false, 66 "__experimentalDefaultControls": { 67 "padding": true 68 } 69 }, 70 "typography": { 71 "fontSize": true, 72 "lineHeight": true, 73 "__experimentalFontStyle": true, 74 "__experimentalFontWeight": true, 75 "__experimentalLetterSpacing": true, 76 "__experimentalTextTransform": true, 77 "__experimentalDefaultControls": { 78 "fontSize": true 79 } 80 } 81 }, 82 "textdomain": "simple-tabs-block", 83 "editorScript": "file:./index.js", 84 "editorStyle": "file:./index.css", 85 "style": "file:./style-index.css" 41 86 } -
simple-tabs-block/tags/2.0.0/build/tab/index.asset.php
r2738796 r2930254 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' ec12fe791b64cbd7264118efed6da6e0');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '45e4236038feca6fb6a0'); -
simple-tabs-block/tags/2.0.0/build/tab/index.js
r2738796 r2930254 1 !function(){var e={184:function(e,t){var c;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var c=arguments[t];if(c){var l=typeof c;if("string"===l||"number"===l)e.push(c);else if(Array.isArray(c)){if(c.length){var r=o.apply(null,c);r&&e.push(r)}}else if("object"===l)if(c.toString===Object.prototype.toString)for(var a in c)n.call(c,a)&&c[a]&&e.push(a);else e.push(c.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(c=function(){return o}.apply(t,[]))||(e.exports=c)}()}},t={};function c(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,c),l.exports}!function(){"use strict";var e=window.wp.element,t=window.wp.blocks,n=(c(184),window.wp.i18n),o=window.wp.components,l=window.wp.blockEditor;(0,t.registerBlockType)("cloudcatch/tab",{edit:function(t){let{attributes:c,setAttributes:r,className:a,clientId:s,context:i}=t;const{index:u,label:p,showDescription:d}=c,v=((0,e.useRef)(null),(0,l.useBlockProps)({tabid:u,className:"wp-block-cloudcatch-tab",style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}})),b=(0,l.useInnerBlocksProps)({tabid:u,className:"wp-block-cloudcatch-tab",style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.InspectorControls,null,(0,e.createElement)(o.PanelBody,null,(0,e.createElement)(o.TextControl,{label:(0,n.__)("Tab label"),value:p,onChange:e=>r({label:e})}),(0,e.createElement)(o.ToggleControl,{label:(0,n.__)("Show description"),checked:d,onChange:()=>r({showDescription:!d})}))),(0,e.createElement)("div",v),(0,e.createElement)("div",b))},icon:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 310.9 237.6"},(0,e.createElement)("path",{d:"M273.4 64.4h-17.8c1.6-4.1 2.4-8.6 2.4-13.3V37.5C258 16.8 241.2 0 220.5 0h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6H37.5C16.8 0 0 16.8 0 37.5v13.6c0 9.8 3.8 18.7 9.9 25.4C3.8 83.2 0 92.1 0 101.9v98.2c0 20.7 16.8 37.5 37.5 37.5h235.9c20.7 0 37.5-16.8 37.5-37.5v-98.2c0-20.7-16.9-37.5-37.5-37.5zM192.8 25h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.7-12.5 12.5-12.5zm-77.6 0h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.6-12.5 12.5-12.5zm170.7 175.1c0 6.9-5.6 12.5-12.5 12.5H37.5c-6.9 0-12.5-5.6-12.5-12.5v-98.2c0-6.9 5.6-12.5 12.5-12.5h235.9c6.9 0 12.5 5.6 12.5 12.5v98.2z"})),save:function(t){let{attributes:c}=t;const{index:n}=c,o=l.useInnerBlocksProps.save({tabid:n,className:"wp-block-cloudcatch-tab"});return(0,e.createElement)("div",o)}})}()}(); 1 (()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var c={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var n=typeof a;if("string"===n||"number"===n)e.push(a);else if(Array.isArray(a)){if(a.length){var o=l.apply(null,a);o&&e.push(o)}}else if("object"===n){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var r in a)c.call(a,r)&&a[r]&&e.push(r)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(a=function(){return l}.apply(t,[]))||(e.exports=a)}()}},t={};function a(c){var l=t[c];if(void 0!==l)return l.exports;var n=t[c]={exports:{}};return e[c](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var c in t)a.o(t,c)&&!a.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:t[c]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,c=window.wp.element;var l=a(184),n=a.n(l);let o=e=>crypto.getRandomValues(new Uint8Array(e));const r=window.wp.components,i=window.wp.blockEditor,s=[{attributes:{index:{type:"number"},label:{type:"string",default:"Title"},showDescription:{type:"boolean",default:!1},description:{type:"string",default:""}},save({attributes:e}){const{index:t}=e,a=i.useInnerBlocksProps.save({tabid:t,className:"wp-block-cloudcatch-tab"});return(0,c.createElement)("div",{...a})}}];(0,t.registerBlockType)("cloudcatch/tab",{edit:function({attributes:t,setAttributes:a,context:l}){var s;const{id:d,index:b,label:p,showDescription:u,description:h}=t;(0,c.useEffect)((()=>{if(!d){const e=((e,t=21)=>((e,t,a)=>{let c=(2<<Math.log(e.length-1)/Math.LN2)-1,l=-~(1.6*c*t/e.length);return(n=t)=>{let o="";for(;;){let t=a(l),r=l;for(;r--;)if(o+=e[t[r]&c]||"",o.length===n)return o}}})(e,t,o))("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",11);a({id:e()})}}),[]);const m=(0,i.useBlockProps)({className:n()({active:d===l["cloudcatch/tabs/activeTab"]}),role:"tab",tabIndex:"0",tabid:b}),v=(0,i.useInnerBlocksProps)({tabid:b,className:n()("wp-block-cloudcatch-tab-content",{active:d===l["cloudcatch/tabs/activeTab"]}),style:{display:d===l["cloudcatch/tabs/activeTab"]?"block":"none"}});return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(r.PanelBody,null,(0,c.createElement)(r.TextControl,{label:(0,e.__)("Tab label"),value:p,onChange:e=>a({label:e})}),(0,c.createElement)(r.ToggleControl,{label:(0,e.__)("Show description"),checked:u,onChange:()=>a({showDescription:!u})}))),(0,c.createElement)("div",{...m},(0,c.createElement)(i.RichText,{tagName:"label",value:null!==(s=t?.label)&&void 0!==s?s:(0,e.__)("Title"),onChange:e=>a({label:e}),className:"wp-block-cloudcatch-tab__label"}),u&&(0,c.createElement)(i.RichText,{"aria-label":(0,e.__)("Description"),placeholder:(0,e.__)("Add text…"),value:h,onChange:e=>a({description:e}),identifier:"div",className:"wp-block-cloudcatch-tab__description"})),(0,c.createElement)("div",{...v}))},icon:()=>(0,c.createElement)(r.Icon,{icon:()=>(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M19.1 7.8h-7.5v-.7c0-1-.8-1.8-1.8-1.8h-5c-1 0-1.8.8-1.8 1.8v11.6c0 1 .8 1.8 1.8 1.8h14.3c1 0 1.8-.8 1.8-1.8V9.5c0-.9-.8-1.7-1.8-1.7zm.3 10.9c0 .1-.1.3-.3.3H4.9c-.1 0-.3-.1-.3-.3V7.1c0-.1.1-.3.3-.3h5c.1 0 .3.1.3.3V9.2h9.1c.1 0 .3.1.3.3v9.2z"}),(0,c.createElement)(r.Path,{d:"M16.8 13.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8zM16.8 16.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8z"}))}),save:function({attributes:t}){const{index:a,label:l,showDescription:n,description:o}=t,r=i.useBlockProps.save({role:"tab",tabIndex:"0",tabid:a}),s=i.useInnerBlocksProps.save({tabid:a,className:"wp-block-cloudcatch-tab-content"});return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{...r},(0,c.createElement)("label",{className:"wp-block-cloudcatch-tab__label"},null!=l?l:(0,e.__)("Title","simple-tabs-block")),n&&o.length>0&&(0,c.createElement)("div",{"aria-label":"Description",className:"wp-block-cloudcatch-tab__description"},o)),(0,c.createElement)("div",{...s}))},deprecated:s,example:{name:"cloudcatch/tab",attributes:{id:"500",index:0,label:(0,e.__)("Tab 1","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 2 /* translators: example text. */ 3 content:(0,e.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.","simple-tabs-block")}}]}})})()})(); -
simple-tabs-block/tags/2.0.0/build/tabs/block.json
r2811130 r2930254 1 1 { 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tabs", 5 "version": "1.3.0", 6 "title": "Tabs", 7 "category": "design", 8 "keywords": ["tab", "tabs"], 9 "attributes": { 10 "uuid": { 11 "type": "string" 12 }, 13 "tabs": { 14 "type": "array", 15 "default": [] 16 }, 17 "defaultTab": { 18 "type": "number", 19 "default": 0 20 }, 21 "activeTab": { 22 "type": "string", 23 "default": "" 24 } 25 }, 26 "providesContext": { 27 "cloudcatch/tabs/activeTab": "activeTab" 28 }, 29 "description": "Tabbed layout", 30 "supports": { 31 "align": ["wide", "full"], 32 "anchor": true, 33 "html": false, 34 "inserter": true, 35 "typography": { 36 "fontSize": true, 37 "lineHeight": true, 38 "__experimentalFontStyle": true, 39 "__experimentalFontWeight": true, 40 "__experimentalTextTransform": true, 41 "__experimentalFontFamily": true, 42 "__experimentalDefaultControls": { 43 "fontSize": true 44 } 45 }, 46 "spacing": { 47 "blockGap": true, 48 "units": ["px", "em", "rem", "vh", "vw"], 49 "__experimentalDefaultControls": { 50 "blockGap": true 51 } 52 }, 53 "__experimentalLayout": { 54 "allowSwitching": false, 55 "allowInheriting": false, 56 "default": { 57 "type": "flex" 58 } 59 } 60 }, 61 "textdomain": "simple-tabs-block", 62 "editorScript": "file:./index.js", 63 "editorStyle": "file:./index.css", 64 "style": "file:./style-index.css", 65 "viewScript": "file:./view.js" 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tabs", 5 "version": "2.0.0", 6 "title": "Tabs", 7 "category": "design", 8 "keywords": [ 9 "tab", 10 "tabs" 11 ], 12 "description": "Create rich tabbed layouts to organize information in a simple way.", 13 "attributes": { 14 "uuid": { 15 "type": "string" 16 }, 17 "tabs": { 18 "type": "array", 19 "default": [] 20 }, 21 "defaultTab": { 22 "type": "number", 23 "default": 0 24 }, 25 "activeTab": { 26 "type": "string", 27 "default": "" 28 } 29 }, 30 "providesContext": { 31 "cloudcatch/tabs/activeTab": "activeTab", 32 "cloudcatch/tabs/defaultTab": "defaultTab" 33 }, 34 "supports": { 35 "align": [ 36 "wide", 37 "full" 38 ], 39 "anchor": true, 40 "html": false, 41 "inserter": true, 42 "typography": { 43 "fontSize": true, 44 "lineHeight": true, 45 "__experimentalFontStyle": true, 46 "__experimentalFontWeight": true, 47 "__experimentalTextTransform": true, 48 "__experimentalFontFamily": true, 49 "__experimentalDefaultControls": { 50 "fontSize": true 51 } 52 }, 53 "spacing": { 54 "blockGap": true, 55 "units": [ 56 "px", 57 "em", 58 "rem", 59 "vh", 60 "vw" 61 ], 62 "__experimentalDefaultControls": { 63 "blockGap": true 64 } 65 }, 66 "__experimentalLayout": { 67 "allowSwitching": false, 68 "allowInheriting": false, 69 "default": { 70 "type": "flex" 71 } 72 } 73 }, 74 "textdomain": "simple-tabs-block", 75 "editorScript": "file:./index.js", 76 "editorStyle": "file:./index.css", 77 "style": "file:./style-index.css", 78 "viewScript": "file:./view.js" 66 79 } -
simple-tabs-block/tags/2.0.0/build/tabs/index.asset.php
r2811130 r2930254 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp- core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '85ff3de4c073b9930ac511e6cc039108');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '20a4ce5520c18749c4a5'); -
simple-tabs-block/tags/2.0.0/build/tabs/index.css
r2811130 r2930254 1 . editor-styles-wrapper :root{--cloudcatch-tabs-row-gap:var(--wp--style--block-gap,2em);--cloudcatch-tabs-column-gap:var(--wp--style--block-gap,2em)}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper{align-items:normal;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;flex-direction:column;justify-content:normal;row-gap:0}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;row-gap:var(--cloudcatch-tabs-row-gap)}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label{cursor:pointer;font-weight:inherit}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label.active{font-weight:700}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container{flex:1}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{display:none;margin:0}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-right .wp-block-cloudcatch-tabs__tabs{justify-content:flex-end}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{justify-content:space-between}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-left .wp-block-cloudcatch-tabs__tabs{justify-content:flex-start}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-center .wp-block-cloudcatch-tabs__tabs{justify-content:center}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical{flex-direction:row}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__tabs{align-items:normal;flex-direction:column}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-right .wp-block-cloudcatch-tabs__tabs{align-items:flex-end}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{align-items:center}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-left .wp-block-cloudcatch-tabs__tabs{align-items:flex-start}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-center .wp-block-cloudcatch-tabs__tabs{align-items:center}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__container{flex-direction:column}.editor-styles-wrapper .wp-block-cloudcatch-tabs .wp-block-cloudcatch-tabs__tabs .block-editor-button-block-appender{width:36px}1 .wp-block-cloudcatch-tabs__container>.block-list-appender{margin:0!important;order:0;position:static}.wp-block-cloudcatch-tabs__container>.block-list-appender .block-editor-button-block-appender{width:auto} -
simple-tabs-block/tags/2.0.0/build/tabs/index.js
r2738796 r2930254 1 !function(){var t,e={129:function(t,e,n){"use strict";var r=window.wp.element,o=window.wp.blocks,c=n(184),a=n.n(c),i=n(913),l=n.n(i);let s=t=>crypto.getRandomValues(new Uint8Array(t));var u=window.wp.i18n,p=window.wp.blockEditor,f=window.wp.components,d=window.wp.data,b=window.wp.compose;window.wp.coreData;const v=["cloudcatch/tab"],h={name:"cloudcatch/tab"},m={type:"default",alignments:[]};function w(t){const{orientation:e}=t,n=(0,p.useInnerBlocksProps)({className:"wp-block-cloudcatch-tabs__container"},{allowedBlocks:v,__experimentalDefaultBlock:h,__experimentalDirectInsert:!0,orientation:e,template:[["cloudcatch/tab"],["cloudcatch/tab"],["cloudcatch/tab"]],templateLock:!1,__experimentalLayout:m});return(0,r.createElement)("div",n)}var k=(0,b.compose)((0,d.withSelect)(((t,e)=>{let{clientId:n}=e;return{innerBlocks:t("core/block-editor").getBlocks(n)}})),(0,d.withDispatch)(((t,e,n)=>{let{clientId:r}=e,{select:o}=n;const{getBlock:c}=o("core/block-editor"),{updateBlockAttributes:a,moveBlockToPosition:i}=t("core/block-editor"),s=c(r),{selectBlock:u}=t(p.store);return{selectBlock(t){u(t)},resetTabOrder(){let t=[];l()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{index:e}),t.push({clientId:s.innerBlocks[e].clientId,attributes:s.innerBlocks[e].attributes})})),a(r,{tabs:t})},updateActiveTab(t){a(s.clientId,{activeTab:t}),l()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{activeTab:t})})),u(t)},moveTab(t,e){i(t,r,r,parseInt(e))}}})))((function(t){let{attributes:e,setAttributes:n,className:o,innerBlocks:c,clientId:i,updateActiveTab:l,selectBlock:b,resetTabOrder:v}=t;const h=((t,e=21)=>((t,e,n)=>{let r=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*r*e/t.length);return(c=e)=>{let a="";for(;;){let e=n(o),i=o;for(;i--;)if(a+=t[e[i]&r]||"",a.length===c)return a}}})(t,e,s))("1234567890abcdef",10),{uuid:m=h(),activeTab:k,defaultTab:g,tabs:_,layout:{justifyContent:y,orientation:x="horizontal",flexWrap:j="wrap"}={}}=e,{updateBlockAttributes:B}=(0,d.useDispatch)(p.store);(0,r.useEffect)((()=>{v()}),[c]);const E=(0,r.useRef)(),O=(0,p.useBlockProps)({ref:E,className:a()(o,"wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===y,"items-justified-space-between":"space-between"===y,"items-justified-left":"left"===y,"items-justified-center":"center"===y,"is-vertical":"vertical"===x,"no-wrap":"nowrap"===j})});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(f.PanelBody,null,(0,r.createElement)(f.SelectControl,{label:(0,u.__)("Default open tab"),value:g,options:_.map(((t,e)=>({value:e,label:t.attributes.label}))),onChange:t=>n({defaultTab:parseInt(t)})}))),(0,r.createElement)("div",O,(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs-wrapper"},(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs",role:"tablist","aria-orientation":x},_.map(((t,e)=>{var n,o,c,i,s;return(0,r.createElement)("div",{key:e},(0,r.createElement)("label",{className:a()("wp-block-cloudcatch-tab__label",null==t||null===(n=t.attributes)||void 0===n?void 0:n.className,{active:k===t.clientId}),role:"tab",tabid:e,tabIndex:"0",onFocus:e=>{return n=t.clientId,void l(n);var n}},null!==(o=null==t||null===(c=t.attributes)||void 0===c?void 0:c.label)&&void 0!==o?o:(0,u.__)("Title")),(null==t||null===(i=t.attributes)||void 0===i?void 0:i.showDescription)&&(0,r.createElement)(p.RichText,{"aria-label":(0,u.__)("Description"),placeholder:(0,u.__)("Add text…"),value:null==t||null===(s=t.attributes)||void 0===s?void 0:s.description,onChange:e=>{B(t.clientId,{description:e})},identifier:"div",className:"wp-block-cloudcatch-tab__description"}))})),(0,r.createElement)(p.InnerBlocks.ButtonBlockAppender,null))),(0,r.createElement)(w,{orientation:x})))}));(0,o.registerBlockType)("cloudcatch/tabs",{edit:k,icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 310.9 237.6"},(0,r.createElement)("path",{d:"M273.4 64.4h-17.8c1.6-4.1 2.4-8.6 2.4-13.3V37.5C258 16.8 241.2 0 220.5 0h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6H37.5C16.8 0 0 16.8 0 37.5v13.6c0 9.8 3.8 18.7 9.9 25.4C3.8 83.2 0 92.1 0 101.9v98.2c0 20.7 16.8 37.5 37.5 37.5h235.9c20.7 0 37.5-16.8 37.5-37.5v-98.2c0-20.7-16.9-37.5-37.5-37.5zM192.8 25h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.7-12.5 12.5-12.5zm-77.6 0h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.6-12.5 12.5-12.5zm170.7 175.1c0 6.9-5.6 12.5-12.5 12.5H37.5c-6.9 0-12.5-5.6-12.5-12.5v-98.2c0-6.9 5.6-12.5 12.5-12.5h235.9c6.9 0 12.5 5.6 12.5 12.5v98.2z"})),save:function(t){let{attributes:e}=t;const{uuid:n,tabs:o,defaultTab:c,layout:{justifyContent:i,orientation:l="horizontal",flexWrap:s="wrap"}={}}=e,f=a()("wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===i,"items-justified-space-between":"space-between"===i,"items-justified-left":"left"===i,"items-justified-center":"center"===i,"is-vertical":"vertical"===l,"no-wrap":"nowrap"===s});return(0,r.createElement)("div",p.useBlockProps.save({className:f}),(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs-wrapper"},(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs",role:"tablist","aria-orientation":l},o.map(((t,e)=>{var n,o,i,l,s,f;return(0,r.createElement)("div",{key:e},(0,r.createElement)(p.RichText.Content,{value:null!==(n=null==t||null===(o=t.attributes)||void 0===o?void 0:o.label)&&void 0!==n?n:(0,u.__)("Title"),tagName:"label",tabIndex:"0",role:"tab",key:e,tabid:e,className:a()("wp-block-cloudcatch-tab__label",null==t||null===(i=t.attributes)||void 0===i?void 0:i.className,{active:e===c})}),(null==t||null===(l=t.attributes)||void 0===l?void 0:l.showDescription)&&(0,r.createElement)(p.RichText.Content,{value:null!==(s=null==t||null===(f=t.attributes)||void 0===f?void 0:f.description)&&void 0!==s?s:(0,u.__)("Description"),tagName:"div",className:"wp-block-cloudcatch-tab__description"}))})))),(0,r.createElement)("div",p.useInnerBlocksProps.save({className:"wp-block-cloudcatch-tabs__container"})))}})},184:function(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var c=typeof n;if("string"===c||"number"===c)t.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&t.push(a)}}else if("object"===c)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&t.push(i);else t.push(n.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},705:function(t,e,n){var r=n(639).Symbol;t.exports=r},239:function(t,e,n){var r=n(705),o=n(607),c=n(333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):c(t)}},545:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},561:function(t,e,n){var r=n(990),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},290:function(t,e,n){var r=n(557);t.exports=function(t){return"function"==typeof t?t:r}},957:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},607:function(t,e,n){var r=n(705),o=Object.prototype,c=o.hasOwnProperty,a=o.toString,i=r?r.toStringTag:void 0;t.exports=function(t){var e=c.call(t,i),n=t[i];try{t[i]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[i]=n:delete t[i]),o}},333:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},639:function(t,e,n){var r=n(957),o="object"==typeof self&&self&&self.Object===Object&&self,c=r||o||Function("return this")();t.exports=c},990:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},557:function(t){t.exports=function(t){return t}},218:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},448:function(t,e,n){var r=n(239),o=n(5);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},913:function(t,e,n){var r=n(545),o=n(290),c=n(554),a=4294967295,i=Math.min;t.exports=function(t,e){if((t=c(t))<1||t>9007199254740991)return[];var n=a,l=i(t,a);e=o(e),t-=a;for(var s=r(l,e);++n<t;)e(n);return s}},601:function(t,e,n){var r=n(841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},554:function(t,e,n){var r=n(601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},841:function(t,e,n){var r=n(561),o=n(218),c=n(448),a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(c(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=i.test(t);return n||l.test(t)?s(t.slice(2),n?2:8):a.test(t)?NaN:+t}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var c=n[t]={exports:{}};return e[t](c,c.exports,r),c.exports}r.m=e,t=[],r.O=function(e,n,o,c){if(!n){var a=1/0;for(u=0;u<t.length;u++){n=t[u][0],o=t[u][1],c=t[u][2];for(var i=!0,l=0;l<n.length;l++)(!1&c||a>=c)&&Object.keys(r.O).every((function(t){return r.O[t](n[l])}))?n.splice(l--,1):(i=!1,c<a&&(a=c));if(i){t.splice(u--,1);var s=o();void 0!==s&&(e=s)}}return e}c=c||0;for(var u=t.length;u>0&&t[u-1][2]>c;u--)t[u]=t[u-1];t[u]=[n,o,c]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={68:0,370:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,c,a=n[0],i=n[1],l=n[2],s=0;if(a.some((function(e){return 0!==t[e]}))){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(l)var u=l(r)}for(e&&e(n);s<a.length;s++)c=a[s],r.o(t,c)&&t[c]&&t[c][0](),t[c]=0;return r.O(u)},n=self.webpackChunksimple_tabs_block=self.webpackChunksimple_tabs_block||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}();var o=r.O(void 0,[370],(function(){return r(129)}));o=r.O(o)}(); 1 (()=>{var e,t={461:(e,t,r)=>{"use strict";const a=window.wp.i18n,o=window.wp.blocks,n=window.wp.element;var c=r(184),i=r.n(c),l=r(913),s=r.n(l);const u=window.wp.blockEditor,p=window.wp.components,b=window.wp.data,d=window.wp.compose,f=["cloudcatch/tab"],v={name:"cloudcatch/tab"},m=(0,d.compose)((0,b.withSelect)(((e,{clientId:t})=>({innerBlocks:e("core/block-editor").getBlocks(t)}))),(0,b.withDispatch)(((e,{clientId:t},{select:r})=>{const{getBlock:a}=r("core/block-editor"),{updateBlockAttributes:o}=e("core/block-editor"),n=a(t),{selectBlock:c}=e(u.store);return{selectBlock(e){c(e)},resetTabOrder(){const e=[];s()(n.innerBlocks.length,(t=>{o(n.innerBlocks[t].clientId,{index:t}),e.push(n.innerBlocks[t].attributes.id)})),o(t,{tabs:e})},updateActiveTab(e){o(n.clientId,{activeTab:e})}}})))((function({attributes:e,setAttributes:t,innerBlocks:r,clientId:o,updateActiveTab:c,resetTabOrder:l}){const{defaultTab:s,activeTab:d,layout:{justifyContent:m,orientation:h="horizontal",flexWrap:w="wrap"}={}}=e;(0,n.useEffect)((()=>{l()}),[r]);const{getSelectedBlock:g}=(0,b.select)(u.store),{innerBlockCount:k,selectedBlock:y,innerBlockIds:_}=(0,b.useSelect)((e=>({innerBlockCount:e(u.store).getBlock(o)?.innerBlocks?.length,selectedBlock:g(),innerBlockIds:e(u.store).getBlock(o)?.innerBlocks.map((e=>e.attributes.id)).filter((e=>void 0!==e))})),[o]);(0,n.useEffect)((()=>{!d&&_.length&&(console.log(_),c(_[0]))}),[_]),(0,n.useEffect)((()=>{y&&_.includes(y?.attributes?.id)&&c(y.attributes.id)}),[y]);const x=(0,u.useBlockProps)({className:i()("wp-block-cloudcatch-tabs__wrapper","wp-block-cloudcatch-tabs-v2"),"data-default-tab":s||void 0}),B=(0,u.useInnerBlocksProps)({className:i()("wp-block-cloudcatch-tabs__container",{"items-justified-right":"right"===m,"items-justified-space-between":"space-between"===m,"items-justified-left":"left"===m,"items-justified-center":"center"===m,"is-vertical":"vertical"===h,"no-wrap":"nowrap"===w}),style:{gridTemplateColumns:"vertical"!==h?`repeat(${k}, auto) ${"left"===m?"1fr":"auto"}`:void 0,gridTemplateRows:"vertical"===h?`repeat(${k}, auto) 1fr`:void 0}},{renderAppender:u.InnerBlocks.ButtonBlockAppender,allowedBlocks:f,__experimentalDefaultBlock:v,__experimentalDirectInsert:!0,templateLock:!1,template:[["cloudcatch/tab",{label:"Tab 1"},[["core/paragraph",{content:"Tab 1 Content"}]]],["cloudcatch/tab",{label:"Tab 2"},[["core/paragraph",{content:"Tab 2 Content"}]]],["cloudcatch/tab",{label:"Tab 3"},[["core/paragraph",{content:"Tab 3 Content"}]]]]});return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(u.InspectorControls,null,(0,n.createElement)(p.PanelBody,null,(0,n.createElement)(p.SelectControl,{label:(0,a.__)("Default open tab","simple-tabs-block"),value:s,options:r.map(((e,t)=>({value:t,label:e.attributes.label}))),onChange:e=>t({defaultTab:parseInt(e)})}))),(0,n.createElement)("div",{...x},(0,n.createElement)("div",{...B})))})),h=[{attributes:{uuid:{type:"string"},tabs:{type:"array",default:[]},defaultTab:{type:"number",default:0},activeTab:{type:"string",default:""}},save({attributes:e}){const{uuid:t,tabs:r,defaultTab:o,layout:{justifyContent:c,orientation:l="horizontal",flexWrap:s="wrap"}={}}=e,p=i()("wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===c,"items-justified-space-between":"space-between"===c,"items-justified-left":"left"===c,"items-justified-center":"center"===c,"is-vertical":"vertical"===l,"no-wrap":"nowrap"===s});return(0,n.createElement)("div",{...u.useBlockProps.save({className:p})},(0,n.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs-wrapper"},(0,n.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs",role:"tablist","aria-orientation":l},r.map(((e,t)=>{var r,c;return(0,n.createElement)("div",{key:t},(0,n.createElement)(u.RichText.Content,{value:null!==(r=e?.attributes?.label)&&void 0!==r?r:(0,a.__)("Title"),tagName:"label",tabIndex:"0",role:"tab",key:t,tabid:t,className:i()("wp-block-cloudcatch-tab__label",e?.attributes?.className,{active:t===o})}),e?.attributes?.showDescription&&(0,n.createElement)(u.RichText.Content,{value:null!==(c=e?.attributes?.description)&&void 0!==c?c:(0,a.__)("Description"),tagName:"div",className:"wp-block-cloudcatch-tab__description"}))})))),(0,n.createElement)("div",{...u.useInnerBlocksProps.save({className:"wp-block-cloudcatch-tabs__container"})}))}}];(0,o.registerBlockType)("cloudcatch/tabs",{edit:m,icon:()=>(0,n.createElement)(p.Icon,{icon:()=>(0,n.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(p.Path,{d:"M19.1 7.8h-7.5v-.7c0-1-.8-1.8-1.8-1.8h-5c-1 0-1.8.8-1.8 1.8v11.6c0 1 .8 1.8 1.8 1.8h14.3c1 0 1.8-.8 1.8-1.8V9.5c0-.9-.8-1.7-1.8-1.7zm.3 10.9c0 .1-.1.3-.3.3H4.9c-.1 0-.3-.1-.3-.3V7.1c0-.1.1-.3.3-.3h5c.1 0 .3.1.3.3V9.2h9.1c.1 0 .3.1.3.3v9.2z"}),(0,n.createElement)(p.Path,{d:"M16.8 13.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8zM16.8 16.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8zM15.1 6.9h-2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7h2c.4 0 .8.3.8.7-.1.3-.4.7-.8.7zM19.2 6.9h-2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7h2c.4 0 .8.3.8.7-.1.3-.4.7-.8.7z"}))}),save:function({attributes:e}){const{tabs:t,defaultTab:r,layout:{justifyContent:a,orientation:o="horizontal",flexWrap:c="wrap"}={}}=e,l=t.length,s=u.useBlockProps.save({className:i()("wp-block-cloudcatch-tabs__wrapper","wp-block-cloudcatch-tabs-v2"),"data-default-tab":r||void 0}),p=u.useInnerBlocksProps.save({className:i()("wp-block-cloudcatch-tabs__container",{"items-justified-right":"right"===a,"items-justified-space-between":"space-between"===a,"items-justified-left":"left"===a,"items-justified-center":"center"===a,"is-vertical":"vertical"===o,"no-wrap":"nowrap"===c}),style:{gridTemplateColumns:"vertical"!==o?`repeat(${l}, auto) ${"left"===a?"1fr":"auto"}`:void 0,gridTemplateRows:"vertical"===o?`repeat(${l}, auto) 1fr`:void 0}});return(0,n.createElement)("div",{...s},(0,n.createElement)("div",{...p}))},deprecated:h,example:{attributes:{tabs:["500","501","502"]},innerBlocks:[{name:"cloudcatch/tab",attributes:{id:"500",index:0,label:(0,a.__)("Tab 1","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 2 /* translators: example text. */ 3 content:(0,a.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.","simple-tabs-block")}}]},{name:"cloudcatch/tab",attributes:{id:"501",index:1,label:(0,a.__)("Tab 2","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 4 /* translators: example text. */ 5 content:(0,a.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}}]},{name:"cloudcatch/tab",attributes:{id:"502",index:2,label:(0,a.__)("Tab 3","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 6 /* translators: example text. */ 7 content:(0,a.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}}]}]}})},184:(e,t)=>{var r;!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var n=typeof r;if("string"===n||"number"===n)e.push(r);else if(Array.isArray(r)){if(r.length){var c=o.apply(null,r);c&&e.push(c)}}else if("object"===n){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},705:(e,t,r)=>{var a=r(639).Symbol;e.exports=a},239:(e,t,r)=>{var a=r(705),o=r(607),n=r(333),c=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?o(e):n(e)}},545:e=>{e.exports=function(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}},561:(e,t,r)=>{var a=r(990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,a(e)+1).replace(o,""):e}},290:(e,t,r)=>{var a=r(557);e.exports=function(e){return"function"==typeof e?e:a}},957:(e,t,r)=>{var a="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=a},607:(e,t,r)=>{var a=r(705),o=Object.prototype,n=o.hasOwnProperty,c=o.toString,i=a?a.toStringTag:void 0;e.exports=function(e){var t=n.call(e,i),r=e[i];try{e[i]=void 0;var a=!0}catch(e){}var o=c.call(e);return a&&(t?e[i]=r:delete e[i]),o}},333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:(e,t,r)=>{var a=r(957),o="object"==typeof self&&self&&self.Object===Object&&self,n=a||o||Function("return this")();e.exports=n},990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},557:e=>{e.exports=function(e){return e}},218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},448:(e,t,r)=>{var a=r(239),o=r(5);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==a(e)}},913:(e,t,r)=>{var a=r(545),o=r(290),n=r(554),c=4294967295,i=Math.min;e.exports=function(e,t){if((e=n(e))<1||e>9007199254740991)return[];var r=c,l=i(e,c);t=o(t),e-=c;for(var s=a(l,t);++r<e;)t(r);return s}},601:(e,t,r)=>{var a=r(841);e.exports=function(e){return e?Infinity===(e=a(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,r)=>{var a=r(601);e.exports=function(e){var t=a(e),r=t%1;return t==t?r?t-r:t:0}},841:(e,t,r)=>{var a=r(561),o=r(218),n=r(448),c=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var r=i.test(e);return r||l.test(e)?s(e.slice(2),r?2:8):c.test(e)?NaN:+e}}},r={};function a(e){var o=r[e];if(void 0!==o)return o.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.m=t,e=[],a.O=(t,r,o,n)=>{if(!r){var c=1/0;for(u=0;u<e.length;u++){for(var[r,o,n]=e[u],i=!0,l=0;l<r.length;l++)(!1&n||c>=n)&&Object.keys(a.O).every((e=>a.O[e](r[l])))?r.splice(l--,1):(i=!1,n<c&&(c=n));if(i){e.splice(u--,1);var s=o();void 0!==s&&(t=s)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[r,o,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={68:0,370:0};a.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[c,i,l]=r,s=0;if(c.some((t=>0!==e[t]))){for(o in i)a.o(i,o)&&(a.m[o]=i[o]);if(l)var u=l(a)}for(t&&t(r);s<c.length;s++)n=c[s],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(u)},r=globalThis.webpackChunksimple_tabs_block=globalThis.webpackChunksimple_tabs_block||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=a.O(void 0,[370],(()=>a(461)));o=a.O(o)})(); -
simple-tabs-block/tags/2.0.0/build/tabs/style-index.css
r2811130 r2930254 1 :root{--cloudcatch-tabs-row-gap:var(--wp--style--block-gap,2em);--cloudcatch-tabs-column-gap:var(--wp--style--block-gap,2em)}.wp-block-cloudcatch-tabs .wp-block-cloudcatch-tabs__wrapper{align-items:normal;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;flex-direction:column;justify-content:normal;row-gap:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;row-gap:var(--cloudcatch-tabs-row-gap)}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label{cursor:pointer;font-weight:inherit}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label.active{font-weight:700}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container{flex:1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{display:none;margin:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-right .wp-block-cloudcatch-tabs__tabs{justify-content:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{justify-content:space-between}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-left .wp-block-cloudcatch-tabs__tabs{justify-content:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-center .wp-block-cloudcatch-tabs__tabs{justify-content:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical{flex-direction:row}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__tabs{align-items:normal;flex-direction:column}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-right .wp-block-cloudcatch-tabs__tabs{align-items:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-left .wp-block-cloudcatch-tabs__tabs{align-items:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-center .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__container{flex-direction:column}1 :root{--cloudcatch-tabs-row-gap:var(--wp--style--block-gap,2em);--cloudcatch-tabs-column-gap:var(--wp--style--block-gap,2em)}.wp-block-cloudcatch-tabs__container{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:grid;flex:1;justify-content:flex-start;row-gap:0!important}body .wp-block-cloudcatch-tabs__container.is-layout-flex{display:grid}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{order:-1}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab-content{display:none;grid-column:1/-1;margin:0;order:1}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab-content.active{display:block}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab.active label,.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab__label.active{font-weight:700}.wp-block-cloudcatch-tabs__container.is-vertical{grid-auto-flow:column;grid-template-columns:min-content auto}.wp-block-cloudcatch-tabs__container.is-vertical .wp-block-cloudcatch-tab-content{grid-column:2/2;grid-row:1/-1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2){align-items:normal;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;flex-direction:column;justify-content:normal;row-gap:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__tabs{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;row-gap:var(--cloudcatch-tabs-row-gap)}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label{cursor:pointer;font-weight:inherit}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label.active{font-weight:700}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tab{grid-column:1/-1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__container{display:grid;flex:1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{display:none;margin:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab.active{display:block}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-right .wp-block-cloudcatch-tabs__tabs{justify-content:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-space-between .wp-block-cloudcatch-tabs__tabs{justify-content:space-between}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-left .wp-block-cloudcatch-tabs__tabs{justify-content:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-center .wp-block-cloudcatch-tabs__tabs{justify-content:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical{flex-direction:row}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical .wp-block-cloudcatch-tabs__tabs{align-items:normal;flex-direction:column}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-right .wp-block-cloudcatch-tabs__tabs{align-items:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-left .wp-block-cloudcatch-tabs__tabs{align-items:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-center .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical .wp-block-cloudcatch-tabs__container{flex-direction:column} -
simple-tabs-block/tags/2.0.0/build/tabs/view.asset.php
r2811130 r2930254 1 <?php return array('dependencies' => array(), 'version' => ' 6689f175c67c7b65bd005eb5511c97fb');1 <?php return array('dependencies' => array(), 'version' => '741db60816f4a93d7df1'); -
simple-tabs-block/tags/2.0.0/build/tabs/view.js
r2811130 r2930254 1 document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".wp-block-cloudcatch-tabs").forEach(( e=>{(e=>{const t=e.querySelector(".wp-block-cloudcatch-tabs__container"),c=e.querySelector(".wp-block-cloudcatch-tabs__tabs"),a=c.querySelectorAll('[role="tab"]'),o={37:-1,38:-1,39:1,40:1};let r=0;const n=e=>{t.querySelectorAll(":scope > *").forEach((e=>{e.style.display="none"})),a.forEach((e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false")})),r=parseInt(e);const o=c.querySelector('[tabid="'+r+'"]');o.classList.add("active"),o.setAttribute("aria-selected","true"),t.querySelector('[tabid="'+r+'"]').style.display="block";const n=new Event("tabChanged");window.dispatchEvent(n)},s=e=>{var t=e.keyCode,n=!1;"vertical"==c.getAttribute("aria-orientation")?38!==t&&40!==t||(e.preventDefault(),n=!0):37!==t&&39!==t||(n=!0),n&&function(e){for(var t=e.keyCode,c=0;c<a.length;c++)a[c].addEventListener("focus",i);if(o[t]){var n=r+o[t];void 0!==a[n]?a[n].focus():37===t||38===t?a[a.length-1].focus():39!==t&&40!=t||a[0].focus()}}(e)};function i(e){var t=e.target;setTimeout(d,0,t)}function d(e){e===document.activeElement&&n(e.getAttribute("tabid"))}a.forEach((e=>{e.classList.contains("active")&&(r=e.getAttribute("tabid"))})),n(r),a.forEach((e=>{e.addEventListener("click",(t=>{n(e.getAttribute("tabid"))})),e.addEventListener("keydown",(e=>{switch(e.keyCode){case 38:case 40:s(e)}})),e.addEventListener("keyup",(e=>{switch(e.keyCode){case 37:case 39:s(e)}}))}))})(e)}))}));1 document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".wp-block-cloudcatch-tabs").forEach((t=>{(t=>{const e=t.querySelectorAll('[role="tab"]');for(let t=0;t<e.length;t++)e[t].addEventListener("focus",n);const a={37:-1,38:-1,39:1,40:1};let c=0;const o=a=>{t.querySelectorAll('div[tabid]:not([role="tab"])').forEach((t=>{t.style.display="none",t.classList.remove("active")})),e.forEach((t=>{t.classList.remove("active"),t.setAttribute("aria-selected","false")})),c=parseInt(a);const o=t.querySelector('[role="tab"][tabid="'+c+'"]');o.classList.add("active"),o.setAttribute("aria-selected","true"),t.querySelector('div[tabid="'+c+'"]:not([role="tab"])').style.display="block",t.querySelector('div[tabid="'+c+'"]:not([role="tab"])').classList.add("active");const s=new CustomEvent("tabChanged",{detail:o});window.dispatchEvent(s)},s=o=>{const s=o.keyCode;let n=!1;t.classList.contains("is-vertical")?38!==s&&40!==s||(o.preventDefault(),n=!0):37!==s&&39!==s||(n=!0),n&&function(t){const o=t.keyCode;if(a[o]){const t=c+a[o];void 0!==e[t]?e[t].focus():37===o||38===o?e[e.length-1].focus():39!==o&&40!=o||e[0].focus()}}(o)};function n(t){const e=t.target;setTimeout(i,0,e)}function i(t){t===document.activeElement&&o(t.getAttribute("tabid"))}c=t.getAttribute("data-default-tab")||0,o(c),e.forEach((t=>{t.addEventListener("click",(()=>{o(t.getAttribute("tabid"))})),t.addEventListener("keydown",(t=>{switch(t.keyCode){case 38:case 40:s(t)}})),t.addEventListener("keyup",(t=>{switch(t.keyCode){case 37:case 39:s(t)}}))}))})(t)}))})); -
simple-tabs-block/tags/2.0.0/readme.txt
r2929703 r2930254 5 5 Tested up to: 6.2.2 6 6 Requires PHP: 7.0 7 Stable tag: 1.3.07 Stable tag: 2.0.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 19 19 Supports horizontal and vertical tabs. 20 20 21 == Features == 22 * Tabs customizable using the native block editor style controls 23 * Fully accessible including keyboard controls 24 * Supports horizontal and vertical tabs 25 * Set default open tab 26 27 == Changelog == 28 29 = 2.0.0 = 30 31 * **BREAKING CHANGE**: Refactor tabs block for updated block controls 32 * Feat: Add CSS classes to active tabs 33 * Feat: Allow block styling through the native block editor styles panel 34 35 = 1.3.0 = 36 37 * Feat: Update block styles 38 * Docs: Compatibility with 6.1 39 40 = 1.2.1 = 41 42 * Fix: Various block fixes 43 44 = 1.2.0 = 45 46 * Feat: Trigger event on window when tab is changed 47 48 = 1.1.1 = 49 50 * Fix: `label` undefined error 51 52 = 1.1.0 = 53 54 * Fix: Accessibility features 55 * Fix: Allow CSS classes on tabs 56 * Feat: Added tab description field 57 58 = 1.0.0 = 59 60 * Initial release 61 62 == Upgrade Notice == 63 64 = 2.0.0 = 65 **BREAKING CHANGE**: Upgrading from version 1.x to 2.x could break any custom CSS applied to the tabs. It is highly recommended to test the upgrade on a staging environment before upgrading on a production site. 66 67 21 68 == Installation == 22 69 23 70 1. Upload the plugin files to the `/wp-content/plugins/simple-tabs-block` directory, or install the plugin through the WordPress plugins screen directly. 24 71 1. Activate the plugin through the 'Plugins' screen in WordPress 72 73 == Screenshots == 74 75 1. Block editor 76 2. Tab styles panel 77 3. Frontend view -
simple-tabs-block/tags/2.0.0/simple-tabs-block.php
r2811130 r2930254 2 2 /** 3 3 * Plugin Name: Simple Tabs Block 4 * Description: Block to create a tabbed layout.4 * Description: Create rich tabbed layouts to organize information in a simple way using Simple Tabs Block 5 5 * Requires at least: 5.9 6 6 * Requires PHP: 7.0 7 * Version: 1.3.08 * Author: CloudCatch 7 * Version: 2.0.0 8 * Author: CloudCatch LLC 9 9 * Author URI: https://cloudcatch.io 10 10 * Contributors: cloudcatch, dkjensen … … 13 13 * Text Domain: simple-tabs-block 14 14 * 15 * @package create-block15 * @package CloudCatch\SimpleTabsBlock 16 16 */ 17 17 … … 28 28 } 29 29 add_action( 'init', 'create_block_wp_tabs_block_block_init' ); 30 31 /** 32 * Prevent auto updating to version 2.0.0 due to breaking changes 33 * 34 * @param boolean $should_update Whether to update. 35 * @param object $plugin The update offer. 36 * @return boolean 37 */ 38 function create_block_wp_tabs_block_auto_update( $should_update, $plugin ) { 39 if ( ! isset( $plugin->plugin, $plugin->new_version ) ) { 40 return $should_update; 41 } 42 43 if ( 'simple-tabs-block/simple-tabs-block.php' !== $plugin->plugin ) { 44 return $should_update; 45 } 46 47 if ( version_compare( $plugin->Version, '2.0.0', '<' ) ) { 48 return false; 49 } 50 51 return $should_update; 52 } 53 add_filter( 'auto_update_plugin', 'create_block_wp_tabs_block_auto_update', 99, 2 ); -
simple-tabs-block/trunk/build/tab/block.json
r2811130 r2930254 1 1 { 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tab", 5 "version": "1.3.0", 6 "title": "Tab", 7 "category": "design", 8 "parent": ["cloudcatch/tabs"], 9 "keywords": [ 10 "tab", 11 "tabs" 12 ], 13 "attributes": { 14 "index": { 15 "type": "number" 16 }, 17 "label": { 18 "type": "string", 19 "default": "Title" 20 }, 21 "showDescription": { 22 "type": "boolean", 23 "default": false 24 }, 25 "description": { 26 "type": "string", 27 "default": "" 28 } 29 }, 30 "usesContext": [ 31 "cloudcatch/tabs/activeTab" 32 ], 33 "description": "Tab", 34 "supports": { 35 "html": false 36 }, 37 "textdomain": "simple-tabs-block", 38 "editorScript": "file:./index.js", 39 "editorStyle": "file:./index.css", 40 "style": "file:./style-index.css" 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tab", 5 "version": "2.0.0", 6 "title": "Tab", 7 "category": "design", 8 "parent": [ 9 "cloudcatch/tabs" 10 ], 11 "keywords": [ 12 "tab", 13 "tabs" 14 ], 15 "description": "Customize your tabs look and feel using the Styles panel. Use any block within the tab content below.", 16 "attributes": { 17 "id": { 18 "type": "string" 19 }, 20 "index": { 21 "type": "number" 22 }, 23 "label": { 24 "type": "string", 25 "default": "Title" 26 }, 27 "showDescription": { 28 "type": "boolean", 29 "default": false 30 }, 31 "description": { 32 "type": "string", 33 "default": "" 34 } 35 }, 36 "usesContext": [ 37 "cloudcatch/tabs/activeTab", 38 "cloudcatch/tabs/defaultTab" 39 ], 40 "supports": { 41 "html": false, 42 "color": { 43 "gradients": true, 44 "link": false, 45 "__experimentalDefaultControls": { 46 "background": true, 47 "text": true 48 } 49 }, 50 "__experimentalBorder": { 51 "color": true, 52 "radius": true, 53 "style": true, 54 "width": true, 55 "__experimentalDefaultControls": { 56 "color": true, 57 "radius": true, 58 "style": true, 59 "width": true 60 } 61 }, 62 "spacing": { 63 "margin": false, 64 "padding": true, 65 "blockGap": false, 66 "__experimentalDefaultControls": { 67 "padding": true 68 } 69 }, 70 "typography": { 71 "fontSize": true, 72 "lineHeight": true, 73 "__experimentalFontStyle": true, 74 "__experimentalFontWeight": true, 75 "__experimentalLetterSpacing": true, 76 "__experimentalTextTransform": true, 77 "__experimentalDefaultControls": { 78 "fontSize": true 79 } 80 } 81 }, 82 "textdomain": "simple-tabs-block", 83 "editorScript": "file:./index.js", 84 "editorStyle": "file:./index.css", 85 "style": "file:./style-index.css" 41 86 } -
simple-tabs-block/trunk/build/tab/index.asset.php
r2738796 r2930254 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' ec12fe791b64cbd7264118efed6da6e0');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => '45e4236038feca6fb6a0'); -
simple-tabs-block/trunk/build/tab/index.js
r2738796 r2930254 1 !function(){var e={184:function(e,t){var c;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var c=arguments[t];if(c){var l=typeof c;if("string"===l||"number"===l)e.push(c);else if(Array.isArray(c)){if(c.length){var r=o.apply(null,c);r&&e.push(r)}}else if("object"===l)if(c.toString===Object.prototype.toString)for(var a in c)n.call(c,a)&&c[a]&&e.push(a);else e.push(c.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(c=function(){return o}.apply(t,[]))||(e.exports=c)}()}},t={};function c(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,c),l.exports}!function(){"use strict";var e=window.wp.element,t=window.wp.blocks,n=(c(184),window.wp.i18n),o=window.wp.components,l=window.wp.blockEditor;(0,t.registerBlockType)("cloudcatch/tab",{edit:function(t){let{attributes:c,setAttributes:r,className:a,clientId:s,context:i}=t;const{index:u,label:p,showDescription:d}=c,v=((0,e.useRef)(null),(0,l.useBlockProps)({tabid:u,className:"wp-block-cloudcatch-tab",style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}})),b=(0,l.useInnerBlocksProps)({tabid:u,className:"wp-block-cloudcatch-tab",style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(l.InspectorControls,null,(0,e.createElement)(o.PanelBody,null,(0,e.createElement)(o.TextControl,{label:(0,n.__)("Tab label"),value:p,onChange:e=>r({label:e})}),(0,e.createElement)(o.ToggleControl,{label:(0,n.__)("Show description"),checked:d,onChange:()=>r({showDescription:!d})}))),(0,e.createElement)("div",v),(0,e.createElement)("div",b))},icon:(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 310.9 237.6"},(0,e.createElement)("path",{d:"M273.4 64.4h-17.8c1.6-4.1 2.4-8.6 2.4-13.3V37.5C258 16.8 241.2 0 220.5 0h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6H37.5C16.8 0 0 16.8 0 37.5v13.6c0 9.8 3.8 18.7 9.9 25.4C3.8 83.2 0 92.1 0 101.9v98.2c0 20.7 16.8 37.5 37.5 37.5h235.9c20.7 0 37.5-16.8 37.5-37.5v-98.2c0-20.7-16.9-37.5-37.5-37.5zM192.8 25h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.7-12.5 12.5-12.5zm-77.6 0h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.6-12.5 12.5-12.5zm170.7 175.1c0 6.9-5.6 12.5-12.5 12.5H37.5c-6.9 0-12.5-5.6-12.5-12.5v-98.2c0-6.9 5.6-12.5 12.5-12.5h235.9c6.9 0 12.5 5.6 12.5 12.5v98.2z"})),save:function(t){let{attributes:c}=t;const{index:n}=c,o=l.useInnerBlocksProps.save({tabid:n,className:"wp-block-cloudcatch-tab"});return(0,e.createElement)("div",o)}})}()}(); 1 (()=>{var e={184:(e,t)=>{var a;!function(){"use strict";var c={}.hasOwnProperty;function l(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var n=typeof a;if("string"===n||"number"===n)e.push(a);else if(Array.isArray(a)){if(a.length){var o=l.apply(null,a);o&&e.push(o)}}else if("object"===n){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var r in a)c.call(a,r)&&a[r]&&e.push(r)}}}return e.join(" ")}e.exports?(l.default=l,e.exports=l):void 0===(a=function(){return l}.apply(t,[]))||(e.exports=a)}()}},t={};function a(c){var l=t[c];if(void 0!==l)return l.exports;var n=t[c]={exports:{}};return e[c](n,n.exports,a),n.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var c in t)a.o(t,c)&&!a.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:t[c]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.blocks,c=window.wp.element;var l=a(184),n=a.n(l);let o=e=>crypto.getRandomValues(new Uint8Array(e));const r=window.wp.components,i=window.wp.blockEditor,s=[{attributes:{index:{type:"number"},label:{type:"string",default:"Title"},showDescription:{type:"boolean",default:!1},description:{type:"string",default:""}},save({attributes:e}){const{index:t}=e,a=i.useInnerBlocksProps.save({tabid:t,className:"wp-block-cloudcatch-tab"});return(0,c.createElement)("div",{...a})}}];(0,t.registerBlockType)("cloudcatch/tab",{edit:function({attributes:t,setAttributes:a,context:l}){var s;const{id:d,index:b,label:p,showDescription:u,description:h}=t;(0,c.useEffect)((()=>{if(!d){const e=((e,t=21)=>((e,t,a)=>{let c=(2<<Math.log(e.length-1)/Math.LN2)-1,l=-~(1.6*c*t/e.length);return(n=t)=>{let o="";for(;;){let t=a(l),r=l;for(;r--;)if(o+=e[t[r]&c]||"",o.length===n)return o}}})(e,t,o))("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",11);a({id:e()})}}),[]);const m=(0,i.useBlockProps)({className:n()({active:d===l["cloudcatch/tabs/activeTab"]}),role:"tab",tabIndex:"0",tabid:b}),v=(0,i.useInnerBlocksProps)({tabid:b,className:n()("wp-block-cloudcatch-tab-content",{active:d===l["cloudcatch/tabs/activeTab"]}),style:{display:d===l["cloudcatch/tabs/activeTab"]?"block":"none"}});return(0,c.createElement)(c.Fragment,null,(0,c.createElement)(i.InspectorControls,null,(0,c.createElement)(r.PanelBody,null,(0,c.createElement)(r.TextControl,{label:(0,e.__)("Tab label"),value:p,onChange:e=>a({label:e})}),(0,c.createElement)(r.ToggleControl,{label:(0,e.__)("Show description"),checked:u,onChange:()=>a({showDescription:!u})}))),(0,c.createElement)("div",{...m},(0,c.createElement)(i.RichText,{tagName:"label",value:null!==(s=t?.label)&&void 0!==s?s:(0,e.__)("Title"),onChange:e=>a({label:e}),className:"wp-block-cloudcatch-tab__label"}),u&&(0,c.createElement)(i.RichText,{"aria-label":(0,e.__)("Description"),placeholder:(0,e.__)("Add text…"),value:h,onChange:e=>a({description:e}),identifier:"div",className:"wp-block-cloudcatch-tab__description"})),(0,c.createElement)("div",{...v}))},icon:()=>(0,c.createElement)(r.Icon,{icon:()=>(0,c.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,c.createElement)(r.Path,{d:"M19.1 7.8h-7.5v-.7c0-1-.8-1.8-1.8-1.8h-5c-1 0-1.8.8-1.8 1.8v11.6c0 1 .8 1.8 1.8 1.8h14.3c1 0 1.8-.8 1.8-1.8V9.5c0-.9-.8-1.7-1.8-1.7zm.3 10.9c0 .1-.1.3-.3.3H4.9c-.1 0-.3-.1-.3-.3V7.1c0-.1.1-.3.3-.3h5c.1 0 .3.1.3.3V9.2h9.1c.1 0 .3.1.3.3v9.2z"}),(0,c.createElement)(r.Path,{d:"M16.8 13.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8zM16.8 16.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8z"}))}),save:function({attributes:t}){const{index:a,label:l,showDescription:n,description:o}=t,r=i.useBlockProps.save({role:"tab",tabIndex:"0",tabid:a}),s=i.useInnerBlocksProps.save({tabid:a,className:"wp-block-cloudcatch-tab-content"});return(0,c.createElement)(c.Fragment,null,(0,c.createElement)("div",{...r},(0,c.createElement)("label",{className:"wp-block-cloudcatch-tab__label"},null!=l?l:(0,e.__)("Title","simple-tabs-block")),n&&o.length>0&&(0,c.createElement)("div",{"aria-label":"Description",className:"wp-block-cloudcatch-tab__description"},o)),(0,c.createElement)("div",{...s}))},deprecated:s,example:{name:"cloudcatch/tab",attributes:{id:"500",index:0,label:(0,e.__)("Tab 1","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 2 /* translators: example text. */ 3 content:(0,e.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.","simple-tabs-block")}}]}})})()})(); -
simple-tabs-block/trunk/build/tabs/block.json
r2811130 r2930254 1 1 { 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tabs", 5 "version": "1.3.0", 6 "title": "Tabs", 7 "category": "design", 8 "keywords": ["tab", "tabs"], 9 "attributes": { 10 "uuid": { 11 "type": "string" 12 }, 13 "tabs": { 14 "type": "array", 15 "default": [] 16 }, 17 "defaultTab": { 18 "type": "number", 19 "default": 0 20 }, 21 "activeTab": { 22 "type": "string", 23 "default": "" 24 } 25 }, 26 "providesContext": { 27 "cloudcatch/tabs/activeTab": "activeTab" 28 }, 29 "description": "Tabbed layout", 30 "supports": { 31 "align": ["wide", "full"], 32 "anchor": true, 33 "html": false, 34 "inserter": true, 35 "typography": { 36 "fontSize": true, 37 "lineHeight": true, 38 "__experimentalFontStyle": true, 39 "__experimentalFontWeight": true, 40 "__experimentalTextTransform": true, 41 "__experimentalFontFamily": true, 42 "__experimentalDefaultControls": { 43 "fontSize": true 44 } 45 }, 46 "spacing": { 47 "blockGap": true, 48 "units": ["px", "em", "rem", "vh", "vw"], 49 "__experimentalDefaultControls": { 50 "blockGap": true 51 } 52 }, 53 "__experimentalLayout": { 54 "allowSwitching": false, 55 "allowInheriting": false, 56 "default": { 57 "type": "flex" 58 } 59 } 60 }, 61 "textdomain": "simple-tabs-block", 62 "editorScript": "file:./index.js", 63 "editorStyle": "file:./index.css", 64 "style": "file:./style-index.css", 65 "viewScript": "file:./view.js" 2 "$schema": "https://schemas.wp.org/trunk/block.json", 3 "apiVersion": 2, 4 "name": "cloudcatch/tabs", 5 "version": "2.0.0", 6 "title": "Tabs", 7 "category": "design", 8 "keywords": [ 9 "tab", 10 "tabs" 11 ], 12 "description": "Create rich tabbed layouts to organize information in a simple way.", 13 "attributes": { 14 "uuid": { 15 "type": "string" 16 }, 17 "tabs": { 18 "type": "array", 19 "default": [] 20 }, 21 "defaultTab": { 22 "type": "number", 23 "default": 0 24 }, 25 "activeTab": { 26 "type": "string", 27 "default": "" 28 } 29 }, 30 "providesContext": { 31 "cloudcatch/tabs/activeTab": "activeTab", 32 "cloudcatch/tabs/defaultTab": "defaultTab" 33 }, 34 "supports": { 35 "align": [ 36 "wide", 37 "full" 38 ], 39 "anchor": true, 40 "html": false, 41 "inserter": true, 42 "typography": { 43 "fontSize": true, 44 "lineHeight": true, 45 "__experimentalFontStyle": true, 46 "__experimentalFontWeight": true, 47 "__experimentalTextTransform": true, 48 "__experimentalFontFamily": true, 49 "__experimentalDefaultControls": { 50 "fontSize": true 51 } 52 }, 53 "spacing": { 54 "blockGap": true, 55 "units": [ 56 "px", 57 "em", 58 "rem", 59 "vh", 60 "vw" 61 ], 62 "__experimentalDefaultControls": { 63 "blockGap": true 64 } 65 }, 66 "__experimentalLayout": { 67 "allowSwitching": false, 68 "allowInheriting": false, 69 "default": { 70 "type": "flex" 71 } 72 } 73 }, 74 "textdomain": "simple-tabs-block", 75 "editorScript": "file:./index.js", 76 "editorStyle": "file:./index.css", 77 "style": "file:./style-index.css", 78 "viewScript": "file:./view.js" 66 79 } -
simple-tabs-block/trunk/build/tabs/index.asset.php
r2811130 r2930254 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp- core-data', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '85ff3de4c073b9930ac511e6cc039108');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '20a4ce5520c18749c4a5'); -
simple-tabs-block/trunk/build/tabs/index.css
r2811130 r2930254 1 . editor-styles-wrapper :root{--cloudcatch-tabs-row-gap:var(--wp--style--block-gap,2em);--cloudcatch-tabs-column-gap:var(--wp--style--block-gap,2em)}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper{align-items:normal;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;flex-direction:column;justify-content:normal;row-gap:0}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;row-gap:var(--cloudcatch-tabs-row-gap)}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label{cursor:pointer;font-weight:inherit}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label.active{font-weight:700}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container{flex:1}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{display:none;margin:0}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-right .wp-block-cloudcatch-tabs__tabs{justify-content:flex-end}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{justify-content:space-between}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-left .wp-block-cloudcatch-tabs__tabs{justify-content:flex-start}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-center .wp-block-cloudcatch-tabs__tabs{justify-content:center}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical{flex-direction:row}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__tabs{align-items:normal;flex-direction:column}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-right .wp-block-cloudcatch-tabs__tabs{align-items:flex-end}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{align-items:center}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-left .wp-block-cloudcatch-tabs__tabs{align-items:flex-start}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-center .wp-block-cloudcatch-tabs__tabs{align-items:center}.editor-styles-wrapper .wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__container{flex-direction:column}.editor-styles-wrapper .wp-block-cloudcatch-tabs .wp-block-cloudcatch-tabs__tabs .block-editor-button-block-appender{width:36px}1 .wp-block-cloudcatch-tabs__container>.block-list-appender{margin:0!important;order:0;position:static}.wp-block-cloudcatch-tabs__container>.block-list-appender .block-editor-button-block-appender{width:auto} -
simple-tabs-block/trunk/build/tabs/index.js
r2738796 r2930254 1 !function(){var t,e={129:function(t,e,n){"use strict";var r=window.wp.element,o=window.wp.blocks,c=n(184),a=n.n(c),i=n(913),l=n.n(i);let s=t=>crypto.getRandomValues(new Uint8Array(t));var u=window.wp.i18n,p=window.wp.blockEditor,f=window.wp.components,d=window.wp.data,b=window.wp.compose;window.wp.coreData;const v=["cloudcatch/tab"],h={name:"cloudcatch/tab"},m={type:"default",alignments:[]};function w(t){const{orientation:e}=t,n=(0,p.useInnerBlocksProps)({className:"wp-block-cloudcatch-tabs__container"},{allowedBlocks:v,__experimentalDefaultBlock:h,__experimentalDirectInsert:!0,orientation:e,template:[["cloudcatch/tab"],["cloudcatch/tab"],["cloudcatch/tab"]],templateLock:!1,__experimentalLayout:m});return(0,r.createElement)("div",n)}var k=(0,b.compose)((0,d.withSelect)(((t,e)=>{let{clientId:n}=e;return{innerBlocks:t("core/block-editor").getBlocks(n)}})),(0,d.withDispatch)(((t,e,n)=>{let{clientId:r}=e,{select:o}=n;const{getBlock:c}=o("core/block-editor"),{updateBlockAttributes:a,moveBlockToPosition:i}=t("core/block-editor"),s=c(r),{selectBlock:u}=t(p.store);return{selectBlock(t){u(t)},resetTabOrder(){let t=[];l()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{index:e}),t.push({clientId:s.innerBlocks[e].clientId,attributes:s.innerBlocks[e].attributes})})),a(r,{tabs:t})},updateActiveTab(t){a(s.clientId,{activeTab:t}),l()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{activeTab:t})})),u(t)},moveTab(t,e){i(t,r,r,parseInt(e))}}})))((function(t){let{attributes:e,setAttributes:n,className:o,innerBlocks:c,clientId:i,updateActiveTab:l,selectBlock:b,resetTabOrder:v}=t;const h=((t,e=21)=>((t,e,n)=>{let r=(2<<Math.log(t.length-1)/Math.LN2)-1,o=-~(1.6*r*e/t.length);return(c=e)=>{let a="";for(;;){let e=n(o),i=o;for(;i--;)if(a+=t[e[i]&r]||"",a.length===c)return a}}})(t,e,s))("1234567890abcdef",10),{uuid:m=h(),activeTab:k,defaultTab:g,tabs:_,layout:{justifyContent:y,orientation:x="horizontal",flexWrap:j="wrap"}={}}=e,{updateBlockAttributes:B}=(0,d.useDispatch)(p.store);(0,r.useEffect)((()=>{v()}),[c]);const E=(0,r.useRef)(),O=(0,p.useBlockProps)({ref:E,className:a()(o,"wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===y,"items-justified-space-between":"space-between"===y,"items-justified-left":"left"===y,"items-justified-center":"center"===y,"is-vertical":"vertical"===x,"no-wrap":"nowrap"===j})});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(p.InspectorControls,null,(0,r.createElement)(f.PanelBody,null,(0,r.createElement)(f.SelectControl,{label:(0,u.__)("Default open tab"),value:g,options:_.map(((t,e)=>({value:e,label:t.attributes.label}))),onChange:t=>n({defaultTab:parseInt(t)})}))),(0,r.createElement)("div",O,(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs-wrapper"},(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs",role:"tablist","aria-orientation":x},_.map(((t,e)=>{var n,o,c,i,s;return(0,r.createElement)("div",{key:e},(0,r.createElement)("label",{className:a()("wp-block-cloudcatch-tab__label",null==t||null===(n=t.attributes)||void 0===n?void 0:n.className,{active:k===t.clientId}),role:"tab",tabid:e,tabIndex:"0",onFocus:e=>{return n=t.clientId,void l(n);var n}},null!==(o=null==t||null===(c=t.attributes)||void 0===c?void 0:c.label)&&void 0!==o?o:(0,u.__)("Title")),(null==t||null===(i=t.attributes)||void 0===i?void 0:i.showDescription)&&(0,r.createElement)(p.RichText,{"aria-label":(0,u.__)("Description"),placeholder:(0,u.__)("Add text…"),value:null==t||null===(s=t.attributes)||void 0===s?void 0:s.description,onChange:e=>{B(t.clientId,{description:e})},identifier:"div",className:"wp-block-cloudcatch-tab__description"}))})),(0,r.createElement)(p.InnerBlocks.ButtonBlockAppender,null))),(0,r.createElement)(w,{orientation:x})))}));(0,o.registerBlockType)("cloudcatch/tabs",{edit:k,icon:(0,r.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 310.9 237.6"},(0,r.createElement)("path",{d:"M273.4 64.4h-17.8c1.6-4.1 2.4-8.6 2.4-13.3V37.5C258 16.8 241.2 0 220.5 0h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6h-27.7c-9.6 0-18.4 3.6-25 9.6-6.6-6-15.4-9.6-25-9.6H37.5C16.8 0 0 16.8 0 37.5v13.6c0 9.8 3.8 18.7 9.9 25.4C3.8 83.2 0 92.1 0 101.9v98.2c0 20.7 16.8 37.5 37.5 37.5h235.9c20.7 0 37.5-16.8 37.5-37.5v-98.2c0-20.7-16.9-37.5-37.5-37.5zM192.8 25h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.7-12.5 12.5-12.5zm-77.6 0h27.7c6.9 0 12.5 5.6 12.5 12.5v13.6c0 6.9-5.6 12.5-12.5 12.5h-27.7c-6.9 0-12.5-5.6-12.5-12.5V37.5c0-6.9 5.6-12.5 12.5-12.5zm170.7 175.1c0 6.9-5.6 12.5-12.5 12.5H37.5c-6.9 0-12.5-5.6-12.5-12.5v-98.2c0-6.9 5.6-12.5 12.5-12.5h235.9c6.9 0 12.5 5.6 12.5 12.5v98.2z"})),save:function(t){let{attributes:e}=t;const{uuid:n,tabs:o,defaultTab:c,layout:{justifyContent:i,orientation:l="horizontal",flexWrap:s="wrap"}={}}=e,f=a()("wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===i,"items-justified-space-between":"space-between"===i,"items-justified-left":"left"===i,"items-justified-center":"center"===i,"is-vertical":"vertical"===l,"no-wrap":"nowrap"===s});return(0,r.createElement)("div",p.useBlockProps.save({className:f}),(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs-wrapper"},(0,r.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs",role:"tablist","aria-orientation":l},o.map(((t,e)=>{var n,o,i,l,s,f;return(0,r.createElement)("div",{key:e},(0,r.createElement)(p.RichText.Content,{value:null!==(n=null==t||null===(o=t.attributes)||void 0===o?void 0:o.label)&&void 0!==n?n:(0,u.__)("Title"),tagName:"label",tabIndex:"0",role:"tab",key:e,tabid:e,className:a()("wp-block-cloudcatch-tab__label",null==t||null===(i=t.attributes)||void 0===i?void 0:i.className,{active:e===c})}),(null==t||null===(l=t.attributes)||void 0===l?void 0:l.showDescription)&&(0,r.createElement)(p.RichText.Content,{value:null!==(s=null==t||null===(f=t.attributes)||void 0===f?void 0:f.description)&&void 0!==s?s:(0,u.__)("Description"),tagName:"div",className:"wp-block-cloudcatch-tab__description"}))})))),(0,r.createElement)("div",p.useInnerBlocksProps.save({className:"wp-block-cloudcatch-tabs__container"})))}})},184:function(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var c=typeof n;if("string"===c||"number"===c)t.push(n);else if(Array.isArray(n)){if(n.length){var a=o.apply(null,n);a&&t.push(a)}}else if("object"===c)if(n.toString===Object.prototype.toString)for(var i in n)r.call(n,i)&&n[i]&&t.push(i);else t.push(n.toString())}}return t.join(" ")}t.exports?(o.default=o,t.exports=o):void 0===(n=function(){return o}.apply(e,[]))||(t.exports=n)}()},705:function(t,e,n){var r=n(639).Symbol;t.exports=r},239:function(t,e,n){var r=n(705),o=n(607),c=n(333),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?o(t):c(t)}},545:function(t){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},561:function(t,e,n){var r=n(990),o=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(o,""):t}},290:function(t,e,n){var r=n(557);t.exports=function(t){return"function"==typeof t?t:r}},957:function(t,e,n){var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},607:function(t,e,n){var r=n(705),o=Object.prototype,c=o.hasOwnProperty,a=o.toString,i=r?r.toStringTag:void 0;t.exports=function(t){var e=c.call(t,i),n=t[i];try{t[i]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[i]=n:delete t[i]),o}},333:function(t){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},639:function(t,e,n){var r=n(957),o="object"==typeof self&&self&&self.Object===Object&&self,c=r||o||Function("return this")();t.exports=c},990:function(t){var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},557:function(t){t.exports=function(t){return t}},218:function(t){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},5:function(t){t.exports=function(t){return null!=t&&"object"==typeof t}},448:function(t,e,n){var r=n(239),o=n(5);t.exports=function(t){return"symbol"==typeof t||o(t)&&"[object Symbol]"==r(t)}},913:function(t,e,n){var r=n(545),o=n(290),c=n(554),a=4294967295,i=Math.min;t.exports=function(t,e){if((t=c(t))<1||t>9007199254740991)return[];var n=a,l=i(t,a);e=o(e),t-=a;for(var s=r(l,e);++n<t;)e(n);return s}},601:function(t,e,n){var r=n(841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},554:function(t,e,n){var r=n(601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},841:function(t,e,n){var r=n(561),o=n(218),c=n(448),a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(c(t))return NaN;if(o(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=o(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=i.test(t);return n||l.test(t)?s(t.slice(2),n?2:8):a.test(t)?NaN:+t}}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var c=n[t]={exports:{}};return e[t](c,c.exports,r),c.exports}r.m=e,t=[],r.O=function(e,n,o,c){if(!n){var a=1/0;for(u=0;u<t.length;u++){n=t[u][0],o=t[u][1],c=t[u][2];for(var i=!0,l=0;l<n.length;l++)(!1&c||a>=c)&&Object.keys(r.O).every((function(t){return r.O[t](n[l])}))?n.splice(l--,1):(i=!1,c<a&&(a=c));if(i){t.splice(u--,1);var s=o();void 0!==s&&(e=s)}}return e}c=c||0;for(var u=t.length;u>0&&t[u-1][2]>c;u--)t[u]=t[u-1];t[u]=[n,o,c]},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t={68:0,370:0};r.O.j=function(e){return 0===t[e]};var e=function(e,n){var o,c,a=n[0],i=n[1],l=n[2],s=0;if(a.some((function(e){return 0!==t[e]}))){for(o in i)r.o(i,o)&&(r.m[o]=i[o]);if(l)var u=l(r)}for(e&&e(n);s<a.length;s++)c=a[s],r.o(t,c)&&t[c]&&t[c][0](),t[c]=0;return r.O(u)},n=self.webpackChunksimple_tabs_block=self.webpackChunksimple_tabs_block||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))}();var o=r.O(void 0,[370],(function(){return r(129)}));o=r.O(o)}(); 1 (()=>{var e,t={461:(e,t,r)=>{"use strict";const a=window.wp.i18n,o=window.wp.blocks,n=window.wp.element;var c=r(184),i=r.n(c),l=r(913),s=r.n(l);const u=window.wp.blockEditor,p=window.wp.components,b=window.wp.data,d=window.wp.compose,f=["cloudcatch/tab"],v={name:"cloudcatch/tab"},m=(0,d.compose)((0,b.withSelect)(((e,{clientId:t})=>({innerBlocks:e("core/block-editor").getBlocks(t)}))),(0,b.withDispatch)(((e,{clientId:t},{select:r})=>{const{getBlock:a}=r("core/block-editor"),{updateBlockAttributes:o}=e("core/block-editor"),n=a(t),{selectBlock:c}=e(u.store);return{selectBlock(e){c(e)},resetTabOrder(){const e=[];s()(n.innerBlocks.length,(t=>{o(n.innerBlocks[t].clientId,{index:t}),e.push(n.innerBlocks[t].attributes.id)})),o(t,{tabs:e})},updateActiveTab(e){o(n.clientId,{activeTab:e})}}})))((function({attributes:e,setAttributes:t,innerBlocks:r,clientId:o,updateActiveTab:c,resetTabOrder:l}){const{defaultTab:s,activeTab:d,layout:{justifyContent:m,orientation:h="horizontal",flexWrap:w="wrap"}={}}=e;(0,n.useEffect)((()=>{l()}),[r]);const{getSelectedBlock:g}=(0,b.select)(u.store),{innerBlockCount:k,selectedBlock:y,innerBlockIds:_}=(0,b.useSelect)((e=>({innerBlockCount:e(u.store).getBlock(o)?.innerBlocks?.length,selectedBlock:g(),innerBlockIds:e(u.store).getBlock(o)?.innerBlocks.map((e=>e.attributes.id)).filter((e=>void 0!==e))})),[o]);(0,n.useEffect)((()=>{!d&&_.length&&(console.log(_),c(_[0]))}),[_]),(0,n.useEffect)((()=>{y&&_.includes(y?.attributes?.id)&&c(y.attributes.id)}),[y]);const x=(0,u.useBlockProps)({className:i()("wp-block-cloudcatch-tabs__wrapper","wp-block-cloudcatch-tabs-v2"),"data-default-tab":s||void 0}),B=(0,u.useInnerBlocksProps)({className:i()("wp-block-cloudcatch-tabs__container",{"items-justified-right":"right"===m,"items-justified-space-between":"space-between"===m,"items-justified-left":"left"===m,"items-justified-center":"center"===m,"is-vertical":"vertical"===h,"no-wrap":"nowrap"===w}),style:{gridTemplateColumns:"vertical"!==h?`repeat(${k}, auto) ${"left"===m?"1fr":"auto"}`:void 0,gridTemplateRows:"vertical"===h?`repeat(${k}, auto) 1fr`:void 0}},{renderAppender:u.InnerBlocks.ButtonBlockAppender,allowedBlocks:f,__experimentalDefaultBlock:v,__experimentalDirectInsert:!0,templateLock:!1,template:[["cloudcatch/tab",{label:"Tab 1"},[["core/paragraph",{content:"Tab 1 Content"}]]],["cloudcatch/tab",{label:"Tab 2"},[["core/paragraph",{content:"Tab 2 Content"}]]],["cloudcatch/tab",{label:"Tab 3"},[["core/paragraph",{content:"Tab 3 Content"}]]]]});return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(u.InspectorControls,null,(0,n.createElement)(p.PanelBody,null,(0,n.createElement)(p.SelectControl,{label:(0,a.__)("Default open tab","simple-tabs-block"),value:s,options:r.map(((e,t)=>({value:t,label:e.attributes.label}))),onChange:e=>t({defaultTab:parseInt(e)})}))),(0,n.createElement)("div",{...x},(0,n.createElement)("div",{...B})))})),h=[{attributes:{uuid:{type:"string"},tabs:{type:"array",default:[]},defaultTab:{type:"number",default:0},activeTab:{type:"string",default:""}},save({attributes:e}){const{uuid:t,tabs:r,defaultTab:o,layout:{justifyContent:c,orientation:l="horizontal",flexWrap:s="wrap"}={}}=e,p=i()("wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===c,"items-justified-space-between":"space-between"===c,"items-justified-left":"left"===c,"items-justified-center":"center"===c,"is-vertical":"vertical"===l,"no-wrap":"nowrap"===s});return(0,n.createElement)("div",{...u.useBlockProps.save({className:p})},(0,n.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs-wrapper"},(0,n.createElement)("div",{className:"wp-block-cloudcatch-tabs__tabs",role:"tablist","aria-orientation":l},r.map(((e,t)=>{var r,c;return(0,n.createElement)("div",{key:t},(0,n.createElement)(u.RichText.Content,{value:null!==(r=e?.attributes?.label)&&void 0!==r?r:(0,a.__)("Title"),tagName:"label",tabIndex:"0",role:"tab",key:t,tabid:t,className:i()("wp-block-cloudcatch-tab__label",e?.attributes?.className,{active:t===o})}),e?.attributes?.showDescription&&(0,n.createElement)(u.RichText.Content,{value:null!==(c=e?.attributes?.description)&&void 0!==c?c:(0,a.__)("Description"),tagName:"div",className:"wp-block-cloudcatch-tab__description"}))})))),(0,n.createElement)("div",{...u.useInnerBlocksProps.save({className:"wp-block-cloudcatch-tabs__container"})}))}}];(0,o.registerBlockType)("cloudcatch/tabs",{edit:m,icon:()=>(0,n.createElement)(p.Icon,{icon:()=>(0,n.createElement)(p.SVG,{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},(0,n.createElement)(p.Path,{d:"M19.1 7.8h-7.5v-.7c0-1-.8-1.8-1.8-1.8h-5c-1 0-1.8.8-1.8 1.8v11.6c0 1 .8 1.8 1.8 1.8h14.3c1 0 1.8-.8 1.8-1.8V9.5c0-.9-.8-1.7-1.8-1.7zm.3 10.9c0 .1-.1.3-.3.3H4.9c-.1 0-.3-.1-.3-.3V7.1c0-.1.1-.3.3-.3h5c.1 0 .3.1.3.3V9.2h9.1c.1 0 .3.1.3.3v9.2z"}),(0,n.createElement)(p.Path,{d:"M16.8 13.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8zM16.8 16.6H7.2c-.4 0-.7-.3-.7-.8 0-.4.3-.7.7-.7h9.5c.4 0 .8.3.8.7 0 .5-.3.8-.7.8zM15.1 6.9h-2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7h2c.4 0 .8.3.8.7-.1.3-.4.7-.8.7zM19.2 6.9h-2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7h2c.4 0 .8.3.8.7-.1.3-.4.7-.8.7z"}))}),save:function({attributes:e}){const{tabs:t,defaultTab:r,layout:{justifyContent:a,orientation:o="horizontal",flexWrap:c="wrap"}={}}=e,l=t.length,s=u.useBlockProps.save({className:i()("wp-block-cloudcatch-tabs__wrapper","wp-block-cloudcatch-tabs-v2"),"data-default-tab":r||void 0}),p=u.useInnerBlocksProps.save({className:i()("wp-block-cloudcatch-tabs__container",{"items-justified-right":"right"===a,"items-justified-space-between":"space-between"===a,"items-justified-left":"left"===a,"items-justified-center":"center"===a,"is-vertical":"vertical"===o,"no-wrap":"nowrap"===c}),style:{gridTemplateColumns:"vertical"!==o?`repeat(${l}, auto) ${"left"===a?"1fr":"auto"}`:void 0,gridTemplateRows:"vertical"===o?`repeat(${l}, auto) 1fr`:void 0}});return(0,n.createElement)("div",{...s},(0,n.createElement)("div",{...p}))},deprecated:h,example:{attributes:{tabs:["500","501","502"]},innerBlocks:[{name:"cloudcatch/tab",attributes:{id:"500",index:0,label:(0,a.__)("Tab 1","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 2 /* translators: example text. */ 3 content:(0,a.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.","simple-tabs-block")}}]},{name:"cloudcatch/tab",attributes:{id:"501",index:1,label:(0,a.__)("Tab 2","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 4 /* translators: example text. */ 5 content:(0,a.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}}]},{name:"cloudcatch/tab",attributes:{id:"502",index:2,label:(0,a.__)("Tab 3","simple-tabs-block")},innerBlocks:[{name:"core/paragraph",attributes:{ 6 /* translators: example text. */ 7 content:(0,a.__)("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent et eros eu felis.")}}]}]}})},184:(e,t)=>{var r;!function(){"use strict";var a={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var n=typeof r;if("string"===n||"number"===n)e.push(r);else if(Array.isArray(r)){if(r.length){var c=o.apply(null,r);c&&e.push(c)}}else if("object"===n){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var i in r)a.call(r,i)&&r[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},705:(e,t,r)=>{var a=r(639).Symbol;e.exports=a},239:(e,t,r)=>{var a=r(705),o=r(607),n=r(333),c=a?a.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?o(e):n(e)}},545:e=>{e.exports=function(e,t){for(var r=-1,a=Array(e);++r<e;)a[r]=t(r);return a}},561:(e,t,r)=>{var a=r(990),o=/^\s+/;e.exports=function(e){return e?e.slice(0,a(e)+1).replace(o,""):e}},290:(e,t,r)=>{var a=r(557);e.exports=function(e){return"function"==typeof e?e:a}},957:(e,t,r)=>{var a="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=a},607:(e,t,r)=>{var a=r(705),o=Object.prototype,n=o.hasOwnProperty,c=o.toString,i=a?a.toStringTag:void 0;e.exports=function(e){var t=n.call(e,i),r=e[i];try{e[i]=void 0;var a=!0}catch(e){}var o=c.call(e);return a&&(t?e[i]=r:delete e[i]),o}},333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:(e,t,r)=>{var a=r(957),o="object"==typeof self&&self&&self.Object===Object&&self,n=a||o||Function("return this")();e.exports=n},990:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},557:e=>{e.exports=function(e){return e}},218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},448:(e,t,r)=>{var a=r(239),o=r(5);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==a(e)}},913:(e,t,r)=>{var a=r(545),o=r(290),n=r(554),c=4294967295,i=Math.min;e.exports=function(e,t){if((e=n(e))<1||e>9007199254740991)return[];var r=c,l=i(e,c);t=o(t),e-=c;for(var s=a(l,t);++r<e;)t(r);return s}},601:(e,t,r)=>{var a=r(841);e.exports=function(e){return e?Infinity===(e=a(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},554:(e,t,r)=>{var a=r(601);e.exports=function(e){var t=a(e),r=t%1;return t==t?r?t-r:t:0}},841:(e,t,r)=>{var a=r(561),o=r(218),n=r(448),c=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,l=/^0o[0-7]+$/i,s=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(n(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=a(e);var r=i.test(e);return r||l.test(e)?s(e.slice(2),r?2:8):c.test(e)?NaN:+e}}},r={};function a(e){var o=r[e];if(void 0!==o)return o.exports;var n=r[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.m=t,e=[],a.O=(t,r,o,n)=>{if(!r){var c=1/0;for(u=0;u<e.length;u++){for(var[r,o,n]=e[u],i=!0,l=0;l<r.length;l++)(!1&n||c>=n)&&Object.keys(a.O).every((e=>a.O[e](r[l])))?r.splice(l--,1):(i=!1,n<c&&(c=n));if(i){e.splice(u--,1);var s=o();void 0!==s&&(t=s)}}return t}n=n||0;for(var u=e.length;u>0&&e[u-1][2]>n;u--)e[u]=e[u-1];e[u]=[r,o,n]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={68:0,370:0};a.O.j=t=>0===e[t];var t=(t,r)=>{var o,n,[c,i,l]=r,s=0;if(c.some((t=>0!==e[t]))){for(o in i)a.o(i,o)&&(a.m[o]=i[o]);if(l)var u=l(a)}for(t&&t(r);s<c.length;s++)n=c[s],a.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return a.O(u)},r=globalThis.webpackChunksimple_tabs_block=globalThis.webpackChunksimple_tabs_block||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})();var o=a.O(void 0,[370],(()=>a(461)));o=a.O(o)})(); -
simple-tabs-block/trunk/build/tabs/style-index.css
r2811130 r2930254 1 :root{--cloudcatch-tabs-row-gap:var(--wp--style--block-gap,2em);--cloudcatch-tabs-column-gap:var(--wp--style--block-gap,2em)}.wp-block-cloudcatch-tabs .wp-block-cloudcatch-tabs__wrapper{align-items:normal;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;flex-direction:column;justify-content:normal;row-gap:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;row-gap:var(--cloudcatch-tabs-row-gap)}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label{cursor:pointer;font-weight:inherit}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label.active{font-weight:700}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container{flex:1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{display:none;margin:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-right .wp-block-cloudcatch-tabs__tabs{justify-content:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{justify-content:space-between}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-left .wp-block-cloudcatch-tabs__tabs{justify-content:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.items-justified-center .wp-block-cloudcatch-tabs__tabs{justify-content:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical{flex-direction:row}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__tabs{align-items:normal;flex-direction:column}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-right .wp-block-cloudcatch-tabs__tabs{align-items:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-left .wp-block-cloudcatch-tabs__tabs{align-items:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical.items-justified-center .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper.is-vertical .wp-block-cloudcatch-tabs__container{flex-direction:column}1 :root{--cloudcatch-tabs-row-gap:var(--wp--style--block-gap,2em);--cloudcatch-tabs-column-gap:var(--wp--style--block-gap,2em)}.wp-block-cloudcatch-tabs__container{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:grid;flex:1;justify-content:flex-start;row-gap:0!important}body .wp-block-cloudcatch-tabs__container.is-layout-flex{display:grid}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{order:-1}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab-content{display:none;grid-column:1/-1;margin:0;order:1}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab-content.active{display:block}.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab.active label,.wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab__label.active{font-weight:700}.wp-block-cloudcatch-tabs__container.is-vertical{grid-auto-flow:column;grid-template-columns:min-content auto}.wp-block-cloudcatch-tabs__container.is-vertical .wp-block-cloudcatch-tab-content{grid-column:2/2;grid-row:1/-1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2){align-items:normal;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;flex-direction:column;justify-content:normal;row-gap:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__tabs{align-items:center;-moz-column-gap:var(--cloudcatch-tabs-column-gap);column-gap:var(--cloudcatch-tabs-column-gap);display:flex;row-gap:var(--cloudcatch-tabs-row-gap)}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label{cursor:pointer;font-weight:inherit}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__tabs .wp-block-cloudcatch-tab__label.active{font-weight:700}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tab{grid-column:1/-1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__container{display:grid;flex:1}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab{display:none;margin:0}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2) .wp-block-cloudcatch-tabs__container .wp-block-cloudcatch-tab.active{display:block}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-right .wp-block-cloudcatch-tabs__tabs{justify-content:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-space-between .wp-block-cloudcatch-tabs__tabs{justify-content:space-between}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-left .wp-block-cloudcatch-tabs__tabs{justify-content:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).items-justified-center .wp-block-cloudcatch-tabs__tabs{justify-content:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical{flex-direction:row}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical .wp-block-cloudcatch-tabs__tabs{align-items:normal;flex-direction:column}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-right .wp-block-cloudcatch-tabs__tabs{align-items:flex-end}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-space-between .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-left .wp-block-cloudcatch-tabs__tabs{align-items:flex-start}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical.items-justified-center .wp-block-cloudcatch-tabs__tabs{align-items:center}.wp-block-cloudcatch-tabs.wp-block-cloudcatch-tabs__wrapper:not(.wp-block-cloudcatch-tabs-v2).is-vertical .wp-block-cloudcatch-tabs__container{flex-direction:column} -
simple-tabs-block/trunk/build/tabs/view.asset.php
r2811130 r2930254 1 <?php return array('dependencies' => array(), 'version' => ' 6689f175c67c7b65bd005eb5511c97fb');1 <?php return array('dependencies' => array(), 'version' => '741db60816f4a93d7df1'); -
simple-tabs-block/trunk/build/tabs/view.js
r2811130 r2930254 1 document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".wp-block-cloudcatch-tabs").forEach(( e=>{(e=>{const t=e.querySelector(".wp-block-cloudcatch-tabs__container"),c=e.querySelector(".wp-block-cloudcatch-tabs__tabs"),a=c.querySelectorAll('[role="tab"]'),o={37:-1,38:-1,39:1,40:1};let r=0;const n=e=>{t.querySelectorAll(":scope > *").forEach((e=>{e.style.display="none"})),a.forEach((e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false")})),r=parseInt(e);const o=c.querySelector('[tabid="'+r+'"]');o.classList.add("active"),o.setAttribute("aria-selected","true"),t.querySelector('[tabid="'+r+'"]').style.display="block";const n=new Event("tabChanged");window.dispatchEvent(n)},s=e=>{var t=e.keyCode,n=!1;"vertical"==c.getAttribute("aria-orientation")?38!==t&&40!==t||(e.preventDefault(),n=!0):37!==t&&39!==t||(n=!0),n&&function(e){for(var t=e.keyCode,c=0;c<a.length;c++)a[c].addEventListener("focus",i);if(o[t]){var n=r+o[t];void 0!==a[n]?a[n].focus():37===t||38===t?a[a.length-1].focus():39!==t&&40!=t||a[0].focus()}}(e)};function i(e){var t=e.target;setTimeout(d,0,t)}function d(e){e===document.activeElement&&n(e.getAttribute("tabid"))}a.forEach((e=>{e.classList.contains("active")&&(r=e.getAttribute("tabid"))})),n(r),a.forEach((e=>{e.addEventListener("click",(t=>{n(e.getAttribute("tabid"))})),e.addEventListener("keydown",(e=>{switch(e.keyCode){case 38:case 40:s(e)}})),e.addEventListener("keyup",(e=>{switch(e.keyCode){case 37:case 39:s(e)}}))}))})(e)}))}));1 document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll(".wp-block-cloudcatch-tabs").forEach((t=>{(t=>{const e=t.querySelectorAll('[role="tab"]');for(let t=0;t<e.length;t++)e[t].addEventListener("focus",n);const a={37:-1,38:-1,39:1,40:1};let c=0;const o=a=>{t.querySelectorAll('div[tabid]:not([role="tab"])').forEach((t=>{t.style.display="none",t.classList.remove("active")})),e.forEach((t=>{t.classList.remove("active"),t.setAttribute("aria-selected","false")})),c=parseInt(a);const o=t.querySelector('[role="tab"][tabid="'+c+'"]');o.classList.add("active"),o.setAttribute("aria-selected","true"),t.querySelector('div[tabid="'+c+'"]:not([role="tab"])').style.display="block",t.querySelector('div[tabid="'+c+'"]:not([role="tab"])').classList.add("active");const s=new CustomEvent("tabChanged",{detail:o});window.dispatchEvent(s)},s=o=>{const s=o.keyCode;let n=!1;t.classList.contains("is-vertical")?38!==s&&40!==s||(o.preventDefault(),n=!0):37!==s&&39!==s||(n=!0),n&&function(t){const o=t.keyCode;if(a[o]){const t=c+a[o];void 0!==e[t]?e[t].focus():37===o||38===o?e[e.length-1].focus():39!==o&&40!=o||e[0].focus()}}(o)};function n(t){const e=t.target;setTimeout(i,0,e)}function i(t){t===document.activeElement&&o(t.getAttribute("tabid"))}c=t.getAttribute("data-default-tab")||0,o(c),e.forEach((t=>{t.addEventListener("click",(()=>{o(t.getAttribute("tabid"))})),t.addEventListener("keydown",(t=>{switch(t.keyCode){case 38:case 40:s(t)}})),t.addEventListener("keyup",(t=>{switch(t.keyCode){case 37:case 39:s(t)}}))}))})(t)}))})); -
simple-tabs-block/trunk/readme.txt
r2929703 r2930254 5 5 Tested up to: 6.2.2 6 6 Requires PHP: 7.0 7 Stable tag: 1.3.07 Stable tag: 2.0.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 19 19 Supports horizontal and vertical tabs. 20 20 21 == Features == 22 * Tabs customizable using the native block editor style controls 23 * Fully accessible including keyboard controls 24 * Supports horizontal and vertical tabs 25 * Set default open tab 26 27 == Changelog == 28 29 = 2.0.0 = 30 31 * **BREAKING CHANGE**: Refactor tabs block for updated block controls 32 * Feat: Add CSS classes to active tabs 33 * Feat: Allow block styling through the native block editor styles panel 34 35 = 1.3.0 = 36 37 * Feat: Update block styles 38 * Docs: Compatibility with 6.1 39 40 = 1.2.1 = 41 42 * Fix: Various block fixes 43 44 = 1.2.0 = 45 46 * Feat: Trigger event on window when tab is changed 47 48 = 1.1.1 = 49 50 * Fix: `label` undefined error 51 52 = 1.1.0 = 53 54 * Fix: Accessibility features 55 * Fix: Allow CSS classes on tabs 56 * Feat: Added tab description field 57 58 = 1.0.0 = 59 60 * Initial release 61 62 == Upgrade Notice == 63 64 = 2.0.0 = 65 **BREAKING CHANGE**: Upgrading from version 1.x to 2.x could break any custom CSS applied to the tabs. It is highly recommended to test the upgrade on a staging environment before upgrading on a production site. 66 67 21 68 == Installation == 22 69 23 70 1. Upload the plugin files to the `/wp-content/plugins/simple-tabs-block` directory, or install the plugin through the WordPress plugins screen directly. 24 71 1. Activate the plugin through the 'Plugins' screen in WordPress 72 73 == Screenshots == 74 75 1. Block editor 76 2. Tab styles panel 77 3. Frontend view -
simple-tabs-block/trunk/simple-tabs-block.php
r2811130 r2930254 2 2 /** 3 3 * Plugin Name: Simple Tabs Block 4 * Description: Block to create a tabbed layout.4 * Description: Create rich tabbed layouts to organize information in a simple way using Simple Tabs Block 5 5 * Requires at least: 5.9 6 6 * Requires PHP: 7.0 7 * Version: 1.3.08 * Author: CloudCatch 7 * Version: 2.0.0 8 * Author: CloudCatch LLC 9 9 * Author URI: https://cloudcatch.io 10 10 * Contributors: cloudcatch, dkjensen … … 13 13 * Text Domain: simple-tabs-block 14 14 * 15 * @package create-block15 * @package CloudCatch\SimpleTabsBlock 16 16 */ 17 17 … … 28 28 } 29 29 add_action( 'init', 'create_block_wp_tabs_block_block_init' ); 30 31 /** 32 * Prevent auto updating to version 2.0.0 due to breaking changes 33 * 34 * @param boolean $should_update Whether to update. 35 * @param object $plugin The update offer. 36 * @return boolean 37 */ 38 function create_block_wp_tabs_block_auto_update( $should_update, $plugin ) { 39 if ( ! isset( $plugin->plugin, $plugin->new_version ) ) { 40 return $should_update; 41 } 42 43 if ( 'simple-tabs-block/simple-tabs-block.php' !== $plugin->plugin ) { 44 return $should_update; 45 } 46 47 if ( version_compare( $plugin->Version, '2.0.0', '<' ) ) { 48 return false; 49 } 50 51 return $should_update; 52 } 53 add_filter( 'auto_update_plugin', 'create_block_wp_tabs_block_auto_update', 99, 2 );
Note: See TracChangeset
for help on using the changeset viewer.