@uni-design-system/uni-angular 5.2.0 → 6.0.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uni-design-system/uni-angular",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@angular/core": "^21.2.0",
|
|
23
23
|
"@angular/forms": "^21.2.0",
|
|
24
24
|
"@emotion/css": "^11.0.0",
|
|
25
|
-
"@uni-design-system/uni-core": "^
|
|
25
|
+
"@uni-design-system/uni-core": "^6.0.1"
|
|
26
26
|
},
|
|
27
27
|
"module": "fesm2022/uni-design-system-uni-angular.mjs",
|
|
28
28
|
"typings": "types/uni-design-system-uni-angular.d.ts",
|
|
@@ -555,6 +555,26 @@ var generateShadows = (colors, mode = "light") => {
|
|
|
555
555
|
warn: `0 0 5px ${rgba(error, .5)}, inset 0 0 5px ${rgba(error, .3)}`
|
|
556
556
|
};
|
|
557
557
|
};
|
|
558
|
+
/**
|
|
559
|
+
* Default icon primitives shipped with every theme. Each icon is an inline
|
|
560
|
+
* SVG data URI rendered as a CSS mask over `currentColor`, so icons recolor
|
|
561
|
+
* with the theme automatically. `createTheme` merges a theme's own `icons`
|
|
562
|
+
* over this set — add or override under any name; components render them by
|
|
563
|
+
* token via `uni-icon`, never by inlining SVG.
|
|
564
|
+
*/
|
|
565
|
+
var BaseIcons = {
|
|
566
|
+
alertCircle: "data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cpath d='M0 0h24v24H0V0z' fill='none'/%3e%3cpath d='M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z'/%3e%3c/svg%3e",
|
|
567
|
+
calendar: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z'%3E%3C/path%3E%3C/svg%3E",
|
|
568
|
+
checkCircle: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg%3E%3Cpath d='M32,0A32,32,0,1,0,64,32,32,32,0,0,0,32,0Zm2.0873,41.5-5.4107,5.4106-.02.02L14.1751,32.4492l5.4306-5.4306,9.051,9.0509L46.2861,18.44l5.4305,5.4306Z'/%3E%3C/g%3E%3C/svg%3E",
|
|
569
|
+
chevronUp: "data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='m296-345-56-56 240-240 240 240-56 56-184-184-184 184Z'/%3E%3C/svg%3E",
|
|
570
|
+
chevronDown: "data:image/svg+xml,%0A%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z'/%3E%3C/svg%3E",
|
|
571
|
+
chevronLeft: "data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z'/%3E%3C/svg%3E",
|
|
572
|
+
chevronRight: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3E%3Cpath d='M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z'/%3E%3C/svg%3E",
|
|
573
|
+
xCircle: "data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3e%3cg%3e%3cpath d='M32,0A32,32,0,1,0,64,32,32,32,0,0,0,32,0ZM47.4649,42.3543l-5.4306,5.43L31.68,37.4305,21.3257,47.7848l-5.4306-5.43L26.25,32,15.8951,21.6456l5.4306-5.4305L31.68,26.5694,42.0343,16.2151l5.4306,5.4305L37.1106,32Z'/%3e%3c/g%3e%3c/svg%3e",
|
|
574
|
+
search: "data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 50'%3e%3cg%3e%3cpath d='M 21 3 C 11.601563 3 4 10.601563 4 20 C 4 29.398438 11.601563 37 21 37 C 24.355469 37 27.460938 36.015625 30.09375 34.34375 L 42.375 46.625 L 46.625 42.375 L 34.5 30.28125 C 36.679688 27.421875 38 23.878906 38 20 C 38 10.601563 30.398438 3 21 3 Z M 21 7 C 28.199219 7 34 12.800781 34 20 C 34 27.199219 28.199219 33 21 33 C 13.800781 33 8 27.199219 8 20 C 8 12.800781 13.800781 7 21 7 Z'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",
|
|
575
|
+
close: "data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cg%3e%3cpath fill='currentColor' d='M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",
|
|
576
|
+
spinner: "data:image/svg+xml;charset=UTF-8,%3csvg stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3e%3cstyle%3e .oui_spinner %7b transform-origin: center; animation: rotate_360 2s linear infinite;%7d .oui_spinner circle %7b stroke-linecap: round; animation: dash 1.5s ease-in-out infinite;%7d %40keyframes rotate_360 %7b 100%25 %7b transform: rotate(360deg);%7d %7d %40keyframes dash %7b 0%25 %7b stroke-dasharray: 0 150; stroke-dashoffset: 0;%7d 47.5%25 %7b stroke-dasharray: 42 150; stroke-dashoffset: -16;%7d 95%25, 100%25 %7b stroke-dasharray: 42 150; stroke-dashoffset: -59;%7d %7d %3c/style%3e%3cg class='oui_spinner'%3e%3ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3e%3c/circle%3e%3c/g%3e%3c/svg%3e "
|
|
577
|
+
};
|
|
558
578
|
var BaseTypography = {
|
|
559
579
|
"display-large": {
|
|
560
580
|
fontFamily: "Red Hat Display",
|
|
@@ -692,6 +712,13 @@ var BaseTypography = {
|
|
|
692
712
|
fontSize: 16,
|
|
693
713
|
lineHeight: 24
|
|
694
714
|
},
|
|
715
|
+
stat: {
|
|
716
|
+
fontFamily: "Red Hat Display",
|
|
717
|
+
fontSize: 32,
|
|
718
|
+
lineHeight: 38,
|
|
719
|
+
fontWeight: 600,
|
|
720
|
+
letterSpacing: -.32
|
|
721
|
+
},
|
|
695
722
|
tag: {
|
|
696
723
|
fontFamily: "Red Hat Display",
|
|
697
724
|
fontSize: 15,
|
|
@@ -835,7 +862,23 @@ var buildComponents = (c) => ({
|
|
|
835
862
|
ringColor: "surface",
|
|
836
863
|
ringWidth: 2
|
|
837
864
|
} },
|
|
838
|
-
|
|
865
|
+
searchInput: { options: {
|
|
866
|
+
searchSymbol: "search",
|
|
867
|
+
clearSymbol: "close",
|
|
868
|
+
listColor: "primary-surface",
|
|
869
|
+
listShadow: "menu",
|
|
870
|
+
listBorderRadius: "xs",
|
|
871
|
+
maxSuggestions: 8
|
|
872
|
+
} },
|
|
873
|
+
checkbox: { options: {
|
|
874
|
+
size: 20,
|
|
875
|
+
boxColor: "surface"
|
|
876
|
+
} },
|
|
877
|
+
radio: { options: {
|
|
878
|
+
size: 20,
|
|
879
|
+
ringColor: "outline",
|
|
880
|
+
fillColor: "surface"
|
|
881
|
+
} },
|
|
839
882
|
dialog: { options: {
|
|
840
883
|
borderRadius: "lg",
|
|
841
884
|
color: "primary-surface",
|
|
@@ -1160,6 +1203,19 @@ var buildComponents = (c) => ({
|
|
|
1160
1203
|
currentPageBorder: "light",
|
|
1161
1204
|
currentPageBorderRadius: "xs"
|
|
1162
1205
|
} },
|
|
1206
|
+
stat: { options: {
|
|
1207
|
+
labelTypeface: "label",
|
|
1208
|
+
valueTypeface: "stat",
|
|
1209
|
+
color: "surface",
|
|
1210
|
+
border: "light",
|
|
1211
|
+
borderRadius: "xs",
|
|
1212
|
+
positiveColor: "success",
|
|
1213
|
+
negativeColor: "error",
|
|
1214
|
+
trendColor: "outline",
|
|
1215
|
+
trendAccent: "primary",
|
|
1216
|
+
padding: "md",
|
|
1217
|
+
gap: "xxs"
|
|
1218
|
+
} },
|
|
1163
1219
|
slider: { options: {
|
|
1164
1220
|
color: "primary",
|
|
1165
1221
|
trackColor: "surface-variant",
|
|
@@ -1186,7 +1242,11 @@ var buildComponents = (c) => ({
|
|
|
1186
1242
|
grade: 0,
|
|
1187
1243
|
opticalSize: 24
|
|
1188
1244
|
} },
|
|
1189
|
-
toggle: { options: {
|
|
1245
|
+
toggle: { options: {
|
|
1246
|
+
size: 20,
|
|
1247
|
+
trackColor: "surface-variant",
|
|
1248
|
+
knobColor: "surface"
|
|
1249
|
+
} },
|
|
1190
1250
|
tooltip: { options: {
|
|
1191
1251
|
border: void 0,
|
|
1192
1252
|
borderRadius: "xs",
|
|
@@ -1212,7 +1272,10 @@ var createTheme = ({ id, name, colors, icons = {}, radii = BaseRadii, shadows =
|
|
|
1212
1272
|
shadows,
|
|
1213
1273
|
spacing: BaseSpacing,
|
|
1214
1274
|
thicknesses: BaseThicknesses,
|
|
1215
|
-
icons
|
|
1275
|
+
icons: {
|
|
1276
|
+
...BaseIcons,
|
|
1277
|
+
...icons
|
|
1278
|
+
},
|
|
1216
1279
|
components: deepMerge(buildComponents(colors), components)
|
|
1217
1280
|
});
|
|
1218
1281
|
/**
|
|
@@ -1374,6 +1437,7 @@ var themeExport = (exportName, displayName, colorsConst, shadowsConst, radii) =>
|
|
|
1374
1437
|
` borders: borders(${colorsConst}),`,
|
|
1375
1438
|
` components: components(${colorsConst}),`,
|
|
1376
1439
|
` shadows: ${shadowsConst},`,
|
|
1440
|
+
" icons,",
|
|
1377
1441
|
...radii ? [" radii,"] : [],
|
|
1378
1442
|
"});"
|
|
1379
1443
|
].join("\n");
|
|
@@ -1428,6 +1492,7 @@ var emitThemeFile = (input) => {
|
|
|
1428
1492
|
" type Borders,",
|
|
1429
1493
|
" type Colors,",
|
|
1430
1494
|
" type ComponentThemes,",
|
|
1495
|
+
" type Icons,",
|
|
1431
1496
|
" type Shadows,",
|
|
1432
1497
|
" type UniTheme,",
|
|
1433
1498
|
"} from '@uni-design-system/uni-core';",
|
|
@@ -1445,6 +1510,15 @@ var emitThemeFile = (input) => {
|
|
|
1445
1510
|
" */",
|
|
1446
1511
|
"const components = (colors: Colors): ComponentThemes => ({});",
|
|
1447
1512
|
"",
|
|
1513
|
+
"/**",
|
|
1514
|
+
" * Icon primitives, merged over the built-in set (close, search, spinner,",
|
|
1515
|
+
" * chevrons, …). Define an icon ONCE here as an inline SVG data URI — it is",
|
|
1516
|
+
" * masked with currentColor, so it recolors with the theme — and render it",
|
|
1517
|
+
" * anywhere via `<uni-icon name='…'/>`. Never inline SVG in components.",
|
|
1518
|
+
" * Example: logo: \"data:image/svg+xml,%3Csvg xmlns='…' viewBox='0 0 24 24'%3E…%3C/svg%3E\",",
|
|
1519
|
+
" */",
|
|
1520
|
+
"const icons: Icons = {};",
|
|
1521
|
+
"",
|
|
1448
1522
|
...radii ? [
|
|
1449
1523
|
`/** Shape language: '${input.shape}'. */`,
|
|
1450
1524
|
`const radii = {\n${recordLiteral(radii, " ")}\n};`,
|
|
@@ -1557,7 +1631,7 @@ var UniThemes = {
|
|
|
1557
1631
|
Object.keys(UniThemes)[0];
|
|
1558
1632
|
//#endregion
|
|
1559
1633
|
//#region package.json
|
|
1560
|
-
var version = "
|
|
1634
|
+
var version = "6.0.1";
|
|
1561
1635
|
//#endregion
|
|
1562
1636
|
//#region schematics-src/ng-add/transforms.ts
|
|
1563
1637
|
var addDependencies = (packageJsonText, deps) => {
|