uibee 2.17.4 → 2.17.5
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Components } from 'react-markdown';
|
|
2
|
-
export default function MarkdownRender({ MDstr, components, className }: {
|
|
2
|
+
export default function MarkdownRender({ MDstr, components, className, size }: {
|
|
3
3
|
MDstr: string;
|
|
4
4
|
components?: Components;
|
|
5
5
|
className?: string;
|
|
6
|
+
size?: 'sm' | 'base' | 'lg' | 'xl';
|
|
6
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,6 +20,7 @@ function makeDefaultComponents() {
|
|
|
20
20
|
},
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
export default function MarkdownRender({ MDstr, components, className }) {
|
|
24
|
-
|
|
23
|
+
export default function MarkdownRender({ MDstr, components, className, size }) {
|
|
24
|
+
const sizeClass = size === 'sm' ? 'prose-sm' : size === 'lg' ? 'prose-lg' : size === 'xl' ? 'prose-xl' : '';
|
|
25
|
+
return (_jsx("div", { className: className ?? `prose ${sizeClass} prose-custom max-w-none`, children: _jsx(Markdown, { components: { ...makeDefaultComponents(), ...components }, remarkPlugins: [remarkGfm], rehypePlugins: [rehypeHighlight], children: MDstr.replace(/\\n/g, '\n') }) }));
|
|
25
26
|
}
|
package/dist/src/globals.css
CHANGED
|
@@ -847,6 +847,205 @@
|
|
|
847
847
|
font-size: 1.2rem;
|
|
848
848
|
font-weight: 500;
|
|
849
849
|
}
|
|
850
|
+
.prose-lg {
|
|
851
|
+
font-size: 1.125rem;
|
|
852
|
+
line-height: 1.7777778;
|
|
853
|
+
:where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
854
|
+
margin-top: 1.3333333em;
|
|
855
|
+
margin-bottom: 1.3333333em;
|
|
856
|
+
}
|
|
857
|
+
:where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
858
|
+
font-size: 1.2222222em;
|
|
859
|
+
line-height: 1.4545455;
|
|
860
|
+
margin-top: 1.0909091em;
|
|
861
|
+
margin-bottom: 1.0909091em;
|
|
862
|
+
}
|
|
863
|
+
:where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
864
|
+
margin-top: 1.6666667em;
|
|
865
|
+
margin-bottom: 1.6666667em;
|
|
866
|
+
padding-inline-start: 1em;
|
|
867
|
+
}
|
|
868
|
+
:where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
869
|
+
font-size: 2.6666667em;
|
|
870
|
+
margin-top: 0;
|
|
871
|
+
margin-bottom: 0.8333333em;
|
|
872
|
+
line-height: 1;
|
|
873
|
+
}
|
|
874
|
+
:where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
875
|
+
font-size: 1.6666667em;
|
|
876
|
+
margin-top: 1.8666667em;
|
|
877
|
+
margin-bottom: 1.0666667em;
|
|
878
|
+
line-height: 1.3333333;
|
|
879
|
+
}
|
|
880
|
+
:where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
881
|
+
font-size: 1.3333333em;
|
|
882
|
+
margin-top: 1.6666667em;
|
|
883
|
+
margin-bottom: 0.6666667em;
|
|
884
|
+
line-height: 1.5;
|
|
885
|
+
}
|
|
886
|
+
:where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
887
|
+
margin-top: 1.7777778em;
|
|
888
|
+
margin-bottom: 0.4444444em;
|
|
889
|
+
line-height: 1.5555556;
|
|
890
|
+
}
|
|
891
|
+
:where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
892
|
+
margin-top: 1.7777778em;
|
|
893
|
+
margin-bottom: 1.7777778em;
|
|
894
|
+
}
|
|
895
|
+
:where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
896
|
+
margin-top: 1.7777778em;
|
|
897
|
+
margin-bottom: 1.7777778em;
|
|
898
|
+
}
|
|
899
|
+
:where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
900
|
+
margin-top: 0;
|
|
901
|
+
margin-bottom: 0;
|
|
902
|
+
}
|
|
903
|
+
:where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
904
|
+
margin-top: 1.7777778em;
|
|
905
|
+
margin-bottom: 1.7777778em;
|
|
906
|
+
}
|
|
907
|
+
:where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
908
|
+
font-size: 0.8888889em;
|
|
909
|
+
border-radius: 0.3125rem;
|
|
910
|
+
padding-top: 0.2222222em;
|
|
911
|
+
padding-inline-end: 0.4444444em;
|
|
912
|
+
padding-bottom: 0.2222222em;
|
|
913
|
+
padding-inline-start: 0.4444444em;
|
|
914
|
+
}
|
|
915
|
+
:where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
916
|
+
font-size: 0.8888889em;
|
|
917
|
+
}
|
|
918
|
+
:where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
919
|
+
font-size: 0.8666667em;
|
|
920
|
+
}
|
|
921
|
+
:where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
922
|
+
font-size: 0.875em;
|
|
923
|
+
}
|
|
924
|
+
:where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
925
|
+
font-size: 0.8888889em;
|
|
926
|
+
line-height: 1.75;
|
|
927
|
+
margin-top: 2em;
|
|
928
|
+
margin-bottom: 2em;
|
|
929
|
+
border-radius: 0.375rem;
|
|
930
|
+
padding-top: 1em;
|
|
931
|
+
padding-inline-end: 1.5em;
|
|
932
|
+
padding-bottom: 1em;
|
|
933
|
+
padding-inline-start: 1.5em;
|
|
934
|
+
}
|
|
935
|
+
:where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
936
|
+
margin-top: 1.3333333em;
|
|
937
|
+
margin-bottom: 1.3333333em;
|
|
938
|
+
padding-inline-start: 1.5555556em;
|
|
939
|
+
}
|
|
940
|
+
:where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
941
|
+
margin-top: 1.3333333em;
|
|
942
|
+
margin-bottom: 1.3333333em;
|
|
943
|
+
padding-inline-start: 1.5555556em;
|
|
944
|
+
}
|
|
945
|
+
:where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
946
|
+
margin-top: 0.6666667em;
|
|
947
|
+
margin-bottom: 0.6666667em;
|
|
948
|
+
}
|
|
949
|
+
:where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
950
|
+
padding-inline-start: 0.4444444em;
|
|
951
|
+
}
|
|
952
|
+
:where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
953
|
+
padding-inline-start: 0.4444444em;
|
|
954
|
+
}
|
|
955
|
+
:where(.prose-lg > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
956
|
+
margin-top: 0.8888889em;
|
|
957
|
+
margin-bottom: 0.8888889em;
|
|
958
|
+
}
|
|
959
|
+
:where(.prose-lg > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
960
|
+
margin-top: 1.3333333em;
|
|
961
|
+
}
|
|
962
|
+
:where(.prose-lg > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
963
|
+
margin-bottom: 1.3333333em;
|
|
964
|
+
}
|
|
965
|
+
:where(.prose-lg > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
966
|
+
margin-top: 1.3333333em;
|
|
967
|
+
}
|
|
968
|
+
:where(.prose-lg > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
969
|
+
margin-bottom: 1.3333333em;
|
|
970
|
+
}
|
|
971
|
+
:where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
972
|
+
margin-top: 0.8888889em;
|
|
973
|
+
margin-bottom: 0.8888889em;
|
|
974
|
+
}
|
|
975
|
+
:where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
976
|
+
margin-top: 1.3333333em;
|
|
977
|
+
margin-bottom: 1.3333333em;
|
|
978
|
+
}
|
|
979
|
+
:where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
980
|
+
margin-top: 1.3333333em;
|
|
981
|
+
}
|
|
982
|
+
:where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
983
|
+
margin-top: 0.6666667em;
|
|
984
|
+
padding-inline-start: 1.5555556em;
|
|
985
|
+
}
|
|
986
|
+
:where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
987
|
+
margin-top: 3.1111111em;
|
|
988
|
+
margin-bottom: 3.1111111em;
|
|
989
|
+
}
|
|
990
|
+
:where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
991
|
+
margin-top: 0;
|
|
992
|
+
}
|
|
993
|
+
:where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
994
|
+
margin-top: 0;
|
|
995
|
+
}
|
|
996
|
+
:where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
997
|
+
margin-top: 0;
|
|
998
|
+
}
|
|
999
|
+
:where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1000
|
+
margin-top: 0;
|
|
1001
|
+
}
|
|
1002
|
+
:where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1003
|
+
font-size: 0.8888889em;
|
|
1004
|
+
line-height: 1.5;
|
|
1005
|
+
}
|
|
1006
|
+
:where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1007
|
+
padding-inline-end: 0.75em;
|
|
1008
|
+
padding-bottom: 0.75em;
|
|
1009
|
+
padding-inline-start: 0.75em;
|
|
1010
|
+
}
|
|
1011
|
+
:where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1012
|
+
padding-inline-start: 0;
|
|
1013
|
+
}
|
|
1014
|
+
:where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1015
|
+
padding-inline-end: 0;
|
|
1016
|
+
}
|
|
1017
|
+
:where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1018
|
+
padding-top: 0.75em;
|
|
1019
|
+
padding-inline-end: 0.75em;
|
|
1020
|
+
padding-bottom: 0.75em;
|
|
1021
|
+
padding-inline-start: 0.75em;
|
|
1022
|
+
}
|
|
1023
|
+
:where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1024
|
+
padding-inline-start: 0;
|
|
1025
|
+
}
|
|
1026
|
+
:where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1027
|
+
padding-inline-end: 0;
|
|
1028
|
+
}
|
|
1029
|
+
:where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1030
|
+
margin-top: 1.7777778em;
|
|
1031
|
+
margin-bottom: 1.7777778em;
|
|
1032
|
+
}
|
|
1033
|
+
:where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1034
|
+
margin-top: 0;
|
|
1035
|
+
margin-bottom: 0;
|
|
1036
|
+
}
|
|
1037
|
+
:where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1038
|
+
font-size: 0.8888889em;
|
|
1039
|
+
line-height: 1.5;
|
|
1040
|
+
margin-top: 1em;
|
|
1041
|
+
}
|
|
1042
|
+
:where(.prose-lg > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1043
|
+
margin-top: 0;
|
|
1044
|
+
}
|
|
1045
|
+
:where(.prose-lg > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1046
|
+
margin-bottom: 0;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
850
1049
|
.prose-sm {
|
|
851
1050
|
font-size: 0.875rem;
|
|
852
1051
|
line-height: 1.7142857;
|
|
@@ -1046,6 +1245,238 @@
|
|
|
1046
1245
|
margin-bottom: 0;
|
|
1047
1246
|
}
|
|
1048
1247
|
}
|
|
1248
|
+
.prose-xl {
|
|
1249
|
+
font-size: 1.25rem;
|
|
1250
|
+
line-height: 1.8;
|
|
1251
|
+
:where(p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1252
|
+
margin-top: 1.2em;
|
|
1253
|
+
margin-bottom: 1.2em;
|
|
1254
|
+
}
|
|
1255
|
+
:where([class~="lead"]):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1256
|
+
font-size: 1.2em;
|
|
1257
|
+
line-height: 1.5;
|
|
1258
|
+
margin-top: 1em;
|
|
1259
|
+
margin-bottom: 1em;
|
|
1260
|
+
}
|
|
1261
|
+
:where(blockquote):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1262
|
+
margin-top: 1.6em;
|
|
1263
|
+
margin-bottom: 1.6em;
|
|
1264
|
+
padding-inline-start: 1.0666667em;
|
|
1265
|
+
}
|
|
1266
|
+
:where(h1):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1267
|
+
font-size: 2.8em;
|
|
1268
|
+
margin-top: 0;
|
|
1269
|
+
margin-bottom: 0.8571429em;
|
|
1270
|
+
line-height: 1;
|
|
1271
|
+
}
|
|
1272
|
+
:where(h2):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1273
|
+
font-size: 1.8em;
|
|
1274
|
+
margin-top: 1.5555556em;
|
|
1275
|
+
margin-bottom: 0.8888889em;
|
|
1276
|
+
line-height: 1.1111111;
|
|
1277
|
+
}
|
|
1278
|
+
:where(h3):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1279
|
+
font-size: 1.5em;
|
|
1280
|
+
margin-top: 1.6em;
|
|
1281
|
+
margin-bottom: 0.6666667em;
|
|
1282
|
+
line-height: 1.3333333;
|
|
1283
|
+
}
|
|
1284
|
+
:where(h4):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1285
|
+
margin-top: 1.8em;
|
|
1286
|
+
margin-bottom: 0.6em;
|
|
1287
|
+
line-height: 1.6;
|
|
1288
|
+
}
|
|
1289
|
+
:where(img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1290
|
+
margin-top: 2em;
|
|
1291
|
+
margin-bottom: 2em;
|
|
1292
|
+
}
|
|
1293
|
+
:where(picture):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1294
|
+
margin-top: 2em;
|
|
1295
|
+
margin-bottom: 2em;
|
|
1296
|
+
}
|
|
1297
|
+
:where(picture > img):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1298
|
+
margin-top: 0;
|
|
1299
|
+
margin-bottom: 0;
|
|
1300
|
+
}
|
|
1301
|
+
:where(video):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1302
|
+
margin-top: 2em;
|
|
1303
|
+
margin-bottom: 2em;
|
|
1304
|
+
}
|
|
1305
|
+
:where(kbd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1306
|
+
font-size: 0.9em;
|
|
1307
|
+
border-radius: 0.3125rem;
|
|
1308
|
+
padding-top: 0.25em;
|
|
1309
|
+
padding-inline-end: 0.4em;
|
|
1310
|
+
padding-bottom: 0.25em;
|
|
1311
|
+
padding-inline-start: 0.4em;
|
|
1312
|
+
}
|
|
1313
|
+
:where(code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1314
|
+
font-size: 0.9em;
|
|
1315
|
+
}
|
|
1316
|
+
:where(h2 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1317
|
+
font-size: 0.8611111em;
|
|
1318
|
+
}
|
|
1319
|
+
:where(h3 code):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1320
|
+
font-size: 0.9em;
|
|
1321
|
+
}
|
|
1322
|
+
:where(pre):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1323
|
+
font-size: 0.9em;
|
|
1324
|
+
line-height: 1.7777778;
|
|
1325
|
+
margin-top: 2em;
|
|
1326
|
+
margin-bottom: 2em;
|
|
1327
|
+
border-radius: 0.5rem;
|
|
1328
|
+
padding-top: 1.1111111em;
|
|
1329
|
+
padding-inline-end: 1.3333333em;
|
|
1330
|
+
padding-bottom: 1.1111111em;
|
|
1331
|
+
padding-inline-start: 1.3333333em;
|
|
1332
|
+
}
|
|
1333
|
+
:where(ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1334
|
+
margin-top: 1.2em;
|
|
1335
|
+
margin-bottom: 1.2em;
|
|
1336
|
+
padding-inline-start: 1.6em;
|
|
1337
|
+
}
|
|
1338
|
+
:where(ul):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1339
|
+
margin-top: 1.2em;
|
|
1340
|
+
margin-bottom: 1.2em;
|
|
1341
|
+
padding-inline-start: 1.6em;
|
|
1342
|
+
}
|
|
1343
|
+
:where(li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1344
|
+
margin-top: 0.6em;
|
|
1345
|
+
margin-bottom: 0.6em;
|
|
1346
|
+
}
|
|
1347
|
+
:where(ol > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1348
|
+
padding-inline-start: 0.4em;
|
|
1349
|
+
}
|
|
1350
|
+
:where(ul > li):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1351
|
+
padding-inline-start: 0.4em;
|
|
1352
|
+
}
|
|
1353
|
+
:where(.prose-xl > ul > li p):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1354
|
+
margin-top: 0.8em;
|
|
1355
|
+
margin-bottom: 0.8em;
|
|
1356
|
+
}
|
|
1357
|
+
:where(.prose-xl > ul > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1358
|
+
margin-top: 1.2em;
|
|
1359
|
+
}
|
|
1360
|
+
:where(.prose-xl > ul > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1361
|
+
margin-bottom: 1.2em;
|
|
1362
|
+
}
|
|
1363
|
+
:where(.prose-xl > ol > li > p:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1364
|
+
margin-top: 1.2em;
|
|
1365
|
+
}
|
|
1366
|
+
:where(.prose-xl > ol > li > p:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1367
|
+
margin-bottom: 1.2em;
|
|
1368
|
+
}
|
|
1369
|
+
:where(ul ul, ul ol, ol ul, ol ol):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1370
|
+
margin-top: 0.8em;
|
|
1371
|
+
margin-bottom: 0.8em;
|
|
1372
|
+
}
|
|
1373
|
+
:where(dl):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1374
|
+
margin-top: 1.2em;
|
|
1375
|
+
margin-bottom: 1.2em;
|
|
1376
|
+
}
|
|
1377
|
+
:where(dt):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1378
|
+
margin-top: 1.2em;
|
|
1379
|
+
}
|
|
1380
|
+
:where(dd):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1381
|
+
margin-top: 0.6em;
|
|
1382
|
+
padding-inline-start: 1.6em;
|
|
1383
|
+
}
|
|
1384
|
+
:where(hr):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1385
|
+
margin-top: 2.8em;
|
|
1386
|
+
margin-bottom: 2.8em;
|
|
1387
|
+
}
|
|
1388
|
+
:where(hr + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1389
|
+
margin-top: 0;
|
|
1390
|
+
}
|
|
1391
|
+
:where(h2 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1392
|
+
margin-top: 0;
|
|
1393
|
+
}
|
|
1394
|
+
:where(h3 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1395
|
+
margin-top: 0;
|
|
1396
|
+
}
|
|
1397
|
+
:where(h4 + *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1398
|
+
margin-top: 0;
|
|
1399
|
+
}
|
|
1400
|
+
:where(table):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1401
|
+
font-size: 0.9em;
|
|
1402
|
+
line-height: 1.5555556;
|
|
1403
|
+
}
|
|
1404
|
+
:where(thead th):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1405
|
+
padding-inline-end: 0.6666667em;
|
|
1406
|
+
padding-bottom: 0.8888889em;
|
|
1407
|
+
padding-inline-start: 0.6666667em;
|
|
1408
|
+
}
|
|
1409
|
+
:where(thead th:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1410
|
+
padding-inline-start: 0;
|
|
1411
|
+
}
|
|
1412
|
+
:where(thead th:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1413
|
+
padding-inline-end: 0;
|
|
1414
|
+
}
|
|
1415
|
+
:where(tbody td, tfoot td):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1416
|
+
padding-top: 0.8888889em;
|
|
1417
|
+
padding-inline-end: 0.6666667em;
|
|
1418
|
+
padding-bottom: 0.8888889em;
|
|
1419
|
+
padding-inline-start: 0.6666667em;
|
|
1420
|
+
}
|
|
1421
|
+
:where(tbody td:first-child, tfoot td:first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1422
|
+
padding-inline-start: 0;
|
|
1423
|
+
}
|
|
1424
|
+
:where(tbody td:last-child, tfoot td:last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1425
|
+
padding-inline-end: 0;
|
|
1426
|
+
}
|
|
1427
|
+
:where(figure):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1428
|
+
margin-top: 2em;
|
|
1429
|
+
margin-bottom: 2em;
|
|
1430
|
+
}
|
|
1431
|
+
:where(figure > *):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1432
|
+
margin-top: 0;
|
|
1433
|
+
margin-bottom: 0;
|
|
1434
|
+
}
|
|
1435
|
+
:where(figcaption):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1436
|
+
font-size: 0.9em;
|
|
1437
|
+
line-height: 1.5555556;
|
|
1438
|
+
margin-top: 1em;
|
|
1439
|
+
}
|
|
1440
|
+
:where(.prose-xl > :first-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1441
|
+
margin-top: 0;
|
|
1442
|
+
}
|
|
1443
|
+
:where(.prose-xl > :last-child):not(:where([class~="not-prose"],[class~="not-prose"] *)) {
|
|
1444
|
+
margin-bottom: 0;
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
.prose-custom {
|
|
1448
|
+
line-height: 24px;
|
|
1449
|
+
--tw-prose-body: var(--color-login-text);
|
|
1450
|
+
--tw-prose-headings: var(--color-login-text);
|
|
1451
|
+
--tw-prose-lead: var(--color-login-300);
|
|
1452
|
+
--tw-prose-links: var(--color-login);
|
|
1453
|
+
--tw-prose-bold: #fff;
|
|
1454
|
+
--tw-prose-counters: var(--color-login);
|
|
1455
|
+
--tw-prose-bullets: var(--color-login);
|
|
1456
|
+
--tw-prose-hr: var(--color-login-300);
|
|
1457
|
+
--tw-prose-quotes: var(--color-login-text);
|
|
1458
|
+
--tw-prose-quote-borders: var(--color-login);
|
|
1459
|
+
--tw-prose-captions: var(--color-login-300);
|
|
1460
|
+
--tw-prose-code: var(--color-login-text);
|
|
1461
|
+
--tw-prose-pre-code: var(--color-login-text);
|
|
1462
|
+
--tw-prose-pre-bg: var(--color-login-900);
|
|
1463
|
+
--tw-prose-th-borders: var(--color-login-500);
|
|
1464
|
+
--tw-prose-td-borders: var(--color-login-500);
|
|
1465
|
+
& p {
|
|
1466
|
+
margin-top: 0.25rem;
|
|
1467
|
+
margin-bottom: 0.75rem;
|
|
1468
|
+
}
|
|
1469
|
+
& li {
|
|
1470
|
+
margin-top: 0;
|
|
1471
|
+
margin-bottom: 0;
|
|
1472
|
+
}
|
|
1473
|
+
& ul:has(> li > span[data-task-checkbox]) {
|
|
1474
|
+
padding-left: 0;
|
|
1475
|
+
}
|
|
1476
|
+
& li:has(> span[data-task-checkbox]) {
|
|
1477
|
+
list-style: none;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1049
1480
|
.-mt-0\.5 {
|
|
1050
1481
|
margin-top: calc(var(--spacing) * -0.5);
|
|
1051
1482
|
}
|
|
@@ -1976,30 +2407,6 @@
|
|
|
1976
2407
|
.pb-4 {
|
|
1977
2408
|
padding-bottom: calc(var(--spacing) * 4);
|
|
1978
2409
|
}
|
|
1979
|
-
.prose-custom {
|
|
1980
|
-
--tw-prose-body: var(--color-login-text);
|
|
1981
|
-
--tw-prose-headings: var(--color-login-text);
|
|
1982
|
-
--tw-prose-lead: var(--color-login-300);
|
|
1983
|
-
--tw-prose-links: var(--color-login);
|
|
1984
|
-
--tw-prose-bold: var(--color-login-text);
|
|
1985
|
-
--tw-prose-counters: var(--color-login);
|
|
1986
|
-
--tw-prose-bullets: var(--color-login);
|
|
1987
|
-
--tw-prose-hr: var(--color-login-300);
|
|
1988
|
-
--tw-prose-quotes: var(--color-login-text);
|
|
1989
|
-
--tw-prose-quote-borders: var(--color-login);
|
|
1990
|
-
--tw-prose-captions: var(--color-login-300);
|
|
1991
|
-
--tw-prose-code: var(--color-login-text);
|
|
1992
|
-
--tw-prose-pre-code: var(--color-login-text);
|
|
1993
|
-
--tw-prose-pre-bg: var(--color-login-900);
|
|
1994
|
-
--tw-prose-th-borders: var(--color-login-500);
|
|
1995
|
-
--tw-prose-td-borders: var(--color-login-500);
|
|
1996
|
-
& ul:has(> li > span[data-task-checkbox]) {
|
|
1997
|
-
padding-left: 0;
|
|
1998
|
-
}
|
|
1999
|
-
& li:has(> span[data-task-checkbox]) {
|
|
2000
|
-
list-style: none;
|
|
2001
|
-
}
|
|
2002
|
-
}
|
|
2003
2410
|
.pl-3 {
|
|
2004
2411
|
padding-left: calc(var(--spacing) * 3);
|
|
2005
2412
|
}
|
package/package.json
CHANGED
|
@@ -44,13 +44,15 @@ function makeDefaultComponents(): Components {
|
|
|
44
44
|
},
|
|
45
45
|
}}
|
|
46
46
|
|
|
47
|
-
export default function MarkdownRender({ MDstr, components, className }: {
|
|
47
|
+
export default function MarkdownRender({ MDstr, components, className, size }: {
|
|
48
48
|
MDstr: string
|
|
49
49
|
components?: Components
|
|
50
50
|
className?: string
|
|
51
|
+
size?: 'sm' | 'base' | 'lg' | 'xl'
|
|
51
52
|
}) {
|
|
53
|
+
const sizeClass = size === 'sm' ? 'prose-sm' : size === 'lg' ? 'prose-lg' : size === 'xl' ? 'prose-xl' : ''
|
|
52
54
|
return (
|
|
53
|
-
<div className={className ??
|
|
55
|
+
<div className={className ?? `prose ${sizeClass} prose-custom max-w-none`}>
|
|
54
56
|
<Markdown
|
|
55
57
|
components={{ ...makeDefaultComponents(), ...components }}
|
|
56
58
|
remarkPlugins={[remarkGfm]}
|
package/src/globals.css
CHANGED
|
@@ -100,11 +100,12 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
@utility prose-custom {
|
|
103
|
+
line-height: 24px;
|
|
103
104
|
--tw-prose-body: var(--color-login-text);
|
|
104
105
|
--tw-prose-headings: var(--color-login-text);
|
|
105
106
|
--tw-prose-lead: var(--color-login-300);
|
|
106
107
|
--tw-prose-links: var(--color-login);
|
|
107
|
-
--tw-prose-bold:
|
|
108
|
+
--tw-prose-bold: #fff;
|
|
108
109
|
--tw-prose-counters: var(--color-login);
|
|
109
110
|
--tw-prose-bullets: var(--color-login);
|
|
110
111
|
--tw-prose-hr: var(--color-login-300);
|
|
@@ -117,6 +118,16 @@
|
|
|
117
118
|
--tw-prose-th-borders: var(--color-login-500);
|
|
118
119
|
--tw-prose-td-borders: var(--color-login-500);
|
|
119
120
|
|
|
121
|
+
& p {
|
|
122
|
+
margin-top: 0.25rem;
|
|
123
|
+
margin-bottom: 0.75rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& li {
|
|
127
|
+
margin-top: 0;
|
|
128
|
+
margin-bottom: 0;
|
|
129
|
+
}
|
|
130
|
+
|
|
120
131
|
& ul:has(> li > span[data-task-checkbox]) {
|
|
121
132
|
padding-left: 0;
|
|
122
133
|
}
|