{ "attention_seekers": [ "bounce", "flash", "pulse", "rubberBand", "shake", "headShake", "swing", "tada", "wobble", "jello" ], "bouncing_entrances": [ "bounceIn", "bounceInDown", "bounceInLeft", "bounceInRight", "bounceInUp" ], "fading_entrances": [ "fadeIn", "fadeInDown", "fadeInLeft", "fadeInRight", "fadeInUp" ], "lightspeed": [ "lightSpeedIn" ], "rotating_entrances": [ "rotateIn", "rotateInDownLeft", "rotateInDownRight", "rotateInUpLeft", "rotateInUpRight" ], "specials": [ "rollIn" ], "zooming_entrances": [ "zoomIn", "zoomInDown", "zoomInLeft", "zoomInRight", "zoomInUp" ], "sliding_entrances": [ "slideInDown", "slideInLeft", "slideInRight", "slideInUp" ] }
/** * External dependencies */ import { isFunction } from 'lodash'; import classnames from 'classnames'; import { BaseControl, ButtonGroup, Button } from '@wordpress/components'; import { Component } from '@wordpress/element'; import { withInstanceId } from '@wordpress/compose'; /** * Internal dependencies */ import './style.scss'; class ToggleButtonControl extends Component { constructor() { super( ...arguments ); this.onClick = this.onClick.bind( this ); } onClick( event ) { if ( this.props.onChange ) { this.props.onChange( event.target.value ); } } render() { const { label, checked, instanceId, className, help, options, value, } = this.props; const id = `inspector-toggle-button-control-${ instanceId }`; let helpLabel; if ( help ) { helpLabel = isFunction( help ) ? help( checked ) : help; } return ( { options.map( ( option, index ) => { const buttonArgs = {}; // Change button depending on pressed state. if ( value === option.value ) { buttonArgs.isPrimary = true; buttonArgs[ 'aria-pressed' ] = true; } else { buttonArgs.isDefault = true; buttonArgs[ 'aria-pressed' ] = false; } return ( ); } ) } ); } } export default withInstanceId( ToggleButtonControl ); /*! Lity - v2.3.1 - 2018-04-20 * http://sorgalla.com/lity/ * Copyright (c) 2015-2018 Jan Sorgalla; Licensed MIT */ !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a){var b=B();return N&&a.length?(a.one(N,b.resolve),setTimeout(b.resolve,500)):b.resolve(),b.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if(void 0===d)return void 0===a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(a){for(var b,c=decodeURI(a.split("#")[0]).split("&"),d={},e=0,f=c.length;e-1?"&":"?")+b.param(c)}function g(a,b){var c=a.indexOf("#");return-1===c?b:(c>0&&(a=a.substr(c)),b+a)}function h(a){return b('').append(a)}function i(a,c){var d=c.opener()&&c.opener().data("lity-desc")||"Image with no description",e=b(''+d+''),f=B(),g=function(){f.reject(h("Failed loading image"))};return e.on("load",function(){if(0===this.naturalWidth)return g();f.resolve(e)}).on("error",g),f.promise()}function j(a,c){var d,e,f;try{d=b(a)}catch(a){return!1}return!!d.length&&(e=b(''),f=d.hasClass("lity-hide"),c.element().one("lity:remove",function(){e.before(d).remove(),f&&!d.closest(".lity-content").length&&d.addClass("lity-hide")}),d.removeClass("lity-hide").after(e))}function k(a){var c=J.exec(a);return!!c&&o(g(a,f("https://www.youtube"+(c[2]||"")+".com/embed/"+c[4],b.extend({autoplay:1},e(c[5]||"")))))}function l(a){var c=K.exec(a);return!!c&&o(g(a,f("https://player.vimeo.com/video/"+c[3],b.extend({autoplay:1},e(c[4]||"")))))}function m(a){var c=M.exec(a);return!!c&&(0!==a.indexOf("http")&&(a="https:"+a),o(g(a,f("https://www.facebook.com/plugins/video.php?href="+a,b.extend({autoplay:1},e(c[4]||""))))))}function n(a){var b=L.exec(a);return!!b&&o(g(a,f("https://www.google."+b[3]+"/maps?"+b[6],{output:b[6].indexOf("layer=c")>0?"svembed":"embed"})))}function o(a){return'