Kirki - Version 3.0.17

Version Description

December 5 2017, dev time: 46 hours

  • Fix: In some cases options were not saved when using option instead of the default theme_mod #1665
  • Fix: link control-type (alias of url) was not working #1660
  • Fix: Allow using tabs & linebreaks when defining elements in the output argument #1659
  • Fix: PHP Warning when using code controls without a label defined #1658
  • Fix: Buttons inside number controls were not increasing/decreasing the values #1648
  • Fix: JS error - only on Safari - for Select controls #1662
  • Fix: Unable to deselect all options from multiselect controls #1670
  • Fix: multicolor controls missing the alpha channel #1657
  • Fix: Unable to manually edit value in multicolor controls #1666
  • New: Transitioned to a JS-based webfont loader method to load google-fonts instead of using a link.
  • New: Moved select controls to new JS implementation.
  • New: Moved text and textarea controls (generic controls) to new JS implementation.
  • New: Added text-transform to typography fields #1642
  • New: Refactored typography controls loading for better efficiency and performance
  • New: Removed PHP implementation for field dependencies, now using a pure JS solution.
  • New: Added support for "outer" sections #1683
  • New: Added new Kirki::remove_control(), Kirki::remove_section() and Kirki::remove_panel() methods.
  • New: Added 2 new filters: kirki/{$config_id}/webfonts/skip_hidden and kirki/{$config_id}/css/skip_hidden #1678
  • Tweak: Validation & Sanitization for dimension and dimensions controls.
  • Tweak: Refactored multicolor controls a bit.
Download this release

Release Info

Developer aristath
Plugin Icon 128x128 Kirki
Version 3.0.17
Comparing to
See all releases

Code changes from version 3.0.16 to 3.0.17

Files changed (51) hide show
  1. assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js +5 -1
  2. controls/class-kirki-controls.php +70 -0
  3. controls/css/styles-legacy.css +672 -0
  4. controls/css/styles-legacy.min.css +1 -0
  5. controls/css/styles.css +57 -78
  6. controls/css/styles.min.css +1 -0
  7. controls/js/dist/script-legacy.js +705 -136
  8. controls/js/dist/script-legacy.min.js +1 -1
  9. controls/js/dist/script.js +817 -260
  10. controls/js/dist/script.min.js +1 -1
  11. controls/php/class-kirki-control-base.php +25 -1
  12. controls/php/class-kirki-control-generic.php +0 -38
  13. controls/php/class-kirki-control-multicolor.php +36 -5
  14. controls/php/class-kirki-control-radio.php +0 -30
  15. controls/php/class-kirki-control-select.php +0 -48
  16. controls/php/class-kirki-control-typography.php +50 -23
  17. controls/views/color.php +35 -0
  18. controls/views/generic.php +31 -0
  19. controls/views/radio.php +36 -0
  20. controls/views/select.php +56 -0
  21. controls/views/textarea.php +30 -0
  22. core/class-kirki-active-callback.php +0 -187
  23. core/class-kirki-control.php +3 -3
  24. core/class-kirki-field.php +10 -1
  25. core/class-kirki-helper.php +43 -0
  26. core/class-kirki-init.php +43 -7
  27. core/class-kirki-sanitize-values.php +3 -3
  28. core/class-kirki-section.php +4 -0
  29. core/class-kirki-sections.php +48 -0
  30. core/class-kirki.php +72 -6
  31. core/deprecated.php +18 -0
  32. example.php +0 -761
  33. field/class-kirki-field-dimension.php +11 -0
  34. field/class-kirki-field-link.php +1 -1
  35. field/class-kirki-field-typography.php +5 -0
  36. kirki.php +15 -5
  37. lib/class-aricolor.php +5 -5
  38. modules/css/class-kirki-modules-css-generator.php +1 -1
  39. modules/css/class-kirki-modules-css.php +14 -12
  40. modules/css/class-kirki-output.php +21 -8
  41. modules/css/field/class-kirki-output-field-dimensions.php +13 -7
  42. modules/css/field/class-kirki-output-field-typography.php +10 -0
  43. modules/field-dependencies/class-kirki-modules-field-dependencies.php +3 -9
  44. modules/field-dependencies/field-dependencies.js +130 -135
  45. modules/postmessage/class-kirki-modules-postmessage.php +34 -48
  46. modules/tooltips/tooltip.js +1 -1
  47. modules/webfonts/class-kirki-fonts-google.php +27 -0
  48. modules/webfonts/class-kirki-modules-webfonts.php +16 -15
  49. modules/webfonts/webfonts.json +1 -0
  50. modules/webfonts/webfonts.php +1 -1
  51. readme.txt +30 -5
assets/vendor/wp-color-picker-alpha/wp-color-picker-alpha.js CHANGED
@@ -106,7 +106,11 @@
106
.insertBefore( self.wrappingLabel )
107
.css( { backgroundColor: self.initialValue } );
108
// Set the toggle button span element text.
109
- self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick );
110
// Set up the Iris container and insert it after the wrapping label.
111
self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel );
112
// Store a reference to the Clear/Default button.
106
.insertBefore( self.wrappingLabel )
107
.css( { backgroundColor: self.initialValue } );
108
// Set the toggle button span element text.
109
+ if ( el.data( 'label' ) ) {
110
+ self.toggler.find( '.wp-color-result-text' ).text( el.data( 'label' ) );
111
+ } else {
112
+ self.toggler.find( '.wp-color-result-text' ).text( wpColorPickerL10n.pick );
113
+ }
114
// Set up the Iris container and insert it after the wrapping label.
115
self.pickerContainer = $( _after ).insertAfter( self.wrappingLabel );
116
// Store a reference to the Clear/Default button.
controls/class-kirki-controls.php ADDED
@@ -0,0 +1,70 @@
1
+ <?php
2
+ /**
3
+ * Customizer Controls Init.
4
+ *
5
+ * @package Kirki
6
+ * @subpackage Controls
7
+ * @copyright Copyright (c) 2017, Aristeides Stathopoulos
8
+ * @license http://opensource.org/licenses/https://opensource.org/licenses/MIT
9
+ * @since 3.0.17
10
+ */
11
+
12
+ /**
13
+ * Controls.
14
+ */
15
+ class Kirki_Controls {
16
+
17
+ /**
18
+ * An array of templates to load.
19
+ *
20
+ * @access private
21
+ * @since 3.0.17
22
+ * @var array
23
+ */
24
+ private $templates = array(
25
+ 'color',
26
+ 'generic',
27
+ 'radio',
28
+ 'select',
29
+ 'textarea',
30
+ );
31
+
32
+ /**
33
+ * Path to controls views.
34
+ *
35
+ * @access private
36
+ * @since 3.0.17
37
+ * @var string
38
+ */
39
+ private $views_path;
40
+
41
+ /**
42
+ * Constructor.
43
+ *
44
+ * @access public
45
+ * @since 3.0.17
46
+ */
47
+ public function __construct() {
48
+
49
+ if ( ! $this->views_path ) {
50
+ $this->views_path = wp_normalize_path( dirname( KIRKI_PLUGIN_FILE ) . '/controls/views/' );
51
+ }
52
+ add_action( 'customize_controls_print_footer_scripts', array( $this, 'underscore_templates' ) );
53
+ }
54
+
55
+ /**
56
+ * Adds underscore.js templates to the footer.
57
+ *
58
+ * @access public
59
+ * @since 3.0.17
60
+ */
61
+ public function underscore_templates() {
62
+ foreach ( $this->templates as $template ) {
63
+ if ( file_exists( $this->views_path . $template . '.php' ) ) {
64
+ echo '<script type="text/html" id="tmpl-kirki-input-' . esc_attr( $template ) . '">';
65
+ include $this->views_path . $template . '.php';
66
+ echo '</script>';
67
+ }
68
+ }
69
+ }
70
+ }
controls/css/styles-legacy.css ADDED
@@ -0,0 +1,672 @@
1
+ @charset "UTF-8";
2
+ .customize-control-kirki-background {
3
+ position: relative; }
4
+ .customize-control-kirki-background .background-attachment h4,
5
+ .customize-control-kirki-background .background-color h4,
6
+ .customize-control-kirki-background .background-position h4,
7
+ .customize-control-kirki-background .background-repeat h4,
8
+ .customize-control-kirki-background .background-size h4 {
9
+ margin-bottom: 5px; }
10
+ .customize-control-kirki-background .background-attachment .buttonset,
11
+ .customize-control-kirki-background .background-size .buttonset {
12
+ display: flex;
13
+ flex-wrap: wrap; }
14
+ .customize-control-kirki-background .background-attachment .buttonset .switch-label,
15
+ .customize-control-kirki-background .background-size .buttonset .switch-label {
16
+ background: rgba(0, 0, 0, 0.05);
17
+ border: 1px solid rgba(0, 0, 0, 0.1);
18
+ color: #555;
19
+ padding: 0.5em 1em;
20
+ margin: 0;
21
+ text-align: center;
22
+ flex-grow: 1; }
23
+ .customize-control-kirki-background .background-attachment .buttonset .switch-input:checked + .switch-label,
24
+ .customize-control-kirki-background .background-size .buttonset .switch-input:checked + .switch-label {
25
+ background-color: #3498DB;
26
+ color: #fff; }
27
+
28
+ .customize-control-kirki-code textarea {
29
+ width: 100%;
30
+ min-height: 200px; }
31
+
32
+ .customize-control-kirki-color-palette {
33
+ position: relative; }
34
+ .customize-control-kirki-color-palette label {
35
+ position: relative;
36
+ display: inline-block;
37
+ padding: 0;
38
+ margin: 0; }
39
+ .customize-control-kirki-color-palette .colors-wrapper {
40
+ max-height: 300px;
41
+ overflow-y: auto;
42
+ padding: 10px;
43
+ display: flex;
44
+ flex-wrap: wrap; }
45
+ .customize-control-kirki-color-palette .colors-wrapper .color-palette-color {
46
+ color: transparent;
47
+ display: block;
48
+ width: 100%;
49
+ height: 100%;
50
+ overflow: hidden;
51
+ border: 1px solid rgba(0, 0, 0, 0.2); }
52
+ .customize-control-kirki-color-palette .colors-wrapper.round label {
53
+ padding: 3px; }
54
+ .customize-control-kirki-color-palette .colors-wrapper.round .color-palette-color {
55
+ border-radius: 50%; }
56
+ .customize-control-kirki-color-palette .colors-wrapper.box-shadow .color-palette-color {
57
+ box-shadow: inset 3px 3px 13px 2px rgba(0, 0, 0, 0.22); }
58
+ .customize-control-kirki-color-palette .colors-wrapper input:checked + label .color-palette-color {
59
+ border: 0;
60
+ width: 150%;
61
+ height: 150%;
62
+ position: relative;
63
+ left: -25%;
64
+ top: -25%;
65
+ z-index: 99; }
66
+ .customize-control-kirki-color-palette .colors-wrapper.with-margin label {
67
+ margin: 3px; }
68
+ .customize-control-kirki-color-palette .colors-wrapper input {
69
+ display: none; }
70
+ .customize-control-kirki-color-palette .colors-wrapper input:checked + label .color-palette-color {
71
+ box-shadow: 1px 1px 10px 1px #333333;
72
+ border: 1px solid rgba(0, 0, 0, 0.3); }
73
+
74
+ .customize-control-kirki-color input[data-type="hue"] + .iris-strip-horiz .iris-slider {
75
+ background-image: -webkit-linear-gradient(left, red, #ff7f00, yellow, #80ff00, lime, #00ff80, cyan, #007fff, blue, #7f00ff, magenta, #ff0080, red) !important; }
76
+
77
+ .customize-control-kirki-dashicons {
78
+ position: relative; }
79
+ .customize-control-kirki-dashicons label {
80
+ position: relative;
81
+ display: inline-block; }
82
+ .customize-control-kirki-dashicons .icons-wrapper {
83
+ max-height: 300px;
84
+ overflow-y: scroll; }
85
+ .customize-control-kirki-dashicons .icons-wrapper h4 {
86
+ font-weight: 300;
87
+ margin: 0.7em 0; }
88
+ .customize-control-kirki-dashicons .icons-wrapper .dashicons {
89
+ padding: 3px;
90
+ font-size: 25px;
91
+ width: 25px;
92
+ height: 25px;
93
+ border: 1px solid transparent; }
94
+ .customize-control-kirki-dashicons .icons-wrapper input {
95
+ display: none; }
96
+ .customize-control-kirki-dashicons .icons-wrapper input:checked + label .dashicons {
97
+ border: 1px solid #3498DB;
98
+ color: #000; }
99
+
100
+ .wp-customizer div.ui-datepicker {
101
+ z-index: 500001 !important;
102
+ width: 255px;
103
+ background: #fff;
104
+ border: 1px solid #dedede; }
105
+ .wp-customizer div.ui-datepicker .ui-datepicker-header {
106
+ padding: 10px;
107
+ background: #e5e5e5;
108
+ border-bottom: 1px solid #fff; }
109
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next,
110
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev {
111
+ display: block;
112
+ position: absolute;
113
+ width: 1em;
114
+ overflow: hidden; }
115
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after, .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before,
116
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after,
117
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
118
+ font-family: dashicons; }
119
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after:hover, .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before:hover,
120
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after:hover,
121
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before:hover {
122
+ cursor: pointer; }
123
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next .ui-icon,
124
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev .ui-icon {
125
+ display: none; }
126
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev {
127
+ left: 10px; }
128
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before {
129
+ content: "\f341"; }
130
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next {
131
+ right: 10px; }
132
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after {
133
+ content: "\f345"; }
134
+ .wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-title {
135
+ text-align: center; }
136
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar {
137
+ border-collapse: collapse;
138
+ width: 100%; }
139
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar thead {
140
+ background: #e5e5e5;
141
+ padding: 5px; }
142
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td {
143
+ text-align: center; }
144
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a {
145
+ display: block;
146
+ padding: 5px;
147
+ color: #333;
148
+ text-decoration: none; }
149
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a.ui-state-active, .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a:hover {
150
+ color: #fff;
151
+ background-color: #0073aa; }
152
+ .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled a, .wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled .ui-state-default a {
153
+ color: #999; }
154
+
155
+ .customize-control-kirki-dimensions {
156
+ position: relative; }
157
+ .customize-control-kirki-dimensions .wrapper {
158
+ border: 1px solid rgba(0, 0, 0, 0.1);
159
+ padding: 10px; }
160
+ .customize-control-kirki-dimensions .wrapper .control {
161
+ display: flex;
162
+ flex-wrap: wrap;
163
+ justify-content: space-between; }
164
+ .customize-control-kirki-dimensions .wrapper .control > div {
165
+ width: 48%; }
166
+ .customize-control-kirki-dimensions .wrapper .control > div h5 {
167
+ margin: 10px 0 7px; }
168
+ .customize-control-kirki-dimensions .wrapper .control > div .inner {
169
+ display: flex; }
170
+
171
+ .customize-control-kirki-editor textarea {
172
+ width: 100%; }
173
+
174
+ .customize-control-kirki-generic input {
175
+ width: 100%; }
176
+ .customize-control-kirki-generic textarea {
177
+ width: 100%;
178
+ border: 1px solid rgba(0, 0, 0, 0.1);
179
+ -webkit-box-shadow: none;
180
+ box-shadow: none; }
181
+
182
+ .customize-control-kirki-multicolor {
183
+ position: relative; }
184
+ .customize-control-kirki-multicolor .multicolor-group-wrapper {
185
+ display: flex; }
186
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper {
187
+ width: 100%; }
188
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper label {
189
+ display: block;
190
+ text-align: center;
191
+ padding: 3px; }
192
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container {
193
+ width: 100%; }
194
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result {
195
+ width: 100%;
196
+ height: 30px;
197
+ padding-left: 0;
198
+ border-radius: 0;
199
+ border: none;
200
+ margin-right: 0; }
201
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result > span {
202
+ border-top-left-radius: 0 !important;
203
+ border-bottom-left-radius: 0 !important;
204
+ border-top-right-radius: 0 !important;
205
+ border-bottom-right-radius: 0 !important; }
206
+ .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result .wp-color-result-text {
207
+ display: none !important; }
208
+
209
+ .customize-control-kirki-number .customize-control-content {
210
+ display: flex;
211
+ align-items: stretch; }
212
+ .customize-control-kirki-number .customize-control-content input {
213
+ width: 100%;
214
+ -moz-appearance: textfield; }
215
+ .customize-control-kirki-number .customize-control-content input::-webkit-inner-spin-button, .customize-control-kirki-number .customize-control-content input::-webkit-outer-spin-button {
216
+ -webkit-appearance: none;
217
+ margin: 0; }
218
+ .customize-control-kirki-number .customize-control-content .quantity {
219
+ min-width: 2rem;
220
+ max-width: 2rem;
221
+ text-align: center;
222
+ line-height: 24px; }
223
+
224
+ .customize-control-kirki-palette {
225
+ position: relative; }
226
+ .customize-control-kirki-palette input[type="radio"] {
227
+ display: none; }
228
+ .customize-control-kirki-palette input[type="radio"]:checked + label {
229
+ border: 3px solid rgba(0, 0, 0, 0.4); }
230
+ .customize-control-kirki-palette label {
231
+ background: none;
232
+ padding: 0;
233
+ border-top: 3px solid transparent;
234
+ border-bottom: 3px solid transparent;
235
+ margin-bottom: 5px;
236
+ display: flex; }
237
+ .customize-control-kirki-palette label span {
238
+ padding: 10px 0;
239
+ flex-grow: 1;
240
+ font-size: 0;
241
+ line-height: 10px;
242
+ color: rgba(0, 0, 0, 0);
243
+ -webkit-transition: all 200ms ease-in-out;
244
+ -moz-transition: all 200ms ease-in-out;
245
+ -ms-transition: all 200ms ease-in-out;
246
+ -o-transition: all 200ms ease-in-out;
247
+ transition: all 200ms ease-in-out;
248
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
249
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
250
+ .customize-control-kirki-palette label span:first-child {
251
+ border-left: 1px solid rgba(0, 0, 0, 0.1); }
252
+ .customize-control-kirki-palette label span:last-child {
253
+ border-right: 1px solid rgba(0, 0, 0, 0.1); }
254
+ .customize-control-kirki-palette label span:hover {
255
+ padding: 10px;
256
+ flex-grow: 3;
257
+ min-width: 60px;
258
+ font-size: 10px;
259
+ line-height: 10px;
260
+ color: #000; }
261
+
262
+ .customize-control-kirki-radio-buttonset .buttonset {
263
+ display: flex;
264
+ flex-wrap: wrap; }
265
+ .customize-control-kirki-radio-buttonset .buttonset .switch-label {
266
+ background: rgba(0, 0, 0, 0.1);
267
+ border: 1px rgba(0, 0, 0, 0.1);
268
+ color: rgba(50, 55, 60, 0.5);
269
+ margin: 0;
270
+ text-align: center;
271
+ padding: 0.5em 1em;
272
+ flex-grow: 1; }
273
+ .customize-control-kirki-radio-buttonset .buttonset .switch-input:checked + .switch-label {
274
+ background-color: #00a0d2;
275
+ color: rgba(255, 255, 255, 0.8); }
276
+
277
+ .customize-control-kirki-radio-image > .image {
278
+ display: flex;
279
+ flex-wrap: wrap; }
280
+ .customize-control-kirki-radio-image label {
281
+ position: relative;
282
+ display: inline-block; }
283
+ .customize-control-kirki-radio-image label .image-label {
284
+ display: none;
285
+ position: absolute;
286
+ top: 0;
287
+ left: 0;
288
+ width: 100%;
289
+ height: 100%;
290
+ background: rgba(255, 255, 255, 0.7);
291
+ font-weight: bold; }
292
+ .customize-control-kirki-radio-image label .image-label .inner {
293
+ width: 100%;
294
+ height: 100%;
295
+ text-align: center;
296
+ padding: 0.5em;
297
+ vertical-align: middle; }
298
+ .customize-control-kirki-radio-image label:hover .image-label {
299
+ display: block; }
300
+ .customize-control-kirki-radio-image input {
301
+ display: none; }
302
+ .customize-control-kirki-radio-image input img {
303
+ border: 1px solid transparent; }
304
+ .customize-control-kirki-radio-image input:checked + label img {
305
+ -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
306
+ box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
307
+ border: 1px solid #3498DB; }
308
+ .customize-control-kirki-radio-image input + label .image-clickable {
309
+ position: absolute;
310
+ top: 0;
311
+ bottom: 0;
312
+ left: 0;
313
+ right: 0;
314
+ width: 100%;
315
+ height: 100%; }
316
+
317
+ .customize-control-kirki-radio {
318
+ position: relative; }
319
+ .customize-control-kirki-radio input[type=radio] {
320
+ width: 18px;
321
+ height: 18px; }
322
+ .customize-control-kirki-radio input[type=radio]:checked:before {
323
+ width: 10px;
324
+ height: 10px;
325
+ margin: 3px; }
326
+ .customize-control-kirki-radio label {
327
+ display: list-item;
328
+ margin-bottom: 7px; }
329
+ .customize-control-kirki-radio label .option-description {
330
+ display: block;
331
+ color: rgba(0, 0, 0, 0.35);
332
+ font-size: 0.9em;
333
+ padding-left: 25px; }
334
+
335
+ .customize-control-repeater {
336
+ position: relative; }
337
+ .customize-control-repeater .repeater-fields .repeater-row {
338
+ border: 1px solid #e5e5e5;
339
+ margin-top: 0.5rem;
340
+ background: #eee;
341
+ position: relative; }
342
+ .customize-control-repeater .repeater-fields .repeater-row.minimized {
343
+ border: 1px solid #dfdfdf;
344
+ padding: 0; }
345
+ .customize-control-repeater .repeater-fields .repeater-row.minimized:hover {
346
+ border: 1px solid #e5e5e5; }
347
+ .customize-control-repeater .repeater-fields .repeater-row.minimized .repeater-row-content {
348
+ display: none; }
349
+ .customize-control-repeater .repeater-fields .repeater-row label {
350
+ margin-bottom: 12px;
351
+ clear: both; }
352
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field- {
353
+ display: none; }
354
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input {
355
+ display: none; }
356
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img {
357
+ border: 1px solid transparent; }
358
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked + label img {
359
+ -webkit-box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
360
+ box-shadow: 0 0 5px 2px rgba(0, 0, 0, 0.25);
361
+ border: 1px solid #3498DB; }
362
+ .customize-control-repeater .repeater-fields .repeater-row .repeater-field:last-child {
363
+ border-bottom: none;
364
+ padding-bottom: 0; }
365
+ .customize-control-repeater button.repeater-add {
366
+ margin-top: 1rem; }
367
+ .customize-control-repeater .repeater-row-content {
368
+ padding: 10px 15px;
369
+ background: #fff; }
370
+ .customize-control-repeater .repeater-field {
371
+ margin-bottom: 12px;
372
+ width: 100%;
373
+ clear: both;
374
+ padding-bottom: 12px;
375
+ border-bottom: 1px dotted #CCC; }
376
+ .customize-control-repeater .repeater-field .customize-control-title {
377
+ font-size: 13px;
378
+ line-height: initial; }
379
+ .customize-control-repeater .repeater-field .customize-control-description {
380
+ font-size: 13px;
381
+ line-height: initial; }
382
+ .customize-control-repeater .repeater-field.repeater-field-hidden {
383
+ margin: 0;
384
+ padding: 0;
385
+ border: 0; }
386
+ .customize-control-repeater .repeater-field-select select {
387
+ margin-left: 0; }
388
+ .customize-control-repeater .repeater-field-checkbox label {
389
+ line-height: 28px; }
390
+ .customize-control-repeater .repeater-field-checkbox input {
391
+ line-height: 28px;
392
+ margin-right: 5px; }
393
+ .customize-control-repeater .repeater-field-textarea textarea {
394
+ width: 100%;
395
+ resize: vertical; }
396
+ .customize-control-repeater .repeater-row-header {
397
+ background: white;
398
+ border-bottom: 1px solid #dfdfdf;
399
+ position: relative;
400
+ padding: 10px 15px;
401
+ height: auto;
402
+ min-height: 20px;
403
+ line-height: 30px;
404
+ overflow: hidden;
405
+ word-wrap: break-word; }
406
+ .customize-control-repeater .repeater-row-header:hover {
407
+ cursor: move; }
408
+ .customize-control-repeater .repeater-row-header .dashicons {
409
+ font-size: 18px;
410
+ position: absolute;
411
+ right: 12px;
412
+ top: 2px;
413
+ color: #a0a5aa; }
414
+ .customize-control-repeater .repeater-row-label {
415
+ font-size: 13px;
416
+ font-weight: 600;
417
+ line-height: 20px;
418
+ display: block;
419
+ width: 90%;
420
+ overflow: hidden;
421
+ height: 18px; }
422
+ .customize-control-repeater .repeater-row-remove {
423
+ color: #a00; }
424
+ .customize-control-repeater .repeater-row-remove:hover {
425
+ color: #f00; }
426
+ .customize-control-repeater .repeater-minimize {
427
+ line-height: 36px; }
428
+ .customize-control-repeater .remove-button,
429
+ .customize-control-repeater .upload-button {
430
+ width: 48%; }
431
+
432
+ .kirki-image-attachment {
433
+ margin: 0;
434
+ text-align: center;
435
+ margin-bottom: 10px; }
436
+ .kirki-image-attachment img {
437
+ display: inline-block; }
438
+
439
+ .kirki-file-attachment {
440
+ margin: 0;
441
+ text-align: center;
442
+ margin-bottom: 10px; }
443
+ .kirki-file-attachment .file {
444
+ display: block;
445
+ padding: 10px 5px;
446
+ border: 1px dotted #c3c3c3;
447
+ background: #f9f9f9; }
448
+
449
+ .limit {
450
+ padding: 3px;
451
+ border-radius: 3px; }
452
+ .limit.highlight {
453
+ background: #D32F2F;
454
+ color: #fff; }
455
+
456
+ .customize-control-kirki-slider .wrapper {
457
+ display: flex;
458
+ align-items: center;
459
+ padding: 15px 0 7px;
460
+ position: relative; }
461
+ .customize-control-kirki-slider .wrapper .slider-reset {
462
+ position: absolute;
463
+ top: 0;
464
+ right: 0;
465
+ font-size: 12px;
466
+ transition: 0.3s ease-in-out;
467
+ color: rgba(0, 0, 0, 0.3); }
468
+ .customize-control-kirki-slider .wrapper .slider-reset:hover {
469
+ transform: scale(1.3);
470
+ color: #DC3232; }
471
+ .customize-control-kirki-slider .wrapper input[type="range"] {
472
+ display: block;
473
+ -webkit-appearance: none;
474
+ background-color: #bdc3c7;
475
+ width: 100%;
476
+ height: 5px;
477
+ border-radius: 5px;
478
+ margin: 0 auto;
479
+ outline: 0; }
480
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb {
481
+ -webkit-appearance: none;
482
+ background-color: #0085ba;
483
+ width: 17px;
484
+ height: 17px;
485
+ border-radius: 50%;
486
+ border: 1px solid #006799;
487
+ cursor: pointer;
488
+ transition: 0.3s ease-in-out; }
489
+ ​ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb:hover {
490
+ background-color: #006799;
491
+ border: 2px solid #0085ba; }
492
+ .customize-control-kirki-slider .wrapper input[type="range"]::-webkit-slider-thumb:active {
493
+ transform: scale(1.2); }
494
+ .customize-control-kirki-slider .wrapper input[type="text"] {
495
+ font-size: 13px;
496
+ background: transparent;
497
+ border: none;
498
+ box-shadow: none;
499
+ text-align: right;
500
+ padding: 0;
501
+ width: 40px; }
502
+ .customize-control-kirki-slider .wrapper .value {
503
+ display: flex;
504
+ align-items: baseline; }
505
+
506
+ .customize-control-kirki-sortable ul.ui-sortable li {
507
+ padding: 5px 10px;
508
+ border: 1px solid #333;
509
+ background: #fff; }
510
+ .customize-control-kirki-sortable ul.ui-sortable li .dashicons.dashicons-menu {
511
+ float: right; }
512
+ .customize-control-kirki-sortable ul.ui-sortable li .dashicons.visibility {
513
+ margin-right: 10px; }
514
+ .customize-control-kirki-sortable ul.ui-sortable li.invisible {
515
+ color: #aaa;
516
+ border: 1px dashed #aaa; }
517
+ .customize-control-kirki-sortable ul.ui-sortable li.invisible .dashicons.visibility {
518
+ color: #aaa; }
519
+
520
+ .customize-control-kirki-switch {
521
+ position: relative; }
522
+ .customize-control-kirki-switch .switch-off,
523
+ .customize-control-kirki-switch .switch-on {
524
+ opacity: 1;
525
+ padding: 8px;
526
+ font-size: 14px;
527
+ line-height: 18px; }
528
+ .customize-control-kirki-switch .switch-on {
529
+ color: #fff;
530
+ opacity: 0; }
531
+ .customize-control-kirki-switch .switch-off {
532
+ color: #777; }
533
+ .customize-control-kirki-switch .switch {
534
+ border: none;
535
+ margin-bottom: 1.5rem;
536
+ outline: 0;
537
+ padding: 0;
538
+ user-select: none;
539
+ border-radius: 3rem; }
540
+ .customize-control-kirki-switch label {
541
+ background: #b4b9be;
542
+ float: left;
543
+ cursor: pointer;
544
+ display: flex;
545
+ justify-content: space-between;
546
+ margin-bottom: 1rem;
547
+ position: relative;
548
+ transition: left 0.15s ease-out;
549
+ border-radius: 3rem; }
550
+ .customize-control-kirki-switch label:after {
551
+ background: #FFFFFF;
552
+ content: "";
553
+ display: block;
554
+ position: absolute;
555
+ left: 5px;
556
+ top: 5px;
557
+ width: calc(.85rem + 10px);
558
+ height: calc(.85rem + 10px);
559
+ transition: all 0.25s ease-in-out;
560
+ border-radius: 3rem; }
561
+ .customize-control-kirki-switch input + label {
562
+ margin-left: 0;
563
+ margin-right: 0; }
564
+ .customize-control-kirki-switch input:checked + label {
565
+ background: #0073aa; }
566
+ .customize-control-kirki-switch input:checked + label:after {
567
+ left: auto;
568
+ right: 5px;
569
+ background: #ffffff; }
570
+ .customize-control-kirki-switch input:checked + label .switch-on {
571
+ opacity: 1; }
572
+ .customize-control-kirki-switch input:checked + label .switch-off {
573
+ opacity: 0; }
574
+
575
+ .customize-control-kirki-toggle {
576
+ position: relative; }
577
+ .customize-control-kirki-toggle label {
578
+ display: flex;
579
+ flex-wrap: wrap; }
580
+ .customize-control-kirki-toggle label .customize-control-title {
581
+ width: calc(100% - 55px); }
582
+ .customize-control-kirki-toggle label .description {
583
+ order: 99; }
584
+ .customize-control-kirki-toggle .switch {
585
+ border: 1px solid #b4b9be;
586
+ display: inline-block;
587
+ width: 35px;
588
+ height: 12px;
589
+ border-radius: 8px;
590
+ background: #b4b9be;
591
+ vertical-align: middle;
592
+ position: relative;
593
+ top: 4px;
594
+ cursor: pointer;
595
+ user-select: none;
596
+ transition: background 350ms ease; }
597
+ .customize-control-kirki-toggle .switch:after, .customize-control-kirki-toggle .switch:before {
598
+ content: "";
599
+ display: block;
600
+ width: 20px;
601
+ height: 20px;
602
+ border-radius: 50%;
603
+ position: absolute;
604
+ top: 50%;
605
+ left: -3px;
606
+ transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease; }
607
+ .customize-control-kirki-toggle .switch:before {
608
+ background: rgba(0, 0, 0, 0.2);
609
+ transform: translate3d(0, -50%, 0) scale(0); }
610
+ .customize-control-kirki-toggle .switch:after {
611
+ background: #999;
612
+ border: 1px solid rgba(0, 0, 0, 0.1);
613
+ transform: translate3d(0, -50%, 0); }
614
+ .customize-control-kirki-toggle .switch:active:before {
615
+ transform: translate3d(0, -50%, 0) scale(3); }
616
+ .customize-control-kirki-toggle input:checked + .switch:before {
617
+ background: rgba(0, 115, 170, 0.075);
618
+ transform: translate3d(100%, -50%, 0) scale(1); }
619
+ .customize-control-kirki-toggle input:checked + .switch:after {
620
+ background: #0073aa;
621
+ transform: translate3d(100%, -50%, 0); }
622
+ .customize-control-kirki-toggle input:checked + .switch:active:before {
623
+ background: rgba(0, 115, 170, 0.075);
624
+ transform: translate3d(100%, -50%, 0) scale(3); }
625
+
626
+ .customize-control-kirki-typography {
627
+ position: relative; }
628
+ .customize-control-kirki-typography .wrapper {
629
+ padding: 10px;
630
+ display: flex;
631
+ flex-wrap: wrap;
632
+ justify-content: space-between;
633
+ border: 1px solid rgba(0, 0, 0, 0.1); }
634
+ .customize-control-kirki-typography .wrapper h5 {
635
+ margin: 0.67em 0 0; }
636
+ .customize-control-kirki-typography .wrapper .color,
637
+ .customize-control-kirki-typography .wrapper .font-backup,
638
+ .customize-control-kirki-typography .wrapper .font-family,
639
+ .customize-control-kirki-typography .wrapper .font-size,
640
+ .customize-control-kirki-typography .wrapper .letter-spacing,
641
+ .customize-control-kirki-typography .wrapper .line-height,
642
+ .customize-control-kirki-typography .wrapper .margin-bottom,
643
+ .customize-control-kirki-typography .wrapper .margin-top,
644
+ .customize-control-kirki-typography .wrapper .subsets,
645
+ .customize-control-kirki-typography .wrapper .text-align,
646
+ .customize-control-kirki-typography .wrapper .text-transform,
647
+ .customize-control-kirki-typography .wrapper .variant {
648
+ width: 100%;
649
+ float: none;
650
+ clear: both; }
651
+ .customize-control-kirki-typography .wrapper .font-size,
652
+ .customize-control-kirki-typography .wrapper .letter-spacing,
653
+ .customize-control-kirki-typography .wrapper .line-height,
654
+ .customize-control-kirki-typography .wrapper .margin-bottom,
655
+ .customize-control-kirki-typography .wrapper .margin-top,
656
+ .customize-control-kirki-typography .wrapper .text-transform {
657
+ width: 48%; }
658
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices {
659
+ display: flex; }
660
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices label {
661
+ width: 100%;
662
+ padding: 5px;
663
+ text-align: center;
664
+ border: 1px solid rgba(255, 255, 255, 0); }
665
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices input {
666
+ display: none; }
667
+ .customize-control-kirki-typography .wrapper .text-align .text-align-choices input:checked + label {
668
+ border-color: #0085ba; }
669
+ .customize-control-kirki-typography .wrapper .color {
670
+ width: auto; }
671
+
672
+ /*# sourceMappingURL=styles-legacy.css.map */
controls/css/styles-legacy.min.css ADDED
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.customize-control-kirki-background{position:relative}.customize-control-kirki-background .background-attachment h4,.customize-control-kirki-background .background-color h4,.customize-control-kirki-background .background-position h4,.customize-control-kirki-background .background-repeat h4,.customize-control-kirki-background .background-size h4{margin-bottom:5px}.customize-control-kirki-background .background-attachment .buttonset,.customize-control-kirki-background .background-size .buttonset{display:flex;flex-wrap:wrap}.customize-control-kirki-background .background-attachment .buttonset .switch-label,.customize-control-kirki-background .background-size .buttonset .switch-label{background:rgba(0,0,0,.05);border:1px solid rgba(0,0,0,.1);color:#555;padding:.5em 1em;margin:0;text-align:center;flex-grow:1}.customize-control-kirki-background .background-attachment .buttonset .switch-input:checked+.switch-label,.customize-control-kirki-background .background-size .buttonset .switch-input:checked+.switch-label{background-color:#3498DB;color:#fff}.customize-control-kirki-code textarea{width:100%;min-height:200px}.customize-control-kirki-color-palette{position:relative}.customize-control-kirki-color-palette label{position:relative;display:inline-block;padding:0;margin:0}.customize-control-kirki-color-palette .colors-wrapper{max-height:300px;overflow-y:auto;padding:10px;display:flex;flex-wrap:wrap}.customize-control-kirki-color-palette .colors-wrapper .color-palette-color{color:transparent;display:block;width:100%;height:100%;overflow:hidden;border:1px solid rgba(0,0,0,.2)}.customize-control-kirki-color-palette .colors-wrapper.round label{padding:3px}.customize-control-kirki-color-palette .colors-wrapper.round .color-palette-color{border-radius:50%}.customize-control-kirki-color-palette .colors-wrapper.box-shadow .color-palette-color{box-shadow:inset 3px 3px 13px 2px rgba(0,0,0,.22)}.customize-control-kirki-color-palette .colors-wrapper input:checked+label .color-palette-color{border:0;width:150%;height:150%;position:relative;left:-25%;top:-25%;z-index:99;box-shadow:1px 1px 10px 1px #333;border:1px solid rgba(0,0,0,.3)}.customize-control-kirki-color-palette .colors-wrapper.with-margin label{margin:3px}.customize-control-kirki-color-palette .colors-wrapper input{display:none}.customize-control-kirki-color input[data-type=hue]+.iris-strip-horiz .iris-slider{background-image:-webkit-linear-gradient(left,red,#ff7f00,#ff0,#80ff00,#0f0,#00ff80,#0ff,#007fff,#00f,#7f00ff,#ff00ff,#ff0080,red)!important}.customize-control-kirki-dashicons{position:relative}.customize-control-kirki-dashicons label{position:relative;display:inline-block}.customize-control-kirki-dashicons .icons-wrapper{max-height:300px;overflow-y:scroll}.customize-control-kirki-dashicons .icons-wrapper h4{font-weight:300;margin:.7em 0}.customize-control-kirki-dashicons .icons-wrapper .dashicons{padding:3px;font-size:25px;width:25px;height:25px;border:1px solid transparent}.customize-control-kirki-dashicons .icons-wrapper input{display:none}.customize-control-kirki-dashicons .icons-wrapper input:checked+label .dashicons{border:1px solid #3498DB;color:#000}.wp-customizer div.ui-datepicker{z-index:500001!important;width:255px;background:#fff;border:1px solid #dedede}.wp-customizer div.ui-datepicker .ui-datepicker-header{padding:10px;background:#e5e5e5;border-bottom:1px solid #fff}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{display:block;position:absolute;width:1em;overflow:hidden}.customize-control-kirki-dimensions,.customize-control-kirki-multicolor,.customize-control-kirki-palette{position:relative}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before{font-family:dashicons}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after:hover,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before:hover,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after:hover,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before:hover{cursor:pointer}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next .ui-icon,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev .ui-icon{display:none}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{left:10px}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before{content:"\f341"}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next{right:10px}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after{content:"\f345"}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-title{text-align:center}.wp-customizer div.ui-datepicker .ui-datepicker-calendar{border-collapse:collapse;width:100%}.wp-customizer div.ui-datepicker .ui-datepicker-calendar thead{background:#e5e5e5;padding:5px}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td{text-align:center}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a{display:block;padding:5px;color:#333;text-decoration:none}.customize-control-kirki-dimensions .wrapper .control>div .inner,.customize-control-kirki-multicolor .multicolor-group-wrapper{display:flex}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a.ui-state-active,.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a:hover{color:#fff;background-color:#0073aa}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled .ui-state-default a,.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled a{color:#999}.customize-control-kirki-dimensions .wrapper{border:1px solid rgba(0,0,0,.1);padding:10px}.customize-control-kirki-dimensions .wrapper .control{display:flex;flex-wrap:wrap;justify-content:space-between}.customize-control-kirki-dimensions .wrapper .control>div{width:48%}.customize-control-kirki-dimensions .wrapper .control>div h5{margin:10px 0 7px}.customize-control-kirki-editor textarea,.customize-control-kirki-generic input{width:100%}.customize-control-kirki-generic textarea{width:100%;border:1px solid rgba(0,0,0,.1);-webkit-box-shadow:none;box-shadow:none}.customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper{width:100%}.customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper label{display:block;text-align:center;padding:3px}.customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container{width:100%}.customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result{width:100%;height:30px;padding-left:0;border-radius:0;border:none;margin-right:0}.customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result>span{border-radius:0!important}.customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result .wp-color-result-text{display:none!important}.customize-control-kirki-number .customize-control-content{display:flex;align-items:stretch}.customize-control-kirki-number .customize-control-content input{width:100%;-moz-appearance:textfield}.customize-control-kirki-number .customize-control-content input::-webkit-inner-spin-button,.customize-control-kirki-number .customize-control-content input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.customize-control-kirki-number .customize-control-content .quantity{min-width:2rem;max-width:2rem;text-align:center;line-height:24px}.customize-control-kirki-palette input[type=radio]{display:none}.customize-control-kirki-palette input[type=radio]:checked+label{border:3px solid rgba(0,0,0,.4)}.customize-control-kirki-palette label{background:0 0;padding:0;border-top:3px solid transparent;border-bottom:3px solid transparent;margin-bottom:5px;display:flex}.customize-control-kirki-palette label span{padding:10px 0;flex-grow:1;font-size:0;line-height:10px;color:transparent;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1)}.customize-control-kirki-palette label span:first-child{border-left:1px solid rgba(0,0,0,.1)}.customize-control-kirki-palette label span:last-child{border-right:1px solid rgba(0,0,0,.1)}.customize-control-kirki-palette label span:hover{padding:10px;flex-grow:3;min-width:60px;font-size:10px;line-height:10px;color:#000}.customize-control-kirki-radio-buttonset .buttonset{display:flex;flex-wrap:wrap}.customize-control-kirki-radio-buttonset .buttonset .switch-label{background:rgba(0,0,0,.1);border:1px rgba(0,0,0,.1);color:rgba(50,55,60,.5);margin:0;text-align:center;padding:.5em 1em;flex-grow:1}.customize-control-kirki-radio-buttonset .buttonset .switch-input:checked+.switch-label{background-color:#00a0d2;color:rgba(255,255,255,.8)}.customize-control-kirki-radio-image>.image{display:flex;flex-wrap:wrap}.customize-control-kirki-radio-image label{position:relative;display:inline-block}.customize-control-kirki-radio-image label .image-label{display:none;position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,.7);font-weight:700}.customize-control-kirki-radio-image label .image-label .inner{width:100%;height:100%;text-align:center;padding:.5em;vertical-align:middle}.customize-control-kirki-radio-image label:hover .image-label{display:block}.customize-control-kirki-radio-image input{display:none}.customize-control-kirki-radio-image input img{border:1px solid transparent}.customize-control-kirki-radio-image input:checked+label img{-webkit-box-shadow:0 0 5px 2px rgba(0,0,0,.25);box-shadow:0 0 5px 2px rgba(0,0,0,.25);border:1px solid #3498DB}.customize-control-kirki-radio-image input+label .image-clickable{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.customize-control-kirki-radio{position:relative}.customize-control-kirki-radio input[type=radio]{width:18px;height:18px}.customize-control-kirki-radio input[type=radio]:checked:before{width:10px;height:10px;margin:3px}.customize-control-kirki-radio label{display:list-item;margin-bottom:7px}.customize-control-kirki-radio label .option-description{display:block;color:rgba(0,0,0,.35);font-size:.9em;padding-left:25px}.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-,.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input,.customize-control-repeater .repeater-fields .repeater-row.minimized .repeater-row-content{display:none}.customize-control-repeater{position:relative}.customize-control-repeater .repeater-fields .repeater-row{border:1px solid #e5e5e5;margin-top:.5rem;background:#eee;position:relative}.customize-control-repeater .repeater-fields .repeater-row.minimized{border:1px solid #dfdfdf;padding:0}.customize-control-repeater .repeater-fields .repeater-row.minimized:hover{border:1px solid #e5e5e5}.customize-control-repeater .repeater-fields .repeater-row label{margin-bottom:12px;clear:both}.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img{border:1px solid transparent}.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked+label img{-webkit-box-shadow:0 0 5px 2px rgba(0,0,0,.25);box-shadow:0 0 5px 2px rgba(0,0,0,.25);border:1px solid #3498DB}.customize-control-repeater .repeater-fields .repeater-row .repeater-field:last-child{border-bottom:none;padding-bottom:0}.customize-control-repeater button.repeater-add{margin-top:1rem}.customize-control-repeater .repeater-row-content{padding:10px 15px;background:#fff}.customize-control-repeater .repeater-field{margin-bottom:12px;width:100%;clear:both;padding-bottom:12px;border-bottom:1px dotted #CCC}.customize-control-repeater .repeater-field .customize-control-description,.customize-control-repeater .repeater-field .customize-control-title{font-size:13px;line-height:initial}.customize-control-repeater .repeater-field.repeater-field-hidden{margin:0;padding:0;border:0}.customize-control-repeater .repeater-field-select select{margin-left:0}.customize-control-repeater .repeater-field-checkbox label{line-height:28px}.customize-control-repeater .repeater-field-checkbox input{line-height:28px;margin-right:5px}.kirki-file-attachment,.kirki-image-attachment{margin:0 0 10px;text-align:center}.customize-control-repeater .repeater-field-textarea textarea{width:100%;resize:vertical}.customize-control-repeater .repeater-row-header{background:#fff;border-bottom:1px solid #dfdfdf;position:relative;padding:10px 15px;height:auto;min-height:20px;line-height:30px;overflow:hidden;word-wrap:break-word}.customize-control-repeater .repeater-row-header:hover{cursor:move}.customize-control-repeater .repeater-row-header .dashicons{font-size:18px;position:absolute;right:12px;top:2px;color:#a0a5aa}.customize-control-repeater .repeater-row-label{font-size:13px;font-weight:600;line-height:20px;display:block;width:90%;overflow:hidden;height:18px}.customize-control-repeater .repeater-row-remove{color:#a00}.customize-control-repeater .repeater-row-remove:hover{color:red}.customize-control-repeater .repeater-minimize{line-height:36px}.customize-control-repeater .remove-button,.customize-control-repeater .upload-button{width:48%}.kirki-image-attachment img{display:inline-block}.kirki-file-attachment .file{display:block;padding:10px 5px;border:1px dotted #c3c3c3;background:#f9f9f9}.limit{padding:3px;border-radius:3px}.limit.highlight{background:#D32F2F;color:#fff}.customize-control-kirki-slider .wrapper{display:flex;align-items:center;padding:15px 0 7px;position:relative}.customize-control-kirki-slider .wrapper .slider-reset{position:absolute;top:0;right:0;font-size:12px;transition:.3s ease-in-out;color:rgba(0,0,0,.3)}.customize-control-kirki-slider .wrapper .slider-reset:hover{transform:scale(1.3);color:#DC3232}.customize-control-kirki-slider .wrapper input[type=range]{display:block;-webkit-appearance:none;background-color:#bdc3c7;width:100%;height:5px;border-radius:5px;margin:0 auto;outline:0}.customize-control-kirki-slider .wrapper input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #006799;cursor:pointer;transition:.3s ease-in-out}​ .customize-control-kirki-slider .wrapper input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}.customize-control-kirki-slider .wrapper input[type=range]::-webkit-slider-thumb:active{transform:scale(1.2)}.customize-control-kirki-slider .wrapper input[type=text]{font-size:13px;background:0 0;border:none;box-shadow:none;text-align:right;padding:0;width:40px}.customize-control-kirki-slider .wrapper .value{display:flex;align-items:baseline}.customize-control-kirki-sortable ul.ui-sortable li{padding:5px 10px;border:1px solid #333;background:#fff}.customize-control-kirki-sortable ul.ui-sortable li .dashicons.dashicons-menu{float:right}.customize-control-kirki-sortable ul.ui-sortable li .dashicons.visibility{margin-right:10px}.customize-control-kirki-sortable ul.ui-sortable li.invisible{color:#aaa;border:1px dashed #aaa}.customize-control-kirki-sortable ul.ui-sortable li.invisible .dashicons.visibility{color:#aaa}.customize-control-kirki-switch{position:relative}.customize-control-kirki-switch .switch-off,.customize-control-kirki-switch .switch-on{opacity:1;padding:8px;font-size:14px;line-height:18px}.customize-control-kirki-switch .switch-on{color:#fff;opacity:0}.customize-control-kirki-switch .switch-off{color:#777}.customize-control-kirki-switch .switch{border:none;margin-bottom:1.5rem;outline:0;padding:0;user-select:none;border-radius:3rem}.customize-control-kirki-switch label{background:#b4b9be;float:left;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:1rem;position:relative;transition:left .15s ease-out;border-radius:3rem}.customize-control-kirki-switch label:after{background:#FFF;content:"";display:block;position:absolute;left:5px;top:5px;width:calc(.85rem + 10px);height:calc(.85rem + 10px);transition:all .25s ease-in-out;border-radius:3rem}.customize-control-kirki-switch input+label{margin-left:0;margin-right:0}.customize-control-kirki-switch input:checked+label{background:#0073aa}.customize-control-kirki-switch input:checked+label:after{left:auto;right:5px;background:#fff}.customize-control-kirki-switch input:checked+label .switch-on{opacity:1}.customize-control-kirki-switch input:checked+label .switch-off{opacity:0}.customize-control-kirki-toggle{position:relative}.customize-control-kirki-toggle label{display:flex;flex-wrap:wrap}.customize-control-kirki-toggle label .customize-control-title{width:calc(100% - 55px)}.customize-control-kirki-toggle label .description{order:99}.customize-control-kirki-toggle .switch{border:1px solid #b4b9be;display:inline-block;width:35px;height:12px;border-radius:8px;background:#b4b9be;vertical-align:middle;position:relative;top:4px;cursor:pointer;user-select:none;transition:background 350ms ease}.customize-control-kirki-toggle .switch:after,.customize-control-kirki-toggle .switch:before{content:"";display:block;width:20px;height:20px;border-radius:50%;position:absolute;top:50%;left:-3px;transition:all 350ms cubic-bezier(0,.95,.38,.98),background 150ms ease}.customize-control-kirki-toggle .switch:before{background:rgba(0,0,0,.2);transform:translate3d(0,-50%,0) scale(0)}.customize-control-kirki-toggle .switch:after{background:#999;border:1px solid rgba(0,0,0,.1);transform:translate3d(0,-50%,0)}.customize-control-kirki-toggle .switch:active:before{transform:translate3d(0,-50%,0) scale(3)}.customize-control-kirki-toggle input:checked+.switch:before{background:rgba(0,115,170,.075);transform:translate3d(100%,-50%,0) scale(1)}.customize-control-kirki-toggle input:checked+.switch:after{background:#0073aa;transform:translate3d(100%,-50%,0)}.customize-control-kirki-toggle input:checked+.switch:active:before{background:rgba(0,115,170,.075);transform:translate3d(100%,-50%,0) scale(3)}.customize-control-kirki-typography{position:relative}.customize-control-kirki-typography .wrapper{padding:10px;display:flex;flex-wrap:wrap;justify-content:space-between;border:1px solid rgba(0,0,0,.1)}.customize-control-kirki-typography .wrapper h5{margin:.67em 0 0}.customize-control-kirki-typography .wrapper .color,.customize-control-kirki-typography .wrapper .font-backup,.customize-control-kirki-typography .wrapper .font-family,.customize-control-kirki-typography .wrapper .font-size,.customize-control-kirki-typography .wrapper .letter-spacing,.customize-control-kirki-typography .wrapper .line-height,.customize-control-kirki-typography .wrapper .margin-bottom,.customize-control-kirki-typography .wrapper .margin-top,.customize-control-kirki-typography .wrapper .subsets,.customize-control-kirki-typography .wrapper .text-align,.customize-control-kirki-typography .wrapper .text-transform,.customize-control-kirki-typography .wrapper .variant{width:100%;float:none;clear:both}.customize-control-kirki-typography .wrapper .font-size,.customize-control-kirki-typography .wrapper .letter-spacing,.customize-control-kirki-typography .wrapper .line-height,.customize-control-kirki-typography .wrapper .margin-bottom,.customize-control-kirki-typography .wrapper .margin-top,.customize-control-kirki-typography .wrapper .text-transform{width:48%}.customize-control-kirki-typography .wrapper .text-align .text-align-choices{display:flex}.customize-control-kirki-typography .wrapper .text-align .text-align-choices label{width:100%;padding:5px;text-align:center;border:1px solid rgba(255,255,255,0)}.customize-control-kirki-typography .wrapper .text-align .text-align-choices input{display:none}.customize-control-kirki-typography .wrapper .text-align .text-align-choices input:checked+label{border-color:#0085ba}.customize-control-kirki-typography .wrapper .color{width:auto}
controls/css/styles.css CHANGED
@@ -179,32 +179,17 @@
179
-webkit-box-shadow: none;
180
box-shadow: none; }
181
182
- .customize-control-kirki-multicolor {
183
- position: relative; }
184
- .customize-control-kirki-multicolor .multicolor-group-wrapper {
185
- display: flex; }
186
- .customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper {
187
- width: 100%; }
188
- .customize-control-kirki-multicolor .multicolor-group-wrapper .multicolor-single-color-wrapper label {
189
- display: block;
190
- text-align: center;
191
- padding: 3px; }
192
- .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container {
193
- width: 100%; }
194
- .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result {
195
- width: 100%;
196
- height: 30px;
197
- padding-left: 0;
198
- border-radius: 0;
199
- border: none;
200
- margin-right: 0; }
201
- .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result > span {
202
- border-top-left-radius: 0 !important;
203
- border-bottom-left-radius: 0 !important;
204
- border-top-right-radius: 0 !important;
205
- border-bottom-right-radius: 0 !important; }
206
- .customize-control-kirki-multicolor .multicolor-group-wrapper .wp-picker-container .wp-color-result .wp-color-result-text {
207
- display: none !important; }
208
209
.customize-control-kirki-number .customize-control-content {
210
display: flex;
@@ -519,64 +504,58 @@
519
520
.customize-control-kirki-switch {
521
position: relative; }
522
.customize-control-kirki-switch .switch {
523
border: none;
524
margin-bottom: 1.5rem;
525
outline: 0;
526
padding: 0;
527
- -webkit-user-select: none;
528
- -moz-user-select: none;
529
- -ms-user-select: none;
530
- user-select: none; }
531
- .customize-control-kirki-switch .switch label {
532
- background: #b4b9be;
533
- color: transparent;
534
- cursor: pointer;
535
display: block;
536
- margin-bottom: 1rem;
537
- position: relative;
538
- transition: left 0.15s ease-out;
539
- height: 2rem;
540
- width: 4rem; }
541
- .customize-control-kirki-switch .switch label:after {
542
- background: #FFFFFF;
543
- content: "";
544
- display: block;
545
- height: 1.5rem;
546
- left: 0.25rem;
547
- position: absolute;
548
- top: 0.25rem;
549
- width: 1.5rem;
550
- -webkit-transition: all 0.25s ease-in-out;
551
- -moz-transition: all 0.25s ease-in-out;
552
- -ms-transition: all 0.25s ease-in-out;
553
- -o-transition: all 0.25s ease-in-out;
554
- transition: all 0.25s ease-in-out; }
555
- .customize-control-kirki-switch .switch input + label {
556
- margin-left: 0;
557
- margin-right: 0; }
558
- .customize-control-kirki-switch .switch input:checked + label {
559
- background: #0073aa; }
560
- .customize-control-kirki-switch .switch input:checked + label:after {
561
- left: 2.25rem;
562
- background: #ffffff; }
563
- .customize-control-kirki-switch .switch.round {
564
- border-radius: 1000px; }
565
- .customize-control-kirki-switch .switch.round label {
566
- border-radius: 2rem; }
567
- .customize-control-kirki-switch .switch.round label:after {
568
- border-radius: 2rem; }
569
- .customize-control-kirki-switch .switch-off,
570
- .customize-control-kirki-switch .switch-on {
571
- line-height: 32px;
572
- font-weight: bold;
573
- padding: 0 10px; }
574
- .customize-control-kirki-switch .switch-on {
575
- color: #fff;
576
- padding-right: 5px; }
577
- .customize-control-kirki-switch .switch-off {
578
- color: #777;
579
- padding-left: 5px; }
580
581
.customize-control-kirki-toggle {
582
position: relative; }
179
-webkit-box-shadow: none;
180
box-shadow: none; }
181
182
+ .customize-control-kirki-multicolor .multicolor-single-color-wrapper {
183
+ display: flex;
184
+ justify-content: space-between; }
185
+ .customize-control-kirki-multicolor .multicolor-single-label {
186
+ order: 2; }
187
+ .customize-control-kirki-multicolor .wp-picker-container {
188
+ width: 100%; }
189
+ .customize-control-kirki-multicolor .wp-picker-container > .wp-color-result {
190
+ width: 100%; }
191
+ .customize-control-kirki-multicolor .wp-picker-container.wp-picker-active + .multicolor-single-label {
192
+ display: none; }
193
194
.customize-control-kirki-number .customize-control-content {
195
display: flex;
504
505
.customize-control-kirki-switch {
506
position: relative; }
507
+ .customize-control-kirki-switch .switch-off,
508
+ .customize-control-kirki-switch .switch-on {
509
+ opacity: 1;
510
+ padding: 8px;
511
+ font-size: 14px;
512
+ line-height: 18px; }
513
+ .customize-control-kirki-switch .switch-on {
514
+ color: #fff;
515
+ opacity: 0; }
516
+ .customize-control-kirki-switch .switch-off {
517
+ color: #777; }
518
.customize-control-kirki-switch .switch {
519
border: none;
520
margin-bottom: 1.5rem;
521
outline: 0;
522
padding: 0;
523
+ user-select: none;
524
+ border-radius: 3rem; }
525
+ .customize-control-kirki-switch label {
526
+ background: #b4b9be;
527
+ float: left;
528
+ cursor: pointer;
529
+ display: flex;
530
+ justify-content: space-between;
531
+ margin-bottom: 1rem;
532
+ position: relative;
533
+ transition: left 0.15s ease-out;
534
+ border-radius: 3rem; }
535
+ .customize-control-kirki-switch label:after {
536
+ background: #FFFFFF;
537
+ content: "";
538
display: block;
539
+ position: absolute;
540
+ left: 5px;
541
+ top: 5px;
542
+ width: calc(.85rem + 10px);
543
+ height: calc(.85rem + 10px);
544
+ transition: all 0.25s ease-in-out;
545
+ border-radius: 3rem; }
546
+ .customize-control-kirki-switch input + label {
547
+ margin-left: 0;
548
+ margin-right: 0; }
549
+ .customize-control-kirki-switch input:checked + label {
550
+ background: #0073aa; }
551
+ .customize-control-kirki-switch input:checked + label:after {
552
+ left: auto;
553
+ right: 5px;
554
+ background: #ffffff; }
555
+ .customize-control-kirki-switch input:checked + label .switch-on {
556
+ opacity: 1; }
557
+ .customize-control-kirki-switch input:checked + label .switch-off {
558
+ opacity: 0; }
559
560
.customize-control-kirki-toggle {
561
position: relative; }
controls/css/styles.min.css ADDED
@@ -0,0 +1 @@
1
+ @charset "UTF-8";.customize-control-kirki-background{position:relative}.customize-control-kirki-background .background-attachment h4,.customize-control-kirki-background .background-color h4,.customize-control-kirki-background .background-position h4,.customize-control-kirki-background .background-repeat h4,.customize-control-kirki-background .background-size h4{margin-bottom:5px}.customize-control-kirki-background .background-attachment .buttonset,.customize-control-kirki-background .background-size .buttonset{display:flex;flex-wrap:wrap}.customize-control-kirki-background .background-attachment .buttonset .switch-label,.customize-control-kirki-background .background-size .buttonset .switch-label{background:rgba(0,0,0,.05);border:1px solid rgba(0,0,0,.1);color:#555;padding:.5em 1em;margin:0;text-align:center;flex-grow:1}.customize-control-kirki-background .background-attachment .buttonset .switch-input:checked+.switch-label,.customize-control-kirki-background .background-size .buttonset .switch-input:checked+.switch-label{background-color:#3498DB;color:#fff}.customize-control-kirki-code textarea{width:100%;min-height:200px}.customize-control-kirki-color-palette{position:relative}.customize-control-kirki-color-palette label{position:relative;display:inline-block;padding:0;margin:0}.customize-control-kirki-color-palette .colors-wrapper{max-height:300px;overflow-y:auto;padding:10px;display:flex;flex-wrap:wrap}.customize-control-kirki-color-palette .colors-wrapper .color-palette-color{color:transparent;display:block;width:100%;height:100%;overflow:hidden;border:1px solid rgba(0,0,0,.2)}.customize-control-kirki-color-palette .colors-wrapper.round label{padding:3px}.customize-control-kirki-color-palette .colors-wrapper.round .color-palette-color{border-radius:50%}.customize-control-kirki-color-palette .colors-wrapper.box-shadow .color-palette-color{box-shadow:inset 3px 3px 13px 2px rgba(0,0,0,.22)}.customize-control-kirki-color-palette .colors-wrapper input:checked+label .color-palette-color{border:0;width:150%;height:150%;position:relative;left:-25%;top:-25%;z-index:99;box-shadow:1px 1px 10px 1px #333;border:1px solid rgba(0,0,0,.3)}.customize-control-kirki-color-palette .colors-wrapper.with-margin label{margin:3px}.customize-control-kirki-color-palette .colors-wrapper input{display:none}.customize-control-kirki-color input[data-type=hue]+.iris-strip-horiz .iris-slider{background-image:-webkit-linear-gradient(left,red,#ff7f00,#ff0,#80ff00,#0f0,#00ff80,#0ff,#007fff,#00f,#7f00ff,#ff00ff,#ff0080,red)!important}.customize-control-kirki-dashicons{position:relative}.customize-control-kirki-dashicons label{position:relative;display:inline-block}.customize-control-kirki-dashicons .icons-wrapper{max-height:300px;overflow-y:scroll}.customize-control-kirki-dashicons .icons-wrapper h4{font-weight:300;margin:.7em 0}.customize-control-kirki-dashicons .icons-wrapper .dashicons{padding:3px;font-size:25px;width:25px;height:25px;border:1px solid transparent}.customize-control-kirki-dashicons .icons-wrapper input{display:none}.customize-control-kirki-dashicons .icons-wrapper input:checked+label .dashicons{border:1px solid #3498DB;color:#000}.wp-customizer div.ui-datepicker{z-index:500001!important;width:255px;background:#fff;border:1px solid #dedede}.wp-customizer div.ui-datepicker .ui-datepicker-header{padding:10px;background:#e5e5e5;border-bottom:1px solid #fff}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{display:block;position:absolute;width:1em;overflow:hidden}.customize-control-kirki-dimensions,.customize-control-kirki-palette{position:relative}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before{font-family:dashicons}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after:hover,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:before:hover,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:after:hover,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before:hover{cursor:pointer}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next .ui-icon,.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev .ui-icon{display:none}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev{left:10px}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-prev:before{content:"\f341"}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next{right:10px}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-next:after{content:"\f345"}.wp-customizer div.ui-datepicker .ui-datepicker-header .ui-datepicker-title{text-align:center}.wp-customizer div.ui-datepicker .ui-datepicker-calendar{border-collapse:collapse;width:100%}.wp-customizer div.ui-datepicker .ui-datepicker-calendar thead{background:#e5e5e5;padding:5px}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td{text-align:center}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a{display:block;padding:5px;color:#333;text-decoration:none}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a.ui-state-active,.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td a:hover{color:#fff;background-color:#0073aa}.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled .ui-state-default a,.wp-customizer div.ui-datepicker .ui-datepicker-calendar tr td.ui-state-disabled a{color:#999}.customize-control-kirki-dimensions .wrapper{border:1px solid rgba(0,0,0,.1);padding:10px}.customize-control-kirki-dimensions .wrapper .control{display:flex;flex-wrap:wrap;justify-content:space-between}.customize-control-kirki-dimensions .wrapper .control>div{width:48%}.customize-control-kirki-dimensions .wrapper .control>div h5{margin:10px 0 7px}.customize-control-kirki-dimensions .wrapper .control>div .inner{display:flex}.customize-control-kirki-editor textarea,.customize-control-kirki-generic input{width:100%}.customize-control-kirki-generic textarea{width:100%;border:1px solid rgba(0,0,0,.1);-webkit-box-shadow:none;box-shadow:none}.customize-control-kirki-multicolor .multicolor-single-color-wrapper{display:flex;justify-content:space-between}.customize-control-kirki-multicolor .multicolor-single-label{order:2}.customize-control-kirki-multicolor .wp-picker-container,.customize-control-kirki-multicolor .wp-picker-container>.wp-color-result{width:100%}.customize-control-kirki-multicolor .wp-picker-container.wp-picker-active+.multicolor-single-label{display:none}.customize-control-kirki-number .customize-control-content{display:flex;align-items:stretch}.customize-control-kirki-number .customize-control-content input{width:100%;-moz-appearance:textfield}.customize-control-kirki-number .customize-control-content input::-webkit-inner-spin-button,.customize-control-kirki-number .customize-control-content input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.customize-control-kirki-number .customize-control-content .quantity{min-width:2rem;max-width:2rem;text-align:center;line-height:24px}.customize-control-kirki-palette input[type=radio]{display:none}.customize-control-kirki-palette input[type=radio]:checked+label{border:3px solid rgba(0,0,0,.4)}.customize-control-kirki-palette label{background:0 0;padding:0;border-top:3px solid transparent;border-bottom:3px solid transparent;margin-bottom:5px;display:flex}.customize-control-kirki-palette label span{padding:10px 0;flex-grow:1;font-size:0;line-height:10px;color:transparent;-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-ms-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;border-top:1px solid rgba(0,0,0,.1);border-bottom:1px solid rgba(0,0,0,.1)}.customize-control-kirki-palette label span:first-child{border-left:1px solid rgba(0,0,0,.1)}.customize-control-kirki-palette label span:last-child{border-right:1px solid rgba(0,0,0,.1)}.customize-control-kirki-palette label span:hover{padding:10px;flex-grow:3;min-width:60px;font-size:10px;line-height:10px;color:#000}.customize-control-kirki-radio-buttonset .buttonset{display:flex;flex-wrap:wrap}.customize-control-kirki-radio-buttonset .buttonset .switch-label{background:rgba(0,0,0,.1);border:1px rgba(0,0,0,.1);color:rgba(50,55,60,.5);margin:0;text-align:center;padding:.5em 1em;flex-grow:1}.customize-control-kirki-radio-buttonset .buttonset .switch-input:checked+.switch-label{background-color:#00a0d2;color:rgba(255,255,255,.8)}.customize-control-kirki-radio-image>.image{display:flex;flex-wrap:wrap}.customize-control-kirki-radio-image label{position:relative;display:inline-block}.customize-control-kirki-radio-image label .image-label{display:none;position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(255,255,255,.7);font-weight:700}.customize-control-kirki-radio-image label .image-label .inner{width:100%;height:100%;text-align:center;padding:.5em;vertical-align:middle}.customize-control-kirki-radio-image label:hover .image-label{display:block}.customize-control-kirki-radio-image input{display:none}.customize-control-kirki-radio-image input img{border:1px solid transparent}.customize-control-kirki-radio-image input:checked+label img{-webkit-box-shadow:0 0 5px 2px rgba(0,0,0,.25);box-shadow:0 0 5px 2px rgba(0,0,0,.25);border:1px solid #3498DB}.customize-control-kirki-radio-image input+label .image-clickable{position:absolute;top:0;bottom:0;left:0;right:0;width:100%;height:100%}.customize-control-kirki-radio{position:relative}.customize-control-kirki-radio input[type=radio]{width:18px;height:18px}.customize-control-kirki-radio input[type=radio]:checked:before{width:10px;height:10px;margin:3px}.customize-control-kirki-radio label{display:list-item;margin-bottom:7px}.customize-control-kirki-radio label .option-description{display:block;color:rgba(0,0,0,.35);font-size:.9em;padding-left:25px}.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-,.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input,.customize-control-repeater .repeater-fields .repeater-row.minimized .repeater-row-content{display:none}.customize-control-repeater{position:relative}.customize-control-repeater .repeater-fields .repeater-row{border:1px solid #e5e5e5;margin-top:.5rem;background:#eee;position:relative}.customize-control-repeater .repeater-fields .repeater-row.minimized{border:1px solid #dfdfdf;padding:0}.customize-control-repeater .repeater-fields .repeater-row.minimized:hover{border:1px solid #e5e5e5}.customize-control-repeater .repeater-fields .repeater-row label{margin-bottom:12px;clear:both}.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input img{border:1px solid transparent}.customize-control-repeater .repeater-fields .repeater-row .repeater-field.repeater-field-radio-image input:checked+label img{-webkit-box-shadow:0 0 5px 2px rgba(0,0,0,.25);box-shadow:0 0 5px 2px rgba(0,0,0,.25);border:1px solid #3498DB}.customize-control-repeater .repeater-fields .repeater-row .repeater-field:last-child{border-bottom:none;padding-bottom:0}.customize-control-repeater button.repeater-add{margin-top:1rem}.customize-control-repeater .repeater-row-content{padding:10px 15px;background:#fff}.customize-control-repeater .repeater-field{margin-bottom:12px;width:100%;clear:both;padding-bottom:12px;border-bottom:1px dotted #CCC}.customize-control-repeater .repeater-field .customize-control-description,.customize-control-repeater .repeater-field .customize-control-title{font-size:13px;line-height:initial}.customize-control-repeater .repeater-field.repeater-field-hidden{margin:0;padding:0;border:0}.customize-control-repeater .repeater-field-select select{margin-left:0}.customize-control-repeater .repeater-field-checkbox label{line-height:28px}.customize-control-repeater .repeater-field-checkbox input{line-height:28px;margin-right:5px}.kirki-file-attachment,.kirki-image-attachment{margin:0 0 10px;text-align:center}.customize-control-repeater .repeater-field-textarea textarea{width:100%;resize:vertical}.customize-control-repeater .repeater-row-header{background:#fff;border-bottom:1px solid #dfdfdf;position:relative;padding:10px 15px;height:auto;min-height:20px;line-height:30px;overflow:hidden;word-wrap:break-word}.customize-control-repeater .repeater-row-header:hover{cursor:move}.customize-control-repeater .repeater-row-header .dashicons{font-size:18px;position:absolute;right:12px;top:2px;color:#a0a5aa}.customize-control-repeater .repeater-row-label{font-size:13px;font-weight:600;line-height:20px;display:block;width:90%;overflow:hidden;height:18px}.customize-control-repeater .repeater-row-remove{color:#a00}.customize-control-repeater .repeater-row-remove:hover{color:red}.customize-control-repeater .repeater-minimize{line-height:36px}.customize-control-repeater .remove-button,.customize-control-repeater .upload-button{width:48%}.kirki-image-attachment img{display:inline-block}.kirki-file-attachment .file{display:block;padding:10px 5px;border:1px dotted #c3c3c3;background:#f9f9f9}.limit{padding:3px;border-radius:3px}.limit.highlight{background:#D32F2F;color:#fff}.customize-control-kirki-slider .wrapper{display:flex;align-items:center;padding:15px 0 7px;position:relative}.customize-control-kirki-slider .wrapper .slider-reset{position:absolute;top:0;right:0;font-size:12px;transition:.3s ease-in-out;color:rgba(0,0,0,.3)}.customize-control-kirki-slider .wrapper .slider-reset:hover{transform:scale(1.3);color:#DC3232}.customize-control-kirki-slider .wrapper input[type=range]{display:block;-webkit-appearance:none;background-color:#bdc3c7;width:100%;height:5px;border-radius:5px;margin:0 auto;outline:0}.customize-control-kirki-slider .wrapper input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;background-color:#0085ba;width:17px;height:17px;border-radius:50%;border:1px solid #006799;cursor:pointer;transition:.3s ease-in-out}​ .customize-control-kirki-slider .wrapper input[type=range]::-webkit-slider-thumb:hover{background-color:#006799;border:2px solid #0085ba}.customize-control-kirki-slider .wrapper input[type=range]::-webkit-slider-thumb:active{transform:scale(1.2)}.customize-control-kirki-slider .wrapper input[type=text]{font-size:13px;background:0 0;border:none;box-shadow:none;text-align:right;padding:0;width:40px}.customize-control-kirki-slider .wrapper .value{display:flex;align-items:baseline}.customize-control-kirki-sortable ul.ui-sortable li{padding:5px 10px;border:1px solid #333;background:#fff}.customize-control-kirki-sortable ul.ui-sortable li .dashicons.dashicons-menu{float:right}.customize-control-kirki-sortable ul.ui-sortable li .dashicons.visibility{margin-right:10px}.customize-control-kirki-sortable ul.ui-sortable li.invisible{color:#aaa;border:1px dashed #aaa}.customize-control-kirki-sortable ul.ui-sortable li.invisible .dashicons.visibility{color:#aaa}.customize-control-kirki-switch{position:relative}.customize-control-kirki-switch .switch-off,.customize-control-kirki-switch .switch-on{opacity:1;padding:8px;font-size:14px;line-height:18px}.customize-control-kirki-switch .switch-on{color:#fff;opacity:0}.customize-control-kirki-switch .switch-off{color:#777}.customize-control-kirki-switch .switch{border:none;margin-bottom:1.5rem;outline:0;padding:0;user-select:none;border-radius:3rem}.customize-control-kirki-switch label{background:#b4b9be;float:left;cursor:pointer;display:flex;justify-content:space-between;margin-bottom:1rem;position:relative;transition:left .15s ease-out;border-radius:3rem}.customize-control-kirki-switch label:after{background:#FFF;content:"";display:block;position:absolute;left:5px;top:5px;width:calc(.85rem + 10px);height:calc(.85rem + 10px);transition:all .25s ease-in-out;border-radius:3rem}.customize-control-kirki-switch input+label{margin-left:0;margin-right:0}.customize-control-kirki-switch input:checked+label{background:#0073aa}.customize-control-kirki-switch input:checked+label:after{left:auto;right:5px;background:#fff}.customize-control-kirki-switch input:checked+label .switch-on{opacity:1}.customize-control-kirki-switch input:checked+label .switch-off{opacity:0}.customize-control-kirki-toggle{position:relative}.customize-control-kirki-toggle label{display:flex;flex-wrap:wrap}.customize-control-kirki-toggle label .customize-control-title{width:calc(100% - 55px)}.customize-control-kirki-toggle label .description{order:99}.customize-control-kirki-toggle .switch{border:1px solid #b4b9be;display:inline-block;width:35px;height:12px;border-radius:8px;background:#b4b9be;vertical-align:middle;position:relative;top:4px;cursor:pointer;user-select:none;transition:background 350ms ease}.customize-control-kirki-toggle .switch:after,.customize-control-kirki-toggle .switch:before{content:"";display:block;width:20px;height:20px;border-radius:50%;position:absolute;top:50%;left:-3px;transition:all 350ms cubic-bezier(0,.95,.38,.98),background 150ms ease}.customize-control-kirki-toggle .switch:before{background:rgba(0,0,0,.2);transform:translate3d(0,-50%,0) scale(0)}.customize-control-kirki-toggle .switch:after{background:#999;border:1px solid rgba(0,0,0,.1);transform:translate3d(0,-50%,0)}.customize-control-kirki-toggle .switch:active:before{transform:translate3d(0,-50%,0) scale(3)}.customize-control-kirki-toggle input:checked+.switch:before{background:rgba(0,115,170,.075);transform:translate3d(100%,-50%,0) scale(1)}.customize-control-kirki-toggle input:checked+.switch:after{background:#0073aa;transform:translate3d(100%,-50%,0)}.customize-control-kirki-toggle input:checked+.switch:active:before{background:rgba(0,115,170,.075);transform:translate3d(100%,-50%,0) scale(3)}.customize-control-kirki-typography{position:relative}.customize-control-kirki-typography .wrapper{padding:10px;display:flex;flex-wrap:wrap;justify-content:space-between;border:1px solid rgba(0,0,0,.1)}.customize-control-kirki-typography .wrapper h5{margin:.67em 0 0}.customize-control-kirki-typography .wrapper .color,.customize-control-kirki-typography .wrapper .font-backup,.customize-control-kirki-typography .wrapper .font-family,.customize-control-kirki-typography .wrapper .font-size,.customize-control-kirki-typography .wrapper .letter-spacing,.customize-control-kirki-typography .wrapper .line-height,.customize-control-kirki-typography .wrapper .margin-bottom,.customize-control-kirki-typography .wrapper .margin-top,.customize-control-kirki-typography .wrapper .subsets,.customize-control-kirki-typography .wrapper .text-align,.customize-control-kirki-typography .wrapper .text-transform,.customize-control-kirki-typography .wrapper .variant{width:100%;float:none;clear:both}.customize-control-kirki-typography .wrapper .font-size,.customize-control-kirki-typography .wrapper .letter-spacing,.customize-control-kirki-typography .wrapper .line-height,.customize-control-kirki-typography .wrapper .margin-bottom,.customize-control-kirki-typography .wrapper .margin-top,.customize-control-kirki-typography .wrapper .text-transform{width:48%}.customize-control-kirki-typography .wrapper .text-align .text-align-choices{display:flex}.customize-control-kirki-typography .wrapper .text-align .text-align-choices label{width:100%;padding:5px;text-align:center;border:1px solid rgba(255,255,255,0)}.customize-control-kirki-typography .wrapper .text-align .text-align-choices input{display:none}.customize-control-kirki-typography .wrapper .text-align .text-align-choices input:checked+label{border-color:#0085ba}.customize-control-kirki-typography .wrapper .color{width:auto}
controls/js/dist/script-legacy.js CHANGED
@@ -1,4 +1,5 @@
1
/* jshint -W079 */
2
if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
3
var kirkiSetSettingValue = { // jscs:ignore requireVarDeclFirst
4
@@ -208,7 +209,38 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
208
}
209
};
210
}
211
- ;var kirki = {
212
213
/**
214
* An object containing definitions for controls.
@@ -217,6 +249,59 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
217
*/
218
control: {
219
220
/**
221
* The color control.
222
*
@@ -228,8 +313,8 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
228
* Init the control.
229
*
230
* @since 3.0.16
231
- * @param {object} [control] The customizer control object.
232
- * @returns {void}
233
*/
234
init: function( control ) {
235
var self = this;
@@ -246,11 +331,24 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
246
* Render the template.
247
*
248
* @since 3.0.16
249
- * @param {object} [control] The customizer control object.
250
- * @returns {void}
251
*/
252
template: function( control ) {
253
- control.container.html( kirki.input.color.getTemplate( {
254
label: control.params.label,
255
description: control.params.description,
256
'data-id': control.id,
@@ -259,12 +357,130 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
259
'data-palette': control.params.palette,
260
'data-default-color': control.params['default'],
261
'data-alpha': control.params.choices.alpha,
262
- value: control.setting._value
263
} ) );
264
}
265
- }
266
- },
267
268
/**
269
* An object containing definitions for input fields.
270
*
@@ -273,54 +489,48 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
273
input: {
274
275
/**
276
- * Color input fields.
277
*
278
- * @since 3.0.16
279
*/
280
- color: {
281
282
/**
283
- * Get the HTML for color inputs.
284
*
285
- * @since 3.0.16
286
- * @param {object} [data] The arguments.
287
- * @returns {string}
288
*/
289
- getTemplate: function( data ) {
290
-
291
- var html = '';
292
-
293
- data = _.defaults( data, {
294
- label: '',
295
- description: '',
296
- mode: 'full',
297
- inputAttrs: '',
298
- 'data-palette': data['data-palette'] ? data['data-palette'] : true,
299
- 'data-default-color': data['data-default-color'] ? data['data-default-color'] : '',
300
- 'data-alpha': data['data-alpha'] ? data['data-alpha'] : false,
301
- value: '',
302
- 'data-id': ''
303
- } );
304
305
- html += '<label>';
306
- if ( data.label ) {
307
- html += '<span class="customize-control-title">' + data.label + '</span>';
308
- }
309
- if ( data.description ) {
310
- html += '<span class="description customize-control-description">' + data.description + '</span>';
311
- }
312
- html += '</label>';
313
- html += '<input type="text" data-type="' + data.mode + '" ' + data.inputAttrs + ' data-palette="' + data['data-palette'] + '" data-default-color="' + data['data-default-color'] + '" data-alpha="' + data['data-alpha'] + '" value="' + data.value + '" class="kirki-color-control" data-id="' + data['data-id'] + '"/>';
314
315
- return '<div class="kirki-input-container" data-id="' + data.id + '">' + html + '</div>';
316
- },
317
318
/**
319
* Init the control.
320
*
321
* @since 3.0.16
322
- * @param {object} [control] The control object.
323
- * @returns {void}
324
*/
325
init: function( control ) {
326
var picker = jQuery( '.kirki-color-control[data-id="' + control.id + '"]' ),
@@ -341,7 +551,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
341
clear = jQuery( '.kirki-input-container[data-id="' + control.id + '"] .wp-picker-clear' );
342
if ( clear.length ) {
343
clear.click( function() {
344
- control.setting.set( '' );
345
});
346
}
347
}, 200 );
@@ -357,9 +567,163 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
357
}
358
});
359
}
360
- }
361
- },
362
363
/**
364
* An object containing definitions for settings.
365
*
@@ -375,7 +739,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
375
* customizer API is "control".
376
*
377
* @since 3.0.16
378
- * @param {string} [setting] The setting for which we're getting the value.
379
* @returns {mixed} Depends on the value.
380
*/
381
get: function( setting ) {
@@ -419,12 +783,12 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
419
* and also take into account any defined "key" arguments which take this even deeper.
420
*
421
* @since 3.0.16
422
- * @param {object|string} [element] The DOM element whose value has changed,
423
* or an ID.
424
- * @param {mixed} [value] Depends on the control-type.
425
- * @param {string} [key] If we only want to save an item in an object
426
* we can define the key here.
427
- * @returns {void}
428
*/
429
set: function( element, value, key ) {
430
var setting,
@@ -446,6 +810,11 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
446
}
447
}
448
449
parts = setting.split( '[' ),
450
451
// Find the setting we're using in the control using the customizer API.
@@ -504,8 +873,239 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
504
wp.customize.control( foundNode ).setting.set( value );
505
}
506
}
507
- };
508
- ;/* global kirki */
509
/**
510
* The majority of the code in this file
511
* is derived from the wp-customize-posts plugin
@@ -551,7 +1151,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
551
* should be changed in Core to be applied once the control is embedded.
552
*
553
* @private
554
- * @returns {void}
555
*/
556
_setUpSettingRootLinks: function() {
557
var control = this,
@@ -573,7 +1173,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
573
* Add bidirectional data binding links between inputs and the setting properties.
574
*
575
* @private
576
- * @returns {void}
577
*/
578
_setUpSettingPropertyLinks: function() {
579
var control = this,
@@ -634,7 +1234,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
634
* so that the control isn't embedded on load,
635
* unless the containing section is already expanded.
636
*
637
- * @returns {void}
638
*/
639
embed: function() {
640
var control = this,
@@ -663,7 +1263,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
663
* This function is called in Section.onChangeExpanded() so the control
664
* will only get embedded when the Section is first expanded.
665
*
666
- * @returns {void}
667
*/
668
actuallyEmbed: function() {
669
var control = this;
@@ -678,7 +1278,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
678
* This is not working with autofocus.
679
*
680
* @param {object} [args] Args.
681
- * @returns {void}
682
*/
683
focus: function( args ) {
684
var control = this;
@@ -690,7 +1290,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
690
* Additional actions that run on ready.
691
*
692
* @param {object} [args] Args.
693
- * @returns {void}
694
*/
695
initKirkiControl: function( control ) {
696
if ( 'undefined' !== typeof kirki.control[ control.params.type ] ) {
@@ -715,6 +1315,10 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
715
return true;
716
}
717
718
// Get the numeric value.
719
numericValue = parseFloat( value );
720
@@ -733,7 +1337,7 @@ if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
733
_.each( kirki.control, function( obj, type ) {
734
wp.customize.controlConstructor[ type ] = wp.customize.kirkiDynamicControl.extend({});
735
} );
736
- ;/* global kirkiControlLoader */
737
wp.customize.controlConstructor['kirki-background'] = wp.customize.Control.extend({
738
739
// When we're finished loading continue processing
@@ -908,7 +1512,7 @@ wp.customize.controlConstructor['kirki-background'] = wp.customize.Control.exten
908
jQuery( input ).attr( 'value', JSON.stringify( valueObj ) ).trigger( 'change' );
909
}
910
});
911
- ;wp.customize.controlConstructor['kirki-code'] = wp.customize.kirkiDynamicControl.extend({
912
913
initKirkiControl: function() {
914
@@ -936,9 +1540,9 @@ wp.customize.controlConstructor['kirki-background'] = wp.customize.Control.exten
936
} ) );
937
}
938
});
939
- ;wp.customize.controlConstructor['kirki-color-palette'] = wp.customize.kirkiDynamicControl.extend({});
940
- ;wp.customize.controlConstructor['kirki-dashicons'] = wp.customize.kirkiDynamicControl.extend({});
941
- ;wp.customize.controlConstructor['kirki-date'] = wp.customize.kirkiDynamicControl.extend({
942
943
initKirkiControl: function() {
944
@@ -960,7 +1564,7 @@ wp.customize.controlConstructor['kirki-background'] = wp.customize.Control.exten
960
} ) );
961
}
962
});
963
- ;/* global dimensionkirkiL10n */
964
wp.customize.controlConstructor['kirki-dimension'] = wp.customize.kirkiDynamicControl.extend({
965
966
initKirkiControl: function() {
@@ -1005,7 +1609,7 @@ wp.customize.controlConstructor['kirki-dimension'] = wp.customize.kirkiDynamicCo
1005
} );
1006
}
1007
});
1008
- ;/* global dimensionskirkiL10n */
1009
wp.customize.controlConstructor['kirki-dimensions'] = wp.customize.kirkiDynamicControl.extend({
1010
1011
initKirkiControl: function() {
@@ -1076,33 +1680,28 @@ wp.customize.controlConstructor['kirki-dimensions'] = wp.customize.kirkiDynamicC
1076
1077
setting.notifications.remove( code );
1078
1079
- _.each( ['top', 'bottom', 'left', 'right'], function( direction ) {
1080
- if ( ! _.isUndefined( value[ direction ] ) ) {
1081
- if ( false === control.kirkiValidateCSSValue( value[ direction ] ) ) {
1082
- subs[ direction ] = dimensionskirkiL10n[ direction ];
1083
- } else {
1084
- delete subs[ direction ];
1085
- }
1086
}
1087
- });
1088
1089
if ( ! _.isEmpty( subs ) ) {
1090
message = dimensionskirkiL10n['invalid-value'] + ' (' + _.values( subs ).toString() + ') ';
1091
- setting.notifications.add( code, new wp.customize.Notification(
1092
- code,
1093
- {
1094
- type: 'warning',
1095
- message: message
1096
- }
1097
- ) );
1098
- } else {
1099
- setting.notifications.remove( code );
1100
}
1101
} );
1102
} );
1103
}
1104
});
1105
- ;/* global tinyMCE */
1106
wp.customize.controlConstructor['kirki-editor'] = wp.customize.kirkiDynamicControl.extend({
1107
1108
initKirkiControl: function() {
@@ -1134,7 +1733,7 @@ wp.customize.controlConstructor['kirki-editor'] = wp.customize.kirkiDynamicContr
1134
}
1135
}
1136
});
1137
- ;/* global fontAwesomeJSON */
1138
wp.customize.controlConstructor['kirki-fontawesome'] = wp.customize.kirkiDynamicControl.extend({
1139
1140
initKirkiControl: function() {
@@ -1173,8 +1772,7 @@ wp.customize.controlConstructor['kirki-fontawesome'] = wp.customize.kirkiDynamic
1173
select.val( control.setting._value ).trigger( 'change' );
1174
}
1175
});
1176
- ;wp.customize.controlConstructor['kirki-generic'] = wp.customize.kirkiDynamicControl.extend({});
1177
- ;/* global kirkiControlLoader */
1178
wp.customize.controlConstructor['kirki-image'] = wp.customize.Control.extend({
1179
1180
// When we're finished loading continue processing
@@ -1206,7 +1804,7 @@ wp.customize.controlConstructor['kirki-image'] = wp.customize.Control.extend({
1206
1207
// Tweaks for save_as = id.
1208
if ( ( 'id' === saveAs || 'ID' === saveAs ) && '' !== value ) {
1209
- wp.media.attachment( value ).fetch().then( function( mediaData ) {
1210
setTimeout( function() {
1211
var url = wp.media.attachment( value ).get( 'url' );
1212
preview.removeClass().addClass( 'thumbnail thumbnail-image' ).html( '<img src="' + url + '" alt="" />' );
@@ -1358,7 +1956,7 @@ wp.customize.controlConstructor['kirki-image'] = wp.customize.Control.extend({
1358
control.container.find( 'button' ).trigger( 'change' );
1359
}
1360
});
1361
- ;wp.customize.controlConstructor['kirki-multicheck'] = wp.customize.kirkiDynamicControl.extend({
1362
1363
initKirkiControl: function() {
1364
@@ -1382,7 +1980,7 @@ wp.customize.controlConstructor['kirki-image'] = wp.customize.Control.extend({
1382
});
1383
}
1384
});
1385
- ;/* global kirkiControlLoader */
1386
wp.customize.controlConstructor['kirki-multicolor'] = wp.customize.Control.extend({
1387
1388
// When we're finished loading continue processing
@@ -1475,7 +2073,6 @@ wp.customize.controlConstructor['kirki-multicolor'] = wp.customize.Control.exten
1475
control.setting.set( valueObj );
1476
}
1477
});
1478
- ;/* global numberKirkiL10n */
1479
wp.customize.controlConstructor['kirki-number'] = wp.customize.kirkiDynamicControl.extend({
1480
1481
initKirkiControl: function() {
@@ -1554,8 +2151,8 @@ wp.customize.controlConstructor['kirki-number'] = wp.customize.kirkiDynamicContr
1554
});
1555
}
1556
});
1557
- ;wp.customize.controlConstructor['kirki-palette'] = wp.customize.kirkiDynamicControl.extend({});
1558
- ;/* global kirkiSetSettingValue */
1559
wp.customize.controlConstructor['kirki-preset'] = wp.customize.kirkiDynamicControl.extend({
1560
1561
initKirkiControl: function() {
@@ -1591,10 +2188,9 @@ wp.customize.controlConstructor['kirki-preset'] = wp.customize.kirkiDynamicContr
1591
});
1592
}
1593
});
1594
- ;wp.customize.controlConstructor['kirki-radio-buttonset'] = wp.customize.kirkiDynamicControl.extend({});
1595
- ;wp.customize.controlConstructor['kirki-radio-image'] = wp.customize.kirkiDynamicControl.extend({});
1596
- ;wp.customize.controlConstructor['kirki-radio'] = wp.customize.kirkiDynamicControl.extend({});
1597
- ;/* global kirkiControlLoader */
1598
var RepeaterRow = function( rowIndex, container, label, control ) {
1599
1600
'use strict';
@@ -2478,7 +3074,11 @@ wp.customize.controlConstructor.repeater = wp.customize.Control.extend({
2478
selectWooOptions.maximumSelectionLength = multiple;
2479
}
2480
}
2481
- $select = jQuery( dropdown ).selectWoo( selectWooOptions ).val( data[ dataField ] );
2482
2483
this.container.on( 'change', '.repeater-field select', function( event ) {
2484
@@ -2492,30 +3092,7 @@ wp.customize.controlConstructor.repeater = wp.customize.Control.extend({
2492
});
2493
}
2494
});
2495
- ;wp.customize.controlConstructor['kirki-select'] = wp.customize.kirkiDynamicControl.extend({
2496
-
2497
- initKirkiControl: function() {
2498
-
2499
- var control = this,
2500
- element = this.container.find( 'select' ),
2501
- multiple = parseInt( element.data( 'multiple' ), 10 ),
2502
- selectValue,
2503
- selectWooOptions = {
2504
- escapeMarkup: function( markup ) {
2505
- return markup;
2506
- }
2507
- };
2508
-
2509
- if ( 1 < multiple ) {
2510
- selectWooOptions.maximumSelectionLength = multiple;
2511
- }
2512
- jQuery( element ).selectWoo( selectWooOptions ).on( 'change', function() {
2513
- selectValue = jQuery( this ).val();
2514
- control.setting.set( selectValue );
2515
- });
2516
- }
2517
- });
2518
- ;wp.customize.controlConstructor['kirki-slider'] = wp.customize.kirkiDynamicControl.extend({
2519
2520
initKirkiControl: function() {
2521
var control = this,
@@ -2559,7 +3136,7 @@ wp.customize.controlConstructor.repeater = wp.customize.Control.extend({
2559
} );
2560
}
2561
});
2562
- ;/* global kirkiControlLoader */
2563
wp.customize.controlConstructor['kirki-sortable'] = wp.customize.Control.extend({
2564
2565
// When we're finished loading continue processing
@@ -2626,22 +3203,14 @@ wp.customize.controlConstructor['kirki-sortable'] = wp.customize.Control.extend(
2626
control.setting.set( newValue );
2627
}
2628
});
2629
- ;wp.customize.controlConstructor['kirki-switch'] = wp.customize.kirkiDynamicControl.extend({
2630
2631
initKirkiControl: function() {
2632
2633
'use strict';
2634
2635
var control = this,
2636
- checkboxValue = control.setting._value,
2637
- on = jQuery( control.container.find( '.switch-on' ) ),
2638
- off = jQuery( control.container.find( '.switch-off' ) );
2639
-
2640
- // CSS modifications depending on label sizes.
2641
- jQuery( control.container.find( '.switch label ' ) ).css( 'width', ( on.width() + off.width() + 40 ) + 'px' );
2642
- jQuery( '#customize-control-' + control.id.replace( '[', '-' ).replace( ']', '' ) ).append(
2643
- '<style>#customize-control-' + control.id.replace( '[', '-' ).replace( ']', '' ) + ' .switch label:after{width:' + ( on.width() + 13 ) + 'px;}#customize-control-' + control.id.replace( '[', '-' ).replace( ']', '' ) + ' .switch input:checked + label:after{left:' + ( on.width() + 22 ) + 'px;width:' + ( off.width() + 13 ) + 'px;}</style>'
2644
- );
2645
2646
// Save the value
2647
this.container.on( 'change', 'input', function() {
@@ -2650,7 +3219,7 @@ wp.customize.controlConstructor['kirki-sortable'] = wp.customize.Control.extend(
2650
});
2651
}
2652
});
2653
- ;wp.customize.controlConstructor['kirki-toggle'] = wp.customize.kirkiDynamicControl.extend({
2654
2655
initKirkiControl: function() {
2656
@@ -2664,7 +3233,7 @@ wp.customize.controlConstructor['kirki-sortable'] = wp.customize.Control.extend(
2664
});
2665
}
2666
});
2667
- ;/* global kirkiControlLoader, kirkiAllFonts */
2668
wp.customize.controlConstructor['kirki-typography'] = wp.customize.Control.extend({
2669
2670
// When we're finished loading continue processing
1
/* jshint -W079 */
2
+ /* jshint unused:false */
3
if ( _.isUndefined( window.kirkiSetSettingValue ) ) {
4
var kirkiSetSettingValue = { // jscs:ignore requireVarDeclFirst
5
209
}
210
};
211
}
212
+ var kirki = {
213
+
214
+ initialized: false,
215
+
216
+ /**
217
+ * Initialize the object.
218
+ *
219
+ * @since 3.0.17
220
+ * @returns {null}
221
+ */
222
+ initialize: function() {
223
+ var self = this;
224
+
225
+ // We only need to initialize once.
226
+ if ( self.initialized ) {
227
+ return;
228
+ }
229
+
230
+ setTimeout( function() {
231
+ kirki.util.webfonts.standard.initialize();
232
+ kirki.util.webfonts.google.initialize();
233
+ }, 150 );
234
+
235
+ // Mark as initialized.
236
+ self.initialized = true;
237
+ }
238
+ };
239
+
240
+ // Initialize the kirki object.
241
+ kirki.initialize();
242
+ var kirki = kirki || {};
243
+ kirki = jQuery.extend( kirki, {
244
245
/**
246
* An object containing definitions for controls.
249
*/
250
control: {
251
252
+ /**
253
+ * The radio control.
254
+ *
255
+ * @since 3.0.17
256
+ */
257
+ 'kirki-radio': {
258
+
259
+ /**
260
+ * Init the control.
261
+ *
262
+ * @since 3.0.17
263
+ * @param {Object} control - The customizer control object.
264
+ * @returns {null}
265
+ */
266
+ init: function( control ) {
267
+ var self = this;
268
+
269
+ // Render the template.
270
+ self.template( control );
271
+
272
+ // Init the control.
273
+ kirki.input.radio.init( control );
274
+
275
+ },
276
+
277
+ /**
278
+ * Render the template.
279
+ *
280
+ * @since 3.0.17
281
+ * @param {Object} control - The customizer control object.
282
+ * @param {Object} control.params - The control parameters.
283
+ * @param {string} control.params.label - The control label.
284
+ * @param {string} control.params.description - The control description.
285
+ * @param {string} control.params.inputAttrs - extra input arguments.
286
+ * @param {string} control.params.default - The default value.
287
+ * @param {Object} control.params.choices - Any extra choices we may need.
288
+ * @param {string} control.id - The setting.
289
+ * @returns {null}
290
+ */
291
+ template: function( control ) {
292
+ var template = wp.template( 'kirki-input-radio' );
293
+ control.container.html( template( {
294
+ label: control.params.label,
295
+ description: control.params.description,
296
+ 'data-id': control.id,
297
+ inputAttrs: control.params.inputAttrs,
298
+ 'default': control.params['default'],
299
+ value: kirki.setting.get( control.id ),
300
+ choices: control.params.choices
301
+ } ) );
302
+ }
303
+ },
304
+
305
/**
306
* The color control.
307
*
313
* Init the control.
314
*
315
* @since 3.0.16
316
+ * @param {Object} control - The customizer control object.
317
+ * @returns {null}
318
*/
319
init: function( control ) {
320
var self = this;
331
* Render the template.
332
*
333
* @since 3.0.16
334
+ * @param {Object} control - The customizer control object.
335
+ * @param {Object} control.params - The control parameters.
336
+ * @param {string} control.params.label - The control label.
337
+ * @param {string} control.params.description - The control description.
338
+ * @param {string} control.params.mode - The colorpicker mode. Can be 'full' or 'hue'.
339
+ * @param {bool|array} control.params.palette - false if we don't want a palette,
340
+ * true to use the default palette,
341
+ * array of custom hex colors if we want a custom palette.
342
+ * @param {string} control.params.inputAttrs - extra input arguments.
343
+ * @param {string} control.params.default - The default value.
344
+ * @param {Object} control.params.choices - Any extra choices we may need.
345
+ * @param {boolean} control.params.choices.alpha - should we add an alpha channel?
346
+ * @param {string} control.id - The setting.
347
+ * @returns {null}
348
*/
349
template: function( control ) {
350
+ var template = wp.template( 'kirki-input-color' );
351
+ control.container.html( template( {
352
label: control.params.label,
353
description: control.params.description,
354
'data-id': control.id,
357
'data-palette': control.params.palette,
358
'data-default-color': control.params['default'],
359
'data-alpha': control.params.choices.alpha,
360
+ value: kirki.setting.get( control.id )
361
} ) );
362
}
363
+ },
364
+
365
+ /**
366
+ * The generic control.
367
+ *
368
+ * @since 3.0.16
369
+ */
370
+ 'kirki-generic': {
371
+
372
+ /**
373
+ * Init the control.
374
+ *
375
+ * @since 3.0.17
376
+ * @param {Object} control - The customizer control object.
377
+ * @param {Object} control.params - Control parameters.
378
+ * @param {Object} control.params.choices - Define the specifics for this input.
379
+ * @param {string} control.params.choices.element - The HTML element we want to use ('input', 'div', 'span' etc).
380
+ * @returns {null}
381
+ */
382
+ init: function( control ) {
383
+ var self = this;
384
+
385
+ // Render the template.
386
+ self.template( control );
387
388
+ // Init the control.
389
+ if ( ! _.isUndefined( control.params ) && ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.element ) && 'textarea' === control.params.choices.element ) {
390
+ kirki.input.textarea.init( control );
391
+ return;
392
+ }
393
+ kirki.input.genericInput.init( control );
394
+ },
395
+
396
+ /**
397
+ * Render the template.
398
+ *
399
+ * @since 3.0.17
400
+ * @param {Object} control - The customizer control object.
401
+ * @param {Object} control.params - The control parameters.
402
+ * @param {string} control.params.label - The control label.
403
+ * @param {string} control.params.description - The control description.
404
+ * @param {string} control.params.inputAttrs - extra input arguments.
405
+ * @param {string} control.params.default - The default value.
406
+ * @param {Object} control.params.choices - Any extra choices we may need.
407
+ * @param {boolean} control.params.choices.alpha - should we add an alpha channel?
408
+ * @param {string} control.id - The setting.
409
+ * @returns {null}
410
+ */
411
+ template: function( control ) {
412
+ var args = {
413
+ label: control.params.label,
414
+ description: control.params.description,
415
+ 'data-id': control.id,
416
+ inputAttrs: control.params.inputAttrs,
417
+ choices: control.params.choices,
418
+ value: kirki.setting.get( control.id )
419
+ },
420
+ template;
421
+
422
+ if ( ! _.isUndefined( control.params ) && ! _.isUndefined( control.params.choices ) && ! _.isUndefined( control.params.choices.element ) && 'textarea' === control.params.choices.element ) {
423
+ template = wp.template( 'kirki-input-textarea' );
424
+ control.container.html( template( args ) );
425
+ return;
426
+ }
427
+ template = wp.template( 'kirki-input-generic' );
428
+ control.container.html( template( args ) );
429
+ }
430
+ },
431
+
432
+ 'kirki-select': {
433
+
434
+ /**
435
+ * Init the control.
436
+ *
437
+ * @since 3.0.17
438
+ * @param {Object} control - The customizer control object.
439
+ * @returns {null}
440
+ */
441
+ init: function( control ) {
442
+ var self = this;
443
+
444
+ // Render the template.
445
+ self.template( control );
446
+
447
+ // Init the control.
448
+ kirki.input.select.init( control );
449
+ },
450
+
451
+ /**
452
+ * Render the template.
453
+ *
454
+ * @since 3.0.17
455
+ * @param {Object} control - The customizer control object.
456
+ * @param {Object} control.params - The control parameters.
457
+ * @param {string} control.params.label - The control label.
458
+ * @param {string} control.params.description - The control description.
459
+ * @param {string} control.params.inputAttrs - extra input arguments.
460
+ * @param {Object} control.params.default - The default value.
461
+ * @param {Object} control.params.choices - The choices for the select dropdown.
462
+ * @param {string} control.id - The setting.
463
+ * @returns {null}
464
+ */
465
+ template: function( control ) {
466
+ var template = wp.template( 'kirki-input-select' );
467
+
468
+ control.container.html( template( {
469
+ label: control.params.label,
470
+ description: control.params.description,
471
+ 'data-id': control.id,
472
+ inputAttrs: control.params.inputAttrs,
473
+ choices: control.params.choices,
474
+ value: kirki.setting.get( control.id ),
475
+ multiple: control.params.multiple || 1
476
+ } ) );
477
+ }
478
+ }
479
+ }
480
+ } );
481
+ /* global kirkiL10n */
482
+ var kirki = kirki || {};
483
+ kirki = jQuery.extend( kirki, {
484
/**
485
* An object containing definitions for input fields.
486
*
489
input: {
490
491
/**
492
+ * Radio input fields.
493
*
494
+ * @since 3.0.17
495
*/
496
+ radio: {
497
498
/**
499
+ * Init the control.
500
*
501
+ * @since 3.0.17
502
+ * @param {Object} control - The control object.
503
+ * @param {Object} control.id - The setting.
504
+ * @returns {null}
505
*/
506
+ init: function( control ) {
507
+ var input = jQuery( 'input[data-id="' + control.id + '"]' );
508
509
+ // Save the value
510
+ input.on( 'change keyup paste click', function() {
511
+ kirki.setting.set( control.id, jQuery( this ).val() );
512
+ });
513
+ }
514
+ },
515
516
+ /**
517
+ * Color input fields.
518
+ *
519
+ * @since 3.0.16
520
+ */
521
+ color: {
522
523
/**
524
* Init the control.
525
*
526
* @since 3.0.16
527
+ * @param {Object} control - The control object.
528
+ * @param {Object} control.id - The setting.
529
+ * @param {Object} control.choices - Additional options for the colorpickers.
530
+ * @param {Object} control.params - Control parameters.
531
+ * @param {Object} control.params.choices - alias for control.choices.
532
+
533
+ * @returns {null}
534
*/
535
init: function( control ) {
536
var picker = jQuery( '.kirki-color-control[data-id="' + control.id + '"]' ),
551
clear = jQuery( '.kirki-input-container[data-id="' + control.id + '"] .wp-picker-clear' );
552
if ( clear.length ) {
553
clear.click( function() {
554
+ kirki.setting.set( control.id, '' );
555
});
556
}
557
}, 200 );
567
}
568
});
569
}
570
+ },
571
572
+ /**
573
+ * Generic input fields.
574
+ *
575
+ * @since 3.0.17
576
+ */
577
+ genericInput: {
578
+
579
+ /**
580
+ * Init the control.
581
+ *
582
+ * @since 3.0.17
583
+ * @param {Object} control - The control object.
584
+ * @param {Object} control.id - The setting.
585
+ * @returns {null}
586
+ */
587
+ init: function( control ) {
588
+ var input = jQuery( 'input[data-id="' + control.id + '"]' );
589
+
590
+ // Save the value
591
+ input.on( 'change keyup paste click', function() {
592
+ kirki.setting.set( control.id, jQuery( this ).val() );
593
+ });
594
+ }
595
+ },
596
+
597
+ /**
598
+ * Generic input fields.
599
+ *
600
+ * @since 3.0.17
601
+ */
602
+ textarea: {
603
+
604
+ /**
605
+ * Init the control.
606
+ *
607
+ * @since 3.0.17
608
+ * @param {Object} control - The control object.
609
+ * @param {Object} control.id - The setting.
610
+ * @returns {null}
611
+ */
612
+ init: function( control ) {
613
+ var textarea = jQuery( 'textarea[data-id="' + control.id + '"]' );
614
+
615
+ // Save the value
616
+ textarea.on( 'change keyup paste click', function() {
617
+ kirki.setting.set( control.id, jQuery( this ).val() );
618
+ });
619
+ }
620
+ },
621
+
622
+ select: {
623
+
624
+ /**
625
+ * Init the control.
626
+ *
627
+ * @since 3.0.17
628
+ * @param {Object} control - The control object.
629
+ * @param {Object} control.id - The setting.
630
+ * @returns {null}
631
+ */
632
+ init: function( control ) {
633
+ var element = jQuery( 'select[data-id="' + control.id + '"]' ),
634
+ multiple = parseInt( element.data( 'multiple' ), 10 ),
635
+ selectValue,
636
+ selectWooOptions = {
637
+ escapeMarkup: function( markup ) {
638
+ return markup;
639
+ }
640
+ };
641
+
642
+ if ( 1 < multiple ) {
643
+ selectWooOptions.maximumSelectionLength = multiple;
644
+ }
645
+ jQuery( element ).selectWoo( selectWooOptions ).on( 'change', function() {
646
+ selectValue = jQuery( this ).val();
647
+ selectValue = ( null === selectValue && 1 < multiple ) ? [] : selectValue;
648
+ kirki.setting.set( control.id, selectValue );
649
+ });
650
+ }
651
+ },
652
+
653
+ image: {
654
+
655
+ /**
656
+ * Get the HTML for image inputs.
657
+ *
658
+ * @since 3.0.17
659
+ * @param {Object} data - The arguments.
660
+ * @returns {string}
661
+ */
662
+ getTemplate: function( data ) {
663
+ var html = '',
664
+ saveAs = 'url',
665
+ url;
666
+
667
+ data = _.defaults( data, {
668
+ label: '',
669
+ description: '',
670
+ inputAttrs: '',
671
+ 'data-id': '',
672
+ choices: {},
673
+ value: ''
674
+ } );
675
+
676
+ if ( ! _.isUndefined( data.choices ) && ! _.isUndefined( data.choices.save_as ) ) {
677
+ saveAs = data.choices.save_as;
678
+ }
679
+ url = data.value;
680
+ if ( _.isObject( data.value ) && ! _.isUndefined( data.value.url ) ) {
681
+ url = data.value.url;
682
+ }
683
+
684
+ html += '<label>';
685
+ if ( data.label ) {
686
+ html += '<span class="customize-control-title">' + data.label + '</span>';
687
+ }
688
+ if ( data.description ) {
689
+ html += '<span class="description customize-control-description">' + data.description + '</span>';
690
+ }
691
+ html += '</label>';
692
+ html += '<div class="image-wrapper attachment-media-view image-upload">';
693
+ if ( data.value.url || '' !== url ) {
694
+ html += '<div class="thumbnail thumbnail-image"><img src="' + url + '" alt="" /></div>';
695
+ } else {
696
+ html += '<div class="placeholder">' + kirkiL10n.noFileSelected + '</div>';
697
+ }
698
+ html += '<div class="actions">';
699
+ html += '<button class="button image-upload-remove-button' + ( '' === url ? ' hidden' : '' ) + '">' + kirkiL10n.remove + '</button>';
700
+ if ( data['default'] && '' !== data['default'] ) {
701
+ html += '<button type="button" class="button image-default-button"';
702
+ if ( data['default'] === data.value || ( ! _.isUndefined( data.value.url ) && data['default'] === data.value.url ) ) {
703
+ html += ' style="display:none;"';
704
+ }
705
+ html += '>' + kirkiL10n['default'] + '</button>';
706
+ }
707
+ html += '<button type="button" class="button image-upload-button">' + kirkiL10n.selectFile + '</button>';
708
+ html += '</div></div>';
709
+
710
+ return '<div class="kirki-input-container" data-id="' + data.id + '">' + html + '</div>';
711
+ },
712
+
713
+ /**
714
+ * Init the control.
715
+ *
716
+ * @since 3.0.17
717
+ * @param {Object} control - The control object.
718
+ * @returns {null}
719
+ */
720
+ init: function( control ) { // jshint ignore:line
721
+ }
722
+ }
723
+ }
724
+ } );
725
+ var kirki = kirki || {};
726
+ kirki = jQuery.extend( kirki, {
727
/**
728
* An object containing definitions for settings.
729
*
739
* customizer API is "control".
740
*
741
* @since 3.0.16
742
+ * @param {string} setting - The setting for which we're getting the value.
743
* @returns {mixed} Depends on the value.
744
*/
745
get: function( setting ) {
783
* and also take into account any defined "key" arguments which take this even deeper.
784
*
785
* @since 3.0.16
786
+ * @param {object|string} element - The DOM element whose value has changed,
787
* or an ID.
788
+ * @param {mixed} value - Depends on the control-type.
789
+ * @param {string} key - If we only want to save an item in an object
790
* we can define the key here.
791
+ * @returns {null}
792
*/
793
set: function( element, value, key ) {
794
var setting,
810
}
811
}
812
813
+ if ( 'undefined' !== typeof wp.customize.control( setting ) ) {
814
+ wp.customize.control( setting ).setting.set( value );
815
+ return;
816
+ }
817
+
818
parts = setting.split( '[' ),
819
820
// Find the setting we're using in the control using the customizer API.
873
wp.customize.control( foundNode ).setting.set( value );
874
}
875
}
876
+ } );
877
+ /* global ajaxurl */
878
+ var kirki = kirki || {};
879
+ kirki = jQuery.extend( kirki, {
880
+ /**
881
+ * A collection of utility methods.
882
+ *
883
+ * @since 3.0.17
884
+ */
885
+ util: {
886
+
887
+ /**
888
+ * A collection of utility methods for webfonts.
889
+ *
890
+ * @since 3.0.17
891
+ */
892
+ webfonts: {
893
+
894
+ /**
895
+ * Google-fonts related methods.
896
+ *
897
+ * @since 3.0.17
898
+ */
899
+ google: {
900
+
901
+ /**
902
+ * An object containing all Google fonts.
903
+ *
904
+ * to set this call this.setFonts();
905
+ *
906
+ * @since 3.0.17
907
+ */
908
+ fonts: {},
909
+
910
+ /**
911
+ * Init for google-fonts.
912
+ *
913
+ * @since 3.0.17
914
+ * @returns {null}
915
+ */
916
+ initialize: function() {
917
+ var self = this;
918
+
919
+ self.setFonts();
920
+ },
921
+
922
+ /**
923
+ * Set fonts in this.fonts
924
+ *
925
+ * @since 3.0.17
926
+ * @returns {null}
927
+ */
928
+ setFonts: function() {
929
+ var self = this;
930
+
931
+ // No need to run if we already have the fonts.
932
+ if ( ! _.isEmpty( self.fonts ) ) {
933
+ return;
934
+ }
935
+
936
+ // Make an AJAX call to set the fonts object (alpha).
937
+ jQuery.post( ajaxurl, { 'action': 'kirki_fonts_google_all_get' }, function( response ) {
938
+
939
+ // Get fonts from the JSON array.
940
+ self.fonts = JSON.parse( response );
941
+ } );
942
+ },
943
+
944
+ /**
945
+ * Gets all properties of a font-family.
946
+ *
947
+ * @since 3.0.17
948
+ * @param {string} family - The font-family we're interested in.
949
+ * @returns {Object}
950
+ */
951
+ getFont: function( family ) {
952
+ var self = this,
953
+ fonts = self.getFonts();
954
+
955
+ if ( 'undefined' === typeof fonts[ family ] ) {
956
+ return false;
957
+ }
958
+ return fonts[ family ];
959
+ },
960
+
961
+ /**
962
+ * Gets all properties of a font-family.
963
+ *
964
+ * @since 3.0.17
965
+ * @param {string} order - How to order the fonts (alpha|popularity|trending).
966
+ * @param {int} number - How many to get. 0 for all.
967
+ * @returns {Object}
968
+ */
969
+ getFonts: function( order, number ) {
970
+ var self = this,
971
+ ordered = {},
972
+ partial = [];
973
+
974
+ // Make sure order is correct.
975
+ order = order || 'alpha';
976
+ order = ( 'alpha' !== order && 'popularity' !== order && 'trending' !== order ) ? 'alpha' : order;
977
+
978
+ // Make sure number is correct.
979
+ number = number || 0;
980
+ number = parseInt( number, 10 );
981
+
982
+ if ( 'alpha' === order || 0 === number ) {
983
+ ordered = self.fonts.items;
984
+ } else {
985
+ partial = _.first( self.fonts.order[ order ], number );
986
+ _.each( partial, function( family ) {
987
+ ordered[ family ] = self.fonts.items[ family ];
988
+ } );
989
+ }
990
+
991
+ return ordered;
992
+ },
993
+
994
+ /**
995
+ * Gets the variants for a font-family.
996
+ *
997
+ * @since 3.0.17
998
+ * @param {string} family - The font-family we're interested in.
999
+ * @returns {Array}
1000
+ */
1001
+ getVariants: function( family ) {
1002
+ var self = this,
1003
+ font = self.getFont( family );
1004
+
1005
+ // Early exit if font was not found.
1006
+ if ( ! font ) {
1007
+