@themarioga/grid-editor 8.0.0-beta.3 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/README.md +9 -9
- package/UPGRADING.md +21 -11
- package/dist/grideditor.bundle.min.js +3 -3
- package/dist/grideditor.css +52 -35
- package/dist/grideditor.d.ts +8 -8
- package/dist/grideditor.esm.js +7 -1
- package/dist/grideditor.js +7 -1
- package/dist/grideditor.min.css +1 -1
- package/dist/grideditor.min.css.map +1 -1
- package/dist/grideditor.min.js +2 -2
- package/dist/grideditor.min.js.map +3 -3
- package/dist/locales/grideditor.es.esm.js +69 -68
- package/dist/locales/grideditor.es.js +69 -68
- package/dist/locales/grideditor.es.min.js +1 -1
- package/dist/locales/grideditor.es.min.js.map +2 -2
- package/dist/plugins/grideditor.alignment.min.js.map +1 -1
- package/dist/plugins/{grideditor.style.esm.js → grideditor.inline-style.esm.js} +184 -184
- package/dist/plugins/{grideditor.style.js → grideditor.inline-style.js} +182 -182
- package/dist/plugins/grideditor.inline-style.min.js +4 -0
- package/dist/plugins/grideditor.inline-style.min.js.map +7 -0
- package/docs/locale-keys.md +81 -80
- package/docs/plugins.md +5 -5
- package/example/index.html +6 -6
- package/example/{style.html → inline-style.html} +5 -5
- package/example/utilities.html +3 -3
- package/package.json +1 -1
- package/src/js/grideditor.js +8 -0
- package/src/js/{style → inline-style}/accordion.js +9 -9
- package/src/js/{style → inline-style}/catalog.js +6 -6
- package/src/js/{style → inline-style}/custom.js +4 -4
- package/src/js/{style → inline-style}/display.js +2 -2
- package/src/js/{style → inline-style}/drawerflow.js +1 -1
- package/src/js/{style → inline-style}/fields.js +25 -25
- package/src/js/{style → inline-style}/flex.js +2 -2
- package/src/js/{style → inline-style}/float.js +2 -2
- package/src/js/{style → inline-style}/options.js +5 -5
- package/src/js/{style → inline-style}/sections.js +50 -50
- package/src/js/{style → inline-style}/spacing.js +2 -2
- package/src/js/{style → inline-style}/sticky.js +2 -2
- package/src/js/{style → inline-style}/textalign.js +2 -2
- package/src/js/locales/grideditor.es.js +69 -68
- package/src/js/plugins/grideditor.alignment.js +1 -1
- package/src/js/plugins/grideditor.inline-style.js +185 -0
- package/src/less/grideditor.less +43 -25
- package/types/grideditor.d.ts +8 -8
- package/dist/plugins/grideditor.style.min.js +0 -4
- package/dist/plugins/grideditor.style.min.js.map +0 -7
- package/src/js/plugins/grideditor.style.js +0 -185
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The style plugin's inline fields: one per css property, each writing the
|
|
2
|
+
* The inline-style plugin's inline fields: one per css property, each writing the
|
|
3
3
|
* node's own style through ge.setHostStyle, never by hand, so the preview
|
|
4
4
|
* of a breakpoint view neither shows in them nor eats what they write.
|
|
5
5
|
*
|
|
@@ -40,7 +40,7 @@ function mark(input, ok, ge) {
|
|
|
40
40
|
if (ok) {
|
|
41
41
|
input.removeAttribute('title');
|
|
42
42
|
} else {
|
|
43
|
-
input.setAttribute('title', ge.t('
|
|
43
|
+
input.setAttribute('title', ge.t('inline_style.invalid'));
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -70,7 +70,7 @@ function pickable(value) {
|
|
|
70
70
|
|
|
71
71
|
/** A picker and a text beside it, which takes what a picker cannot: rgba, var(), transparent. */
|
|
72
72
|
function colorControl(onValue) {
|
|
73
|
-
var box = dom.element('div', { 'class': 'input-group input-group-sm ge-style-color' });
|
|
73
|
+
var box = dom.element('div', { 'class': 'input-group input-group-sm ge-inline-style-color' });
|
|
74
74
|
var picker = box.appendChild(dom.element('input', { type: 'color', 'class': 'form-control form-control-color' }));
|
|
75
75
|
var text = box.appendChild(textInput());
|
|
76
76
|
|
|
@@ -146,10 +146,10 @@ var LENGTH = /^-?(?:\d*\.)?\d+(?:[a-z%]+)?$/i;
|
|
|
146
146
|
|
|
147
147
|
/** The lengths of a shadow, in the order css writes them; a text shadow has no spread. */
|
|
148
148
|
var SHADOW_PARTS = [
|
|
149
|
-
{ name: 'x', labelKey: '
|
|
150
|
-
{ name: 'y', labelKey: '
|
|
151
|
-
{ name: 'blur', labelKey: '
|
|
152
|
-
{ name: 'spread', labelKey: '
|
|
149
|
+
{ name: 'x', labelKey: 'inline_style.shadow_x' },
|
|
150
|
+
{ name: 'y', labelKey: 'inline_style.shadow_y' },
|
|
151
|
+
{ name: 'blur', labelKey: 'inline_style.shadow_blur' },
|
|
152
|
+
{ name: 'spread', labelKey: 'inline_style.shadow_spread' },
|
|
153
153
|
];
|
|
154
154
|
|
|
155
155
|
/**
|
|
@@ -206,7 +206,7 @@ function composeShadow(parts, box) {
|
|
|
206
206
|
*/
|
|
207
207
|
function shadowControl(ge, node, property, changed) {
|
|
208
208
|
var box = property === 'box-shadow';
|
|
209
|
-
var holder = dom.element('div', { 'class': 'ge-style-shadow' });
|
|
209
|
+
var holder = dom.element('div', { 'class': 'ge-inline-style-shadow' });
|
|
210
210
|
var textMode = false;
|
|
211
211
|
|
|
212
212
|
function writeValue(value, input) {
|
|
@@ -218,34 +218,34 @@ function shadowControl(ge, node, property, changed) {
|
|
|
218
218
|
|
|
219
219
|
function builder(parts) {
|
|
220
220
|
holder.innerHTML = '';
|
|
221
|
-
var grid = holder.appendChild(dom.element('div', { 'class': 'ge-style-shadow-builder' }));
|
|
221
|
+
var grid = holder.appendChild(dom.element('div', { 'class': 'ge-inline-style-shadow-builder' }));
|
|
222
222
|
var names = box ? SHADOW_PARTS : SHADOW_PARTS.slice(0, 3);
|
|
223
223
|
var inputs = names.map(function(part, i) {
|
|
224
|
-
var cell = grid.appendChild(dom.element('label', { 'class': 'ge-style-shadow-part' }));
|
|
225
|
-
cell.appendChild(dom.element('span', { 'class': 'ge-style-shadow-label' }, ge.t(part.labelKey)));
|
|
226
|
-
var input = cell.appendChild(textInput('ge-style-shadow-' + part.name));
|
|
224
|
+
var cell = grid.appendChild(dom.element('label', { 'class': 'ge-inline-style-shadow-part' }));
|
|
225
|
+
cell.appendChild(dom.element('span', { 'class': 'ge-inline-style-shadow-label' }, ge.t(part.labelKey)));
|
|
226
|
+
var input = cell.appendChild(textInput('ge-inline-style-shadow-' + part.name));
|
|
227
227
|
input.value = parts.lengths[i] || '';
|
|
228
228
|
return input;
|
|
229
229
|
});
|
|
230
230
|
|
|
231
|
-
var colorCell = grid.appendChild(dom.element('label', { 'class': 'ge-style-shadow-part ge-style-shadow-color' }));
|
|
232
|
-
colorCell.appendChild(dom.element('span', { 'class': 'ge-style-shadow-label' }, ge.t('
|
|
231
|
+
var colorCell = grid.appendChild(dom.element('label', { 'class': 'ge-inline-style-shadow-part ge-inline-style-shadow-color' }));
|
|
232
|
+
colorCell.appendChild(dom.element('span', { 'class': 'ge-inline-style-shadow-label' }, ge.t('inline_style.shadow_color')));
|
|
233
233
|
var color = colorControl(function() { update(); });
|
|
234
234
|
colorCell.appendChild(color.element);
|
|
235
235
|
color.set(parts.color);
|
|
236
236
|
|
|
237
237
|
var inset = null;
|
|
238
238
|
if (box) {
|
|
239
|
-
var insetCell = grid.appendChild(dom.element('label', { 'class': 'form-check ge-style-shadow-inset' }));
|
|
239
|
+
var insetCell = grid.appendChild(dom.element('label', { 'class': 'form-check ge-inline-style-shadow-inset' }));
|
|
240
240
|
inset = insetCell.appendChild(dom.element('input', { type: 'checkbox', 'class': 'form-check-input' }));
|
|
241
|
-
insetCell.appendChild(dom.element('span', { 'class': 'form-check-label' }, ge.t('
|
|
241
|
+
insetCell.appendChild(dom.element('span', { 'class': 'form-check-label' }, ge.t('inline_style.shadow_inset')));
|
|
242
242
|
inset.checked = parts.inset;
|
|
243
243
|
inset.addEventListener('change', function() { update(); });
|
|
244
244
|
}
|
|
245
245
|
|
|
246
246
|
inputs.forEach(function(input) { input.addEventListener('change', function() { update(); }); });
|
|
247
247
|
|
|
248
|
-
var toText = holder.appendChild(dom.element('a', { href: '#', 'class': 'ge-style-shadow-mode' }, ge.t('
|
|
248
|
+
var toText = holder.appendChild(dom.element('a', { href: '#', 'class': 'ge-inline-style-shadow-mode' }, ge.t('inline_style.shadow_text_mode')));
|
|
249
249
|
toText.addEventListener('click', function(e) {
|
|
250
250
|
e.preventDefault();
|
|
251
251
|
textMode = true;
|
|
@@ -264,7 +264,7 @@ function shadowControl(ge, node, property, changed) {
|
|
|
264
264
|
|
|
265
265
|
function text(value) {
|
|
266
266
|
holder.innerHTML = '';
|
|
267
|
-
var input = holder.appendChild(textInput('ge-style-shadow-text'));
|
|
267
|
+
var input = holder.appendChild(textInput('ge-inline-style-shadow-text'));
|
|
268
268
|
input.value = value;
|
|
269
269
|
input.addEventListener('change', function() {
|
|
270
270
|
if (input.value.trim() === '') {
|
|
@@ -288,7 +288,7 @@ function shadowControl(ge, node, property, changed) {
|
|
|
288
288
|
|
|
289
289
|
// Built again only when the value changed under it: building takes
|
|
290
290
|
// the focus from whichever of its inputs the user moved on to
|
|
291
|
-
if (value === shown && holder.firstChild && textMode === !!holder.querySelector('.ge-style-shadow-text')) { return; }
|
|
291
|
+
if (value === shown && holder.firstChild && textMode === !!holder.querySelector('.ge-inline-style-shadow-text')) { return; }
|
|
292
292
|
shown = value;
|
|
293
293
|
|
|
294
294
|
if (textMode || !parts) {
|
|
@@ -308,8 +308,8 @@ function shadowControl(ge, node, property, changed) {
|
|
|
308
308
|
* sections up to date.
|
|
309
309
|
*/
|
|
310
310
|
export function createStyleField(ge, node, property, changed) {
|
|
311
|
-
var field = dom.element('div', { 'class': 'ge-style-field', 'data-ge-style-property': property.name });
|
|
312
|
-
var label = field.appendChild(dom.element('label', { 'class': 'ge-style-label' }, ge.t(property.labelKey)));
|
|
311
|
+
var field = dom.element('div', { 'class': 'ge-inline-style-field', 'data-ge-inline-style-property': property.name });
|
|
312
|
+
var label = field.appendChild(dom.element('label', { 'class': 'ge-inline-style-label' }, ge.t(property.labelKey)));
|
|
313
313
|
var render;
|
|
314
314
|
|
|
315
315
|
function current() {
|
|
@@ -355,19 +355,19 @@ export function createStyleField(ge, node, property, changed) {
|
|
|
355
355
|
|
|
356
356
|
var control = field.querySelector('input, select');
|
|
357
357
|
if (control) {
|
|
358
|
-
control.id = 'ge-style-field-' + (++fieldCounter);
|
|
358
|
+
control.id = 'ge-inline-style-field-' + (++fieldCounter);
|
|
359
359
|
label.setAttribute('for', control.id);
|
|
360
360
|
}
|
|
361
361
|
|
|
362
|
-
field.appendChild(dom.element('small', { 'class': 'ge-style-note ge-style-overridden' }));
|
|
362
|
+
field.appendChild(dom.element('small', { 'class': 'ge-inline-style-note ge-inline-style-overridden' }));
|
|
363
363
|
|
|
364
364
|
renderers.set(field, function() {
|
|
365
365
|
render();
|
|
366
366
|
|
|
367
367
|
// A Bootstrap utility on the node wins over the value: every one is !important
|
|
368
368
|
var winner = current() ? overriding(property.name, classesOf(node)) : null;
|
|
369
|
-
var note = dom.child(field, '.ge-style-overridden');
|
|
370
|
-
note.textContent = winner ? ge.t('
|
|
369
|
+
var note = dom.child(field, '.ge-inline-style-overridden');
|
|
370
|
+
note.textContent = winner ? ge.t('inline_style.overridden', { 'class': winner }) : '';
|
|
371
371
|
dom.toggle(note, !!winner);
|
|
372
372
|
});
|
|
373
373
|
renderStyleField(field);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Flex, a part of the style plugin: a flex container's direction, wrap,
|
|
2
|
+
* Flex, a part of the inline-style plugin: a flex container's direction, wrap,
|
|
3
3
|
* alignment and gaps, and how its children grow, shrink and fill, per
|
|
4
4
|
* breakpoint, with Bootstrap's flex-{breakpoint}-*, justify-content-*,
|
|
5
5
|
* align-items-*, align-content-*, gap-* and row-/column-gap-* classes.
|
|
6
6
|
*
|
|
7
7
|
* Its families, and whatever it does on the canvas, as a function of the
|
|
8
8
|
* handle and the spacing options, whose scale the gaps share:
|
|
9
|
-
* grideditor.style.js puts them in its Flex section.
|
|
9
|
+
* grideditor.inline-style.js puts them in its Flex section.
|
|
10
10
|
*/
|
|
11
11
|
import { GridEditor } from '../grideditor.js';
|
|
12
12
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Float, a part of the style plugin: floating an element per breakpoint, with Bootstrap's
|
|
2
|
+
* Float, a part of the inline-style plugin: floating an element per breakpoint, with Bootstrap's
|
|
3
3
|
* float-{breakpoint}-start, -end and -none classes.
|
|
4
4
|
*
|
|
5
5
|
* Its families, and whatever it does on the canvas, as a function of the
|
|
6
|
-
* handle: grideditor.style.js puts them in its sections.
|
|
6
|
+
* handle: grideditor.inline-style.js puts them in its sections.
|
|
7
7
|
*/
|
|
8
8
|
import { GridEditor } from '../grideditor.js';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The style plugin's settings, `
|
|
2
|
+
* The inline-style plugin's settings, `inline_style` in the editor's options:
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* inline_style: {
|
|
5
5
|
* sections: { border: { properties: [...], catalog: false }, position: false, … },
|
|
6
6
|
* spacing: { values, scale }, // the values offered, and what 0 to 5 come to
|
|
7
7
|
* visibility: { drawer }, // false leaves the eye out of the drawers
|
|
@@ -19,7 +19,7 @@ function resolveSections(ge, given) {
|
|
|
19
19
|
var resolved = {};
|
|
20
20
|
|
|
21
21
|
Object.keys(given || {}).forEach(function(key) {
|
|
22
|
-
if (!section(key)) { ge.warn('
|
|
22
|
+
if (!section(key)) { ge.warn('inline_style.sections: there is no "' + key + '" section: ignored'); }
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
SECTIONS.forEach(function(each) {
|
|
@@ -34,7 +34,7 @@ function resolveSections(ge, given) {
|
|
|
34
34
|
if (Array.isArray(option.properties)) {
|
|
35
35
|
option.properties.forEach(function(name) {
|
|
36
36
|
if (own.indexOf(name) === -1) {
|
|
37
|
-
ge.warn('
|
|
37
|
+
ge.warn('inline_style.sections.' + each.key + ': "' + name + '" is not one of its properties: ignored');
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
40
|
properties = option.properties.filter(function(name) { return own.indexOf(name) !== -1; })
|
|
@@ -50,7 +50,7 @@ function resolveSections(ge, given) {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
export function resolveOptions(ge) {
|
|
53
|
-
var style = ge.settings.
|
|
53
|
+
var style = ge.settings.inline_style || {};
|
|
54
54
|
|
|
55
55
|
return {
|
|
56
56
|
sections: resolveSections(ge, style.sections),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* What the style plugin's sections are made of: for each, its inline
|
|
2
|
+
* What the inline-style plugin's sections are made of: for each, its inline
|
|
3
3
|
* properties and the field each one gets, the Bootstrap 5.3 classes its
|
|
4
4
|
* catalog offers, and which of the merged utility parts it shows.
|
|
5
5
|
*
|
|
@@ -48,14 +48,14 @@ var ONLY_ON_ELEMENT = ['element'];
|
|
|
48
48
|
export var SECTIONS = [
|
|
49
49
|
{
|
|
50
50
|
key: 'size',
|
|
51
|
-
labelKey: '
|
|
51
|
+
labelKey: 'inline_style.section_size',
|
|
52
52
|
properties: [
|
|
53
|
-
prop('width', { labelKey: '
|
|
54
|
-
prop('height', { labelKey: '
|
|
55
|
-
prop('min-width', { labelKey: '
|
|
56
|
-
prop('min-height', { labelKey: '
|
|
57
|
-
prop('max-width', { labelKey: '
|
|
58
|
-
prop('max-height', { labelKey: '
|
|
53
|
+
prop('width', { labelKey: 'inline_style.prop_width', notOn: NOT_ON_COLUMN }),
|
|
54
|
+
prop('height', { labelKey: 'inline_style.prop_height', notOn: NOT_ON_COLUMN }),
|
|
55
|
+
prop('min-width', { labelKey: 'inline_style.prop_min_width' }),
|
|
56
|
+
prop('min-height', { labelKey: 'inline_style.prop_min_height' }),
|
|
57
|
+
prop('max-width', { labelKey: 'inline_style.prop_max_width' }),
|
|
58
|
+
prop('max-height', { labelKey: 'inline_style.prop_max_height' }),
|
|
59
59
|
],
|
|
60
60
|
catalog: [
|
|
61
61
|
group(each('w-', ['25', '50', '75', '100', 'auto']), true, NOT_ON_COLUMN),
|
|
@@ -68,23 +68,23 @@ export var SECTIONS = [
|
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
key: 'spacing',
|
|
71
|
-
labelKey: '
|
|
71
|
+
labelKey: 'inline_style.section_spacing',
|
|
72
72
|
properties: [
|
|
73
|
-
prop('margin-top', { labelKey: '
|
|
74
|
-
prop('padding-top', { labelKey: '
|
|
73
|
+
prop('margin-top', { labelKey: 'inline_style.prop_margin_top' }), prop('margin-right', { labelKey: 'inline_style.prop_margin_right' }), prop('margin-bottom', { labelKey: 'inline_style.prop_margin_bottom' }), prop('margin-left', { labelKey: 'inline_style.prop_margin_left' }),
|
|
74
|
+
prop('padding-top', { labelKey: 'inline_style.prop_padding_top' }), prop('padding-right', { labelKey: 'inline_style.prop_padding_right' }), prop('padding-bottom', { labelKey: 'inline_style.prop_padding_bottom' }), prop('padding-left', { labelKey: 'inline_style.prop_padding_left' }),
|
|
75
75
|
],
|
|
76
76
|
catalog: [],
|
|
77
77
|
parts: ['spacing'],
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
key: 'border',
|
|
81
|
-
labelKey: '
|
|
81
|
+
labelKey: 'inline_style.section_border',
|
|
82
82
|
properties: [
|
|
83
|
-
prop('border-width', { labelKey: '
|
|
84
|
-
prop('border-style', { labelKey: '
|
|
85
|
-
prop('border-color', { labelKey: '
|
|
86
|
-
prop('border-radius', { labelKey: '
|
|
87
|
-
prop('box-shadow', { labelKey: '
|
|
83
|
+
prop('border-width', { labelKey: 'inline_style.prop_border_width' }),
|
|
84
|
+
prop('border-style', { labelKey: 'inline_style.prop_border_style', type: 'select', values: ['none', 'solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset'] }),
|
|
85
|
+
prop('border-color', { labelKey: 'inline_style.prop_border_color', type: 'color' }),
|
|
86
|
+
prop('border-radius', { labelKey: 'inline_style.prop_border_radius' }),
|
|
87
|
+
prop('box-shadow', { labelKey: 'inline_style.prop_box_shadow', type: 'shadow' }),
|
|
88
88
|
],
|
|
89
89
|
catalog: [
|
|
90
90
|
group(['border', 'border-0'].concat(each('border-', SIDES), each('border-', SIDES, '-0')), false),
|
|
@@ -99,13 +99,13 @@ export var SECTIONS = [
|
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
key: 'background',
|
|
102
|
-
labelKey: '
|
|
102
|
+
labelKey: 'inline_style.section_background',
|
|
103
103
|
properties: [
|
|
104
|
-
prop('background-color', { labelKey: '
|
|
105
|
-
prop('background-image', { labelKey: '
|
|
106
|
-
prop('background-size', { labelKey: '
|
|
107
|
-
prop('background-position', { labelKey: '
|
|
108
|
-
prop('background-repeat', { labelKey: '
|
|
104
|
+
prop('background-color', { labelKey: 'inline_style.prop_background_color', type: 'color' }),
|
|
105
|
+
prop('background-image', { labelKey: 'inline_style.prop_background_image', type: 'url' }),
|
|
106
|
+
prop('background-size', { labelKey: 'inline_style.prop_background_size' }),
|
|
107
|
+
prop('background-position', { labelKey: 'inline_style.prop_background_position' }),
|
|
108
|
+
prop('background-repeat', { labelKey: 'inline_style.prop_background_repeat', type: 'select', values: ['repeat', 'no-repeat', 'repeat-x', 'repeat-y', 'space', 'round'] }),
|
|
109
109
|
],
|
|
110
110
|
catalog: [
|
|
111
111
|
group(each('bg-', COLORS.concat(['body', 'body-secondary', 'body-tertiary', 'white', 'black', 'transparent']))
|
|
@@ -117,12 +117,12 @@ export var SECTIONS = [
|
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
119
|
key: 'text',
|
|
120
|
-
labelKey: '
|
|
120
|
+
labelKey: 'inline_style.section_text',
|
|
121
121
|
properties: [
|
|
122
|
-
prop('color', { labelKey: '
|
|
123
|
-
prop('font-size', { labelKey: '
|
|
124
|
-
prop('text-align', { labelKey: '
|
|
125
|
-
prop('text-shadow', { labelKey: '
|
|
122
|
+
prop('color', { labelKey: 'inline_style.prop_color', type: 'color' }),
|
|
123
|
+
prop('font-size', { labelKey: 'inline_style.prop_font_size' }),
|
|
124
|
+
prop('text-align', { labelKey: 'inline_style.prop_text_align', type: 'select', values: ['start', 'center', 'end', 'left', 'right', 'justify'] }),
|
|
125
|
+
prop('text-shadow', { labelKey: 'inline_style.prop_text_shadow', type: 'shadow' }),
|
|
126
126
|
],
|
|
127
127
|
catalog: [
|
|
128
128
|
group(each('text-', COLORS.concat(['body', 'body-secondary', 'body-tertiary', 'white', 'black']))
|
|
@@ -135,15 +135,15 @@ export var SECTIONS = [
|
|
|
135
135
|
},
|
|
136
136
|
{
|
|
137
137
|
key: 'typography',
|
|
138
|
-
labelKey: '
|
|
138
|
+
labelKey: 'inline_style.section_typography',
|
|
139
139
|
properties: [
|
|
140
|
-
prop('font-family', { labelKey: '
|
|
141
|
-
prop('font-weight', { labelKey: '
|
|
142
|
-
prop('font-style', { labelKey: '
|
|
143
|
-
prop('line-height', { labelKey: '
|
|
144
|
-
prop('letter-spacing', { labelKey: '
|
|
145
|
-
prop('text-transform', { labelKey: '
|
|
146
|
-
prop('text-decoration', { labelKey: '
|
|
140
|
+
prop('font-family', { labelKey: 'inline_style.prop_font_family' }),
|
|
141
|
+
prop('font-weight', { labelKey: 'inline_style.prop_font_weight', type: 'select', values: ['100', '200', '300', '400', '500', '600', '700', '800', '900', 'normal', 'bold', 'lighter', 'bolder'] }),
|
|
142
|
+
prop('font-style', { labelKey: 'inline_style.prop_font_style', type: 'select', values: ['normal', 'italic', 'oblique'] }),
|
|
143
|
+
prop('line-height', { labelKey: 'inline_style.prop_line_height' }),
|
|
144
|
+
prop('letter-spacing', { labelKey: 'inline_style.prop_letter_spacing' }),
|
|
145
|
+
prop('text-transform', { labelKey: 'inline_style.prop_text_transform', type: 'select', values: ['none', 'uppercase', 'lowercase', 'capitalize'] }),
|
|
146
|
+
prop('text-decoration', { labelKey: 'inline_style.prop_text_decoration', type: 'select', values: ['none', 'underline', 'line-through', 'overline'] }),
|
|
147
147
|
],
|
|
148
148
|
catalog: [
|
|
149
149
|
group(each('fw-', ['lighter', 'light', 'normal', 'medium', 'semibold', 'bold', 'bolder'])),
|
|
@@ -158,12 +158,12 @@ export var SECTIONS = [
|
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
key: 'display',
|
|
161
|
-
labelKey: '
|
|
161
|
+
labelKey: 'inline_style.section_display',
|
|
162
162
|
properties: [
|
|
163
|
-
prop('display', { labelKey: '
|
|
164
|
-
prop('opacity', { labelKey: '
|
|
165
|
-
prop('overflow', { labelKey: '
|
|
166
|
-
prop('visibility', { labelKey: '
|
|
163
|
+
prop('display', { labelKey: 'inline_style.prop_display', type: 'select', values: ['none', 'block', 'inline', 'inline-block', 'flex', 'inline-flex', 'grid', 'inline-grid'] }),
|
|
164
|
+
prop('opacity', { labelKey: 'inline_style.prop_opacity' }),
|
|
165
|
+
prop('overflow', { labelKey: 'inline_style.prop_overflow', type: 'select', values: ['visible', 'hidden', 'auto', 'scroll', 'clip'] }),
|
|
166
|
+
prop('visibility', { labelKey: 'inline_style.prop_visibility', type: 'select', values: ['visible', 'hidden'] }),
|
|
167
167
|
],
|
|
168
168
|
catalog: [
|
|
169
169
|
group(each('opacity-', ['0', '25', '50', '75', '100'])),
|
|
@@ -174,7 +174,7 @@ export var SECTIONS = [
|
|
|
174
174
|
},
|
|
175
175
|
{
|
|
176
176
|
key: 'flex',
|
|
177
|
-
labelKey: '
|
|
177
|
+
labelKey: 'inline_style.section_flex',
|
|
178
178
|
properties: [],
|
|
179
179
|
catalog: [
|
|
180
180
|
group(['vstack', 'hstack'], true, ['row']),
|
|
@@ -183,14 +183,14 @@ export var SECTIONS = [
|
|
|
183
183
|
},
|
|
184
184
|
{
|
|
185
185
|
key: 'position',
|
|
186
|
-
labelKey: '
|
|
186
|
+
labelKey: 'inline_style.section_position',
|
|
187
187
|
properties: [
|
|
188
|
-
prop('position', { labelKey: '
|
|
189
|
-
prop('top', { labelKey: '
|
|
190
|
-
prop('right', { labelKey: '
|
|
191
|
-
prop('bottom', { labelKey: '
|
|
192
|
-
prop('left', { labelKey: '
|
|
193
|
-
prop('z-index', { labelKey: '
|
|
188
|
+
prop('position', { labelKey: 'inline_style.prop_position', type: 'select', values: ['static', 'relative', 'absolute', 'fixed', 'sticky'] }),
|
|
189
|
+
prop('top', { labelKey: 'inline_style.prop_top', notOn: NOT_ON_COLUMN }),
|
|
190
|
+
prop('right', { labelKey: 'inline_style.prop_right', notOn: NOT_ON_COLUMN }),
|
|
191
|
+
prop('bottom', { labelKey: 'inline_style.prop_bottom', notOn: NOT_ON_COLUMN }),
|
|
192
|
+
prop('left', { labelKey: 'inline_style.prop_left', notOn: NOT_ON_COLUMN }),
|
|
193
|
+
prop('z-index', { labelKey: 'inline_style.prop_z_index' }),
|
|
194
194
|
],
|
|
195
195
|
catalog: [
|
|
196
196
|
group(each('position-', ['static', 'relative', 'absolute', 'fixed', 'sticky'])),
|
|
@@ -206,7 +206,7 @@ export var SECTIONS = [
|
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
key: 'custom',
|
|
209
|
-
labelKey: '
|
|
209
|
+
labelKey: 'inline_style.section_custom',
|
|
210
210
|
properties: [],
|
|
211
211
|
catalog: [],
|
|
212
212
|
parts: [],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Spacing, a part of the style plugin: padding and margin per breakpoint, with Bootstrap's p-{breakpoint}-*,
|
|
2
|
+
* Spacing, a part of the inline-style plugin: padding and margin per breakpoint, with Bootstrap's p-{breakpoint}-*,
|
|
3
3
|
* pt-, px- … and m-{breakpoint}-*, mt-, mx- … classes.
|
|
4
4
|
*
|
|
5
5
|
* Its families, and whatever it does on the canvas, as a function of the
|
|
6
|
-
* handle and its options: grideditor.style.js puts them in its sections.
|
|
6
|
+
* handle and its options: grideditor.inline-style.js puts them in its sections.
|
|
7
7
|
*/
|
|
8
8
|
import { GridEditor } from '../grideditor.js';
|
|
9
9
|
import * as dom from '../dom.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Sticky, a part of the style plugin: sticking a node to the top or the
|
|
2
|
+
* Sticky, a part of the inline-style plugin: sticking a node to the top or the
|
|
3
3
|
* bottom of the page as it scrolls, per breakpoint, with Bootstrap's
|
|
4
4
|
* sticky-{breakpoint}-top and -bottom classes.
|
|
5
5
|
*
|
|
6
6
|
* Its families, and whatever it does on the canvas, as a function of the
|
|
7
|
-
* handle: grideditor.style.js puts them in its sections.
|
|
7
|
+
* handle: grideditor.inline-style.js puts them in its sections.
|
|
8
8
|
*/
|
|
9
9
|
import { GridEditor } from '../grideditor.js';
|
|
10
10
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Text alignment, a part of the style plugin: text alignment per breakpoint, with Bootstrap's text-{breakpoint}-start,
|
|
2
|
+
* Text alignment, a part of the inline-style plugin: text alignment per breakpoint, with Bootstrap's text-{breakpoint}-start,
|
|
3
3
|
* -center and -end classes.
|
|
4
4
|
*
|
|
5
5
|
* Its families, and whatever it does on the canvas, as a function of the
|
|
6
|
-
* handle: grideditor.style.js puts them in its sections.
|
|
6
|
+
* handle: grideditor.inline-style.js puts them in its sections.
|
|
7
7
|
*/
|
|
8
8
|
import { GridEditor } from '../grideditor.js';
|
|
9
9
|
|
|
@@ -56,6 +56,7 @@ GridEditor.locales.es = {
|
|
|
56
56
|
'panel.done': 'Hecho',
|
|
57
57
|
'panel.id': 'Id',
|
|
58
58
|
'panel.classes': 'Clases',
|
|
59
|
+
'panel.section_general': 'Id y clases',
|
|
59
60
|
'panel.editor': 'Editor',
|
|
60
61
|
'panel.kind_row': 'Fila',
|
|
61
62
|
'panel.kind_column': 'Columna',
|
|
@@ -186,74 +187,74 @@ GridEditor.locales.es = {
|
|
|
186
187
|
'utility.float_end': 'Fin',
|
|
187
188
|
'utility.float_none': 'Ninguno',
|
|
188
189
|
'utility.spacing_gutter': 'El relleno lateral de una columna es su espaciado: cambiarlo cambia el espacio entre columnas',
|
|
189
|
-
'
|
|
190
|
-
'
|
|
191
|
-
'
|
|
192
|
-
'
|
|
193
|
-
'
|
|
194
|
-
'
|
|
195
|
-
'
|
|
196
|
-
'
|
|
197
|
-
'
|
|
198
|
-
'
|
|
199
|
-
'
|
|
200
|
-
'
|
|
201
|
-
'
|
|
202
|
-
'
|
|
203
|
-
'
|
|
204
|
-
'
|
|
205
|
-
'
|
|
206
|
-
'
|
|
207
|
-
'
|
|
208
|
-
'
|
|
209
|
-
'
|
|
210
|
-
'
|
|
211
|
-
'
|
|
212
|
-
'
|
|
213
|
-
'
|
|
214
|
-
'
|
|
215
|
-
'
|
|
216
|
-
'
|
|
217
|
-
'
|
|
218
|
-
'
|
|
219
|
-
'
|
|
220
|
-
'
|
|
221
|
-
'
|
|
222
|
-
'
|
|
223
|
-
'
|
|
224
|
-
'
|
|
225
|
-
'
|
|
226
|
-
'
|
|
227
|
-
'
|
|
228
|
-
'
|
|
229
|
-
'
|
|
230
|
-
'
|
|
231
|
-
'
|
|
232
|
-
'
|
|
233
|
-
'
|
|
234
|
-
'
|
|
235
|
-
'
|
|
236
|
-
'
|
|
237
|
-
'
|
|
238
|
-
'
|
|
239
|
-
'
|
|
240
|
-
'
|
|
241
|
-
'
|
|
242
|
-
'
|
|
243
|
-
'
|
|
244
|
-
'
|
|
245
|
-
'
|
|
246
|
-
'
|
|
247
|
-
'
|
|
248
|
-
'
|
|
249
|
-
'
|
|
250
|
-
'
|
|
251
|
-
'
|
|
252
|
-
'
|
|
253
|
-
'
|
|
254
|
-
'
|
|
255
|
-
'
|
|
256
|
-
'
|
|
190
|
+
'inline_style.section_title': 'Estilo',
|
|
191
|
+
'inline_style.dialog_title': 'Estilo: {kind}',
|
|
192
|
+
'inline_style.section_size': 'Tamaño',
|
|
193
|
+
'inline_style.section_spacing': 'Espaciado',
|
|
194
|
+
'inline_style.section_border': 'Borde',
|
|
195
|
+
'inline_style.section_background': 'Fondo',
|
|
196
|
+
'inline_style.section_text': 'Texto',
|
|
197
|
+
'inline_style.section_typography': 'Tipografía',
|
|
198
|
+
'inline_style.section_display': 'Visualización',
|
|
199
|
+
'inline_style.section_flex': 'Flex',
|
|
200
|
+
'inline_style.section_position': 'Posición',
|
|
201
|
+
'inline_style.section_custom': 'CSS libre',
|
|
202
|
+
'inline_style.all_sizes': 'Se aplica a todos los tamaños',
|
|
203
|
+
'inline_style.overridden': 'La clase {class} tiene prioridad sobre este valor',
|
|
204
|
+
'inline_style.invalid': 'Esta propiedad no acepta ese valor',
|
|
205
|
+
'inline_style.catalog': 'Clases de Bootstrap',
|
|
206
|
+
'inline_style.shadow_x': 'X',
|
|
207
|
+
'inline_style.shadow_y': 'Y',
|
|
208
|
+
'inline_style.shadow_blur': 'Desenfoque',
|
|
209
|
+
'inline_style.shadow_spread': 'Extensión',
|
|
210
|
+
'inline_style.shadow_color': 'Color',
|
|
211
|
+
'inline_style.shadow_inset': 'Interior',
|
|
212
|
+
'inline_style.shadow_text_mode': 'Editar como texto',
|
|
213
|
+
'inline_style.prop_width': 'Ancho',
|
|
214
|
+
'inline_style.prop_height': 'Alto',
|
|
215
|
+
'inline_style.prop_min_width': 'Ancho mínimo',
|
|
216
|
+
'inline_style.prop_min_height': 'Alto mínimo',
|
|
217
|
+
'inline_style.prop_max_width': 'Ancho máximo',
|
|
218
|
+
'inline_style.prop_max_height': 'Alto máximo',
|
|
219
|
+
'inline_style.prop_margin_top': 'Margen superior',
|
|
220
|
+
'inline_style.prop_margin_right': 'Margen derecho',
|
|
221
|
+
'inline_style.prop_margin_bottom': 'Margen inferior',
|
|
222
|
+
'inline_style.prop_margin_left': 'Margen izquierdo',
|
|
223
|
+
'inline_style.prop_padding_top': 'Relleno superior',
|
|
224
|
+
'inline_style.prop_padding_right': 'Relleno derecho',
|
|
225
|
+
'inline_style.prop_padding_bottom': 'Relleno inferior',
|
|
226
|
+
'inline_style.prop_padding_left': 'Relleno izquierdo',
|
|
227
|
+
'inline_style.prop_border_width': 'Grosor del borde',
|
|
228
|
+
'inline_style.prop_border_style': 'Estilo del borde',
|
|
229
|
+
'inline_style.prop_border_color': 'Color del borde',
|
|
230
|
+
'inline_style.prop_border_radius': 'Radio del borde',
|
|
231
|
+
'inline_style.prop_box_shadow': 'Sombra',
|
|
232
|
+
'inline_style.prop_background_color': 'Color de fondo',
|
|
233
|
+
'inline_style.prop_background_image': 'Imagen de fondo',
|
|
234
|
+
'inline_style.prop_background_size': 'Tamaño del fondo',
|
|
235
|
+
'inline_style.prop_background_position': 'Posición del fondo',
|
|
236
|
+
'inline_style.prop_background_repeat': 'Repetición del fondo',
|
|
237
|
+
'inline_style.prop_color': 'Color',
|
|
238
|
+
'inline_style.prop_font_size': 'Tamaño de letra',
|
|
239
|
+
'inline_style.prop_text_align': 'Alineación',
|
|
240
|
+
'inline_style.prop_text_shadow': 'Sombra del texto',
|
|
241
|
+
'inline_style.prop_font_family': 'Fuente',
|
|
242
|
+
'inline_style.prop_font_weight': 'Grosor de letra',
|
|
243
|
+
'inline_style.prop_font_style': 'Estilo de letra',
|
|
244
|
+
'inline_style.prop_line_height': 'Interlineado',
|
|
245
|
+
'inline_style.prop_letter_spacing': 'Espaciado entre letras',
|
|
246
|
+
'inline_style.prop_text_transform': 'Mayúsculas',
|
|
247
|
+
'inline_style.prop_text_decoration': 'Decoración',
|
|
248
|
+
'inline_style.prop_display': 'Display',
|
|
249
|
+
'inline_style.prop_opacity': 'Opacidad',
|
|
250
|
+
'inline_style.prop_overflow': 'Desbordamiento',
|
|
251
|
+
'inline_style.prop_visibility': 'Visibilidad',
|
|
252
|
+
'inline_style.prop_position': 'Posición',
|
|
253
|
+
'inline_style.prop_top': 'Arriba',
|
|
254
|
+
'inline_style.prop_right': 'Derecha',
|
|
255
|
+
'inline_style.prop_bottom': 'Abajo',
|
|
256
|
+
'inline_style.prop_left': 'Izquierda',
|
|
257
|
+
'inline_style.prop_z_index': 'Z-index',
|
|
257
258
|
'error.sortable_missing': '¡SortableJS no está disponible! Asegúrate de haber cargado el archivo js de Sortable; sin él no se puede arrastrar.',
|
|
258
259
|
'warning.already_editing': 'Este elemento ya tiene un editor: se devuelve ese, con las opciones con las que se creó.',
|
|
259
260
|
'warning.destroyed': 'Se ha llamado a {method}() en un editor destruido, y no hace nada.',
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* <script src="dist/plugins/grideditor.alignment.min.js"></script>
|
|
11
11
|
*
|
|
12
12
|
* How a row justifies and aligns its columns - justify-content-* and
|
|
13
|
-
* align-items-* - is a flex container's, and the style plugin's Flex section
|
|
13
|
+
* align-items-* - is a flex container's, and the inline-style plugin's Flex section
|
|
14
14
|
* edits it, on a row and on anything else made flex.
|
|
15
15
|
*
|
|
16
16
|
* A field only, in the settings panel: alignment is set now and then, not
|