@nurix/ui-component-library 1.1.7-stage.145 → 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 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
@@ -18013,6 +18013,7 @@ function MultiSelect({
18013
18013
  showSearch = false,
18014
18014
  searchPlaceholder = "Search\u2026",
18015
18015
  showSelectAll = true,
18016
+ allSelectedLabel,
18016
18017
  size = "regular",
18017
18018
  bg = "default",
18018
18019
  disabled = false,
@@ -18047,11 +18048,12 @@ function MultiSelect({
18047
18048
  };
18048
18049
  const summary = React48.useMemo(() => {
18049
18050
  if (value.length === 0) return "";
18051
+ if (allSelected && allSelectedLabel) return `${allSelectedLabel} (${value.length})`;
18050
18052
  const valueSet = new Set(value);
18051
18053
  const labels = items.filter((i) => valueSet.has(i.value)).map((i) => i.label);
18052
18054
  if (labels.length <= 2) return labels.join(", ");
18053
18055
  return `${labels.slice(0, 2).join(", ")} +${labels.length - 2}`;
18054
- }, [items, value]);
18056
+ }, [items, value, allSelected, allSelectedLabel]);
18055
18057
  const sizeClass = size === "small" ? SELECT_TOKENS.container.singleLineSmall : size === "large" ? SELECT_TOKENS.container.singleLineLarge : SELECT_TOKENS.container.singleLineRegular;
18056
18058
  const trigger = /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
18057
18059
  "button",
package/dist/index.mjs CHANGED
@@ -17908,6 +17908,7 @@ function MultiSelect({
17908
17908
  showSearch = false,
17909
17909
  searchPlaceholder = "Search\u2026",
17910
17910
  showSelectAll = true,
17911
+ allSelectedLabel,
17911
17912
  size = "regular",
17912
17913
  bg = "default",
17913
17914
  disabled = false,
@@ -17942,11 +17943,12 @@ function MultiSelect({
17942
17943
  };
17943
17944
  const summary = React48.useMemo(() => {
17944
17945
  if (value.length === 0) return "";
17946
+ if (allSelected && allSelectedLabel) return `${allSelectedLabel} (${value.length})`;
17945
17947
  const valueSet = new Set(value);
17946
17948
  const labels = items.filter((i) => valueSet.has(i.value)).map((i) => i.label);
17947
17949
  if (labels.length <= 2) return labels.join(", ");
17948
17950
  return `${labels.slice(0, 2).join(", ")} +${labels.length - 2}`;
17949
- }, [items, value]);
17951
+ }, [items, value, allSelected, allSelectedLabel]);
17950
17952
  const sizeClass = size === "small" ? SELECT_TOKENS.container.singleLineSmall : size === "large" ? SELECT_TOKENS.container.singleLineLarge : SELECT_TOKENS.container.singleLineRegular;
17951
17953
  const trigger = /* @__PURE__ */ jsxs35(
17952
17954
  "button",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurix/ui-component-library",
3
- "version": "1.1.7-stage.145",
3
+ "version": "1.1.7-stage.146",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",