@nurix/ui-component-library 1.1.7-stage.143 → 1.1.7-stage.146
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/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +6 -9
- package/dist/index.mjs +6 -9
- package/dist/styles.css +3 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3668,6 +3668,13 @@ interface MultiSelectProps<T extends string = string> {
|
|
|
3668
3668
|
* @default true
|
|
3669
3669
|
*/
|
|
3670
3670
|
showSelectAll?: boolean;
|
|
3671
|
+
/**
|
|
3672
|
+
* When every selectable item is selected, collapse the trigger summary to
|
|
3673
|
+
* this label plus the count — e.g. `allSelectedLabel="All tools selected"`
|
|
3674
|
+
* renders `All tools selected (4)` instead of the comma-separated list.
|
|
3675
|
+
* When omitted, the comma summary is shown for the all-selected case too.
|
|
3676
|
+
*/
|
|
3677
|
+
allSelectedLabel?: string;
|
|
3671
3678
|
/**
|
|
3672
3679
|
* Size variant. Same vocabulary as `SelectTrigger.size` so a paired
|
|
3673
3680
|
* single-select and multi-select stay visually aligned.
|
|
@@ -3717,7 +3724,7 @@ interface MultiSelectProps<T extends string = string> {
|
|
|
3717
3724
|
* a filter pill — so it slots into form layouts next to a normal Select
|
|
3718
3725
|
* without visual drift.
|
|
3719
3726
|
*/
|
|
3720
|
-
declare function MultiSelect<T extends string = string>({ value, onValueChange, items, placeholder, label, showSearch, searchPlaceholder, showSelectAll, size, bg, disabled, maxHeight, id, className, "data-testid": dataTestId, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
3727
|
+
declare function MultiSelect<T extends string = string>({ value, onValueChange, items, placeholder, label, showSearch, searchPlaceholder, showSelectAll, allSelectedLabel, size, bg, disabled, maxHeight, id, className, "data-testid": dataTestId, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
3721
3728
|
|
|
3722
3729
|
interface ChipProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick"> {
|
|
3723
3730
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3668,6 +3668,13 @@ interface MultiSelectProps<T extends string = string> {
|
|
|
3668
3668
|
* @default true
|
|
3669
3669
|
*/
|
|
3670
3670
|
showSelectAll?: boolean;
|
|
3671
|
+
/**
|
|
3672
|
+
* When every selectable item is selected, collapse the trigger summary to
|
|
3673
|
+
* this label plus the count — e.g. `allSelectedLabel="All tools selected"`
|
|
3674
|
+
* renders `All tools selected (4)` instead of the comma-separated list.
|
|
3675
|
+
* When omitted, the comma summary is shown for the all-selected case too.
|
|
3676
|
+
*/
|
|
3677
|
+
allSelectedLabel?: string;
|
|
3671
3678
|
/**
|
|
3672
3679
|
* Size variant. Same vocabulary as `SelectTrigger.size` so a paired
|
|
3673
3680
|
* single-select and multi-select stay visually aligned.
|
|
@@ -3717,7 +3724,7 @@ interface MultiSelectProps<T extends string = string> {
|
|
|
3717
3724
|
* a filter pill — so it slots into form layouts next to a normal Select
|
|
3718
3725
|
* without visual drift.
|
|
3719
3726
|
*/
|
|
3720
|
-
declare function MultiSelect<T extends string = string>({ value, onValueChange, items, placeholder, label, showSearch, searchPlaceholder, showSelectAll, size, bg, disabled, maxHeight, id, className, "data-testid": dataTestId, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
3727
|
+
declare function MultiSelect<T extends string = string>({ value, onValueChange, items, placeholder, label, showSearch, searchPlaceholder, showSelectAll, allSelectedLabel, size, bg, disabled, maxHeight, id, className, "data-testid": dataTestId, }: MultiSelectProps<T>): react_jsx_runtime.JSX.Element;
|
|
3721
3728
|
|
|
3722
3729
|
interface ChipProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "onClick"> {
|
|
3723
3730
|
/**
|
package/dist/index.js
CHANGED
|
@@ -10206,13 +10206,7 @@ var TagBadge = React21.forwardRef(
|
|
|
10206
10206
|
} : void 0
|
|
10207
10207
|
}
|
|
10208
10208
|
),
|
|
10209
|
-
isSelected && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
10210
|
-
import_lucide_react5.Check,
|
|
10211
|
-
{
|
|
10212
|
-
className: "size-3 shrink-0 text-fg-black ml-auto",
|
|
10213
|
-
strokeWidth: 1
|
|
10214
|
-
}
|
|
10215
|
-
)
|
|
10209
|
+
isSelected && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react5.Check, { className: "size-4 shrink-0 text-border-token-brand ml-auto" })
|
|
10216
10210
|
]
|
|
10217
10211
|
},
|
|
10218
10212
|
option.value
|
|
@@ -12742,10 +12736,11 @@ function Pagination({
|
|
|
12742
12736
|
value: String(rowsPerPage),
|
|
12743
12737
|
onValueChange: handleRowsPerPageSelect,
|
|
12744
12738
|
children: [
|
|
12745
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectTrigger, { size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectValue, {}) }),
|
|
12739
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectTrigger, { size: "small", className: "min-w-[72px]", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(SelectValue, {}) }),
|
|
12746
12740
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
12747
12741
|
SelectContent,
|
|
12748
12742
|
{
|
|
12743
|
+
className: "min-w-[72px]",
|
|
12749
12744
|
items: ROWS_PER_PAGE_OPTIONS.map((n) => ({
|
|
12750
12745
|
value: String(n),
|
|
12751
12746
|
label: String(n)
|
|
@@ -18018,6 +18013,7 @@ function MultiSelect({
|
|
|
18018
18013
|
showSearch = false,
|
|
18019
18014
|
searchPlaceholder = "Search\u2026",
|
|
18020
18015
|
showSelectAll = true,
|
|
18016
|
+
allSelectedLabel,
|
|
18021
18017
|
size = "regular",
|
|
18022
18018
|
bg = "default",
|
|
18023
18019
|
disabled = false,
|
|
@@ -18052,11 +18048,12 @@ function MultiSelect({
|
|
|
18052
18048
|
};
|
|
18053
18049
|
const summary = React48.useMemo(() => {
|
|
18054
18050
|
if (value.length === 0) return "";
|
|
18051
|
+
if (allSelected && allSelectedLabel) return `${allSelectedLabel} (${value.length})`;
|
|
18055
18052
|
const valueSet = new Set(value);
|
|
18056
18053
|
const labels = items.filter((i) => valueSet.has(i.value)).map((i) => i.label);
|
|
18057
18054
|
if (labels.length <= 2) return labels.join(", ");
|
|
18058
18055
|
return `${labels.slice(0, 2).join(", ")} +${labels.length - 2}`;
|
|
18059
|
-
}, [items, value]);
|
|
18056
|
+
}, [items, value, allSelected, allSelectedLabel]);
|
|
18060
18057
|
const sizeClass = size === "small" ? SELECT_TOKENS.container.singleLineSmall : size === "large" ? SELECT_TOKENS.container.singleLineLarge : SELECT_TOKENS.container.singleLineRegular;
|
|
18061
18058
|
const trigger = /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
18062
18059
|
"button",
|
package/dist/index.mjs
CHANGED
|
@@ -10085,13 +10085,7 @@ var TagBadge = React21.forwardRef(
|
|
|
10085
10085
|
} : void 0
|
|
10086
10086
|
}
|
|
10087
10087
|
),
|
|
10088
|
-
isSelected && /* @__PURE__ */ jsx19(
|
|
10089
|
-
Check2,
|
|
10090
|
-
{
|
|
10091
|
-
className: "size-3 shrink-0 text-fg-black ml-auto",
|
|
10092
|
-
strokeWidth: 1
|
|
10093
|
-
}
|
|
10094
|
-
)
|
|
10088
|
+
isSelected && /* @__PURE__ */ jsx19(Check2, { className: "size-4 shrink-0 text-border-token-brand ml-auto" })
|
|
10095
10089
|
]
|
|
10096
10090
|
},
|
|
10097
10091
|
option.value
|
|
@@ -12629,10 +12623,11 @@ function Pagination({
|
|
|
12629
12623
|
value: String(rowsPerPage),
|
|
12630
12624
|
onValueChange: handleRowsPerPageSelect,
|
|
12631
12625
|
children: [
|
|
12632
|
-
/* @__PURE__ */ jsx33(SelectTrigger, { size: "small", children: /* @__PURE__ */ jsx33(SelectValue, {}) }),
|
|
12626
|
+
/* @__PURE__ */ jsx33(SelectTrigger, { size: "small", className: "min-w-[72px]", children: /* @__PURE__ */ jsx33(SelectValue, {}) }),
|
|
12633
12627
|
/* @__PURE__ */ jsx33(
|
|
12634
12628
|
SelectContent,
|
|
12635
12629
|
{
|
|
12630
|
+
className: "min-w-[72px]",
|
|
12636
12631
|
items: ROWS_PER_PAGE_OPTIONS.map((n) => ({
|
|
12637
12632
|
value: String(n),
|
|
12638
12633
|
label: String(n)
|
|
@@ -17913,6 +17908,7 @@ function MultiSelect({
|
|
|
17913
17908
|
showSearch = false,
|
|
17914
17909
|
searchPlaceholder = "Search\u2026",
|
|
17915
17910
|
showSelectAll = true,
|
|
17911
|
+
allSelectedLabel,
|
|
17916
17912
|
size = "regular",
|
|
17917
17913
|
bg = "default",
|
|
17918
17914
|
disabled = false,
|
|
@@ -17947,11 +17943,12 @@ function MultiSelect({
|
|
|
17947
17943
|
};
|
|
17948
17944
|
const summary = React48.useMemo(() => {
|
|
17949
17945
|
if (value.length === 0) return "";
|
|
17946
|
+
if (allSelected && allSelectedLabel) return `${allSelectedLabel} (${value.length})`;
|
|
17950
17947
|
const valueSet = new Set(value);
|
|
17951
17948
|
const labels = items.filter((i) => valueSet.has(i.value)).map((i) => i.label);
|
|
17952
17949
|
if (labels.length <= 2) return labels.join(", ");
|
|
17953
17950
|
return `${labels.slice(0, 2).join(", ")} +${labels.length - 2}`;
|
|
17954
|
-
}, [items, value]);
|
|
17951
|
+
}, [items, value, allSelected, allSelectedLabel]);
|
|
17955
17952
|
const sizeClass = size === "small" ? SELECT_TOKENS.container.singleLineSmall : size === "large" ? SELECT_TOKENS.container.singleLineLarge : SELECT_TOKENS.container.singleLineRegular;
|
|
17956
17953
|
const trigger = /* @__PURE__ */ jsxs35(
|
|
17957
17954
|
"button",
|
package/dist/styles.css
CHANGED