@uni-design-system/uni-angular 10.0.0 → 10.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uni-design-system/uni-angular",
3
- "version": "10.0.0",
3
+ "version": "10.2.0",
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": "^10.0.0"
25
+ "@uni-design-system/uni-core": "^10.2.0"
26
26
  },
27
27
  "module": "fesm2022/uni-design-system-uni-angular.mjs",
28
28
  "typings": "types/uni-design-system-uni-angular.d.ts",
@@ -901,6 +901,30 @@ var buildBorders = (c) => ({
901
901
  * surface and draws the edge — so every role stays consistent and a theme can
902
902
  * still override any single cell.
903
903
  */
904
+ /**
905
+ * Accent roles for the selection controls (checkbox, radio, toggle).
906
+ *
907
+ * A variant names the intent; this says which colour token draws it, and the
908
+ * component decides where it lands — the box fill, the ring, the dot, the
909
+ * track, the focus ring. Keeping it as a role rather than a `variants`
910
+ * StyleExpression is what stops interior class names like `.checkbox-check`
911
+ * becoming public theme contract.
912
+ *
913
+ * The same seven names `button` and `iconButton` theme, so the library is
914
+ * consistent about which intents exist by default.
915
+ */
916
+ var SELECTION_ACCENTS = {
917
+ primary: { accent: "primary" },
918
+ secondary: { accent: "secondary" },
919
+ tertiary: { accent: "tertiary" },
920
+ warn: { accent: "warn" },
921
+ success: { accent: "success" },
922
+ disabled: { accent: "disabled" },
923
+ ghost: {
924
+ accent: "ghost",
925
+ onAccent: "on-primary"
926
+ }
927
+ };
904
928
  var tagVariant = (c, role) => ({ [role]: {
905
929
  backgroundColor: c[`${role}-container`],
906
930
  color: c[`on-${role}-container`],
@@ -943,7 +967,30 @@ var buildComponents = (c) => ({
943
967
  divider: "light",
944
968
  elevation: "menu",
945
969
  padding: "md",
946
- backdrop: { background: "rgba(0, 0, 0, 0.4)" }
970
+ backdrop: { background: "rgba(0, 0, 0, 0.4)" },
971
+ scrim: true,
972
+ background: "solid"
973
+ } },
974
+ drawerHeader: { options: {
975
+ color: void 0,
976
+ height: 56,
977
+ padding: "md",
978
+ textRole: "title-medium",
979
+ textAlign: "left",
980
+ divider: "light",
981
+ closeButtonIcon: "close",
982
+ closeButtonSize: "md"
983
+ } },
984
+ drawerButtons: { options: {
985
+ gap: "sm",
986
+ padding: "md",
987
+ justifyContent: "flex-end",
988
+ confirmButtonVariant: "primary",
989
+ cancelButtonVariant: "quaternary",
990
+ buttonSize: "md",
991
+ divider: "light",
992
+ stretch: false,
993
+ reverseOrder: false
947
994
  } },
948
995
  avatar: {
949
996
  options: {
@@ -1014,18 +1061,24 @@ var buildComponents = (c) => ({
1014
1061
  activeColor: "primary-container",
1015
1062
  maxSuggestions: 8
1016
1063
  } },
1017
- checkbox: { options: {
1018
- size: 20,
1019
- boxColor: "surface",
1020
- borderRadius: 2,
1021
- focusRingGap: 2
1022
- } },
1023
- radio: { options: {
1024
- size: 20,
1025
- ringColor: "outline",
1026
- fillColor: "surface",
1027
- motion: "control"
1028
- } },
1064
+ checkbox: {
1065
+ options: {
1066
+ size: 20,
1067
+ boxColor: "surface",
1068
+ borderRadius: 2,
1069
+ focusRingGap: 2
1070
+ },
1071
+ variantOptions: SELECTION_ACCENTS
1072
+ },
1073
+ radio: {
1074
+ options: {
1075
+ size: 20,
1076
+ ringColor: "outline",
1077
+ fillColor: "surface",
1078
+ motion: "control"
1079
+ },
1080
+ variantOptions: SELECTION_ACCENTS
1081
+ },
1029
1082
  dialog: { options: {
1030
1083
  borderRadius: "lg",
1031
1084
  color: "primary-surface",
@@ -1087,13 +1140,16 @@ var buildComponents = (c) => ({
1087
1140
  activeSymbol: "check",
1088
1141
  motion: "control"
1089
1142
  },
1090
- variants: { warn: {
1091
- color: c.warn,
1092
- [HOVER_OR_KEYBOARD_FOCUS]: {
1093
- backgroundColor: c["warn-container"],
1094
- color: c["on-warn-container"]
1143
+ variants: {
1144
+ primary: {},
1145
+ warn: {
1146
+ color: c.warn,
1147
+ [HOVER_OR_KEYBOARD_FOCUS]: {
1148
+ backgroundColor: c["warn-container"],
1149
+ color: c["on-warn-container"]
1150
+ }
1095
1151
  }
1096
- } }
1152
+ }
1097
1153
  },
1098
1154
  popover: { options: {
1099
1155
  color: "primary-surface",
@@ -1164,9 +1220,6 @@ var buildComponents = (c) => ({
1164
1220
  } },
1165
1221
  quantityStepper: {
1166
1222
  options: {
1167
- color: "primary-surface",
1168
- border: "light",
1169
- borderRadius: "xs",
1170
1223
  incrementIcon: "plus",
1171
1224
  decrementIcon: "minus",
1172
1225
  deleteIcon: "delete",
@@ -1639,11 +1692,31 @@ var buildComponents = (c) => ({
1639
1692
  grade: 0,
1640
1693
  opticalSize: 24
1641
1694
  } },
1642
- toggle: { options: {
1643
- size: 20,
1644
- trackColor: "surface-variant",
1645
- knobColor: "surface"
1646
- } },
1695
+ toggle: {
1696
+ options: {
1697
+ trackColor: "surface-variant",
1698
+ knobColor: "surface",
1699
+ motion: "control"
1700
+ },
1701
+ variantOptions: SELECTION_ACCENTS,
1702
+ sizes: {
1703
+ sm: {
1704
+ width: 28,
1705
+ height: 16,
1706
+ padding: 3
1707
+ },
1708
+ md: {
1709
+ width: 32,
1710
+ height: 18,
1711
+ padding: 3
1712
+ },
1713
+ lg: {
1714
+ width: 40,
1715
+ height: 20,
1716
+ padding: 2
1717
+ }
1718
+ }
1719
+ },
1647
1720
  tooltip: { options: {
1648
1721
  border: void 0,
1649
1722
  borderRadius: "xs",
@@ -2086,7 +2159,7 @@ var UniThemes = {
2086
2159
  Object.keys(UniThemes)[0];
2087
2160
  //#endregion
2088
2161
  //#region package.json
2089
- var version = "10.0.0";
2162
+ var version = "10.2.0";
2090
2163
  //#endregion
2091
2164
  //#region schematics-src/ng-add/transforms.ts
2092
2165
  var addDependencies = (packageJsonText, deps) => {