@uni-design-system/uni-core 10.3.0 → 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 +18 -0
- package/dist/cjs/index.cjs +24 -7
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +24 -7
- 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
|
} },
|
|
@@ -1932,7 +1945,7 @@ var deepMerge = (base, override) => {
|
|
|
1932
1945
|
for (const [key, value] of Object.entries(override)) out[key] = isRecord$1(value) && isRecord$1(out[key]) ? deepMerge(out[key], value) : value;
|
|
1933
1946
|
return out;
|
|
1934
1947
|
};
|
|
1935
|
-
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 }) => ({
|
|
1936
1949
|
id,
|
|
1937
1950
|
name,
|
|
1938
1951
|
colors,
|
|
@@ -1948,6 +1961,10 @@ var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows =
|
|
|
1948
1961
|
...BaseMotion,
|
|
1949
1962
|
...motion
|
|
1950
1963
|
},
|
|
1964
|
+
backdrops: {
|
|
1965
|
+
...BaseBackdrops,
|
|
1966
|
+
...backdrops
|
|
1967
|
+
},
|
|
1951
1968
|
thicknesses: {
|
|
1952
1969
|
...BaseThicknesses,
|
|
1953
1970
|
...thicknesses
|