Changeset 2715535
- Timestamp:
- 04/27/2022 04:10:17 PM (4 years ago)
- Location:
- simple-tabs-block
- Files:
-
- 22 edited
- 1 copied
-
tags/1.1.0 (copied) (copied from simple-tabs-block/trunk)
-
tags/1.1.0/build/tab/block.json (modified) (2 diffs)
-
tags/1.1.0/build/tab/index.asset.php (modified) (1 diff)
-
tags/1.1.0/build/tab/index.js (modified) (1 diff)
-
tags/1.1.0/build/tabs/block.json (modified) (1 diff)
-
tags/1.1.0/build/tabs/index.asset.php (modified) (1 diff)
-
tags/1.1.0/build/tabs/index.js (modified) (1 diff)
-
tags/1.1.0/build/tabs/view.asset.php (modified) (1 diff)
-
tags/1.1.0/build/tabs/view.js (modified) (1 diff)
-
tags/1.1.0/changelog.txt (modified) (1 diff)
-
tags/1.1.0/readme.txt (modified) (1 diff)
-
tags/1.1.0/simple-tabs-block.php (modified) (1 diff)
-
trunk/build/tab/block.json (modified) (2 diffs)
-
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.js (modified) (1 diff)
-
trunk/build/tabs/view.asset.php (modified) (1 diff)
-
trunk/build/tabs/view.js (modified) (1 diff)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/simple-tabs-block.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
simple-tabs-block/tags/1.1.0/build/tab/block.json
r2715012 r2715535 3 3 "apiVersion": 2, 4 4 "name": "cloudcatch/tab", 5 "version": "1. 0.0",5 "version": "1.1.0", 6 6 "title": "Tab", 7 7 "category": "design", 8 8 "parent": ["cloudcatch/tabs"], 9 "icon": "smiley",10 9 "keywords": [ 11 10 "tab", … … 19 18 "type": "string", 20 19 "default": "Title" 20 }, 21 "showDescription": { 22 "type": "boolean", 23 "default": false 24 }, 25 "description": { 26 "type": "string", 27 "default": "" 21 28 } 22 29 }, -
simple-tabs-block/tags/1.1.0/build/tab/index.asset.php
r2715012 r2715535 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' e22333b592d7d0ddc0ecc7d3dee4c669');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'caca221b3f16b3f6fc1ffd3c0b06f891'); -
simple-tabs-block/tags/1.1.0/build/tab/index.js
r2715012 r2715535 1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var l=c.apply(null,n);l&&e.push(l)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var c=t[r];if(void 0!==c)return c.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}!function(){"use strict";var e=window.wp.element,t=window.wp.blocks,r=(n(184),window.wp.i18n),c=window.wp.components,o=window.wp.blockEditor;(0,t.registerBlockType)("cloudcatch/tab",{edit:function(t){let{attributes:n,setAttributes:l,className:a,clientId:s,context:i}=t;const{index:u,label:p}=n,v=(0,o.useBlockProps)({tabId:u,style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}}),d=(0,o.useInnerBlocksProps)(v,{});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(c.PanelBody,null,(0,e.createElement)(c.TextControl,{label:(0,r.__)("Tab label"),value:p,onChange:e=>l({label:e})}))),(0,e.createElement)("div",v,(0,e.createElement)("div",d)))},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:n}=t;const{index:r}=n;return(0,e.createElement)("div",o.useBlockProps.save({tabId:r}),(0,e.createElement)(o.InnerBlocks.Content,null))}})}()}();1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var c={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var l=o.apply(null,n);l&&e.push(l)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var a in n)c.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(c){var o=t[c];if(void 0!==o)return o.exports;var r=t[c]={exports:{}};return e[c](r,r.exports,n),r.exports}!function(){"use strict";var e=window.wp.element,t=window.wp.blocks,c=(n(184),window.wp.i18n),o=window.wp.components,r=window.wp.blockEditor;(0,t.registerBlockType)("cloudcatch/tab",{edit:function(t){let{attributes:n,setAttributes:l,className:a,clientId:s,context:i}=t;const{index:p,label:u,showDescription:v}=n,d=((0,r.useBlockProps)({tabid:p,style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}}),(0,r.useInnerBlocksProps)({tabid:p,className:"wp-block-cloudcatch-tab",style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(o.PanelBody,null,(0,e.createElement)(o.TextControl,{label:(0,c.__)("Tab label"),value:u,onChange:e=>l({label:e})}),(0,e.createElement)(o.ToggleControl,{label:(0,c.__)("Show description"),checked:v,onChange:()=>l({showDescription:!v})}))),(0,e.createElement)("div",d))},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:n}=t;const{index:c}=n,o=r.useInnerBlocksProps.save({tabid:c,className:"wp-block-cloudcatch-tab"});return(0,e.createElement)("div",o)}})}()}(); -
simple-tabs-block/tags/1.1.0/build/tabs/block.json
r2715012 r2715535 3 3 "apiVersion": 2, 4 4 "name": "cloudcatch/tabs", 5 "version": "1. 0.0",5 "version": "1.1.0", 6 6 "title": "Tabs", 7 7 "category": "design", 8 "icon": "smiley",9 8 "keywords": [ 10 9 "tab", -
simple-tabs-block/tags/1.1.0/build/tabs/index.asset.php
r2715012 r2715535 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' => ' 994970a3a67f59f2da846c9015235646');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' => '1cdd43b49ed77448cb7ab615a737f16f'); -
simple-tabs-block/tags/1.1.0/build/tabs/index.js
r2715012 r2715535 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), l=n(913),i=n.n(l);let s=t=>crypto.getRandomValues(new Uint8Array(t));var u=window.wp.i18n,f=window.wp.blockEditor,p=window.wp.components,b=window.wp.data,d=window.wp.compose;window.wp.coreData;const v=["cloudcatch/tab"],h={name:"cloudcatch/tab"},m={type:"default",alignments:[]};function w(t){let{clientId:e,orientation:n}=t;const{selectedBlockId:o}=(0,b.useSelect)((t=>{const{getSelectedBlockClientId:e}=t(f.store);return{selectedBlockId:e()}}),[e]),c=(0,f.useInnerBlocksProps)({className:"wp-block-cloudcatch-tabs__container"},{allowedBlocks:v,__experimentalDefaultBlock:h,__experimentalDirectInsert:!0,orientation:n,template:[["cloudcatch/tab"],["cloudcatch/tab"],["cloudcatch/tab"]],templateLock:!1,__experimentalLayout:m});return(0,r.createElement)("div",c)}var k=(0,d.compose)((0,b.withSelect)(((t,e)=>{let{clientId:n}=e;return{innerBlocks:t("core/block-editor").getBlocks(n)}})),(0,b.withDispatch)(((t,e,n)=>{let{clientId:r}=e,{select:o}=n;const{getBlock:c}=o("core/block-editor"),{updateBlockAttributes:a,moveBlockToPosition:l}=t("core/block-editor"),s=c(r),{selectBlock:u}=t(f.store);return{selectBlock(t){u(t)},resetTabOrder(){let t=[];i()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{index:e}),t.push({clientId:s.innerBlocks[e].clientId,label:s.innerBlocks[e].attributes.label})})),a(r,{tabs:t})},updateActiveTab(t){a(s.clientId,{activeTab:t}),i()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{activeTab:t})})),u(t)},moveTab(t,e){l(t,r,r,parseInt(e))}}})))((function(t){let{attributes:e,setAttributes:n,className:o,innerBlocks:c,clientId:l,updateActiveTab:i,selectBlock:d,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),l=o;for(;l--;)if(a+=t[e[l]&r]||"",a.length===c)return a}}})(t,e,s))("1234567890abcdef",10),{uuid:m=h(),activeTab:k,defaultTab:g,tabs:y,layout:{justifyContent:_,orientation:x="horizontal",flexWrap:j="wrap"}={}}=e,{updateBlockAttributes:B}=(0,b.useDispatch)(f.store);(0,r.useEffect)((()=>{v()}),[c]);const I=(0,r.useRef)(),O=(0,f.useBlockProps)({ref:I,className:a()(o,"wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===_,"items-justified-space-between":"space-between"===_,"items-justified-left":"left"===_,"items-justified-center":"center"===_,"is-vertical":"vertical"===x,"no-wrap":"nowrap"===j})});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(f.InspectorControls,null,(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.SelectControl,{label:(0,u.__)("Default open tab"),value:g,options:y.map(((t,e)=>({value:e,label:t.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},y.map(((t,e)=>{var n;return(0,r.createElement)(f.RichText,{"aria-label":(0,u.__)("Title"),placeholder:(0,u.__)("Add text…"),value:null!==(n=t.label)&&void 0!==n?n:(0,u.__)("Title"),onChange:e=>{B(t.clientId,{label:e})},key:e,role:"tab",tabid:e,tabIndex:"0",withoutInteractiveFormatting:!0,identifier:"label",className:a()("wp-block-cloudcatch-tab__label",{active:k===t.clientId}),unstableOnFocus:e=>{return n=t.clientId,void i(n);var n}})})),(0,r.createElement)(f.InnerBlocks.ButtonBlockAppender,null))),(0,r.createElement)(w,null)))}));(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:l,orientation:i="horizontal",flexWrap:s="wrap"}={}}=e,p=a()("wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===l,"items-justified-space-between":"space-between"===l,"items-justified-left":"left"===l,"items-justified-center":"center"===l,"is-vertical":"vertical"===i,"no-wrap":"nowrap"===s});return(0,r.createElement)("div",f.useBlockProps.save({className:p}),(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":i},o.map(((t,e)=>{var n;return(0,r.createElement)(f.RichText.Content,{value:null!==(n=t.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",{active:e===c})})})))),(0,r.createElement)("div",f.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 l in n)r.call(n,l)&&n[l]&&t.push(l);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,l=r?r.toStringTag:void 0;t.exports=function(t){var e=c.call(t,l),n=t[l];try{t[l]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[l]=n:delete t[l]),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,l=Math.min;t.exports=function(t,e){if((t=c(t))<1||t>9007199254740991)return[];var n=a,i=l(t,a);e=o(e),t-=a;for(var s=r(i,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,l=/^0b[01]+$/i,i=/^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=l.test(t);return n||i.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 l=!0,i=0;i<n.length;i++)(!1&c||a>=c)&&Object.keys(r.O).every((function(t){return r.O[t](n[i])}))?n.splice(i--,1):(l=!1,c<a&&(a=c));if(l){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],l=n[1],i=n[2],s=0;if(a.some((function(e){return 0!==t[e]}))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(i)var u=i(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 !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){let{clientId:e,orientation:n}=t;const{selectedBlockId:o}=(0,d.useSelect)((t=>{const{getSelectedBlockClientId:e}=t(p.store);return{selectedBlockId:e()}}),[e]),c=(0,p.useInnerBlocksProps)({className:"wp-block-cloudcatch-tabs__container"},{allowedBlocks:v,__experimentalDefaultBlock:h,__experimentalDirectInsert:!0,orientation:n,template:[["cloudcatch/tab"],["cloudcatch/tab"],["cloudcatch/tab"]],templateLock:!1,__experimentalLayout:m});return(0,r.createElement)("div",c)}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 I=(0,r.useRef)(),O=(0,p.useBlockProps)({ref:I,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.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;return console.log(null==t||null===(n=t.attributes)||void 0===n?void 0:n.className),(0,r.createElement)("div",{key:e},(0,r.createElement)(p.RichText,{"aria-label":(0,u.__)("Title"),placeholder:(0,u.__)("Add text…"),value:null!==(o=t.attributes.label)&&void 0!==o?o:(0,u.__)("Title"),onChange:e=>{B(t.clientId,{label:e})},role:"tab",tabid:e,tabIndex:"0",withoutInteractiveFormatting:!0,identifier:"label",className:a()("wp-block-cloudcatch-tab__label",null==t||null===(c=t.attributes)||void 0===c?void 0:c.className,{active:k===t.clientId}),unstableOnFocus:e=>{return n=t.clientId,void l(n);var n}}),(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:t.attributes.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,null)))}));(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;return(0,r.createElement)("div",{key:e},(0,r.createElement)(p.RichText.Content,{value:null!==(n=t.attributes.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===(o=t.attributes)||void 0===o?void 0:o.className,{active:e===c})}),(null==t||null===(i=t.attributes)||void 0===i?void 0:i.showDescription)&&(0,r.createElement)(p.RichText.Content,{value:null!==(l=t.attributes.description)&&void 0!==l?l:(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)}(); -
simple-tabs-block/tags/1.1.0/build/tabs/view.asset.php
r2715012 r2715535 1 <?php return array('dependencies' => array(), 'version' => ' 07d9ab2a933310da0c6ccff30a771077');1 <?php return array('dependencies' => array(), 'version' => '5638fa187bde8359b0bb804dd261cb49'); -
simple-tabs-block/tags/1.1.0/build/tabs/view.js
r2715012 r2715535 1 (()=>{const 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 l=e=>{t.querySelectorAll(":scope > *").forEach((e=>{e.style.display="none"})),c.querySelectorAll(":scope > *").forEach((e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false")})),r=parseInt(e);const a=c.querySelector('[tabid="'+r+'"]');a.classList.add("active"),a.setAttribute("aria-selected","true"),t.querySelector('[tabid="'+r+'"]').style.display="block"};function s(e){var t=e.target;setTimeout(i,0,t)}function i(e){e===document.activeElement&&l(e.getAttribute("tabid"))}a.forEach((e=>{e.classList.contains("active")&&(r=e.getAttribute("tabid"))})),l(r),a.forEach((e=>{e.addEventListener("click",(t=>{l(e.getAttribute("tabid"))})),e.addEventListener("keyup",(e=>{switch(e.keyCode){case 37:case 39:l=(t=e).keyCode,i=!1,"vertical"==c.getAttribute("aria-orientation")?38!==l&&40!==l||(t.preventDefault(),i=!0):37!==l&&39!==l||(i=!0),i&&function(e){for(var t=e.keyCode,c=0;c<a.length;c++)a[c].addEventListener("focus",s);if(o[t]){var l=r+o[t];void 0!==a[l]?a[l].focus():37===t||38===t?a[a.length-1].focus():39!==t&&40!=t||a[0].focus()}}(t)}var t,l,i}))}))};document.querySelectorAll(".wp-block-cloudcatch-tabs").forEach((t=>{e(t)}))})();1 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 s=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"},i=e=>{var t=e.keyCode,s=!1;"vertical"==c.getAttribute("aria-orientation")?38!==t&&40!==t||(e.preventDefault(),s=!0):37!==t&&39!==t||(s=!0),s&&function(e){for(var t=e.keyCode,c=0;c<a.length;c++)a[c].addEventListener("focus",l);if(console.log(o[t]),o[t]){var s=r+o[t];void 0!==a[s]?a[s].focus():37===t||38===t?a[a.length-1].focus():39!==t&&40!=t||a[0].focus()}}(e)};function l(e){var t=e.target;setTimeout(n,0,t)}function n(e){e===document.activeElement&&s(e.getAttribute("tabid"))}a.forEach((e=>{e.classList.contains("active")&&(r=e.getAttribute("tabid"))})),s(r),a.forEach((e=>{e.addEventListener("click",(t=>{s(e.getAttribute("tabid"))})),e.addEventListener("keydown",(e=>{switch(e.keyCode){case 38:case 40:i(e)}})),e.addEventListener("keyup",(e=>{switch(e.keyCode){case 37:case 39:i(e)}}))}))})(e)})); -
simple-tabs-block/tags/1.1.0/changelog.txt
r2715012 r2715535 1 # [1.1.0](https://github.com/CloudCatch/simple-tabs-block/compare/1.0.0...1.1.0) (2022-04-27) 2 3 4 ### Features 5 6 * accessibility fixes; description field; allow classes on tabs ([147b589](https://github.com/CloudCatch/simple-tabs-block/commit/147b589cae55d5a7a5f23d8e3e3dc160132fcde3)) 7 * update icon ([07c22e6](https://github.com/CloudCatch/simple-tabs-block/commit/07c22e67a803af56caf42db68b85f350c0b07ef2)) 8 1 9 # 1.0.0 (2022-04-26) 2 10 -
simple-tabs-block/tags/1.1.0/readme.txt
r2715012 r2715535 5 5 Tested up to: 5.9.3 6 6 Requires PHP: 7.0 7 Stable tag: 1. 0.07 Stable tag: 1.1.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
simple-tabs-block/tags/1.1.0/simple-tabs-block.php
r2715012 r2715535 5 5 * Requires at least: 5.9 6 6 * Requires PHP: 7.0 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * Author: CloudCatch 9 9 * Author URI: https://cloudcatch.io -
simple-tabs-block/trunk/build/tab/block.json
r2715012 r2715535 3 3 "apiVersion": 2, 4 4 "name": "cloudcatch/tab", 5 "version": "1. 0.0",5 "version": "1.1.0", 6 6 "title": "Tab", 7 7 "category": "design", 8 8 "parent": ["cloudcatch/tabs"], 9 "icon": "smiley",10 9 "keywords": [ 11 10 "tab", … … 19 18 "type": "string", 20 19 "default": "Title" 20 }, 21 "showDescription": { 22 "type": "boolean", 23 "default": false 24 }, 25 "description": { 26 "type": "string", 27 "default": "" 21 28 } 22 29 }, -
simple-tabs-block/trunk/build/tab/index.asset.php
r2715012 r2715535 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' e22333b592d7d0ddc0ecc7d3dee4c669');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'caca221b3f16b3f6fc1ffd3c0b06f891'); -
simple-tabs-block/trunk/build/tab/index.js
r2715012 r2715535 1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function c(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if("string"===o||"number"===o)e.push(n);else if(Array.isArray(n)){if(n.length){var l=c.apply(null,n);l&&e.push(l)}}else if("object"===o)if(n.toString===Object.prototype.toString)for(var a in n)r.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(c.default=c,e.exports=c):void 0===(n=function(){return c}.apply(t,[]))||(e.exports=n)}()}},t={};function n(r){var c=t[r];if(void 0!==c)return c.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}!function(){"use strict";var e=window.wp.element,t=window.wp.blocks,r=(n(184),window.wp.i18n),c=window.wp.components,o=window.wp.blockEditor;(0,t.registerBlockType)("cloudcatch/tab",{edit:function(t){let{attributes:n,setAttributes:l,className:a,clientId:s,context:i}=t;const{index:u,label:p}=n,v=(0,o.useBlockProps)({tabId:u,style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}}),d=(0,o.useInnerBlocksProps)(v,{});return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(o.InspectorControls,null,(0,e.createElement)(c.PanelBody,null,(0,e.createElement)(c.TextControl,{label:(0,r.__)("Tab label"),value:p,onChange:e=>l({label:e})}))),(0,e.createElement)("div",v,(0,e.createElement)("div",d)))},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:n}=t;const{index:r}=n;return(0,e.createElement)("div",o.useBlockProps.save({tabId:r}),(0,e.createElement)(o.InnerBlocks.Content,null))}})}()}();1 !function(){var e={184:function(e,t){var n;!function(){"use strict";var c={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var l=o.apply(null,n);l&&e.push(l)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var a in n)c.call(n,a)&&n[a]&&e.push(a);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()}},t={};function n(c){var o=t[c];if(void 0!==o)return o.exports;var r=t[c]={exports:{}};return e[c](r,r.exports,n),r.exports}!function(){"use strict";var e=window.wp.element,t=window.wp.blocks,c=(n(184),window.wp.i18n),o=window.wp.components,r=window.wp.blockEditor;(0,t.registerBlockType)("cloudcatch/tab",{edit:function(t){let{attributes:n,setAttributes:l,className:a,clientId:s,context:i}=t;const{index:p,label:u,showDescription:v}=n,d=((0,r.useBlockProps)({tabid:p,style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}}),(0,r.useInnerBlocksProps)({tabid:p,className:"wp-block-cloudcatch-tab",style:{display:s===i["cloudcatch/tabs/activeTab"]?"block":"none"}}));return(0,e.createElement)(e.Fragment,null,(0,e.createElement)(r.InspectorControls,null,(0,e.createElement)(o.PanelBody,null,(0,e.createElement)(o.TextControl,{label:(0,c.__)("Tab label"),value:u,onChange:e=>l({label:e})}),(0,e.createElement)(o.ToggleControl,{label:(0,c.__)("Show description"),checked:v,onChange:()=>l({showDescription:!v})}))),(0,e.createElement)("div",d))},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:n}=t;const{index:c}=n,o=r.useInnerBlocksProps.save({tabid:c,className:"wp-block-cloudcatch-tab"});return(0,e.createElement)("div",o)}})}()}(); -
simple-tabs-block/trunk/build/tabs/block.json
r2715012 r2715535 3 3 "apiVersion": 2, 4 4 "name": "cloudcatch/tabs", 5 "version": "1. 0.0",5 "version": "1.1.0", 6 6 "title": "Tabs", 7 7 "category": "design", 8 "icon": "smiley",9 8 "keywords": [ 10 9 "tab", -
simple-tabs-block/trunk/build/tabs/index.asset.php
r2715012 r2715535 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' => ' 994970a3a67f59f2da846c9015235646');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' => '1cdd43b49ed77448cb7ab615a737f16f'); -
simple-tabs-block/trunk/build/tabs/index.js
r2715012 r2715535 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), l=n(913),i=n.n(l);let s=t=>crypto.getRandomValues(new Uint8Array(t));var u=window.wp.i18n,f=window.wp.blockEditor,p=window.wp.components,b=window.wp.data,d=window.wp.compose;window.wp.coreData;const v=["cloudcatch/tab"],h={name:"cloudcatch/tab"},m={type:"default",alignments:[]};function w(t){let{clientId:e,orientation:n}=t;const{selectedBlockId:o}=(0,b.useSelect)((t=>{const{getSelectedBlockClientId:e}=t(f.store);return{selectedBlockId:e()}}),[e]),c=(0,f.useInnerBlocksProps)({className:"wp-block-cloudcatch-tabs__container"},{allowedBlocks:v,__experimentalDefaultBlock:h,__experimentalDirectInsert:!0,orientation:n,template:[["cloudcatch/tab"],["cloudcatch/tab"],["cloudcatch/tab"]],templateLock:!1,__experimentalLayout:m});return(0,r.createElement)("div",c)}var k=(0,d.compose)((0,b.withSelect)(((t,e)=>{let{clientId:n}=e;return{innerBlocks:t("core/block-editor").getBlocks(n)}})),(0,b.withDispatch)(((t,e,n)=>{let{clientId:r}=e,{select:o}=n;const{getBlock:c}=o("core/block-editor"),{updateBlockAttributes:a,moveBlockToPosition:l}=t("core/block-editor"),s=c(r),{selectBlock:u}=t(f.store);return{selectBlock(t){u(t)},resetTabOrder(){let t=[];i()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{index:e}),t.push({clientId:s.innerBlocks[e].clientId,label:s.innerBlocks[e].attributes.label})})),a(r,{tabs:t})},updateActiveTab(t){a(s.clientId,{activeTab:t}),i()(s.innerBlocks.length,(e=>{a(s.innerBlocks[e].clientId,{activeTab:t})})),u(t)},moveTab(t,e){l(t,r,r,parseInt(e))}}})))((function(t){let{attributes:e,setAttributes:n,className:o,innerBlocks:c,clientId:l,updateActiveTab:i,selectBlock:d,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),l=o;for(;l--;)if(a+=t[e[l]&r]||"",a.length===c)return a}}})(t,e,s))("1234567890abcdef",10),{uuid:m=h(),activeTab:k,defaultTab:g,tabs:y,layout:{justifyContent:_,orientation:x="horizontal",flexWrap:j="wrap"}={}}=e,{updateBlockAttributes:B}=(0,b.useDispatch)(f.store);(0,r.useEffect)((()=>{v()}),[c]);const I=(0,r.useRef)(),O=(0,f.useBlockProps)({ref:I,className:a()(o,"wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===_,"items-justified-space-between":"space-between"===_,"items-justified-left":"left"===_,"items-justified-center":"center"===_,"is-vertical":"vertical"===x,"no-wrap":"nowrap"===j})});return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(f.InspectorControls,null,(0,r.createElement)(p.PanelBody,null,(0,r.createElement)(p.SelectControl,{label:(0,u.__)("Default open tab"),value:g,options:y.map(((t,e)=>({value:e,label:t.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},y.map(((t,e)=>{var n;return(0,r.createElement)(f.RichText,{"aria-label":(0,u.__)("Title"),placeholder:(0,u.__)("Add text…"),value:null!==(n=t.label)&&void 0!==n?n:(0,u.__)("Title"),onChange:e=>{B(t.clientId,{label:e})},key:e,role:"tab",tabid:e,tabIndex:"0",withoutInteractiveFormatting:!0,identifier:"label",className:a()("wp-block-cloudcatch-tab__label",{active:k===t.clientId}),unstableOnFocus:e=>{return n=t.clientId,void i(n);var n}})})),(0,r.createElement)(f.InnerBlocks.ButtonBlockAppender,null))),(0,r.createElement)(w,null)))}));(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:l,orientation:i="horizontal",flexWrap:s="wrap"}={}}=e,p=a()("wp-block-cloudcatch-tabs__wrapper",{"items-justified-right":"right"===l,"items-justified-space-between":"space-between"===l,"items-justified-left":"left"===l,"items-justified-center":"center"===l,"is-vertical":"vertical"===i,"no-wrap":"nowrap"===s});return(0,r.createElement)("div",f.useBlockProps.save({className:p}),(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":i},o.map(((t,e)=>{var n;return(0,r.createElement)(f.RichText.Content,{value:null!==(n=t.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",{active:e===c})})})))),(0,r.createElement)("div",f.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 l in n)r.call(n,l)&&n[l]&&t.push(l);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,l=r?r.toStringTag:void 0;t.exports=function(t){var e=c.call(t,l),n=t[l];try{t[l]=void 0;var r=!0}catch(t){}var o=a.call(t);return r&&(e?t[l]=n:delete t[l]),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,l=Math.min;t.exports=function(t,e){if((t=c(t))<1||t>9007199254740991)return[];var n=a,i=l(t,a);e=o(e),t-=a;for(var s=r(i,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,l=/^0b[01]+$/i,i=/^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=l.test(t);return n||i.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 l=!0,i=0;i<n.length;i++)(!1&c||a>=c)&&Object.keys(r.O).every((function(t){return r.O[t](n[i])}))?n.splice(i--,1):(l=!1,c<a&&(a=c));if(l){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],l=n[1],i=n[2],s=0;if(a.some((function(e){return 0!==t[e]}))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);if(i)var u=i(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 !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){let{clientId:e,orientation:n}=t;const{selectedBlockId:o}=(0,d.useSelect)((t=>{const{getSelectedBlockClientId:e}=t(p.store);return{selectedBlockId:e()}}),[e]),c=(0,p.useInnerBlocksProps)({className:"wp-block-cloudcatch-tabs__container"},{allowedBlocks:v,__experimentalDefaultBlock:h,__experimentalDirectInsert:!0,orientation:n,template:[["cloudcatch/tab"],["cloudcatch/tab"],["cloudcatch/tab"]],templateLock:!1,__experimentalLayout:m});return(0,r.createElement)("div",c)}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 I=(0,r.useRef)(),O=(0,p.useBlockProps)({ref:I,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.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;return console.log(null==t||null===(n=t.attributes)||void 0===n?void 0:n.className),(0,r.createElement)("div",{key:e},(0,r.createElement)(p.RichText,{"aria-label":(0,u.__)("Title"),placeholder:(0,u.__)("Add text…"),value:null!==(o=t.attributes.label)&&void 0!==o?o:(0,u.__)("Title"),onChange:e=>{B(t.clientId,{label:e})},role:"tab",tabid:e,tabIndex:"0",withoutInteractiveFormatting:!0,identifier:"label",className:a()("wp-block-cloudcatch-tab__label",null==t||null===(c=t.attributes)||void 0===c?void 0:c.className,{active:k===t.clientId}),unstableOnFocus:e=>{return n=t.clientId,void l(n);var n}}),(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:t.attributes.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,null)))}));(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;return(0,r.createElement)("div",{key:e},(0,r.createElement)(p.RichText.Content,{value:null!==(n=t.attributes.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===(o=t.attributes)||void 0===o?void 0:o.className,{active:e===c})}),(null==t||null===(i=t.attributes)||void 0===i?void 0:i.showDescription)&&(0,r.createElement)(p.RichText.Content,{value:null!==(l=t.attributes.description)&&void 0!==l?l:(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)}(); -
simple-tabs-block/trunk/build/tabs/view.asset.php
r2715012 r2715535 1 <?php return array('dependencies' => array(), 'version' => ' 07d9ab2a933310da0c6ccff30a771077');1 <?php return array('dependencies' => array(), 'version' => '5638fa187bde8359b0bb804dd261cb49'); -
simple-tabs-block/trunk/build/tabs/view.js
r2715012 r2715535 1 (()=>{const 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 l=e=>{t.querySelectorAll(":scope > *").forEach((e=>{e.style.display="none"})),c.querySelectorAll(":scope > *").forEach((e=>{e.classList.remove("active"),e.setAttribute("aria-selected","false")})),r=parseInt(e);const a=c.querySelector('[tabid="'+r+'"]');a.classList.add("active"),a.setAttribute("aria-selected","true"),t.querySelector('[tabid="'+r+'"]').style.display="block"};function s(e){var t=e.target;setTimeout(i,0,t)}function i(e){e===document.activeElement&&l(e.getAttribute("tabid"))}a.forEach((e=>{e.classList.contains("active")&&(r=e.getAttribute("tabid"))})),l(r),a.forEach((e=>{e.addEventListener("click",(t=>{l(e.getAttribute("tabid"))})),e.addEventListener("keyup",(e=>{switch(e.keyCode){case 37:case 39:l=(t=e).keyCode,i=!1,"vertical"==c.getAttribute("aria-orientation")?38!==l&&40!==l||(t.preventDefault(),i=!0):37!==l&&39!==l||(i=!0),i&&function(e){for(var t=e.keyCode,c=0;c<a.length;c++)a[c].addEventListener("focus",s);if(o[t]){var l=r+o[t];void 0!==a[l]?a[l].focus():37===t||38===t?a[a.length-1].focus():39!==t&&40!=t||a[0].focus()}}(t)}var t,l,i}))}))};document.querySelectorAll(".wp-block-cloudcatch-tabs").forEach((t=>{e(t)}))})();1 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 s=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"},i=e=>{var t=e.keyCode,s=!1;"vertical"==c.getAttribute("aria-orientation")?38!==t&&40!==t||(e.preventDefault(),s=!0):37!==t&&39!==t||(s=!0),s&&function(e){for(var t=e.keyCode,c=0;c<a.length;c++)a[c].addEventListener("focus",l);if(console.log(o[t]),o[t]){var s=r+o[t];void 0!==a[s]?a[s].focus():37===t||38===t?a[a.length-1].focus():39!==t&&40!=t||a[0].focus()}}(e)};function l(e){var t=e.target;setTimeout(n,0,t)}function n(e){e===document.activeElement&&s(e.getAttribute("tabid"))}a.forEach((e=>{e.classList.contains("active")&&(r=e.getAttribute("tabid"))})),s(r),a.forEach((e=>{e.addEventListener("click",(t=>{s(e.getAttribute("tabid"))})),e.addEventListener("keydown",(e=>{switch(e.keyCode){case 38:case 40:i(e)}})),e.addEventListener("keyup",(e=>{switch(e.keyCode){case 37:case 39:i(e)}}))}))})(e)})); -
simple-tabs-block/trunk/changelog.txt
r2715012 r2715535 1 # [1.1.0](https://github.com/CloudCatch/simple-tabs-block/compare/1.0.0...1.1.0) (2022-04-27) 2 3 4 ### Features 5 6 * accessibility fixes; description field; allow classes on tabs ([147b589](https://github.com/CloudCatch/simple-tabs-block/commit/147b589cae55d5a7a5f23d8e3e3dc160132fcde3)) 7 * update icon ([07c22e6](https://github.com/CloudCatch/simple-tabs-block/commit/07c22e67a803af56caf42db68b85f350c0b07ef2)) 8 1 9 # 1.0.0 (2022-04-26) 2 10 -
simple-tabs-block/trunk/readme.txt
r2715012 r2715535 5 5 Tested up to: 5.9.3 6 6 Requires PHP: 7.0 7 Stable tag: 1. 0.07 Stable tag: 1.1.0 8 8 License: GPL-2.0-or-later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html -
simple-tabs-block/trunk/simple-tabs-block.php
r2715012 r2715535 5 5 * Requires at least: 5.9 6 6 * Requires PHP: 7.0 7 * Version: 1. 0.07 * Version: 1.1.0 8 8 * Author: CloudCatch 9 9 * Author URI: https://cloudcatch.io
Note: See TracChangeset
for help on using the changeset viewer.