@goodfellow-cms/admin 0.5.0 → 0.7.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/styles.css CHANGED
@@ -196,11 +196,6 @@ body,
196
196
  overflow: auto;
197
197
  }
198
198
 
199
- .gfa-settings-content > .gfa-screen {
200
- margin: 0;
201
- padding: 24px;
202
- }
203
-
204
199
  .gfa-sidebar {
205
200
  display: flex;
206
201
  flex-direction: column;
@@ -236,6 +231,23 @@ body,
236
231
  border-top: 1px solid var(--gfa-border);
237
232
  }
238
233
 
234
+ /*
235
+ * A plugin's screen, drawn by the plugin in a frame of its own, which looks
236
+ * like any other screen: as wide as the screen, with no border, and as tall
237
+ * as what the plugin draws, which its frame reports.
238
+ */
239
+ .gfa-plugin-screen {
240
+ display: block;
241
+ width: 100%;
242
+ min-height: 240px;
243
+ border: 0;
244
+ background: var(--gfa-bg);
245
+ }
246
+
247
+ .gfa-plugin-screen-wrap > .gfa-error {
248
+ margin: 24px;
249
+ }
250
+
239
251
  .gfa-sidebar-item {
240
252
  position: relative;
241
253
  display: flex;
@@ -282,7 +294,7 @@ body,
282
294
  text-overflow: ellipsis;
283
295
  }
284
296
 
285
- .gfa-sidebar-toggle {
297
+ .gfa-sidebar-footer {
286
298
  margin-top: auto;
287
299
  }
288
300
 
@@ -337,6 +349,12 @@ body,
337
349
  padding: 24px 16px;
338
350
  }
339
351
 
352
+ /* Site Settings' tabs sit beside the sidebar, left-aligned. */
353
+ .gfa-settings-content > .gfa-screen {
354
+ margin: 0;
355
+ padding: 24px;
356
+ }
357
+
340
358
  .gfa-screen-header {
341
359
  display: flex;
342
360
  align-items: center;
@@ -995,6 +1013,39 @@ body,
995
1013
  min-height: 0;
996
1014
  }
997
1015
 
1016
+ /* The search box at the top of Puck's block list, and what it finds. */
1017
+ .gfa-block-search-box {
1018
+ padding: 12px 16px 4px;
1019
+ }
1020
+
1021
+ .gfa-block-search-input {
1022
+ box-sizing: border-box;
1023
+ width: 100%;
1024
+ padding: 6px 10px;
1025
+ border: 1px solid var(--gfa-input-border);
1026
+ border-radius: 6px;
1027
+ background: var(--gfa-surface);
1028
+ color: var(--gfa-text);
1029
+ font: inherit;
1030
+ font-size: 14px;
1031
+ }
1032
+
1033
+ .gfa-block-search-input:focus-visible {
1034
+ outline: 2px solid var(--gfa-accent);
1035
+ outline-offset: 1px;
1036
+ }
1037
+
1038
+ .gfa-block-search-results {
1039
+ padding: 8px 16px 16px;
1040
+ }
1041
+
1042
+ .gfa-block-search-none {
1043
+ margin: 0;
1044
+ padding: 12px 16px;
1045
+ color: var(--gfa-muted);
1046
+ font-size: 14px;
1047
+ }
1048
+
998
1049
  /* The editor's header, outside the frame that runs the site's code. */
999
1050
  .gfa-editor-header {
1000
1051
  display: flex;
@@ -1028,6 +1079,17 @@ body,
1028
1079
  gap: 4px;
1029
1080
  }
1030
1081
 
1082
+ /* Tools an editor plugin doesn't have, such as Puck's sidebars and preview widths. */
1083
+ .gfa-editor-tools[hidden] {
1084
+ display: none;
1085
+ }
1086
+
1087
+ /* Which editor to edit with, where the site has editor plugins. */
1088
+ .gfa-editor-choice {
1089
+ font-size: 13px;
1090
+ color: var(--gfa-muted);
1091
+ }
1092
+
1031
1093
  .gfa-editor-tools .gfa-button[aria-pressed="true"],
1032
1094
  .gfa-header-actions .gfa-button[aria-pressed="true"] {
1033
1095
  background: var(--gfa-current-bg);
@@ -1068,6 +1130,47 @@ body,
1068
1130
  background: var(--gfa-bg);
1069
1131
  }
1070
1132
 
1133
+ /* An editor plugin's frame, with what shows over it until the editor has opened. */
1134
+ .gfa-plugin-editor-wrap {
1135
+ position: relative;
1136
+ flex: 1;
1137
+ min-width: 0;
1138
+ display: flex;
1139
+ }
1140
+
1141
+ .gfa-editor-loading {
1142
+ position: absolute;
1143
+ inset: 0;
1144
+ display: flex;
1145
+ flex-direction: column;
1146
+ align-items: center;
1147
+ justify-content: center;
1148
+ gap: 12px;
1149
+ background: var(--gfa-bg);
1150
+ color: var(--gfa-muted);
1151
+ }
1152
+
1153
+ .gfa-spinner {
1154
+ width: 28px;
1155
+ height: 28px;
1156
+ border: 3px solid var(--gfa-border);
1157
+ border-top-color: var(--gfa-accent);
1158
+ border-radius: 50%;
1159
+ animation: gfa-spin 0.8s linear infinite;
1160
+ }
1161
+
1162
+ @keyframes gfa-spin {
1163
+ to {
1164
+ transform: rotate(360deg);
1165
+ }
1166
+ }
1167
+
1168
+ @media (prefers-reduced-motion: reduce) {
1169
+ .gfa-spinner {
1170
+ animation-duration: 2.4s;
1171
+ }
1172
+ }
1173
+
1071
1174
  /* The frames that run the site's code: the editor fills its page, and its canvas can be a phone's width. */
1072
1175
  :root.gfa-frame,
1073
1176
  .gfa-frame body {
@@ -1341,6 +1444,186 @@ body,
1341
1444
  }
1342
1445
 
1343
1446
  .gfa-media-actions .gfa-button,
1447
+ /* A table's cells, in the editor's fields. */
1448
+ .gfa-table-field {
1449
+ padding: 0 16px 16px;
1450
+ font:
1451
+ 14px / 1.5 ui-sans-serif,
1452
+ system-ui,
1453
+ sans-serif;
1454
+ }
1455
+
1456
+ .gfa-table-field-label {
1457
+ margin-bottom: 8px;
1458
+ font-weight: 600;
1459
+ }
1460
+
1461
+ .gfa-table-field-grid {
1462
+ display: grid;
1463
+ gap: 4px;
1464
+ overflow-x: auto;
1465
+ }
1466
+
1467
+ .gfa-table-field-row {
1468
+ display: contents;
1469
+ }
1470
+
1471
+ .gfa-table-field-cell {
1472
+ min-width: 0;
1473
+ }
1474
+
1475
+ .gfa-table-field-remove {
1476
+ border: 1px solid var(--gfa-border);
1477
+ border-radius: var(--gfa-radius);
1478
+ background: transparent;
1479
+ color: var(--gfa-muted);
1480
+ cursor: pointer;
1481
+ }
1482
+
1483
+ .gfa-table-field-remove:disabled {
1484
+ cursor: default;
1485
+ opacity: 0.4;
1486
+ }
1487
+
1488
+ .gfa-table-field-actions {
1489
+ display: flex;
1490
+ flex-wrap: wrap;
1491
+ gap: 8px;
1492
+ margin-top: 8px;
1493
+ }
1494
+
1495
+ /* A block's Style field in the editor (frame/style-field.tsx). */
1496
+ .gfa-style-field {
1497
+ display: grid;
1498
+ gap: 14px;
1499
+ padding: 0 16px 16px;
1500
+ font:
1501
+ 14px / 1.5 ui-sans-serif,
1502
+ system-ui,
1503
+ sans-serif;
1504
+ }
1505
+
1506
+ .gfa-style-title {
1507
+ font-weight: 600;
1508
+ }
1509
+
1510
+ .gfa-style-group {
1511
+ display: grid;
1512
+ gap: 6px;
1513
+ min-width: 0;
1514
+ margin: 0;
1515
+ padding: 0;
1516
+ border: 0;
1517
+ }
1518
+
1519
+ .gfa-style-choice {
1520
+ display: grid;
1521
+ gap: 4px;
1522
+ }
1523
+
1524
+ .gfa-style-label {
1525
+ padding: 0;
1526
+ color: var(--gfa-text);
1527
+ font-size: 13px;
1528
+ font-weight: 600;
1529
+ }
1530
+
1531
+ .gfa-style-segments {
1532
+ display: flex;
1533
+ flex-wrap: wrap;
1534
+ gap: 4px;
1535
+ }
1536
+
1537
+ .gfa-style-segment {
1538
+ padding: 4px 8px;
1539
+ border: 1px solid var(--gfa-input-border);
1540
+ border-radius: var(--gfa-radius);
1541
+ background: var(--gfa-surface);
1542
+ color: var(--gfa-text);
1543
+ font: inherit;
1544
+ font-size: 13px;
1545
+ cursor: pointer;
1546
+ }
1547
+
1548
+ .gfa-style-segment[aria-pressed="true"] {
1549
+ border-color: var(--gfa-accent);
1550
+ background: var(--gfa-accent);
1551
+ color: var(--gfa-accent-text);
1552
+ }
1553
+
1554
+ .gfa-style-swatches {
1555
+ display: flex;
1556
+ flex-wrap: wrap;
1557
+ gap: 6px;
1558
+ }
1559
+
1560
+ .gfa-style-swatch {
1561
+ position: relative;
1562
+ width: 26px;
1563
+ height: 26px;
1564
+ padding: 0;
1565
+ overflow: hidden;
1566
+ border: 1px solid var(--gfa-input-border);
1567
+ border-radius: 50%;
1568
+ cursor: pointer;
1569
+ }
1570
+
1571
+ .gfa-style-swatch[aria-pressed="true"] {
1572
+ outline: 2px solid var(--gfa-accent);
1573
+ outline-offset: 2px;
1574
+ }
1575
+
1576
+ /* "As the block has it": a struck-through swatch. */
1577
+ .gfa-style-swatch-none {
1578
+ background: linear-gradient(
1579
+ 135deg,
1580
+ var(--gfa-surface) 45%,
1581
+ var(--gfa-muted) 45%,
1582
+ var(--gfa-muted) 55%,
1583
+ var(--gfa-surface) 55%
1584
+ );
1585
+ }
1586
+
1587
+ /* A color of the editor's own: the browser's color picker, filling the swatch. */
1588
+ .gfa-style-swatch-own {
1589
+ background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
1590
+ }
1591
+
1592
+ .gfa-style-swatch-own input {
1593
+ position: absolute;
1594
+ inset: 0;
1595
+ width: 100%;
1596
+ height: 100%;
1597
+ opacity: 0;
1598
+ cursor: pointer;
1599
+ }
1600
+
1601
+ .gfa-style-swatch:disabled,
1602
+ .gfa-style-segment:disabled {
1603
+ cursor: default;
1604
+ opacity: 0.5;
1605
+ }
1606
+
1607
+ .gfa-style-sides {
1608
+ display: grid;
1609
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1610
+ gap: 8px;
1611
+ }
1612
+
1613
+ .gfa-style-check {
1614
+ display: flex;
1615
+ align-items: center;
1616
+ gap: 6px;
1617
+ font-size: 13px;
1618
+ }
1619
+
1620
+ .gfa-style-warning {
1621
+ padding: 6px 8px;
1622
+ border-radius: var(--gfa-radius);
1623
+ background: var(--gfa-warning-bg);
1624
+ color: var(--gfa-warning-text);
1625
+ }
1626
+
1344
1627
  .gfa-media-chooser .gfa-button {
1345
1628
  min-height: 30px;
1346
1629
  padding: 0 10px;
@@ -1697,6 +1980,65 @@ body,
1697
1980
  overflow: hidden;
1698
1981
  }
1699
1982
 
1983
+ .gfa-theme-search {
1984
+ display: flex;
1985
+ align-items: flex-end;
1986
+ gap: 8px;
1987
+ }
1988
+
1989
+ .gfa-theme-search > :first-child {
1990
+ flex: 1;
1991
+ }
1992
+
1993
+ .gfa-theme-installed {
1994
+ flex-wrap: wrap;
1995
+ }
1996
+
1997
+ .gfa-theme-details {
1998
+ display: grid;
1999
+ gap: 12px;
2000
+ margin: 16px 0;
2001
+ padding: 16px;
2002
+ border: 1px solid var(--gfa-border);
2003
+ border-radius: var(--gfa-radius);
2004
+ background: var(--gfa-surface);
2005
+ }
2006
+
2007
+ .gfa-theme-details .gfa-screen-header {
2008
+ margin-bottom: 0;
2009
+ }
2010
+
2011
+ .gfa-theme-image {
2012
+ max-width: 100%;
2013
+ border: 1px solid var(--gfa-border);
2014
+ border-radius: var(--gfa-radius);
2015
+ }
2016
+
2017
+ .gfa-theme-swatches {
2018
+ display: flex;
2019
+ flex-wrap: wrap;
2020
+ gap: 6px;
2021
+ margin: 0;
2022
+ padding: 0;
2023
+ list-style: none;
2024
+ }
2025
+
2026
+ .gfa-theme-swatch {
2027
+ display: block;
2028
+ width: 28px;
2029
+ height: 28px;
2030
+ border: 1px solid var(--gfa-border);
2031
+ border-radius: 50%;
2032
+ }
2033
+
2034
+ .gfa-theme-preview {
2035
+ position: relative;
2036
+ height: 60vh;
2037
+ border: 1px solid var(--gfa-border);
2038
+ border-radius: var(--gfa-radius);
2039
+ overflow: hidden;
2040
+ }
2041
+
1700
2042
  .gfa-site-changes {
1701
2043
  display: grid;
1702
2044
  gap: 8px;
@@ -1987,3 +2329,40 @@ body,
1987
2329
  padding: 0;
1988
2330
  border: 0;
1989
2331
  }
2332
+
2333
+ /* Blocks' icons in the block list, in place of Puck's drag handle, which every block shares. */
2334
+ .gfa-drawer-item {
2335
+ position: relative;
2336
+ }
2337
+
2338
+ .gfa-drawer-item .gfa-block-icon {
2339
+ position: absolute;
2340
+ top: 50%;
2341
+ left: 10px;
2342
+ transform: translateY(-50%);
2343
+ flex-shrink: 0;
2344
+ color: var(--gfa-muted);
2345
+ pointer-events: none;
2346
+ }
2347
+
2348
+ .gfa-drawer-item [class*="_DrawerItem-draggable_"] {
2349
+ justify-content: flex-start;
2350
+ padding-left: 34px;
2351
+ }
2352
+
2353
+ .gfa-drawer-item [class*="_DrawerItem-draggable_"] > :last-child:not([class*="_DrawerItem-name_"]) {
2354
+ display: none;
2355
+ }
2356
+
2357
+ .gfa-fieldset {
2358
+ display: grid;
2359
+ gap: 6px;
2360
+ margin: 0 0 16px;
2361
+ padding: 0;
2362
+ border: 0;
2363
+ }
2364
+
2365
+ .gfa-fieldset legend {
2366
+ margin-bottom: 6px;
2367
+ font-weight: 600;
2368
+ }