@nurix/ui-component-library 1.1.7-stage.134 → 1.1.7-stage.136
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 +392 -4
- package/dist/index.d.ts +392 -4
- package/dist/index.js +1775 -160
- package/dist/index.mjs +1782 -168
- package/dist/styles.css +148 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
3
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
4
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
4
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
@@ -623,6 +624,7 @@ interface AccordionProps<TType extends AccordionType = "single"> extends Omit<Re
|
|
|
623
624
|
onValueChange?: AccordionOnValueChange<TType>;
|
|
624
625
|
disabled?: boolean;
|
|
625
626
|
}
|
|
627
|
+
type AccordionItemVariant = "default" | "card" | "surface";
|
|
626
628
|
interface AccordionItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
627
629
|
value: string;
|
|
628
630
|
disabled?: boolean;
|
|
@@ -633,9 +635,15 @@ interface AccordionItemProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
|
633
635
|
* - `"card"` — bordered, rounded, drop-shadowed pill that reads as its own
|
|
634
636
|
* surface (Figma 707:17455 / 6441:22282). Use when each item is a
|
|
635
637
|
* self-contained section, e.g. a Speech Settings card.
|
|
638
|
+
* - `"surface"` — grey-wrapped item (rounded-2xl, p-1) hosting a separate
|
|
639
|
+
* white trigger card and white content card with a 4px gap between
|
|
640
|
+
* them (Figma 154:7577 — Weekly Scheduler Card). Same nesting pattern
|
|
641
|
+
* as `RuleBuilder`. Pass `variant="surface"` to the matching
|
|
642
|
+
* `AccordionTrigger` and `AccordionContent` so the inner surfaces
|
|
643
|
+
* render with their white backgrounds.
|
|
636
644
|
* @default "default"
|
|
637
645
|
*/
|
|
638
|
-
variant?:
|
|
646
|
+
variant?: AccordionItemVariant;
|
|
639
647
|
}
|
|
640
648
|
type AccordionTriggerSize = "default" | "sm";
|
|
641
649
|
interface AccordionTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -664,12 +672,28 @@ interface AccordionTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonE
|
|
|
664
672
|
* @default "default"
|
|
665
673
|
*/
|
|
666
674
|
size?: AccordionTriggerSize;
|
|
675
|
+
/**
|
|
676
|
+
* Visual variant of the parent `AccordionItem`. Pass `"surface"` when the
|
|
677
|
+
* item itself uses `variant="surface"` so the trigger renders as a white
|
|
678
|
+
* rounded card inside the grey wrapper. Children + action are wrapped
|
|
679
|
+
* with `stopPropagation` handlers so interactive controls (e.g. a Select
|
|
680
|
+
* in the trigger) do not also toggle the accordion.
|
|
681
|
+
* @default "default"
|
|
682
|
+
*/
|
|
683
|
+
variant?: AccordionItemVariant;
|
|
667
684
|
/**
|
|
668
685
|
* Optional `data-testid` for Playwright. Defaults to `"accordion"` if omitted.
|
|
669
686
|
*/
|
|
670
687
|
"data-testid"?: string;
|
|
671
688
|
}
|
|
672
689
|
interface AccordionContentProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
690
|
+
/**
|
|
691
|
+
* Visual variant of the parent `AccordionItem`. Pass `"surface"` when the
|
|
692
|
+
* item uses `variant="surface"` so the content renders as its own white
|
|
693
|
+
* rounded card inside the grey wrapper.
|
|
694
|
+
* @default "default"
|
|
695
|
+
*/
|
|
696
|
+
variant?: AccordionItemVariant;
|
|
673
697
|
}
|
|
674
698
|
interface AccordionSectionTriggerProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
675
699
|
/**
|
|
@@ -2032,6 +2056,12 @@ interface DialogProps {
|
|
|
2032
2056
|
confirmVariant?: ButtonVariant;
|
|
2033
2057
|
/** Disable the confirm button. */
|
|
2034
2058
|
confirmDisabled?: boolean;
|
|
2059
|
+
/**
|
|
2060
|
+
* Compact layout: 14px padding around header/body/footer and no shadow.
|
|
2061
|
+
* Used for editor-style dialogs (e.g. JsonEditor expanded view).
|
|
2062
|
+
* @default false
|
|
2063
|
+
*/
|
|
2064
|
+
compact?: boolean;
|
|
2035
2065
|
/**
|
|
2036
2066
|
* Base data-testid. Forwarded to the dialog container, with
|
|
2037
2067
|
* `${value}-close`, `${value}-cancel`, and `${value}-confirm` auto-derived
|
|
@@ -2777,7 +2807,7 @@ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTML
|
|
|
2777
2807
|
end?: Date;
|
|
2778
2808
|
}) => void;
|
|
2779
2809
|
/** Date presets to show (default: true) */
|
|
2780
|
-
datePresets?: boolean | DatePreset[];
|
|
2810
|
+
datePresets?: boolean | DatePreset$1[];
|
|
2781
2811
|
/** Show time picker in date filter (default: true) */
|
|
2782
2812
|
showTime?: boolean;
|
|
2783
2813
|
/**
|
|
@@ -2810,7 +2840,7 @@ interface FilterSelectProps<T = string> extends Omit<React$1.HTMLAttributes<HTML
|
|
|
2810
2840
|
"data-testid"?: string;
|
|
2811
2841
|
}
|
|
2812
2842
|
/** Date preset: label and function to compute the range */
|
|
2813
|
-
interface DatePreset {
|
|
2843
|
+
interface DatePreset$1 {
|
|
2814
2844
|
value: string;
|
|
2815
2845
|
label: string;
|
|
2816
2846
|
getRange: () => {
|
|
@@ -3537,6 +3567,358 @@ interface ChipProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
3537
3567
|
*/
|
|
3538
3568
|
declare const Chip: React$1.ForwardRefExoticComponent<ChipProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3539
3569
|
|
|
3570
|
+
/**
|
|
3571
|
+
* Canonical day-of-week key, lowercase. Iterates in Mon→Sun order to
|
|
3572
|
+
* match the Figma reference (73:4924, 73:4931).
|
|
3573
|
+
*/
|
|
3574
|
+
type WeeklyScheduleDayKey = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
3575
|
+
declare const WEEKLY_SCHEDULE_DAYS: readonly WeeklyScheduleDayKey[];
|
|
3576
|
+
/**
|
|
3577
|
+
* One open window for a day. Times are 24-hour `HH:mm` strings (no
|
|
3578
|
+
* timezone — consumers transform to/from their API shape, e.g. the
|
|
3579
|
+
* `WorkingHour` shape used by the reschedule API or the
|
|
3580
|
+
* `CadenceTimeSlot` shape used by campaign-v2).
|
|
3581
|
+
*/
|
|
3582
|
+
interface WeeklyTimeSlot {
|
|
3583
|
+
/** Start of window, `HH:mm` 24-hour. */
|
|
3584
|
+
start: string;
|
|
3585
|
+
/** End of window, `HH:mm` 24-hour. End must be > start. */
|
|
3586
|
+
end: string;
|
|
3587
|
+
}
|
|
3588
|
+
/**
|
|
3589
|
+
* One day's worth of state — whether the day is on, plus its slots.
|
|
3590
|
+
*
|
|
3591
|
+
* When `enabled` is false the slots are preserved (so toggling back on
|
|
3592
|
+
* restores the user's previous selection). Consumers serializing for an
|
|
3593
|
+
* API should filter out disabled days, not delete the slots from the
|
|
3594
|
+
* value.
|
|
3595
|
+
*/
|
|
3596
|
+
interface WeeklyScheduleDay {
|
|
3597
|
+
day: WeeklyScheduleDayKey;
|
|
3598
|
+
enabled: boolean;
|
|
3599
|
+
slots: WeeklyTimeSlot[];
|
|
3600
|
+
}
|
|
3601
|
+
/**
|
|
3602
|
+
* Controlled value. Always 7 entries (one per day, Mon→Sun). Days that
|
|
3603
|
+
* are inactive still appear in the array with `enabled: false`.
|
|
3604
|
+
*/
|
|
3605
|
+
type WeeklyScheduleValue = WeeklyScheduleDay[];
|
|
3606
|
+
/**
|
|
3607
|
+
* Validation failure for a single slot. Surfaced via
|
|
3608
|
+
* `onValidationChange(hasErrors, errors)` so the parent can show a
|
|
3609
|
+
* toast / banner with a human-readable message.
|
|
3610
|
+
*/
|
|
3611
|
+
interface WeeklyScheduleError {
|
|
3612
|
+
day: WeeklyScheduleDayKey;
|
|
3613
|
+
/** Index into the day's `slots` array. */
|
|
3614
|
+
slotIndex: number;
|
|
3615
|
+
/** Human-readable failure cause (e.g. "Start time must be earlier than end time"). */
|
|
3616
|
+
message: string;
|
|
3617
|
+
}
|
|
3618
|
+
interface WeeklyScheduleProps {
|
|
3619
|
+
/**
|
|
3620
|
+
* Controlled value. Use `createEmptyWeeklySchedule()` to seed a fresh
|
|
3621
|
+
* schedule with no days enabled.
|
|
3622
|
+
*/
|
|
3623
|
+
value: WeeklyScheduleValue;
|
|
3624
|
+
/**
|
|
3625
|
+
* Called whenever the user toggles a day, edits a slot, or
|
|
3626
|
+
* adds/removes a slot.
|
|
3627
|
+
*/
|
|
3628
|
+
onChange: (value: WeeklyScheduleValue) => void;
|
|
3629
|
+
/**
|
|
3630
|
+
* When true, each enabled day shows an "Add Slot" button and slots
|
|
3631
|
+
* get a per-row trash icon for removal. When false, exactly one slot
|
|
3632
|
+
* per day with no add/remove affordance.
|
|
3633
|
+
* @default false
|
|
3634
|
+
*/
|
|
3635
|
+
allowMultipleSlots?: boolean;
|
|
3636
|
+
/**
|
|
3637
|
+
* Reports validation state up to the parent so it can disable Save
|
|
3638
|
+
* AND show a human-readable message (e.g. via a toast). Fires
|
|
3639
|
+
* whenever the set of invalid slots changes.
|
|
3640
|
+
*
|
|
3641
|
+
* `errors` is empty iff `hasErrors` is false. Each entry pinpoints
|
|
3642
|
+
* the offending slot so the parent can highlight or describe it.
|
|
3643
|
+
*/
|
|
3644
|
+
onValidationChange?: (hasErrors: boolean, errors: WeeklyScheduleError[]) => void;
|
|
3645
|
+
/**
|
|
3646
|
+
* Override the displayed day labels. Keys are the lowercase day name.
|
|
3647
|
+
* Defaults to `"Monday"`, `"Tuesday"`, etc.
|
|
3648
|
+
*/
|
|
3649
|
+
dayLabels?: Partial<Record<WeeklyScheduleDayKey, string>>;
|
|
3650
|
+
/**
|
|
3651
|
+
* Default slot used when a day is toggled on (or "Add Slot" is
|
|
3652
|
+
* clicked) and there's no previous slot to reuse.
|
|
3653
|
+
* @default { start: "09:00", end: "17:00" }
|
|
3654
|
+
*/
|
|
3655
|
+
defaultSlot?: WeeklyTimeSlot;
|
|
3656
|
+
className?: string;
|
|
3657
|
+
style?: React$1.CSSProperties;
|
|
3658
|
+
/**
|
|
3659
|
+
* Optional `data-testid` for Playwright. Defaults to
|
|
3660
|
+
* `"weekly-schedule"` if omitted.
|
|
3661
|
+
*/
|
|
3662
|
+
"data-testid"?: string;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
/**
|
|
3666
|
+
* Construct a blank schedule — 7 days, all disabled, no slots. Use as
|
|
3667
|
+
* `useState(() => createEmptyWeeklySchedule())` to seed a fresh form.
|
|
3668
|
+
*/
|
|
3669
|
+
declare function createEmptyWeeklySchedule(): WeeklyScheduleValue;
|
|
3670
|
+
/**
|
|
3671
|
+
* WeeklySchedule — recurring per-day time-window picker.
|
|
3672
|
+
*
|
|
3673
|
+
* Figma reference: 73:4924 (single-slot), 73:4931 (multi-slot).
|
|
3674
|
+
*
|
|
3675
|
+
* The component renders 7 day rows (Mon→Sun) without any surrounding
|
|
3676
|
+
* card chrome — consumers wrap it with their own header (timezone
|
|
3677
|
+
* picker, collapse, delete, etc.) using the lego-land primitives.
|
|
3678
|
+
*
|
|
3679
|
+
* Pass `allowMultipleSlots` to enable per-day multi-window editing
|
|
3680
|
+
* (each enabled day gets an "Add Slot" pill, individual rows get a
|
|
3681
|
+
* trash). With it off the component behaves like the original
|
|
3682
|
+
* single-window reschedule picker.
|
|
3683
|
+
*
|
|
3684
|
+
* @example
|
|
3685
|
+
* const [schedule, setSchedule] = useState(createEmptyWeeklySchedule);
|
|
3686
|
+
* <WeeklySchedule value={schedule} onChange={setSchedule} allowMultipleSlots />
|
|
3687
|
+
*/
|
|
3688
|
+
declare const WeeklySchedule: React$1.ForwardRefExoticComponent<WeeklyScheduleProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3689
|
+
|
|
3690
|
+
/** A single quick-pick range option. */
|
|
3691
|
+
interface DatePreset {
|
|
3692
|
+
/** Stable id used for selection comparison. */
|
|
3693
|
+
value: string;
|
|
3694
|
+
/** User-visible label, e.g. "Last 7 Days". */
|
|
3695
|
+
label: string;
|
|
3696
|
+
/** Returns the absolute range when the preset is clicked. */
|
|
3697
|
+
getRange: () => {
|
|
3698
|
+
start: Date;
|
|
3699
|
+
end: Date;
|
|
3700
|
+
};
|
|
3701
|
+
}
|
|
3702
|
+
interface DateRange {
|
|
3703
|
+
start?: Date;
|
|
3704
|
+
end?: Date;
|
|
3705
|
+
}
|
|
3706
|
+
type DatePickerMode = "single" | "range";
|
|
3707
|
+
interface DatePickerCalendarPropsBase {
|
|
3708
|
+
/** "single" picks one date; "range" picks a start/end. Default "single". */
|
|
3709
|
+
mode?: DatePickerMode;
|
|
3710
|
+
/** Show a time pill in the month caption(s). Works in both modes. */
|
|
3711
|
+
showTime?: boolean;
|
|
3712
|
+
/**
|
|
3713
|
+
* Quick-pick presets for range mode (Today, Last 7 Days, etc).
|
|
3714
|
+
* - `true` → use the built-in defaults
|
|
3715
|
+
* - `false` → hide the preset sidebar
|
|
3716
|
+
* - `DatePreset[]` → render a custom list
|
|
3717
|
+
*
|
|
3718
|
+
* Defaults: `true` in range mode, `false` in single mode.
|
|
3719
|
+
*/
|
|
3720
|
+
presets?: boolean | DatePreset[];
|
|
3721
|
+
/**
|
|
3722
|
+
* If false, dates after today are disabled. Default `true` (you usually want
|
|
3723
|
+
* future dates available for scheduling).
|
|
3724
|
+
*/
|
|
3725
|
+
allowFutureDates?: boolean;
|
|
3726
|
+
/**
|
|
3727
|
+
* If true, dates before today are disabled. Default `false`.
|
|
3728
|
+
*/
|
|
3729
|
+
disablePastDates?: boolean;
|
|
3730
|
+
/** Inclusive lower bound. */
|
|
3731
|
+
minDate?: Date;
|
|
3732
|
+
/** Inclusive upper bound. */
|
|
3733
|
+
maxDate?: Date;
|
|
3734
|
+
/** Lowest year selectable from the year pill. Default 2020. */
|
|
3735
|
+
minYear?: number;
|
|
3736
|
+
/** Highest year selectable from the year pill. Default current year + 5. */
|
|
3737
|
+
maxYear?: number;
|
|
3738
|
+
/**
|
|
3739
|
+
* Number of months rendered side-by-side. Defaults to 2 in range mode, 1
|
|
3740
|
+
* in single mode.
|
|
3741
|
+
*/
|
|
3742
|
+
numberOfMonths?: number;
|
|
3743
|
+
/** Optional content rendered above the calendar (title, description, etc.). */
|
|
3744
|
+
header?: ReactNode;
|
|
3745
|
+
/** Show a "Today" jump button in the footer. */
|
|
3746
|
+
showTodayBtn?: boolean;
|
|
3747
|
+
/** Label for the Today button. Default "Today". */
|
|
3748
|
+
todayLabel?: string;
|
|
3749
|
+
/** Show a "Clear" button in the footer. Default `true`. */
|
|
3750
|
+
showClearBtn?: boolean;
|
|
3751
|
+
/** Label for the Clear button. Default "Clear". */
|
|
3752
|
+
clearLabel?: string;
|
|
3753
|
+
/**
|
|
3754
|
+
* When true, the value is staged internally and only committed via the
|
|
3755
|
+
* Confirm button. Useful inside a popover so the user can cancel changes.
|
|
3756
|
+
*/
|
|
3757
|
+
showConfirmCancel?: boolean;
|
|
3758
|
+
/**
|
|
3759
|
+
* Show the Cancel button alongside Confirm. Defaults to `true`. Set to
|
|
3760
|
+
* `false` for an Apply-only footer (matches the filter-select pattern of
|
|
3761
|
+
* having only a Clear action + a single primary commit).
|
|
3762
|
+
*/
|
|
3763
|
+
showCancelBtn?: boolean;
|
|
3764
|
+
/** Label for the Confirm button. Default "Apply". */
|
|
3765
|
+
confirmLabel?: string;
|
|
3766
|
+
/** Label for the Cancel button. Default "Cancel". */
|
|
3767
|
+
cancelLabel?: string;
|
|
3768
|
+
/** Called when the user clicks Today. */
|
|
3769
|
+
onTodayClick?: () => void;
|
|
3770
|
+
/** Called when the user clicks Clear. */
|
|
3771
|
+
onClear?: () => void;
|
|
3772
|
+
/** Called when the user clicks Cancel (only with showConfirmCancel). */
|
|
3773
|
+
onCancel?: () => void;
|
|
3774
|
+
className?: string;
|
|
3775
|
+
style?: CSSProperties;
|
|
3776
|
+
"data-testid"?: string;
|
|
3777
|
+
}
|
|
3778
|
+
interface DatePickerCalendarSingleProps extends DatePickerCalendarPropsBase {
|
|
3779
|
+
mode?: "single";
|
|
3780
|
+
/** Selected date (controlled). */
|
|
3781
|
+
value?: Date;
|
|
3782
|
+
/** Called when the user picks a date. */
|
|
3783
|
+
onChange?: (next: Date | undefined) => void;
|
|
3784
|
+
/** Confirm handler (only with showConfirmCancel). */
|
|
3785
|
+
onConfirm?: (next: Date | undefined) => void;
|
|
3786
|
+
range?: never;
|
|
3787
|
+
onRangeChange?: never;
|
|
3788
|
+
}
|
|
3789
|
+
interface DatePickerCalendarRangeProps extends DatePickerCalendarPropsBase {
|
|
3790
|
+
mode: "range";
|
|
3791
|
+
/** Selected range (controlled). */
|
|
3792
|
+
range?: DateRange;
|
|
3793
|
+
/** Called when the user picks a date in the range. */
|
|
3794
|
+
onRangeChange?: (next: DateRange) => void;
|
|
3795
|
+
/** Confirm handler (only with showConfirmCancel). */
|
|
3796
|
+
onConfirm?: (next: DateRange) => void;
|
|
3797
|
+
value?: never;
|
|
3798
|
+
onChange?: never;
|
|
3799
|
+
}
|
|
3800
|
+
type DatePickerCalendarProps = DatePickerCalendarSingleProps | DatePickerCalendarRangeProps;
|
|
3801
|
+
type DatePickerSize = "sm" | "md" | "lg";
|
|
3802
|
+
interface DatePickerPropsCommon extends Omit<DatePickerCalendarPropsBase, "header"> {
|
|
3803
|
+
/** Placeholder shown in the trigger when no value is selected. */
|
|
3804
|
+
placeholder?: string;
|
|
3805
|
+
/** Calendar icon to the right of the trigger text. Pass `false` to hide. */
|
|
3806
|
+
triggerIcon?: ReactNode | false;
|
|
3807
|
+
/** Trigger height. Default "md" (40px). */
|
|
3808
|
+
size?: DatePickerSize;
|
|
3809
|
+
/** Visually mark the trigger as disabled. */
|
|
3810
|
+
disabled?: boolean;
|
|
3811
|
+
/** Visually mark the trigger as invalid (red border). */
|
|
3812
|
+
invalid?: boolean;
|
|
3813
|
+
/** Custom class for the trigger button. */
|
|
3814
|
+
triggerClassName?: string;
|
|
3815
|
+
/** Custom class for the popover container. */
|
|
3816
|
+
popoverClassName?: string;
|
|
3817
|
+
/** Popover open state (controlled). */
|
|
3818
|
+
open?: boolean;
|
|
3819
|
+
defaultOpen?: boolean;
|
|
3820
|
+
onOpenChange?: (open: boolean) => void;
|
|
3821
|
+
/** Popover positioning, forwarded to <Popover />. */
|
|
3822
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
3823
|
+
align?: "start" | "center" | "end";
|
|
3824
|
+
sideOffset?: number;
|
|
3825
|
+
/** Aria label for the trigger button. */
|
|
3826
|
+
ariaLabel?: string;
|
|
3827
|
+
/** Optional header rendered inside the popover above the calendar. */
|
|
3828
|
+
header?: ReactNode;
|
|
3829
|
+
/**
|
|
3830
|
+
* Custom trigger render. Receives the formatted value + open state; bypasses
|
|
3831
|
+
* the default input-style trigger entirely.
|
|
3832
|
+
*/
|
|
3833
|
+
renderTrigger?: (state: {
|
|
3834
|
+
formatted: string;
|
|
3835
|
+
placeholder: string;
|
|
3836
|
+
open: boolean;
|
|
3837
|
+
disabled: boolean;
|
|
3838
|
+
invalid: boolean;
|
|
3839
|
+
}) => ReactNode;
|
|
3840
|
+
}
|
|
3841
|
+
interface DatePickerSingleProps extends DatePickerPropsCommon {
|
|
3842
|
+
mode?: "single";
|
|
3843
|
+
value?: Date;
|
|
3844
|
+
onChange?: (next: Date | undefined) => void;
|
|
3845
|
+
onConfirm?: (next: Date | undefined) => void;
|
|
3846
|
+
/** Custom formatter for the trigger label (single mode). */
|
|
3847
|
+
formatValue?: (value: Date | undefined) => string;
|
|
3848
|
+
range?: never;
|
|
3849
|
+
onRangeChange?: never;
|
|
3850
|
+
formatRange?: never;
|
|
3851
|
+
}
|
|
3852
|
+
interface DatePickerRangeProps extends DatePickerPropsCommon {
|
|
3853
|
+
mode: "range";
|
|
3854
|
+
range?: DateRange;
|
|
3855
|
+
onRangeChange?: (next: DateRange) => void;
|
|
3856
|
+
onConfirm?: (next: DateRange) => void;
|
|
3857
|
+
/** Custom formatter for the trigger label (range mode). */
|
|
3858
|
+
formatRange?: (range: DateRange) => string;
|
|
3859
|
+
value?: never;
|
|
3860
|
+
onChange?: never;
|
|
3861
|
+
formatValue?: never;
|
|
3862
|
+
}
|
|
3863
|
+
type DatePickerProps = DatePickerSingleProps | DatePickerRangeProps;
|
|
3864
|
+
|
|
3865
|
+
/**
|
|
3866
|
+
* DatePicker — input-style trigger that opens a calendar in a popover.
|
|
3867
|
+
*
|
|
3868
|
+
* Drop-in replacement for `<input type="date">` with a richer experience:
|
|
3869
|
+
* - Single or range selection
|
|
3870
|
+
* - Optional time picker
|
|
3871
|
+
* - Optional preset sidebar (range mode)
|
|
3872
|
+
* - Confirm / Cancel buttons inside the popover
|
|
3873
|
+
*
|
|
3874
|
+
* Every behaviour is prop-controlled. Use `<DatePickerCalendar />` directly if
|
|
3875
|
+
* you want to embed the panel without a trigger.
|
|
3876
|
+
*
|
|
3877
|
+
* @example single
|
|
3878
|
+
* const [start, setStart] = useState<Date | undefined>();
|
|
3879
|
+
* <DatePicker
|
|
3880
|
+
* value={start}
|
|
3881
|
+
* onChange={setStart}
|
|
3882
|
+
* placeholder="Start date"
|
|
3883
|
+
* showTodayBtn
|
|
3884
|
+
* />
|
|
3885
|
+
*
|
|
3886
|
+
* @example range with time + presets + confirm
|
|
3887
|
+
* const [range, setRange] = useState<DateRange>({});
|
|
3888
|
+
* <DatePicker
|
|
3889
|
+
* mode="range"
|
|
3890
|
+
* range={range}
|
|
3891
|
+
* onRangeChange={setRange}
|
|
3892
|
+
* showTime
|
|
3893
|
+
* showConfirmCancel
|
|
3894
|
+
* />
|
|
3895
|
+
*/
|
|
3896
|
+
declare const DatePicker: React$1.ForwardRefExoticComponent<DatePickerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3897
|
+
|
|
3898
|
+
declare const DEFAULT_DATE_PRESETS: DatePreset[];
|
|
3899
|
+
/**
|
|
3900
|
+
* DatePickerCalendar — full calendar panel without a trigger.
|
|
3901
|
+
*
|
|
3902
|
+
* Use this when you have your own popover/dialog/sidebar wrapper. For the
|
|
3903
|
+
* common "input field that opens a calendar" pattern, use `<DatePicker />`
|
|
3904
|
+
* instead.
|
|
3905
|
+
*
|
|
3906
|
+
* @example single
|
|
3907
|
+
* const [value, setValue] = useState<Date | undefined>();
|
|
3908
|
+
* <DatePickerCalendar value={value} onChange={setValue} />
|
|
3909
|
+
*
|
|
3910
|
+
* @example range with presets
|
|
3911
|
+
* const [range, setRange] = useState<DateRange>({});
|
|
3912
|
+
* <DatePickerCalendar
|
|
3913
|
+
* mode="range"
|
|
3914
|
+
* range={range}
|
|
3915
|
+
* onRangeChange={setRange}
|
|
3916
|
+
* presets
|
|
3917
|
+
* showTime
|
|
3918
|
+
* />
|
|
3919
|
+
*/
|
|
3920
|
+
declare const DatePickerCalendar: React$1.ForwardRefExoticComponent<DatePickerCalendarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3921
|
+
|
|
3540
3922
|
interface RuleBuilderProps {
|
|
3541
3923
|
/**
|
|
3542
3924
|
* Badge label shown in the header (e.g. "Rule 1").
|
|
@@ -3565,6 +3947,12 @@ interface RuleBuilderProps {
|
|
|
3565
3947
|
* a `Workflow` glyph matching the Figma reference.
|
|
3566
3948
|
*/
|
|
3567
3949
|
titleIcon?: React$1.ReactNode;
|
|
3950
|
+
/**
|
|
3951
|
+
* Optional node rendered in the header before the title badge — typically
|
|
3952
|
+
* a drag-handle icon (e.g. `<GripVertical />`) when the rule cards are
|
|
3953
|
+
* reorderable. Pointer events on this slot do not toggle the card.
|
|
3954
|
+
*/
|
|
3955
|
+
headerLeading?: React$1.ReactNode;
|
|
3568
3956
|
/**
|
|
3569
3957
|
* Bottom strip rendered in the grey wrapper area below the white card.
|
|
3570
3958
|
* Pass an `<Input />` (or similar) — the label, icon, and layout are
|
|
@@ -3682,4 +4070,4 @@ declare const RuleBuilderConnector: React$1.ForwardRefExoticComponent<RuleBuilde
|
|
|
3682
4070
|
*/
|
|
3683
4071
|
declare const RuleBuilderAddCondition: React$1.ForwardRefExoticComponent<RuleBuilderAddConditionProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3684
4072
|
|
|
3685
|
-
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionSectionTrigger, type AccordionSectionTriggerProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, AudioPlayer, type AudioPlayerProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, ButtonList, type ButtonListItem, type ButtonListProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, ChatBubbleAgent, type ChatBubbleAgentProps, ChatBubbleUser, type ChatBubbleUserProps, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColumnDef, ColumnWidth, CompoundFilterSelect, type CompoundFilterSelectProps, type CompoundFilterToggleOption, DEFAULT_THEME, DataTable, type DataTableProps, type DatePreset, Dialog, DialogBody, type DialogBodyProps, DialogFooter, type DialogFooterProps, DialogHeader, DialogHeaderNavigation, type DialogHeaderNavigationProps, type DialogHeaderNavigationVariant, type DialogHeaderProps, DialogIcon, type DialogIconProps, type DialogProps, type DialogSize, type DialogType, EmptyState, type EmptyStateIllustrationPosition, type EmptyStateIllustrationSize, type EmptyStateProps, FileInput, type FileInputProps, type FilterItem, type FilterItemWithSection, FilterListItem, type FilterListItemProps, FilterSelect, type FilterSelectProps, type IconColor, IconPicker, type IconPickerProps, type IconSize, IconWrapper, type IconWrapperProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, type InputVariant, JSON_EDITOR_LANGUAGE_OPTIONS, JsonEditor, type JsonEditorLanguage, type JsonEditorProps, KeyValueEditor, type KeyValueEditorProps, type KeyValuePair, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListNavItemProps, ListNavigation, type ListNavigationProps, type ListProps, type ListType, type ListVariant, MONACO_OPTIONS, MONACO_OPTIONS_DIALOG, MultiSelect, type MultiSelectItem, type MultiSelectProps, NestedButtonGroup, type NestedButtonGroupProps, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, PlaySelect, type PlaySelectAudioItem, type PlaySelectProps, PlaybackControl, type PlaybackControlProps, type PlaybackState, Popover, type PopoverAlign, type PopoverProps, type PopoverShadow, type PopoverSide, ProgressBar, type ProgressBarProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RuleBuilder, RuleBuilderAddCondition, type RuleBuilderAddConditionProps, RuleBuilderClause, type RuleBuilderClauseProps, RuleBuilderCondition, type RuleBuilderConditionProps, RuleBuilderConnector, type RuleBuilderConnectorProps, type RuleBuilderProps, Select, SelectContent, type SelectContentItem, SelectFormLabel, SelectGroup, type SelectGroupProps, SelectItem, SelectLabel, type SelectLabelProps, type SelectMenuItemProps, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShadowDOMWrapper, type ShowToastOptions, SidePanel, type SidePanelProps, type SidePanelSize, Slider, type SliderProps, type SortDirection, type SortState, Spinner, type SpinnerProps, type SpinnerSize, type StepItem, type StepState, Stepper, StepperBar, type StepperBarProps, type StepperProps, type SupportingTextType, Surface, type SurfaceBackground, SurfaceBody, type SurfaceBodyProps, SurfaceFooter, type SurfaceFooterProps, type SurfaceGradient, type SurfaceGradientPosition, SurfaceHeader, type SurfaceHeaderProps, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, type TabVariant, type TableAction, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagBadge, type TagBadgeProps, type TagOption, Textarea, type TextareaBorderRadius, type TextareaForceState, type TextareaProps, ThemeProvider, Toast, type ToastProps, type ToastVariant, Toaster, Toggle, ToggleItem, type ToggleItemProps, type ToggleProps, type ToggleType, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, type TypographySize, type TypographyTone, type TypographyVariant, type TypographyWeight, type UsePlaySelectProps, type UseSelectProps, enhanceJsonError, showToast, useJsonEditor, usePlaySelect, useSelect, useTheme };
|
|
4073
|
+
export { Accordion, AccordionContent, AccordionContentPlaceholder, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionSectionTrigger, type AccordionSectionTriggerProps, AccordionTrigger, type AccordionTriggerProps, type AccordionType, type AccordionValue, AudioPlayer, type AudioPlayerProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type AvatarShape, type AvatarSize, type BackButtonPosition, Badge, type BadgeProps, type BadgeVariant, Button, type ButtonBorderRadius, ButtonList, type ButtonListItem, type ButtonListProps, type ButtonProps, type ButtonSize, type ButtonVariant, type CellContent, type CellTextContent, ChatBubbleAgent, type ChatBubbleAgentProps, ChatBubbleUser, type ChatBubbleUserProps, Checkbox, type CheckboxProps, Chip, type ChipProps, type ColumnDef, ColumnWidth, CompoundFilterSelect, type CompoundFilterSelectProps, type CompoundFilterToggleOption, DEFAULT_DATE_PRESETS, DEFAULT_THEME, DataTable, type DataTableProps, DatePicker, DatePickerCalendar, type DatePickerCalendarProps, type DatePickerMode, type DatePreset as DatePickerPreset, type DatePickerProps, type DatePickerSize, type DatePreset$1 as DatePreset, type DateRange, Dialog, DialogBody, type DialogBodyProps, DialogFooter, type DialogFooterProps, DialogHeader, DialogHeaderNavigation, type DialogHeaderNavigationProps, type DialogHeaderNavigationVariant, type DialogHeaderProps, DialogIcon, type DialogIconProps, type DialogProps, type DialogSize, type DialogType, EmptyState, type EmptyStateIllustrationPosition, type EmptyStateIllustrationSize, type EmptyStateProps, FileInput, type FileInputProps, type FilterItem, type FilterItemWithSection, FilterListItem, type FilterListItemProps, FilterSelect, type FilterSelectProps, type IconColor, IconPicker, type IconPickerProps, type IconSize, IconWrapper, type IconWrapperProps, Input, type InputBorderRadius, type InputForceState, InputGroup, type InputGroupBorderRadius, type InputGroupForceState, type InputGroupProps, type InputProps, type InputVariant, JSON_EDITOR_LANGUAGE_OPTIONS, JsonEditor, type JsonEditorLanguage, type JsonEditorProps, KeyValueEditor, type KeyValueEditorProps, type KeyValuePair, LegoLandWrapper, type LegoLandWrapperProps, List, type ListBorderRadius, type ListNavItemProps, ListNavigation, type ListNavigationProps, type ListProps, type ListType, type ListVariant, MONACO_OPTIONS, MONACO_OPTIONS_DIALOG, MultiSelect, type MultiSelectItem, type MultiSelectProps, NestedButtonGroup, type NestedButtonGroupProps, NumberBadge, type NumberBadgeProps, type NumberBadgeVariant, NurixThemeProvider, Pagination, type PaginationProps, PlaySelect, type PlaySelectAudioItem, type PlaySelectProps, PlaybackControl, type PlaybackControlProps, type PlaybackState, Popover, type PopoverAlign, type PopoverProps, type PopoverShadow, type PopoverSide, ProgressBar, type ProgressBarProps, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, RuleBuilder, RuleBuilderAddCondition, type RuleBuilderAddConditionProps, RuleBuilderClause, type RuleBuilderClauseProps, RuleBuilderCondition, type RuleBuilderConditionProps, RuleBuilderConnector, type RuleBuilderConnectorProps, type RuleBuilderProps, Select, SelectContent, type SelectContentItem, SelectFormLabel, SelectGroup, type SelectGroupProps, SelectItem, SelectLabel, type SelectLabelProps, type SelectMenuItemProps, type SelectProps, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShadowDOMWrapper, type ShowToastOptions, SidePanel, type SidePanelProps, type SidePanelSize, Slider, type SliderProps, type SortDirection, type SortState, Spinner, type SpinnerProps, type SpinnerSize, type StepItem, type StepState, Stepper, StepperBar, type StepperBarProps, type StepperProps, type SupportingTextType, Surface, type SurfaceBackground, SurfaceBody, type SurfaceBodyProps, SurfaceFooter, type SurfaceFooterProps, type SurfaceGradient, type SurfaceGradientPosition, SurfaceHeader, type SurfaceHeaderProps, type SurfaceProps, Switch, type SwitchProps, type SwitchSize, type TabVariant, type TableAction, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, TagBadge, type TagBadgeProps, type TagOption, Textarea, type TextareaBorderRadius, type TextareaForceState, type TextareaProps, ThemeProvider, Toast, type ToastProps, type ToastVariant, Toaster, Toggle, ToggleItem, type ToggleItemProps, type ToggleProps, type ToggleType, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, Typography, type TypographyProps, type TypographySize, type TypographyTone, type TypographyVariant, type TypographyWeight, type UsePlaySelectProps, type UseSelectProps, WEEKLY_SCHEDULE_DAYS, WeeklySchedule, type WeeklyScheduleDay, type WeeklyScheduleDayKey, type WeeklyScheduleProps, type WeeklyScheduleValue, type WeeklyTimeSlot, createEmptyWeeklySchedule, enhanceJsonError, showToast, useJsonEditor, usePlaySelect, useSelect, useTheme };
|