@tectra-ng/themes 0.1.1 → 0.1.2
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/README.md +4 -2
- package/fesm2022/tectra-ng-themes.mjs +1723 -57
- package/fesm2022/tectra-ng-themes.mjs.map +1 -1
- package/package.json +1 -1
- package/types/tectra-ng-themes.d.ts +396 -18
- package/types/tectra-ng-themes.d.ts.map +1 -1
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import { ACCENT_PALETTES,
|
|
1
|
+
import { ACCENT_PALETTES, SEVERITY_PALETTES, SURFACE_PALETTES, layers, motion, radius, shadows, spacing, typography } from "@tectra-ng/tokens";
|
|
2
|
+
function channel(hex, offset) {
|
|
3
|
+
const value = parseInt(hex.slice(offset, offset + 2), 16) / 255;
|
|
4
|
+
return value <= .03928 ? value / 12.92 : ((value + .055) / 1.055) ** 2.4;
|
|
5
|
+
}
|
|
6
|
+
function relativeLuminance(hex) {
|
|
7
|
+
return .2126 * channel(hex, 1) + .7152 * channel(hex, 3) + .0722 * channel(hex, 5);
|
|
8
|
+
}
|
|
9
|
+
function contrastWithWhite(hex) {
|
|
10
|
+
return 1.05 / (relativeLuminance(hex) + .05);
|
|
11
|
+
}
|
|
12
|
+
function primaryBaseStep(scale) {
|
|
13
|
+
return contrastWithWhite(scale[600]) >= 4.5 ? 600 : 700;
|
|
14
|
+
}
|
|
2
15
|
function lightSeverity(scale, base, surface) {
|
|
3
16
|
return {
|
|
4
17
|
base: scale[base],
|
|
@@ -11,7 +24,7 @@ function lightSeverity(scale, base, surface) {
|
|
|
11
24
|
function createLightSemantic({ accent, surface }) {
|
|
12
25
|
return {
|
|
13
26
|
primary: {
|
|
14
|
-
...lightSeverity(accent,
|
|
27
|
+
...lightSeverity(accent, primaryBaseStep(accent), surface),
|
|
15
28
|
softText: accent[700]
|
|
16
29
|
},
|
|
17
30
|
secondary: {
|
|
@@ -150,7 +163,7 @@ function mix(color, amount, base) {
|
|
|
150
163
|
function fade(color, transparency) {
|
|
151
164
|
return `color-mix(in srgb, ${color}, transparent ${transparency})`;
|
|
152
165
|
}
|
|
153
|
-
function solid(group) {
|
|
166
|
+
function solid$2(group) {
|
|
154
167
|
return {
|
|
155
168
|
background: tokenRef(`${group}-base`),
|
|
156
169
|
hoverBackground: tokenRef(`${group}-hover`),
|
|
@@ -167,7 +180,7 @@ function solid(group) {
|
|
|
167
180
|
}
|
|
168
181
|
};
|
|
169
182
|
}
|
|
170
|
-
function outlined(palette, color) {
|
|
183
|
+
function outlined$1(palette, color) {
|
|
171
184
|
return {
|
|
172
185
|
hoverBackground: lightDark(tokenRef(`${palette}-50`), mix(tokenRef(`${palette}-400`), "8%", tokenRef("surface-900"))),
|
|
173
186
|
activeBackground: lightDark(tokenRef(`${palette}-100`), mix(tokenRef(`${palette}-400`), "18%", tokenRef("surface-900"))),
|
|
@@ -216,7 +229,7 @@ const buttonTokens = {
|
|
|
216
229
|
},
|
|
217
230
|
badgeSize: "18px",
|
|
218
231
|
transitionDuration: tokenRef("motion-duration"),
|
|
219
|
-
primary: solid("primary"),
|
|
232
|
+
primary: solid$2("primary"),
|
|
220
233
|
secondary: {
|
|
221
234
|
background: tokenRef("secondary-base"),
|
|
222
235
|
hoverBackground: tokenRef("secondary-hover"),
|
|
@@ -232,26 +245,26 @@ const buttonTokens = {
|
|
|
232
245
|
shadow: "none"
|
|
233
246
|
}
|
|
234
247
|
},
|
|
235
|
-
info: solid("info"),
|
|
236
|
-
success: solid("success"),
|
|
237
|
-
warn: solid("warn"),
|
|
238
|
-
help: solid("help"),
|
|
239
|
-
danger: solid("danger"),
|
|
240
|
-
contrast: solid("contrast")
|
|
248
|
+
info: solid$2("info"),
|
|
249
|
+
success: solid$2("success"),
|
|
250
|
+
warn: solid$2("warn"),
|
|
251
|
+
help: solid$2("help"),
|
|
252
|
+
danger: solid$2("danger"),
|
|
253
|
+
contrast: solid$2("contrast")
|
|
241
254
|
},
|
|
242
255
|
outlined: {
|
|
243
|
-
primary: outlined("primary", tokenRef("primary-base")),
|
|
256
|
+
primary: outlined$1("primary", tokenRef("primary-base")),
|
|
244
257
|
secondary: {
|
|
245
258
|
hoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
246
259
|
activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
247
260
|
borderColor: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
|
|
248
261
|
color: lightDark(tokenRef("surface-800"), tokenRef("surface-100"))
|
|
249
262
|
},
|
|
250
|
-
success: outlined("green", severityColor("green")),
|
|
251
|
-
info: outlined("sky", lightDark(tokenRef("sky-700"), tokenRef("sky-400"))),
|
|
252
|
-
warn: outlined("orange", lightDark(tokenRef("orange-700"), tokenRef("orange-400"))),
|
|
253
|
-
help: outlined("purple", severityColor("purple")),
|
|
254
|
-
danger: outlined("red", severityColor("red")),
|
|
263
|
+
success: outlined$1("green", severityColor("green")),
|
|
264
|
+
info: outlined$1("sky", lightDark(tokenRef("sky-700"), tokenRef("sky-400"))),
|
|
265
|
+
warn: outlined$1("orange", lightDark(tokenRef("orange-700"), tokenRef("orange-400"))),
|
|
266
|
+
help: outlined$1("purple", severityColor("purple")),
|
|
267
|
+
danger: outlined$1("red", severityColor("red")),
|
|
255
268
|
contrast: {
|
|
256
269
|
hoverBackground: lightDark(tokenRef("surface-50"), tokenRef("surface-800")),
|
|
257
270
|
activeBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-700")),
|
|
@@ -329,7 +342,13 @@ const formFieldTokens = { root: {
|
|
|
329
342
|
fontSize: "15.75px",
|
|
330
343
|
lineHeight: "23.625px"
|
|
331
344
|
},
|
|
332
|
-
focusRing: {
|
|
345
|
+
focusRing: {
|
|
346
|
+
shadow: "none",
|
|
347
|
+
width: "0px",
|
|
348
|
+
style: "none",
|
|
349
|
+
color: "transparent",
|
|
350
|
+
offset: "0px"
|
|
351
|
+
},
|
|
333
352
|
invalidFocusRing: { shadow: "none" },
|
|
334
353
|
transitionDuration: tokenRef("motion-duration")
|
|
335
354
|
} };
|
|
@@ -420,6 +439,8 @@ const selectTokens = {
|
|
|
420
439
|
},
|
|
421
440
|
list: {
|
|
422
441
|
padding: "3.5px",
|
|
442
|
+
paddingBlock: tokenRef("select-list-padding"),
|
|
443
|
+
paddingInline: tokenRef("select-list-padding"),
|
|
423
444
|
gap: "2px",
|
|
424
445
|
maxHeight: "200px"
|
|
425
446
|
},
|
|
@@ -428,6 +449,7 @@ const selectTokens = {
|
|
|
428
449
|
gap: "7px",
|
|
429
450
|
borderRadius: tokenRef("radius-sm"),
|
|
430
451
|
color: tokenRef("text-primary"),
|
|
452
|
+
focusColor: tokenRef("select-option-color"),
|
|
431
453
|
focusBackground: tokenRef("list-focus-background"),
|
|
432
454
|
selectedBackground: tokenRef("highlight-background"),
|
|
433
455
|
selectedColor: tokenRef("highlight-color"),
|
|
@@ -435,7 +457,13 @@ const selectTokens = {
|
|
|
435
457
|
selectedFocusColor: tokenRef("highlight-focus-color"),
|
|
436
458
|
selectedFontWeight: tokenRef("font-weight-regular"),
|
|
437
459
|
disabledColor: tokenRef("form-field-disabled-color"),
|
|
438
|
-
checkColor: tokenRef("primary-base")
|
|
460
|
+
checkColor: tokenRef("primary-base"),
|
|
461
|
+
multiple: {
|
|
462
|
+
selectedBackground: "transparent",
|
|
463
|
+
selectedFocusBackground: tokenRef("select-option-focus-background"),
|
|
464
|
+
selectedColor: tokenRef("select-option-color"),
|
|
465
|
+
selectedFocusColor: tokenRef("select-option-focus-color")
|
|
466
|
+
}
|
|
439
467
|
},
|
|
440
468
|
checkbox: {
|
|
441
469
|
size: "15.75px",
|
|
@@ -473,8 +501,10 @@ const selectTokens = {
|
|
|
473
501
|
minHeight: "37px"
|
|
474
502
|
},
|
|
475
503
|
dropdownButton: {
|
|
504
|
+
width: tokenRef("select-dropdown-width"),
|
|
476
505
|
background: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
477
506
|
hoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
507
|
+
activeBackground: tokenRef("select-dropdown-button-hover-background"),
|
|
478
508
|
color: lightDark(tokenRef("surface-600"), tokenRef("surface-300")),
|
|
479
509
|
hoverColor: lightDark(tokenRef("surface-700"), tokenRef("surface-200"))
|
|
480
510
|
},
|
|
@@ -505,12 +535,14 @@ const chipsInputTokens = { root: {
|
|
|
505
535
|
inputMinWidth: "80px"
|
|
506
536
|
} };
|
|
507
537
|
const countryTokens = { root: {
|
|
508
|
-
gap: "
|
|
509
|
-
smallSize: "
|
|
510
|
-
mediumSize: "
|
|
511
|
-
largeSize: "
|
|
512
|
-
borderRadius: "
|
|
538
|
+
gap: "7px",
|
|
539
|
+
smallSize: "1em",
|
|
540
|
+
mediumSize: "17.5px",
|
|
541
|
+
largeSize: "28px",
|
|
542
|
+
borderRadius: tokenRef("radius-xs"),
|
|
513
543
|
ring: `0 0 0 1px ${tokenRef("surface-border")}`,
|
|
544
|
+
ringGutter: "1px",
|
|
545
|
+
loadingBackground: tokenRef("surface-hover"),
|
|
514
546
|
nameColor: "inherit",
|
|
515
547
|
hintColor: tokenRef("text-muted"),
|
|
516
548
|
countColor: tokenRef("text-muted"),
|
|
@@ -562,14 +594,6 @@ const mentionTokens = { root: {
|
|
|
562
594
|
descriptionColor: tokenRef("text-muted"),
|
|
563
595
|
descriptionFontSize: tokenRef("font-size-sm")
|
|
564
596
|
} };
|
|
565
|
-
const treeTokens = { root: {
|
|
566
|
-
indent: "18px",
|
|
567
|
-
gap: "6px",
|
|
568
|
-
togglerSize: "20px",
|
|
569
|
-
togglerColor: tokenRef("text-muted"),
|
|
570
|
-
togglerHoverBackground: tokenRef("surface-hover"),
|
|
571
|
-
iconColor: tokenRef("text-muted")
|
|
572
|
-
} };
|
|
573
597
|
const cascadeSelectTokens = { root: {
|
|
574
598
|
columnWidth: "200px",
|
|
575
599
|
columnBorderColor: tokenRef("surface-overlay-border"),
|
|
@@ -634,6 +658,8 @@ const messageTokens = {
|
|
|
634
658
|
borderRadius: tokenRef("radius-lg"),
|
|
635
659
|
borderColor: tokenRef("surface-border"),
|
|
636
660
|
borderTint: "30%",
|
|
661
|
+
borderWidth: "1px",
|
|
662
|
+
outlinedBorderWidth: "1px",
|
|
637
663
|
background: tokenRef("surface-card"),
|
|
638
664
|
backgroundTint: "7%",
|
|
639
665
|
color: tokenRef("text-primary"),
|
|
@@ -658,7 +684,10 @@ const messageTokens = {
|
|
|
658
684
|
color: tokenRef("text-muted"),
|
|
659
685
|
hoverColor: tokenRef("text-primary"),
|
|
660
686
|
hoverBackground: fade(tokenRef("text-primary"), "92%"),
|
|
661
|
-
fontSize: "14px"
|
|
687
|
+
fontSize: "14px",
|
|
688
|
+
focusRingWidth: "2px",
|
|
689
|
+
focusRingOffset: "1px",
|
|
690
|
+
focusRingShadow: "none"
|
|
662
691
|
},
|
|
663
692
|
sm: {
|
|
664
693
|
gap: "10px",
|
|
@@ -849,6 +878,11 @@ const toggleSwitchTokens = {
|
|
|
849
878
|
height: "22px",
|
|
850
879
|
gutter: "2px",
|
|
851
880
|
borderRadius: tokenRef("radius-full"),
|
|
881
|
+
borderWidth: "0px",
|
|
882
|
+
borderColor: "transparent",
|
|
883
|
+
hoverBorderColor: "transparent",
|
|
884
|
+
checkedBorderColor: "transparent",
|
|
885
|
+
checkedHoverBorderColor: "transparent",
|
|
852
886
|
background: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
|
|
853
887
|
hoverBackground: lightDark(tokenRef("surface-400"), tokenRef("surface-500")),
|
|
854
888
|
checkedBackground: tokenRef("primary-base"),
|
|
@@ -945,6 +979,7 @@ const inputNumberTokens = { button: {
|
|
|
945
979
|
activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-600")),
|
|
946
980
|
color: tokenRef("text-muted"),
|
|
947
981
|
hoverColor: tokenRef("text-primary"),
|
|
982
|
+
activeColor: tokenRef("input-number-button-hover-color"),
|
|
948
983
|
borderColor: tokenRef("form-field-border-color"),
|
|
949
984
|
iconSize: "12px"
|
|
950
985
|
} };
|
|
@@ -1005,6 +1040,7 @@ const sliderTokens = {
|
|
|
1005
1040
|
handle: {
|
|
1006
1041
|
size: "18px",
|
|
1007
1042
|
background: tokenRef("surface-0"),
|
|
1043
|
+
hoverBackground: tokenRef("slider-handle-background"),
|
|
1008
1044
|
borderColor: tokenRef("primary-base"),
|
|
1009
1045
|
borderWidth: "2px",
|
|
1010
1046
|
shadow: `0 1px 2px ${fade(tokenRef("surface-950"), "80%")}`,
|
|
@@ -1081,7 +1117,11 @@ const pillTokens = {
|
|
|
1081
1117
|
}
|
|
1082
1118
|
};
|
|
1083
1119
|
function tone$2(palette) {
|
|
1084
|
-
|
|
1120
|
+
const color = lightDark(tokenRef(`${palette}-800`), tokenRef(`${palette}-300`));
|
|
1121
|
+
return {
|
|
1122
|
+
color,
|
|
1123
|
+
background: color
|
|
1124
|
+
};
|
|
1085
1125
|
}
|
|
1086
1126
|
const tagTokens = {
|
|
1087
1127
|
root: {
|
|
@@ -1110,13 +1150,19 @@ const tagTokens = {
|
|
|
1110
1150
|
gap: "6px"
|
|
1111
1151
|
},
|
|
1112
1152
|
primary: tone$2("primary"),
|
|
1113
|
-
secondary: {
|
|
1153
|
+
secondary: {
|
|
1154
|
+
color: tokenRef("text-muted"),
|
|
1155
|
+
background: tokenRef("text-muted")
|
|
1156
|
+
},
|
|
1114
1157
|
success: tone$2("green"),
|
|
1115
1158
|
info: tone$2("sky"),
|
|
1116
1159
|
warn: tone$2("orange"),
|
|
1117
1160
|
danger: tone$2("red"),
|
|
1118
1161
|
help: tone$2("purple"),
|
|
1119
|
-
contrast: {
|
|
1162
|
+
contrast: {
|
|
1163
|
+
color: tokenRef("text-primary"),
|
|
1164
|
+
background: tokenRef("text-primary")
|
|
1165
|
+
}
|
|
1120
1166
|
};
|
|
1121
1167
|
const chipTokens = { root: {
|
|
1122
1168
|
gap: "6px",
|
|
@@ -1132,7 +1178,10 @@ const chipTokens = { root: {
|
|
|
1132
1178
|
removeColor: tokenRef("text-muted"),
|
|
1133
1179
|
removeHoverColor: tokenRef("text-primary"),
|
|
1134
1180
|
removeHoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
1135
|
-
focusRingColor: tokenRef("focus-ring-color")
|
|
1181
|
+
focusRingColor: tokenRef("focus-ring-color"),
|
|
1182
|
+
focusRingWidth: "2px",
|
|
1183
|
+
focusRingOffset: "1px",
|
|
1184
|
+
focusRingShadow: "none"
|
|
1136
1185
|
} };
|
|
1137
1186
|
function fill(palette) {
|
|
1138
1187
|
return lightDark(tokenRef(`${palette}-600`), tokenRef(`${palette}-400`));
|
|
@@ -1285,6 +1334,14 @@ const fieldsetTokens = { root: {
|
|
|
1285
1334
|
legendFontSize: tokenRef("font-size-md"),
|
|
1286
1335
|
legendFontWeight: tokenRef("font-weight-semibold"),
|
|
1287
1336
|
legendHoverBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
1337
|
+
legendFocusBackground: "transparent",
|
|
1338
|
+
legendBackground: "transparent",
|
|
1339
|
+
legendBorderColor: "transparent",
|
|
1340
|
+
legendBorderRadius: tokenRef("radius-md"),
|
|
1341
|
+
togglePadding: "4px 8px",
|
|
1342
|
+
focusRingWidth: "2px",
|
|
1343
|
+
focusRingOffset: "1px",
|
|
1344
|
+
focusRingShadow: "none",
|
|
1288
1345
|
transitionDuration: "0.25s"
|
|
1289
1346
|
} };
|
|
1290
1347
|
const highlightTextTokens = { mark: {
|
|
@@ -1603,6 +1660,7 @@ const menuTokens = {
|
|
|
1603
1660
|
fontWeight: tokenRef("font-weight-regular"),
|
|
1604
1661
|
focusBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
1605
1662
|
focusColor: tokenRef("text-hover"),
|
|
1663
|
+
activeBackground: tokenRef("menu-item-focus-background"),
|
|
1606
1664
|
disabledOpacity: "0.6",
|
|
1607
1665
|
dangerColor: lightDark(tokenRef("red-600"), tokenRef("red-400")),
|
|
1608
1666
|
dangerFocusBackground: lightDark(tokenRef("red-50"), `color-mix(in srgb, ${tokenRef("red-400")}, transparent 96%)`)
|
|
@@ -1697,7 +1755,8 @@ const paginatorTokens = {
|
|
|
1697
1755
|
width: "2px",
|
|
1698
1756
|
style: "solid",
|
|
1699
1757
|
color: tokenRef("focus-ring-color"),
|
|
1700
|
-
offset: "2px"
|
|
1758
|
+
offset: "2px",
|
|
1759
|
+
shadow: "none"
|
|
1701
1760
|
}
|
|
1702
1761
|
},
|
|
1703
1762
|
currentPageReport: {
|
|
@@ -1713,10 +1772,10 @@ const paginatorTokens = {
|
|
|
1713
1772
|
margin: "10.5px 0"
|
|
1714
1773
|
}
|
|
1715
1774
|
};
|
|
1716
|
-
const borderColor = tokenRef("surface-border");
|
|
1775
|
+
const borderColor$1 = tokenRef("surface-border");
|
|
1717
1776
|
const tableTokens = {
|
|
1718
1777
|
root: {
|
|
1719
|
-
borderColor,
|
|
1778
|
+
borderColor: borderColor$1,
|
|
1720
1779
|
transitionDuration: tokenRef("motion-duration"),
|
|
1721
1780
|
color: tokenRef("text-primary"),
|
|
1722
1781
|
fontSize: tokenRef("font-size-md"),
|
|
@@ -1739,6 +1798,13 @@ const tableTokens = {
|
|
|
1739
1798
|
fontSize: "11.375px",
|
|
1740
1799
|
fontWeight: tokenRef("font-weight-semibold"),
|
|
1741
1800
|
gap: "7px",
|
|
1801
|
+
focusRing: {
|
|
1802
|
+
width: "2px",
|
|
1803
|
+
style: "solid",
|
|
1804
|
+
color: tokenRef("focus-ring-color"),
|
|
1805
|
+
offset: "2px",
|
|
1806
|
+
shadow: "none"
|
|
1807
|
+
},
|
|
1742
1808
|
sm: { padding: "1.75px 5.25px" },
|
|
1743
1809
|
lg: { padding: "10.5px 15.75px" }
|
|
1744
1810
|
},
|
|
@@ -1762,7 +1828,8 @@ const tableTokens = {
|
|
|
1762
1828
|
width: "2px",
|
|
1763
1829
|
style: "solid",
|
|
1764
1830
|
color: tokenRef("focus-ring-color"),
|
|
1765
|
-
offset: "-2px"
|
|
1831
|
+
offset: "-2px",
|
|
1832
|
+
shadow: "none"
|
|
1766
1833
|
}
|
|
1767
1834
|
},
|
|
1768
1835
|
bodyCell: {
|
|
@@ -1797,7 +1864,7 @@ const tableTokens = {
|
|
|
1797
1864
|
},
|
|
1798
1865
|
dragPreview: {
|
|
1799
1866
|
background: tokenRef("surface-card"),
|
|
1800
|
-
borderColor,
|
|
1867
|
+
borderColor: borderColor$1,
|
|
1801
1868
|
borderRadius: tokenRef("radius-md"),
|
|
1802
1869
|
shadow: tokenRef("shadow-overlay")
|
|
1803
1870
|
},
|
|
@@ -1833,7 +1900,14 @@ const tableTokens = {
|
|
|
1833
1900
|
borderRadius: "50%",
|
|
1834
1901
|
color: tokenRef("text-muted"),
|
|
1835
1902
|
hoverColor: tokenRef("text-primary"),
|
|
1836
|
-
hoverBackground: tokenRef("surface-hover")
|
|
1903
|
+
hoverBackground: tokenRef("surface-hover"),
|
|
1904
|
+
focusRing: {
|
|
1905
|
+
width: "2px",
|
|
1906
|
+
style: "solid",
|
|
1907
|
+
color: tokenRef("focus-ring-color"),
|
|
1908
|
+
offset: "2px",
|
|
1909
|
+
shadow: "none"
|
|
1910
|
+
}
|
|
1837
1911
|
},
|
|
1838
1912
|
paginator: { marginTop: "14px" },
|
|
1839
1913
|
settings: {
|
|
@@ -1858,7 +1932,7 @@ const tableTokens = {
|
|
|
1858
1932
|
gap: "10.5px",
|
|
1859
1933
|
borderRadius: "10.5px",
|
|
1860
1934
|
background: tokenRef("surface-card"),
|
|
1861
|
-
borderColor,
|
|
1935
|
+
borderColor: borderColor$1,
|
|
1862
1936
|
fieldPadding: "7px 14px",
|
|
1863
1937
|
fieldGap: "10.5px",
|
|
1864
1938
|
fieldFontSize: "12.25px",
|
|
@@ -1871,6 +1945,114 @@ const tableTokens = {
|
|
|
1871
1945
|
actionsPadding: "8.75px 10.5px"
|
|
1872
1946
|
}
|
|
1873
1947
|
};
|
|
1948
|
+
const treeTokens = {
|
|
1949
|
+
root: {
|
|
1950
|
+
background: tokenRef("surface-card"),
|
|
1951
|
+
color: tokenRef("text-primary"),
|
|
1952
|
+
padding: "12.25px",
|
|
1953
|
+
gap: "2px",
|
|
1954
|
+
indent: "12.25px",
|
|
1955
|
+
transitionDuration: tokenRef("motion-duration")
|
|
1956
|
+
},
|
|
1957
|
+
node: {
|
|
1958
|
+
padding: "3.5px 7px",
|
|
1959
|
+
borderRadius: tokenRef("radius-lg"),
|
|
1960
|
+
hoverBackground: tokenRef("surface-hover"),
|
|
1961
|
+
selectedBackground: tokenRef("highlight-background"),
|
|
1962
|
+
color: tokenRef("text-primary"),
|
|
1963
|
+
hoverColor: tokenRef("text-hover"),
|
|
1964
|
+
selectedColor: tokenRef("highlight-color"),
|
|
1965
|
+
gap: "5.25px",
|
|
1966
|
+
focusRing: {
|
|
1967
|
+
width: "2px",
|
|
1968
|
+
style: "solid",
|
|
1969
|
+
color: tokenRef("focus-ring-color"),
|
|
1970
|
+
offset: "-1px",
|
|
1971
|
+
shadow: "none"
|
|
1972
|
+
}
|
|
1973
|
+
},
|
|
1974
|
+
nodeIcon: {
|
|
1975
|
+
color: tokenRef("text-muted"),
|
|
1976
|
+
hoverColor: tokenRef("text-muted-hover"),
|
|
1977
|
+
selectedColor: tokenRef("highlight-color")
|
|
1978
|
+
},
|
|
1979
|
+
nodeLabel: {
|
|
1980
|
+
fontWeight: tokenRef("font-weight-regular"),
|
|
1981
|
+
selectedFontWeight: tokenRef("font-weight-regular"),
|
|
1982
|
+
fontSize: tokenRef("font-size-md")
|
|
1983
|
+
},
|
|
1984
|
+
nodeToggleButton: {
|
|
1985
|
+
borderRadius: "50%",
|
|
1986
|
+
size: "21px",
|
|
1987
|
+
hoverBackground: tokenRef("surface-hover"),
|
|
1988
|
+
selectedHoverBackground: tokenRef("surface-card"),
|
|
1989
|
+
color: tokenRef("text-muted"),
|
|
1990
|
+
hoverColor: tokenRef("text-muted-hover"),
|
|
1991
|
+
selectedHoverColor: tokenRef("primary-base"),
|
|
1992
|
+
focusRing: {
|
|
1993
|
+
width: "2px",
|
|
1994
|
+
style: "solid",
|
|
1995
|
+
color: tokenRef("focus-ring-color"),
|
|
1996
|
+
offset: "2px"
|
|
1997
|
+
}
|
|
1998
|
+
},
|
|
1999
|
+
loadingIcon: { size: "24.5px" },
|
|
2000
|
+
filter: { margin: "0 0 7px 0" },
|
|
2001
|
+
mask: { background: lightDark("rgba(255, 255, 255, 0.5)", "rgba(0, 0, 0, 0.3)") },
|
|
2002
|
+
dropPoint: { color: tokenRef("primary-base") },
|
|
2003
|
+
expansion: {
|
|
2004
|
+
duration: `calc(${tokenRef("motion-duration")} * 1.6)`,
|
|
2005
|
+
easing: "cubic-bezier(0.2, 0, 0, 1)"
|
|
2006
|
+
}
|
|
2007
|
+
};
|
|
2008
|
+
const treeTableTokens = { node: {
|
|
2009
|
+
indent: "16px",
|
|
2010
|
+
gap: "7px"
|
|
2011
|
+
} };
|
|
2012
|
+
const borderColor = tokenRef("surface-border");
|
|
2013
|
+
const dataViewTokens = {
|
|
2014
|
+
root: {
|
|
2015
|
+
background: tokenRef("surface-card"),
|
|
2016
|
+
color: tokenRef("text-primary"),
|
|
2017
|
+
borderColor,
|
|
2018
|
+
borderWidth: "0",
|
|
2019
|
+
borderRadius: "0",
|
|
2020
|
+
transitionDuration: tokenRef("motion-duration")
|
|
2021
|
+
},
|
|
2022
|
+
header: {
|
|
2023
|
+
background: tokenRef("surface-card"),
|
|
2024
|
+
color: tokenRef("text-primary"),
|
|
2025
|
+
padding: "8.75px 12.25px",
|
|
2026
|
+
borderRadius: "0"
|
|
2027
|
+
},
|
|
2028
|
+
footer: {
|
|
2029
|
+
background: tokenRef("surface-card"),
|
|
2030
|
+
color: tokenRef("text-primary"),
|
|
2031
|
+
padding: "8.75px 12.25px",
|
|
2032
|
+
borderRadius: "0"
|
|
2033
|
+
},
|
|
2034
|
+
empty: {
|
|
2035
|
+
padding: "10.5px 12.25px",
|
|
2036
|
+
color: tokenRef("text-muted")
|
|
2037
|
+
},
|
|
2038
|
+
loading: {
|
|
2039
|
+
blur: "8px",
|
|
2040
|
+
background: "transparent"
|
|
2041
|
+
},
|
|
2042
|
+
layoutSwitch: { gap: "0" }
|
|
2043
|
+
};
|
|
2044
|
+
const virtualScrollerTokens = {
|
|
2045
|
+
root: {
|
|
2046
|
+
focusRingWidth: "2px",
|
|
2047
|
+
focusRingColor: tokenRef("focus-ring-color"),
|
|
2048
|
+
focusRingOffset: "-2px"
|
|
2049
|
+
},
|
|
2050
|
+
loader: {
|
|
2051
|
+
background: tokenRef("surface-card"),
|
|
2052
|
+
color: tokenRef("text-muted"),
|
|
2053
|
+
iconSize: "24.5px"
|
|
2054
|
+
}
|
|
2055
|
+
};
|
|
1874
2056
|
const iconTokens = { root: {
|
|
1875
2057
|
size: "1em",
|
|
1876
2058
|
strokeWidth: "1.75"
|
|
@@ -1991,22 +2173,1467 @@ const COMPONENT_TOKENS = {
|
|
|
1991
2173
|
splitButton: splitButtonTokens,
|
|
1992
2174
|
speedDial: speedDialTokens,
|
|
1993
2175
|
paginator: paginatorTokens,
|
|
1994
|
-
table: tableTokens
|
|
2176
|
+
table: tableTokens,
|
|
2177
|
+
treeTable: treeTableTokens,
|
|
2178
|
+
dataView: dataViewTokens,
|
|
2179
|
+
virtualScroller: virtualScrollerTokens
|
|
1995
2180
|
};
|
|
1996
|
-
function
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
surface:
|
|
2181
|
+
function edgeLight({ accent, surface }) {
|
|
2182
|
+
const base = primaryBaseStep(accent);
|
|
2183
|
+
return {
|
|
2184
|
+
surface: {
|
|
2185
|
+
hover: surface[200],
|
|
2186
|
+
border: surface[400],
|
|
2187
|
+
overlayBorder: "transparent"
|
|
2188
|
+
},
|
|
2189
|
+
field: {
|
|
2190
|
+
border: surface[500],
|
|
2191
|
+
hoverBorder: surface[500],
|
|
2192
|
+
disabledBackground: surface[300],
|
|
2193
|
+
placeholder: surface[600],
|
|
2194
|
+
icon: surface[900]
|
|
2195
|
+
},
|
|
2196
|
+
highlight: {
|
|
2197
|
+
background: accent[base],
|
|
2198
|
+
focusBackground: accent[base === 600 ? 700 : 800],
|
|
2199
|
+
color: surface[0],
|
|
2200
|
+
focusColor: surface[0]
|
|
2201
|
+
},
|
|
2202
|
+
list: { focusBackground: surface[200] }
|
|
2000
2203
|
};
|
|
2204
|
+
}
|
|
2205
|
+
function edgeDark({ accent, surface }) {
|
|
2001
2206
|
return {
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2207
|
+
primary: {
|
|
2208
|
+
base: accent[500],
|
|
2209
|
+
hover: accent[400],
|
|
2210
|
+
active: accent[300]
|
|
2211
|
+
},
|
|
2212
|
+
surface: {
|
|
2213
|
+
hover: surface[700],
|
|
2214
|
+
border: surface[500]
|
|
2215
|
+
},
|
|
2216
|
+
field: {
|
|
2217
|
+
border: surface[500],
|
|
2218
|
+
hoverBorder: surface[500],
|
|
2219
|
+
icon: surface[0]
|
|
2220
|
+
},
|
|
2221
|
+
highlight: {
|
|
2222
|
+
background: accent[500],
|
|
2223
|
+
focusBackground: accent[400],
|
|
2224
|
+
color: surface[950],
|
|
2225
|
+
focusColor: surface[950]
|
|
2226
|
+
},
|
|
2227
|
+
list: { focusBackground: surface[700] },
|
|
2228
|
+
focusRing: { color: accent[500] }
|
|
2007
2229
|
};
|
|
2008
2230
|
}
|
|
2009
|
-
const
|
|
2231
|
+
const filledBackground = lightDark(tokenRef("surface-100"), tokenRef("surface-800"));
|
|
2232
|
+
const edgeFormsTokens = {
|
|
2233
|
+
formField: { root: {
|
|
2234
|
+
filledBackground,
|
|
2235
|
+
filledHoverBackground: filledBackground,
|
|
2236
|
+
filledFocusBackground: filledBackground,
|
|
2237
|
+
focusBorderColor: tokenRef("field-border"),
|
|
2238
|
+
invalidBorderColor: lightDark(tokenRef("red-500"), tokenRef("red-400")),
|
|
2239
|
+
placeholderColor: tokenRef("field-placeholder"),
|
|
2240
|
+
iconColor: tokenRef("field-icon"),
|
|
2241
|
+
shadow: "none",
|
|
2242
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2243
|
+
focusRing: {
|
|
2244
|
+
width: "2px",
|
|
2245
|
+
style: "solid",
|
|
2246
|
+
color: tokenRef("focus-ring-color"),
|
|
2247
|
+
offset: "-1px"
|
|
2248
|
+
}
|
|
2249
|
+
} },
|
|
2250
|
+
inputGroup: { addon: {
|
|
2251
|
+
color: tokenRef("form-field-icon-color"),
|
|
2252
|
+
paddingX: "7px",
|
|
2253
|
+
minWidth: "35px"
|
|
2254
|
+
} },
|
|
2255
|
+
floatLabel: {
|
|
2256
|
+
root: { fontWeight: tokenRef("font-weight-medium") },
|
|
2257
|
+
over: { active: { top: "-17.5px" } }
|
|
2258
|
+
},
|
|
2259
|
+
iftaLabel: { root: { fontWeight: tokenRef("font-weight-regular") } },
|
|
2260
|
+
password: {
|
|
2261
|
+
panel: { borderRadius: tokenRef("radius-xs") },
|
|
2262
|
+
meter: {
|
|
2263
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2264
|
+
background: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
|
|
2265
|
+
weakBackground: lightDark(tokenRef("red-600"), tokenRef("red-500")),
|
|
2266
|
+
mediumBackground: lightDark(tokenRef("yellow-600"), tokenRef("yellow-500")),
|
|
2267
|
+
strongBackground: lightDark(tokenRef("green-600"), tokenRef("green-500"))
|
|
2268
|
+
}
|
|
2269
|
+
},
|
|
2270
|
+
inputNumber: { button: {
|
|
2271
|
+
width: "35px",
|
|
2272
|
+
hoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
2273
|
+
activeBackground: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
|
|
2274
|
+
color: tokenRef("form-field-icon-color"),
|
|
2275
|
+
hoverColor: tokenRef("form-field-icon-color"),
|
|
2276
|
+
activeColor: tokenRef("form-field-icon-color")
|
|
2277
|
+
} },
|
|
2278
|
+
select: {
|
|
2279
|
+
overlay: { borderRadius: tokenRef("radius-xs") },
|
|
2280
|
+
list: {
|
|
2281
|
+
paddingBlock: "1.75px",
|
|
2282
|
+
paddingInline: "0px",
|
|
2283
|
+
gap: "0px"
|
|
2284
|
+
},
|
|
2285
|
+
option: {
|
|
2286
|
+
borderRadius: "0",
|
|
2287
|
+
focusColor: tokenRef("text-hover"),
|
|
2288
|
+
checkColor: tokenRef("highlight-color"),
|
|
2289
|
+
multiple: {
|
|
2290
|
+
selectedBackground: tokenRef("highlight-background"),
|
|
2291
|
+
selectedFocusBackground: tokenRef("highlight-focus-background"),
|
|
2292
|
+
selectedColor: tokenRef("highlight-color"),
|
|
2293
|
+
selectedFocusColor: tokenRef("highlight-focus-color")
|
|
2294
|
+
}
|
|
2295
|
+
},
|
|
2296
|
+
optionGroup: {
|
|
2297
|
+
color: tokenRef("text-primary"),
|
|
2298
|
+
fontWeight: tokenRef("font-weight-bold")
|
|
2299
|
+
},
|
|
2300
|
+
chip: { borderRadius: tokenRef("radius-xs") },
|
|
2301
|
+
filter: { padding: "7px 7px 1.75px" },
|
|
2302
|
+
header: { padding: "7px 7px 1.75px" },
|
|
2303
|
+
dropdownButton: {
|
|
2304
|
+
background: tokenRef("form-field-background"),
|
|
2305
|
+
color: tokenRef("form-field-icon-color"),
|
|
2306
|
+
hoverColor: tokenRef("form-field-icon-color")
|
|
2307
|
+
}
|
|
2308
|
+
},
|
|
2309
|
+
chipsInput: { root: { chipBorderRadius: tokenRef("radius-xs") } },
|
|
2310
|
+
colorPicker: {
|
|
2311
|
+
root: { swatchBorderRadius: tokenRef("radius-xs") },
|
|
2312
|
+
panel: { borderRadius: tokenRef("radius-xs") }
|
|
2313
|
+
}
|
|
2314
|
+
};
|
|
2315
|
+
const steps$1 = (palette, light, dark) => lightDark(tokenRef(`${palette}-${light}`), tokenRef(`${palette}-${dark}`));
|
|
2316
|
+
const outlined = (palette) => ({
|
|
2317
|
+
hoverBackground: steps$1(palette, 50, 950),
|
|
2318
|
+
activeBackground: steps$1(palette, 100, 900),
|
|
2319
|
+
borderColor: steps$1(palette, 600, 500)
|
|
2320
|
+
});
|
|
2321
|
+
const outlinedWithColor = (palette) => ({
|
|
2322
|
+
...outlined(palette),
|
|
2323
|
+
color: steps$1(palette, 600, 500)
|
|
2324
|
+
});
|
|
2325
|
+
const edgeControlsTokens = {
|
|
2326
|
+
button: {
|
|
2327
|
+
root: {
|
|
2328
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2329
|
+
label: { fontWeight: tokenRef("font-weight-bold") },
|
|
2330
|
+
secondary: {
|
|
2331
|
+
background: steps$1("surface", 200, 700),
|
|
2332
|
+
hoverBackground: steps$1("surface", 300, 600),
|
|
2333
|
+
activeBackground: steps$1("surface", 400, 500),
|
|
2334
|
+
borderColor: steps$1("surface", 200, 700),
|
|
2335
|
+
hoverBorderColor: steps$1("surface", 300, 600),
|
|
2336
|
+
activeBorderColor: steps$1("surface", 400, 500),
|
|
2337
|
+
color: steps$1("surface", 700, 200),
|
|
2338
|
+
hoverColor: steps$1("surface", 800, 100),
|
|
2339
|
+
activeColor: steps$1("surface", 900, 0),
|
|
2340
|
+
focusRing: { color: steps$1("surface", 700, 200) }
|
|
2341
|
+
}
|
|
2342
|
+
},
|
|
2343
|
+
outlined: {
|
|
2344
|
+
primary: { borderColor: tokenRef("primary-base") },
|
|
2345
|
+
secondary: {
|
|
2346
|
+
borderColor: steps$1("surface", 600, 400),
|
|
2347
|
+
color: steps$1("surface", 600, 400)
|
|
2348
|
+
},
|
|
2349
|
+
success: outlinedWithColor("green"),
|
|
2350
|
+
info: outlined("sky"),
|
|
2351
|
+
warn: outlined("orange"),
|
|
2352
|
+
help: outlinedWithColor("purple"),
|
|
2353
|
+
danger: outlinedWithColor("red"),
|
|
2354
|
+
contrast: { borderColor: steps$1("surface", 950, 0) },
|
|
2355
|
+
plain: {
|
|
2356
|
+
borderColor: steps$1("surface", 900, 0),
|
|
2357
|
+
color: steps$1("surface", 900, 0)
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
text: {
|
|
2361
|
+
secondary: { color: steps$1("surface", 600, 400) },
|
|
2362
|
+
success: { color: steps$1("green", 600, 500) },
|
|
2363
|
+
help: { color: steps$1("purple", 600, 500) },
|
|
2364
|
+
danger: { color: steps$1("red", 600, 500) },
|
|
2365
|
+
plain: { color: steps$1("surface", 900, 0) }
|
|
2366
|
+
}
|
|
2367
|
+
},
|
|
2368
|
+
toggleButton: {
|
|
2369
|
+
root: {
|
|
2370
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2371
|
+
background: tokenRef("form-field-background"),
|
|
2372
|
+
checkedBackground: tokenRef("highlight-background"),
|
|
2373
|
+
hoverBackground: steps$1("surface", 200, 700),
|
|
2374
|
+
borderColor: tokenRef("form-field-border-color"),
|
|
2375
|
+
checkedBorderColor: tokenRef("form-field-border-color"),
|
|
2376
|
+
color: tokenRef("form-field-color"),
|
|
2377
|
+
hoverColor: tokenRef("form-field-color"),
|
|
2378
|
+
checkedColor: tokenRef("highlight-color"),
|
|
2379
|
+
focusRing: { offset: "-1px" }
|
|
2380
|
+
},
|
|
2381
|
+
icon: {
|
|
2382
|
+
color: tokenRef("text-muted"),
|
|
2383
|
+
hoverColor: tokenRef("text-muted"),
|
|
2384
|
+
checkedColor: tokenRef("highlight-color")
|
|
2385
|
+
},
|
|
2386
|
+
content: {
|
|
2387
|
+
padding: "0",
|
|
2388
|
+
borderRadius: "0",
|
|
2389
|
+
checkedBackground: "transparent",
|
|
2390
|
+
checkedShadow: "none",
|
|
2391
|
+
sm: { padding: "0" },
|
|
2392
|
+
lg: { padding: "0" }
|
|
2393
|
+
}
|
|
2394
|
+
},
|
|
2395
|
+
checkbox: { root: { borderRadius: tokenRef("radius-xs") } },
|
|
2396
|
+
radioButton: { root: {
|
|
2397
|
+
checkedBackground: tokenRef("form-field-background"),
|
|
2398
|
+
checkedHoverBackground: tokenRef("form-field-background"),
|
|
2399
|
+
checkedBorderColor: tokenRef("form-field-border-color"),
|
|
2400
|
+
checkedHoverBorderColor: tokenRef("form-field-hover-border-color"),
|
|
2401
|
+
dotColor: tokenRef("primary-base")
|
|
2402
|
+
} },
|
|
2403
|
+
toggleSwitch: {
|
|
2404
|
+
root: {
|
|
2405
|
+
borderWidth: "1px",
|
|
2406
|
+
borderColor: tokenRef("form-field-border-color"),
|
|
2407
|
+
hoverBorderColor: tokenRef("form-field-border-color"),
|
|
2408
|
+
checkedBorderColor: tokenRef("primary-base"),
|
|
2409
|
+
checkedHoverBorderColor: tokenRef("primary-base"),
|
|
2410
|
+
background: tokenRef("form-field-background"),
|
|
2411
|
+
hoverBackground: tokenRef("form-field-background"),
|
|
2412
|
+
checkedHoverBackground: tokenRef("primary-base"),
|
|
2413
|
+
disabledBackground: tokenRef("form-field-disabled-background"),
|
|
2414
|
+
transitionDuration: "0.1s"
|
|
2415
|
+
},
|
|
2416
|
+
handle: {
|
|
2417
|
+
background: tokenRef("form-field-border-color"),
|
|
2418
|
+
checkedBackground: tokenRef("primary-contrast"),
|
|
2419
|
+
disabledBackground: tokenRef("form-field-disabled-color"),
|
|
2420
|
+
iconColor: tokenRef("surface-0")
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
rating: { root: {
|
|
2424
|
+
activeColor: tokenRef("text-primary"),
|
|
2425
|
+
hoverColor: tokenRef("text-primary")
|
|
2426
|
+
} },
|
|
2427
|
+
knob: { root: { rangeColor: steps$1("surface", 300, 600) } },
|
|
2428
|
+
slider: {
|
|
2429
|
+
root: {
|
|
2430
|
+
trackBackground: steps$1("surface", 300, 600),
|
|
2431
|
+
trackBorderRadius: tokenRef("radius-xs")
|
|
2432
|
+
},
|
|
2433
|
+
handle: {
|
|
2434
|
+
size: "16px",
|
|
2435
|
+
background: tokenRef("primary-base"),
|
|
2436
|
+
shadow: "none"
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
};
|
|
2440
|
+
function solid$1(severity) {
|
|
2441
|
+
return {
|
|
2442
|
+
background: tokenRef(`${severity}-base`),
|
|
2443
|
+
color: tokenRef(`${severity}-contrast`)
|
|
2444
|
+
};
|
|
2445
|
+
}
|
|
2446
|
+
const edgeDisplayTokens = {
|
|
2447
|
+
tag: {
|
|
2448
|
+
root: {
|
|
2449
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2450
|
+
tint: "100%"
|
|
2451
|
+
},
|
|
2452
|
+
primary: solid$1("primary"),
|
|
2453
|
+
secondary: {
|
|
2454
|
+
background: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
2455
|
+
color: lightDark(tokenRef("surface-700"), tokenRef("surface-200"))
|
|
2456
|
+
},
|
|
2457
|
+
success: solid$1("success"),
|
|
2458
|
+
info: solid$1("info"),
|
|
2459
|
+
warn: solid$1("warn"),
|
|
2460
|
+
danger: solid$1("danger"),
|
|
2461
|
+
help: solid$1("help"),
|
|
2462
|
+
contrast: solid$1("contrast")
|
|
2463
|
+
},
|
|
2464
|
+
chip: { root: {
|
|
2465
|
+
background: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
2466
|
+
iconColor: tokenRef("text-primary"),
|
|
2467
|
+
removeColor: tokenRef("text-primary")
|
|
2468
|
+
} },
|
|
2469
|
+
message: {
|
|
2470
|
+
root: {
|
|
2471
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2472
|
+
fontSize: "14px",
|
|
2473
|
+
fontWeight: tokenRef("font-weight-bold")
|
|
2474
|
+
},
|
|
2475
|
+
info: { text: lightDark(tokenRef("sky-800"), tokenRef("sky-200")) },
|
|
2476
|
+
success: { text: lightDark(tokenRef("green-800"), tokenRef("green-200")) },
|
|
2477
|
+
danger: { text: lightDark(tokenRef("red-800"), tokenRef("red-200")) }
|
|
2478
|
+
},
|
|
2479
|
+
progressBar: { root: {
|
|
2480
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2481
|
+
trackBackground: lightDark(tokenRef("surface-300"), tokenRef("surface-600")),
|
|
2482
|
+
labelFontWeight: tokenRef("font-weight-bold")
|
|
2483
|
+
} },
|
|
2484
|
+
skeleton: { root: {
|
|
2485
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2486
|
+
background: lightDark(tokenRef("surface-300"), fade(tokenRef("surface-0"), "90%"))
|
|
2487
|
+
} },
|
|
2488
|
+
avatar: { root: {
|
|
2489
|
+
squareBorderRadius: tokenRef("radius-xs"),
|
|
2490
|
+
color: tokenRef("text-primary")
|
|
2491
|
+
} },
|
|
2492
|
+
divider: { root: { contentColor: tokenRef("text-primary") } },
|
|
2493
|
+
card: { root: {
|
|
2494
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2495
|
+
shadow: "0 1px 4px 0 rgba(0, 0, 0, 0.1)"
|
|
2496
|
+
} },
|
|
2497
|
+
panel: { root: {
|
|
2498
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2499
|
+
titleFontWeight: tokenRef("font-weight-bold")
|
|
2500
|
+
} },
|
|
2501
|
+
fieldset: { root: {
|
|
2502
|
+
borderRadius: tokenRef("radius-xs"),
|
|
2503
|
+
padding: "8.75px 14px 14px 14px",
|
|
2504
|
+
legendHoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
2505
|
+
legendBorderRadius: tokenRef("radius-xs"),
|
|
2506
|
+
legendBorderColor: tokenRef("surface-border"),
|
|
2507
|
+
legendFontWeight: tokenRef("font-weight-bold")
|
|
2508
|
+
} }
|
|
2509
|
+
};
|
|
2510
|
+
const radius$3 = tokenRef("radius-xs");
|
|
2511
|
+
const listPadding = "1.75px 0";
|
|
2512
|
+
const edgeOverlaysTokens = {
|
|
2513
|
+
tooltip: { root: {
|
|
2514
|
+
background: lightDark(tokenRef("surface-900"), tokenRef("surface-0")),
|
|
2515
|
+
color: lightDark(tokenRef("surface-0"), tokenRef("surface-900")),
|
|
2516
|
+
borderRadius: radius$3
|
|
2517
|
+
} },
|
|
2518
|
+
popover: { root: { borderRadius: radius$3 } },
|
|
2519
|
+
toast: { item: {
|
|
2520
|
+
background: tokenRef("surface-card"),
|
|
2521
|
+
blur: "0px",
|
|
2522
|
+
borderRadius: radius$3,
|
|
2523
|
+
shadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"
|
|
2524
|
+
} },
|
|
2525
|
+
dialog: {
|
|
2526
|
+
root: {
|
|
2527
|
+
borderColor: tokenRef("surface-overlay-border"),
|
|
2528
|
+
borderRadius: radius$3
|
|
2529
|
+
},
|
|
2530
|
+
title: { fontWeight: tokenRef("font-weight-bold") }
|
|
2531
|
+
},
|
|
2532
|
+
confirm: {
|
|
2533
|
+
message: { color: tokenRef("text-primary") },
|
|
2534
|
+
popup: { borderRadius: radius$3 }
|
|
2535
|
+
},
|
|
2536
|
+
menu: {
|
|
2537
|
+
root: {
|
|
2538
|
+
borderRadius: radius$3,
|
|
2539
|
+
padding: listPadding,
|
|
2540
|
+
gap: "0"
|
|
2541
|
+
},
|
|
2542
|
+
item: {
|
|
2543
|
+
borderRadius: "0",
|
|
2544
|
+
focusBackground: tokenRef("primary-base"),
|
|
2545
|
+
focusColor: tokenRef("primary-contrast"),
|
|
2546
|
+
activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700"))
|
|
2547
|
+
},
|
|
2548
|
+
icon: {
|
|
2549
|
+
color: tokenRef("text-muted"),
|
|
2550
|
+
focusColor: tokenRef("primary-contrast")
|
|
2551
|
+
},
|
|
2552
|
+
groupLabel: {
|
|
2553
|
+
color: tokenRef("text-primary"),
|
|
2554
|
+
fontWeight: tokenRef("font-weight-bold")
|
|
2555
|
+
},
|
|
2556
|
+
popup: {
|
|
2557
|
+
borderColor: tokenRef("surface-border"),
|
|
2558
|
+
padding: listPadding,
|
|
2559
|
+
gap: "0",
|
|
2560
|
+
itemBorderRadius: "0"
|
|
2561
|
+
},
|
|
2562
|
+
context: {
|
|
2563
|
+
padding: listPadding,
|
|
2564
|
+
itemBorderRadius: "0"
|
|
2565
|
+
}
|
|
2566
|
+
}
|
|
2567
|
+
};
|
|
2568
|
+
const radius$2 = tokenRef("radius-xs");
|
|
2569
|
+
const edgeDataTokens = {
|
|
2570
|
+
paginator: {
|
|
2571
|
+
root: { borderRadius: radius$2 },
|
|
2572
|
+
navButton: { borderRadius: radius$2 }
|
|
2573
|
+
},
|
|
2574
|
+
table: {
|
|
2575
|
+
root: { borderColor: lightDark(tokenRef("surface-300"), tokenRef("surface-600")) },
|
|
2576
|
+
headerCell: { fontWeight: tokenRef("font-weight-bold") },
|
|
2577
|
+
footerCell: { fontWeight: tokenRef("font-weight-bold") }
|
|
2578
|
+
},
|
|
2579
|
+
tree: { node: {
|
|
2580
|
+
borderRadius: radius$2,
|
|
2581
|
+
focusRing: { offset: "-2px" }
|
|
2582
|
+
} }
|
|
2583
|
+
};
|
|
2584
|
+
const edgeStyle = {
|
|
2585
|
+
label: "Edge",
|
|
2586
|
+
light: edgeLight,
|
|
2587
|
+
dark: edgeDark,
|
|
2588
|
+
components: {
|
|
2589
|
+
...edgeFormsTokens,
|
|
2590
|
+
...edgeControlsTokens,
|
|
2591
|
+
...edgeDisplayTokens,
|
|
2592
|
+
...edgeOverlaysTokens,
|
|
2593
|
+
...edgeDataTokens
|
|
2594
|
+
}
|
|
2595
|
+
};
|
|
2596
|
+
const shadow = {
|
|
2597
|
+
field: "none",
|
|
2598
|
+
overlay: "0 18px 44px -16px rgba(12, 16, 21, 0.26), 0 4px 12px -4px rgba(12, 16, 21, 0.08)",
|
|
2599
|
+
modal: "0 40px 80px -28px rgba(12, 16, 21, 0.4), 0 8px 24px -8px rgba(12, 16, 21, 0.12)"
|
|
2600
|
+
};
|
|
2601
|
+
function softLight({ surface }) {
|
|
2602
|
+
return {
|
|
2603
|
+
surface: {
|
|
2604
|
+
border: surface[100],
|
|
2605
|
+
overlayBorder: "transparent"
|
|
2606
|
+
},
|
|
2607
|
+
field: { disabledBackground: surface[200] },
|
|
2608
|
+
shadow
|
|
2609
|
+
};
|
|
2610
|
+
}
|
|
2611
|
+
function softDark({ surface }) {
|
|
2612
|
+
return {
|
|
2613
|
+
surface: {
|
|
2614
|
+
border: surface[800],
|
|
2615
|
+
overlayBorder: surface[800]
|
|
2616
|
+
},
|
|
2617
|
+
field: { disabledBackground: surface[700] },
|
|
2618
|
+
shadow
|
|
2619
|
+
};
|
|
2620
|
+
}
|
|
2621
|
+
const softGlow = (color) => lightDark(fade(tokenRef(color), "72%"), fade(tokenRef(color), "62%"));
|
|
2622
|
+
const softFocusShadow = (color = "primary-base") => `0 0 0 3px ${softGlow(color)}`;
|
|
2623
|
+
const softFill = lightDark(tokenRef("surface-100"), tokenRef("surface-800"));
|
|
2624
|
+
const softFillHover = lightDark(tokenRef("surface-200"), tokenRef("surface-700"));
|
|
2625
|
+
const softLine = lightDark(tokenRef("surface-300"), tokenRef("surface-600"));
|
|
2626
|
+
const softCardShadow = `0 1px 2px ${fade(tokenRef("surface-950"), "96%")}, 0 8px 24px -12px ${fade(tokenRef("surface-950"), "86%")}`;
|
|
2627
|
+
const softFormsTokens = {
|
|
2628
|
+
formField: { root: {
|
|
2629
|
+
background: softFill,
|
|
2630
|
+
filledBackground: softFill,
|
|
2631
|
+
filledHoverBackground: softFillHover,
|
|
2632
|
+
filledFocusBackground: lightDark(tokenRef("surface-0"), tokenRef("surface-900")),
|
|
2633
|
+
borderColor: softFill,
|
|
2634
|
+
hoverBorderColor: softLine,
|
|
2635
|
+
shadow: "none",
|
|
2636
|
+
borderRadius: tokenRef("radius-xl"),
|
|
2637
|
+
paddingX: "14px",
|
|
2638
|
+
sm: { paddingX: "12px" },
|
|
2639
|
+
lg: { paddingX: "16px" },
|
|
2640
|
+
focusRing: { shadow: softFocusShadow() },
|
|
2641
|
+
invalidFocusRing: { shadow: softFocusShadow("danger-base") }
|
|
2642
|
+
} },
|
|
2643
|
+
inputGroup: { addon: {
|
|
2644
|
+
background: softFillHover,
|
|
2645
|
+
borderColor: softFill
|
|
2646
|
+
} },
|
|
2647
|
+
select: {
|
|
2648
|
+
overlay: { borderRadius: tokenRef("radius-xl") },
|
|
2649
|
+
list: {
|
|
2650
|
+
padding: "6px",
|
|
2651
|
+
gap: "2px"
|
|
2652
|
+
},
|
|
2653
|
+
option: {
|
|
2654
|
+
padding: "8px 12px",
|
|
2655
|
+
borderRadius: tokenRef("radius-lg")
|
|
2656
|
+
},
|
|
2657
|
+
chip: { borderRadius: tokenRef("radius-full") },
|
|
2658
|
+
checkbox: {
|
|
2659
|
+
borderRadius: "6px",
|
|
2660
|
+
borderColor: softLine
|
|
2661
|
+
}
|
|
2662
|
+
},
|
|
2663
|
+
listbox: { root: { focusRingShadow: softFocusShadow() } },
|
|
2664
|
+
chipsInput: { root: { chipBorderRadius: tokenRef("radius-full") } },
|
|
2665
|
+
password: { panel: { borderRadius: tokenRef("radius-xl") } }
|
|
2666
|
+
};
|
|
2667
|
+
const focus = (color) => ({ focusRing: {
|
|
2668
|
+
color: "transparent",
|
|
2669
|
+
shadow: softFocusShadow(color)
|
|
2670
|
+
} });
|
|
2671
|
+
const tonal = (amount) => mix(tokenRef("primary-base"), amount, tokenRef("surface-card"));
|
|
2672
|
+
const glowRing = {
|
|
2673
|
+
focusRingColor: softGlow("primary-base"),
|
|
2674
|
+
focusRingWidth: "3px",
|
|
2675
|
+
focusRingOffset: "0"
|
|
2676
|
+
};
|
|
2677
|
+
const softControlsTokens = {
|
|
2678
|
+
button: { root: {
|
|
2679
|
+
borderRadius: "22px",
|
|
2680
|
+
paddingX: "16px",
|
|
2681
|
+
sm: { paddingX: "12px" },
|
|
2682
|
+
lg: { paddingX: "20px" },
|
|
2683
|
+
focusRing: {
|
|
2684
|
+
width: "0",
|
|
2685
|
+
style: "none",
|
|
2686
|
+
offset: "0"
|
|
2687
|
+
},
|
|
2688
|
+
primary: focus("primary-base"),
|
|
2689
|
+
secondary: {
|
|
2690
|
+
background: tonal("12%"),
|
|
2691
|
+
hoverBackground: tonal("18%"),
|
|
2692
|
+
activeBackground: tonal("26%"),
|
|
2693
|
+
borderColor: tonal("12%"),
|
|
2694
|
+
hoverBorderColor: tonal("18%"),
|
|
2695
|
+
activeBorderColor: tonal("26%"),
|
|
2696
|
+
color: tokenRef("primary-soft-text"),
|
|
2697
|
+
hoverColor: tokenRef("primary-soft-text"),
|
|
2698
|
+
activeColor: tokenRef("primary-soft-text"),
|
|
2699
|
+
...focus("primary-base")
|
|
2700
|
+
},
|
|
2701
|
+
info: focus("info-base"),
|
|
2702
|
+
success: focus("success-base"),
|
|
2703
|
+
warn: focus("warn-base"),
|
|
2704
|
+
help: focus("help-base"),
|
|
2705
|
+
danger: focus("danger-base"),
|
|
2706
|
+
contrast: focus("contrast-base")
|
|
2707
|
+
} },
|
|
2708
|
+
toggleButton: {
|
|
2709
|
+
root: {
|
|
2710
|
+
borderRadius: tokenRef("radius-full"),
|
|
2711
|
+
borderColor: "transparent",
|
|
2712
|
+
checkedBorderColor: "transparent",
|
|
2713
|
+
focusRing: {
|
|
2714
|
+
width: "3px",
|
|
2715
|
+
color: softGlow("primary-base"),
|
|
2716
|
+
offset: "0"
|
|
2717
|
+
}
|
|
2718
|
+
},
|
|
2719
|
+
content: { borderRadius: tokenRef("radius-full") }
|
|
2720
|
+
},
|
|
2721
|
+
checkbox: { root: {
|
|
2722
|
+
borderRadius: "6px",
|
|
2723
|
+
borderColor: softLine,
|
|
2724
|
+
hoverBorderColor: tokenRef("primary-base"),
|
|
2725
|
+
disabledBorderColor: softLine,
|
|
2726
|
+
...glowRing
|
|
2727
|
+
} },
|
|
2728
|
+
radioButton: {
|
|
2729
|
+
root: {
|
|
2730
|
+
borderColor: softLine,
|
|
2731
|
+
hoverBorderColor: tokenRef("primary-base"),
|
|
2732
|
+
disabledBorderColor: softLine,
|
|
2733
|
+
...glowRing
|
|
2734
|
+
},
|
|
2735
|
+
tile: {
|
|
2736
|
+
borderRadius: tokenRef("radius-xl"),
|
|
2737
|
+
borderColor: "transparent",
|
|
2738
|
+
background: lightDark(tokenRef("surface-100"), tokenRef("surface-800"))
|
|
2739
|
+
}
|
|
2740
|
+
},
|
|
2741
|
+
toggleSwitch: { root: {
|
|
2742
|
+
background: softFillHover,
|
|
2743
|
+
...glowRing
|
|
2744
|
+
} },
|
|
2745
|
+
rating: { root: glowRing },
|
|
2746
|
+
knob: { root: glowRing },
|
|
2747
|
+
slider: { handle: glowRing }
|
|
2748
|
+
};
|
|
2749
|
+
const softDisplayTokens = {
|
|
2750
|
+
card: { root: {
|
|
2751
|
+
borderRadius: "22px",
|
|
2752
|
+
shadow: softCardShadow
|
|
2753
|
+
} },
|
|
2754
|
+
panel: { root: { borderRadius: "22px" } },
|
|
2755
|
+
fieldset: { root: {
|
|
2756
|
+
borderRadius: "18px",
|
|
2757
|
+
legendBorderRadius: tokenRef("radius-full")
|
|
2758
|
+
} },
|
|
2759
|
+
tag: {
|
|
2760
|
+
root: {
|
|
2761
|
+
borderRadius: tokenRef("radius-full"),
|
|
2762
|
+
paddingX: "9px"
|
|
2763
|
+
},
|
|
2764
|
+
sm: { paddingX: "7px" },
|
|
2765
|
+
lg: { paddingX: "12px" }
|
|
2766
|
+
},
|
|
2767
|
+
chip: { root: { background: softFill } },
|
|
2768
|
+
message: { root: {
|
|
2769
|
+
borderRadius: "16px",
|
|
2770
|
+
borderWidth: "0"
|
|
2771
|
+
} },
|
|
2772
|
+
avatar: { root: { squareBorderRadius: tokenRef("radius-xl") } },
|
|
2773
|
+
skeleton: { root: { borderRadius: tokenRef("radius-lg") } }
|
|
2774
|
+
};
|
|
2775
|
+
const softOverlaysTokens = {
|
|
2776
|
+
tooltip: { root: { borderRadius: tokenRef("radius-xl") } },
|
|
2777
|
+
popover: { root: { borderRadius: "18px" } },
|
|
2778
|
+
dialog: { root: { borderRadius: "26px" } },
|
|
2779
|
+
confirm: {
|
|
2780
|
+
root: { borderRadius: "26px" },
|
|
2781
|
+
popup: { borderRadius: "18px" }
|
|
2782
|
+
},
|
|
2783
|
+
menu: {
|
|
2784
|
+
root: {
|
|
2785
|
+
borderRadius: tokenRef("radius-xl"),
|
|
2786
|
+
padding: "6px"
|
|
2787
|
+
},
|
|
2788
|
+
item: {
|
|
2789
|
+
padding: "8px 12px",
|
|
2790
|
+
borderRadius: tokenRef("radius-lg")
|
|
2791
|
+
}
|
|
2792
|
+
}
|
|
2793
|
+
};
|
|
2794
|
+
const softDataTokens = {
|
|
2795
|
+
paginator: {
|
|
2796
|
+
root: { borderRadius: tokenRef("radius-full") },
|
|
2797
|
+
navButton: {
|
|
2798
|
+
borderRadius: tokenRef("radius-full"),
|
|
2799
|
+
focusRing: {
|
|
2800
|
+
width: "0",
|
|
2801
|
+
shadow: softFocusShadow()
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
},
|
|
2805
|
+
tree: { node: { borderRadius: tokenRef("radius-lg") } },
|
|
2806
|
+
dataView: { root: { borderRadius: "22px" } }
|
|
2807
|
+
};
|
|
2808
|
+
const softStyle = {
|
|
2809
|
+
label: "Soft",
|
|
2810
|
+
light: softLight,
|
|
2811
|
+
dark: softDark,
|
|
2812
|
+
components: {
|
|
2813
|
+
...softFormsTokens,
|
|
2814
|
+
...softControlsTokens,
|
|
2815
|
+
...softDisplayTokens,
|
|
2816
|
+
...softOverlaysTokens,
|
|
2817
|
+
...softDataTokens
|
|
2818
|
+
}
|
|
2819
|
+
};
|
|
2820
|
+
function paperLight({ accent, surface }) {
|
|
2821
|
+
const base = accent[primaryBaseStep(accent)];
|
|
2822
|
+
return {
|
|
2823
|
+
primary: {
|
|
2824
|
+
hover: accent[400],
|
|
2825
|
+
active: accent[300]
|
|
2826
|
+
},
|
|
2827
|
+
surface: {
|
|
2828
|
+
border: surface[300],
|
|
2829
|
+
overlayBorder: surface[0]
|
|
2830
|
+
},
|
|
2831
|
+
text: { mutedHover: surface[600] },
|
|
2832
|
+
field: {
|
|
2833
|
+
border: surface[400],
|
|
2834
|
+
hoverBorder: surface[900],
|
|
2835
|
+
disabledBackground: surface[300],
|
|
2836
|
+
placeholder: surface[600],
|
|
2837
|
+
icon: surface[600]
|
|
2838
|
+
},
|
|
2839
|
+
highlight: {
|
|
2840
|
+
background: `color-mix(in srgb, ${base}, transparent 88%)`,
|
|
2841
|
+
focusBackground: `color-mix(in srgb, ${base}, transparent 76%)`
|
|
2842
|
+
},
|
|
2843
|
+
mask: { background: "rgba(0, 0, 0, 0.32)" }
|
|
2844
|
+
};
|
|
2845
|
+
}
|
|
2846
|
+
function paperDark({ surface }) {
|
|
2847
|
+
return {
|
|
2848
|
+
surface: {
|
|
2849
|
+
border: surface[700],
|
|
2850
|
+
overlayBorder: surface[900]
|
|
2851
|
+
},
|
|
2852
|
+
field: {
|
|
2853
|
+
border: surface[600],
|
|
2854
|
+
hoverBorder: surface[400],
|
|
2855
|
+
placeholder: surface[400],
|
|
2856
|
+
icon: surface[400]
|
|
2857
|
+
}
|
|
2858
|
+
};
|
|
2859
|
+
}
|
|
2860
|
+
const invalidColor = lightDark(tokenRef("red-800"), tokenRef("red-300"));
|
|
2861
|
+
const dropdownShadow = "0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12)";
|
|
2862
|
+
const popoverShadow = "0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12)";
|
|
2863
|
+
const paperFormsTokens = {
|
|
2864
|
+
formField: { root: {
|
|
2865
|
+
filledBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
2866
|
+
filledHoverBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
2867
|
+
filledFocusBackground: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
2868
|
+
invalidBorderColor: invalidColor,
|
|
2869
|
+
placeholderColor: tokenRef("field-placeholder"),
|
|
2870
|
+
invalidPlaceholderColor: invalidColor,
|
|
2871
|
+
iconColor: tokenRef("field-icon"),
|
|
2872
|
+
shadow: "none",
|
|
2873
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2874
|
+
paddingY: "8.75px",
|
|
2875
|
+
sm: { paddingY: "7px" },
|
|
2876
|
+
lg: { paddingY: "10.5px" },
|
|
2877
|
+
focusRing: {
|
|
2878
|
+
width: "2px",
|
|
2879
|
+
style: "solid",
|
|
2880
|
+
color: tokenRef("focus-ring-color"),
|
|
2881
|
+
offset: "-2px"
|
|
2882
|
+
}
|
|
2883
|
+
} },
|
|
2884
|
+
inputGroup: { addon: {
|
|
2885
|
+
color: tokenRef("form-field-icon-color"),
|
|
2886
|
+
paddingX: "8.75px",
|
|
2887
|
+
minWidth: "36.75px"
|
|
2888
|
+
} },
|
|
2889
|
+
label: { root: { gap: "7px" } },
|
|
2890
|
+
floatLabel: {
|
|
2891
|
+
root: {
|
|
2892
|
+
invalidColor,
|
|
2893
|
+
fontWeight: tokenRef("font-weight-medium")
|
|
2894
|
+
},
|
|
2895
|
+
in: {
|
|
2896
|
+
input: {
|
|
2897
|
+
paddingTop: "17.5px",
|
|
2898
|
+
paddingBottom: "7px"
|
|
2899
|
+
},
|
|
2900
|
+
active: { top: "7px" }
|
|
2901
|
+
}
|
|
2902
|
+
},
|
|
2903
|
+
iftaLabel: {
|
|
2904
|
+
root: {
|
|
2905
|
+
invalidColor,
|
|
2906
|
+
top: "7px",
|
|
2907
|
+
fontWeight: tokenRef("font-weight-regular")
|
|
2908
|
+
},
|
|
2909
|
+
input: {
|
|
2910
|
+
paddingTop: "17.5px",
|
|
2911
|
+
paddingBottom: "7px"
|
|
2912
|
+
}
|
|
2913
|
+
},
|
|
2914
|
+
password: {
|
|
2915
|
+
panel: {
|
|
2916
|
+
padding: "12.25px",
|
|
2917
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2918
|
+
shadow: popoverShadow
|
|
2919
|
+
},
|
|
2920
|
+
meter: {
|
|
2921
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2922
|
+
background: lightDark(tokenRef("surface-300"), tokenRef("surface-700"))
|
|
2923
|
+
}
|
|
2924
|
+
},
|
|
2925
|
+
inputOtp: {
|
|
2926
|
+
root: { cellWidth: "36.75px" },
|
|
2927
|
+
sm: { cellWidth: "31.5px" },
|
|
2928
|
+
lg: { cellWidth: "42px" }
|
|
2929
|
+
},
|
|
2930
|
+
inputNumber: { button: { width: "36.75px" } },
|
|
2931
|
+
select: {
|
|
2932
|
+
overlay: {
|
|
2933
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2934
|
+
shadow: dropdownShadow
|
|
2935
|
+
},
|
|
2936
|
+
list: {
|
|
2937
|
+
paddingBlock: "7px",
|
|
2938
|
+
paddingInline: "0px",
|
|
2939
|
+
gap: "0px"
|
|
2940
|
+
},
|
|
2941
|
+
option: {
|
|
2942
|
+
padding: "8.75px 12.25px",
|
|
2943
|
+
borderRadius: "0",
|
|
2944
|
+
checkColor: tokenRef("text-primary"),
|
|
2945
|
+
multiple: {
|
|
2946
|
+
selectedBackground: tokenRef("highlight-background"),
|
|
2947
|
+
selectedFocusBackground: tokenRef("highlight-focus-background"),
|
|
2948
|
+
selectedColor: tokenRef("highlight-color"),
|
|
2949
|
+
selectedFocusColor: tokenRef("highlight-focus-color")
|
|
2950
|
+
}
|
|
2951
|
+
},
|
|
2952
|
+
optionGroup: {
|
|
2953
|
+
padding: "8.75px 12.25px",
|
|
2954
|
+
color: tokenRef("text-primary"),
|
|
2955
|
+
fontWeight: tokenRef("font-weight-bold")
|
|
2956
|
+
},
|
|
2957
|
+
filter: { padding: "8.75px 12.25px" },
|
|
2958
|
+
header: { padding: "8.75px 12.25px" },
|
|
2959
|
+
empty: { padding: "8.75px 12.25px" },
|
|
2960
|
+
dropdownButton: { width: "36.75px" }
|
|
2961
|
+
},
|
|
2962
|
+
colorPicker: {
|
|
2963
|
+
root: { swatchSize: "24.5px" },
|
|
2964
|
+
panel: {
|
|
2965
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2966
|
+
shadow: popoverShadow
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
};
|
|
2970
|
+
const steps = (palette, light, dark) => lightDark(tokenRef(`${palette}-${light}`), tokenRef(`${palette}-${dark}`));
|
|
2971
|
+
const elevation$1 = "0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)";
|
|
2972
|
+
const noFocusRing = {
|
|
2973
|
+
focusRingColor: "transparent",
|
|
2974
|
+
focusRingWidth: "0",
|
|
2975
|
+
focusRingOffset: "0"
|
|
2976
|
+
};
|
|
2977
|
+
const paperControlsTokens = {
|
|
2978
|
+
button: {
|
|
2979
|
+
root: {
|
|
2980
|
+
borderRadius: tokenRef("radius-sm"),
|
|
2981
|
+
roundedBorderRadius: "24.5px",
|
|
2982
|
+
paddingX: "12.25px",
|
|
2983
|
+
paddingY: "10.75px",
|
|
2984
|
+
iconOnlyWidth: "40.5px",
|
|
2985
|
+
sm: {
|
|
2986
|
+
paddingY: "8px",
|
|
2987
|
+
iconOnlyWidth: "34px"
|
|
2988
|
+
},
|
|
2989
|
+
lg: {
|
|
2990
|
+
paddingY: "12.25px",
|
|
2991
|
+
iconOnlyWidth: "46.5px"
|
|
2992
|
+
},
|
|
2993
|
+
focusRing: {
|
|
2994
|
+
width: "0",
|
|
2995
|
+
style: "none",
|
|
2996
|
+
offset: "0"
|
|
2997
|
+
},
|
|
2998
|
+
badgeSize: "12.25px"
|
|
2999
|
+
},
|
|
3000
|
+
outlined: {
|
|
3001
|
+
primary: { borderColor: lightDark(tokenRef("primary-base"), tokenRef("primary-700")) },
|
|
3002
|
+
secondary: {
|
|
3003
|
+
borderColor: steps("surface", 600, 700),
|
|
3004
|
+
color: steps("surface", 600, 400)
|
|
3005
|
+
},
|
|
3006
|
+
success: { borderColor: steps("green", 500, 700) },
|
|
3007
|
+
info: { borderColor: steps("sky", 500, 700) },
|
|
3008
|
+
warn: { borderColor: steps("orange", 500, 700) },
|
|
3009
|
+
help: { borderColor: steps("purple", 500, 700) },
|
|
3010
|
+
danger: { borderColor: steps("red", 500, 700) },
|
|
3011
|
+
contrast: { borderColor: steps("surface", 950, 500) },
|
|
3012
|
+
plain: {
|
|
3013
|
+
borderColor: steps("surface", 900, 600),
|
|
3014
|
+
color: steps("surface", 900, 0)
|
|
3015
|
+
}
|
|
3016
|
+
},
|
|
3017
|
+
text: {
|
|
3018
|
+
secondary: { color: steps("surface", 600, 400) },
|
|
3019
|
+
plain: { color: steps("surface", 900, 0) }
|
|
3020
|
+
}
|
|
3021
|
+
},
|
|
3022
|
+
toggleButton: {
|
|
3023
|
+
root: {
|
|
3024
|
+
padding: "8.75px 12.25px",
|
|
3025
|
+
borderRadius: tokenRef("radius-sm"),
|
|
3026
|
+
background: tokenRef("form-field-background"),
|
|
3027
|
+
checkedBackground: steps("surface", 200, 700),
|
|
3028
|
+
hoverBackground: steps("surface", 100, 800),
|
|
3029
|
+
borderColor: tokenRef("form-field-border-color"),
|
|
3030
|
+
checkedBorderColor: tokenRef("form-field-border-color"),
|
|
3031
|
+
color: tokenRef("form-field-color"),
|
|
3032
|
+
hoverColor: tokenRef("form-field-color"),
|
|
3033
|
+
focusRing: {
|
|
3034
|
+
width: "0",
|
|
3035
|
+
style: "none",
|
|
3036
|
+
color: "transparent",
|
|
3037
|
+
offset: "0"
|
|
3038
|
+
},
|
|
3039
|
+
sm: { padding: "7px 8.75px" },
|
|
3040
|
+
lg: { padding: "10.5px 15.75px" }
|
|
3041
|
+
},
|
|
3042
|
+
icon: {
|
|
3043
|
+
color: tokenRef("text-muted"),
|
|
3044
|
+
hoverColor: tokenRef("text-muted"),
|
|
3045
|
+
checkedColor: tokenRef("text-muted")
|
|
3046
|
+
},
|
|
3047
|
+
content: {
|
|
3048
|
+
padding: "0",
|
|
3049
|
+
borderRadius: "0",
|
|
3050
|
+
checkedBackground: "transparent",
|
|
3051
|
+
checkedShadow: "none",
|
|
3052
|
+
sm: { padding: "0" },
|
|
3053
|
+
lg: { padding: "0" }
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3056
|
+
checkbox: {
|
|
3057
|
+
root: {
|
|
3058
|
+
borderRadius: tokenRef("radius-xs"),
|
|
3059
|
+
borderWidth: "2px",
|
|
3060
|
+
checkedHoverBackground: tokenRef("primary-base"),
|
|
3061
|
+
checkedHoverBorderColor: tokenRef("primary-base"),
|
|
3062
|
+
...noFocusRing
|
|
3063
|
+
},
|
|
3064
|
+
sm: { size: "14px" }
|
|
3065
|
+
},
|
|
3066
|
+
radioButton: {
|
|
3067
|
+
root: {
|
|
3068
|
+
size: "20px",
|
|
3069
|
+
borderWidth: "2px",
|
|
3070
|
+
checkedBackground: tokenRef("primary-contrast"),
|
|
3071
|
+
checkedHoverBackground: tokenRef("primary-contrast"),
|
|
3072
|
+
checkedHoverBorderColor: tokenRef("primary-base"),
|
|
3073
|
+
dotSize: "10px",
|
|
3074
|
+
dotColor: tokenRef("primary-base"),
|
|
3075
|
+
...noFocusRing
|
|
3076
|
+
},
|
|
3077
|
+
sm: { dotSize: "8px" },
|
|
3078
|
+
lg: {
|
|
3079
|
+
size: "24px",
|
|
3080
|
+
dotSize: "12px"
|
|
3081
|
+
}
|
|
3082
|
+
},
|
|
3083
|
+
toggleSwitch: {
|
|
3084
|
+
root: {
|
|
3085
|
+
width: "33.25px",
|
|
3086
|
+
height: "12.25px",
|
|
3087
|
+
gutter: "0px",
|
|
3088
|
+
hoverBackground: steps("surface", 300, 700),
|
|
3089
|
+
checkedBackground: lightDark(tokenRef("primary-200"), tokenRef("primary-base")),
|
|
3090
|
+
checkedHoverBackground: lightDark(tokenRef("primary-200"), tokenRef("primary-base")),
|
|
3091
|
+
disabledBackground: steps("surface", 400, 600),
|
|
3092
|
+
...noFocusRing
|
|
3093
|
+
},
|
|
3094
|
+
handle: {
|
|
3095
|
+
size: "17.5px",
|
|
3096
|
+
checkedBackground: lightDark(tokenRef("primary-base"), tokenRef("primary-200")),
|
|
3097
|
+
disabledBackground: steps("surface", 200, 500),
|
|
3098
|
+
shadow: elevation$1,
|
|
3099
|
+
iconColor: lightDark(tokenRef("text-muted"), tokenRef("surface-800")),
|
|
3100
|
+
checkedIconColor: tokenRef("primary-contrast")
|
|
3101
|
+
}
|
|
3102
|
+
},
|
|
3103
|
+
rating: { root: {
|
|
3104
|
+
gap: "7px",
|
|
3105
|
+
iconSize: "15.75px"
|
|
3106
|
+
} },
|
|
3107
|
+
knob: { root: {
|
|
3108
|
+
focusRingColor: steps("surface", 200, 700),
|
|
3109
|
+
focusRingWidth: "4px",
|
|
3110
|
+
focusRingOffset: "0"
|
|
3111
|
+
} },
|
|
3112
|
+
slider: {
|
|
3113
|
+
root: {
|
|
3114
|
+
trackSize: "2px",
|
|
3115
|
+
trackBorderRadius: tokenRef("radius-xs")
|
|
3116
|
+
},
|
|
3117
|
+
handle: {
|
|
3118
|
+
background: tokenRef("primary-base"),
|
|
3119
|
+
borderWidth: "0px",
|
|
3120
|
+
shadow: "0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12)",
|
|
3121
|
+
hoverRing: `0 0 1px 10px ${fade(tokenRef("primary-base"), "92%")}`,
|
|
3122
|
+
...noFocusRing
|
|
3123
|
+
}
|
|
3124
|
+
}
|
|
3125
|
+
};
|
|
3126
|
+
function solid(severity) {
|
|
3127
|
+
return {
|
|
3128
|
+
background: tokenRef(`${severity}-base`),
|
|
3129
|
+
color: tokenRef(`${severity}-contrast`)
|
|
3130
|
+
};
|
|
3131
|
+
}
|
|
3132
|
+
const paperDisplayTokens = {
|
|
3133
|
+
badge: { root: { padding: "0 7px" } },
|
|
3134
|
+
tag: {
|
|
3135
|
+
root: {
|
|
3136
|
+
paddingY: "3.5px",
|
|
3137
|
+
tint: "100%"
|
|
3138
|
+
},
|
|
3139
|
+
primary: solid("primary"),
|
|
3140
|
+
secondary: {
|
|
3141
|
+
background: lightDark(tokenRef("surface-100"), tokenRef("surface-800")),
|
|
3142
|
+
color: lightDark(tokenRef("surface-600"), tokenRef("surface-300"))
|
|
3143
|
+
},
|
|
3144
|
+
success: solid("success"),
|
|
3145
|
+
info: solid("info"),
|
|
3146
|
+
warn: solid("warn"),
|
|
3147
|
+
danger: solid("danger"),
|
|
3148
|
+
help: solid("help"),
|
|
3149
|
+
contrast: solid("contrast")
|
|
3150
|
+
},
|
|
3151
|
+
pill: { root: {
|
|
3152
|
+
paddingX: "7px",
|
|
3153
|
+
paddingY: "3.5px"
|
|
3154
|
+
} },
|
|
3155
|
+
chip: { root: {
|
|
3156
|
+
height: "36.75px",
|
|
3157
|
+
gap: "7px",
|
|
3158
|
+
background: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
3159
|
+
imageSize: "28px",
|
|
3160
|
+
iconColor: lightDark(tokenRef("surface-600"), tokenRef("surface-0")),
|
|
3161
|
+
removeColor: lightDark(tokenRef("surface-600"), tokenRef("surface-0")),
|
|
3162
|
+
focusRingWidth: "0",
|
|
3163
|
+
focusRingOffset: "0",
|
|
3164
|
+
focusRingShadow: `0 0 1px 4px ${lightDark(tokenRef("surface-300"), tokenRef("surface-600"))}`
|
|
3165
|
+
} },
|
|
3166
|
+
message: {
|
|
3167
|
+
root: {
|
|
3168
|
+
borderRadius: tokenRef("radius-sm"),
|
|
3169
|
+
borderWidth: "0",
|
|
3170
|
+
paddingY: "12.25px",
|
|
3171
|
+
paddingStart: "15.75px",
|
|
3172
|
+
paddingEnd: "15.75px"
|
|
3173
|
+
},
|
|
3174
|
+
icon: { fontSize: "15.75px" },
|
|
3175
|
+
closeButton: { size: "24.5px" },
|
|
3176
|
+
sm: {
|
|
3177
|
+
paddingY: "7px",
|
|
3178
|
+
paddingStart: "7px",
|
|
3179
|
+
paddingEnd: "7px"
|
|
3180
|
+
},
|
|
3181
|
+
lg: {
|
|
3182
|
+
paddingY: "10.5px",
|
|
3183
|
+
paddingStart: "10.5px",
|
|
3184
|
+
paddingEnd: "10.5px",
|
|
3185
|
+
iconFontSize: "17.5px"
|
|
3186
|
+
}
|
|
3187
|
+
},
|
|
3188
|
+
progressBar: { root: {
|
|
3189
|
+
borderRadius: tokenRef("radius-sm"),
|
|
3190
|
+
trackBackground: tokenRef("surface-border")
|
|
3191
|
+
} },
|
|
3192
|
+
skeleton: { root: { borderRadius: tokenRef("radius-sm") } },
|
|
3193
|
+
avatar: { root: {
|
|
3194
|
+
squareBorderRadius: tokenRef("radius-sm"),
|
|
3195
|
+
background: tokenRef("surface-border"),
|
|
3196
|
+
color: tokenRef("text-primary")
|
|
3197
|
+
} },
|
|
3198
|
+
divider: { root: {
|
|
3199
|
+
contentColor: tokenRef("text-primary"),
|
|
3200
|
+
contentGap: "7px"
|
|
3201
|
+
} },
|
|
3202
|
+
card: { root: {
|
|
3203
|
+
borderRadius: tokenRef("radius-sm"),
|
|
3204
|
+
shadow: "0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12)",
|
|
3205
|
+
padding: "17.5px",
|
|
3206
|
+
gap: "8.75px",
|
|
3207
|
+
subtitleFontSize: "12.25px"
|
|
3208
|
+
} },
|
|
3209
|
+
panel: { root: {
|
|
3210
|
+
borderRadius: tokenRef("radius-sm"),
|
|
3211
|
+
padding: "15.75px"
|
|
3212
|
+
} },
|
|
3213
|
+
fieldset: { root: {
|
|
3214
|
+
borderRadius: tokenRef("radius-sm"),
|
|
3215
|
+
padding: "0 15.75px 15.75px 15.75px",
|
|
3216
|
+
legendBorderRadius: tokenRef("radius-sm"),
|
|
3217
|
+
legendPadding: "8.75px 12.25px",
|
|
3218
|
+
togglePadding: "8.75px 12.25px",
|
|
3219
|
+
legendFocusBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700")),
|
|
3220
|
+
focusRingWidth: "0",
|
|
3221
|
+
focusRingOffset: "0"
|
|
3222
|
+
} }
|
|
3223
|
+
};
|
|
3224
|
+
const radius$1 = tokenRef("radius-sm");
|
|
3225
|
+
const elevatedShadow = "0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12)";
|
|
3226
|
+
const popoverPadding = "12.25px";
|
|
3227
|
+
const modalPadding = "17.5px";
|
|
3228
|
+
const itemPadding = "8.75px 12.25px";
|
|
3229
|
+
const iconColor = lightDark(tokenRef("surface-600"), tokenRef("surface-400"));
|
|
3230
|
+
const paperOverlaysTokens = {
|
|
3231
|
+
tooltip: { root: {
|
|
3232
|
+
background: tokenRef("surface-600"),
|
|
3233
|
+
color: tokenRef("surface-0"),
|
|
3234
|
+
maxWidth: "154px",
|
|
3235
|
+
padding: "7px 8.75px",
|
|
3236
|
+
borderRadius: radius$1,
|
|
3237
|
+
fontSize: "8.75px",
|
|
3238
|
+
shadow: elevatedShadow
|
|
3239
|
+
} },
|
|
3240
|
+
popover: {
|
|
3241
|
+
root: {
|
|
3242
|
+
borderRadius: radius$1,
|
|
3243
|
+
shadow: elevatedShadow
|
|
3244
|
+
},
|
|
3245
|
+
header: { padding: `${popoverPadding} ${popoverPadding} 0` },
|
|
3246
|
+
content: { padding: popoverPadding },
|
|
3247
|
+
footer: { padding: `0 ${popoverPadding} ${popoverPadding}` }
|
|
3248
|
+
},
|
|
3249
|
+
toast: {
|
|
3250
|
+
root: { width: "min(306.25px, calc(100vw - 28px))" },
|
|
3251
|
+
item: {
|
|
3252
|
+
ringColor: "transparent",
|
|
3253
|
+
shadow: "0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)",
|
|
3254
|
+
borderRadius: radius$1,
|
|
3255
|
+
paddingY: popoverPadding,
|
|
3256
|
+
paddingStart: popoverPadding,
|
|
3257
|
+
paddingEnd: popoverPadding,
|
|
3258
|
+
loadingPaddingEnd: popoverPadding
|
|
3259
|
+
},
|
|
3260
|
+
closeButton: { size: "24.5px" },
|
|
3261
|
+
focusRing: { shadow: `0 0 1px 4px ${lightDark(tokenRef("surface-200"), tokenRef("surface-700"))}` }
|
|
3262
|
+
},
|
|
3263
|
+
dialog: {
|
|
3264
|
+
root: {
|
|
3265
|
+
borderColor: tokenRef("surface-overlay-border"),
|
|
3266
|
+
borderRadius: radius$1,
|
|
3267
|
+
shadow: elevatedShadow
|
|
3268
|
+
},
|
|
3269
|
+
header: { padding: modalPadding },
|
|
3270
|
+
content: {
|
|
3271
|
+
padding: `0 ${modalPadding}`,
|
|
3272
|
+
lastPaddingBottom: modalPadding
|
|
3273
|
+
},
|
|
3274
|
+
footer: { padding: modalPadding },
|
|
3275
|
+
drawer: {
|
|
3276
|
+
headerPadding: modalPadding,
|
|
3277
|
+
titleFontSize: "17.5px",
|
|
3278
|
+
contentPadding: modalPadding,
|
|
3279
|
+
footerPadding: modalPadding
|
|
3280
|
+
}
|
|
3281
|
+
},
|
|
3282
|
+
confirm: {
|
|
3283
|
+
message: { color: tokenRef("text-primary") },
|
|
3284
|
+
popup: {
|
|
3285
|
+
borderRadius: radius$1,
|
|
3286
|
+
shadow: elevatedShadow,
|
|
3287
|
+
padding: popoverPadding,
|
|
3288
|
+
gap: popoverPadding,
|
|
3289
|
+
footerGap: "7px"
|
|
3290
|
+
}
|
|
3291
|
+
},
|
|
3292
|
+
menu: {
|
|
3293
|
+
root: {
|
|
3294
|
+
borderRadius: radius$1,
|
|
3295
|
+
shadow: "0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12)",
|
|
3296
|
+
padding: "7px 0",
|
|
3297
|
+
gap: "0"
|
|
3298
|
+
},
|
|
3299
|
+
item: {
|
|
3300
|
+
padding: itemPadding,
|
|
3301
|
+
borderRadius: "0",
|
|
3302
|
+
activeBackground: lightDark(tokenRef("surface-200"), tokenRef("surface-700"))
|
|
3303
|
+
},
|
|
3304
|
+
icon: {
|
|
3305
|
+
color: iconColor,
|
|
3306
|
+
focusColor: iconColor
|
|
3307
|
+
},
|
|
3308
|
+
groupLabel: {
|
|
3309
|
+
padding: itemPadding,
|
|
3310
|
+
color: tokenRef("text-primary"),
|
|
3311
|
+
fontWeight: tokenRef("font-weight-bold")
|
|
3312
|
+
},
|
|
3313
|
+
popup: {
|
|
3314
|
+
borderColor: "transparent",
|
|
3315
|
+
padding: "7px 0",
|
|
3316
|
+
gap: "0",
|
|
3317
|
+
itemPadding,
|
|
3318
|
+
itemBorderRadius: "0"
|
|
3319
|
+
},
|
|
3320
|
+
context: {
|
|
3321
|
+
borderColor: "transparent",
|
|
3322
|
+
padding: "7px 0",
|
|
3323
|
+
itemPadding,
|
|
3324
|
+
itemBorderRadius: "0"
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
};
|
|
3328
|
+
const ring = `0 0 1px 4px ${lightDark(tokenRef("surface-200"), tokenRef("surface-700"))}`;
|
|
3329
|
+
const noOutline = {
|
|
3330
|
+
width: "0",
|
|
3331
|
+
style: "none",
|
|
3332
|
+
color: "transparent"
|
|
3333
|
+
};
|
|
3334
|
+
const sm = { padding: "5.25px 7px" };
|
|
3335
|
+
const lg = { padding: "12.25px 15.75px" };
|
|
3336
|
+
const paperDataTokens = {
|
|
3337
|
+
paginator: {
|
|
3338
|
+
root: {
|
|
3339
|
+
padding: "7px 12.25px",
|
|
3340
|
+
borderRadius: tokenRef("radius-sm")
|
|
3341
|
+
},
|
|
3342
|
+
navButton: { focusRing: {
|
|
3343
|
+
...noOutline,
|
|
3344
|
+
offset: "0",
|
|
3345
|
+
shadow: ring
|
|
3346
|
+
} }
|
|
3347
|
+
},
|
|
3348
|
+
table: {
|
|
3349
|
+
headerCell: {
|
|
3350
|
+
focusRing: {
|
|
3351
|
+
...noOutline,
|
|
3352
|
+
shadow: ring
|
|
3353
|
+
},
|
|
3354
|
+
sm,
|
|
3355
|
+
lg
|
|
3356
|
+
},
|
|
3357
|
+
row: { focusRing: {
|
|
3358
|
+
...noOutline,
|
|
3359
|
+
shadow: ring
|
|
3360
|
+
} },
|
|
3361
|
+
bodyCell: {
|
|
3362
|
+
sm,
|
|
3363
|
+
lg
|
|
3364
|
+
},
|
|
3365
|
+
rowToggleButton: { focusRing: {
|
|
3366
|
+
...noOutline,
|
|
3367
|
+
offset: "0",
|
|
3368
|
+
shadow: ring
|
|
3369
|
+
} }
|
|
3370
|
+
},
|
|
3371
|
+
tree: {
|
|
3372
|
+
root: { indent: "24.5px" },
|
|
3373
|
+
node: {
|
|
3374
|
+
padding: "7px 8.75px",
|
|
3375
|
+
borderRadius: tokenRef("radius-xs"),
|
|
3376
|
+
gap: "7px",
|
|
3377
|
+
focusRing: {
|
|
3378
|
+
...noOutline,
|
|
3379
|
+
shadow: ring
|
|
3380
|
+
}
|
|
3381
|
+
},
|
|
3382
|
+
nodeToggleButton: { size: "24.5px" },
|
|
3383
|
+
filter: { margin: "0 0 8.75px 0" }
|
|
3384
|
+
}
|
|
3385
|
+
};
|
|
3386
|
+
const selectHosts = [
|
|
3387
|
+
"tx-select",
|
|
3388
|
+
"tx-multiselect",
|
|
3389
|
+
"tx-autocomplete",
|
|
3390
|
+
"tx-cascade-select",
|
|
3391
|
+
"tx-tree-select"
|
|
3392
|
+
];
|
|
3393
|
+
const input = ".tx-input[data-styled][data-variant='filled']";
|
|
3394
|
+
const chips = ".tx-chips-input[data-styled][data-variant='filled']";
|
|
3395
|
+
const filledFields = [
|
|
3396
|
+
{
|
|
3397
|
+
field: input,
|
|
3398
|
+
hover: `${input}:enabled:not([readonly], .tx-input--invalid):hover`,
|
|
3399
|
+
focus: `${input}:enabled:not([readonly]):focus`,
|
|
3400
|
+
invalid: `${input}.tx-input--invalid`
|
|
3401
|
+
},
|
|
3402
|
+
...selectHosts.map((host) => {
|
|
3403
|
+
const root = `.${host}[data-styled][data-variant='filled']`;
|
|
3404
|
+
return {
|
|
3405
|
+
field: `${root} .tx-select__box`,
|
|
3406
|
+
hover: `${root}:not(.${host}--disabled, .${host}--readonly, .${host}--invalid) .tx-select__box:hover`,
|
|
3407
|
+
focus: `${root} .tx-select__box:has(.tx-select__trigger:focus)`,
|
|
3408
|
+
invalid: `${root}.${host}--invalid .tx-select__box`
|
|
3409
|
+
};
|
|
3410
|
+
}),
|
|
3411
|
+
{
|
|
3412
|
+
field: `${chips} .tx-chips-input__box`,
|
|
3413
|
+
hover: `${chips}:not(.tx-chips-input--disabled, .tx-chips-input--readonly, .tx-chips-input--invalid) .tx-chips-input__box:hover`,
|
|
3414
|
+
focus: `${chips} .tx-chips-input__box:focus-within`,
|
|
3415
|
+
invalid: `${chips}.tx-chips-input--invalid .tx-chips-input__box`
|
|
3416
|
+
}
|
|
3417
|
+
];
|
|
3418
|
+
const list = (key, prefix = "") => filledFields.map((field) => `${prefix}${field[key]}`).join(",\n");
|
|
3419
|
+
const filledInputGroup = ".tx-input-group:has([data-variant='filled']) > .tx-input-group-addon";
|
|
3420
|
+
const filledInputNumber = ".tx-input-number[data-styled]:has(.tx-input[data-variant='filled'])";
|
|
3421
|
+
const paperFormsCss = `
|
|
3422
|
+
:root {
|
|
3423
|
+
--_paper-field-line: var(--tx-form-field-border-color);
|
|
3424
|
+
--_paper-field-hover-line: var(--tx-form-field-hover-border-color);
|
|
3425
|
+
--_paper-field-accent: var(--tx-form-field-focus-border-color);
|
|
3426
|
+
--_paper-field-invalid: var(--tx-form-field-invalid-border-color);
|
|
3427
|
+
}
|
|
3428
|
+
|
|
3429
|
+
${list("field")} {
|
|
3430
|
+
--tx-form-field-border-color: transparent;
|
|
3431
|
+
--tx-form-field-hover-border-color: transparent;
|
|
3432
|
+
--tx-form-field-focus-border-color: transparent;
|
|
3433
|
+
--tx-form-field-invalid-border-color: transparent;
|
|
3434
|
+
--tx-form-field-focus-ring-width: 0px;
|
|
3435
|
+
--_paper-line: var(--_paper-field-line);
|
|
3436
|
+
--_paper-accent: var(--_paper-field-accent);
|
|
3437
|
+
--_paper-accent-size: 0%;
|
|
3438
|
+
|
|
3439
|
+
background-image: linear-gradient(var(--_paper-accent), var(--_paper-accent)), linear-gradient(var(--_paper-line), var(--_paper-line));
|
|
3440
|
+
background-position: 50% 100%, 50% 100%;
|
|
3441
|
+
background-size: var(--_paper-accent-size) 2px, 100% 1px;
|
|
3442
|
+
background-origin: border-box;
|
|
3443
|
+
background-repeat: no-repeat;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3446
|
+
${list("field", ":root ")} {
|
|
3447
|
+
border-end-start-radius: 0;
|
|
3448
|
+
border-end-end-radius: 0;
|
|
3449
|
+
transition:
|
|
3450
|
+
background-color var(--tx-form-field-transition-duration),
|
|
3451
|
+
background-size 0.3s cubic-bezier(0.64, 0.09, 0.08, 1),
|
|
3452
|
+
box-shadow var(--tx-form-field-transition-duration);
|
|
3453
|
+
}
|
|
3454
|
+
|
|
3455
|
+
${list("hover")} {
|
|
3456
|
+
--_paper-line: var(--_paper-field-hover-line);
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
${list("focus")} {
|
|
3460
|
+
--_paper-accent-size: 100%;
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
${list("invalid")} {
|
|
3464
|
+
--_paper-line: var(--_paper-field-invalid);
|
|
3465
|
+
--_paper-accent: var(--_paper-field-invalid);
|
|
3466
|
+
}
|
|
3467
|
+
|
|
3468
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3469
|
+
${list("field", ":root ")} {
|
|
3470
|
+
transition:
|
|
3471
|
+
background-color var(--tx-form-field-transition-duration),
|
|
3472
|
+
box-shadow var(--tx-form-field-transition-duration);
|
|
3473
|
+
}
|
|
3474
|
+
}
|
|
3475
|
+
|
|
3476
|
+
:root ${filledInputGroup} {
|
|
3477
|
+
border-top-color: var(--tx-form-field-filled-background);
|
|
3478
|
+
border-inline-color: var(--tx-form-field-filled-background);
|
|
3479
|
+
border-end-start-radius: 0;
|
|
3480
|
+
border-end-end-radius: 0;
|
|
3481
|
+
background: var(--tx-form-field-filled-background);
|
|
3482
|
+
}
|
|
3483
|
+
|
|
3484
|
+
:root .tx-input-number[data-styled] .tx-input-number__stack {
|
|
3485
|
+
top: 2px;
|
|
3486
|
+
right: 2px;
|
|
3487
|
+
bottom: 2px;
|
|
3488
|
+
}
|
|
3489
|
+
|
|
3490
|
+
:root ${filledInputNumber}[data-layout='horizontal'] .tx-input-number__button {
|
|
3491
|
+
border-top-color: var(--tx-form-field-filled-background);
|
|
3492
|
+
border-inline-color: var(--tx-form-field-filled-background);
|
|
3493
|
+
border-end-start-radius: 0;
|
|
3494
|
+
border-end-end-radius: 0;
|
|
3495
|
+
background: var(--tx-form-field-filled-background);
|
|
3496
|
+
}
|
|
3497
|
+
|
|
3498
|
+
:root ${filledInputNumber}[data-layout='vertical'] .tx-input-number__button {
|
|
3499
|
+
border-block-color: var(--tx-form-field-filled-background);
|
|
3500
|
+
border-inline-color: var(--tx-form-field-filled-background);
|
|
3501
|
+
background: var(--tx-form-field-filled-background);
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3504
|
+
:root ${filledInputNumber}[data-layout='vertical'] .tx-input-number__increment {
|
|
3505
|
+
border-block-end: 1px solid var(--_paper-field-line);
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3508
|
+
:root .tx-autocomplete[data-styled] .tx-autocomplete__dropdown:focus-visible {
|
|
3509
|
+
background: var(--tx-select-dropdown-button-hover-background);
|
|
3510
|
+
color: var(--tx-select-dropdown-button-hover-color);
|
|
3511
|
+
}
|
|
3512
|
+
`;
|
|
3513
|
+
const halo = (color, transparency) => `0 0 1px 10px color-mix(in srgb, ${color}, transparent ${transparency})`;
|
|
3514
|
+
const elevation = "var(--tx-toggle-switch-handle-shadow)";
|
|
3515
|
+
const selectionHalo = (block, checkedColor) => `
|
|
3516
|
+
.${block}[data-styled] .${block}__box {
|
|
3517
|
+
border-radius: 50%;
|
|
3518
|
+
transition: box-shadow var(--${block}-transition-duration);
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
.${block}[data-styled]:not(.${block}--disabled) .${block}__box:has(.${block}__input:hover) {
|
|
3522
|
+
box-shadow: ${halo("var(--tx-text-primary)", "96%")};
|
|
3523
|
+
}
|
|
3524
|
+
|
|
3525
|
+
.${block}[data-styled]:not(.${block}--disabled) .${block}__box:has(.${block}__input:focus-visible) {
|
|
3526
|
+
box-shadow: ${halo("var(--tx-text-primary)", "88%")};
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
.${block}[data-styled]:is(.${block}--checked, .${block}--indeterminate):not(.${block}--disabled) .${block}__box:has(.${block}__input:hover) {
|
|
3530
|
+
box-shadow: ${halo(checkedColor, "92%")};
|
|
3531
|
+
}
|
|
3532
|
+
|
|
3533
|
+
.${block}[data-styled]:is(.${block}--checked, .${block}--indeterminate):not(.${block}--disabled) .${block}__box:has(.${block}__input:focus-visible) {
|
|
3534
|
+
box-shadow: ${halo(checkedColor, "84%")};
|
|
3535
|
+
}
|
|
3536
|
+
`;
|
|
3537
|
+
const paperControlsCss = `
|
|
3538
|
+
.tx-button[data-styled]:focus-visible {
|
|
3539
|
+
border-color: var(--_active-border-color);
|
|
3540
|
+
background: var(--_active-background);
|
|
3541
|
+
}
|
|
3542
|
+
|
|
3543
|
+
.tx-button[data-styled][data-variant='link']:focus-visible {
|
|
3544
|
+
border-color: transparent;
|
|
3545
|
+
background: color-mix(in srgb, var(--tx-primary-base), transparent 84%);
|
|
3546
|
+
}
|
|
3547
|
+
|
|
3548
|
+
.tx-toggle-button.tx-toggle-button[data-styled] .tx-toggle-button__control:focus-visible:not(:disabled) {
|
|
3549
|
+
background: var(--tx-toggle-button-hover-background);
|
|
3550
|
+
}
|
|
3551
|
+
${selectionHalo("tx-checkbox", "var(--tx-checkbox-checked-background)")}${selectionHalo("tx-radio-button", "var(--tx-radio-button-checked-border-color)")}
|
|
3552
|
+
.tx-toggle-switch[data-styled] .tx-toggle-switch__input {
|
|
3553
|
+
inset: min(0px, calc((var(--_height) - var(--_handle)) / 2)) 0;
|
|
3554
|
+
height: auto;
|
|
3555
|
+
}
|
|
3556
|
+
|
|
3557
|
+
.tx-toggle-switch[data-styled] .tx-toggle-switch__track .tx-toggle-switch__handle {
|
|
3558
|
+
transition:
|
|
3559
|
+
left var(--tx-toggle-switch-transition-duration) cubic-bezier(0.2, 0, 0, 1),
|
|
3560
|
+
background-color var(--tx-toggle-switch-transition-duration),
|
|
3561
|
+
color var(--tx-toggle-switch-transition-duration),
|
|
3562
|
+
box-shadow var(--tx-toggle-switch-transition-duration);
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
.tx-toggle-switch[data-styled]:not(.tx-toggle-switch--disabled):has(.tx-toggle-switch__input:hover) .tx-toggle-switch__handle {
|
|
3566
|
+
box-shadow: ${halo("var(--tx-text-primary)", "96%")}, ${elevation};
|
|
3567
|
+
}
|
|
3568
|
+
|
|
3569
|
+
.tx-toggle-switch[data-styled]:not(.tx-toggle-switch--disabled):has(.tx-toggle-switch__input:focus-visible) .tx-toggle-switch__handle {
|
|
3570
|
+
box-shadow: ${halo("var(--tx-text-primary)", "88%")}, ${elevation};
|
|
3571
|
+
}
|
|
3572
|
+
|
|
3573
|
+
.tx-toggle-switch[data-styled].tx-toggle-switch--checked:not(.tx-toggle-switch--disabled):has(.tx-toggle-switch__input:hover) .tx-toggle-switch__handle {
|
|
3574
|
+
box-shadow: ${halo("var(--tx-toggle-switch-handle-checked-background)", "92%")}, ${elevation};
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
.tx-toggle-switch[data-styled].tx-toggle-switch--checked:not(.tx-toggle-switch--disabled):has(.tx-toggle-switch__input:focus-visible) .tx-toggle-switch__handle {
|
|
3578
|
+
box-shadow: ${halo("var(--tx-toggle-switch-handle-checked-background)", "84%")}, ${elevation};
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
[data-styled].tx-rating .tx-rating__stars .tx-rating__star[data-index] {
|
|
3582
|
+
border-radius: 50%;
|
|
3583
|
+
transition:
|
|
3584
|
+
transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
|
|
3585
|
+
background-color var(--tx-rating-transition-duration),
|
|
3586
|
+
box-shadow var(--tx-rating-transition-duration);
|
|
3587
|
+
}
|
|
3588
|
+
|
|
3589
|
+
[data-styled].tx-rating:not(.tx-rating--readonly):not(.tx-rating--disabled) .tx-rating__star[data-index]:hover {
|
|
3590
|
+
background: color-mix(in srgb, var(--tx-text-muted), transparent 96%);
|
|
3591
|
+
box-shadow: 0 0 1px 8px color-mix(in srgb, var(--tx-text-muted), transparent 96%);
|
|
3592
|
+
}
|
|
3593
|
+
|
|
3594
|
+
[data-styled].tx-rating:not(.tx-rating--readonly):not(.tx-rating--disabled) .tx-rating__star--active[data-index]:hover {
|
|
3595
|
+
background: color-mix(in srgb, var(--tx-rating-active-color), transparent 92%);
|
|
3596
|
+
box-shadow: 0 0 1px 8px color-mix(in srgb, var(--tx-rating-active-color), transparent 92%);
|
|
3597
|
+
}
|
|
3598
|
+
|
|
3599
|
+
.tx-slider[data-styled]:not(.tx-slider--disabled) .tx-slider__track .tx-slider__handle:focus-visible,
|
|
3600
|
+
.tx-slider[data-styled]:not(.tx-slider--disabled) .tx-slider__track .tx-slider__handle:focus:hover {
|
|
3601
|
+
box-shadow: var(--tx-slider-handle-shadow), ${halo("var(--tx-slider-handle-background)", "84%")};
|
|
3602
|
+
}
|
|
3603
|
+
|
|
3604
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3605
|
+
.tx-checkbox[data-styled] .tx-checkbox__box,
|
|
3606
|
+
.tx-radio-button[data-styled] .tx-radio-button__box,
|
|
3607
|
+
.tx-toggle-switch[data-styled] .tx-toggle-switch__track .tx-toggle-switch__handle,
|
|
3608
|
+
[data-styled].tx-rating .tx-rating__stars .tx-rating__star[data-index] {
|
|
3609
|
+
transition: none;
|
|
3610
|
+
}
|
|
3611
|
+
}
|
|
3612
|
+
`;
|
|
3613
|
+
const TECTRA_STYLES = {
|
|
3614
|
+
tectra: { label: "Tectra" },
|
|
3615
|
+
soft: softStyle,
|
|
3616
|
+
edge: edgeStyle,
|
|
3617
|
+
paper: {
|
|
3618
|
+
label: "Paper",
|
|
3619
|
+
light: paperLight,
|
|
3620
|
+
dark: paperDark,
|
|
3621
|
+
components: {
|
|
3622
|
+
...paperFormsTokens,
|
|
3623
|
+
...paperControlsTokens,
|
|
3624
|
+
...paperDisplayTokens,
|
|
3625
|
+
...paperOverlaysTokens,
|
|
3626
|
+
...paperDataTokens
|
|
3627
|
+
},
|
|
3628
|
+
css: [
|
|
3629
|
+
paperFormsCss,
|
|
3630
|
+
paperControlsCss,
|
|
3631
|
+
"",
|
|
3632
|
+
"",
|
|
3633
|
+
""
|
|
3634
|
+
].filter(Boolean).join("\n")
|
|
3635
|
+
}
|
|
3636
|
+
};
|
|
2010
3637
|
function isPlainObject(value) {
|
|
2011
3638
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
2012
3639
|
}
|
|
@@ -2019,6 +3646,41 @@ function deepMerge(base, overrides) {
|
|
|
2019
3646
|
function definePreset(base, overrides) {
|
|
2020
3647
|
return deepMerge(base, overrides);
|
|
2021
3648
|
}
|
|
3649
|
+
function noirScale(surface) {
|
|
3650
|
+
return {
|
|
3651
|
+
50: surface[50],
|
|
3652
|
+
100: surface[100],
|
|
3653
|
+
200: surface[200],
|
|
3654
|
+
300: surface[100],
|
|
3655
|
+
400: surface[50],
|
|
3656
|
+
500: surface[500],
|
|
3657
|
+
600: surface[950],
|
|
3658
|
+
700: surface[900],
|
|
3659
|
+
800: surface[800],
|
|
3660
|
+
900: surface[900],
|
|
3661
|
+
950: surface[950]
|
|
3662
|
+
};
|
|
3663
|
+
}
|
|
3664
|
+
function createTectraPreset({ style = "tectra", primary = "blue", surface = "ink" } = {}) {
|
|
3665
|
+
const surfaceScale = SURFACE_PALETTES[surface];
|
|
3666
|
+
const palettes = {
|
|
3667
|
+
accent: primary === "noir" ? noirScale(surfaceScale) : ACCENT_PALETTES[primary],
|
|
3668
|
+
surface: surfaceScale
|
|
3669
|
+
};
|
|
3670
|
+
const definition = TECTRA_STYLES[style];
|
|
3671
|
+
return {
|
|
3672
|
+
name: `${style}-${primary}-${surface}`,
|
|
3673
|
+
palettes,
|
|
3674
|
+
light: deepMerge(createLightSemantic(palettes), definition.light?.(palettes)),
|
|
3675
|
+
dark: deepMerge(createDarkSemantic(palettes), definition.dark?.(palettes)),
|
|
3676
|
+
components: deepMerge(COMPONENT_TOKENS, definition.components),
|
|
3677
|
+
css: definition.css
|
|
3678
|
+
};
|
|
3679
|
+
}
|
|
3680
|
+
const Tectra = createTectraPreset();
|
|
3681
|
+
const Soft = createTectraPreset({ style: "soft" });
|
|
3682
|
+
const Edge = createTectraPreset({ style: "edge" });
|
|
3683
|
+
const Paper = createTectraPreset({ style: "paper" });
|
|
2022
3684
|
function kebab(key) {
|
|
2023
3685
|
return key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
2024
3686
|
}
|
|
@@ -2047,8 +3709,12 @@ function presetToCss(preset) {
|
|
|
2047
3709
|
...SEVERITY_PALETTES
|
|
2048
3710
|
});
|
|
2049
3711
|
const components = Object.entries(preset.components).flatMap(([name, tokens]) => toCssVariables(tokens, `--tx-${kebab(name)}`));
|
|
2050
|
-
return [
|
|
3712
|
+
return [
|
|
3713
|
+
`:root { ${block(shared)} ${block(toCssVariables(preset.light))} ${block(components)} color-scheme: light; }`,
|
|
3714
|
+
`:root[data-tx-theme="dark"] { ${block(toCssVariables(preset.dark))} color-scheme: dark; }`,
|
|
3715
|
+
...preset.css ? [preset.css] : []
|
|
3716
|
+
].join("\n");
|
|
2051
3717
|
}
|
|
2052
|
-
export { COMPONENT_TOKENS,
|
|
3718
|
+
export { COMPONENT_TOKENS, Edge, Paper, Soft, TECTRA_STYLES, Tectra, amountTokens, avatarTokens, badgeTokens, buttonTokens, cardTokens, cascadeSelectTokens, checkboxTokens, chipTokens, chipsInputTokens, colorPickerTokens, confirmTokens, contrastWithWhite, countryTokens, createDarkSemantic, createLightSemantic, createTectraPreset, dataViewTokens, deepMerge, definePreset, dialogTokens, dividerTokens, emailSuggestionTokens, fade, fieldMessageTokens, fieldTokens, fieldsetTokens, floatLabelTokens, formFieldTokens, highlightTextTokens, iconLinkTokens, iconTokens, iftaLabelTokens, inputGroupTokens, inputNumberTokens, inputOtpTokens, knobTokens, labelTokens, lightDark, linkTokens, listboxTokens, mentionTokens, menuTokens, messageTokens, mix, noirScale, overlayBadgeTokens, paginatorTokens, panelTokens, passwordTokens, pillTokens, popoverTokens, presetToCss, primaryBaseStep, progressBarTokens, progressSpinnerTokens, radioButtonTokens, ratingTokens, relativeLuminance, rippleTokens, selectTokens, skeletonTokens, sliderTokens, speedDialTokens, splitButtonTokens, statusIconTokens, tableTokens, tagTokens, textareaTokens, toCssVariables, toStyleObject, toastTokens, toggleButtonTokens, toggleSwitchTokens, tokenRef, tooltipTokens, treeTableTokens, treeTokens, virtualScrollerTokens };
|
|
2053
3719
|
|
|
2054
3720
|
//# sourceMappingURL=tectra-ng-themes.mjs.map
|