nntc-ui 0.0.91 → 0.0.92
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/index.css +3 -0
- package/index.d.ts +1 -0
- package/index.js +16 -3
- package/package.json +1 -1
package/index.css
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -2153,6 +2153,7 @@ __export(multiSelect_exports, {
|
|
|
2153
2153
|
input: () => input7,
|
|
2154
2154
|
itemIcon: () => itemIcon3,
|
|
2155
2155
|
label: () => label6,
|
|
2156
|
+
labelSelectedCount: () => labelSelectedCount,
|
|
2156
2157
|
medium: () => medium10,
|
|
2157
2158
|
outlined: () => outlined7,
|
|
2158
2159
|
popoverContent: () => popoverContent4,
|
|
@@ -2169,6 +2170,7 @@ var fullWidth3 = "multiSelect_fullWidth";
|
|
|
2169
2170
|
var medium10 = "multiSelect_medium";
|
|
2170
2171
|
var small10 = "multiSelect_small";
|
|
2171
2172
|
var label6 = "multiSelect_label";
|
|
2173
|
+
var labelSelectedCount = "multiSelect_labelSelectedCount";
|
|
2172
2174
|
var wrapper5 = "multiSelect_wrapper";
|
|
2173
2175
|
var input7 = "multiSelect_input";
|
|
2174
2176
|
var withIcon4 = "multiSelect_withIcon";
|
|
@@ -2191,6 +2193,7 @@ var multiSelect_default = {
|
|
|
2191
2193
|
medium: medium10,
|
|
2192
2194
|
small: small10,
|
|
2193
2195
|
label: label6,
|
|
2196
|
+
labelSelectedCount,
|
|
2194
2197
|
wrapper: wrapper5,
|
|
2195
2198
|
input: input7,
|
|
2196
2199
|
withIcon: withIcon4,
|
|
@@ -2429,6 +2432,7 @@ function MultiSelect(props) {
|
|
|
2429
2432
|
disabled: disabled2,
|
|
2430
2433
|
id,
|
|
2431
2434
|
titleType = "allValue",
|
|
2435
|
+
showSelectedCount = false,
|
|
2432
2436
|
enableSearch = false,
|
|
2433
2437
|
popoverInComponent = false,
|
|
2434
2438
|
...inputProps
|
|
@@ -2477,7 +2481,7 @@ function MultiSelect(props) {
|
|
|
2477
2481
|
if (!activeItems.length)
|
|
2478
2482
|
return "";
|
|
2479
2483
|
return getTitle(titleType, activeItems, t);
|
|
2480
|
-
}, [titleType, activeItems]);
|
|
2484
|
+
}, [titleType, activeItems, t]);
|
|
2481
2485
|
const clearHandler = () => {
|
|
2482
2486
|
onValueChange?.(null);
|
|
2483
2487
|
};
|
|
@@ -2492,7 +2496,7 @@ function MultiSelect(props) {
|
|
|
2492
2496
|
classes?.root
|
|
2493
2497
|
),
|
|
2494
2498
|
children: [
|
|
2495
|
-
!!label10 && /* @__PURE__ */
|
|
2499
|
+
!!label10 && /* @__PURE__ */ jsxs12(
|
|
2496
2500
|
Typography,
|
|
2497
2501
|
{
|
|
2498
2502
|
className: classnames12(label6, classes?.label),
|
|
@@ -2500,7 +2504,16 @@ function MultiSelect(props) {
|
|
|
2500
2504
|
variant: "caption",
|
|
2501
2505
|
htmlFor: inputId,
|
|
2502
2506
|
onClick: inputClickHandler,
|
|
2503
|
-
children:
|
|
2507
|
+
children: [
|
|
2508
|
+
label10,
|
|
2509
|
+
showSelectedCount && activeItems.length > 0 && /* @__PURE__ */ jsx22(
|
|
2510
|
+
"span",
|
|
2511
|
+
{
|
|
2512
|
+
className: classnames12(labelSelectedCount, classes?.labelSelectedCount),
|
|
2513
|
+
children: ` (${activeItems.length})`
|
|
2514
|
+
}
|
|
2515
|
+
)
|
|
2516
|
+
]
|
|
2504
2517
|
}
|
|
2505
2518
|
),
|
|
2506
2519
|
/* @__PURE__ */ jsxs12(
|