@cahyo-dimas/freeday 3.21.0 → 3.23.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 +108 -0
- package/COMPONENTS.md +98 -3
- package/README.id.md +2 -2
- package/README.md +2 -2
- package/USAGE.md +47 -11
- package/adapters/react/useFreeday.js +31 -0
- package/adapters/vue/useFreeday.js +32 -1
- package/dist/freeday-tabs.js +76 -0
- package/dist/freeday.bundle.css +471 -1
- package/dist/freeday.css +133 -1
- package/dist/freeday.js +76 -0
- package/dist/freeday.tokens.css +338 -0
- package/docs/agent-onboarding.md +4 -4
- package/docs/getting-started.md +2 -2
- package/docs/reference-screen.html +1 -1
- package/package.json +2 -2
- package/src/components/actionbar.css +68 -0
- package/src/components/bottomnav.css +11 -1
- package/src/components/link.css +14 -0
- package/src/components/tabs.css +38 -0
- package/tokens/tokens.json +30 -19
package/dist/freeday.tokens.css
CHANGED
|
@@ -401,6 +401,7 @@
|
|
|
401
401
|
--primary-400-rgb: 92,139,246;
|
|
402
402
|
--primary-500-rgb: 52,103,236;
|
|
403
403
|
--primary-600-rgb: 32,80,216;
|
|
404
|
+
--primary-700-rgb: 28,64,176;
|
|
404
405
|
--red-400-rgb: 248,113,113;
|
|
405
406
|
--red-600-rgb: 220,38,38;
|
|
406
407
|
}
|
|
@@ -717,6 +718,11 @@
|
|
|
717
718
|
--space-6: 1.25rem;
|
|
718
719
|
--control-h: 2rem;
|
|
719
720
|
}
|
|
721
|
+
/* Touch: the control height a thumb or a gloved finger hits reliably (44px), for an app used
|
|
722
|
+
* standing up or on the move. Spacing stays comfortable; a bigger target is not a looser layout. */
|
|
723
|
+
[data-density="touch"] {
|
|
724
|
+
--control-h: 2.75rem;
|
|
725
|
+
}
|
|
720
726
|
/* ...and the way back out. Inheritance only runs downhill: once the root is compact every subtree is
|
|
721
727
|
* compact, and before this rule existed a data-density="comfortable" wrapper matched nothing, so the
|
|
722
728
|
* comment above was true in one direction only. An app that is dense overall and carries one region
|
|
@@ -1033,6 +1039,7 @@
|
|
|
1033
1039
|
--primary-400-rgb: 92,139,246;
|
|
1034
1040
|
--primary-500-rgb: 52,103,236;
|
|
1035
1041
|
--primary-600-rgb: 32,80,216;
|
|
1042
|
+
--primary-700-rgb: 28,64,176;
|
|
1036
1043
|
--color-on-primary: var(--neutral-0);
|
|
1037
1044
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1038
1045
|
}
|
|
@@ -1048,6 +1055,7 @@
|
|
|
1048
1055
|
--primary-400-rgb: 71,161,230;
|
|
1049
1056
|
--primary-500-rgb: 26,134,220;
|
|
1050
1057
|
--primary-600-rgb: 0,120,212;
|
|
1058
|
+
--primary-700-rgb: 0,97,172;
|
|
1051
1059
|
--color-on-primary: var(--neutral-0);
|
|
1052
1060
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1053
1061
|
}
|
|
@@ -1077,6 +1085,7 @@
|
|
|
1077
1085
|
--primary-400-rgb: 96,165,250;
|
|
1078
1086
|
--primary-500-rgb: 59,130,246;
|
|
1079
1087
|
--primary-600-rgb: 37,99,235;
|
|
1088
|
+
--primary-700-rgb: 29,78,216;
|
|
1080
1089
|
--color-on-primary: var(--neutral-0);
|
|
1081
1090
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1082
1091
|
}
|
|
@@ -1106,6 +1115,7 @@
|
|
|
1106
1115
|
--primary-400-rgb: 129,140,248;
|
|
1107
1116
|
--primary-500-rgb: 99,102,241;
|
|
1108
1117
|
--primary-600-rgb: 79,70,229;
|
|
1118
|
+
--primary-700-rgb: 67,56,202;
|
|
1109
1119
|
--color-on-primary: var(--neutral-0);
|
|
1110
1120
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1111
1121
|
}
|
|
@@ -1150,6 +1160,7 @@
|
|
|
1150
1160
|
--primary-400-rgb: 167,139,250;
|
|
1151
1161
|
--primary-500-rgb: 139,92,246;
|
|
1152
1162
|
--primary-600-rgb: 124,58,237;
|
|
1163
|
+
--primary-700-rgb: 109,40,217;
|
|
1153
1164
|
--color-on-primary: var(--neutral-0);
|
|
1154
1165
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1155
1166
|
}
|
|
@@ -1194,6 +1205,7 @@
|
|
|
1194
1205
|
--primary-400-rgb: 192,132,252;
|
|
1195
1206
|
--primary-500-rgb: 168,85,247;
|
|
1196
1207
|
--primary-600-rgb: 147,51,234;
|
|
1208
|
+
--primary-700-rgb: 126,34,206;
|
|
1197
1209
|
--color-on-primary: var(--neutral-0);
|
|
1198
1210
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1199
1211
|
}
|
|
@@ -1223,6 +1235,7 @@
|
|
|
1223
1235
|
--primary-400-rgb: 232,121,249;
|
|
1224
1236
|
--primary-500-rgb: 217,70,239;
|
|
1225
1237
|
--primary-600-rgb: 192,38,211;
|
|
1238
|
+
--primary-700-rgb: 162,28,175;
|
|
1226
1239
|
--color-on-primary: var(--neutral-0);
|
|
1227
1240
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1228
1241
|
}
|
|
@@ -1252,6 +1265,7 @@
|
|
|
1252
1265
|
--primary-400-rgb: 244,114,182;
|
|
1253
1266
|
--primary-500-rgb: 236,72,153;
|
|
1254
1267
|
--primary-600-rgb: 219,39,119;
|
|
1268
|
+
--primary-700-rgb: 190,24,93;
|
|
1255
1269
|
--color-on-primary: var(--neutral-0);
|
|
1256
1270
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1257
1271
|
}
|
|
@@ -1281,6 +1295,7 @@
|
|
|
1281
1295
|
--primary-400-rgb: 251,113,133;
|
|
1282
1296
|
--primary-500-rgb: 244,63,94;
|
|
1283
1297
|
--primary-600-rgb: 225,29,72;
|
|
1298
|
+
--primary-700-rgb: 190,18,60;
|
|
1284
1299
|
--color-on-primary: var(--neutral-0);
|
|
1285
1300
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1286
1301
|
}
|
|
@@ -1310,6 +1325,21 @@
|
|
|
1310
1325
|
--primary-400-rgb: 251,146,60;
|
|
1311
1326
|
--primary-500-rgb: 249,115,22;
|
|
1312
1327
|
--primary-600-rgb: 234,88,12;
|
|
1328
|
+
--primary-700-rgb: 194,65,12;
|
|
1329
|
+
--color-on-primary: var(--neutral-950);
|
|
1330
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1331
|
+
}
|
|
1332
|
+
@media (prefers-color-scheme: dark) {
|
|
1333
|
+
:root:not([data-theme="light"])[data-primary="orange"] {
|
|
1334
|
+
--color-on-primary: var(--neutral-950);
|
|
1335
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
[data-theme="dark"][data-primary="orange"] {
|
|
1339
|
+
--color-on-primary: var(--neutral-950);
|
|
1340
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1341
|
+
}
|
|
1342
|
+
[data-theme="light"][data-primary="orange"] {
|
|
1313
1343
|
--color-on-primary: var(--neutral-950);
|
|
1314
1344
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1315
1345
|
}
|
|
@@ -1325,6 +1355,21 @@
|
|
|
1325
1355
|
--primary-400-rgb: 251,191,36;
|
|
1326
1356
|
--primary-500-rgb: 245,158,11;
|
|
1327
1357
|
--primary-600-rgb: 217,119,6;
|
|
1358
|
+
--primary-700-rgb: 180,83,9;
|
|
1359
|
+
--color-on-primary: var(--neutral-950);
|
|
1360
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1361
|
+
}
|
|
1362
|
+
@media (prefers-color-scheme: dark) {
|
|
1363
|
+
:root:not([data-theme="light"])[data-primary="amber"] {
|
|
1364
|
+
--color-on-primary: var(--neutral-950);
|
|
1365
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
[data-theme="dark"][data-primary="amber"] {
|
|
1369
|
+
--color-on-primary: var(--neutral-950);
|
|
1370
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1371
|
+
}
|
|
1372
|
+
[data-theme="light"][data-primary="amber"] {
|
|
1328
1373
|
--color-on-primary: var(--neutral-950);
|
|
1329
1374
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1330
1375
|
}
|
|
@@ -1340,6 +1385,7 @@
|
|
|
1340
1385
|
--primary-400-rgb: 250,204,21;
|
|
1341
1386
|
--primary-500-rgb: 234,179,8;
|
|
1342
1387
|
--primary-600-rgb: 161,98,7;
|
|
1388
|
+
--primary-700-rgb: 133,77,14;
|
|
1343
1389
|
--color-on-primary: var(--neutral-0);
|
|
1344
1390
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1345
1391
|
}
|
|
@@ -1369,6 +1415,21 @@
|
|
|
1369
1415
|
--primary-400-rgb: 163,230,53;
|
|
1370
1416
|
--primary-500-rgb: 132,204,22;
|
|
1371
1417
|
--primary-600-rgb: 101,163,13;
|
|
1418
|
+
--primary-700-rgb: 77,124,15;
|
|
1419
|
+
--color-on-primary: var(--neutral-950);
|
|
1420
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1421
|
+
}
|
|
1422
|
+
@media (prefers-color-scheme: dark) {
|
|
1423
|
+
:root:not([data-theme="light"])[data-primary="lime"] {
|
|
1424
|
+
--color-on-primary: var(--neutral-950);
|
|
1425
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
[data-theme="dark"][data-primary="lime"] {
|
|
1429
|
+
--color-on-primary: var(--neutral-950);
|
|
1430
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1431
|
+
}
|
|
1432
|
+
[data-theme="light"][data-primary="lime"] {
|
|
1372
1433
|
--color-on-primary: var(--neutral-950);
|
|
1373
1434
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1374
1435
|
}
|
|
@@ -1384,6 +1445,21 @@
|
|
|
1384
1445
|
--primary-400-rgb: 74,222,128;
|
|
1385
1446
|
--primary-500-rgb: 34,197,94;
|
|
1386
1447
|
--primary-600-rgb: 22,163,74;
|
|
1448
|
+
--primary-700-rgb: 21,128,61;
|
|
1449
|
+
--color-on-primary: var(--neutral-950);
|
|
1450
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1451
|
+
}
|
|
1452
|
+
@media (prefers-color-scheme: dark) {
|
|
1453
|
+
:root:not([data-theme="light"])[data-primary="green"] {
|
|
1454
|
+
--color-on-primary: var(--neutral-950);
|
|
1455
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
[data-theme="dark"][data-primary="green"] {
|
|
1459
|
+
--color-on-primary: var(--neutral-950);
|
|
1460
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1461
|
+
}
|
|
1462
|
+
[data-theme="light"][data-primary="green"] {
|
|
1387
1463
|
--color-on-primary: var(--neutral-950);
|
|
1388
1464
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1389
1465
|
}
|
|
@@ -1399,6 +1475,21 @@
|
|
|
1399
1475
|
--primary-400-rgb: 52,211,153;
|
|
1400
1476
|
--primary-500-rgb: 16,185,129;
|
|
1401
1477
|
--primary-600-rgb: 5,150,105;
|
|
1478
|
+
--primary-700-rgb: 4,120,87;
|
|
1479
|
+
--color-on-primary: var(--neutral-950);
|
|
1480
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1481
|
+
}
|
|
1482
|
+
@media (prefers-color-scheme: dark) {
|
|
1483
|
+
:root:not([data-theme="light"])[data-primary="emerald"] {
|
|
1484
|
+
--color-on-primary: var(--neutral-950);
|
|
1485
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
[data-theme="dark"][data-primary="emerald"] {
|
|
1489
|
+
--color-on-primary: var(--neutral-950);
|
|
1490
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1491
|
+
}
|
|
1492
|
+
[data-theme="light"][data-primary="emerald"] {
|
|
1402
1493
|
--color-on-primary: var(--neutral-950);
|
|
1403
1494
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1404
1495
|
}
|
|
@@ -1414,6 +1505,21 @@
|
|
|
1414
1505
|
--primary-400-rgb: 45,212,191;
|
|
1415
1506
|
--primary-500-rgb: 20,184,166;
|
|
1416
1507
|
--primary-600-rgb: 13,148,136;
|
|
1508
|
+
--primary-700-rgb: 15,118,110;
|
|
1509
|
+
--color-on-primary: var(--neutral-950);
|
|
1510
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1511
|
+
}
|
|
1512
|
+
@media (prefers-color-scheme: dark) {
|
|
1513
|
+
:root:not([data-theme="light"])[data-primary="teal"] {
|
|
1514
|
+
--color-on-primary: var(--neutral-950);
|
|
1515
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
[data-theme="dark"][data-primary="teal"] {
|
|
1519
|
+
--color-on-primary: var(--neutral-950);
|
|
1520
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1521
|
+
}
|
|
1522
|
+
[data-theme="light"][data-primary="teal"] {
|
|
1417
1523
|
--color-on-primary: var(--neutral-950);
|
|
1418
1524
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1419
1525
|
}
|
|
@@ -1429,6 +1535,21 @@
|
|
|
1429
1535
|
--primary-400-rgb: 34,211,238;
|
|
1430
1536
|
--primary-500-rgb: 6,182,212;
|
|
1431
1537
|
--primary-600-rgb: 8,145,178;
|
|
1538
|
+
--primary-700-rgb: 14,116,144;
|
|
1539
|
+
--color-on-primary: var(--neutral-950);
|
|
1540
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1541
|
+
}
|
|
1542
|
+
@media (prefers-color-scheme: dark) {
|
|
1543
|
+
:root:not([data-theme="light"])[data-primary="cyan"] {
|
|
1544
|
+
--color-on-primary: var(--neutral-950);
|
|
1545
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
[data-theme="dark"][data-primary="cyan"] {
|
|
1549
|
+
--color-on-primary: var(--neutral-950);
|
|
1550
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1551
|
+
}
|
|
1552
|
+
[data-theme="light"][data-primary="cyan"] {
|
|
1432
1553
|
--color-on-primary: var(--neutral-950);
|
|
1433
1554
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1434
1555
|
}
|
|
@@ -1444,6 +1565,7 @@
|
|
|
1444
1565
|
--primary-400-rgb: var(--neutral-700-rgb);
|
|
1445
1566
|
--primary-500-rgb: var(--neutral-800-rgb);
|
|
1446
1567
|
--primary-600-rgb: var(--neutral-900-rgb);
|
|
1568
|
+
--primary-700-rgb: var(--neutral-800-rgb);
|
|
1447
1569
|
--color-on-primary: var(--neutral-0);
|
|
1448
1570
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1449
1571
|
}
|
|
@@ -1460,6 +1582,7 @@
|
|
|
1460
1582
|
--primary-400-rgb: var(--neutral-200-rgb);
|
|
1461
1583
|
--primary-500-rgb: var(--neutral-100-rgb);
|
|
1462
1584
|
--primary-600-rgb: var(--neutral-50-rgb);
|
|
1585
|
+
--primary-700-rgb: var(--neutral-200-rgb);
|
|
1463
1586
|
--color-on-primary: var(--neutral-950);
|
|
1464
1587
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1465
1588
|
}
|
|
@@ -1476,6 +1599,7 @@
|
|
|
1476
1599
|
--primary-400-rgb: var(--neutral-200-rgb);
|
|
1477
1600
|
--primary-500-rgb: var(--neutral-100-rgb);
|
|
1478
1601
|
--primary-600-rgb: var(--neutral-50-rgb);
|
|
1602
|
+
--primary-700-rgb: var(--neutral-200-rgb);
|
|
1479
1603
|
--color-on-primary: var(--neutral-950);
|
|
1480
1604
|
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1481
1605
|
}
|
|
@@ -1491,6 +1615,220 @@
|
|
|
1491
1615
|
--primary-400-rgb: var(--neutral-700-rgb);
|
|
1492
1616
|
--primary-500-rgb: var(--neutral-800-rgb);
|
|
1493
1617
|
--primary-600-rgb: var(--neutral-900-rgb);
|
|
1618
|
+
--primary-700-rgb: var(--neutral-800-rgb);
|
|
1619
|
+
--color-on-primary: var(--neutral-0);
|
|
1620
|
+
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1621
|
+
}
|
|
1622
|
+
/* Primary fill sub-axis, see $primaryFill in tokens.json. */
|
|
1623
|
+
[data-primary-fill="deep"] {
|
|
1624
|
+
--color-primary: var(--primary-700);
|
|
1625
|
+
--color-primary-hover: var(--primary-800);
|
|
1626
|
+
--color-primary-active: var(--primary-800);
|
|
1627
|
+
--color-primary-strong: var(--primary-800);
|
|
1628
|
+
--color-primary-rgb: var(--primary-700-rgb);
|
|
1629
|
+
--focus-ring: var(--primary-700);
|
|
1630
|
+
--color-on-primary: var(--neutral-0);
|
|
1631
|
+
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1632
|
+
}
|
|
1633
|
+
@media (prefers-color-scheme: dark) {
|
|
1634
|
+
:root:not([data-theme="light"])[data-primary-fill="deep"] {
|
|
1635
|
+
--color-primary: var(--primary-500);
|
|
1636
|
+
--color-primary-hover: var(--primary-400);
|
|
1637
|
+
--color-primary-active: var(--primary-300);
|
|
1638
|
+
--color-primary-strong: var(--primary-300);
|
|
1639
|
+
--color-primary-rgb: var(--primary-500-rgb);
|
|
1640
|
+
--focus-ring: var(--primary-400);
|
|
1641
|
+
--color-on-primary: var(--neutral-0);
|
|
1642
|
+
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1643
|
+
}
|
|
1644
|
+
}
|
|
1645
|
+
[data-theme="dark"][data-primary-fill="deep"] {
|
|
1646
|
+
--color-primary: var(--primary-500);
|
|
1647
|
+
--color-primary-hover: var(--primary-400);
|
|
1648
|
+
--color-primary-active: var(--primary-300);
|
|
1649
|
+
--color-primary-strong: var(--primary-300);
|
|
1650
|
+
--color-primary-rgb: var(--primary-500-rgb);
|
|
1651
|
+
--focus-ring: var(--primary-400);
|
|
1652
|
+
--color-on-primary: var(--neutral-0);
|
|
1653
|
+
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1654
|
+
}
|
|
1655
|
+
[data-theme="light"][data-primary-fill="deep"] {
|
|
1656
|
+
--color-primary: var(--primary-700);
|
|
1657
|
+
--color-primary-hover: var(--primary-800);
|
|
1658
|
+
--color-primary-active: var(--primary-800);
|
|
1659
|
+
--color-primary-strong: var(--primary-800);
|
|
1660
|
+
--color-primary-rgb: var(--primary-700-rgb);
|
|
1661
|
+
--focus-ring: var(--primary-700);
|
|
1494
1662
|
--color-on-primary: var(--neutral-0);
|
|
1495
1663
|
--color-on-primary-rgb: var(--neutral-0-rgb);
|
|
1496
1664
|
}
|
|
1665
|
+
@media (prefers-color-scheme: dark) {
|
|
1666
|
+
:root:not([data-theme="light"])[data-primary="sky"][data-primary-fill="deep"] {
|
|
1667
|
+
--color-on-primary: var(--neutral-950);
|
|
1668
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
[data-theme="dark"][data-primary="sky"][data-primary-fill="deep"] {
|
|
1672
|
+
--color-on-primary: var(--neutral-950);
|
|
1673
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1674
|
+
}
|
|
1675
|
+
@media (prefers-color-scheme: dark) {
|
|
1676
|
+
:root:not([data-theme="light"])[data-primary="blue"][data-primary-fill="deep"] {
|
|
1677
|
+
--color-on-primary: var(--neutral-950);
|
|
1678
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
[data-theme="dark"][data-primary="blue"][data-primary-fill="deep"] {
|
|
1682
|
+
--color-on-primary: var(--neutral-950);
|
|
1683
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1684
|
+
}
|
|
1685
|
+
@media (prefers-color-scheme: dark) {
|
|
1686
|
+
:root:not([data-theme="light"])[data-primary="indigo"][data-primary-fill="deep"] {
|
|
1687
|
+
--color-on-primary: var(--neutral-950);
|
|
1688
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
[data-theme="dark"][data-primary="indigo"][data-primary-fill="deep"] {
|
|
1692
|
+
--color-on-primary: var(--neutral-950);
|
|
1693
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1694
|
+
}
|
|
1695
|
+
@media (prefers-color-scheme: dark) {
|
|
1696
|
+
:root:not([data-theme="light"])[data-primary="violet"][data-primary-fill="deep"] {
|
|
1697
|
+
--color-on-primary: var(--neutral-950);
|
|
1698
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
[data-theme="dark"][data-primary="violet"][data-primary-fill="deep"] {
|
|
1702
|
+
--color-on-primary: var(--neutral-950);
|
|
1703
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1704
|
+
}
|
|
1705
|
+
@media (prefers-color-scheme: dark) {
|
|
1706
|
+
:root:not([data-theme="light"])[data-primary="purple"][data-primary-fill="deep"] {
|
|
1707
|
+
--color-on-primary: var(--neutral-950);
|
|
1708
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
[data-theme="dark"][data-primary="purple"][data-primary-fill="deep"] {
|
|
1712
|
+
--color-on-primary: var(--neutral-950);
|
|
1713
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1714
|
+
}
|
|
1715
|
+
@media (prefers-color-scheme: dark) {
|
|
1716
|
+
:root:not([data-theme="light"])[data-primary="fuchsia"][data-primary-fill="deep"] {
|
|
1717
|
+
--color-on-primary: var(--neutral-950);
|
|
1718
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
[data-theme="dark"][data-primary="fuchsia"][data-primary-fill="deep"] {
|
|
1722
|
+
--color-on-primary: var(--neutral-950);
|
|
1723
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1724
|
+
}
|
|
1725
|
+
@media (prefers-color-scheme: dark) {
|
|
1726
|
+
:root:not([data-theme="light"])[data-primary="pink"][data-primary-fill="deep"] {
|
|
1727
|
+
--color-on-primary: var(--neutral-950);
|
|
1728
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1729
|
+
}
|
|
1730
|
+
}
|
|
1731
|
+
[data-theme="dark"][data-primary="pink"][data-primary-fill="deep"] {
|
|
1732
|
+
--color-on-primary: var(--neutral-950);
|
|
1733
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1734
|
+
}
|
|
1735
|
+
@media (prefers-color-scheme: dark) {
|
|
1736
|
+
:root:not([data-theme="light"])[data-primary="rose"][data-primary-fill="deep"] {
|
|
1737
|
+
--color-on-primary: var(--neutral-950);
|
|
1738
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
[data-theme="dark"][data-primary="rose"][data-primary-fill="deep"] {
|
|
1742
|
+
--color-on-primary: var(--neutral-950);
|
|
1743
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1744
|
+
}
|
|
1745
|
+
@media (prefers-color-scheme: dark) {
|
|
1746
|
+
:root:not([data-theme="light"])[data-primary="orange"][data-primary-fill="deep"] {
|
|
1747
|
+
--color-on-primary: var(--neutral-950);
|
|
1748
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
[data-theme="dark"][data-primary="orange"][data-primary-fill="deep"] {
|
|
1752
|
+
--color-on-primary: var(--neutral-950);
|
|
1753
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1754
|
+
}
|
|
1755
|
+
@media (prefers-color-scheme: dark) {
|
|
1756
|
+
:root:not([data-theme="light"])[data-primary="amber"][data-primary-fill="deep"] {
|
|
1757
|
+
--color-on-primary: var(--neutral-950);
|
|
1758
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
[data-theme="dark"][data-primary="amber"][data-primary-fill="deep"] {
|
|
1762
|
+
--color-on-primary: var(--neutral-950);
|
|
1763
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1764
|
+
}
|
|
1765
|
+
@media (prefers-color-scheme: dark) {
|
|
1766
|
+
:root:not([data-theme="light"])[data-primary="yellow"][data-primary-fill="deep"] {
|
|
1767
|
+
--color-on-primary: var(--neutral-950);
|
|
1768
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1769
|
+
}
|
|
1770
|
+
}
|
|
1771
|
+
[data-theme="dark"][data-primary="yellow"][data-primary-fill="deep"] {
|
|
1772
|
+
--color-on-primary: var(--neutral-950);
|
|
1773
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1774
|
+
}
|
|
1775
|
+
@media (prefers-color-scheme: dark) {
|
|
1776
|
+
:root:not([data-theme="light"])[data-primary="lime"][data-primary-fill="deep"] {
|
|
1777
|
+
--color-on-primary: var(--neutral-950);
|
|
1778
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1779
|
+
}
|
|
1780
|
+
}
|
|
1781
|
+
[data-theme="dark"][data-primary="lime"][data-primary-fill="deep"] {
|
|
1782
|
+
--color-on-primary: var(--neutral-950);
|
|
1783
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1784
|
+
}
|
|
1785
|
+
@media (prefers-color-scheme: dark) {
|
|
1786
|
+
:root:not([data-theme="light"])[data-primary="green"][data-primary-fill="deep"] {
|
|
1787
|
+
--color-on-primary: var(--neutral-950);
|
|
1788
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
[data-theme="dark"][data-primary="green"][data-primary-fill="deep"] {
|
|
1792
|
+
--color-on-primary: var(--neutral-950);
|
|
1793
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1794
|
+
}
|
|
1795
|
+
@media (prefers-color-scheme: dark) {
|
|
1796
|
+
:root:not([data-theme="light"])[data-primary="emerald"][data-primary-fill="deep"] {
|
|
1797
|
+
--color-on-primary: var(--neutral-950);
|
|
1798
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1799
|
+
}
|
|
1800
|
+
}
|
|
1801
|
+
[data-theme="dark"][data-primary="emerald"][data-primary-fill="deep"] {
|
|
1802
|
+
--color-on-primary: var(--neutral-950);
|
|
1803
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1804
|
+
}
|
|
1805
|
+
@media (prefers-color-scheme: dark) {
|
|
1806
|
+
:root:not([data-theme="light"])[data-primary="teal"][data-primary-fill="deep"] {
|
|
1807
|
+
--color-on-primary: var(--neutral-950);
|
|
1808
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
[data-theme="dark"][data-primary="teal"][data-primary-fill="deep"] {
|
|
1812
|
+
--color-on-primary: var(--neutral-950);
|
|
1813
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1814
|
+
}
|
|
1815
|
+
@media (prefers-color-scheme: dark) {
|
|
1816
|
+
:root:not([data-theme="light"])[data-primary="cyan"][data-primary-fill="deep"] {
|
|
1817
|
+
--color-on-primary: var(--neutral-950);
|
|
1818
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
[data-theme="dark"][data-primary="cyan"][data-primary-fill="deep"] {
|
|
1822
|
+
--color-on-primary: var(--neutral-950);
|
|
1823
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1824
|
+
}
|
|
1825
|
+
@media (prefers-color-scheme: dark) {
|
|
1826
|
+
:root:not([data-theme="light"])[data-primary="noir"][data-primary-fill="deep"] {
|
|
1827
|
+
--color-on-primary: var(--neutral-950);
|
|
1828
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
[data-theme="dark"][data-primary="noir"][data-primary-fill="deep"] {
|
|
1832
|
+
--color-on-primary: var(--neutral-950);
|
|
1833
|
+
--color-on-primary-rgb: var(--neutral-950-rgb);
|
|
1834
|
+
}
|
package/docs/agent-onboarding.md
CHANGED
|
@@ -68,12 +68,12 @@ wrapper, use the raw markup and hydrate it:
|
|
|
68
68
|
`USAGE.md` §0 into this project's `DESIGN.md`, then `app.identity.css` from the template beside
|
|
69
69
|
it, then set `data-primary`, `data-neutral`, `data-style`, the app's default `data-density` and the default theme on
|
|
70
70
|
`<html>`. Keeping a default is allowed when the brief says why. Then pick each screen's
|
|
71
|
-
archetype from `USAGE.md` §7b before writing its markup.
|
|
71
|
+
archetype from `USAGE.md` §7b before writing its markup, and lay out phone screens by `USAGE.md` §8.
|
|
72
72
|
|
|
73
73
|
**Non-negotiables:**
|
|
74
74
|
1. No raw hex or px in app CSS. Use tokens: `var(--color-primary)`, `var(--space-4)` (4px scale),
|
|
75
75
|
`var(--radius-md)`, `var(--shadow-1)`, `var(--dur-base)`. The one exception is `app.identity.css`,
|
|
76
|
-
which gives the tokens listed in `USAGE.md` §0 their literal values
|
|
76
|
+
which gives the tokens listed in `USAGE.md` §0 their literal values. Overriding anything else takes the app outside the kit's guarantee (§0): prefer the sanctioned attribute, such as `data-density="touch"` or `data-primary-fill="deep"`, when one exists.
|
|
77
77
|
2. Components only touch semantic tokens (`--color-*`), never the primitive ramp (`--azure-600`).
|
|
78
78
|
3. `.fdy-btn` is already the primary action (there is no `--primary`). One per screen; everything
|
|
79
79
|
else is `--ghost` or `--text`.
|
|
@@ -177,8 +177,8 @@ The order matters; skipping to components is what produces flat, identical-card
|
|
|
177
177
|
chat bubbles, canvas), so you build the frame instead of inventing a class.
|
|
178
178
|
1. **Shell:** is `.fdy-app` already in place (usually once, in the app layout)? If not, copy it
|
|
179
179
|
from `docs/getting-started.md` §The app shell.
|
|
180
|
-
2. **Theme:** `data-theme="light|dark"` + `data-density="comfortable|compact"`, normally on
|
|
181
|
-
`<html>`, set once at the root. Use `compact` for table-heavy back-office screens. Both attributes
|
|
180
|
+
2. **Theme:** `data-theme="light|dark"` + `data-density="comfortable|compact|touch"`, normally on
|
|
181
|
+
`<html>`, set once at the root. Use `compact` for table-heavy back-office screens and `touch` for an app people use on a phone. Both attributes
|
|
182
182
|
also work on **any ancestor**: `<section data-theme="dark">` inverts that region and every
|
|
183
183
|
component inside it follows, so never hand-colour an inverted panel. `data-primary` and
|
|
184
184
|
`data-neutral` are set once on `<html>`. An inverted region in an app with a non-default palette
|
package/docs/getting-started.md
CHANGED
|
@@ -30,7 +30,7 @@ Freeday = **CSS** (semantic tokens + `fdy-*` classes) + **zero-dependency JS enh
|
|
|
30
30
|
**after** that must be re-hydrated: `window.Freeday<X>.initAll(el)` (idempotent, safe to repeat).
|
|
31
31
|
Each framework's adapter wraps this, so you don't call it manually.
|
|
32
32
|
4. **Theme via `data-*`.** `data-theme="light|dark"` (all semantic tokens switch) +
|
|
33
|
-
`data-density="comfortable|compact"` (control height
|
|
33
|
+
`data-density="comfortable|compact|touch"` (control height: `compact` for data-dense screens, `touch` for phones). Normally on
|
|
34
34
|
`<html>`; change at runtime with `document.documentElement.dataset.theme = 'dark'`. Both also
|
|
35
35
|
work on **any ancestor**, because these are inheriting custom properties, so `<section data-theme="dark">`
|
|
36
36
|
inverts just that region and every component inside it follows. See [`USAGE.md`](../USAGE.md) §5b.
|
|
@@ -198,7 +198,7 @@ live docs also have a copy button per component.
|
|
|
198
198
|
```bash
|
|
199
199
|
npm i @cahyo-dimas/freeday
|
|
200
200
|
```
|
|
201
|
-
Lands in `package.json` as `"@cahyo-dimas/freeday": "^3.
|
|
201
|
+
Lands in `package.json` as `"@cahyo-dimas/freeday": "^3.23.0"` (public npm package). `dist/` is
|
|
202
202
|
committed and published → no build step; `npm ci` runs without auth.
|
|
203
203
|
|
|
204
204
|
### 2. Import the CSS + enhancers **once** in your entry (`src/main.ts`)
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
<!-- .fdy-app__title carries an auto-spacer (margin-right:auto): everything after it sits at
|
|
83
83
|
the right edge. -->
|
|
84
|
-
<h1 class="fdy-app__title
|
|
84
|
+
<h1 class="fdy-app__title">Receivables</h1>
|
|
85
85
|
|
|
86
86
|
<div class="fdy-input-group fdy-hide-below-md" style="max-width:14rem">
|
|
87
87
|
<span class="fdy-input-group__addon fdy-input-group__addon--icon">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cahyo-dimas/freeday",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.23.0",
|
|
4
4
|
"description": "Freeday: token-driven, framework-agnostic UI KIT (design source-of-truth).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"scripts": {
|
|
98
98
|
"build": "node tokens/build.mjs",
|
|
99
99
|
"test": "node --test",
|
|
100
|
-
"test:browser": "node --test --test-concurrency=3 browser/color-mix.mjs browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/axis-nesting.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/stretch-warn.mjs browser/hidden-attr.mjs browser/form-grid-rows.mjs browser/theme-pref.mjs browser/text-override.mjs browser/control-heights.mjs browser/field-width.mjs browser/cfl-multi.mjs browser/cfl-dialog-only.mjs browser/crowding.mjs browser/over-dialog.mjs browser/chart-scale.mjs browser/overlay-stack.mjs browser/chart-a11y.mjs browser/app-shell.mjs browser/bottom-nav.mjs browser/picker-states.mjs browser/tabs-strip.mjs browser/tabs-vertical.mjs browser/menu-align.mjs browser/cfl-narrow.mjs browser/form-reveal.mjs browser/confirm-search-copy.mjs browser/daterange-settled.mjs browser/daterange-single.mjs browser/display-parts.mjs browser/table-empty.mjs browser/table-footer-text.mjs browser/month-mode.mjs browser/monthpicker.mjs browser/page-columns.mjs browser/table-hover.mjs browser/typed-popover.mjs browser/filter-parity.mjs browser/filter-wrap.mjs browser/filter-stack.mjs browser/timepicker.mjs browser/form-kit-required.mjs browser/form-required-rest.mjs browser/autocomplete-open.mjs browser/picker-in-modal.mjs browser/harness-contract.mjs browser/app-owned.mjs browser/sortable.mjs browser/modal-phone.mjs browser/empty-ref.mjs browser/stack-standalone.mjs",
|
|
100
|
+
"test:browser": "node --test --test-concurrency=3 browser/color-mix.mjs browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/axis-nesting.mjs browser/palette-os-dark.mjs browser/primary-fill.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/stretch-warn.mjs browser/hidden-attr.mjs browser/form-grid-rows.mjs browser/theme-pref.mjs browser/text-override.mjs browser/control-heights.mjs browser/field-width.mjs browser/cfl-multi.mjs browser/cfl-dialog-only.mjs browser/crowding.mjs browser/over-dialog.mjs browser/chart-scale.mjs browser/overlay-stack.mjs browser/chart-a11y.mjs browser/app-shell.mjs browser/bottom-nav.mjs browser/actionbar.mjs browser/picker-states.mjs browser/tabs-strip.mjs browser/tabs-vertical.mjs browser/menu-align.mjs browser/cfl-narrow.mjs browser/form-reveal.mjs browser/confirm-search-copy.mjs browser/daterange-settled.mjs browser/daterange-single.mjs browser/child-hydration.mjs browser/tabs-picker.mjs browser/display-parts.mjs browser/table-empty.mjs browser/table-footer-text.mjs browser/month-mode.mjs browser/monthpicker.mjs browser/page-columns.mjs browser/table-hover.mjs browser/typed-popover.mjs browser/filter-parity.mjs browser/filter-wrap.mjs browser/filter-stack.mjs browser/timepicker.mjs browser/form-kit-required.mjs browser/form-required-rest.mjs browser/autocomplete-open.mjs browser/picker-in-modal.mjs browser/harness-contract.mjs browser/app-owned.mjs browser/sortable.mjs browser/modal-phone.mjs browser/empty-ref.mjs browser/stack-standalone.mjs",
|
|
101
101
|
"prepack": "node tokens/build.mjs",
|
|
102
102
|
"version": "node tokens/build.mjs && git add dist",
|
|
103
103
|
"typecheck:react": "tsc -p adapters/react/tsconfig.json --noEmit",
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* Freeday. Action bar
|
|
2
|
+
*
|
|
3
|
+
* One to three actions pinned to the bottom of the screen, where a thumb reaches them on a phone:
|
|
4
|
+
* the sign-in button, approve and reject on a document, save on a long form. Before this, an app
|
|
5
|
+
* either put its primary action mid-page, where it scrolled away, or hand-wrote a fixed bar that
|
|
6
|
+
* sat on top of the bottom nav.
|
|
7
|
+
*
|
|
8
|
+
* Sticky, not fixed: the bar keeps its place in the flow, so the last row above it is never
|
|
9
|
+
* covered and the page needs no extra reservation. In a shell with a bottom nav it rests on top of
|
|
10
|
+
* the nav; anywhere else it clears the home indicator itself. */
|
|
11
|
+
.fdy-actionbar{
|
|
12
|
+
position:sticky;bottom:0;z-index:40;
|
|
13
|
+
display:flex;gap:var(--space-2);
|
|
14
|
+
padding:var(--space-3) var(--space-4);
|
|
15
|
+
padding-bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));
|
|
16
|
+
background:var(--color-surface-raised);
|
|
17
|
+
backdrop-filter:var(--surface-filter);
|
|
18
|
+
-webkit-backdrop-filter:var(--surface-filter);
|
|
19
|
+
border-top:var(--bw) solid var(--color-border);
|
|
20
|
+
}
|
|
21
|
+
/* The buttons share the width; the primary action goes last, nearest the thumb. */
|
|
22
|
+
.fdy-actionbar > .fdy-btn{flex:1 1 0;min-width:0;}
|
|
23
|
+
/* Sticky is bounded by its parent, and `.fdy-app__main` has bottom padding that sits below the bar,
|
|
24
|
+
* so at the end of the page the bar would stop short of the edge by that padding. A negative bottom
|
|
25
|
+
* margin cancels it when the bar is the last child (no :has(), the support floor includes iOS 15).
|
|
26
|
+
* The bar may also sit one wrapper down, in a page wrapper such as `.fdy-page`. Sticky is then
|
|
27
|
+
* bounded by the wrapper, so the wrapper must be the last in-flow content of main and its content
|
|
28
|
+
* box must end where main's does: no bottom padding, border or margin of its own (`.fdy-page` has
|
|
29
|
+
* none). A closed dialog and the fixed bottom nav take no room in the flow, so they may follow it.
|
|
30
|
+
* A dialog or drawer is not a wrapper: a bar inside a modal is not offset at any depth.
|
|
31
|
+
* Values mirror app-shell.css: main's padding is --space-8, and --space-5 at max-width 720px. */
|
|
32
|
+
.fdy-app__main > .fdy-actionbar:last-child,
|
|
33
|
+
.fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{margin-bottom:calc(-1 * var(--space-8));}
|
|
34
|
+
@media (max-width:720px){
|
|
35
|
+
.fdy-app__main > .fdy-actionbar:last-child,
|
|
36
|
+
.fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{margin-bottom:calc(-1 * var(--space-5));}
|
|
37
|
+
/* On a phone the bar runs edge to edge, like the nav it rests on: inset by main's side padding
|
|
38
|
+
* it would leave a strip of scrolling content showing on either side. The same depth rule
|
|
39
|
+
* holds: a wrapper between main and the bar must add no side padding, border or margin. The
|
|
40
|
+
* landscape notch is cleared by the bar's own padding. */
|
|
41
|
+
.fdy-app__main > .fdy-actionbar,
|
|
42
|
+
.fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar{
|
|
43
|
+
margin-inline:calc(-1 * var(--space-5));
|
|
44
|
+
padding-left:calc(var(--space-4) + env(safe-area-inset-left,0px));
|
|
45
|
+
padding-right:calc(var(--space-4) + env(safe-area-inset-right,0px));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/* Above the bottom nav: --fdy-bottomnav-h is declared, and obeyed, in bottomnav.css. The nav adds
|
|
49
|
+
* the safe-area inset itself, so the bar rests on all of it and does not add the inset twice. */
|
|
50
|
+
@media (max-width:720px){
|
|
51
|
+
.fdy-app--has-bottomnav .fdy-app__main .fdy-actionbar{
|
|
52
|
+
bottom:calc(var(--fdy-bottomnav-h) + env(safe-area-inset-bottom,0px));
|
|
53
|
+
padding-bottom:var(--space-3);
|
|
54
|
+
}
|
|
55
|
+
/* A modal or drawer is its own screen: its bar sits at its own bottom, whatever the depth. */
|
|
56
|
+
.fdy-app--has-bottomnav .fdy-app__main :is(dialog, .fdy-drawer) .fdy-actionbar{
|
|
57
|
+
bottom:0;
|
|
58
|
+
padding-bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));
|
|
59
|
+
}
|
|
60
|
+
/* In the nav shell main's padding is --space-20 + inset (bottomnav.css) and the nav is
|
|
61
|
+
* --fdy-bottomnav-h + inset tall. What must remain below the bar is exactly the nav, so the
|
|
62
|
+
* bar ends on the nav at the end of the page and is not pushed up over the last row. The
|
|
63
|
+
* insets cancel. */
|
|
64
|
+
.fdy-app--has-bottomnav .fdy-app__main > .fdy-actionbar:last-child,
|
|
65
|
+
.fdy-app--has-bottomnav .fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{
|
|
66
|
+
margin-bottom:calc(var(--fdy-bottomnav-h) - var(--space-20));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -8,8 +8,16 @@
|
|
|
8
8
|
*
|
|
9
9
|
* Deliberately NOT part of `.fdy-app`'s markup: it is `position:fixed`, so it works from
|
|
10
10
|
* anywhere inside the shell's content slot, and an application that does not want one
|
|
11
|
-
* pays nothing. `.fdy-app--has-bottomnav` on the shell is what reserves room for it
|
|
11
|
+
* pays nothing. `.fdy-app--has-bottomnav` on the shell is what reserves room for it and states
|
|
12
|
+
* the bar's height, `--fdy-bottomnav-h`, which the bar is sized by. */
|
|
12
13
|
.fdy-bottomnav{display:none;}
|
|
14
|
+
/* The bar's height, stated once so anything resting on the bar (the action bar) reads the same
|
|
15
|
+
* number the bar is drawn with: a 44px item, the vertical padding, the top hairline. Before this
|
|
16
|
+
* the height was only implied, and an item's icon and label made it 0.39px taller than the sum,
|
|
17
|
+
* more with a taller app font. The safe-area inset is added where it is used, not here. The
|
|
18
|
+
* price of a stated height: with a taller app font the label may overflow into the nav's bottom
|
|
19
|
+
* padding instead of growing it. */
|
|
20
|
+
.fdy-app--has-bottomnav{--fdy-bottomnav-h:calc(2.75rem + 2 * var(--space-2) + var(--bw));}
|
|
13
21
|
@media (max-width:720px){
|
|
14
22
|
.fdy-bottomnav{
|
|
15
23
|
display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;
|
|
@@ -23,6 +31,8 @@
|
|
|
23
31
|
backdrop-filter:var(--surface-filter);
|
|
24
32
|
-webkit-backdrop-filter:var(--surface-filter);
|
|
25
33
|
border-top:var(--bw) solid var(--color-border);
|
|
34
|
+
box-sizing:border-box;
|
|
35
|
+
height:calc(var(--fdy-bottomnav-h,auto) + env(safe-area-inset-bottom,0px));
|
|
26
36
|
}
|
|
27
37
|
/* Room for the bar, or the last row of every list on every screen sits under it -- and
|
|
28
38
|
a row you cannot scroll to is a row nobody knows is there. */
|