@aziontech/theme 5.0.0 → 5.1.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/dist/v4/globals.css +53 -4
- package/dist/v4/globals.scss +53 -4
- package/package.json +1 -1
- package/src/scripts/build-tokens.mjs +12 -0
- package/src/scripts/compile-primitives.js +1 -1
- package/src/scripts/compile-theme.js +1 -1
- package/src/scripts/measure-comment.mjs +47 -0
- package/src/tokens/README.md +10 -2
- package/src/tokens/primitives/shape/shape.js +1 -1
- package/src/tokens/semantic/texts.data.d.ts +22 -0
- package/src/tokens/semantic/texts.data.d.ts.map +1 -1
- package/src/tokens/semantic/texts.data.js +46 -14
package/dist/v4/globals.css
CHANGED
|
@@ -734,72 +734,94 @@
|
|
|
734
734
|
--text-amount-sm-line-height: 1.5;
|
|
735
735
|
--text-amount-sm-font-weight: 400;
|
|
736
736
|
--text-amount-sm-letter-spacing: -0.08em;
|
|
737
|
+
--text-heading-2xl-text-wrap-style: balance;
|
|
737
738
|
--text-heading-2xl-font-size: 1.875rem;
|
|
738
739
|
--text-heading-2xl-line-height: 1.25;
|
|
739
740
|
--text-heading-2xl-font-weight: 400;
|
|
741
|
+
--text-heading-2xl-letter-spacing: -0.05rem;
|
|
742
|
+
--text-heading-xl-text-wrap-style: balance;
|
|
740
743
|
--text-heading-xl-font-size: 1.25rem;
|
|
741
744
|
--text-heading-xl-line-height: 1.25;
|
|
742
745
|
--text-heading-xl-font-weight: 400;
|
|
746
|
+
--text-heading-xl-letter-spacing: -0.05rem;
|
|
747
|
+
--text-heading-lg-text-wrap-style: balance;
|
|
743
748
|
--text-heading-lg-font-size: 1.125rem;
|
|
744
749
|
--text-heading-lg-line-height: 1.25;
|
|
745
750
|
--text-heading-lg-font-weight: 400;
|
|
751
|
+
--text-heading-lg-letter-spacing: -0.05rem;
|
|
752
|
+
--text-heading-md-text-wrap-style: balance;
|
|
746
753
|
--text-heading-md-font-size: 1rem;
|
|
747
754
|
--text-heading-md-line-height: 1.25;
|
|
748
755
|
--text-heading-md-font-weight: 400;
|
|
756
|
+
--text-heading-md-letter-spacing: -0.05rem;
|
|
757
|
+
--text-heading-sm-text-wrap-style: balance;
|
|
749
758
|
--text-heading-sm-font-size: 0.875rem;
|
|
750
759
|
--text-heading-sm-line-height: 1.375;
|
|
751
760
|
--text-heading-sm-font-weight: 400;
|
|
761
|
+
--text-heading-sm-letter-spacing: -0.05rem;
|
|
762
|
+
--text-heading-xs-text-wrap-style: balance;
|
|
752
763
|
--text-heading-xs-font-size: 1rem;
|
|
753
764
|
--text-heading-xs-line-height: 1.375;
|
|
754
765
|
--text-heading-xs-font-weight: 400;
|
|
766
|
+
--text-heading-xs-letter-spacing: -0.05rem;
|
|
767
|
+
--text-heading-xxs-text-wrap-style: balance;
|
|
755
768
|
--text-heading-xxs-font-size: 0.875rem;
|
|
756
769
|
--text-heading-xxs-line-height: 1.375;
|
|
757
770
|
--text-heading-xxs-font-weight: 400;
|
|
771
|
+
--text-heading-xxs-letter-spacing: -0.05rem;
|
|
758
772
|
--text-label-lg-font-size: 1rem;
|
|
759
773
|
--text-label-lg-line-height: 1.5;
|
|
760
774
|
--text-label-lg-font-weight: 400;
|
|
775
|
+
--text-label-lg-letter-spacing: -0.025rem;
|
|
761
776
|
--text-label-md-font-size: 0.875rem;
|
|
762
777
|
--text-label-md-line-height: 1.5;
|
|
763
778
|
--text-label-md-font-weight: 400;
|
|
779
|
+
--text-label-md-letter-spacing: -0.025rem;
|
|
764
780
|
--text-label-sm-font-size: 0.75rem;
|
|
765
781
|
--text-label-sm-line-height: 1.5;
|
|
766
782
|
--text-label-sm-font-weight: 400;
|
|
783
|
+
--text-label-sm-letter-spacing: -0.025rem;
|
|
767
784
|
--text-label-code-sm-font-family: Roboto Mono;
|
|
768
785
|
--text-label-code-sm-font-size: 0.75rem;
|
|
769
786
|
--text-label-code-sm-line-height: 1;
|
|
770
787
|
--text-label-code-sm-font-weight: 400;
|
|
771
|
-
--text-label-code-sm-letter-spacing: 0;
|
|
788
|
+
--text-label-code-sm-letter-spacing: 0.025rem;
|
|
772
789
|
--text-body-code-sm-text-wrap-style: pretty;
|
|
773
790
|
--text-body-code-sm-font-family: Roboto Mono;
|
|
774
791
|
--text-body-code-sm-font-size: 0.75rem;
|
|
775
792
|
--text-body-code-sm-line-height: 1.625;
|
|
776
793
|
--text-body-code-sm-font-weight: 400;
|
|
777
|
-
--text-body-code-sm-letter-spacing: 0;
|
|
794
|
+
--text-body-code-sm-letter-spacing: 0.025rem;
|
|
778
795
|
--text-label-code-md-font-family: Roboto Mono;
|
|
779
796
|
--text-label-code-md-font-size: 0.875rem;
|
|
780
797
|
--text-label-code-md-line-height: 1;
|
|
781
798
|
--text-label-code-md-font-weight: 400;
|
|
782
|
-
--text-label-code-md-letter-spacing: 0;
|
|
799
|
+
--text-label-code-md-letter-spacing: 0.025rem;
|
|
783
800
|
--text-label-code-lg-font-family: Roboto Mono;
|
|
784
801
|
--text-label-code-lg-font-size: 1rem;
|
|
785
802
|
--text-label-code-lg-line-height: 1;
|
|
786
803
|
--text-label-code-lg-font-weight: 400;
|
|
787
|
-
--text-label-code-lg-letter-spacing: 0;
|
|
804
|
+
--text-label-code-lg-letter-spacing: 0.025rem;
|
|
805
|
+
--text-body-lg-text-wrap-style: pretty;
|
|
788
806
|
--text-body-lg-font-size: 1rem;
|
|
789
807
|
--text-body-lg-font-weight: 400;
|
|
790
808
|
--text-body-lg-line-height: 1.375;
|
|
809
|
+
--text-body-md-text-wrap-style: pretty;
|
|
791
810
|
--text-body-md-font-size: 1rem;
|
|
792
811
|
--text-body-md-font-weight: 400;
|
|
793
812
|
--text-body-md-line-height: 1.375;
|
|
794
813
|
--text-body-prose-md-font-size: 1rem;
|
|
795
814
|
--text-body-prose-md-font-weight: 400;
|
|
796
815
|
--text-body-prose-md-line-height: 1.625;
|
|
816
|
+
--text-body-sm-text-wrap-style: pretty;
|
|
797
817
|
--text-body-sm-font-size: 0.875rem;
|
|
798
818
|
--text-body-sm-font-weight: 400;
|
|
799
819
|
--text-body-sm-line-height: 1.375;
|
|
820
|
+
--text-body-xs-text-wrap-style: pretty;
|
|
800
821
|
--text-body-xs-font-size: 0.75rem;
|
|
801
822
|
--text-body-xs-font-weight: 400;
|
|
802
823
|
--text-body-xs-line-height: 1.375;
|
|
824
|
+
--text-body-xxs-text-wrap-style: pretty;
|
|
803
825
|
--text-body-xxs-font-size: 0.75rem;
|
|
804
826
|
--text-body-xxs-font-weight: 400;
|
|
805
827
|
--text-body-xxs-line-height: 1.5;
|
|
@@ -1191,63 +1213,80 @@
|
|
|
1191
1213
|
}
|
|
1192
1214
|
|
|
1193
1215
|
@utility text-heading-2xl {
|
|
1216
|
+
text-wrap-style: var(--text-heading-2xl-text-wrap-style);
|
|
1194
1217
|
font-size: var(--text-heading-2xl-font-size);
|
|
1195
1218
|
line-height: var(--text-heading-2xl-line-height);
|
|
1196
1219
|
font-weight: var(--text-heading-2xl-font-weight);
|
|
1220
|
+
letter-spacing: var(--text-heading-2xl-letter-spacing);
|
|
1197
1221
|
}
|
|
1198
1222
|
|
|
1199
1223
|
@utility text-heading-xl {
|
|
1224
|
+
text-wrap-style: var(--text-heading-xl-text-wrap-style);
|
|
1200
1225
|
font-size: var(--text-heading-xl-font-size);
|
|
1201
1226
|
line-height: var(--text-heading-xl-line-height);
|
|
1202
1227
|
font-weight: var(--text-heading-xl-font-weight);
|
|
1228
|
+
letter-spacing: var(--text-heading-xl-letter-spacing);
|
|
1203
1229
|
}
|
|
1204
1230
|
|
|
1205
1231
|
@utility text-heading-lg {
|
|
1232
|
+
text-wrap-style: var(--text-heading-lg-text-wrap-style);
|
|
1206
1233
|
font-size: var(--text-heading-lg-font-size);
|
|
1207
1234
|
line-height: var(--text-heading-lg-line-height);
|
|
1208
1235
|
font-weight: var(--text-heading-lg-font-weight);
|
|
1236
|
+
letter-spacing: var(--text-heading-lg-letter-spacing);
|
|
1209
1237
|
}
|
|
1210
1238
|
|
|
1211
1239
|
@utility text-heading-md {
|
|
1240
|
+
text-wrap-style: var(--text-heading-md-text-wrap-style);
|
|
1212
1241
|
font-size: var(--text-heading-md-font-size);
|
|
1213
1242
|
line-height: var(--text-heading-md-line-height);
|
|
1214
1243
|
font-weight: var(--text-heading-md-font-weight);
|
|
1244
|
+
letter-spacing: var(--text-heading-md-letter-spacing);
|
|
1215
1245
|
}
|
|
1216
1246
|
|
|
1217
1247
|
@utility text-heading-sm {
|
|
1248
|
+
text-wrap-style: var(--text-heading-sm-text-wrap-style);
|
|
1218
1249
|
font-size: var(--text-heading-sm-font-size);
|
|
1219
1250
|
line-height: var(--text-heading-sm-line-height);
|
|
1220
1251
|
font-weight: var(--text-heading-sm-font-weight);
|
|
1252
|
+
letter-spacing: var(--text-heading-sm-letter-spacing);
|
|
1221
1253
|
}
|
|
1222
1254
|
|
|
1223
1255
|
@utility text-heading-xs {
|
|
1256
|
+
text-wrap-style: var(--text-heading-xs-text-wrap-style);
|
|
1224
1257
|
font-size: var(--text-heading-xs-font-size);
|
|
1225
1258
|
line-height: var(--text-heading-xs-line-height);
|
|
1226
1259
|
font-weight: var(--text-heading-xs-font-weight);
|
|
1260
|
+
letter-spacing: var(--text-heading-xs-letter-spacing);
|
|
1227
1261
|
}
|
|
1228
1262
|
|
|
1229
1263
|
@utility text-heading-xxs {
|
|
1264
|
+
text-wrap-style: var(--text-heading-xxs-text-wrap-style);
|
|
1230
1265
|
font-size: var(--text-heading-xxs-font-size);
|
|
1231
1266
|
line-height: var(--text-heading-xxs-line-height);
|
|
1232
1267
|
font-weight: var(--text-heading-xxs-font-weight);
|
|
1268
|
+
letter-spacing: var(--text-heading-xxs-letter-spacing);
|
|
1233
1269
|
}
|
|
1234
1270
|
|
|
1235
1271
|
@utility text-label-lg {
|
|
1236
1272
|
font-size: var(--text-label-lg-font-size);
|
|
1237
1273
|
line-height: var(--text-label-lg-line-height);
|
|
1238
1274
|
font-weight: var(--text-label-lg-font-weight);
|
|
1275
|
+
letter-spacing: var(--text-label-lg-letter-spacing);
|
|
1239
1276
|
}
|
|
1240
1277
|
|
|
1241
1278
|
@utility text-label-md {
|
|
1242
1279
|
font-size: var(--text-label-md-font-size);
|
|
1243
1280
|
line-height: var(--text-label-md-line-height);
|
|
1244
1281
|
font-weight: var(--text-label-md-font-weight);
|
|
1282
|
+
letter-spacing: var(--text-label-md-letter-spacing);
|
|
1245
1283
|
}
|
|
1246
1284
|
|
|
1247
1285
|
@utility text-label-sm {
|
|
1248
1286
|
font-size: var(--text-label-sm-font-size);
|
|
1249
1287
|
line-height: var(--text-label-sm-line-height);
|
|
1250
1288
|
font-weight: var(--text-label-sm-font-weight);
|
|
1289
|
+
letter-spacing: var(--text-label-sm-letter-spacing);
|
|
1251
1290
|
}
|
|
1252
1291
|
|
|
1253
1292
|
@utility text-label-code-sm {
|
|
@@ -1284,12 +1323,14 @@
|
|
|
1284
1323
|
}
|
|
1285
1324
|
|
|
1286
1325
|
@utility text-body-lg {
|
|
1326
|
+
text-wrap-style: var(--text-body-lg-text-wrap-style);
|
|
1287
1327
|
font-size: var(--text-body-lg-font-size);
|
|
1288
1328
|
font-weight: var(--text-body-lg-font-weight);
|
|
1289
1329
|
line-height: var(--text-body-lg-line-height);
|
|
1290
1330
|
}
|
|
1291
1331
|
|
|
1292
1332
|
@utility text-body-md {
|
|
1333
|
+
text-wrap-style: var(--text-body-md-text-wrap-style);
|
|
1293
1334
|
font-size: var(--text-body-md-font-size);
|
|
1294
1335
|
font-weight: var(--text-body-md-font-weight);
|
|
1295
1336
|
line-height: var(--text-body-md-line-height);
|
|
@@ -1302,18 +1343,21 @@
|
|
|
1302
1343
|
}
|
|
1303
1344
|
|
|
1304
1345
|
@utility text-body-sm {
|
|
1346
|
+
text-wrap-style: var(--text-body-sm-text-wrap-style);
|
|
1305
1347
|
font-size: var(--text-body-sm-font-size);
|
|
1306
1348
|
font-weight: var(--text-body-sm-font-weight);
|
|
1307
1349
|
line-height: var(--text-body-sm-line-height);
|
|
1308
1350
|
}
|
|
1309
1351
|
|
|
1310
1352
|
@utility text-body-xs {
|
|
1353
|
+
text-wrap-style: var(--text-body-xs-text-wrap-style);
|
|
1311
1354
|
font-size: var(--text-body-xs-font-size);
|
|
1312
1355
|
font-weight: var(--text-body-xs-font-weight);
|
|
1313
1356
|
line-height: var(--text-body-xs-line-height);
|
|
1314
1357
|
}
|
|
1315
1358
|
|
|
1316
1359
|
@utility text-body-xxs {
|
|
1360
|
+
text-wrap-style: var(--text-body-xxs-text-wrap-style);
|
|
1317
1361
|
font-size: var(--text-body-xxs-font-size);
|
|
1318
1362
|
font-weight: var(--text-body-xxs-font-weight);
|
|
1319
1363
|
line-height: var(--text-body-xxs-line-height);
|
|
@@ -1601,6 +1645,11 @@
|
|
|
1601
1645
|
@utility border-info-contrast { border-color: var(--info-contrast); }
|
|
1602
1646
|
|
|
1603
1647
|
@layer base {
|
|
1648
|
+
html {
|
|
1649
|
+
-webkit-font-smoothing: antialiased;
|
|
1650
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1604
1653
|
button:not(:disabled),
|
|
1605
1654
|
[role="button"]:not([aria-disabled="true"]),
|
|
1606
1655
|
summary {
|
package/dist/v4/globals.scss
CHANGED
|
@@ -734,72 +734,94 @@
|
|
|
734
734
|
--text-amount-sm-line-height: 1.5;
|
|
735
735
|
--text-amount-sm-font-weight: 400;
|
|
736
736
|
--text-amount-sm-letter-spacing: -0.08em;
|
|
737
|
+
--text-heading-2xl-text-wrap-style: balance;
|
|
737
738
|
--text-heading-2xl-font-size: 1.875rem;
|
|
738
739
|
--text-heading-2xl-line-height: 1.25;
|
|
739
740
|
--text-heading-2xl-font-weight: 400;
|
|
741
|
+
--text-heading-2xl-letter-spacing: -0.05rem;
|
|
742
|
+
--text-heading-xl-text-wrap-style: balance;
|
|
740
743
|
--text-heading-xl-font-size: 1.25rem;
|
|
741
744
|
--text-heading-xl-line-height: 1.25;
|
|
742
745
|
--text-heading-xl-font-weight: 400;
|
|
746
|
+
--text-heading-xl-letter-spacing: -0.05rem;
|
|
747
|
+
--text-heading-lg-text-wrap-style: balance;
|
|
743
748
|
--text-heading-lg-font-size: 1.125rem;
|
|
744
749
|
--text-heading-lg-line-height: 1.25;
|
|
745
750
|
--text-heading-lg-font-weight: 400;
|
|
751
|
+
--text-heading-lg-letter-spacing: -0.05rem;
|
|
752
|
+
--text-heading-md-text-wrap-style: balance;
|
|
746
753
|
--text-heading-md-font-size: 1rem;
|
|
747
754
|
--text-heading-md-line-height: 1.25;
|
|
748
755
|
--text-heading-md-font-weight: 400;
|
|
756
|
+
--text-heading-md-letter-spacing: -0.05rem;
|
|
757
|
+
--text-heading-sm-text-wrap-style: balance;
|
|
749
758
|
--text-heading-sm-font-size: 0.875rem;
|
|
750
759
|
--text-heading-sm-line-height: 1.375;
|
|
751
760
|
--text-heading-sm-font-weight: 400;
|
|
761
|
+
--text-heading-sm-letter-spacing: -0.05rem;
|
|
762
|
+
--text-heading-xs-text-wrap-style: balance;
|
|
752
763
|
--text-heading-xs-font-size: 1rem;
|
|
753
764
|
--text-heading-xs-line-height: 1.375;
|
|
754
765
|
--text-heading-xs-font-weight: 400;
|
|
766
|
+
--text-heading-xs-letter-spacing: -0.05rem;
|
|
767
|
+
--text-heading-xxs-text-wrap-style: balance;
|
|
755
768
|
--text-heading-xxs-font-size: 0.875rem;
|
|
756
769
|
--text-heading-xxs-line-height: 1.375;
|
|
757
770
|
--text-heading-xxs-font-weight: 400;
|
|
771
|
+
--text-heading-xxs-letter-spacing: -0.05rem;
|
|
758
772
|
--text-label-lg-font-size: 1rem;
|
|
759
773
|
--text-label-lg-line-height: 1.5;
|
|
760
774
|
--text-label-lg-font-weight: 400;
|
|
775
|
+
--text-label-lg-letter-spacing: -0.025rem;
|
|
761
776
|
--text-label-md-font-size: 0.875rem;
|
|
762
777
|
--text-label-md-line-height: 1.5;
|
|
763
778
|
--text-label-md-font-weight: 400;
|
|
779
|
+
--text-label-md-letter-spacing: -0.025rem;
|
|
764
780
|
--text-label-sm-font-size: 0.75rem;
|
|
765
781
|
--text-label-sm-line-height: 1.5;
|
|
766
782
|
--text-label-sm-font-weight: 400;
|
|
783
|
+
--text-label-sm-letter-spacing: -0.025rem;
|
|
767
784
|
--text-label-code-sm-font-family: Roboto Mono;
|
|
768
785
|
--text-label-code-sm-font-size: 0.75rem;
|
|
769
786
|
--text-label-code-sm-line-height: 1;
|
|
770
787
|
--text-label-code-sm-font-weight: 400;
|
|
771
|
-
--text-label-code-sm-letter-spacing: 0;
|
|
788
|
+
--text-label-code-sm-letter-spacing: 0.025rem;
|
|
772
789
|
--text-body-code-sm-text-wrap-style: pretty;
|
|
773
790
|
--text-body-code-sm-font-family: Roboto Mono;
|
|
774
791
|
--text-body-code-sm-font-size: 0.75rem;
|
|
775
792
|
--text-body-code-sm-line-height: 1.625;
|
|
776
793
|
--text-body-code-sm-font-weight: 400;
|
|
777
|
-
--text-body-code-sm-letter-spacing: 0;
|
|
794
|
+
--text-body-code-sm-letter-spacing: 0.025rem;
|
|
778
795
|
--text-label-code-md-font-family: Roboto Mono;
|
|
779
796
|
--text-label-code-md-font-size: 0.875rem;
|
|
780
797
|
--text-label-code-md-line-height: 1;
|
|
781
798
|
--text-label-code-md-font-weight: 400;
|
|
782
|
-
--text-label-code-md-letter-spacing: 0;
|
|
799
|
+
--text-label-code-md-letter-spacing: 0.025rem;
|
|
783
800
|
--text-label-code-lg-font-family: Roboto Mono;
|
|
784
801
|
--text-label-code-lg-font-size: 1rem;
|
|
785
802
|
--text-label-code-lg-line-height: 1;
|
|
786
803
|
--text-label-code-lg-font-weight: 400;
|
|
787
|
-
--text-label-code-lg-letter-spacing: 0;
|
|
804
|
+
--text-label-code-lg-letter-spacing: 0.025rem;
|
|
805
|
+
--text-body-lg-text-wrap-style: pretty;
|
|
788
806
|
--text-body-lg-font-size: 1rem;
|
|
789
807
|
--text-body-lg-font-weight: 400;
|
|
790
808
|
--text-body-lg-line-height: 1.375;
|
|
809
|
+
--text-body-md-text-wrap-style: pretty;
|
|
791
810
|
--text-body-md-font-size: 1rem;
|
|
792
811
|
--text-body-md-font-weight: 400;
|
|
793
812
|
--text-body-md-line-height: 1.375;
|
|
794
813
|
--text-body-prose-md-font-size: 1rem;
|
|
795
814
|
--text-body-prose-md-font-weight: 400;
|
|
796
815
|
--text-body-prose-md-line-height: 1.625;
|
|
816
|
+
--text-body-sm-text-wrap-style: pretty;
|
|
797
817
|
--text-body-sm-font-size: 0.875rem;
|
|
798
818
|
--text-body-sm-font-weight: 400;
|
|
799
819
|
--text-body-sm-line-height: 1.375;
|
|
820
|
+
--text-body-xs-text-wrap-style: pretty;
|
|
800
821
|
--text-body-xs-font-size: 0.75rem;
|
|
801
822
|
--text-body-xs-font-weight: 400;
|
|
802
823
|
--text-body-xs-line-height: 1.375;
|
|
824
|
+
--text-body-xxs-text-wrap-style: pretty;
|
|
803
825
|
--text-body-xxs-font-size: 0.75rem;
|
|
804
826
|
--text-body-xxs-font-weight: 400;
|
|
805
827
|
--text-body-xxs-line-height: 1.5;
|
|
@@ -1191,63 +1213,80 @@
|
|
|
1191
1213
|
}
|
|
1192
1214
|
|
|
1193
1215
|
@utility text-heading-2xl {
|
|
1216
|
+
text-wrap-style: var(--text-heading-2xl-text-wrap-style);
|
|
1194
1217
|
font-size: var(--text-heading-2xl-font-size);
|
|
1195
1218
|
line-height: var(--text-heading-2xl-line-height);
|
|
1196
1219
|
font-weight: var(--text-heading-2xl-font-weight);
|
|
1220
|
+
letter-spacing: var(--text-heading-2xl-letter-spacing);
|
|
1197
1221
|
}
|
|
1198
1222
|
|
|
1199
1223
|
@utility text-heading-xl {
|
|
1224
|
+
text-wrap-style: var(--text-heading-xl-text-wrap-style);
|
|
1200
1225
|
font-size: var(--text-heading-xl-font-size);
|
|
1201
1226
|
line-height: var(--text-heading-xl-line-height);
|
|
1202
1227
|
font-weight: var(--text-heading-xl-font-weight);
|
|
1228
|
+
letter-spacing: var(--text-heading-xl-letter-spacing);
|
|
1203
1229
|
}
|
|
1204
1230
|
|
|
1205
1231
|
@utility text-heading-lg {
|
|
1232
|
+
text-wrap-style: var(--text-heading-lg-text-wrap-style);
|
|
1206
1233
|
font-size: var(--text-heading-lg-font-size);
|
|
1207
1234
|
line-height: var(--text-heading-lg-line-height);
|
|
1208
1235
|
font-weight: var(--text-heading-lg-font-weight);
|
|
1236
|
+
letter-spacing: var(--text-heading-lg-letter-spacing);
|
|
1209
1237
|
}
|
|
1210
1238
|
|
|
1211
1239
|
@utility text-heading-md {
|
|
1240
|
+
text-wrap-style: var(--text-heading-md-text-wrap-style);
|
|
1212
1241
|
font-size: var(--text-heading-md-font-size);
|
|
1213
1242
|
line-height: var(--text-heading-md-line-height);
|
|
1214
1243
|
font-weight: var(--text-heading-md-font-weight);
|
|
1244
|
+
letter-spacing: var(--text-heading-md-letter-spacing);
|
|
1215
1245
|
}
|
|
1216
1246
|
|
|
1217
1247
|
@utility text-heading-sm {
|
|
1248
|
+
text-wrap-style: var(--text-heading-sm-text-wrap-style);
|
|
1218
1249
|
font-size: var(--text-heading-sm-font-size);
|
|
1219
1250
|
line-height: var(--text-heading-sm-line-height);
|
|
1220
1251
|
font-weight: var(--text-heading-sm-font-weight);
|
|
1252
|
+
letter-spacing: var(--text-heading-sm-letter-spacing);
|
|
1221
1253
|
}
|
|
1222
1254
|
|
|
1223
1255
|
@utility text-heading-xs {
|
|
1256
|
+
text-wrap-style: var(--text-heading-xs-text-wrap-style);
|
|
1224
1257
|
font-size: var(--text-heading-xs-font-size);
|
|
1225
1258
|
line-height: var(--text-heading-xs-line-height);
|
|
1226
1259
|
font-weight: var(--text-heading-xs-font-weight);
|
|
1260
|
+
letter-spacing: var(--text-heading-xs-letter-spacing);
|
|
1227
1261
|
}
|
|
1228
1262
|
|
|
1229
1263
|
@utility text-heading-xxs {
|
|
1264
|
+
text-wrap-style: var(--text-heading-xxs-text-wrap-style);
|
|
1230
1265
|
font-size: var(--text-heading-xxs-font-size);
|
|
1231
1266
|
line-height: var(--text-heading-xxs-line-height);
|
|
1232
1267
|
font-weight: var(--text-heading-xxs-font-weight);
|
|
1268
|
+
letter-spacing: var(--text-heading-xxs-letter-spacing);
|
|
1233
1269
|
}
|
|
1234
1270
|
|
|
1235
1271
|
@utility text-label-lg {
|
|
1236
1272
|
font-size: var(--text-label-lg-font-size);
|
|
1237
1273
|
line-height: var(--text-label-lg-line-height);
|
|
1238
1274
|
font-weight: var(--text-label-lg-font-weight);
|
|
1275
|
+
letter-spacing: var(--text-label-lg-letter-spacing);
|
|
1239
1276
|
}
|
|
1240
1277
|
|
|
1241
1278
|
@utility text-label-md {
|
|
1242
1279
|
font-size: var(--text-label-md-font-size);
|
|
1243
1280
|
line-height: var(--text-label-md-line-height);
|
|
1244
1281
|
font-weight: var(--text-label-md-font-weight);
|
|
1282
|
+
letter-spacing: var(--text-label-md-letter-spacing);
|
|
1245
1283
|
}
|
|
1246
1284
|
|
|
1247
1285
|
@utility text-label-sm {
|
|
1248
1286
|
font-size: var(--text-label-sm-font-size);
|
|
1249
1287
|
line-height: var(--text-label-sm-line-height);
|
|
1250
1288
|
font-weight: var(--text-label-sm-font-weight);
|
|
1289
|
+
letter-spacing: var(--text-label-sm-letter-spacing);
|
|
1251
1290
|
}
|
|
1252
1291
|
|
|
1253
1292
|
@utility text-label-code-sm {
|
|
@@ -1284,12 +1323,14 @@
|
|
|
1284
1323
|
}
|
|
1285
1324
|
|
|
1286
1325
|
@utility text-body-lg {
|
|
1326
|
+
text-wrap-style: var(--text-body-lg-text-wrap-style);
|
|
1287
1327
|
font-size: var(--text-body-lg-font-size);
|
|
1288
1328
|
font-weight: var(--text-body-lg-font-weight);
|
|
1289
1329
|
line-height: var(--text-body-lg-line-height);
|
|
1290
1330
|
}
|
|
1291
1331
|
|
|
1292
1332
|
@utility text-body-md {
|
|
1333
|
+
text-wrap-style: var(--text-body-md-text-wrap-style);
|
|
1293
1334
|
font-size: var(--text-body-md-font-size);
|
|
1294
1335
|
font-weight: var(--text-body-md-font-weight);
|
|
1295
1336
|
line-height: var(--text-body-md-line-height);
|
|
@@ -1302,18 +1343,21 @@
|
|
|
1302
1343
|
}
|
|
1303
1344
|
|
|
1304
1345
|
@utility text-body-sm {
|
|
1346
|
+
text-wrap-style: var(--text-body-sm-text-wrap-style);
|
|
1305
1347
|
font-size: var(--text-body-sm-font-size);
|
|
1306
1348
|
font-weight: var(--text-body-sm-font-weight);
|
|
1307
1349
|
line-height: var(--text-body-sm-line-height);
|
|
1308
1350
|
}
|
|
1309
1351
|
|
|
1310
1352
|
@utility text-body-xs {
|
|
1353
|
+
text-wrap-style: var(--text-body-xs-text-wrap-style);
|
|
1311
1354
|
font-size: var(--text-body-xs-font-size);
|
|
1312
1355
|
font-weight: var(--text-body-xs-font-weight);
|
|
1313
1356
|
line-height: var(--text-body-xs-line-height);
|
|
1314
1357
|
}
|
|
1315
1358
|
|
|
1316
1359
|
@utility text-body-xxs {
|
|
1360
|
+
text-wrap-style: var(--text-body-xxs-text-wrap-style);
|
|
1317
1361
|
font-size: var(--text-body-xxs-font-size);
|
|
1318
1362
|
font-weight: var(--text-body-xxs-font-weight);
|
|
1319
1363
|
line-height: var(--text-body-xxs-line-height);
|
|
@@ -1601,6 +1645,11 @@
|
|
|
1601
1645
|
@utility border-info-contrast { border-color: var(--info-contrast); }
|
|
1602
1646
|
|
|
1603
1647
|
@layer base {
|
|
1648
|
+
html {
|
|
1649
|
+
-webkit-font-smoothing: antialiased;
|
|
1650
|
+
-moz-osx-font-smoothing: grayscale;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1604
1653
|
button:not(:disabled),
|
|
1605
1654
|
[role="button"]:not([aria-disabled="true"]),
|
|
1606
1655
|
summary {
|
package/package.json
CHANGED
|
@@ -35,11 +35,13 @@ import { animateExtras, keyframes } from '../tokens/primitives/animations/keyfra
|
|
|
35
35
|
import { breakpoints } from '../tokens/primitives/breakpoints.js';
|
|
36
36
|
import { compilePrimitivesVars } from './compile-primitives.js';
|
|
37
37
|
import { compileThemeCss, compileThemeVars } from './compile-theme.js';
|
|
38
|
+
import { container } from '../tokens/primitives/shape/container.js';
|
|
38
39
|
import { containersData } from '../tokens/semantic/containers.data.js';
|
|
39
40
|
import { layoutsData, layoutsUtilities } from '../tokens/semantic/layouts.data.js';
|
|
40
41
|
import { spacingsData } from '../tokens/semantic/spacings.data.js';
|
|
41
42
|
import { textsData } from '../tokens/semantic/texts.data.js';
|
|
42
43
|
import { zIndicesData } from '../tokens/semantic/z-indices.data.js';
|
|
44
|
+
import { assertMeasureCommentsMatch } from './measure-comment.mjs';
|
|
43
45
|
import { assertNoZeroWithUnit } from './zero-unit.mjs';
|
|
44
46
|
|
|
45
47
|
const BREAKPOINT_ORDER = ['sm', 'md', 'lg', 'xl', '2xl'];
|
|
@@ -270,6 +272,11 @@ const emitLayoutUtilities = () => emitUtilities(layoutsUtilities);
|
|
|
270
272
|
const emitBaseLayer = () =>
|
|
271
273
|
[
|
|
272
274
|
'@layer base {',
|
|
275
|
+
' html {',
|
|
276
|
+
' -webkit-font-smoothing: antialiased;',
|
|
277
|
+
' -moz-osx-font-smoothing: grayscale;',
|
|
278
|
+
' }',
|
|
279
|
+
'',
|
|
273
280
|
' button:not(:disabled),',
|
|
274
281
|
' [role="button"]:not([aria-disabled="true"]),',
|
|
275
282
|
' summary {',
|
|
@@ -431,6 +438,11 @@ const importIdx = rawCss.indexOf(IMPORT_LINE);
|
|
|
431
438
|
if (importIdx === -1) throw new Error('emitCssV4 output is missing the tailwind import line');
|
|
432
439
|
const afterImport = importIdx + IMPORT_LINE.length;
|
|
433
440
|
const css = `${rawCss.slice(0, afterImport)}\n\n${fontsCss}${rawCss.slice(afterImport)}`;
|
|
441
|
+
assertMeasureCommentsMatch(
|
|
442
|
+
await readFile(resolve(__dirname, '../tokens/semantic/layouts.data.js'), 'utf8'),
|
|
443
|
+
container,
|
|
444
|
+
'tokens/semantic/layouts.data.js',
|
|
445
|
+
);
|
|
434
446
|
assertNoZeroWithUnit(css, 'globals.css');
|
|
435
447
|
await writeFile(resolve(dir, 'globals.css'), css, 'utf8');
|
|
436
448
|
await writeFile(resolve(dir, 'globals.scss'), css, 'utf8');
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
* but for primitives only — no semantic light/dark split.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { primitives as colorPrimitives } from '../tokens/primitives/colors/colors.js'
|
|
11
10
|
import { animate } from '../tokens/primitives/animations/animate.js'
|
|
12
11
|
import { ease } from '../tokens/primitives/animations/ease.js'
|
|
13
12
|
import { borderWidths } from '../tokens/primitives/border-widths.js'
|
|
14
13
|
import { breakpoints } from '../tokens/primitives/breakpoints.js'
|
|
14
|
+
import { primitives as colorPrimitives } from '../tokens/primitives/colors/colors.js'
|
|
15
15
|
import { blur } from '../tokens/primitives/effects/blur.js'
|
|
16
16
|
import { dropShadow } from '../tokens/primitives/effects/drop-shadow.js'
|
|
17
17
|
import { insetShadow } from '../tokens/primitives/effects/inset-shadow.js'
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
} from '../tokens/primitives/colors/colors.js'
|
|
14
14
|
import { accent } from '../tokens/theme/accent.js'
|
|
15
15
|
import { background } from '../tokens/theme/background.js'
|
|
16
|
-
import { codeSintax } from '../tokens/theme/code-sintax.js'
|
|
17
16
|
import { border } from '../tokens/theme/border.js'
|
|
17
|
+
import { codeSintax } from '../tokens/theme/code-sintax.js'
|
|
18
18
|
import { danger } from '../tokens/theme/feedback/danger.js'
|
|
19
19
|
import { info } from '../tokens/theme/feedback/info.js'
|
|
20
20
|
import { success } from '../tokens/theme/feedback/success.js'
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Measure-comment gate for the layout tokens — the check that keeps a `// 1620px`
|
|
3
|
+
* annotation honest against the `var(--container-*)` it annotates. The VALUE is the
|
|
4
|
+
* source of truth; the comment is a reader's convenience, and a comment that disagrees
|
|
5
|
+
* with it is worse than no comment at all.
|
|
6
|
+
*
|
|
7
|
+
* Nothing else sees this: the annotation is a JS comment, so it never reaches the
|
|
8
|
+
* compiled CSS the zero-unit gate reads, and no linter resolves a `var()` back to the
|
|
9
|
+
* rung it names. A value can therefore be changed — or reverted — under a comment that
|
|
10
|
+
* still describes the old one, with every gate green. Pure: node built-ins only.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const MEASURE_LINE = /'([\w-]+)':\s*'var\(--container-([\w]+)\)',?\s*\/\/\s*(\d+)px/
|
|
14
|
+
|
|
15
|
+
/** Every `'token': 'var(--container-X)', // Npx` line, as `{ token, rung, claimed, n }`. */
|
|
16
|
+
export const findMeasureComments = (sourceText) =>
|
|
17
|
+
sourceText.split('\n').flatMap((line, i) => {
|
|
18
|
+
const m = line.match(MEASURE_LINE)
|
|
19
|
+
return m ? [{ token: m[1], rung: m[2], claimed: Number(m[3]), n: i + 1 }] : []
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Throw when a measure comment disagrees with the container rung it annotates, or names
|
|
24
|
+
* a rung that does not exist. `container` is the rung table; `source` names the artifact.
|
|
25
|
+
*/
|
|
26
|
+
export const assertMeasureCommentsMatch = (sourceText, container, source = 'layouts.data.js') => {
|
|
27
|
+
const rows = findMeasureComments(sourceText)
|
|
28
|
+
const wrong = rows.flatMap(({ token, rung, claimed, n }) => {
|
|
29
|
+
const real = container[rung]
|
|
30
|
+
if (real === undefined) return [{ token, rung, claimed, n, real: null }]
|
|
31
|
+
return parseInt(real, 10) === claimed ? [] : [{ token, rung, claimed, n, real }]
|
|
32
|
+
})
|
|
33
|
+
if (wrong.length === 0) return
|
|
34
|
+
|
|
35
|
+
const detail = wrong
|
|
36
|
+
.map(({ token, rung, claimed, n, real }) =>
|
|
37
|
+
real === null
|
|
38
|
+
? ` ${source}:${n} ${token} → --container-${rung} is not a rung of the ladder`
|
|
39
|
+
: ` ${source}:${n} ${token} → --container-${rung} is ${real}, comment says ${claimed}px`
|
|
40
|
+
)
|
|
41
|
+
.join('\n')
|
|
42
|
+
throw new Error(
|
|
43
|
+
`build:tokens — ${wrong.length} measure comment(s) disagree with the token value.\n${detail}\n` +
|
|
44
|
+
'The value is the source of truth: fix the comment to match it, or change the rung if the ' +
|
|
45
|
+
'value is what is wrong. Rungs live in src/tokens/primitives/shape/container.js.'
|
|
46
|
+
)
|
|
47
|
+
}
|
package/src/tokens/README.md
CHANGED
|
@@ -117,6 +117,8 @@ src/
|
|
|
117
117
|
├── refs.js # tokenRef helper + isTokenRef guard + assertResolvedRefs
|
|
118
118
|
├── compile-primitives.js # flattens primitive trees into CSS vars
|
|
119
119
|
├── compile-theme.js # semantic light/dark compiler (exported as ./theme-colors)
|
|
120
|
+
├── zero-unit.mjs # build gate: a zero length carries no unit
|
|
121
|
+
├── measure-comment.mjs # build gate: a `// Npx` comment matches its rung
|
|
120
122
|
└── build-tokens.mjs # main entrypoint: emits the dist/v4 bundle
|
|
121
123
|
```
|
|
122
124
|
|
|
@@ -202,8 +204,14 @@ free. Giving it its own map would duplicate the spacing scale into layout and le
|
|
|
202
204
|
|
|
203
205
|
The group also ships `layoutsUtilities`, the container-system classes (`.layout-column`,
|
|
204
206
|
`.layout-boundary`, …) emitted as Tailwind v4 `@utility` blocks so they support variants
|
|
205
|
-
(`md:layout-column`).
|
|
206
|
-
|
|
207
|
+
(`md:layout-column`). Each entry is a rule body: a string value is a declaration, an object value is
|
|
208
|
+
a nested rule keyed by a literal selector (`'&:first-child'`).
|
|
209
|
+
|
|
210
|
+
A measure carries a `// 1620px` annotation for the reader, and **the token value is the source of
|
|
211
|
+
truth for it** — the comment is a convenience, never the decision. `measure-comment.mjs` resolves
|
|
212
|
+
every annotated `var(--container-*)` back to its rung and **fails the build** when the two disagree,
|
|
213
|
+
because nothing else can see this: the annotation is a JS comment, so it never reaches the compiled
|
|
214
|
+
CSS, and no linter resolves a `var()` to the value it names.
|
|
207
215
|
|
|
208
216
|
---
|
|
209
217
|
|
|
@@ -57,6 +57,7 @@ export const textsData: {
|
|
|
57
57
|
letterSpacing: string;
|
|
58
58
|
};
|
|
59
59
|
'text-heading-2xl': {
|
|
60
|
+
textWrapStyle: string;
|
|
60
61
|
fontSize: {
|
|
61
62
|
_: string;
|
|
62
63
|
sm: string;
|
|
@@ -64,8 +65,10 @@ export const textsData: {
|
|
|
64
65
|
};
|
|
65
66
|
lineHeight: number;
|
|
66
67
|
fontWeight: number;
|
|
68
|
+
letterSpacing: string;
|
|
67
69
|
};
|
|
68
70
|
'text-heading-xl': {
|
|
71
|
+
textWrapStyle: string;
|
|
69
72
|
fontSize: {
|
|
70
73
|
_: string;
|
|
71
74
|
sm: string;
|
|
@@ -73,16 +76,20 @@ export const textsData: {
|
|
|
73
76
|
};
|
|
74
77
|
lineHeight: number;
|
|
75
78
|
fontWeight: number;
|
|
79
|
+
letterSpacing: string;
|
|
76
80
|
};
|
|
77
81
|
'text-heading-lg': {
|
|
82
|
+
textWrapStyle: string;
|
|
78
83
|
fontSize: {
|
|
79
84
|
_: string;
|
|
80
85
|
md: string;
|
|
81
86
|
};
|
|
82
87
|
lineHeight: number;
|
|
83
88
|
fontWeight: number;
|
|
89
|
+
letterSpacing: string;
|
|
84
90
|
};
|
|
85
91
|
'text-heading-md': {
|
|
92
|
+
textWrapStyle: string;
|
|
86
93
|
fontSize: {
|
|
87
94
|
_: string;
|
|
88
95
|
sm: string;
|
|
@@ -90,8 +97,10 @@ export const textsData: {
|
|
|
90
97
|
};
|
|
91
98
|
lineHeight: number;
|
|
92
99
|
fontWeight: number;
|
|
100
|
+
letterSpacing: string;
|
|
93
101
|
};
|
|
94
102
|
'text-heading-sm': {
|
|
103
|
+
textWrapStyle: string;
|
|
95
104
|
fontSize: {
|
|
96
105
|
_: string;
|
|
97
106
|
sm: string;
|
|
@@ -99,31 +108,39 @@ export const textsData: {
|
|
|
99
108
|
};
|
|
100
109
|
lineHeight: number;
|
|
101
110
|
fontWeight: number;
|
|
111
|
+
letterSpacing: string;
|
|
102
112
|
};
|
|
103
113
|
'text-heading-xs': {
|
|
114
|
+
textWrapStyle: string;
|
|
104
115
|
fontSize: string;
|
|
105
116
|
lineHeight: number;
|
|
106
117
|
fontWeight: number;
|
|
118
|
+
letterSpacing: string;
|
|
107
119
|
};
|
|
108
120
|
'text-heading-xxs': {
|
|
121
|
+
textWrapStyle: string;
|
|
109
122
|
fontSize: string;
|
|
110
123
|
lineHeight: number;
|
|
111
124
|
fontWeight: number;
|
|
125
|
+
letterSpacing: string;
|
|
112
126
|
};
|
|
113
127
|
'text-label-lg': {
|
|
114
128
|
fontSize: string;
|
|
115
129
|
lineHeight: number;
|
|
116
130
|
fontWeight: number;
|
|
131
|
+
letterSpacing: string;
|
|
117
132
|
};
|
|
118
133
|
'text-label-md': {
|
|
119
134
|
fontSize: string;
|
|
120
135
|
lineHeight: number;
|
|
121
136
|
fontWeight: number;
|
|
137
|
+
letterSpacing: string;
|
|
122
138
|
};
|
|
123
139
|
'text-label-sm': {
|
|
124
140
|
fontSize: string;
|
|
125
141
|
lineHeight: number;
|
|
126
142
|
fontWeight: number;
|
|
143
|
+
letterSpacing: string;
|
|
127
144
|
};
|
|
128
145
|
'text-label-code-sm': {
|
|
129
146
|
fontFamily: string;
|
|
@@ -155,6 +172,7 @@ export const textsData: {
|
|
|
155
172
|
letterSpacing: string;
|
|
156
173
|
};
|
|
157
174
|
'text-body-lg': {
|
|
175
|
+
textWrapStyle: string;
|
|
158
176
|
fontSize: {
|
|
159
177
|
_: string;
|
|
160
178
|
md: string;
|
|
@@ -163,6 +181,7 @@ export const textsData: {
|
|
|
163
181
|
lineHeight: number;
|
|
164
182
|
};
|
|
165
183
|
'text-body-md': {
|
|
184
|
+
textWrapStyle: string;
|
|
166
185
|
fontSize: string;
|
|
167
186
|
fontWeight: number;
|
|
168
187
|
lineHeight: number;
|
|
@@ -173,16 +192,19 @@ export const textsData: {
|
|
|
173
192
|
lineHeight: number;
|
|
174
193
|
};
|
|
175
194
|
'text-body-sm': {
|
|
195
|
+
textWrapStyle: string;
|
|
176
196
|
fontSize: string;
|
|
177
197
|
fontWeight: number;
|
|
178
198
|
lineHeight: number;
|
|
179
199
|
};
|
|
180
200
|
'text-body-xs': {
|
|
201
|
+
textWrapStyle: string;
|
|
181
202
|
fontSize: string;
|
|
182
203
|
fontWeight: number;
|
|
183
204
|
lineHeight: number;
|
|
184
205
|
};
|
|
185
206
|
'text-body-xxs': {
|
|
207
|
+
textWrapStyle: string;
|
|
186
208
|
fontSize: string;
|
|
187
209
|
fontWeight: number;
|
|
188
210
|
lineHeight: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"texts.data.d.ts","sourceRoot":"","sources":["texts.data.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"texts.data.d.ts","sourceRoot":"","sources":["texts.data.js"],"names":[],"mappings":"AAkCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2OE,8FAA8F;;;;;;;;;;;;;;;;;;EAkB/F"}
|
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
* Optional `states` emits pseudo-class rules (e.g. `.text-link:hover`). Bundles
|
|
10
10
|
* with `fontSize: 'inherit'` are omitted from the Tailwind `fontSize` preset.
|
|
11
11
|
*
|
|
12
|
+
* `textWrapStyle` — the LONGHAND, never the `textWrap` shorthand. `text-wrap: pretty`
|
|
13
|
+
* is `text-wrap-mode: wrap` + `text-wrap-style: pretty`, so a typography utility
|
|
14
|
+
* written that way does not just choose how lines break: it decides THAT the text
|
|
15
|
+
* wraps, and it beats `truncate` / `whitespace-nowrap` on the same element (equal
|
|
16
|
+
* specificity, and this utility sorts later). Every `truncate text-body-sm` in the
|
|
17
|
+
* codebase therefore wrapped to two lines with an ellipsis that never appeared —
|
|
18
|
+
* measurably, table rows grew from 48px to 56px wherever a cell's text was longer
|
|
19
|
+
* than its column. The longhand keeps the balance/pretty intent and leaves wrapping
|
|
20
|
+
* to whoever owns the element.
|
|
21
|
+
*
|
|
12
22
|
* Mapping used during the port:
|
|
13
23
|
* old `large` (≤640) → `_`
|
|
14
24
|
* old `medium` (≤768) → `sm` (≥640)
|
|
@@ -82,61 +92,78 @@ export const textsData = {
|
|
|
82
92
|
letterSpacing: '-0.08em'
|
|
83
93
|
},
|
|
84
94
|
'text-heading-2xl': {
|
|
95
|
+
textWrapStyle: 'balance',
|
|
85
96
|
fontSize: { _: fontSize['3xl'], sm: fontSize['5xl'], md: fontSize['6xl'] },
|
|
86
97
|
lineHeight: leading.tight,
|
|
87
|
-
fontWeight: fontWeight.normal
|
|
98
|
+
fontWeight: fontWeight.normal,
|
|
99
|
+
letterSpacing: tracking.tighter
|
|
88
100
|
},
|
|
89
101
|
'text-heading-xl': {
|
|
102
|
+
textWrapStyle: 'balance',
|
|
90
103
|
fontSize: { _: fontSize.xl, sm: fontSize['3xl'], md: fontSize['4xl'] },
|
|
91
104
|
lineHeight: leading.tight,
|
|
92
|
-
fontWeight: fontWeight.normal
|
|
105
|
+
fontWeight: fontWeight.normal,
|
|
106
|
+
letterSpacing: tracking.tighter
|
|
93
107
|
},
|
|
94
108
|
'text-heading-lg': {
|
|
109
|
+
textWrapStyle: 'balance',
|
|
95
110
|
fontSize: { _: fontSize.lg, md: fontSize['3xl'] },
|
|
96
111
|
lineHeight: leading.tight,
|
|
97
|
-
fontWeight: fontWeight.normal
|
|
112
|
+
fontWeight: fontWeight.normal,
|
|
113
|
+
letterSpacing: tracking.tighter
|
|
98
114
|
},
|
|
99
115
|
'text-heading-md': {
|
|
116
|
+
textWrapStyle: 'balance',
|
|
100
117
|
fontSize: { _: fontSize.base, sm: fontSize.xl, md: fontSize['2xl'] },
|
|
101
118
|
lineHeight: leading.tight,
|
|
102
|
-
fontWeight: fontWeight.normal
|
|
119
|
+
fontWeight: fontWeight.normal,
|
|
120
|
+
letterSpacing: tracking.tighter
|
|
103
121
|
},
|
|
104
122
|
'text-heading-sm': {
|
|
123
|
+
textWrapStyle: 'balance',
|
|
105
124
|
fontSize: { _: fontSize.sm, sm: fontSize.base, md: fontSize.lg },
|
|
106
125
|
lineHeight: leading.snug,
|
|
107
|
-
fontWeight: fontWeight.normal
|
|
126
|
+
fontWeight: fontWeight.normal,
|
|
127
|
+
letterSpacing: tracking.tighter
|
|
108
128
|
},
|
|
109
129
|
'text-heading-xs': {
|
|
130
|
+
textWrapStyle: 'balance',
|
|
110
131
|
fontSize: fontSize.base,
|
|
111
132
|
lineHeight: leading.snug,
|
|
112
|
-
fontWeight: fontWeight.normal
|
|
133
|
+
fontWeight: fontWeight.normal,
|
|
134
|
+
letterSpacing: tracking.tighter
|
|
113
135
|
},
|
|
114
136
|
'text-heading-xxs': {
|
|
137
|
+
textWrapStyle: 'balance',
|
|
115
138
|
fontSize: fontSize.sm,
|
|
116
139
|
lineHeight: leading.snug,
|
|
117
|
-
fontWeight: fontWeight.normal
|
|
140
|
+
fontWeight: fontWeight.normal,
|
|
141
|
+
letterSpacing: tracking.tighter
|
|
118
142
|
},
|
|
119
143
|
'text-label-lg': {
|
|
120
144
|
fontSize: fontSize.base,
|
|
121
145
|
lineHeight: leading.normal,
|
|
122
|
-
fontWeight: fontWeight.normal
|
|
146
|
+
fontWeight: fontWeight.normal,
|
|
147
|
+
letterSpacing: tracking.tight
|
|
123
148
|
},
|
|
124
149
|
'text-label-md': {
|
|
125
150
|
fontSize: fontSize.sm,
|
|
126
151
|
lineHeight: leading.normal,
|
|
127
|
-
fontWeight: fontWeight.normal
|
|
152
|
+
fontWeight: fontWeight.normal,
|
|
153
|
+
letterSpacing: tracking.tight
|
|
128
154
|
},
|
|
129
155
|
'text-label-sm': {
|
|
130
156
|
fontSize: fontSize.xs,
|
|
131
157
|
lineHeight: leading.normal,
|
|
132
|
-
fontWeight: fontWeight.normal
|
|
158
|
+
fontWeight: fontWeight.normal,
|
|
159
|
+
letterSpacing: tracking.tight
|
|
133
160
|
},
|
|
134
161
|
'text-label-code-sm': {
|
|
135
162
|
fontFamily: fontFamily.code,
|
|
136
163
|
fontSize: fontSize.xs,
|
|
137
164
|
lineHeight: leading.none,
|
|
138
165
|
fontWeight: fontWeight.normal,
|
|
139
|
-
letterSpacing: tracking.
|
|
166
|
+
letterSpacing: tracking.wide
|
|
140
167
|
},
|
|
141
168
|
'text-body-code-sm': {
|
|
142
169
|
textWrapStyle: 'pretty',
|
|
@@ -144,28 +171,30 @@ export const textsData = {
|
|
|
144
171
|
fontSize: fontSize.xs,
|
|
145
172
|
lineHeight: leading.relaxed,
|
|
146
173
|
fontWeight: fontWeight.normal,
|
|
147
|
-
letterSpacing: tracking.
|
|
174
|
+
letterSpacing: tracking.wide
|
|
148
175
|
},
|
|
149
176
|
'text-label-code-md': {
|
|
150
177
|
fontFamily: fontFamily.code,
|
|
151
178
|
fontSize: fontSize.sm,
|
|
152
179
|
lineHeight: leading.none,
|
|
153
180
|
fontWeight: fontWeight.normal,
|
|
154
|
-
letterSpacing: tracking.
|
|
181
|
+
letterSpacing: tracking.wide
|
|
155
182
|
},
|
|
156
183
|
'text-label-code-lg': {
|
|
157
184
|
fontFamily: fontFamily.code,
|
|
158
185
|
fontSize: fontSize.base,
|
|
159
186
|
lineHeight: leading.none,
|
|
160
187
|
fontWeight: fontWeight.normal,
|
|
161
|
-
letterSpacing: tracking.
|
|
188
|
+
letterSpacing: tracking.wide
|
|
162
189
|
},
|
|
163
190
|
'text-body-lg': {
|
|
191
|
+
textWrapStyle: 'pretty',
|
|
164
192
|
fontSize: { _: fontSize.base, md: fontSize.lg },
|
|
165
193
|
fontWeight: fontWeight.normal,
|
|
166
194
|
lineHeight: leading.snug
|
|
167
195
|
},
|
|
168
196
|
'text-body-md': {
|
|
197
|
+
textWrapStyle: 'pretty',
|
|
169
198
|
fontSize: fontSize.base,
|
|
170
199
|
fontWeight: fontWeight.normal,
|
|
171
200
|
lineHeight: leading.snug
|
|
@@ -176,16 +205,19 @@ export const textsData = {
|
|
|
176
205
|
lineHeight: leading.relaxed
|
|
177
206
|
},
|
|
178
207
|
'text-body-sm': {
|
|
208
|
+
textWrapStyle: 'pretty',
|
|
179
209
|
fontSize: fontSize.sm,
|
|
180
210
|
fontWeight: fontWeight.normal,
|
|
181
211
|
lineHeight: leading.snug
|
|
182
212
|
},
|
|
183
213
|
'text-body-xs': {
|
|
214
|
+
textWrapStyle: 'pretty',
|
|
184
215
|
fontSize: fontSize.xs,
|
|
185
216
|
fontWeight: fontWeight.normal,
|
|
186
217
|
lineHeight: leading.snug
|
|
187
218
|
},
|
|
188
219
|
'text-body-xxs': {
|
|
220
|
+
textWrapStyle: 'pretty',
|
|
189
221
|
fontSize: fontSize.xs,
|
|
190
222
|
fontWeight: fontWeight.normal,
|
|
191
223
|
lineHeight: leading.normal
|