@uniformdev/design-system 20.41.0 → 20.42.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/dist/esm/index.js +12 -4
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +12 -4
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -2274,7 +2274,15 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
|
|
|
2274
2274
|
);
|
|
2275
2275
|
return null;
|
|
2276
2276
|
}
|
|
2277
|
-
return /* @__PURE__ */ jsx16(
|
|
2277
|
+
return /* @__PURE__ */ jsx16(
|
|
2278
|
+
IconComponent,
|
|
2279
|
+
{
|
|
2280
|
+
role: "img",
|
|
2281
|
+
size,
|
|
2282
|
+
...otherProps,
|
|
2283
|
+
css: [IconImg, iconColor ? functionalColors : void 0, customColor[iconColor]]
|
|
2284
|
+
}
|
|
2285
|
+
);
|
|
2278
2286
|
};
|
|
2279
2287
|
var Icon = React3.memo(IconInner);
|
|
2280
2288
|
|
|
@@ -7103,12 +7111,13 @@ var Counter = ({
|
|
|
7103
7111
|
if (typeof count === "undefined") {
|
|
7104
7112
|
return null;
|
|
7105
7113
|
}
|
|
7106
|
-
const
|
|
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
|
{
|
|
@@ -7641,7 +7650,6 @@ var descriptionListLabelStyles = css51`
|
|
|
7641
7650
|
`;
|
|
7642
7651
|
var descriptionListValueStyles = css51`
|
|
7643
7652
|
display: flex;
|
|
7644
|
-
align-items: center;
|
|
7645
7653
|
margin: 0;
|
|
7646
7654
|
`;
|
|
7647
7655
|
|
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
|
-
|
|
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
|
-
|
|
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
|
@@ -3988,7 +3988,15 @@ var IconInner = ({ icon, iconColor = "default", size = "1.5rem", ...otherProps }
|
|
|
3988
3988
|
);
|
|
3989
3989
|
return null;
|
|
3990
3990
|
}
|
|
3991
|
-
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
3992
|
+
IconComponent,
|
|
3993
|
+
{
|
|
3994
|
+
role: "img",
|
|
3995
|
+
size,
|
|
3996
|
+
...otherProps,
|
|
3997
|
+
css: [IconImg, iconColor ? functionalColors : void 0, customColor[iconColor]]
|
|
3998
|
+
}
|
|
3999
|
+
);
|
|
3992
4000
|
};
|
|
3993
4001
|
var Icon = import_react24.default.memo(IconInner);
|
|
3994
4002
|
|
|
@@ -8900,12 +8908,13 @@ var Counter = ({
|
|
|
8900
8908
|
if (typeof count === "undefined") {
|
|
8901
8909
|
return null;
|
|
8902
8910
|
}
|
|
8903
|
-
const
|
|
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
|
{
|
|
@@ -9440,7 +9449,6 @@ var descriptionListLabelStyles = import_react75.css`
|
|
|
9440
9449
|
`;
|
|
9441
9450
|
var descriptionListValueStyles = import_react75.css`
|
|
9442
9451
|
display: flex;
|
|
9443
|
-
align-items: center;
|
|
9444
9452
|
margin: 0;
|
|
9445
9453
|
`;
|
|
9446
9454
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.42.1",
|
|
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.
|
|
42
|
-
"@uniformdev/richtext": "^20.
|
|
41
|
+
"@uniformdev/canvas": "^20.42.1",
|
|
42
|
+
"@uniformdev/richtext": "^20.42.1",
|
|
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": "
|
|
96
|
+
"gitHead": "d471dc57b0fec6ddcc8377bb6aeca8afd7221dd4"
|
|
97
97
|
}
|