@uni-design-system/uni-core 10.2.1 → 10.4.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 +88 -0
- package/dist/cjs/index.cjs +54 -13
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +54 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/theme/theme.model.d.ts +18 -0
- package/dist/types/concepts/theme/theme.model.d.ts.map +1 -1
- package/dist/types/concepts/theme/themes/base.theme.d.ts +8 -2
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -1030,6 +1030,16 @@ var BaseMotion = {
|
|
|
1030
1030
|
easing: "ease"
|
|
1031
1031
|
}
|
|
1032
1032
|
};
|
|
1033
|
+
/**
|
|
1034
|
+
* The one wash every modal surface lays over the page it covers. Dialog and
|
|
1035
|
+
* drawer both point at `scrim` by name, so a theme redresses them together —
|
|
1036
|
+
* before this they owned a `backdrop` blob each and had drifted apart, the
|
|
1037
|
+
* dialog washing the page white and blurred while the drawer dimmed it dark.
|
|
1038
|
+
*/
|
|
1039
|
+
var BaseBackdrops = { scrim: {
|
|
1040
|
+
background: "rgba(255, 255, 255, 0.6)",
|
|
1041
|
+
backdropFilter: "blur(2px)"
|
|
1042
|
+
} };
|
|
1033
1043
|
var BaseRadii = {
|
|
1034
1044
|
none: "none",
|
|
1035
1045
|
xxs: "4px",
|
|
@@ -1122,9 +1132,10 @@ var buildComponents = (c) => ({
|
|
|
1122
1132
|
divider: "light",
|
|
1123
1133
|
elevation: "menu",
|
|
1124
1134
|
padding: "md",
|
|
1125
|
-
backdrop:
|
|
1135
|
+
backdrop: "scrim",
|
|
1126
1136
|
scrim: true,
|
|
1127
|
-
background: "solid"
|
|
1137
|
+
background: "solid",
|
|
1138
|
+
motion: "panel"
|
|
1128
1139
|
} },
|
|
1129
1140
|
drawerHeader: { options: {
|
|
1130
1141
|
color: void 0,
|
|
@@ -1239,17 +1250,18 @@ var buildComponents = (c) => ({
|
|
|
1239
1250
|
color: "primary-surface",
|
|
1240
1251
|
border: "quaternary",
|
|
1241
1252
|
padding: "sm",
|
|
1253
|
+
bodyPadding: void 0,
|
|
1254
|
+
inset: "lg",
|
|
1242
1255
|
elevation: "dialog",
|
|
1243
|
-
backdrop:
|
|
1244
|
-
|
|
1245
|
-
backdropFilter: "blur(2px)"
|
|
1246
|
-
}
|
|
1256
|
+
backdrop: "scrim",
|
|
1257
|
+
motion: "panel"
|
|
1247
1258
|
} },
|
|
1248
1259
|
dialogButtons: { options: {
|
|
1249
1260
|
gap: "md",
|
|
1250
1261
|
padding: "md",
|
|
1251
1262
|
paddingBottom: "lg",
|
|
1252
1263
|
justifyContent: "center",
|
|
1264
|
+
divider: void 0,
|
|
1253
1265
|
confirmButtonVariant: "primary",
|
|
1254
1266
|
cancelButtonVariant: "warn",
|
|
1255
1267
|
buttonSize: "lg",
|
|
@@ -1262,6 +1274,7 @@ var buildComponents = (c) => ({
|
|
|
1262
1274
|
height: 48,
|
|
1263
1275
|
textRole: "title-large",
|
|
1264
1276
|
textAlign: "center",
|
|
1277
|
+
divider: void 0,
|
|
1265
1278
|
closeButtonIcon: "close",
|
|
1266
1279
|
closeButtonSize: "md"
|
|
1267
1280
|
} },
|
|
@@ -1558,6 +1571,15 @@ var buildComponents = (c) => ({
|
|
|
1558
1571
|
cursor: "pointer",
|
|
1559
1572
|
transition: "all 0.28s ease"
|
|
1560
1573
|
},
|
|
1574
|
+
variantOptions: {
|
|
1575
|
+
primary: { focusColor: "primary" },
|
|
1576
|
+
secondary: { focusColor: "secondary" },
|
|
1577
|
+
tertiary: { focusColor: "tertiary" },
|
|
1578
|
+
warn: { focusColor: "warn" },
|
|
1579
|
+
success: { focusColor: "success" },
|
|
1580
|
+
disabled: { focusColor: "disabled" },
|
|
1581
|
+
ghost: { focusColor: "primary" }
|
|
1582
|
+
},
|
|
1561
1583
|
variants: {
|
|
1562
1584
|
ghost: {
|
|
1563
1585
|
backgroundColor: "transparent",
|
|
@@ -1629,30 +1651,45 @@ var buildComponents = (c) => ({
|
|
|
1629
1651
|
},
|
|
1630
1652
|
iconButton: {
|
|
1631
1653
|
options: { borderRadius: "max" },
|
|
1654
|
+
variantOptions: {
|
|
1655
|
+
primary: { focusColor: "primary" },
|
|
1656
|
+
secondary: { focusColor: "secondary" },
|
|
1657
|
+
tertiary: { focusColor: "tertiary" },
|
|
1658
|
+
warn: { focusColor: "warn" },
|
|
1659
|
+
success: { focusColor: "success" },
|
|
1660
|
+
disabled: { focusColor: "disabled" },
|
|
1661
|
+
ghost: { focusColor: "primary" }
|
|
1662
|
+
},
|
|
1632
1663
|
variants: {
|
|
1633
1664
|
ghost: {
|
|
1634
1665
|
backgroundColor: "transparent",
|
|
1635
|
-
color: "currentcolor"
|
|
1666
|
+
color: "currentcolor",
|
|
1667
|
+
"&:hover": { backgroundColor: "rgba(0,0,0,0.1)" }
|
|
1636
1668
|
},
|
|
1637
1669
|
primary: {
|
|
1638
1670
|
backgroundColor: c.primary,
|
|
1639
|
-
color: c["on-primary"]
|
|
1671
|
+
color: c["on-primary"],
|
|
1672
|
+
"&:hover": { boxShadow: BaseShadows.raised }
|
|
1640
1673
|
},
|
|
1641
1674
|
secondary: {
|
|
1642
1675
|
backgroundColor: c.secondary,
|
|
1643
|
-
color: c["on-secondary"]
|
|
1676
|
+
color: c["on-secondary"],
|
|
1677
|
+
"&:hover": { boxShadow: BaseShadows.raised }
|
|
1644
1678
|
},
|
|
1645
1679
|
tertiary: {
|
|
1646
1680
|
backgroundColor: c.tertiary,
|
|
1647
|
-
color: c["on-tertiary"]
|
|
1681
|
+
color: c["on-tertiary"],
|
|
1682
|
+
"&:hover": { boxShadow: BaseShadows.raised }
|
|
1648
1683
|
},
|
|
1649
1684
|
warn: {
|
|
1650
1685
|
backgroundColor: c.warn,
|
|
1651
|
-
color: c["on-warn"]
|
|
1686
|
+
color: c["on-warn"],
|
|
1687
|
+
"&:hover": { boxShadow: BaseShadows.raised }
|
|
1652
1688
|
},
|
|
1653
1689
|
success: {
|
|
1654
1690
|
backgroundColor: c.success,
|
|
1655
|
-
color: c["on-success"]
|
|
1691
|
+
color: c["on-success"],
|
|
1692
|
+
"&:hover": { boxShadow: BaseShadows.raised }
|
|
1656
1693
|
},
|
|
1657
1694
|
disabled: {
|
|
1658
1695
|
backgroundColor: "transparent !important",
|
|
@@ -1908,7 +1945,7 @@ var deepMerge = (base, override) => {
|
|
|
1908
1945
|
for (const [key, value] of Object.entries(override)) out[key] = isRecord$1(value) && isRecord$1(out[key]) ? deepMerge(out[key], value) : value;
|
|
1909
1946
|
return out;
|
|
1910
1947
|
};
|
|
1911
|
-
var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows = BaseShadows, motion, typography, borders, thicknesses, spacing, components }) => ({
|
|
1948
|
+
var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows = BaseShadows, motion, backdrops, typography, borders, thicknesses, spacing, components }) => ({
|
|
1912
1949
|
id,
|
|
1913
1950
|
name,
|
|
1914
1951
|
colors,
|
|
@@ -1924,6 +1961,10 @@ var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows =
|
|
|
1924
1961
|
...BaseMotion,
|
|
1925
1962
|
...motion
|
|
1926
1963
|
},
|
|
1964
|
+
backdrops: {
|
|
1965
|
+
...BaseBackdrops,
|
|
1966
|
+
...backdrops
|
|
1967
|
+
},
|
|
1927
1968
|
thicknesses: {
|
|
1928
1969
|
...BaseThicknesses,
|
|
1929
1970
|
...thicknesses
|