@common-origin/design-system 2.17.0 → 2.19.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/client.esm.js +967 -606
- package/dist/client.esm.js.map +1 -1
- package/dist/client.js +967 -606
- package/dist/client.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.d.ts +7 -2
- package/dist/components/atoms/Chip/shared/types.d.ts +3 -1
- package/dist/components/atoms/Chip/shared/utils.d.ts +2 -3
- package/dist/components/atoms/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/atoms/Tag/Tag.d.ts +4 -1
- package/dist/data.esm.js +271 -16
- package/dist/data.esm.js.map +1 -1
- package/dist/data.js +271 -16
- package/dist/data.js.map +1 -1
- package/dist/lib/cssTokens.d.ts +14 -0
- package/dist/lib/cssVariables.d.ts +15 -0
- package/dist/lib/styleUtils.d.ts +23 -0
- package/dist/lib/tokenAliases.d.ts +13 -0
- package/dist/styles/tokens.d.ts +3174 -0
- package/dist/styles/tokens.json +267 -14
- package/dist/tokens/index.esm.js +271 -16
- package/dist/tokens/index.esm.js.map +1 -1
- package/dist/tokens/index.js +271 -16
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/styles/tokens.d.ts +3174 -0
- package/dist/tokens/types/tokens.d.ts +3 -1196
- package/dist/tokens.css +720 -432
- package/dist/types/tokens.d.ts +3 -1196
- package/package.json +4 -2
package/dist/data.js
CHANGED
|
@@ -65,6 +65,42 @@ var base = {
|
|
|
65
65
|
"95": "0.95",
|
|
66
66
|
"100": "1"
|
|
67
67
|
},
|
|
68
|
+
dimension: {
|
|
69
|
+
"0": "0",
|
|
70
|
+
"1": "0.25rem",
|
|
71
|
+
"2": "0.5rem",
|
|
72
|
+
"3": "0.75rem",
|
|
73
|
+
"4": "1rem",
|
|
74
|
+
"5": "1.25rem",
|
|
75
|
+
"6": "1.5rem",
|
|
76
|
+
"7": "1.75rem",
|
|
77
|
+
"8": "2rem",
|
|
78
|
+
"9": "2.25rem",
|
|
79
|
+
"10": "2.5rem",
|
|
80
|
+
"11": "2.75rem",
|
|
81
|
+
"12": "3rem",
|
|
82
|
+
"14": "3.5rem",
|
|
83
|
+
"15": "3.75rem",
|
|
84
|
+
"16": "4rem",
|
|
85
|
+
"18": "4.5rem",
|
|
86
|
+
"20": "5rem",
|
|
87
|
+
"24": "6rem",
|
|
88
|
+
"28": "7rem",
|
|
89
|
+
"30": "7.5rem",
|
|
90
|
+
"32": "8rem",
|
|
91
|
+
"40": "10rem",
|
|
92
|
+
"45": "11.25rem",
|
|
93
|
+
"48": "12rem",
|
|
94
|
+
"50": "12.5rem",
|
|
95
|
+
"56": "14rem",
|
|
96
|
+
"64": "16rem",
|
|
97
|
+
"75": "18.75rem",
|
|
98
|
+
"90": "22.5rem",
|
|
99
|
+
"100": "25rem",
|
|
100
|
+
"140": "35rem",
|
|
101
|
+
"180": "45rem",
|
|
102
|
+
"192": "48rem"
|
|
103
|
+
},
|
|
68
104
|
size: {
|
|
69
105
|
"0": "0",
|
|
70
106
|
"1": "0.25rem",
|
|
@@ -109,6 +145,34 @@ var base = {
|
|
|
109
145
|
},
|
|
110
146
|
color: {
|
|
111
147
|
transparent: "transparent",
|
|
148
|
+
gray: {
|
|
149
|
+
"100": "#fcfcfc",
|
|
150
|
+
"200": "#f9f9f9",
|
|
151
|
+
"300": "#f2f2f2",
|
|
152
|
+
"400": "#ebebeb",
|
|
153
|
+
"500": "#e4e4e4",
|
|
154
|
+
"600": "#dcdcdc",
|
|
155
|
+
"700": "#d1d1d1",
|
|
156
|
+
"800": "#909090",
|
|
157
|
+
"900": "#848484",
|
|
158
|
+
"1000": "#797979",
|
|
159
|
+
"1100": "#636363",
|
|
160
|
+
"1200": "#222222"
|
|
161
|
+
},
|
|
162
|
+
"gray-alpha": {
|
|
163
|
+
"100": "rgba(34, 34, 34, 0.014)",
|
|
164
|
+
"200": "rgba(34, 34, 34, 0.027)",
|
|
165
|
+
"300": "rgba(34, 34, 34, 0.059)",
|
|
166
|
+
"400": "rgba(34, 34, 34, 0.09)",
|
|
167
|
+
"500": "rgba(34, 34, 34, 0.122)",
|
|
168
|
+
"600": "rgba(34, 34, 34, 0.158)",
|
|
169
|
+
"700": "rgba(34, 34, 34, 0.208)",
|
|
170
|
+
"800": "rgba(34, 34, 34, 0.502)",
|
|
171
|
+
"900": "rgba(34, 34, 34, 0.557)",
|
|
172
|
+
"1000": "rgba(34, 34, 34, 0.606)",
|
|
173
|
+
"1100": "rgba(34, 34, 34, 0.706)",
|
|
174
|
+
"1200": "rgba(34, 34, 34, 1)"
|
|
175
|
+
},
|
|
112
176
|
neutral: {
|
|
113
177
|
"100": "#f8f9fa",
|
|
114
178
|
"200": "#e9ecef",
|
|
@@ -813,7 +877,8 @@ var component = {
|
|
|
813
877
|
"default": "0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",
|
|
814
878
|
hover: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
815
879
|
active: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
816
|
-
}
|
|
880
|
+
},
|
|
881
|
+
background: "#ffffff"
|
|
817
882
|
}
|
|
818
883
|
},
|
|
819
884
|
accountCard: {
|
|
@@ -825,7 +890,8 @@ var component = {
|
|
|
825
890
|
breadcrumbs: {
|
|
826
891
|
item: {
|
|
827
892
|
maxWidth: "11.25rem"
|
|
828
|
-
}
|
|
893
|
+
},
|
|
894
|
+
font: "400 0.75rem/1.125rem 'Inter', sans-serif"
|
|
829
895
|
},
|
|
830
896
|
cardLarge: {
|
|
831
897
|
maxWidth: "48rem"
|
|
@@ -860,6 +926,46 @@ var component = {
|
|
|
860
926
|
},
|
|
861
927
|
transactionListItem: {
|
|
862
928
|
minHeight: "4.5rem"
|
|
929
|
+
},
|
|
930
|
+
status: {
|
|
931
|
+
pending: {
|
|
932
|
+
text: "#825800",
|
|
933
|
+
background: "#FFF3D6"
|
|
934
|
+
},
|
|
935
|
+
completed: {
|
|
936
|
+
text: "#007A4D",
|
|
937
|
+
background: "#CEF8E0"
|
|
938
|
+
},
|
|
939
|
+
failed: {
|
|
940
|
+
text: "#D31510",
|
|
941
|
+
background: "#FFEBE7"
|
|
942
|
+
},
|
|
943
|
+
cancelled: {
|
|
944
|
+
text: "#495057",
|
|
945
|
+
background: "#e9ecef"
|
|
946
|
+
},
|
|
947
|
+
processing: {
|
|
948
|
+
text: "#0265DC",
|
|
949
|
+
background: "#E0F2FF"
|
|
950
|
+
},
|
|
951
|
+
scheduled: {
|
|
952
|
+
text: "#7E2EBD",
|
|
953
|
+
background: "#F9F0FF"
|
|
954
|
+
}
|
|
955
|
+
},
|
|
956
|
+
transaction: {
|
|
957
|
+
credit: "#15A46E",
|
|
958
|
+
"credit-hover": "#008F5D",
|
|
959
|
+
debit: "#D31510",
|
|
960
|
+
"debit-hover": "#B40000",
|
|
961
|
+
pending: "#F68511",
|
|
962
|
+
neutral: "#6c757d"
|
|
963
|
+
},
|
|
964
|
+
track: {
|
|
965
|
+
background: "#dee2e6"
|
|
966
|
+
},
|
|
967
|
+
tooltip: {
|
|
968
|
+
border: "0.125rem dotted #dee2e6"
|
|
863
969
|
}
|
|
864
970
|
};
|
|
865
971
|
var semantic = {
|
|
@@ -881,7 +987,9 @@ var semantic = {
|
|
|
881
987
|
},
|
|
882
988
|
opacity: {
|
|
883
989
|
disabled: "0.5",
|
|
884
|
-
full: "1"
|
|
990
|
+
full: "1",
|
|
991
|
+
hover: "0.8",
|
|
992
|
+
pressed: "0.7"
|
|
885
993
|
},
|
|
886
994
|
fontFamily: {
|
|
887
995
|
body: "'Inter', sans-serif",
|
|
@@ -938,10 +1046,35 @@ var semantic = {
|
|
|
938
1046
|
"2xl": "1.5rem",
|
|
939
1047
|
"3xl": "2rem",
|
|
940
1048
|
circle: "10rem"
|
|
941
|
-
}
|
|
1049
|
+
},
|
|
1050
|
+
emphasis: "0.0625rem solid #dee2e6",
|
|
1051
|
+
"input-hover": "0.0625rem solid #343a40"
|
|
942
1052
|
},
|
|
943
1053
|
size: {
|
|
1054
|
+
"100": "0.25rem",
|
|
1055
|
+
"200": "0.5rem",
|
|
1056
|
+
"400": "1rem",
|
|
1057
|
+
"500": "1.25rem",
|
|
1058
|
+
"600": "1.5rem",
|
|
1059
|
+
"800": "2rem",
|
|
1060
|
+
"1200": "3rem",
|
|
1061
|
+
"1500": "3.75rem",
|
|
1062
|
+
"1800": "4.5rem",
|
|
1063
|
+
"2000": "5rem",
|
|
1064
|
+
"3000": "7.5rem",
|
|
1065
|
+
"4500": "11.25rem",
|
|
1066
|
+
"5000": "12.5rem",
|
|
1067
|
+
"7500": "18.75rem",
|
|
1068
|
+
"9000": "22.5rem",
|
|
1069
|
+
"10000": "25rem",
|
|
1070
|
+
"19200": "48rem",
|
|
1071
|
+
pointerTarget: "1.5rem",
|
|
944
1072
|
touchTarget: "2.75rem",
|
|
1073
|
+
control: {
|
|
1074
|
+
sm: "2rem",
|
|
1075
|
+
md: "2.5rem",
|
|
1076
|
+
lg: "3rem"
|
|
1077
|
+
},
|
|
945
1078
|
overlay: {
|
|
946
1079
|
sm: "25rem",
|
|
947
1080
|
md: "35rem",
|
|
@@ -1028,7 +1161,7 @@ var semantic = {
|
|
|
1028
1161
|
color: {
|
|
1029
1162
|
text: {
|
|
1030
1163
|
"default": "#212529",
|
|
1031
|
-
emphasis: "#
|
|
1164
|
+
emphasis: "#16191C",
|
|
1032
1165
|
subdued: "#495057",
|
|
1033
1166
|
inverse: "#ffffff",
|
|
1034
1167
|
disabled: "#adb5bd",
|
|
@@ -1037,7 +1170,12 @@ var semantic = {
|
|
|
1037
1170
|
"interactive-active": "#004491",
|
|
1038
1171
|
error: "#D31510",
|
|
1039
1172
|
success: "#007A4D",
|
|
1040
|
-
warning: "#B14C00"
|
|
1173
|
+
warning: "#B14C00",
|
|
1174
|
+
muted: "#495057",
|
|
1175
|
+
accent: "#0265DC",
|
|
1176
|
+
"accent-hover": "#0054B6",
|
|
1177
|
+
"accent-pressed": "#004491",
|
|
1178
|
+
danger: "#D31510"
|
|
1041
1179
|
},
|
|
1042
1180
|
background: {
|
|
1043
1181
|
"default": "#f8f9fa",
|
|
@@ -1082,11 +1220,17 @@ var semantic = {
|
|
|
1082
1220
|
error: "#D31510",
|
|
1083
1221
|
success: "#007A4D",
|
|
1084
1222
|
warning: "#B14C00",
|
|
1085
|
-
none: "transparent"
|
|
1223
|
+
none: "transparent",
|
|
1224
|
+
emphasis: "#dee2e6",
|
|
1225
|
+
input: "#6c757d",
|
|
1226
|
+
"input-hover": "#343a40",
|
|
1227
|
+
focus: "#343a40",
|
|
1228
|
+
accent: "#0265DC",
|
|
1229
|
+
danger: "#D31510"
|
|
1086
1230
|
},
|
|
1087
1231
|
icon: {
|
|
1088
1232
|
"default": "#212529",
|
|
1089
|
-
emphasis: "#
|
|
1233
|
+
emphasis: "#16191C",
|
|
1090
1234
|
subdued: "#6c757d",
|
|
1091
1235
|
disabled: "#adb5bd",
|
|
1092
1236
|
inverse: "#ffffff",
|
|
@@ -1095,7 +1239,12 @@ var semantic = {
|
|
|
1095
1239
|
"interactive-active": "#004491",
|
|
1096
1240
|
error: "#D31510",
|
|
1097
1241
|
success: "#007A4D",
|
|
1098
|
-
warning: "#B14C00"
|
|
1242
|
+
warning: "#B14C00",
|
|
1243
|
+
muted: "#6c757d",
|
|
1244
|
+
accent: "#0265DC",
|
|
1245
|
+
"accent-hover": "#0054B6",
|
|
1246
|
+
"accent-pressed": "#004491",
|
|
1247
|
+
danger: "#D31510"
|
|
1099
1248
|
},
|
|
1100
1249
|
financial: {
|
|
1101
1250
|
credit: "#15A46E",
|
|
@@ -1107,27 +1256,35 @@ var semantic = {
|
|
|
1107
1256
|
},
|
|
1108
1257
|
category: {
|
|
1109
1258
|
blue: "#3892F3",
|
|
1259
|
+
"blue-strong": "#0265DC",
|
|
1110
1260
|
"blue-emphasis": "#0265DC",
|
|
1111
1261
|
"blue-subtle": "#E0F2FF",
|
|
1112
1262
|
purple: "#AD5FE8",
|
|
1263
|
+
"purple-strong": "#7E2EBD",
|
|
1113
1264
|
"purple-emphasis": "#7E2EBD",
|
|
1114
1265
|
"purple-subtle": "#F9F0FF",
|
|
1115
1266
|
pink: "#FF42AB",
|
|
1267
|
+
"pink-strong": "#DC007B",
|
|
1116
1268
|
"pink-emphasis": "#DC007B",
|
|
1117
1269
|
"pink-subtle": "#FFEFF9",
|
|
1118
1270
|
yellow: "#D39700",
|
|
1271
|
+
"yellow-strong": "#9D6C00",
|
|
1119
1272
|
"yellow-emphasis": "#9D6C00",
|
|
1120
1273
|
"yellow-subtle": "#FFF3D6",
|
|
1121
1274
|
green: "#15A46E",
|
|
1275
|
+
"green-strong": "#007A4D",
|
|
1122
1276
|
"green-emphasis": "#007A4D",
|
|
1123
1277
|
"green-subtle": "#CEF8E0",
|
|
1124
1278
|
red: "#F75C46",
|
|
1279
|
+
"red-strong": "#D31510",
|
|
1125
1280
|
"red-emphasis": "#D31510",
|
|
1126
1281
|
"red-subtle": "#FFEBE7",
|
|
1127
1282
|
orange: "#E46F00",
|
|
1283
|
+
"orange-strong": "#B14C00",
|
|
1128
1284
|
"orange-emphasis": "#B14C00",
|
|
1129
1285
|
"orange-subtle": "#FFECCC",
|
|
1130
1286
|
gray: "#495057",
|
|
1287
|
+
"gray-strong": "#212529",
|
|
1131
1288
|
"gray-emphasis": "#212529",
|
|
1132
1289
|
"gray-subtle": "#e9ecef",
|
|
1133
1290
|
"blue-text": "#0265DC",
|
|
@@ -1137,7 +1294,15 @@ var semantic = {
|
|
|
1137
1294
|
"green-text": "#007A4D",
|
|
1138
1295
|
"red-text": "#D31510",
|
|
1139
1296
|
"orange-text": "#B14C00",
|
|
1140
|
-
"gray-text": "#212529"
|
|
1297
|
+
"gray-text": "#212529",
|
|
1298
|
+
"blue-muted": "#E0F2FF",
|
|
1299
|
+
"purple-muted": "#F9F0FF",
|
|
1300
|
+
"pink-muted": "#FFEFF9",
|
|
1301
|
+
"yellow-muted": "#FFF3D6",
|
|
1302
|
+
"green-muted": "#CEF8E0",
|
|
1303
|
+
"red-muted": "#FFEBE7",
|
|
1304
|
+
"orange-muted": "#FFECCC",
|
|
1305
|
+
"gray-muted": "#e9ecef"
|
|
1141
1306
|
},
|
|
1142
1307
|
status: {
|
|
1143
1308
|
pending: "#825800",
|
|
@@ -1152,6 +1317,35 @@ var semantic = {
|
|
|
1152
1317
|
"processing-bg": "#E0F2FF",
|
|
1153
1318
|
scheduled: "#7E2EBD",
|
|
1154
1319
|
"scheduled-bg": "#F9F0FF"
|
|
1320
|
+
},
|
|
1321
|
+
fill: {
|
|
1322
|
+
emphasis: "#212529",
|
|
1323
|
+
"emphasis-hover": "#343a40",
|
|
1324
|
+
"emphasis-pressed": "#16191C",
|
|
1325
|
+
muted: "#e9ecef",
|
|
1326
|
+
inverse: "#343a40",
|
|
1327
|
+
accent: "#0265DC",
|
|
1328
|
+
"accent-muted": "#E0F2FF",
|
|
1329
|
+
"accent-muted-hover": "#CAE8FF",
|
|
1330
|
+
"accent-muted-pressed": "#B5DEFF",
|
|
1331
|
+
"accent-hover": "#0054B6",
|
|
1332
|
+
"accent-pressed": "#004491",
|
|
1333
|
+
danger: "#D31510",
|
|
1334
|
+
"danger-hover": "#B40000",
|
|
1335
|
+
"danger-pressed": "#930000",
|
|
1336
|
+
"danger-muted": "#FFEBE7",
|
|
1337
|
+
success: "#007A4D",
|
|
1338
|
+
"success-muted": "#CEF8E0",
|
|
1339
|
+
warning: "#B14C00",
|
|
1340
|
+
"warning-muted": "#FFECCC",
|
|
1341
|
+
disabled: "#dee2e6",
|
|
1342
|
+
"default": "#dee2e6",
|
|
1343
|
+
"default-hover": "#ced4da",
|
|
1344
|
+
"default-pressed": "#adb5bd",
|
|
1345
|
+
none: "transparent",
|
|
1346
|
+
"none-hover": "rgba(33, 37, 41, 0.1)",
|
|
1347
|
+
"none-pressed": "rgba(33, 37, 41, 0.15)",
|
|
1348
|
+
"inverse-none-hover": "rgba(255, 255, 255, 0.2)"
|
|
1155
1349
|
}
|
|
1156
1350
|
},
|
|
1157
1351
|
typography: {
|
|
@@ -1177,20 +1371,79 @@ var semantic = {
|
|
|
1177
1371
|
duration: {
|
|
1178
1372
|
normal: "200ms",
|
|
1179
1373
|
fast: "150ms",
|
|
1180
|
-
slow: "300ms"
|
|
1374
|
+
slow: "300ms",
|
|
1375
|
+
instant: "0ms",
|
|
1376
|
+
moderate: "200ms"
|
|
1181
1377
|
},
|
|
1182
1378
|
easing: {
|
|
1183
1379
|
easeInOut: "ease-in-out",
|
|
1184
|
-
easeOut: "ease-out"
|
|
1380
|
+
easeOut: "ease-out",
|
|
1381
|
+
standard: "ease-in-out",
|
|
1382
|
+
decelerate: "ease-out",
|
|
1383
|
+
accelerate: "ease-in"
|
|
1185
1384
|
},
|
|
1186
1385
|
transition: {
|
|
1187
1386
|
fast: "all 150ms ease-out",
|
|
1188
1387
|
normal: "all 200ms ease-in-out",
|
|
1189
|
-
slow: "all 300ms ease-in-out"
|
|
1388
|
+
slow: "all 300ms ease-in-out",
|
|
1389
|
+
feedback: "background-color 150ms ease-out, color 150ms ease-out",
|
|
1390
|
+
focus: "outline 150ms ease-out, outline-offset 150ms ease-out",
|
|
1391
|
+
press: "transform 150ms ease-out, opacity 150ms ease-out"
|
|
1190
1392
|
},
|
|
1191
1393
|
hover: "background-color 150ms ease-out, color 150ms ease-out",
|
|
1192
1394
|
focus: "outline 150ms ease-out, outline-offset 150ms ease-out",
|
|
1193
|
-
interactive: "transform 150ms ease-out, opacity 150ms ease-out"
|
|
1395
|
+
interactive: "transform 150ms ease-out, opacity 150ms ease-out",
|
|
1396
|
+
distance: {
|
|
1397
|
+
sm: "0.5rem"
|
|
1398
|
+
}
|
|
1399
|
+
},
|
|
1400
|
+
layer: {
|
|
1401
|
+
sticky: "10",
|
|
1402
|
+
dropdown: "1000",
|
|
1403
|
+
overlay: "1010",
|
|
1404
|
+
modal: "1020"
|
|
1405
|
+
},
|
|
1406
|
+
radius: {
|
|
1407
|
+
none: "0",
|
|
1408
|
+
xs: "0.125rem",
|
|
1409
|
+
sm: "0.25rem",
|
|
1410
|
+
md: "0.5rem",
|
|
1411
|
+
lg: "0.75rem",
|
|
1412
|
+
xl: "1rem",
|
|
1413
|
+
"2xl": "1.5rem",
|
|
1414
|
+
"3xl": "2rem",
|
|
1415
|
+
full: "10rem"
|
|
1416
|
+
},
|
|
1417
|
+
space: {
|
|
1418
|
+
"0": "0",
|
|
1419
|
+
"100": "0.25rem",
|
|
1420
|
+
"200": "0.5rem",
|
|
1421
|
+
"300": "0.75rem",
|
|
1422
|
+
"400": "1rem",
|
|
1423
|
+
"500": "1.25rem",
|
|
1424
|
+
"600": "1.5rem",
|
|
1425
|
+
"700": "1.75rem",
|
|
1426
|
+
"800": "2rem",
|
|
1427
|
+
"900": "2.25rem",
|
|
1428
|
+
"1000": "2.5rem",
|
|
1429
|
+
"1200": "3rem",
|
|
1430
|
+
"1400": "3.5rem",
|
|
1431
|
+
"1600": "4rem",
|
|
1432
|
+
"2000": "5rem",
|
|
1433
|
+
"2400": "6rem",
|
|
1434
|
+
inset: {
|
|
1435
|
+
xs: "0.25rem",
|
|
1436
|
+
sm: "0.5rem",
|
|
1437
|
+
md: "0.75rem",
|
|
1438
|
+
lg: "1rem",
|
|
1439
|
+
xl: "1.25rem",
|
|
1440
|
+
"2xl": "1.5rem"
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
surface: {
|
|
1444
|
+
base: "#f8f9fa",
|
|
1445
|
+
raised: "#ffffff",
|
|
1446
|
+
scrim: "rgba(33, 37, 41, 0.5)"
|
|
1194
1447
|
}
|
|
1195
1448
|
};
|
|
1196
1449
|
var tokensJson = {
|
|
@@ -1991,8 +2244,10 @@ var iconsJson = {
|
|
|
1991
2244
|
move: move
|
|
1992
2245
|
};
|
|
1993
2246
|
|
|
1994
|
-
//
|
|
1995
|
-
//
|
|
2247
|
+
// The published types come from the generated `src/styles/tokens.ts`, which carries each token's
|
|
2248
|
+
// description as JSDoc and `@deprecated` on deprecated tokens (decision 0033, #199). Declaring the
|
|
2249
|
+
// constant with that type also keeps emitted .d.ts files free of JSON imports, which consumers can
|
|
2250
|
+
// only resolve with `resolveJsonModule`.
|
|
1996
2251
|
var tokens = tokensJson;
|
|
1997
2252
|
|
|
1998
2253
|
// Icon type definitions for external consumption
|
package/dist/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sources":["../src/types/tokens.ts","../src/types/icons.ts"],"sourcesContent":["import tokensJson from '../styles/tokens.json'\n\n//
|
|
1
|
+
{"version":3,"file":"data.js","sources":["../src/types/tokens.ts","../src/types/icons.ts"],"sourcesContent":["import tokensJson from '../styles/tokens.json'\nimport type { Tokens } from '../styles/tokens'\n\n// The published types come from the generated `src/styles/tokens.ts`, which carries each token's\n// description as JSDoc and `@deprecated` on deprecated tokens (decision 0033, #199). Declaring the\n// constant with that type also keeps emitted .d.ts files free of JSON imports, which consumers can\n// only resolve with `resolveJsonModule`.\nexport const tokens: Tokens = tokensJson\n\nexport type { Tokens }\nexport type TokensBase = Tokens['base']\nexport type TokensSemantic = Tokens['semantic']\nexport type TokensComponent = Tokens['component']\n","// Icon type definitions for external consumption\n// This is a self-contained type that doesn't depend on JSON imports\n// to ensure it works correctly in consuming projects\n\nimport iconsJson from '../styles/icons.json'\n\nexport type IconName =\n | 'add'\n | 'addRing'\n | 'arrowDown'\n | 'arrowLeft'\n | 'arrowRight'\n | 'arrowUp'\n | 'back'\n | 'bell'\n | 'cancel'\n | 'caret'\n | 'caretDown'\n | 'caretUp'\n | 'check'\n | 'checkRing'\n | 'close'\n | 'copy'\n | 'creditCard'\n | 'crossCircle'\n | 'directionRight'\n | 'directionUp'\n | 'edit'\n | 'export'\n | 'fileDocSearch'\n | 'filter'\n | 'info'\n | 'kebab'\n | 'lamp'\n | 'lineOut'\n | 'link'\n | 'meatballs'\n | 'menu'\n | 'message'\n | 'move'\n | 'mic'\n | 'order'\n | 'paper'\n | 'pause'\n | 'play'\n | 'playBack'\n | 'refresh'\n | 'remove'\n | 'search'\n | 'star'\n | 'starFilled'\n | 'table'\n | 'trash'\n | 'userBox'\n | 'view'\n | 'viewHide'\n | 'wallet'\n\n/** Semantic category for grouping icons by purpose */\nexport type IconCategory =\n | 'action'\n | 'communication'\n | 'content'\n | 'feedback'\n | 'media'\n | 'navigation'\n | 'object'\n | 'status'\n | 'user'\n\n/** Enriched metadata for each icon entry in icons.json */\nexport interface IconMetadata {\n /** SVG path data */\n path: string\n /** Display name of the icon */\n name: string\n /** What the icon visually depicts */\n description: string\n /** Semantic category for grouping */\n category: IconCategory\n /** Alternative names and search terms */\n aliases: string[]\n /** When and why to use this icon */\n intent: string\n /** Whether the icon is typically decorative (true) or informative (false) */\n decorativeDefault: boolean\n /** Suggested accessible label when the icon conveys meaning */\n ariaLabelDefault: string\n}\n\n/** The full icon registry keyed by IconName */\nexport type IconRegistry = Record<IconName, IconMetadata>\n\n// Typed as IconRegistry so emitted .d.ts files don't import JSON (needs `resolveJsonModule` in consumers).\nexport const iconsData = iconsJson as IconRegistry\n"],"names":["tokens","tokensJson","iconsData","iconsJson"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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decision 0041): the same shape and type as `tokens.json`,
|
|
4
|
+
* with every value a CSS variable that falls back to the resolved value, so a region can change a
|
|
5
|
+
* token through tokens.css. Breakpoints stay values.
|
|
6
|
+
*
|
|
7
|
+
* Use the resolved values from `tokens.json` instead where a value is read as data rather than
|
|
8
|
+
* CSS, such as a duration parsed for a timer.
|
|
9
|
+
*
|
|
10
|
+
* Jest maps this module to `tokens.json` (jest.config.js), so unit tests assert resolved values;
|
|
11
|
+
* the browser specs check the variables.
|
|
12
|
+
*/
|
|
13
|
+
declare const tokens: Tokens;
|
|
14
|
+
export default tokens;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The CSS variable tokens.css declares for a token path: Style Dictionary's `name/kebab` with the
|
|
3
|
+
* `co` prefix. `semantic.color.text.default` is `--co-semantic-color-text-default`, and
|
|
4
|
+
* `semantic.border.focusOffset` is `--co-semantic-border-focus-offset`.
|
|
5
|
+
*/
|
|
6
|
+
export declare function cssVariableName(path: string[]): string;
|
|
7
|
+
type Tree = {
|
|
8
|
+
[key: string]: string | Tree;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A copy of a token tree with the same shape, where every value reads its CSS variable and falls
|
|
12
|
+
* back to the resolved value: `var(--co-semantic-color-text-default, #212529)`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function withCssVariables<T extends Tree>(tree: T, path?: string[]): T;
|
|
15
|
+
export {};
|
package/dist/lib/styleUtils.d.ts
CHANGED
|
@@ -14,6 +14,29 @@ export declare const media: {
|
|
|
14
14
|
xl: string;
|
|
15
15
|
'2xl': string;
|
|
16
16
|
};
|
|
17
|
+
export declare const forcedColors = "@media (forced-colors: active)";
|
|
18
|
+
/** A control's edge in forced colours, for a control that shows its edge with a fill alone. The
|
|
19
|
+
* border follows the text colour the browser picks: ButtonText, LinkText, or GrayText when disabled. */
|
|
20
|
+
export declare const forcedColorsEdge: string;
|
|
17
21
|
export declare const reducedMotion = "@media (prefers-reduced-motion: reduce)";
|
|
18
22
|
export declare const exitAnimation: import("styled-components").RuleSet<object>;
|
|
19
23
|
export declare const visuallyHidden: import("styled-components").RuleSet<object>;
|
|
24
|
+
export interface RowState {
|
|
25
|
+
background: string;
|
|
26
|
+
text?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const rowStates: Record<'unselected' | 'selected', Record<'rest' | 'hover' | 'pressed', RowState>>;
|
|
29
|
+
/**
|
|
30
|
+
* The background (and, when selected, text) of an interactive row in every state.
|
|
31
|
+
* - `focused`: keyboard focus that isn't DOM focus, such as a listbox option under
|
|
32
|
+
* aria-activedescendant. It shows the hover state.
|
|
33
|
+
* - `disabled`: shows the resting state, with no hover or press.
|
|
34
|
+
* - `textSelector`: a descendant to colour when the row's text isn't the row itself, for example
|
|
35
|
+
* text set by Typography. Pass it without `&`.
|
|
36
|
+
*/
|
|
37
|
+
export declare const interactiveRow: ({ selected, focused, disabled, textSelector, }?: {
|
|
38
|
+
selected?: boolean;
|
|
39
|
+
focused?: boolean;
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
textSelector?: string;
|
|
42
|
+
}) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Tokens } from '../types/tokens';
|
|
2
|
+
type Semantic = Tokens['semantic'];
|
|
3
|
+
/** Box's spacing props (`p`, `m`, `gap`…): the old layout scale's keys, read from `space`. */
|
|
4
|
+
export declare const spaceByLayoutKey: Record<keyof Semantic['spacing']['layout'], string>;
|
|
5
|
+
/** Box's `borderRadius` prop: the old radius keys, read from `radius`. */
|
|
6
|
+
export declare const radiusByKey: Record<keyof Semantic['border']['radius'], string>;
|
|
7
|
+
/** Box's `bg` prop: the old background keys, read from `surface` and `color.fill`. */
|
|
8
|
+
export declare const backgroundByKey: Record<keyof Semantic['color']['background'], string>;
|
|
9
|
+
/** Box's `color` prop: text colours, old and new keys. */
|
|
10
|
+
export declare const textColorByKey: Record<keyof Semantic['color']['text'], string>;
|
|
11
|
+
/** Box's border props: border colours, old and new keys. */
|
|
12
|
+
export declare const borderColorByKey: Record<keyof Semantic['color']['border'], string>;
|
|
13
|
+
export {};
|