@uniformdev/design-system 20.39.3-alpha.1 → 20.39.3-alpha.11

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/dist/esm/index.js CHANGED
@@ -2275,7 +2275,15 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
2275
2275
  );
2276
2276
  return null;
2277
2277
  }
2278
- return /* @__PURE__ */ jsx16(IconComponent, { role: "img", size, ...otherProps, css: [IconImg, customColor[iconColor]] });
2278
+ return /* @__PURE__ */ jsx16(
2279
+ IconComponent,
2280
+ {
2281
+ role: "img",
2282
+ size,
2283
+ ...otherProps,
2284
+ css: [IconImg, iconColor ? functionalColors : void 0, customColor[iconColor]]
2285
+ }
2286
+ );
2279
2287
  };
2280
2288
  var Icon = React3.memo(IconInner);
2281
2289
 
@@ -7103,12 +7111,13 @@ var Counter = ({
7103
7111
  if (typeof count === "undefined") {
7104
7112
  return null;
7105
7113
  }
7106
- const isTripleDigits = count > 99 ? /* @__PURE__ */ jsxs39("span", { css: counterTripleValue, title: `${count}`, children: [
7114
+ const isNumber = typeof count === "number";
7115
+ const isTripleDigits = isNumber && count > 99 ? /* @__PURE__ */ jsxs39("span", { css: counterTripleValue, title: `${count}`, children: [
7107
7116
  "99",
7108
7117
  /* @__PURE__ */ jsx60(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.5rem", css: counterIcon.tripleValue })
7109
7118
  ] }) : count;
7110
7119
  const formatCount = count === 0 ? /* @__PURE__ */ jsx60("span", { css: counterZeroValue, title: `${count}` }) : isTripleDigits;
7111
- return /* @__PURE__ */ jsxs39("div", { css: [counterContainer(bgColor, Boolean(icon)), sizeStyles[size]], ...props, children: [
7120
+ return /* @__PURE__ */ jsxs39("div", { css: [counterContainer(bgColor, Boolean(icon || !isNumber)), sizeStyles[size]], ...props, children: [
7112
7121
  icon ? /* @__PURE__ */ jsx60(
7113
7122
  "span",
7114
7123
  {
package/dist/index.d.mts CHANGED
@@ -1502,8 +1502,10 @@ declare const MultilineChip: ({ children, onClick, ...props }: MultilineChipProp
1502
1502
  type CounterBgColors = 'var(--white)' | 'var(--gray-50)' | 'var(--accent-light)' | 'var(--accent-dark)' | 'transparent';
1503
1503
  type CounterIconColors = 'auto' | 'var(--utility-caution-icon)' | 'var(--utility-danger-icon)' | 'var(--utility-info-icon)' | 'var(--utility-success-icon)' | 'red';
1504
1504
  type CounterProps = {
1505
- /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear. */
1506
- count: number | undefined;
1505
+ /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear.
1506
+ * String can be used for formatting purposes, e.g. "1.2k" or regionalized number, e.g. "1,200"
1507
+ */
1508
+ count: number | string | undefined;
1507
1509
  /** sets the background color
1508
1510
  * @default 'transparent'
1509
1511
  */
package/dist/index.d.ts CHANGED
@@ -1502,8 +1502,10 @@ declare const MultilineChip: ({ children, onClick, ...props }: MultilineChipProp
1502
1502
  type CounterBgColors = 'var(--white)' | 'var(--gray-50)' | 'var(--accent-light)' | 'var(--accent-dark)' | 'transparent';
1503
1503
  type CounterIconColors = 'auto' | 'var(--utility-caution-icon)' | 'var(--utility-danger-icon)' | 'var(--utility-info-icon)' | 'var(--utility-success-icon)' | 'red';
1504
1504
  type CounterProps = {
1505
- /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear. */
1506
- count: number | undefined;
1505
+ /** sets the count value, a 0 will show a dot instead of a number. Undefined will cause the counter to disappear.
1506
+ * String can be used for formatting purposes, e.g. "1.2k" or regionalized number, e.g. "1,200"
1507
+ */
1508
+ count: number | string | undefined;
1507
1509
  /** sets the background color
1508
1510
  * @default 'transparent'
1509
1511
  */
package/dist/index.js CHANGED
@@ -3989,7 +3989,15 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
3989
3989
  );
3990
3990
  return null;
3991
3991
  }
3992
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { role: "img", size, ...otherProps, css: [IconImg, customColor[iconColor]] });
3992
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3993
+ IconComponent,
3994
+ {
3995
+ role: "img",
3996
+ size,
3997
+ ...otherProps,
3998
+ css: [IconImg, iconColor ? functionalColors : void 0, customColor[iconColor]]
3999
+ }
4000
+ );
3993
4001
  };
3994
4002
  var Icon = import_react24.default.memo(IconInner);
3995
4003
 
@@ -8900,12 +8908,13 @@ var Counter = ({
8900
8908
  if (typeof count === "undefined") {
8901
8909
  return null;
8902
8910
  }
8903
- const isTripleDigits = count > 99 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { css: counterTripleValue, title: `${count}`, children: [
8911
+ const isNumber = typeof count === "number";
8912
+ const isTripleDigits = isNumber && count > 99 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { css: counterTripleValue, title: `${count}`, children: [
8904
8913
  "99",
8905
8914
  /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Icon, { icon: "math-plus", iconColor: "currentColor", size: "0.5rem", css: counterIcon.tripleValue })
8906
8915
  ] }) : count;
8907
8916
  const formatCount = count === 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { css: counterZeroValue, title: `${count}` }) : isTripleDigits;
8908
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: [counterContainer(bgColor, Boolean(icon)), sizeStyles[size]], ...props, children: [
8917
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { css: [counterContainer(bgColor, Boolean(icon || !isNumber)), sizeStyles[size]], ...props, children: [
8909
8918
  icon ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
8910
8919
  "span",
8911
8920
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "20.39.3-alpha.1+5c5ebdb625",
3
+ "version": "20.39.3-alpha.11+b3ab5fb305",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "exports": {
@@ -38,8 +38,8 @@
38
38
  "@storybook/theming": "^8.3.3",
39
39
  "@types/react": "18.3.24",
40
40
  "@types/react-dom": "18.3.7",
41
- "@uniformdev/canvas": "^20.39.3-alpha.1+5c5ebdb625",
42
- "@uniformdev/richtext": "^20.39.3-alpha.1+5c5ebdb625",
41
+ "@uniformdev/canvas": "^20.39.3-alpha.11+b3ab5fb305",
42
+ "@uniformdev/richtext": "^20.39.3-alpha.11+b3ab5fb305",
43
43
  "@vitest/coverage-v8": "3.2.4",
44
44
  "autoprefixer": "10.4.21",
45
45
  "hygen": "6.2.11",
@@ -93,5 +93,5 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "gitHead": "5c5ebdb6256f19b67d7941890176e63f3d60b8f4"
96
+ "gitHead": "b3ab5fb305533690de4bbd859a69196b6c26ee2f"
97
97
  }