@nurix/ui-component-library 1.1.7-stage.145 → 1.1.7-stage.147
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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +7 -3
- package/dist/index.mjs +7 -3
- 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
|
/**
|
|
@@ -3854,6 +3861,15 @@ interface WeeklyScheduleProps {
|
|
|
3854
3861
|
* @default { start: "09:00", end: "17:00" }
|
|
3855
3862
|
*/
|
|
3856
3863
|
defaultSlot?: WeeklyTimeSlot;
|
|
3864
|
+
/**
|
|
3865
|
+
* Optional id namespace for the internal day toggles. When more than
|
|
3866
|
+
* one `WeeklySchedule` can appear on the same page (e.g. one per
|
|
3867
|
+
* timezone group), pass a value unique to each instance so the per-day
|
|
3868
|
+
* switch `id`/`htmlFor` pairs stay unique. Without it every instance
|
|
3869
|
+
* emits the same ids and clicking a day label toggles the first
|
|
3870
|
+
* instance's switch. Defaults to `"weekly-schedule"`.
|
|
3871
|
+
*/
|
|
3872
|
+
id?: string;
|
|
3857
3873
|
className?: string;
|
|
3858
3874
|
style?: React$1.CSSProperties;
|
|
3859
3875
|
/**
|
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
|
/**
|
|
@@ -3854,6 +3861,15 @@ interface WeeklyScheduleProps {
|
|
|
3854
3861
|
* @default { start: "09:00", end: "17:00" }
|
|
3855
3862
|
*/
|
|
3856
3863
|
defaultSlot?: WeeklyTimeSlot;
|
|
3864
|
+
/**
|
|
3865
|
+
* Optional id namespace for the internal day toggles. When more than
|
|
3866
|
+
* one `WeeklySchedule` can appear on the same page (e.g. one per
|
|
3867
|
+
* timezone group), pass a value unique to each instance so the per-day
|
|
3868
|
+
* switch `id`/`htmlFor` pairs stay unique. Without it every instance
|
|
3869
|
+
* emits the same ids and clicking a day label toggles the first
|
|
3870
|
+
* instance's switch. Defaults to `"weekly-schedule"`.
|
|
3871
|
+
*/
|
|
3872
|
+
id?: string;
|
|
3857
3873
|
className?: string;
|
|
3858
3874
|
style?: React$1.CSSProperties;
|
|
3859
3875
|
/**
|
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",
|
|
@@ -18597,6 +18599,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18597
18599
|
onValidationChange,
|
|
18598
18600
|
dayLabels,
|
|
18599
18601
|
defaultSlot = DEFAULT_SLOT,
|
|
18602
|
+
id = "weekly-schedule",
|
|
18600
18603
|
className,
|
|
18601
18604
|
style,
|
|
18602
18605
|
"data-testid": dataTestId
|
|
@@ -18667,6 +18670,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18667
18670
|
const entry = (_a5 = value.find((d) => d.day === day)) != null ? _a5 : { day, enabled: false, slots: [] };
|
|
18668
18671
|
const isEnabled = entry.enabled;
|
|
18669
18672
|
const slotsToRender = entry.slots.length > 0 ? entry.slots : [defaultSlot];
|
|
18673
|
+
const switchId = `${id}-switch-${day}`;
|
|
18670
18674
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
18671
18675
|
"div",
|
|
18672
18676
|
{
|
|
@@ -18681,7 +18685,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18681
18685
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
18682
18686
|
Switch,
|
|
18683
18687
|
{
|
|
18684
|
-
id:
|
|
18688
|
+
id: switchId,
|
|
18685
18689
|
checked: isEnabled,
|
|
18686
18690
|
onCheckedChange: (checked) => handleToggle(day, checked),
|
|
18687
18691
|
size: "small",
|
|
@@ -18691,7 +18695,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18691
18695
|
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
18692
18696
|
"label",
|
|
18693
18697
|
{
|
|
18694
|
-
htmlFor:
|
|
18698
|
+
htmlFor: switchId,
|
|
18695
18699
|
className: cn(
|
|
18696
18700
|
WEEKLY_SCHEDULE_TOKENS.dayLabel,
|
|
18697
18701
|
isEnabled ? WEEKLY_SCHEDULE_TOKENS.dayLabelEnabled : WEEKLY_SCHEDULE_TOKENS.dayLabelDisabled,
|
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",
|
|
@@ -18492,6 +18494,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18492
18494
|
onValidationChange,
|
|
18493
18495
|
dayLabels,
|
|
18494
18496
|
defaultSlot = DEFAULT_SLOT,
|
|
18497
|
+
id = "weekly-schedule",
|
|
18495
18498
|
className,
|
|
18496
18499
|
style,
|
|
18497
18500
|
"data-testid": dataTestId
|
|
@@ -18562,6 +18565,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18562
18565
|
const entry = (_a5 = value.find((d) => d.day === day)) != null ? _a5 : { day, enabled: false, slots: [] };
|
|
18563
18566
|
const isEnabled = entry.enabled;
|
|
18564
18567
|
const slotsToRender = entry.slots.length > 0 ? entry.slots : [defaultSlot];
|
|
18568
|
+
const switchId = `${id}-switch-${day}`;
|
|
18565
18569
|
return /* @__PURE__ */ jsxs38(
|
|
18566
18570
|
"div",
|
|
18567
18571
|
{
|
|
@@ -18576,7 +18580,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18576
18580
|
/* @__PURE__ */ jsx47(
|
|
18577
18581
|
Switch,
|
|
18578
18582
|
{
|
|
18579
|
-
id:
|
|
18583
|
+
id: switchId,
|
|
18580
18584
|
checked: isEnabled,
|
|
18581
18585
|
onCheckedChange: (checked) => handleToggle(day, checked),
|
|
18582
18586
|
size: "small",
|
|
@@ -18586,7 +18590,7 @@ var WeeklySchedule = React51.forwardRef(
|
|
|
18586
18590
|
/* @__PURE__ */ jsx47(
|
|
18587
18591
|
"label",
|
|
18588
18592
|
{
|
|
18589
|
-
htmlFor:
|
|
18593
|
+
htmlFor: switchId,
|
|
18590
18594
|
className: cn(
|
|
18591
18595
|
WEEKLY_SCHEDULE_TOKENS.dayLabel,
|
|
18592
18596
|
isEnabled ? WEEKLY_SCHEDULE_TOKENS.dayLabelEnabled : WEEKLY_SCHEDULE_TOKENS.dayLabelDisabled,
|