@themarioga/grid-editor 6.0.0-beta.1 → 6.0.0-beta.3

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.
@@ -157,6 +157,177 @@
157
157
  .ge-tools-drawer .ge-details {
158
158
  cursor: auto;
159
159
  }
160
+ /* An info tool does nothing when clicked, so it is somewhere to hold */
161
+ .ge-tools-drawer > a.ge-text-info,
162
+ .ge-tools-drawer > a.ge-element-info {
163
+ cursor: move;
164
+ }
165
+ /* A text's drawer sits over the text, small, and is mostly tools: a grip
166
+ at its start says where to take hold of it */
167
+ .ge-text-block > .ge-text-drawer {
168
+ padding-left: 14px;
169
+
170
+ &::before {
171
+ content: '';
172
+ position: absolute;
173
+ top: 50%;
174
+ left: 4px;
175
+ width: 6px;
176
+ height: 14px;
177
+ transform: translateY(-50%);
178
+ background-image: radial-gradient(circle, @textTextColor 1px, transparent 1.3px);
179
+ background-size: 3px 3px;
180
+ opacity: 0.7;
181
+ }
182
+ }
183
+ }
184
+
185
+ /* A node's settings, wherever settings_panel shows them: in its drawer, or
186
+ in one of Bootstrap's offcanvas, popover or modal, outside the canvas. The
187
+ fields are Bootstrap's own - form-control-sm, form-select-sm,
188
+ btn-outline-secondary - and this only lays them out. */
189
+ .ge-details {
190
+ font-size: 0.8125rem;
191
+
192
+ .ge-details-general {
193
+ display: flex;
194
+ flex-direction: column;
195
+ gap: 8px;
196
+ }
197
+ .ge-field {
198
+ display: flex;
199
+ flex-direction: column;
200
+ gap: 2px;
201
+ margin: 0;
202
+ }
203
+ .ge-field-label,
204
+ .ge-utility-label {
205
+ color: var(--bs-secondary-color, #6c757d);
206
+ font-size: 0.75rem;
207
+ }
208
+ .ge-presets:empty {
209
+ display: none;
210
+ }
211
+
212
+ /* The utility plugins' fields, folded under one toggle */
213
+ .ge-utilities {
214
+ margin-top: 10px;
215
+
216
+ > .ge-utilities-toggle {
217
+ display: block;
218
+ color: var(--bs-body-color, #333);
219
+ font-weight: 500;
220
+ cursor: pointer;
221
+ text-decoration: none;
222
+
223
+ &::before {
224
+ content: '\25B8';
225
+ display: inline-block;
226
+ width: 1em;
227
+ }
228
+ }
229
+ &.ge-open > .ge-utilities-toggle::before {
230
+ content: '\25BE';
231
+ }
232
+
233
+ > .ge-utilities-body {
234
+ display: none;
235
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
236
+ gap: 8px 10px;
237
+ margin-top: 6px;
238
+ }
239
+ &.ge-open > .ge-utilities-body {
240
+ display: grid;
241
+ }
242
+
243
+ .ge-utility {
244
+ display: flex;
245
+ flex-direction: column;
246
+ gap: 2px;
247
+ margin: 0;
248
+ }
249
+ .ge-utility-note {
250
+ color: var(--bs-secondary-color, #666);
251
+ font-size: 0.6875rem;
252
+ }
253
+
254
+ /* The spacing plugin: a side and a value per group */
255
+ .ge-spacing {
256
+ display: grid;
257
+ grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
258
+ gap: 8px 10px;
259
+ grid-column: 1 / -1;
260
+ }
261
+ .ge-spacing-group {
262
+ display: flex;
263
+ flex-direction: column;
264
+ gap: 2px;
265
+
266
+ /* The group names the field once */
267
+ .ge-utility > .ge-utility-label {
268
+ display: none;
269
+ }
270
+ }
271
+ .ge-spacing-gutter {
272
+ grid-column: 1 / -1;
273
+ color: var(--bs-secondary-color, #666);
274
+ font-size: 0.6875rem;
275
+ }
276
+ }
277
+ }
278
+
279
+ /* In a drawer it is part of the drawer, compact */
280
+ .ge-tools-drawer > .ge-details {
281
+ font-size: 11px;
282
+
283
+ .ge-utilities > .ge-utilities-body {
284
+ grid-template-columns: repeat(auto-fill, minmax(120px, 160px));
285
+ }
286
+ }
287
+
288
+ /* In one of Bootstrap's, outside the canvas */
289
+ .ge-settings-panel {
290
+ .ge-details {
291
+ display: block;
292
+ }
293
+ .ge-settings-title {
294
+ font-size: 1rem;
295
+ font-weight: 500;
296
+ }
297
+ }
298
+
299
+ .ge-settings-offcanvas {
300
+ /* Beside the canvas rather than over most of it */
301
+ --bs-offcanvas-width: 340px;
302
+ --bs-offcanvas-height: 60vh;
303
+ }
304
+
305
+ .ge-settings-popover {
306
+ /* Popper would position it; without Popper that is the editor's job */
307
+ position: absolute;
308
+ --bs-popover-max-width: 360px;
309
+ width: 360px;
310
+ max-width: calc(100vw - 16px);
311
+
312
+ > .popover-header {
313
+ display: flex;
314
+ align-items: center;
315
+ justify-content: space-between;
316
+ gap: 8px;
317
+
318
+ > .btn-close {
319
+ font-size: 0.65rem;
320
+ }
321
+ }
322
+ > .popover-body {
323
+ overflow-y: auto;
324
+ }
325
+ }
326
+
327
+ /* The node whose settings are open */
328
+ .ge-canvas.ge-editing .ge-settings-target {
329
+ outline: 2px solid var(--bs-primary, #0d6efd);
330
+ outline-offset: 1px;
160
331
  }
161
332
 
162
333
  /* While editing */
@@ -195,113 +366,24 @@
195
366
  background: rgba(255, 255, 255, 0.5);
196
367
  cursor: pointer;
197
368
  }
198
- .ge-details {
369
+ /* A node's settings, unfolded in its drawer: settings_panel 'inline' */
370
+ > .ge-details {
371
+ display: none;
199
372
  padding: 5px;
200
373
  border-top: 1px solid rgba(0,0,0,0.05);
201
- display: none;
202
-
203
- .btn-group {
204
- a {
205
- color: #333;
206
-
207
- &.active {
208
- color: white;
209
- }
210
- }
211
- a:hover {
212
- text-decoration: none;
213
- cursor: pointer;
214
- }
374
+ text-align: left;
375
+ cursor: auto;
376
+
377
+ .ge-details-general {
378
+ flex-direction: row;
379
+ align-items: flex-end;
215
380
  }
216
- input.ge-id,
217
- input.ge-classes {
218
- border: 1px solid #7F7F7F;
219
- border-radius: 4px;
220
- font-size: 11px;
221
- padding: 2px 5px;
222
- margin-right: 5px;
223
- width: 80px;
381
+ input.ge-id {
382
+ width: 90px;
224
383
  }
225
384
  input.ge-classes {
226
385
  width: 200px;
227
386
  }
228
-
229
- /* The utility plugins' fields, folded under one toggle */
230
- .ge-utilities {
231
- margin-top: 5px;
232
- font-size: 11px;
233
-
234
- > .ge-utilities-toggle {
235
- color: #333;
236
- cursor: pointer;
237
- text-decoration: none;
238
-
239
- &::before {
240
- content: '\25B8';
241
- display: inline-block;
242
- width: 1em;
243
- }
244
- }
245
- &.ge-open > .ge-utilities-toggle::before {
246
- content: '\25BE';
247
- }
248
-
249
- > .ge-utilities-body {
250
- display: none;
251
- flex-wrap: wrap;
252
- gap: 4px 10px;
253
- margin-top: 4px;
254
- }
255
- &.ge-open > .ge-utilities-body {
256
- display: flex;
257
- }
258
-
259
- .ge-utility {
260
- display: inline-flex;
261
- flex-direction: column;
262
- margin: 0;
263
-
264
- select {
265
- border: 1px solid #7F7F7F;
266
- border-radius: 4px;
267
- font-size: 11px;
268
- padding: 1px 2px;
269
- }
270
- }
271
- .ge-utility-note {
272
- color: #666;
273
- font-size: 10px;
274
- max-width: 160px;
275
- }
276
-
277
- /* The spacing plugin: a side and a value per group */
278
- .ge-spacing {
279
- display: flex;
280
- flex-wrap: wrap;
281
- gap: 4px 10px;
282
- }
283
- .ge-spacing-group {
284
- display: inline-flex;
285
- flex-direction: column;
286
-
287
- > .ge-spacing-side {
288
- border: 1px solid #7F7F7F;
289
- border-radius: 4px;
290
- font-size: 11px;
291
- padding: 1px 2px;
292
- margin-bottom: 2px;
293
- }
294
- /* The group names the field once */
295
- .ge-utility > .ge-utility-label {
296
- display: none;
297
- }
298
- }
299
- .ge-spacing-gutter {
300
- flex-basis: 100%;
301
- color: #666;
302
- font-size: 10px;
303
- }
304
- }
305
387
  }
306
388
  }
307
389
  .row {
@@ -978,19 +1060,11 @@
978
1060
  }
979
1061
 
980
1062
  /* The width field, in the section's settings panel beside id and classes */
981
- .ge-canvas.ge-editing .ge-details .ge-section-width {
982
- display: inline-flex;
983
- align-items: center;
984
- gap: 4px;
1063
+ .ge-details .ge-section-width {
1064
+ display: flex;
1065
+ flex-direction: column;
1066
+ gap: 2px;
985
1067
  margin: 0;
986
- font-size: 11px;
987
-
988
- select {
989
- border: 1px solid #7F7F7F;
990
- border-radius: 4px;
991
- font-size: 11px;
992
- padding: 1px 2px;
993
- }
994
1068
  }
995
1069
 
996
1070
  @ge-section-classes: container, container-sm, container-md, container-lg, container-xl, container-xxl;