@nurix/ui-component-library 1.1.7-stage.134 → 1.1.7-stage.135
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 +127 -1
- package/dist/index.d.ts +127 -1
- package/dist/index.js +485 -40
- package/dist/index.mjs +483 -41
- package/dist/styles.css +94 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2032,6 +2032,12 @@ interface DialogProps {
|
|
|
2032
2032
|
confirmVariant?: ButtonVariant;
|
|
2033
2033
|
/** Disable the confirm button. */
|
|
2034
2034
|
confirmDisabled?: boolean;
|
|
2035
|
+
/**
|
|
2036
|
+
* Compact layout: 14px padding around header/body/footer and no shadow.
|
|
2037
|
+
* Used for editor-style dialogs (e.g. JsonEditor expanded view).
|
|
2038
|
+
* @default false
|
|
2039
|
+
*/
|
|
2040
|
+
compact?: boolean;
|
|
2035
2041
|
/**
|
|
2036
2042
|
* Base data-testid. Forwarded to the dialog container, with
|
|
2037
2043
|
* `${value}-close`, `${value}-cancel`, and `${value}-confirm` auto-derived
|
|
@@ -3537,6 +3543,126 @@ interface ChipProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
3537
3543
|
*/
|
|
3538
3544
|
declare const Chip: React$1.ForwardRefExoticComponent<ChipProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3539
3545
|
|
|
3546
|
+
/**
|
|
3547
|
+
* Canonical day-of-week key, lowercase. Iterates in Mon→Sun order to
|
|
3548
|
+
* match the Figma reference (73:4924, 73:4931).
|
|
3549
|
+
*/
|
|
3550
|
+
type WeeklyScheduleDayKey = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
3551
|
+
declare const WEEKLY_SCHEDULE_DAYS: readonly WeeklyScheduleDayKey[];
|
|
3552
|
+
/**
|
|
3553
|
+
* One open window for a day. Times are 24-hour `HH:mm` strings (no
|
|
3554
|
+
* timezone — consumers transform to/from their API shape, e.g. the
|
|
3555
|
+
* `WorkingHour` shape used by the reschedule API or the
|
|
3556
|
+
* `CadenceTimeSlot` shape used by campaign-v2).
|
|
3557
|
+
*/
|
|
3558
|
+
interface WeeklyTimeSlot {
|
|
3559
|
+
/** Start of window, `HH:mm` 24-hour. */
|
|
3560
|
+
start: string;
|
|
3561
|
+
/** End of window, `HH:mm` 24-hour. End must be > start. */
|
|
3562
|
+
end: string;
|
|
3563
|
+
}
|
|
3564
|
+
/**
|
|
3565
|
+
* One day's worth of state — whether the day is on, plus its slots.
|
|
3566
|
+
*
|
|
3567
|
+
* When `enabled` is false the slots are preserved (so toggling back on
|
|
3568
|
+
* restores the user's previous selection). Consumers serializing for an
|
|
3569
|
+
* API should filter out disabled days, not delete the slots from the
|
|
3570
|
+
* value.
|
|
3571
|
+
*/
|
|
3572
|
+
interface WeeklyScheduleDay {
|
|
3573
|
+
day: WeeklyScheduleDayKey;
|
|
3574
|
+
enabled: boolean;
|
|
3575
|
+
slots: WeeklyTimeSlot[];
|
|
3576
|
+
}
|
|
3577
|
+
/**
|
|
3578
|
+
* Controlled value. Always 7 entries (one per day, Mon→Sun). Days that
|
|
3579
|
+
* are inactive still appear in the array with `enabled: false`.
|
|
3580
|
+
*/
|
|
3581
|
+
type WeeklyScheduleValue = WeeklyScheduleDay[];
|
|
3582
|
+
/**
|
|
3583
|
+
* Validation failure for a single slot. Surfaced via
|
|
3584
|
+
* `onValidationChange(hasErrors, errors)` so the parent can show a
|
|
3585
|
+
* toast / banner with a human-readable message.
|
|
3586
|
+
*/
|
|
3587
|
+
interface WeeklyScheduleError {
|
|
3588
|
+
day: WeeklyScheduleDayKey;
|
|
3589
|
+
/** Index into the day's `slots` array. */
|
|
3590
|
+
slotIndex: number;
|
|
3591
|
+
/** Human-readable failure cause (e.g. "Start time must be earlier than end time"). */
|
|
3592
|
+
message: string;
|
|
3593
|
+
}
|
|
3594
|
+
interface WeeklyScheduleProps {
|
|
3595
|
+
/**
|
|
3596
|
+
* Controlled value. Use `createEmptyWeeklySchedule()` to seed a fresh
|
|
3597
|
+
* schedule with no days enabled.
|
|
3598
|
+
*/
|
|
3599
|
+
value: WeeklyScheduleValue;
|
|
3600
|
+
/**
|
|
3601
|
+
* Called whenever the user toggles a day, edits a slot, or
|
|
3602
|
+
* adds/removes a slot.
|
|
3603
|
+
*/
|
|
3604
|
+
onChange: (value: WeeklyScheduleValue) => void;
|
|
3605
|
+
/**
|
|
3606
|
+
* When true, each enabled day shows an "Add Slot" button and slots
|
|
3607
|
+
* get a per-row trash icon for removal. When false, exactly one slot
|
|
3608
|
+
* per day with no add/remove affordance.
|
|
3609
|
+
* @default false
|
|
3610
|
+
*/
|
|
3611
|
+
allowMultipleSlots?: boolean;
|
|
3612
|
+
/**
|
|
3613
|
+
* Reports validation state up to the parent so it can disable Save
|
|
3614
|
+
* AND show a human-readable message (e.g. via a toast). Fires
|
|
3615
|
+
* whenever the set of invalid slots changes.
|
|
3616
|
+
*
|
|
3617
|
+
* `errors` is empty iff `hasErrors` is false. Each entry pinpoints
|
|
3618
|
+
* the offending slot so the parent can highlight or describe it.
|
|
3619
|
+
*/
|
|
3620
|
+
onValidationChange?: (hasErrors: boolean, errors: WeeklyScheduleError[]) => void;
|
|
3621
|
+
/**
|
|
3622
|
+
* Override the displayed day labels. Keys are the lowercase day name.
|
|
3623
|
+
* Defaults to `"Monday"`, `"Tuesday"`, etc.
|
|
3624
|
+
*/
|
|
3625
|
+
dayLabels?: Partial<Record<WeeklyScheduleDayKey, string>>;
|
|
3626
|
+
/**
|
|
3627
|
+
* Default slot used when a day is toggled on (or "Add Slot" is
|
|
3628
|
+
* clicked) and there's no previous slot to reuse.
|
|
3629
|
+
* @default { start: "09:00", end: "17:00" }
|
|
3630
|
+
*/
|
|
3631
|
+
defaultSlot?: WeeklyTimeSlot;
|
|
3632
|
+
className?: string;
|
|
3633
|
+
style?: React$1.CSSProperties;
|
|
3634
|
+
/**
|
|
3635
|
+
* Optional `data-testid` for Playwright. Defaults to
|
|
3636
|
+
* `"weekly-schedule"` if omitted.
|
|
3637
|
+
*/
|
|
3638
|
+
"data-testid"?: string;
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* Construct a blank schedule — 7 days, all disabled, no slots. Use as
|
|
3643
|
+
* `useState(() => createEmptyWeeklySchedule())` to seed a fresh form.
|
|
3644
|
+
*/
|
|
3645
|
+
declare function createEmptyWeeklySchedule(): WeeklyScheduleValue;
|
|
3646
|
+
/**
|
|
3647
|
+
* WeeklySchedule — recurring per-day time-window picker.
|
|
3648
|
+
*
|
|
3649
|
+
* Figma reference: 73:4924 (single-slot), 73:4931 (multi-slot).
|
|
3650
|
+
*
|
|
3651
|
+
* The component renders 7 day rows (Mon→Sun) without any surrounding
|
|
3652
|
+
* card chrome — consumers wrap it with their own header (timezone
|
|
3653
|
+
* picker, collapse, delete, etc.) using the lego-land primitives.
|
|
3654
|
+
*
|
|
3655
|
+
* Pass `allowMultipleSlots` to enable per-day multi-window editing
|
|
3656
|
+
* (each enabled day gets an "Add Slot" pill, individual rows get a
|
|
3657
|
+
* trash). With it off the component behaves like the original
|
|
3658
|
+
* single-window reschedule picker.
|
|
3659
|
+
*
|
|
3660
|
+
* @example
|
|
3661
|
+
* const [schedule, setSchedule] = useState(createEmptyWeeklySchedule);
|
|
3662
|
+
* <WeeklySchedule value={schedule} onChange={setSchedule} allowMultipleSlots />
|
|
3663
|
+
*/
|
|
3664
|
+
declare const WeeklySchedule: React$1.ForwardRefExoticComponent<WeeklyScheduleProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3665
|
+
|
|
3540
3666
|
interface RuleBuilderProps {
|
|
3541
3667
|
/**
|
|
3542
3668
|
* Badge label shown in the header (e.g. "Rule 1").
|
|
@@ -3682,4 +3808,4 @@ declare const RuleBuilderConnector: React$1.ForwardRefExoticComponent<RuleBuilde
|
|
|
3682
3808
|
*/
|
|
3683
3809
|
declare const RuleBuilderAddCondition: React$1.ForwardRefExoticComponent<RuleBuilderAddConditionProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3684
3810
|
|
|
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 };
|
|
3811
|
+
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, WEEKLY_SCHEDULE_DAYS, WeeklySchedule, type WeeklyScheduleDay, type WeeklyScheduleDayKey, type WeeklyScheduleProps, type WeeklyScheduleValue, type WeeklyTimeSlot, createEmptyWeeklySchedule, enhanceJsonError, showToast, useJsonEditor, usePlaySelect, useSelect, useTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -2032,6 +2032,12 @@ interface DialogProps {
|
|
|
2032
2032
|
confirmVariant?: ButtonVariant;
|
|
2033
2033
|
/** Disable the confirm button. */
|
|
2034
2034
|
confirmDisabled?: boolean;
|
|
2035
|
+
/**
|
|
2036
|
+
* Compact layout: 14px padding around header/body/footer and no shadow.
|
|
2037
|
+
* Used for editor-style dialogs (e.g. JsonEditor expanded view).
|
|
2038
|
+
* @default false
|
|
2039
|
+
*/
|
|
2040
|
+
compact?: boolean;
|
|
2035
2041
|
/**
|
|
2036
2042
|
* Base data-testid. Forwarded to the dialog container, with
|
|
2037
2043
|
* `${value}-close`, `${value}-cancel`, and `${value}-confirm` auto-derived
|
|
@@ -3537,6 +3543,126 @@ interface ChipProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
3537
3543
|
*/
|
|
3538
3544
|
declare const Chip: React$1.ForwardRefExoticComponent<ChipProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3539
3545
|
|
|
3546
|
+
/**
|
|
3547
|
+
* Canonical day-of-week key, lowercase. Iterates in Mon→Sun order to
|
|
3548
|
+
* match the Figma reference (73:4924, 73:4931).
|
|
3549
|
+
*/
|
|
3550
|
+
type WeeklyScheduleDayKey = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
3551
|
+
declare const WEEKLY_SCHEDULE_DAYS: readonly WeeklyScheduleDayKey[];
|
|
3552
|
+
/**
|
|
3553
|
+
* One open window for a day. Times are 24-hour `HH:mm` strings (no
|
|
3554
|
+
* timezone — consumers transform to/from their API shape, e.g. the
|
|
3555
|
+
* `WorkingHour` shape used by the reschedule API or the
|
|
3556
|
+
* `CadenceTimeSlot` shape used by campaign-v2).
|
|
3557
|
+
*/
|
|
3558
|
+
interface WeeklyTimeSlot {
|
|
3559
|
+
/** Start of window, `HH:mm` 24-hour. */
|
|
3560
|
+
start: string;
|
|
3561
|
+
/** End of window, `HH:mm` 24-hour. End must be > start. */
|
|
3562
|
+
end: string;
|
|
3563
|
+
}
|
|
3564
|
+
/**
|
|
3565
|
+
* One day's worth of state — whether the day is on, plus its slots.
|
|
3566
|
+
*
|
|
3567
|
+
* When `enabled` is false the slots are preserved (so toggling back on
|
|
3568
|
+
* restores the user's previous selection). Consumers serializing for an
|
|
3569
|
+
* API should filter out disabled days, not delete the slots from the
|
|
3570
|
+
* value.
|
|
3571
|
+
*/
|
|
3572
|
+
interface WeeklyScheduleDay {
|
|
3573
|
+
day: WeeklyScheduleDayKey;
|
|
3574
|
+
enabled: boolean;
|
|
3575
|
+
slots: WeeklyTimeSlot[];
|
|
3576
|
+
}
|
|
3577
|
+
/**
|
|
3578
|
+
* Controlled value. Always 7 entries (one per day, Mon→Sun). Days that
|
|
3579
|
+
* are inactive still appear in the array with `enabled: false`.
|
|
3580
|
+
*/
|
|
3581
|
+
type WeeklyScheduleValue = WeeklyScheduleDay[];
|
|
3582
|
+
/**
|
|
3583
|
+
* Validation failure for a single slot. Surfaced via
|
|
3584
|
+
* `onValidationChange(hasErrors, errors)` so the parent can show a
|
|
3585
|
+
* toast / banner with a human-readable message.
|
|
3586
|
+
*/
|
|
3587
|
+
interface WeeklyScheduleError {
|
|
3588
|
+
day: WeeklyScheduleDayKey;
|
|
3589
|
+
/** Index into the day's `slots` array. */
|
|
3590
|
+
slotIndex: number;
|
|
3591
|
+
/** Human-readable failure cause (e.g. "Start time must be earlier than end time"). */
|
|
3592
|
+
message: string;
|
|
3593
|
+
}
|
|
3594
|
+
interface WeeklyScheduleProps {
|
|
3595
|
+
/**
|
|
3596
|
+
* Controlled value. Use `createEmptyWeeklySchedule()` to seed a fresh
|
|
3597
|
+
* schedule with no days enabled.
|
|
3598
|
+
*/
|
|
3599
|
+
value: WeeklyScheduleValue;
|
|
3600
|
+
/**
|
|
3601
|
+
* Called whenever the user toggles a day, edits a slot, or
|
|
3602
|
+
* adds/removes a slot.
|
|
3603
|
+
*/
|
|
3604
|
+
onChange: (value: WeeklyScheduleValue) => void;
|
|
3605
|
+
/**
|
|
3606
|
+
* When true, each enabled day shows an "Add Slot" button and slots
|
|
3607
|
+
* get a per-row trash icon for removal. When false, exactly one slot
|
|
3608
|
+
* per day with no add/remove affordance.
|
|
3609
|
+
* @default false
|
|
3610
|
+
*/
|
|
3611
|
+
allowMultipleSlots?: boolean;
|
|
3612
|
+
/**
|
|
3613
|
+
* Reports validation state up to the parent so it can disable Save
|
|
3614
|
+
* AND show a human-readable message (e.g. via a toast). Fires
|
|
3615
|
+
* whenever the set of invalid slots changes.
|
|
3616
|
+
*
|
|
3617
|
+
* `errors` is empty iff `hasErrors` is false. Each entry pinpoints
|
|
3618
|
+
* the offending slot so the parent can highlight or describe it.
|
|
3619
|
+
*/
|
|
3620
|
+
onValidationChange?: (hasErrors: boolean, errors: WeeklyScheduleError[]) => void;
|
|
3621
|
+
/**
|
|
3622
|
+
* Override the displayed day labels. Keys are the lowercase day name.
|
|
3623
|
+
* Defaults to `"Monday"`, `"Tuesday"`, etc.
|
|
3624
|
+
*/
|
|
3625
|
+
dayLabels?: Partial<Record<WeeklyScheduleDayKey, string>>;
|
|
3626
|
+
/**
|
|
3627
|
+
* Default slot used when a day is toggled on (or "Add Slot" is
|
|
3628
|
+
* clicked) and there's no previous slot to reuse.
|
|
3629
|
+
* @default { start: "09:00", end: "17:00" }
|
|
3630
|
+
*/
|
|
3631
|
+
defaultSlot?: WeeklyTimeSlot;
|
|
3632
|
+
className?: string;
|
|
3633
|
+
style?: React$1.CSSProperties;
|
|
3634
|
+
/**
|
|
3635
|
+
* Optional `data-testid` for Playwright. Defaults to
|
|
3636
|
+
* `"weekly-schedule"` if omitted.
|
|
3637
|
+
*/
|
|
3638
|
+
"data-testid"?: string;
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* Construct a blank schedule — 7 days, all disabled, no slots. Use as
|
|
3643
|
+
* `useState(() => createEmptyWeeklySchedule())` to seed a fresh form.
|
|
3644
|
+
*/
|
|
3645
|
+
declare function createEmptyWeeklySchedule(): WeeklyScheduleValue;
|
|
3646
|
+
/**
|
|
3647
|
+
* WeeklySchedule — recurring per-day time-window picker.
|
|
3648
|
+
*
|
|
3649
|
+
* Figma reference: 73:4924 (single-slot), 73:4931 (multi-slot).
|
|
3650
|
+
*
|
|
3651
|
+
* The component renders 7 day rows (Mon→Sun) without any surrounding
|
|
3652
|
+
* card chrome — consumers wrap it with their own header (timezone
|
|
3653
|
+
* picker, collapse, delete, etc.) using the lego-land primitives.
|
|
3654
|
+
*
|
|
3655
|
+
* Pass `allowMultipleSlots` to enable per-day multi-window editing
|
|
3656
|
+
* (each enabled day gets an "Add Slot" pill, individual rows get a
|
|
3657
|
+
* trash). With it off the component behaves like the original
|
|
3658
|
+
* single-window reschedule picker.
|
|
3659
|
+
*
|
|
3660
|
+
* @example
|
|
3661
|
+
* const [schedule, setSchedule] = useState(createEmptyWeeklySchedule);
|
|
3662
|
+
* <WeeklySchedule value={schedule} onChange={setSchedule} allowMultipleSlots />
|
|
3663
|
+
*/
|
|
3664
|
+
declare const WeeklySchedule: React$1.ForwardRefExoticComponent<WeeklyScheduleProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
3665
|
+
|
|
3540
3666
|
interface RuleBuilderProps {
|
|
3541
3667
|
/**
|
|
3542
3668
|
* Badge label shown in the header (e.g. "Rule 1").
|
|
@@ -3682,4 +3808,4 @@ declare const RuleBuilderConnector: React$1.ForwardRefExoticComponent<RuleBuilde
|
|
|
3682
3808
|
*/
|
|
3683
3809
|
declare const RuleBuilderAddCondition: React$1.ForwardRefExoticComponent<RuleBuilderAddConditionProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
3684
3810
|
|
|
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 };
|
|
3811
|
+
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, WEEKLY_SCHEDULE_DAYS, WeeklySchedule, type WeeklyScheduleDay, type WeeklyScheduleDayKey, type WeeklyScheduleProps, type WeeklyScheduleValue, type WeeklyTimeSlot, createEmptyWeeklySchedule, enhanceJsonError, showToast, useJsonEditor, usePlaySelect, useSelect, useTheme };
|