From 808b0c642aecb1697b925fb399897446a6bab9f9 Mon Sep 17 00:00:00 2001 From: Bagus <25834188+contactjavas@users.noreply.github.com> Date: Sat, 12 Feb 2022 00:31:14 +0700 Subject: [PATCH] update package: control-react-colorful --- composer.lock | 12 ++--- packages/composer/autoload_psr4.php | 6 +-- packages/composer/autoload_static.php | 54 +++++++++---------- packages/composer/installed.json | 14 ++--- packages/composer/installed.php | 10 ++-- .../control-react-colorful/dist/preview.js | 2 +- .../dist/preview.js.map | 2 +- .../src/Control/ReactColorful.php | 2 +- .../src/Field/CSS/ReactColorful.php | 6 ++- .../src/Field/ReactColorful.php | 2 +- 10 files changed, 56 insertions(+), 54 deletions(-) diff --git a/composer.lock b/composer.lock index c4edab763..a712e967f 100644 --- a/composer.lock +++ b/composer.lock @@ -823,16 +823,16 @@ }, { "name": "kirki-framework/control-react-colorful", - "version": "v1.0.13", + "version": "v1.0.14", "source": { "type": "git", "url": "https://github.com/kirki-framework/control-react-colorful.git", - "reference": "b388a46480f5743ec998fed04019af0bad1fc744" + "reference": "bcfe71b736f4b43c00b0292e9260c78815808364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirki-framework/control-react-colorful/zipball/b388a46480f5743ec998fed04019af0bad1fc744", - "reference": "b388a46480f5743ec998fed04019af0bad1fc744", + "url": "https://api.github.com/repos/kirki-framework/control-react-colorful/zipball/bcfe71b736f4b43c00b0292e9260c78815808364", + "reference": "bcfe71b736f4b43c00b0292e9260c78815808364", "shasum": "" }, "require": { @@ -867,9 +867,9 @@ ], "support": { "issues": "https://github.com/kirki-framework/control-react-colorful/issues", - "source": "https://github.com/kirki-framework/control-react-colorful/tree/v1.0.13" + "source": "https://github.com/kirki-framework/control-react-colorful/tree/v1.0.14" }, - "time": "2022-02-11T14:29:17+00:00" + "time": "2022-02-11T17:28:13+00:00" }, { "name": "kirki-framework/control-react-select", diff --git a/packages/composer/autoload_psr4.php b/packages/composer/autoload_psr4.php index b76160d87..33b67d03e 100644 --- a/packages/composer/autoload_psr4.php +++ b/packages/composer/autoload_psr4.php @@ -8,10 +8,10 @@ return array( 'Kirki\\Util\\' => array($vendorDir . '/kirki-framework/control-dashicons/src/Util', $vendorDir . '/kirki-framework/util/src'), 'Kirki\\Settings\\' => array($vendorDir . '/kirki-framework/control-repeater/src/Settings'), - 'Kirki\\Module\\' => array($vendorDir . '/kirki-framework/module-css/src', $vendorDir . '/kirki-framework/module-editor-styles/src', $vendorDir . '/kirki-framework/module-field-dependencies/src', $vendorDir . '/kirki-framework/module-preset/src', $vendorDir . '/kirki-framework/module-section-icons/src', $vendorDir . '/kirki-framework/module-selective-refresh/src', $vendorDir . '/kirki-framework/module-tooltips/src', $vendorDir . '/kirki-framework/module-webfonts/src', $vendorDir . '/kirki-framework/module-postmessage/src'), - 'Kirki\\Field\\' => array($vendorDir . '/kirki-framework/control-checkbox/src/Field', $vendorDir . '/kirki-framework/control-code/src/Field', $vendorDir . '/kirki-framework/control-color/src/Field', $vendorDir . '/kirki-framework/control-color-palette/src/Field', $vendorDir . '/kirki-framework/control-custom/src/Field', $vendorDir . '/kirki-framework/control-dashicons/src/Field', $vendorDir . '/kirki-framework/control-date/src/Field', $vendorDir . '/kirki-framework/control-dimension/src/Field', $vendorDir . '/kirki-framework/control-editor/src/Field', $vendorDir . '/kirki-framework/control-generic/src/Field', $vendorDir . '/kirki-framework/control-image/src/Field', $vendorDir . '/kirki-framework/control-multicheck/src/Field', $vendorDir . '/kirki-framework/control-palette/src/Field', $vendorDir . '/kirki-framework/control-radio/src/Field', $vendorDir . '/kirki-framework/control-react-colorful/src/Field', $vendorDir . '/kirki-framework/control-react-select/src/Field', $vendorDir . '/kirki-framework/control-repeater/src/Field', $vendorDir . '/kirki-framework/control-select/src/Field', $vendorDir . '/kirki-framework/control-slider/src/Field', $vendorDir . '/kirki-framework/control-sortable/src/Field', $vendorDir . '/kirki-framework/control-upload/src/Field', $vendorDir . '/kirki-framework/field-background/src', $vendorDir . '/kirki-framework/field-dimensions/src', $vendorDir . '/kirki-framework/field-fontawesome/src/Field', $vendorDir . '/kirki-framework/field-multicolor/src/Field', $vendorDir . '/kirki-framework/field-typography/src/Field'), + 'Kirki\\Module\\' => array($vendorDir . '/kirki-framework/module-css/src', $vendorDir . '/kirki-framework/module-editor-styles/src', $vendorDir . '/kirki-framework/module-field-dependencies/src', $vendorDir . '/kirki-framework/module-postmessage/src', $vendorDir . '/kirki-framework/module-preset/src', $vendorDir . '/kirki-framework/module-section-icons/src', $vendorDir . '/kirki-framework/module-selective-refresh/src', $vendorDir . '/kirki-framework/module-tooltips/src', $vendorDir . '/kirki-framework/module-webfonts/src'), + 'Kirki\\Field\\' => array($vendorDir . '/kirki-framework/control-checkbox/src/Field', $vendorDir . '/kirki-framework/control-code/src/Field', $vendorDir . '/kirki-framework/control-color/src/Field', $vendorDir . '/kirki-framework/control-color-palette/src/Field', $vendorDir . '/kirki-framework/control-custom/src/Field', $vendorDir . '/kirki-framework/control-dashicons/src/Field', $vendorDir . '/kirki-framework/control-date/src/Field', $vendorDir . '/kirki-framework/control-dimension/src/Field', $vendorDir . '/kirki-framework/control-editor/src/Field', $vendorDir . '/kirki-framework/control-generic/src/Field', $vendorDir . '/kirki-framework/control-image/src/Field', $vendorDir . '/kirki-framework/control-multicheck/src/Field', $vendorDir . '/kirki-framework/control-palette/src/Field', $vendorDir . '/kirki-framework/control-radio/src/Field', $vendorDir . '/kirki-framework/control-react-select/src/Field', $vendorDir . '/kirki-framework/control-repeater/src/Field', $vendorDir . '/kirki-framework/control-select/src/Field', $vendorDir . '/kirki-framework/control-slider/src/Field', $vendorDir . '/kirki-framework/control-sortable/src/Field', $vendorDir . '/kirki-framework/control-upload/src/Field', $vendorDir . '/kirki-framework/field-background/src', $vendorDir . '/kirki-framework/field-dimensions/src', $vendorDir . '/kirki-framework/field-fontawesome/src/Field', $vendorDir . '/kirki-framework/field-multicolor/src/Field', $vendorDir . '/kirki-framework/field-typography/src/Field', $vendorDir . '/kirki-framework/control-react-colorful/src/Field'), 'Kirki\\Data\\' => array($vendorDir . '/kirki-framework/data-option/src'), - 'Kirki\\Control\\' => array($vendorDir . '/kirki-framework/control-base/src/Control', $vendorDir . '/kirki-framework/control-checkbox/src/Control', $vendorDir . '/kirki-framework/control-code/src/Control', $vendorDir . '/kirki-framework/control-color/src/Control', $vendorDir . '/kirki-framework/control-color-palette/src/Control', $vendorDir . '/kirki-framework/control-cropped-image/src', $vendorDir . '/kirki-framework/control-custom/src/Control', $vendorDir . '/kirki-framework/control-dashicons/src/Control', $vendorDir . '/kirki-framework/control-date/src/Control', $vendorDir . '/kirki-framework/control-dimension/src/Control', $vendorDir . '/kirki-framework/control-editor/src/Control', $vendorDir . '/kirki-framework/control-generic/src/Control', $vendorDir . '/kirki-framework/control-image/src/Control', $vendorDir . '/kirki-framework/control-multicheck/src/Control', $vendorDir . '/kirki-framework/control-palette/src/Control', $vendorDir . '/kirki-framework/control-radio/src/Control', $vendorDir . '/kirki-framework/control-react-colorful/src/Control', $vendorDir . '/kirki-framework/control-react-select/src/Control', $vendorDir . '/kirki-framework/control-repeater/src/Control', $vendorDir . '/kirki-framework/control-select/src/Control', $vendorDir . '/kirki-framework/control-slider/src/Control', $vendorDir . '/kirki-framework/control-sortable/src/Control', $vendorDir . '/kirki-framework/control-upload/src/Control', $vendorDir . '/kirki-framework/field-multicolor/src/Control', $vendorDir . '/kirki-framework/field-typography/src/Control'), + 'Kirki\\Control\\' => array($vendorDir . '/kirki-framework/control-base/src/Control', $vendorDir . '/kirki-framework/control-checkbox/src/Control', $vendorDir . '/kirki-framework/control-code/src/Control', $vendorDir . '/kirki-framework/control-color/src/Control', $vendorDir . '/kirki-framework/control-color-palette/src/Control', $vendorDir . '/kirki-framework/control-cropped-image/src', $vendorDir . '/kirki-framework/control-custom/src/Control', $vendorDir . '/kirki-framework/control-dashicons/src/Control', $vendorDir . '/kirki-framework/control-date/src/Control', $vendorDir . '/kirki-framework/control-dimension/src/Control', $vendorDir . '/kirki-framework/control-editor/src/Control', $vendorDir . '/kirki-framework/control-generic/src/Control', $vendorDir . '/kirki-framework/control-image/src/Control', $vendorDir . '/kirki-framework/control-multicheck/src/Control', $vendorDir . '/kirki-framework/control-palette/src/Control', $vendorDir . '/kirki-framework/control-radio/src/Control', $vendorDir . '/kirki-framework/control-react-select/src/Control', $vendorDir . '/kirki-framework/control-repeater/src/Control', $vendorDir . '/kirki-framework/control-select/src/Control', $vendorDir . '/kirki-framework/control-slider/src/Control', $vendorDir . '/kirki-framework/control-sortable/src/Control', $vendorDir . '/kirki-framework/control-upload/src/Control', $vendorDir . '/kirki-framework/field-multicolor/src/Control', $vendorDir . '/kirki-framework/field-typography/src/Control', $vendorDir . '/kirki-framework/control-react-colorful/src/Control'), 'Kirki\\Compatibility\\' => array($vendorDir . '/kirki-framework/compatibility/src'), 'Kirki\\' => array($vendorDir . '/kirki-framework/field/src', $vendorDir . '/kirki-framework/googlefonts/src', $vendorDir . '/kirki-framework/l10n/src', $vendorDir . '/kirki-framework/module-panels/src', $vendorDir . '/kirki-framework/module-sections/src', $vendorDir . '/kirki-framework/url-getter/src'), 'Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\' => array($vendorDir . '/dealerdirect/phpcodesniffer-composer-installer/src'), diff --git a/packages/composer/autoload_static.php b/packages/composer/autoload_static.php index e342db46e..e039e308b 100644 --- a/packages/composer/autoload_static.php +++ b/packages/composer/autoload_static.php @@ -43,12 +43,12 @@ class ComposerStaticInitc56aa391ac498061f8d648878e0e6144 0 => __DIR__ . '/..' . '/kirki-framework/module-css/src', 1 => __DIR__ . '/..' . '/kirki-framework/module-editor-styles/src', 2 => __DIR__ . '/..' . '/kirki-framework/module-field-dependencies/src', - 3 => __DIR__ . '/..' . '/kirki-framework/module-preset/src', - 4 => __DIR__ . '/..' . '/kirki-framework/module-section-icons/src', - 5 => __DIR__ . '/..' . '/kirki-framework/module-selective-refresh/src', - 6 => __DIR__ . '/..' . '/kirki-framework/module-tooltips/src', - 7 => __DIR__ . '/..' . '/kirki-framework/module-webfonts/src', - 8 => __DIR__ . '/..' . '/kirki-framework/module-postmessage/src', + 3 => __DIR__ . '/..' . '/kirki-framework/module-postmessage/src', + 4 => __DIR__ . '/..' . '/kirki-framework/module-preset/src', + 5 => __DIR__ . '/..' . '/kirki-framework/module-section-icons/src', + 6 => __DIR__ . '/..' . '/kirki-framework/module-selective-refresh/src', + 7 => __DIR__ . '/..' . '/kirki-framework/module-tooltips/src', + 8 => __DIR__ . '/..' . '/kirki-framework/module-webfonts/src', ), 'Kirki\\Field\\' => array ( @@ -66,18 +66,18 @@ class ComposerStaticInitc56aa391ac498061f8d648878e0e6144 11 => __DIR__ . '/..' . '/kirki-framework/control-multicheck/src/Field', 12 => __DIR__ . '/..' . '/kirki-framework/control-palette/src/Field', 13 => __DIR__ . '/..' . '/kirki-framework/control-radio/src/Field', - 14 => __DIR__ . '/..' . '/kirki-framework/control-react-colorful/src/Field', - 15 => __DIR__ . '/..' . '/kirki-framework/control-react-select/src/Field', - 16 => __DIR__ . '/..' . '/kirki-framework/control-repeater/src/Field', - 17 => __DIR__ . '/..' . '/kirki-framework/control-select/src/Field', - 18 => __DIR__ . '/..' . '/kirki-framework/control-slider/src/Field', - 19 => __DIR__ . '/..' . '/kirki-framework/control-sortable/src/Field', - 20 => __DIR__ . '/..' . '/kirki-framework/control-upload/src/Field', - 21 => __DIR__ . '/..' . '/kirki-framework/field-background/src', - 22 => __DIR__ . '/..' . '/kirki-framework/field-dimensions/src', - 23 => __DIR__ . '/..' . '/kirki-framework/field-fontawesome/src/Field', - 24 => __DIR__ . '/..' . '/kirki-framework/field-multicolor/src/Field', - 25 => __DIR__ . '/..' . '/kirki-framework/field-typography/src/Field', + 14 => __DIR__ . '/..' . '/kirki-framework/control-react-select/src/Field', + 15 => __DIR__ . '/..' . '/kirki-framework/control-repeater/src/Field', + 16 => __DIR__ . '/..' . '/kirki-framework/control-select/src/Field', + 17 => __DIR__ . '/..' . '/kirki-framework/control-slider/src/Field', + 18 => __DIR__ . '/..' . '/kirki-framework/control-sortable/src/Field', + 19 => __DIR__ . '/..' . '/kirki-framework/control-upload/src/Field', + 20 => __DIR__ . '/..' . '/kirki-framework/field-background/src', + 21 => __DIR__ . '/..' . '/kirki-framework/field-dimensions/src', + 22 => __DIR__ . '/..' . '/kirki-framework/field-fontawesome/src/Field', + 23 => __DIR__ . '/..' . '/kirki-framework/field-multicolor/src/Field', + 24 => __DIR__ . '/..' . '/kirki-framework/field-typography/src/Field', + 25 => __DIR__ . '/..' . '/kirki-framework/control-react-colorful/src/Field', ), 'Kirki\\Data\\' => array ( @@ -101,15 +101,15 @@ class ComposerStaticInitc56aa391ac498061f8d648878e0e6144 13 => __DIR__ . '/..' . '/kirki-framework/control-multicheck/src/Control', 14 => __DIR__ . '/..' . '/kirki-framework/control-palette/src/Control', 15 => __DIR__ . '/..' . '/kirki-framework/control-radio/src/Control', - 16 => __DIR__ . '/..' . '/kirki-framework/control-react-colorful/src/Control', - 17 => __DIR__ . '/..' . '/kirki-framework/control-react-select/src/Control', - 18 => __DIR__ . '/..' . '/kirki-framework/control-repeater/src/Control', - 19 => __DIR__ . '/..' . '/kirki-framework/control-select/src/Control', - 20 => __DIR__ . '/..' . '/kirki-framework/control-slider/src/Control', - 21 => __DIR__ . '/..' . '/kirki-framework/control-sortable/src/Control', - 22 => __DIR__ . '/..' . '/kirki-framework/control-upload/src/Control', - 23 => __DIR__ . '/..' . '/kirki-framework/field-multicolor/src/Control', - 24 => __DIR__ . '/..' . '/kirki-framework/field-typography/src/Control', + 16 => __DIR__ . '/..' . '/kirki-framework/control-react-select/src/Control', + 17 => __DIR__ . '/..' . '/kirki-framework/control-repeater/src/Control', + 18 => __DIR__ . '/..' . '/kirki-framework/control-select/src/Control', + 19 => __DIR__ . '/..' . '/kirki-framework/control-slider/src/Control', + 20 => __DIR__ . '/..' . '/kirki-framework/control-sortable/src/Control', + 21 => __DIR__ . '/..' . '/kirki-framework/control-upload/src/Control', + 22 => __DIR__ . '/..' . '/kirki-framework/field-multicolor/src/Control', + 23 => __DIR__ . '/..' . '/kirki-framework/field-typography/src/Control', + 24 => __DIR__ . '/..' . '/kirki-framework/control-react-colorful/src/Control', ), 'Kirki\\Compatibility\\' => array ( diff --git a/packages/composer/installed.json b/packages/composer/installed.json index 2b1014919..b9ae19c1e 100644 --- a/packages/composer/installed.json +++ b/packages/composer/installed.json @@ -1092,17 +1092,17 @@ }, { "name": "kirki-framework/control-react-colorful", - "version": "v1.0.13", - "version_normalized": "1.0.13.0", + "version": "v1.0.14", + "version_normalized": "1.0.14.0", "source": { "type": "git", "url": "https://github.com/kirki-framework/control-react-colorful.git", - "reference": "b388a46480f5743ec998fed04019af0bad1fc744" + "reference": "bcfe71b736f4b43c00b0292e9260c78815808364" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirki-framework/control-react-colorful/zipball/b388a46480f5743ec998fed04019af0bad1fc744", - "reference": "b388a46480f5743ec998fed04019af0bad1fc744", + "url": "https://api.github.com/repos/kirki-framework/control-react-colorful/zipball/bcfe71b736f4b43c00b0292e9260c78815808364", + "reference": "bcfe71b736f4b43c00b0292e9260c78815808364", "shasum": "" }, "require": { @@ -1111,7 +1111,7 @@ "kirki-framework/url-getter": "*", "php": ">=7.0" }, - "time": "2022-02-11T14:29:17+00:00", + "time": "2022-02-11T17:28:13+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -1139,7 +1139,7 @@ ], "support": { "issues": "https://github.com/kirki-framework/control-react-colorful/issues", - "source": "https://github.com/kirki-framework/control-react-colorful/tree/v1.0.13" + "source": "https://github.com/kirki-framework/control-react-colorful/tree/v1.0.14" }, "install-path": "../kirki-framework/control-react-colorful" }, diff --git a/packages/composer/installed.php b/packages/composer/installed.php index 63c4cceb4..d22a24b08 100644 --- a/packages/composer/installed.php +++ b/packages/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '93ec41440e75d4a4d27898b85ebafe4a4c5253f1', + 'reference' => '80f5264f3d4bac337fd4dc07bfca081a56c597a3', 'name' => 'kirki-framework/kirki', 'dev' => true, ), @@ -182,12 +182,12 @@ 'dev_requirement' => false, ), 'kirki-framework/control-react-colorful' => array( - 'pretty_version' => 'v1.0.13', - 'version' => '1.0.13.0', + 'pretty_version' => 'v1.0.14', + 'version' => '1.0.14.0', 'type' => 'library', 'install_path' => __DIR__ . '/../kirki-framework/control-react-colorful', 'aliases' => array(), - 'reference' => 'b388a46480f5743ec998fed04019af0bad1fc744', + 'reference' => 'bcfe71b736f4b43c00b0292e9260c78815808364', 'dev_requirement' => false, ), 'kirki-framework/control-react-select' => array( @@ -322,7 +322,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '93ec41440e75d4a4d27898b85ebafe4a4c5253f1', + 'reference' => '80f5264f3d4bac337fd4dc07bfca081a56c597a3', 'dev_requirement' => false, ), 'kirki-framework/l10n' => array( diff --git a/packages/kirki-framework/control-react-colorful/dist/preview.js b/packages/kirki-framework/control-react-colorful/dist/preview.js index feff38dcd..2c6e22b3d 100644 --- a/packages/kirki-framework/control-react-colorful/dist/preview.js +++ b/packages/kirki-framework/control-react-colorful/dist/preview.js @@ -1,2 +1,2 @@ -(()=>{const o=o=>"number"==typeof o||"string"==typeof o&&!isNaN(o)&&!isNaN(parseFloat(o));wp.hooks.addFilter("kirkiPostMessageStylesOutput","kirki",((a,l,e,s)=>("kirki-react-colorful"!==s||"string"==typeof l||"number"==typeof l||(a+=e.element+"{"+e.property+": "+(a=>(alphaEnabled=!1,a.r||a.g||a.b?(colorMode=void 0!==a.a?"rgba":"rgb",alphaEnabled="rgba"===colorMode||alphaEnabled,pos1=a.r,pos2=a.g,pos3=a.b,pos4="rgba"===colorMode?a.a:1):(a.h||a.s)&&(pos1=a.h,a.l?(colorMode=void 0!==a.a?"hsla":"hsl",pos2=o(a.l)?a.l+"%":a.l):a.v&&(colorMode=void 0!==a.a?"hvla":"hvl",pos2=o(a.v)?a.v+"%":a.v),alphaEnabled="hsla"===colorMode||"hsva"===colorMode||alphaEnabled,pos3=o(a)?a.s+"%":a.s,pos4=alphaEnabled?a.a:1),alphaEnabled?formattedValue=colorMode+"("+pos1+", "+pos2+", "+pos3+", "+pos4+")":formattedValue=colorMode+"("+pos1+", "+pos2+", "+pos3+")",formattedValue))(l)+";\t\t}"),a)))})(); +(()=>{const o=o=>"number"==typeof o||"string"==typeof o&&!isNaN(o)&&!isNaN(parseFloat(o));wp.hooks.addFilter("kirkiPostMessageStylesOutput","kirki",((a,e,l,r)=>{if("kirki-react-colorful"!==r)return a;if("string"==typeof e||"number"==typeof e)return a;const s=l.prefix?l.prefix:"",p=l.suffix?l.suffix:"";return a+=l.element+"{"+l.property+": "+s+(a=>(alphaEnabled=!1,a.r||a.g||a.b?(colorMode=void 0!==a.a?"rgba":"rgb",alphaEnabled="rgba"===colorMode||alphaEnabled,pos1=a.r,pos2=a.g,pos3=a.b,pos4="rgba"===colorMode?a.a:1):(a.h||a.s)&&(pos1=a.h,a.l?(colorMode=void 0!==a.a?"hsla":"hsl",pos2=o(a.l)?a.l+"%":a.l):a.v&&(colorMode=void 0!==a.a?"hvla":"hvl",pos2=o(a.v)?a.v+"%":a.v),alphaEnabled="hsla"===colorMode||"hsva"===colorMode||alphaEnabled,pos3=o(a)?a.s+"%":a.s,pos4=alphaEnabled?a.a:1),alphaEnabled?formattedValue=colorMode+"("+pos1+", "+pos2+", "+pos3+", "+pos4+")":formattedValue=colorMode+"("+pos1+", "+pos2+", "+pos3+")",formattedValue))(e)+p+";\t\t}",a}))})(); //# sourceMappingURL=preview.js.map \ No newline at end of file diff --git a/packages/kirki-framework/control-react-colorful/dist/preview.js.map b/packages/kirki-framework/control-react-colorful/dist/preview.js.map index c8098759e..73a44c205 100644 --- a/packages/kirki-framework/control-react-colorful/dist/preview.js.map +++ b/packages/kirki-framework/control-react-colorful/dist/preview.js.map @@ -1 +1 @@ -{"version":3,"file":"preview.js","mappings":"AAAA,MAUC,MAAMA,EAAaC,GAGd,iBAAoBA,GAGpB,iBAAoBA,IAGfC,MAAMD,KAASC,MAAMC,WAAWF,IAyE1CG,GAAGC,MAAMC,UAAU,+BAAgC,SAd9B,CAACC,EAAQC,EAAOC,EAAQC,KAExC,yBAA2BA,GAC3B,iBAAoBF,GAAS,iBAAoBA,IAErDD,GAAUE,EAAOE,QAAU,IACxBF,EAAOG,SAAW,KAvDOJ,CAAAA,IAE5BK,cAAe,EAEXL,EAAMM,GAAKN,EAAMO,GAAKP,EAAMQ,GAC/BC,eAAY,IAAuBT,EAAMU,EAAI,OAAS,MACtDL,aAAe,SAAWI,WAAmBJ,aAE7CM,KAAOX,EAAMM,EACbM,KAAOZ,EAAMO,EACbM,KAAOb,EAAMQ,EACbM,KAAO,SAAWL,UAAYT,EAAMU,EAAI,IAC9BV,EAAMe,GAAKf,EAAMgB,KAC3BL,KAAOX,EAAMe,EAETf,EAAMiB,GACTR,eAAY,IAAuBT,EAAMU,EAAI,OAAS,MACtDE,KAAOpB,EAAUQ,EAAMiB,GAAKjB,EAAMiB,EAAI,IAAMjB,EAAMiB,GACxCjB,EAAMkB,IAChBT,eAAY,IAAuBT,EAAMU,EAAI,OAAS,MACtDE,KAAOpB,EAAUQ,EAAMkB,GAAKlB,EAAMkB,EAAI,IAAMlB,EAAMkB,GAGnDb,aAAe,SAAWI,WAAa,SAAWA,WAAmBJ,aAErEQ,KAAOrB,EAAUQ,GAASA,EAAMgB,EAAI,IAAMhB,EAAMgB,EAChDF,KAAOT,aAAeL,EAAMU,EAAI,GAG7BL,aACHc,eAAiBV,UAAY,IAAME,KAAO,KAAOC,KAAO,KAAOC,KAAO,KAAOC,KAAO,IAEpFK,eAAiBV,UAAY,IAAME,KAAO,KAAOC,KAAO,KAAOC,KAAO,IAGhEM,gBAoBqBC,CAAoBpB,GAAS,UAJND,MAhFrD","sources":["webpack://control-react-colorful/./src/preview.js"],"sourcesContent":["(() => {\n\t/**\n\t * Check if the provided value is a numeric.\n\t *\n\t * Thanks to Dan (https://stackoverflow.com/users/17121/dan) for his answer on StackOverflow:\n\t * @see https://stackoverflow.com/questions/175739/built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number#answer-175787\n\t *\n\t * @param {string|number} str The provided value.\n\t * @return bool\n\t */\n\tconst isNumeric = (str) => {\n\n\t\t// Number is a numeric.\n\t\tif ('number' === typeof str) return true;\n\n\t\t// We only process strings.\n\t\tif ('string' !== typeof str) return false;\n\n\t\t// Use type coercion to parse the entirety of the string (`parseFloat` alone does not do this) and ensure strings of whitespace fail.\n\t\treturn (!isNaN(str) && !isNaN(parseFloat(str)));\n\n\t};\n\n\t/**\n\t * Generate value from color object.\n\t *\n\t * @param {Object} value The value.\n\t * @return string\n\t */\n\tconst generateStringValue = (value) => {\n\n\t\talphaEnabled = false;\n\n\t\tif (value.r || value.g || value.b) {\n\t\t\tcolorMode = \"undefined\" !== typeof value.a ? 'rgba' : 'rgb';\n\t\t\talphaEnabled = 'rgba' === colorMode ? true : alphaEnabled;\n\n\t\t\tpos1 = value.r;\n\t\t\tpos2 = value.g;\n\t\t\tpos3 = value.b;\n\t\t\tpos4 = 'rgba' === colorMode ? value.a : 1;\n\t\t} else if (value.h || value.s) {\n\t\t\tpos1 = value.h;\n\n\t\t\tif (value.l) {\n\t\t\t\tcolorMode = \"undefined\" !== typeof value.a ? 'hsla' : 'hsl';\n\t\t\t\tpos2 = isNumeric(value.l) ? value.l + '%' : value.l;\n\t\t\t} else if (value.v) {\n\t\t\t\tcolorMode = \"undefined\" !== typeof value.a ? 'hvla' : 'hvl';\n\t\t\t\tpos2 = isNumeric(value.v) ? value.v + '%' : value.v;\n\t\t\t}\n\n\t\t\talphaEnabled = 'hsla' === colorMode || 'hsva' === colorMode ? true : alphaEnabled;\n\n\t\t\tpos3 = isNumeric(value) ? value.s + '%' : value.s;\n\t\t\tpos4 = alphaEnabled ? value.a : 1;\n\t\t}\n\n\t\tif (alphaEnabled) {\n\t\t\tformattedValue = colorMode + '(' + pos1 + ', ' + pos2 + ', ' + pos3 + ', ' + pos4 + ')';\n\t\t} else {\n\t\t\tformattedValue = colorMode + '(' + pos1 + ', ' + pos2 + ', ' + pos3 + ')';\n\t\t}\n\n\t\treturn formattedValue;\n\n\t};\n\n\t/**\n\t * Function to hook into `kirkiPostMessageStylesOutput` filter.\n\t *\n\t * @param {string} styles The styles to be filtered.\n\t * @param {string|Object|int} value The control's value.\n\t * @param {Object} output The control's output argument.\n\t * @param {string} controlType The control type.\n\t *\n\t * @return {string} The filtered styles.\n\t */\n\tconst stylesOutput = (styles, value, output, controlType) => {\n\n\t\tif ('kirki-react-colorful' !== controlType) return styles;\n\t\tif ('string' === typeof value || 'number' === typeof value) return styles;\n\n\t\tstyles += output.element + '{'\n\t\t\t+ output.property + ': ' + generateStringValue(value) + ';\\\n\t\t}';\n\n\t\treturn styles;\n\n\t};\n\n\t// Hook the function to the `kirkiPostMessageStylesOutput` filter.\n\twp.hooks.addFilter('kirkiPostMessageStylesOutput', 'kirki', stylesOutput);\n})();\n"],"names":["isNumeric","str","isNaN","parseFloat","wp","hooks","addFilter","styles","value","output","controlType","element","property","alphaEnabled","r","g","b","colorMode","a","pos1","pos2","pos3","pos4","h","s","l","v","formattedValue","generateStringValue"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"preview.js","mappings":"AAAA,MAUC,MAAMA,EAAaC,GAGd,iBAAoBA,GAGpB,iBAAoBA,IAGfC,MAAMD,KAASC,MAAMC,WAAWF,IA4E1CG,GAAGC,MAAMC,UAAU,+BAAgC,SAjB9B,CAACC,EAAQC,EAAOC,EAAQC,KAE5C,GAAI,yBAA2BA,EAAa,OAAOH,EACnD,GAAI,iBAAoBC,GAAS,iBAAoBA,EAAO,OAAOD,EAEnE,MAAMI,EAASF,EAAOE,OAASF,EAAOE,OAAS,GACzCC,EAASH,EAAOG,OAASH,EAAOG,OAAS,GAM/C,OAJAL,GAAUE,EAAOI,QAAU,IACxBJ,EAAOK,SAAW,KAAOH,EA1DAH,CAAAA,IAE5BO,cAAe,EAEXP,EAAMQ,GAAKR,EAAMS,GAAKT,EAAMU,GAC/BC,eAAY,IAAuBX,EAAMY,EAAI,OAAS,MACtDL,aAAe,SAAWI,WAAmBJ,aAE7CM,KAAOb,EAAMQ,EACbM,KAAOd,EAAMS,EACbM,KAAOf,EAAMU,EACbM,KAAO,SAAWL,UAAYX,EAAMY,EAAI,IAC9BZ,EAAMiB,GAAKjB,EAAMkB,KAC3BL,KAAOb,EAAMiB,EAETjB,EAAMmB,GACTR,eAAY,IAAuBX,EAAMY,EAAI,OAAS,MACtDE,KAAOtB,EAAUQ,EAAMmB,GAAKnB,EAAMmB,EAAI,IAAMnB,EAAMmB,GACxCnB,EAAMoB,IAChBT,eAAY,IAAuBX,EAAMY,EAAI,OAAS,MACtDE,KAAOtB,EAAUQ,EAAMoB,GAAKpB,EAAMoB,EAAI,IAAMpB,EAAMoB,GAGnDb,aAAe,SAAWI,WAAa,SAAWA,WAAmBJ,aAErEQ,KAAOvB,EAAUQ,GAASA,EAAMkB,EAAI,IAAMlB,EAAMkB,EAChDF,KAAOT,aAAeP,EAAMY,EAAI,GAG7BL,aACHc,eAAiBV,UAAY,IAAME,KAAO,KAAOC,KAAO,KAAOC,KAAO,KAAOC,KAAO,IAEpFK,eAAiBV,UAAY,IAAME,KAAO,KAAOC,KAAO,KAAOC,KAAO,IAGhEM,gBAuB8BC,CAAoBtB,GAASI,EAAS,SAGpEL,MA1FT","sources":["webpack://control-react-colorful/./src/preview.js"],"sourcesContent":["(() => {\n\t/**\n\t * Check if the provided value is a numeric.\n\t *\n\t * Thanks to Dan (https://stackoverflow.com/users/17121/dan) for his answer on StackOverflow:\n\t * @see https://stackoverflow.com/questions/175739/built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number#answer-175787\n\t *\n\t * @param {string|number} str The provided value.\n\t * @return bool\n\t */\n\tconst isNumeric = (str) => {\n\n\t\t// Number is a numeric.\n\t\tif ('number' === typeof str) return true;\n\n\t\t// We only process strings.\n\t\tif ('string' !== typeof str) return false;\n\n\t\t// Use type coercion to parse the entirety of the string (`parseFloat` alone does not do this) and ensure strings of whitespace fail.\n\t\treturn (!isNaN(str) && !isNaN(parseFloat(str)));\n\n\t};\n\n\t/**\n\t * Generate value from color object.\n\t *\n\t * @param {Object} value The value.\n\t * @return string\n\t */\n\tconst generateStringValue = (value) => {\n\n\t\talphaEnabled = false;\n\n\t\tif (value.r || value.g || value.b) {\n\t\t\tcolorMode = \"undefined\" !== typeof value.a ? 'rgba' : 'rgb';\n\t\t\talphaEnabled = 'rgba' === colorMode ? true : alphaEnabled;\n\n\t\t\tpos1 = value.r;\n\t\t\tpos2 = value.g;\n\t\t\tpos3 = value.b;\n\t\t\tpos4 = 'rgba' === colorMode ? value.a : 1;\n\t\t} else if (value.h || value.s) {\n\t\t\tpos1 = value.h;\n\n\t\t\tif (value.l) {\n\t\t\t\tcolorMode = \"undefined\" !== typeof value.a ? 'hsla' : 'hsl';\n\t\t\t\tpos2 = isNumeric(value.l) ? value.l + '%' : value.l;\n\t\t\t} else if (value.v) {\n\t\t\t\tcolorMode = \"undefined\" !== typeof value.a ? 'hvla' : 'hvl';\n\t\t\t\tpos2 = isNumeric(value.v) ? value.v + '%' : value.v;\n\t\t\t}\n\n\t\t\talphaEnabled = 'hsla' === colorMode || 'hsva' === colorMode ? true : alphaEnabled;\n\n\t\t\tpos3 = isNumeric(value) ? value.s + '%' : value.s;\n\t\t\tpos4 = alphaEnabled ? value.a : 1;\n\t\t}\n\n\t\tif (alphaEnabled) {\n\t\t\tformattedValue = colorMode + '(' + pos1 + ', ' + pos2 + ', ' + pos3 + ', ' + pos4 + ')';\n\t\t} else {\n\t\t\tformattedValue = colorMode + '(' + pos1 + ', ' + pos2 + ', ' + pos3 + ')';\n\t\t}\n\n\t\treturn formattedValue;\n\n\t};\n\n\t/**\n\t * Function to hook into `kirkiPostMessageStylesOutput` filter.\n\t *\n\t * @param {string} styles The styles to be filtered.\n\t * @param {string|Object|int} value The control's value.\n\t * @param {Object} output The control's output argument.\n\t * @param {string} controlType The control type.\n\t *\n\t * @return {string} The filtered styles.\n\t */\n\tconst stylesOutput = (styles, value, output, controlType) => {\n\n\t\tif ('kirki-react-colorful' !== controlType) return styles;\n\t\tif ('string' === typeof value || 'number' === typeof value) return styles;\n\n\t\tconst prefix = output.prefix ? output.prefix : '';\n\t\tconst suffix = output.suffix ? output.suffix : \"\";\n\n\t\tstyles += output.element + '{'\n\t\t\t+ output.property + ': ' + prefix + generateStringValue(value) + suffix + ';\\\n\t\t}';\n\n\t\treturn styles;\n\n\t};\n\n\t// Hook the function to the `kirkiPostMessageStylesOutput` filter.\n\twp.hooks.addFilter('kirkiPostMessageStylesOutput', 'kirki', stylesOutput);\n})();\n"],"names":["isNumeric","str","isNaN","parseFloat","wp","hooks","addFilter","styles","value","output","controlType","prefix","suffix","element","property","alphaEnabled","r","g","b","colorMode","a","pos1","pos2","pos3","pos4","h","s","l","v","formattedValue","generateStringValue"],"sourceRoot":""} \ No newline at end of file diff --git a/packages/kirki-framework/control-react-colorful/src/Control/ReactColorful.php b/packages/kirki-framework/control-react-colorful/src/Control/ReactColorful.php index 19e095a83..b294ee143 100644 --- a/packages/kirki-framework/control-react-colorful/src/Control/ReactColorful.php +++ b/packages/kirki-framework/control-react-colorful/src/Control/ReactColorful.php @@ -42,7 +42,7 @@ class ReactColorful extends Base { * @since 1.0 * @var string */ - public static $control_ver = '1.0.13'; + public static $control_ver = '1.0.14'; /** * The color mode. diff --git a/packages/kirki-framework/control-react-colorful/src/Field/CSS/ReactColorful.php b/packages/kirki-framework/control-react-colorful/src/Field/CSS/ReactColorful.php index 4c335423e..03d827c42 100644 --- a/packages/kirki-framework/control-react-colorful/src/Field/CSS/ReactColorful.php +++ b/packages/kirki-framework/control-react-colorful/src/Field/CSS/ReactColorful.php @@ -34,12 +34,14 @@ protected function process_output( $output, $value ) { 'media_query' => 'global', 'element' => '', 'property' => 'color', + 'prefix' => '', + 'suffix' => '', ) ); // Only need to process further if the $value format is array. if ( ! is_array( $value ) ) { - $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $value; + $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $value . $output['suffix']; return; } @@ -76,7 +78,7 @@ protected function process_output( $output, $value ) { $formatted_value = $color_mode . '(' . $pos_1 . ', ' . $pos_2 . ', ' . $pos_3 . ')'; } - $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $formatted_value; + $this->styles[ $output['media_query'] ][ $output['element'] ][ $output['property'] ] = $output['prefix'] . $formatted_value . $output['suffix']; } diff --git a/packages/kirki-framework/control-react-colorful/src/Field/ReactColorful.php b/packages/kirki-framework/control-react-colorful/src/Field/ReactColorful.php index 0484719c6..5c6051618 100644 --- a/packages/kirki-framework/control-react-colorful/src/Field/ReactColorful.php +++ b/packages/kirki-framework/control-react-colorful/src/Field/ReactColorful.php @@ -87,7 +87,7 @@ public function filter_setting_args( $args, $wp_customize ) { } // For postMessage/preview purpose, if property is not set, then set it to 'color'. - if ( isset( $args['output'] ) && ! empty( $args['output'] ) && is_array( $args['output'] ) ) { + if ( isset( $args['output'] ) && ! empty( $args['output'] ) && is_array( $args['output'] ) && ! isset( $args['output']['element'] ) ) { foreach ( $args['output'] as $index => $output ) { if ( ! isset( $output['property'] ) ) { if ( empty( $args['output'][ $index ] ) ) {