@uni-design-system/uni-core 10.4.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +126 -0
- package/dist/cjs/index.cjs +103 -34
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +103 -34
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/component/component.types.d.ts +1 -1
- package/dist/types/concepts/component/component.types.d.ts.map +1 -1
- package/dist/types/concepts/iconography/icon.records.d.ts +4 -0
- package/dist/types/concepts/iconography/icon.records.d.ts.map +1 -1
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -740,6 +740,10 @@ var BaseIcons = {
|
|
|
740
740
|
chevronRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m517.85-480-184-184L376-706.15 602.15-480 376-253.85 333.85-296l184-184Z'/%3e%3c/svg%3e",
|
|
741
741
|
arrowLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m294.92-450 227.85 227.85L480-180 180-480l300-300 42.77 42.15L294.92-510H780v60H294.92Z'/%3e%3c/svg%3e",
|
|
742
742
|
arrowRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M665.08-450H180v-60h485.08L437.23-737.85 480-780l300 300-300 300-42.77-42.15L665.08-450Z'/%3e%3c/svg%3e",
|
|
743
|
+
arrowUp: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-180v-485.08L222.15-437.23 180-480l300-300 300 300-42.15 42.77L510-665.08V-180h-60Z'/%3e%3c/svg%3e",
|
|
744
|
+
arrowDown: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-780v485.08L222.15-522.77 180-480l300 300 300-300-42.15-42.77L510-294.92V-780h-60Z'/%3e%3c/svg%3e",
|
|
745
|
+
chevronsLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M445-253.85 218.85-480 445-706.15 487.15-664 303.77-480l183.38 184L445-253.85Zm254 0L472.85-480 699-706.15 741.15-664 557.77-480l183.38 184L699-253.85Z'/%3e%3c/svg%3e",
|
|
746
|
+
chevronsRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M402.23-480 218.85-664 261-706.15 487.15-480 261-253.85 218.85-296l183.38-184Zm254 0L472.85-664 515-706.15 741.15-480 515-253.85 472.85-296l183.38-184Z'/%3e%3c/svg%3e",
|
|
743
747
|
home: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M240-200h133.85v-237.69h212.3V-200H720v-360L480-740.77 240-560v360Zm-60 60v-450l300-225.77L780-590v450H526.15v-237.69h-92.3V-140H180Zm300-330.38Z'/%3e%3c/svg%3e",
|
|
744
748
|
building: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M130-136.92v-540h160v-160h380v320h160v380H530v-160H430v160H130Zm60-60h100v-100H190v100Zm0-160h100v-100H190v100Zm0-160h100v-100H190v100Zm160 160h100v-100H350v100Zm0-160h100v-100H350v100Zm0-160h100v-100H350v100Zm160 320h100v-100H510v100Zm0-160h100v-100H510v100Zm0-160h100v-100H510v100Zm160 480h100v-100H670v100Zm0-160h100v-100H670v100Z'/%3e%3c/svg%3e",
|
|
745
749
|
externalLink: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M212.31-140Q182-140 161-161q-21-21-21-51.31v-535.38Q140-778 161-799q21-21 51.31-21h252.3v60h-252.3q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v535.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h535.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-252.3h60v252.3Q820-182 799-161q-21 21-51.31 21H212.31Zm176.46-206.62-42.15-42.15L717.85-760H560v-60h260v260h-60v-157.85L388.77-346.62Z'/%3e%3c/svg%3e",
|
|
@@ -964,7 +968,7 @@ var BaseTypography = {
|
|
|
964
968
|
fontFamily: "Red Hat Display",
|
|
965
969
|
fontSize: 15,
|
|
966
970
|
lineHeight: 20,
|
|
967
|
-
fontWeight:
|
|
971
|
+
fontWeight: 500
|
|
968
972
|
},
|
|
969
973
|
input: {
|
|
970
974
|
fontFamily: "Red Hat Display",
|
|
@@ -1028,6 +1032,10 @@ var BaseMotion = {
|
|
|
1028
1032
|
control: {
|
|
1029
1033
|
duration: 300,
|
|
1030
1034
|
easing: "ease"
|
|
1035
|
+
},
|
|
1036
|
+
snap: {
|
|
1037
|
+
duration: 120,
|
|
1038
|
+
easing: "ease"
|
|
1031
1039
|
}
|
|
1032
1040
|
};
|
|
1033
1041
|
/**
|
|
@@ -1093,14 +1101,26 @@ var SELECTION_ACCENTS = {
|
|
|
1093
1101
|
var tagVariant = (c, role) => ({ [role]: {
|
|
1094
1102
|
backgroundColor: c[`${role}-container`],
|
|
1095
1103
|
color: c[`on-${role}-container`],
|
|
1096
|
-
"&.
|
|
1104
|
+
"&.tag-selected": {
|
|
1097
1105
|
backgroundColor: c[role],
|
|
1098
1106
|
color: c[`on-${role}`]
|
|
1099
1107
|
},
|
|
1108
|
+
"&.tag-interactive:hover": { filter: "brightness(0.95)" },
|
|
1109
|
+
"&.tone-solid": {
|
|
1110
|
+
backgroundColor: c[role],
|
|
1111
|
+
color: c[`on-${role}`],
|
|
1112
|
+
"&.tag-selected": { filter: "brightness(0.9)" },
|
|
1113
|
+
"&.tag-selected.tag-interactive:hover": { filter: "brightness(0.85)" }
|
|
1114
|
+
},
|
|
1100
1115
|
"&.tone-outline": {
|
|
1101
1116
|
backgroundColor: "transparent",
|
|
1102
1117
|
color: c[role],
|
|
1103
|
-
borderColor: c[`on-${role}-container-border`] ?? c[role]
|
|
1118
|
+
borderColor: c[`on-${role}-container-border`] ?? c[role],
|
|
1119
|
+
"&.tag-selected": {
|
|
1120
|
+
backgroundColor: c[role],
|
|
1121
|
+
color: c[`on-${role}`],
|
|
1122
|
+
borderColor: c[role]
|
|
1123
|
+
}
|
|
1104
1124
|
}
|
|
1105
1125
|
} });
|
|
1106
1126
|
var buildComponents = (c) => ({
|
|
@@ -1114,7 +1134,7 @@ var buildComponents = (c) => ({
|
|
|
1114
1134
|
typeface: "label",
|
|
1115
1135
|
color: "on-background-variant",
|
|
1116
1136
|
currentColor: "on-background",
|
|
1117
|
-
|
|
1137
|
+
separatorIcon: "chevronRight",
|
|
1118
1138
|
gap: "xs"
|
|
1119
1139
|
} },
|
|
1120
1140
|
appBar: { options: {
|
|
@@ -1162,7 +1182,7 @@ var buildComponents = (c) => ({
|
|
|
1162
1182
|
options: {
|
|
1163
1183
|
borderRadius: "max",
|
|
1164
1184
|
typeface: "subtitle-2",
|
|
1165
|
-
|
|
1185
|
+
fallbackIcon: "profile"
|
|
1166
1186
|
},
|
|
1167
1187
|
variants: {
|
|
1168
1188
|
primary: {
|
|
@@ -1219,8 +1239,8 @@ var buildComponents = (c) => ({
|
|
|
1219
1239
|
ringWidth: 2
|
|
1220
1240
|
} },
|
|
1221
1241
|
searchInput: { options: {
|
|
1222
|
-
|
|
1223
|
-
|
|
1242
|
+
searchIcon: "search",
|
|
1243
|
+
clearIcon: "close",
|
|
1224
1244
|
listColor: "primary-surface",
|
|
1225
1245
|
listShadow: "menu",
|
|
1226
1246
|
listBorderRadius: "xs",
|
|
@@ -1229,6 +1249,7 @@ var buildComponents = (c) => ({
|
|
|
1229
1249
|
} },
|
|
1230
1250
|
checkbox: {
|
|
1231
1251
|
options: {
|
|
1252
|
+
motion: "control",
|
|
1232
1253
|
size: 20,
|
|
1233
1254
|
boxColor: "surface",
|
|
1234
1255
|
borderRadius: 2,
|
|
@@ -1278,6 +1299,22 @@ var buildComponents = (c) => ({
|
|
|
1278
1299
|
closeButtonIcon: "close",
|
|
1279
1300
|
closeButtonSize: "md"
|
|
1280
1301
|
} },
|
|
1302
|
+
select: { options: {
|
|
1303
|
+
toggleIcon: "chevronDown",
|
|
1304
|
+
toggleColor: "on-background-variant",
|
|
1305
|
+
toggleSize: 20
|
|
1306
|
+
} },
|
|
1307
|
+
buttonGroup: { options: {
|
|
1308
|
+
border: "quaternary",
|
|
1309
|
+
borderRadius: 4
|
|
1310
|
+
} },
|
|
1311
|
+
progressBar: { options: {
|
|
1312
|
+
trackColor: "primary-surface",
|
|
1313
|
+
fillColor: "secondary-surface",
|
|
1314
|
+
completeColor: "secondary",
|
|
1315
|
+
borderColor: "on-background-variant",
|
|
1316
|
+
strokeWidth: 1
|
|
1317
|
+
} },
|
|
1281
1318
|
dropdown: { options: {
|
|
1282
1319
|
border: "none",
|
|
1283
1320
|
borderRadius: "xxs",
|
|
@@ -1305,7 +1342,7 @@ var buildComponents = (c) => ({
|
|
|
1305
1342
|
typeface: "label",
|
|
1306
1343
|
textColor: void 0,
|
|
1307
1344
|
hoverColor: "primary-container",
|
|
1308
|
-
|
|
1345
|
+
activeIcon: "check",
|
|
1309
1346
|
motion: "control"
|
|
1310
1347
|
},
|
|
1311
1348
|
variants: {
|
|
@@ -1329,7 +1366,7 @@ var buildComponents = (c) => ({
|
|
|
1329
1366
|
maxWidth: "38ch",
|
|
1330
1367
|
offset: 7,
|
|
1331
1368
|
arrowSize: 8,
|
|
1332
|
-
|
|
1369
|
+
closeIcon: "close",
|
|
1333
1370
|
headerTypeface: "title-small",
|
|
1334
1371
|
tooltipPadding: "4px 8px",
|
|
1335
1372
|
tooltipOpenDelay: 500,
|
|
@@ -1337,12 +1374,6 @@ var buildComponents = (c) => ({
|
|
|
1337
1374
|
motion: "panel"
|
|
1338
1375
|
} },
|
|
1339
1376
|
expand: { options: { motion: "reveal" } },
|
|
1340
|
-
footer: { options: {
|
|
1341
|
-
height: 52,
|
|
1342
|
-
color: "primary",
|
|
1343
|
-
logoHeight: 18.6,
|
|
1344
|
-
logoPadding: "md"
|
|
1345
|
-
} },
|
|
1346
1377
|
input: { options: {
|
|
1347
1378
|
typeface: "input",
|
|
1348
1379
|
color: "primary-surface",
|
|
@@ -1401,6 +1432,7 @@ var buildComponents = (c) => ({
|
|
|
1401
1432
|
}
|
|
1402
1433
|
},
|
|
1403
1434
|
tabs: { options: {
|
|
1435
|
+
motion: "snap",
|
|
1404
1436
|
typeface: "title-small",
|
|
1405
1437
|
textColor: "on-surface-variant",
|
|
1406
1438
|
activeTextColor: "primary",
|
|
@@ -1428,14 +1460,15 @@ var buildComponents = (c) => ({
|
|
|
1428
1460
|
typeface: "tag",
|
|
1429
1461
|
gap: "xs",
|
|
1430
1462
|
removeIcon: "close",
|
|
1431
|
-
selectedIcon: "check"
|
|
1463
|
+
selectedIcon: "check",
|
|
1464
|
+
motion: "control",
|
|
1465
|
+
endInset: "auto"
|
|
1432
1466
|
},
|
|
1433
1467
|
fixed: {
|
|
1434
1468
|
display: "inline-flex",
|
|
1435
1469
|
alignItems: "center",
|
|
1436
1470
|
maxWidth: "100%",
|
|
1437
|
-
border: "1px solid transparent"
|
|
1438
|
-
transition: "background-color .2s ease, color .2s ease"
|
|
1471
|
+
border: "1px solid transparent"
|
|
1439
1472
|
},
|
|
1440
1473
|
variants: {
|
|
1441
1474
|
...tagVariant(c, "primary"),
|
|
@@ -1446,13 +1479,25 @@ var buildComponents = (c) => ({
|
|
|
1446
1479
|
ghost: {
|
|
1447
1480
|
backgroundColor: "transparent",
|
|
1448
1481
|
color: c["on-background"],
|
|
1449
|
-
"&.
|
|
1482
|
+
"&.tag-selected": {
|
|
1450
1483
|
backgroundColor: c["surface-variant"],
|
|
1451
1484
|
color: c["on-surface-variant"]
|
|
1452
1485
|
},
|
|
1486
|
+
"&.tag-interactive:hover": { filter: "brightness(0.95)" },
|
|
1487
|
+
"&.tone-solid": {
|
|
1488
|
+
backgroundColor: c["surface-variant"],
|
|
1489
|
+
color: c["on-surface-variant"],
|
|
1490
|
+
"&.tag-selected": { filter: "brightness(0.9)" },
|
|
1491
|
+
"&.tag-selected.tag-interactive:hover": { filter: "brightness(0.85)" }
|
|
1492
|
+
},
|
|
1453
1493
|
"&.tone-outline": {
|
|
1454
1494
|
backgroundColor: "transparent",
|
|
1455
|
-
borderColor: c.outline
|
|
1495
|
+
borderColor: c.outline,
|
|
1496
|
+
"&.tag-selected": {
|
|
1497
|
+
backgroundColor: c["surface-variant"],
|
|
1498
|
+
color: c["on-surface-variant"],
|
|
1499
|
+
borderColor: c.outline
|
|
1500
|
+
}
|
|
1456
1501
|
}
|
|
1457
1502
|
},
|
|
1458
1503
|
disabled: {
|
|
@@ -1472,20 +1517,31 @@ var buildComponents = (c) => ({
|
|
|
1472
1517
|
sm: {
|
|
1473
1518
|
height: 20,
|
|
1474
1519
|
fontSize: 12,
|
|
1475
|
-
|
|
1520
|
+
paddingInline: 8
|
|
1476
1521
|
},
|
|
1477
1522
|
md: {
|
|
1478
1523
|
height: 24,
|
|
1479
1524
|
fontSize: 13,
|
|
1480
|
-
|
|
1525
|
+
paddingInline: 10
|
|
1481
1526
|
},
|
|
1482
1527
|
lg: {
|
|
1483
1528
|
height: 32,
|
|
1484
1529
|
fontSize: 15,
|
|
1485
|
-
|
|
1530
|
+
paddingInline: 12
|
|
1486
1531
|
}
|
|
1487
1532
|
}
|
|
1488
1533
|
},
|
|
1534
|
+
tagGroup: {
|
|
1535
|
+
options: {
|
|
1536
|
+
gap: "xs",
|
|
1537
|
+
rowGap: "xs"
|
|
1538
|
+
},
|
|
1539
|
+
fixed: {
|
|
1540
|
+
display: "flex",
|
|
1541
|
+
flexWrap: "wrap",
|
|
1542
|
+
alignItems: "center"
|
|
1543
|
+
}
|
|
1544
|
+
},
|
|
1489
1545
|
tagInput: { options: {
|
|
1490
1546
|
chipGap: "xs",
|
|
1491
1547
|
chipSize: "md",
|
|
@@ -1501,8 +1557,8 @@ var buildComponents = (c) => ({
|
|
|
1501
1557
|
dayBorderRadius: "max",
|
|
1502
1558
|
typeface: "label",
|
|
1503
1559
|
gap: "xxs",
|
|
1504
|
-
|
|
1505
|
-
|
|
1560
|
+
navPrevIcon: "chevronLeft",
|
|
1561
|
+
navNextIcon: "chevronRight",
|
|
1506
1562
|
weekdayFormat: "short",
|
|
1507
1563
|
showOutsideDays: false,
|
|
1508
1564
|
todayStyle: "outline"
|
|
@@ -1541,13 +1597,13 @@ var buildComponents = (c) => ({
|
|
|
1541
1597
|
descriptionColor: "on-primary-surface-variant"
|
|
1542
1598
|
} },
|
|
1543
1599
|
dateInput: { options: {
|
|
1544
|
-
|
|
1600
|
+
toggleIcon: "calendar",
|
|
1545
1601
|
popupShadow: "menu",
|
|
1546
1602
|
popupBorderRadius: "xs",
|
|
1547
1603
|
popupColor: "primary-surface"
|
|
1548
1604
|
} },
|
|
1549
1605
|
timeInput: { options: {
|
|
1550
|
-
|
|
1606
|
+
toggleIcon: "clock",
|
|
1551
1607
|
listColor: "primary-surface",
|
|
1552
1608
|
listShadow: "menu",
|
|
1553
1609
|
listBorderRadius: "xs",
|
|
@@ -1561,15 +1617,15 @@ var buildComponents = (c) => ({
|
|
|
1561
1617
|
button: {
|
|
1562
1618
|
options: {
|
|
1563
1619
|
borderRadius: "max",
|
|
1564
|
-
typeface: "button"
|
|
1620
|
+
typeface: "button",
|
|
1621
|
+
motion: "control"
|
|
1565
1622
|
},
|
|
1566
1623
|
fixed: {
|
|
1567
1624
|
position: "relative",
|
|
1568
1625
|
overflow: "hidden",
|
|
1569
1626
|
outline: "0",
|
|
1570
1627
|
border: "0",
|
|
1571
|
-
cursor: "pointer"
|
|
1572
|
-
transition: "all 0.28s ease"
|
|
1628
|
+
cursor: "pointer"
|
|
1573
1629
|
},
|
|
1574
1630
|
variantOptions: {
|
|
1575
1631
|
primary: { focusColor: "primary" },
|
|
@@ -1650,7 +1706,10 @@ var buildComponents = (c) => ({
|
|
|
1650
1706
|
}
|
|
1651
1707
|
},
|
|
1652
1708
|
iconButton: {
|
|
1653
|
-
options: {
|
|
1709
|
+
options: {
|
|
1710
|
+
borderRadius: "max",
|
|
1711
|
+
motion: "control"
|
|
1712
|
+
},
|
|
1654
1713
|
variantOptions: {
|
|
1655
1714
|
primary: { focusColor: "primary" },
|
|
1656
1715
|
secondary: { focusColor: "secondary" },
|
|
@@ -1727,6 +1786,13 @@ var buildComponents = (c) => ({
|
|
|
1727
1786
|
}
|
|
1728
1787
|
}
|
|
1729
1788
|
},
|
|
1789
|
+
inlineButton: { options: {
|
|
1790
|
+
linkColor: "primary",
|
|
1791
|
+
underline: false,
|
|
1792
|
+
underlineOnHover: true,
|
|
1793
|
+
underlineOffset: "0.15em",
|
|
1794
|
+
gap: "xxs"
|
|
1795
|
+
} },
|
|
1730
1796
|
progressGauge: {
|
|
1731
1797
|
fixed: { textFill: c["on-background"] },
|
|
1732
1798
|
variants: {
|
|
@@ -1762,7 +1828,8 @@ var buildComponents = (c) => ({
|
|
|
1762
1828
|
options: { borderRadius: "xs" },
|
|
1763
1829
|
fixed: {
|
|
1764
1830
|
overflow: "hidden",
|
|
1765
|
-
backgroundColor: c.background
|
|
1831
|
+
backgroundColor: c.background,
|
|
1832
|
+
color: c["on-background"]
|
|
1766
1833
|
}
|
|
1767
1834
|
},
|
|
1768
1835
|
cardHeader: {
|
|
@@ -1798,6 +1865,7 @@ var buildComponents = (c) => ({
|
|
|
1798
1865
|
placeholderColor: "disabled"
|
|
1799
1866
|
} },
|
|
1800
1867
|
dataTable: { options: {
|
|
1868
|
+
motion: "control",
|
|
1801
1869
|
color: "primary-surface",
|
|
1802
1870
|
border: "light",
|
|
1803
1871
|
borderRadius: "sm",
|
|
@@ -1861,7 +1929,7 @@ var buildComponents = (c) => ({
|
|
|
1861
1929
|
tooltipTextColor: "on-inverse-surface",
|
|
1862
1930
|
tooltipShadow: "menu",
|
|
1863
1931
|
tooltipBorderRadius: "xs",
|
|
1864
|
-
|
|
1932
|
+
motion: "snap"
|
|
1865
1933
|
} },
|
|
1866
1934
|
skeleton: { options: {
|
|
1867
1935
|
color: "surface-variant",
|
|
@@ -1910,6 +1978,7 @@ var buildComponents = (c) => ({
|
|
|
1910
1978
|
}
|
|
1911
1979
|
},
|
|
1912
1980
|
tooltip: { options: {
|
|
1981
|
+
motion: "notification",
|
|
1913
1982
|
border: void 0,
|
|
1914
1983
|
borderRadius: "xs",
|
|
1915
1984
|
shadow: "raised",
|
|
@@ -1924,7 +1993,7 @@ var buildComponents = (c) => ({
|
|
|
1924
1993
|
padding: "16px",
|
|
1925
1994
|
headerTypeface: "title-small",
|
|
1926
1995
|
typeface: "label",
|
|
1927
|
-
|
|
1996
|
+
closeIcon: "close",
|
|
1928
1997
|
arrowSize: 8,
|
|
1929
1998
|
offset: 12,
|
|
1930
1999
|
scrimColor: "rgba(0, 0, 0, 0.45)",
|