@segmentify/ui 0.0.57 → 0.0.59

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.
Files changed (144) hide show
  1. package/dist/components/atoms/autocomplete.d.ts +13 -0
  2. package/dist/components/atoms/calendar.d.ts +1 -1
  3. package/dist/components/atoms/chart.d.ts +1 -1
  4. package/dist/components/atoms/form.d.ts +1 -1
  5. package/dist/components/atoms/quill-editor.d.ts +1 -1
  6. package/dist/components/molecules/async-combobox.d.ts +15 -0
  7. package/dist/components/molecules/autocomplete-field.d.ts +17 -0
  8. package/dist/components/molecules/base-button.d.ts +1 -1
  9. package/dist/components/molecules/date-range-picker.d.ts +1 -1
  10. package/dist/components/molecules/form-phone-input.d.ts +1 -1
  11. package/dist/components/molecules/recommendation-card/components/selected-algorithms.d.ts +1 -1
  12. package/dist/components/molecules/select-multi-field.d.ts +1 -1
  13. package/dist/components/molecules/textarea-field.d.ts +1 -1
  14. package/dist/components/organisms/data-table/index.d.ts +3 -3
  15. package/dist/components/organisms/form-select.d.ts +1 -1
  16. package/dist/components/organisms/timeline.d.ts +1 -1
  17. package/dist/hooks/use-data-table.d.ts +6 -2
  18. package/dist/index.d.ts +1 -0
  19. package/dist/mock/columns.d.ts +1 -1
  20. package/dist/segmentify-ui.cjs +271 -118
  21. package/dist/segmentify-ui.js +109517 -57667
  22. package/dist/src/app.d.ts +14 -0
  23. package/dist/src/components/atoms/accordion.d.ts +9 -0
  24. package/dist/src/components/atoms/alert-dialog.d.ts +18 -0
  25. package/dist/src/components/atoms/aspect-ratio.d.ts +3 -0
  26. package/dist/src/components/atoms/avatar.d.ts +6 -0
  27. package/dist/src/components/atoms/badge.d.ts +7 -0
  28. package/dist/src/components/atoms/breadcrumb.d.ts +11 -0
  29. package/dist/src/components/atoms/button.d.ts +10 -0
  30. package/dist/src/components/atoms/calendar.d.ts +8 -0
  31. package/dist/src/components/atoms/card.d.ts +9 -0
  32. package/dist/src/components/atoms/carousel.d.ts +19 -0
  33. package/dist/src/components/atoms/chart.d.ts +40 -0
  34. package/dist/src/components/atoms/checkbox.d.ts +4 -0
  35. package/dist/src/components/atoms/collapsible.d.ts +5 -0
  36. package/dist/src/components/atoms/combobox.d.ts +24 -0
  37. package/dist/src/components/atoms/command.d.ts +20 -0
  38. package/dist/src/components/atoms/component-switch.d.ts +19 -0
  39. package/dist/src/components/atoms/content-wrapper.d.ts +11 -0
  40. package/dist/src/components/atoms/date.d.ts +4 -0
  41. package/dist/src/components/atoms/dialog.d.ts +16 -0
  42. package/dist/src/components/atoms/drawer.d.ts +13 -0
  43. package/dist/src/components/atoms/dropdown-menu.d.ts +25 -0
  44. package/dist/src/components/atoms/empty.d.ts +11 -0
  45. package/dist/src/components/atoms/error-message.d.ts +6 -0
  46. package/dist/src/components/atoms/field-description.d.ts +6 -0
  47. package/dist/src/components/atoms/form.d.ts +17 -0
  48. package/dist/src/components/atoms/hover-card.d.ts +6 -0
  49. package/dist/src/components/atoms/icon.d.ts +6 -0
  50. package/dist/src/components/atoms/input-group.d.ts +16 -0
  51. package/dist/src/components/atoms/input-otp.d.ts +20 -0
  52. package/dist/src/components/atoms/input.d.ts +3 -0
  53. package/dist/src/components/atoms/kbd.d.ts +3 -0
  54. package/dist/src/components/atoms/label.d.ts +9 -0
  55. package/dist/src/components/atoms/native-select.d.ts +7 -0
  56. package/dist/src/components/atoms/pagination.d.ts +13 -0
  57. package/dist/src/components/atoms/phone-input.d.ts +7 -0
  58. package/dist/src/components/atoms/phone-preview.d.ts +5 -0
  59. package/dist/src/components/atoms/popover.d.ts +7 -0
  60. package/dist/src/components/atoms/quill-editor.d.ts +11 -0
  61. package/dist/src/components/atoms/radio-group.d.ts +5 -0
  62. package/dist/src/components/atoms/scroll-area.d.ts +5 -0
  63. package/dist/src/components/atoms/select.d.ts +18 -0
  64. package/dist/src/components/atoms/separator.d.ts +4 -0
  65. package/dist/src/components/atoms/sheet.d.ts +13 -0
  66. package/dist/src/components/atoms/sidebar.d.ts +59 -0
  67. package/dist/src/components/atoms/skeleton.d.ts +3 -0
  68. package/dist/src/components/atoms/slider.d.ts +4 -0
  69. package/dist/src/components/atoms/sonner.d.ts +3 -0
  70. package/dist/src/components/atoms/spinner.d.ts +7 -0
  71. package/dist/src/components/atoms/switch.d.ts +4 -0
  72. package/dist/src/components/atoms/table.d.ts +10 -0
  73. package/dist/src/components/atoms/tabs.d.ts +7 -0
  74. package/dist/src/components/atoms/textarea.d.ts +3 -0
  75. package/dist/src/components/atoms/tooltip.d.ts +8 -0
  76. package/dist/src/components/molecules/async-combobox.d.ts +15 -0
  77. package/dist/src/components/molecules/base-button.d.ts +15 -0
  78. package/dist/src/components/molecules/campaign-title.d.ts +9 -0
  79. package/dist/src/components/molecules/checkbox-field.d.ts +10 -0
  80. package/dist/src/components/molecules/combobox-field.d.ts +26 -0
  81. package/dist/src/components/molecules/creatable-action-icons.d.ts +9 -0
  82. package/dist/src/components/molecules/date-range-picker.d.ts +17 -0
  83. package/dist/src/components/molecules/debounced-input.d.ts +19 -0
  84. package/dist/src/components/molecules/detailed-image-modal.d.ts +18 -0
  85. package/dist/src/components/molecules/form-checkbox.d.ts +9 -0
  86. package/dist/src/components/molecules/form-phone-input.d.ts +14 -0
  87. package/dist/src/components/molecules/input-field.d.ts +15 -0
  88. package/dist/src/components/molecules/messaging-phone.d.ts +2 -0
  89. package/dist/src/components/molecules/messaging-preview.d.ts +5 -0
  90. package/dist/src/components/molecules/mobile-preview-message.d.ts +8 -0
  91. package/dist/src/components/molecules/multi-select-dropdown.d.ts +18 -0
  92. package/dist/src/components/molecules/preview-carousel.d.ts +2 -0
  93. package/dist/src/components/molecules/preview-rich-media.d.ts +5 -0
  94. package/dist/src/components/molecules/recommendation-card/components/recommendation-filters-button.d.ts +9 -0
  95. package/dist/src/components/molecules/recommendation-card/components/selected-algorithms.d.ts +12 -0
  96. package/dist/src/components/molecules/recommendation-card/index.d.ts +2 -0
  97. package/dist/src/components/molecules/recommendation-card/types/index.d.ts +82 -0
  98. package/dist/src/components/molecules/select-field.d.ts +18 -0
  99. package/dist/src/components/molecules/select-multi-field.d.ts +20 -0
  100. package/dist/src/components/molecules/switch-field.d.ts +7 -0
  101. package/dist/src/components/molecules/textarea-field.d.ts +11 -0
  102. package/dist/src/components/molecules/tooltip-field.d.ts +13 -0
  103. package/dist/src/components/organisms/data-table/actions.d.ts +12 -0
  104. package/dist/src/components/organisms/data-table/column-visibility.d.ts +6 -0
  105. package/dist/src/components/organisms/data-table/content.d.ts +18 -0
  106. package/dist/src/components/organisms/data-table/context.d.ts +10 -0
  107. package/dist/src/components/organisms/data-table/index.d.ts +17 -0
  108. package/dist/src/components/organisms/data-table/pagination.d.ts +10 -0
  109. package/dist/src/components/organisms/data-table/root.d.ts +13 -0
  110. package/dist/src/components/organisms/data-table/search.d.ts +8 -0
  111. package/dist/src/components/organisms/data-table/toolbar.d.ts +7 -0
  112. package/dist/src/components/organisms/date-preset/context.d.ts +8 -0
  113. package/dist/src/components/organisms/date-preset/date-preset.d.ts +11 -0
  114. package/dist/src/components/organisms/date-preset/index.d.ts +8 -0
  115. package/dist/src/components/organisms/date-preset/presets.d.ts +21 -0
  116. package/dist/src/components/organisms/date-preset/root.d.ts +9 -0
  117. package/dist/src/components/organisms/form-combobox.d.ts +21 -0
  118. package/dist/src/components/organisms/form-date-picker.d.ts +13 -0
  119. package/dist/src/components/organisms/form-file-upload.d.ts +23 -0
  120. package/dist/src/components/organisms/form-input.d.ts +16 -0
  121. package/dist/src/components/organisms/form-password.d.ts +14 -0
  122. package/dist/src/components/organisms/form-radio.d.ts +15 -0
  123. package/dist/src/components/organisms/form-select.d.ts +19 -0
  124. package/dist/src/components/organisms/form-slider.d.ts +23 -0
  125. package/dist/src/components/organisms/form-switch.d.ts +10 -0
  126. package/dist/src/components/organisms/form-textarea.d.ts +11 -0
  127. package/dist/src/components/organisms/form-time-picker.d.ts +22 -0
  128. package/dist/src/components/organisms/timeline.d.ts +25 -0
  129. package/dist/src/hooks/use-data-table.d.ts +165 -0
  130. package/dist/src/hooks/use-form-field.d.ts +19 -0
  131. package/dist/src/hooks/use-mobile.d.ts +1 -0
  132. package/dist/src/hooks/use-popup-layer.d.ts +10 -0
  133. package/dist/src/hooks/use-sidebar.d.ts +12 -0
  134. package/dist/src/index.d.ts +102 -0
  135. package/dist/src/lib/design-variants.d.ts +13 -0
  136. package/dist/src/lib/types.d.ts +7 -0
  137. package/dist/src/lib/utils.d.ts +31 -0
  138. package/dist/src/main.d.ts +1 -0
  139. package/dist/src/mock/actions.d.ts +6 -0
  140. package/dist/src/mock/columns.d.ts +9 -0
  141. package/dist/src/providers/popup-layer-provider.d.ts +14 -0
  142. package/dist/src/types/messaging.d.ts +34 -0
  143. package/dist/ui.css +1 -1
  144. package/package.json +42 -41
@@ -0,0 +1,59 @@
1
+ import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { Button } from '../../../components/atoms/button';
4
+ import { Input } from '../../../components/atoms/input';
5
+ import { Separator } from '../../../components/atoms/separator';
6
+ import { TooltipContent } from '../../../components/atoms/tooltip';
7
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<'div'> & {
8
+ defaultOpen?: boolean;
9
+ open?: boolean;
10
+ onOpenChange?: (open: boolean) => void;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function Sidebar({ side, variant, collapsible, className, children, ...props }: React.ComponentProps<'div'> & {
13
+ side?: 'left' | 'right';
14
+ variant?: 'sidebar' | 'floating' | 'inset';
15
+ collapsible?: 'offcanvas' | 'icon' | 'none';
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): import("react/jsx-runtime").JSX.Element;
18
+ declare function SidebarRail({ className, ...props }: React.ComponentProps<'button'>): import("react/jsx-runtime").JSX.Element;
19
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<'main'>): import("react/jsx-runtime").JSX.Element;
20
+ declare function SidebarInput({ className, ...props }: React.ComponentProps<typeof Input>): import("react/jsx-runtime").JSX.Element;
21
+ declare function SidebarHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
22
+ declare function SidebarFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
23
+ declare function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
24
+ declare function SidebarContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
25
+ declare function SidebarGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
26
+ declare function SidebarGroupLabel({ className, asChild, ...props }: React.ComponentProps<'div'> & {
27
+ asChild?: boolean;
28
+ }): import("react/jsx-runtime").JSX.Element;
29
+ declare function SidebarGroupAction({ className, asChild, ...props }: React.ComponentProps<'button'> & {
30
+ asChild?: boolean;
31
+ }): import("react/jsx-runtime").JSX.Element;
32
+ declare function SidebarGroupContent({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
33
+ declare function SidebarMenu({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
34
+ declare function SidebarMenuItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
35
+ declare const sidebarMenuButtonVariants: (props?: ({
36
+ variant?: "outline" | "default" | null | undefined;
37
+ size?: "default" | "sm" | "lg" | null | undefined;
38
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
39
+ declare function SidebarMenuButton({ asChild, isActive, variant, size, tooltip, className, ...props }: React.ComponentProps<'button'> & {
40
+ asChild?: boolean;
41
+ isActive?: boolean;
42
+ tooltip?: string | React.ComponentProps<typeof TooltipContent>;
43
+ } & VariantProps<typeof sidebarMenuButtonVariants>): import("react/jsx-runtime").JSX.Element;
44
+ declare function SidebarMenuAction({ className, asChild, showOnHover, ...props }: React.ComponentProps<'button'> & {
45
+ asChild?: boolean;
46
+ showOnHover?: boolean;
47
+ }): import("react/jsx-runtime").JSX.Element;
48
+ declare function SidebarMenuBadge({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
49
+ declare function SidebarMenuSkeleton({ className, showIcon, ...props }: React.ComponentProps<'div'> & {
50
+ showIcon?: boolean;
51
+ }): import("react/jsx-runtime").JSX.Element;
52
+ declare function SidebarMenuSub({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
53
+ declare function SidebarMenuSubItem({ className, ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
54
+ declare function SidebarMenuSubButton({ asChild, size, isActive, className, ...props }: React.ComponentProps<'a'> & {
55
+ asChild?: boolean;
56
+ size?: 'sm' | 'md';
57
+ isActive?: boolean;
58
+ }): import("react/jsx-runtime").JSX.Element;
59
+ export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, };
@@ -0,0 +1,3 @@
1
+ import { type ComponentProps } from 'react';
2
+ declare function Skeleton({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
3
+ export { Skeleton };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as SliderPrimitive from '@radix-ui/react-slider';
3
+ declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Slider };
@@ -0,0 +1,3 @@
1
+ import { type ToasterProps } from 'sonner';
2
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
3
+ export { Toaster };
@@ -0,0 +1,7 @@
1
+ import type { ClassValue } from 'clsx';
2
+ interface SpinnerProps extends React.ComponentProps<'svg'> {
3
+ containerClassName?: ClassValue;
4
+ title?: string;
5
+ }
6
+ declare function Spinner({ title, containerClassName, className, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
7
+ export { Spinner };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
3
+ declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ declare function Table({ className, ...props }: React.ComponentProps<'table'>): import("react/jsx-runtime").JSX.Element;
3
+ declare function TableHeader({ className, ...props }: React.ComponentProps<'thead'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TableBody({ className, ...props }: React.ComponentProps<'tbody'>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TableRow({ className, ...props }: React.ComponentProps<'tr'>): import("react/jsx-runtime").JSX.Element;
7
+ declare function TableHead({ className, ...props }: React.ComponentProps<'th'>): import("react/jsx-runtime").JSX.Element;
8
+ declare function TableCell({ className, ...props }: React.ComponentProps<'td'>): import("react/jsx-runtime").JSX.Element;
9
+ declare function TableCaption({ className, ...props }: React.ComponentProps<'caption'>): import("react/jsx-runtime").JSX.Element;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import * as TabsPrimitive from '@radix-ui/react-tabs';
3
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ declare function Textarea({ className, ...props }: React.ComponentProps<'textarea'>): import("react/jsx-runtime").JSX.Element;
3
+ export { Textarea };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ declare const TooltipContentWithPortal: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipContentWithPortal, TooltipProvider };
@@ -0,0 +1,15 @@
1
+ export type AsyncComboboxItem = {
2
+ value: string;
3
+ label: string;
4
+ };
5
+ export type AsyncComboboxProps = {
6
+ selectedItem: AsyncComboboxItem;
7
+ fetchItems: (search: string, signal?: AbortSignal) => Promise<AsyncComboboxItem[]>;
8
+ onSelect: (item: AsyncComboboxItem) => void;
9
+ searchPlaceholder?: string;
10
+ placeholder?: string;
11
+ className?: string;
12
+ disabled?: boolean;
13
+ align?: 'start' | 'center' | 'end';
14
+ };
15
+ export declare function AsyncCombobox({ selectedItem, fetchItems: fetchItemsProp, searchPlaceholder, placeholder, className, disabled, align, onSelect, }: AsyncComboboxProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { buttonVariants } from '../../../lib/design-variants';
4
+ declare const BaseButton: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & {
5
+ size?: VariantProps<typeof buttonVariants>["size"];
6
+ variant?: VariantProps<typeof buttonVariants>["variant"];
7
+ label?: string;
8
+ isSuffix?: boolean;
9
+ isPrefix?: boolean;
10
+ isLoading?: boolean;
11
+ labelClassName?: string;
12
+ isIconOnly?: boolean;
13
+ icon?: React.ReactNode;
14
+ } & React.RefAttributes<HTMLButtonElement>>;
15
+ export { BaseButton };
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface CampaignTitleProps {
3
+ label: React.ReactNode;
4
+ isEdit?: boolean;
5
+ campaignId?: string;
6
+ children?: React.ReactNode;
7
+ }
8
+ declare const CampaignTitle: ({ label, campaignId, isEdit, children }: CampaignTitleProps) => import("react/jsx-runtime").JSX.Element;
9
+ export { CampaignTitle };
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { Checkbox } from '../../../components/atoms/checkbox';
3
+ interface Props extends React.ComponentProps<typeof Checkbox> {
4
+ label: string;
5
+ name: string;
6
+ description?: string;
7
+ onCheckedChange: (checked: boolean) => void;
8
+ }
9
+ export declare const CheckboxField: ({ label, name, description, onCheckedChange, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ export type ComboboxFieldItem = {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ };
7
+ export type ComboboxFieldInputMode = 'input' | 'popup';
8
+ type Props = {
9
+ items: ComboboxFieldItem[];
10
+ value: ComboboxFieldItem[];
11
+ onValueChange: (values: ComboboxFieldItem[]) => void;
12
+ label?: string;
13
+ multiple?: boolean;
14
+ hasClearButton?: boolean;
15
+ disabled?: boolean;
16
+ placeholder?: string;
17
+ containerClassName?: string;
18
+ emptyMessage?: string;
19
+ hasAllOption?: boolean;
20
+ allOptionLabel?: string;
21
+ inputMode?: ComboboxFieldInputMode;
22
+ renderPopupTrigger?: (valueElement: React.ReactNode, selectedValues: ComboboxFieldItem[]) => React.ReactElement;
23
+ onInputChange?: (value: string) => void;
24
+ };
25
+ export declare const ComboboxField: ({ items, label, multiple, hasClearButton, disabled, placeholder, containerClassName, emptyMessage, hasAllOption, allOptionLabel, inputMode, renderPopupTrigger, onInputChange, value, onValueChange, }: Props) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type ClassValue } from 'clsx';
2
+ type Props = {
3
+ onCreate: () => void;
4
+ onDelete: () => void;
5
+ showCreate?: boolean;
6
+ className?: ClassValue;
7
+ };
8
+ export declare const CreatableActionIcons: ({ onCreate, onDelete, showCreate, className }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,17 @@
1
+ import { type ClassValue } from 'clsx';
2
+ import { type Locale } from 'date-fns';
3
+ import { type DateRange } from 'react-day-picker';
4
+ type Props = {
5
+ start?: Date;
6
+ end?: Date;
7
+ onConfirm: (range: DateRange) => void;
8
+ label?: string;
9
+ placeholder: string;
10
+ triggerButtonClassName?: ClassValue;
11
+ className?: ClassValue;
12
+ confirmLabel?: string;
13
+ disabledCondition?: boolean | ((date: Date) => boolean);
14
+ dateLocale?: Locale;
15
+ };
16
+ export declare const DateRangePicker: ({ start, end, onConfirm, className, triggerButtonClassName, label, placeholder, confirmLabel, disabledCondition, dateLocale, }: Props) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { O } from 'ts-toolbelt';
2
+ interface BaseSearchInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ placeholder: string;
6
+ className?: string;
7
+ inputClassName?: string;
8
+ }
9
+ type WithLabelProps = O.Merge<BaseSearchInputProps, {
10
+ label: string;
11
+ name: string;
12
+ }>;
13
+ type WithoutLabelProps = O.Merge<BaseSearchInputProps, {
14
+ label?: undefined;
15
+ name?: string;
16
+ }>;
17
+ type SearchInputProps = WithLabelProps | WithoutLabelProps;
18
+ declare function DebouncedInput({ value, onChange, className, inputClassName, name, placeholder, label }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
19
+ export { DebouncedInput };
@@ -0,0 +1,18 @@
1
+ import { type ClassValue } from 'clsx';
2
+ import type { Union } from 'ts-toolbelt';
3
+ type BaseProps = {
4
+ banner: string;
5
+ campaignName: string;
6
+ imageClassName?: ClassValue;
7
+ };
8
+ type ControlledProps = BaseProps & {
9
+ isControlled: true;
10
+ open: boolean;
11
+ setOpen: (open: boolean) => void;
12
+ };
13
+ type UncontrolledProps = BaseProps & {
14
+ isControlled?: false;
15
+ };
16
+ type DetailedImageModalProps = Union.Strict<ControlledProps | UncontrolledProps>;
17
+ export declare const DetailedImageModal: ({ banner, campaignName, isControlled, open, setOpen, imageClassName, }: DetailedImageModalProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
+ type FormCheckboxProps<TFieldValues extends FieldValues = FieldValues> = {
3
+ name: Path<TFieldValues>;
4
+ control?: Control<TFieldValues>;
5
+ label: string;
6
+ containerClassName?: string;
7
+ };
8
+ export declare const FormCheckbox: <TFieldValues extends FieldValues = FieldValues>({ name, control, containerClassName, ...props }: FormCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import flags from 'react-phone-number-input/flags';
3
+ import { PhoneInput } from '../../../components/atoms/phone-input';
4
+ export type FormPhoneInputProps = {
5
+ label: string;
6
+ name: string;
7
+ description?: string;
8
+ showErrorPlaceholder?: boolean;
9
+ errorClassName?: string;
10
+ containerClassName?: string;
11
+ labelClassName?: string;
12
+ mainLanguage?: keyof typeof flags;
13
+ } & Omit<React.ComponentProps<typeof PhoneInput>, 'defaultCountry' | 'value' | 'onChange' | 'onBlur' | 'name' | 'ref'>;
14
+ export declare const FormPhoneInput: ({ label, name, description, showErrorPlaceholder, errorClassName, containerClassName, labelClassName, mainLanguage, ...props }: FormPhoneInputProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { VariantProps } from 'class-variance-authority';
3
+ import { labelVariants } from '../../../lib/design-variants';
4
+ export interface InputFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'label'> {
5
+ name: string;
6
+ value?: string | number | readonly string[];
7
+ label?: string;
8
+ labelVariant?: VariantProps<typeof labelVariants>['variant'];
9
+ description?: string;
10
+ isReadOnly?: boolean;
11
+ inputClassName?: string;
12
+ hasRequiredIndicator?: boolean;
13
+ }
14
+ declare const InputField: React.ForwardRefExoticComponent<InputFieldProps & React.RefAttributes<HTMLInputElement>>;
15
+ export { InputField };
@@ -0,0 +1,2 @@
1
+ import { MessagingPhoneProps } from '../../../types/messaging';
2
+ export declare const MessagingPhone: (props: MessagingPhoneProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { MessagingPhoneProps } from '../../../types/messaging';
2
+ export declare const MessagingPreview: {
3
+ (props: MessagingPhoneProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,8 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ import { MessageCarouselCard } from '../../../types/messaging';
3
+ type MobilePreviewMessageProps = {
4
+ cards?: MessageCarouselCard[];
5
+ includeTime?: boolean;
6
+ };
7
+ export declare const MobilePreviewMessage: ({ children, cards, includeTime, }: PropsWithChildren<MobilePreviewMessageProps>) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,18 @@
1
+ import { SelectItemProps } from '../../../lib/types';
2
+ interface MultiSelectDropdownProps {
3
+ label: string;
4
+ options: SelectItemProps[];
5
+ value: string[];
6
+ onChange: (value: string[]) => void;
7
+ toggleAllLabel?: string;
8
+ optionSuffix?: string;
9
+ translateOptions?: boolean;
10
+ containerClassName?: string;
11
+ contentClassName?: string;
12
+ triggerClassName?: string;
13
+ showSelectedItemLabels?: boolean;
14
+ showErrorPlaceholder?: boolean;
15
+ error?: string;
16
+ }
17
+ declare function MultiSelectDropdown({ label, options, value, onChange, toggleAllLabel, optionSuffix, translateOptions, containerClassName, contentClassName, triggerClassName, showSelectedItemLabels, showErrorPlaceholder, error, }: MultiSelectDropdownProps): import("react/jsx-runtime").JSX.Element;
18
+ export { MultiSelectDropdown };
@@ -0,0 +1,2 @@
1
+ import { MessagingPhoneProps } from '../../../types/messaging';
2
+ export declare const PreviewCarousel: ({ body, carousel }: MessagingPhoneProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { MessagingPhoneProps } from '../../../types/messaging';
2
+ export declare const PreviewRichMedia: {
3
+ ({ header, body, footer, buttons }: MessagingPhoneProps): import("react/jsx-runtime").JSX.Element;
4
+ displayName: string;
5
+ };
@@ -0,0 +1,9 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface RecommendationFiltersButtonProps {
3
+ onClick: () => void;
4
+ icon: ReactNode;
5
+ label: ReactNode;
6
+ isInclusion?: boolean;
7
+ }
8
+ export declare const RecommendationFiltersButton: React.FC<RecommendationFiltersButtonProps>;
9
+ export {};
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { FieldValues } from 'react-hook-form';
3
+ import { RecommendationCardConfig, SharedAlgorithmProps } from '../types';
4
+ interface SelectedAlgorithmsProps<TFieldValues extends FieldValues = FieldValues> extends SharedAlgorithmProps<TFieldValues> {
5
+ update: (index: number, value: unknown) => void;
6
+ swap: (index1: number, index2: number) => void;
7
+ remove: (index: number) => void;
8
+ move: (from: number, to: number) => void;
9
+ config?: RecommendationCardConfig;
10
+ }
11
+ export declare const SelectedAlgorithms: React.FC<SelectedAlgorithmsProps>;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { RecommendationCardProps } from './types';
2
+ export declare const RecommendationCard: <TFieldValues extends Record<string, unknown> = Record<string, unknown>>({ ...props }: RecommendationCardProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,82 @@
1
+ import { ReactNode } from 'react';
2
+ import { ArrayPath, Control, FieldValues, UseFieldArrayReturn } from 'react-hook-form';
3
+ export type AlgorithmType = 'INTELLIGENT' | 'STATIC';
4
+ export type FilterType = 'exclude' | 'include';
5
+ export declare const STATIC_ALGORITHM_TYPE: {
6
+ readonly PRODUCT: "PRODUCT";
7
+ };
8
+ export interface IntelligentAlgorithmOption {
9
+ id: string;
10
+ icon?: ReactNode;
11
+ description?: ReactNode;
12
+ label: string;
13
+ value: string;
14
+ desktopProductCount?: number;
15
+ mobileProductCount?: number;
16
+ timeFrame?: string;
17
+ isTimeFrameDisabled?: boolean;
18
+ isOptionsDisabled?: boolean;
19
+ suitablePages?: string[];
20
+ [key: string]: unknown;
21
+ }
22
+ export interface StaticAlgorithmOption {
23
+ key: string;
24
+ title: string;
25
+ description?: string;
26
+ icon?: ReactNode;
27
+ [key: string]: unknown;
28
+ }
29
+ export interface EmailAlgorithmConfig {
30
+ isMultiSelect?: boolean;
31
+ uniqueItems?: boolean;
32
+ isIntelligentDisabled?: boolean;
33
+ isStaticDisabled?: boolean;
34
+ [key: string]: unknown;
35
+ }
36
+ export interface RecommendationCardConfig {
37
+ isRecommendation?: boolean;
38
+ isEmail?: boolean;
39
+ isWhatsapp?: boolean;
40
+ isSearch?: boolean;
41
+ isPromotion?: boolean;
42
+ isKeyword?: boolean;
43
+ showShuffleProducts?: boolean;
44
+ showRecommendOtherCategories?: boolean;
45
+ showShufflePromotions?: boolean;
46
+ }
47
+ export interface SharedAlgorithmProps<TFieldValues extends FieldValues = FieldValues> {
48
+ control: Control<TFieldValues>;
49
+ fields: Record<string, unknown>[];
50
+ intelligentAlgorithms: IntelligentAlgorithmOption[];
51
+ staticAlgorithms?: Record<string, StaticAlgorithmOption>;
52
+ emailAlgorithmConfig?: EmailAlgorithmConfig;
53
+ }
54
+ export interface RecommendationCardProps<TFieldValues extends FieldValues = FieldValues> {
55
+ control: Control<TFieldValues>;
56
+ fieldArray: UseFieldArrayReturn<TFieldValues, ArrayPath<TFieldValues>, 'id'>;
57
+ intelligentAlgorithms: IntelligentAlgorithmOption[];
58
+ staticAlgorithms?: Record<string, StaticAlgorithmOption>;
59
+ emailAlgorithmConfig?: EmailAlgorithmConfig;
60
+ labels?: {
61
+ title?: ReactNode;
62
+ description?: ReactNode;
63
+ shuffleProducts?: string;
64
+ recommendOtherCategories?: string;
65
+ shufflePromotions?: string;
66
+ exclusionFilters?: ReactNode;
67
+ inclusionFilters?: ReactNode;
68
+ };
69
+ config?: RecommendationCardConfig;
70
+ onFiltersToggle?: (type: FilterType, isOpen: boolean) => void;
71
+ renderFilters?: (type: FilterType) => ReactNode;
72
+ renderAlgorithmModals?: (props: SharedAlgorithmProps<TFieldValues> & {
73
+ append: UseFieldArrayReturn<TFieldValues, ArrayPath<TFieldValues>, 'id'>['append'];
74
+ }) => ReactNode;
75
+ renderSelectedAlgorithms?: (props: SharedAlgorithmProps<TFieldValues> & {
76
+ update: UseFieldArrayReturn<TFieldValues, ArrayPath<TFieldValues>, 'id'>['update'];
77
+ move: (from: number, to: number) => void;
78
+ swap: (index1: number, index2: number) => void;
79
+ remove: (index: number) => void;
80
+ config?: RecommendationCardConfig;
81
+ }) => ReactNode;
82
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { Select } from '../../../components/atoms/select';
3
+ import type { SelectItemProps } from '../../../lib/types';
4
+ interface SelectFieldProps extends React.ComponentProps<typeof Select> {
5
+ options: SelectItemProps[];
6
+ placeholder: string;
7
+ onChange: (value: string) => void;
8
+ value: string;
9
+ label?: string;
10
+ labelClassName?: string;
11
+ triggerClassName?: string;
12
+ containerClassName?: string;
13
+ isPortal?: boolean;
14
+ hasFormControlWrapper?: boolean;
15
+ selectContentClassName?: string;
16
+ }
17
+ export declare const SelectField: ({ options, placeholder, hasFormControlWrapper, selectContentClassName, onChange, value, label, triggerClassName, labelClassName, containerClassName, isPortal, ...props }: SelectFieldProps) => import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,20 @@
1
+ import { type ActionMeta, type InputActionMeta, type MultiValue, type SingleValue } from 'react-select';
2
+ import { SelectItemProps } from '../../../lib/types';
3
+ type SelectFieldProps = {
4
+ label?: string;
5
+ name: string;
6
+ options: SelectItemProps[];
7
+ value: SingleValue<SelectItemProps> | MultiValue<SelectItemProps>;
8
+ onChange?: (newValue: SingleValue<SelectItemProps> | MultiValue<SelectItemProps>, actionMeta: ActionMeta<SelectItemProps>) => void;
9
+ onInputChange?: (inputValue: string, actionMeta: InputActionMeta) => void;
10
+ placeholder?: string;
11
+ isClearable?: boolean;
12
+ isSearchable?: boolean;
13
+ isMulti?: boolean;
14
+ isDisabled?: boolean;
15
+ isCreatable?: boolean;
16
+ description?: string;
17
+ className?: string;
18
+ };
19
+ export declare function SelectMultiField({ label, name, options, value, onChange, onInputChange, placeholder, isClearable, isSearchable, isMulti, isDisabled, description, className, isCreatable, }: SelectFieldProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Switch } from '../../../components/atoms/switch';
2
+ interface Props extends React.ComponentProps<typeof Switch> {
3
+ label?: string;
4
+ name: string;
5
+ }
6
+ export declare const SwitchField: ({ label, name, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { type ClassValue } from 'clsx';
3
+ import { Textarea } from '../../../components/atoms/textarea';
4
+ interface Props extends React.ComponentProps<typeof Textarea> {
5
+ textAreaClassName?: ClassValue;
6
+ value: string;
7
+ onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
8
+ label?: string;
9
+ }
10
+ export declare const TextAreaField: ({ textAreaClassName, value, onChange, label, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ type TooltipFieldProps = {
3
+ trigger: React.ReactNode;
4
+ content: React.ReactNode;
5
+ asChild?: boolean;
6
+ wrapTrigger?: boolean;
7
+ triggerClassName?: string;
8
+ contentClassName?: string;
9
+ disableContent?: boolean;
10
+ isPortal?: boolean;
11
+ };
12
+ declare const TooltipField: ({ trigger, content, asChild, wrapTrigger, triggerClassName, contentClassName, disableContent, isPortal, }: TooltipFieldProps) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
13
+ export { TooltipField };
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ export interface ActionItem {
3
+ label: string;
4
+ icon?: ReactNode;
5
+ onClick: () => void;
6
+ variant?: 'default' | 'destructive';
7
+ disabled?: boolean;
8
+ }
9
+ export interface ActionsProps {
10
+ actions: ActionItem[];
11
+ }
12
+ export declare const Actions: ({ actions }: ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,6 @@
1
+ interface ColumnVisibilityProps {
2
+ emptyMessage?: string;
3
+ allOptionLabel?: string;
4
+ }
5
+ export declare function ColumnVisibility({ emptyMessage, allOptionLabel, }: ColumnVisibilityProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from 'react';
2
+ import { type Row } from '@tanstack/react-table';
3
+ export interface RenderRowSubComponentProps<TData = unknown> {
4
+ row: Row<TData>;
5
+ }
6
+ interface ContentProps {
7
+ className?: string;
8
+ loadingContent?: ReactNode;
9
+ emptyContent?: ReactNode;
10
+ /**
11
+ * Render a sub-component below a row when it's expanded.
12
+ * The sub-component can handle its own data fetching and render sub-rows.
13
+ * @example ({ row }) => <SubRowAsync row={row} />
14
+ */
15
+ renderRowSubComponent?: (props: RenderRowSubComponentProps) => ReactNode;
16
+ }
17
+ export declare function Content({ className, loadingContent, emptyContent, renderRowSubComponent, }: ContentProps): import("react/jsx-runtime").JSX.Element;
18
+ export {};
@@ -0,0 +1,10 @@
1
+ import { type Table as TanstackTable } from '@tanstack/react-table';
2
+ export interface DataTableContextValue<TData> {
3
+ table: TanstackTable<TData>;
4
+ isLoading: boolean;
5
+ search: string;
6
+ onSearchChange: (value: string) => void;
7
+ totalCount?: number;
8
+ }
9
+ export declare const DataTableContext: import("react").Context<DataTableContextValue<unknown> | null>;
10
+ export declare function useDataTableContext<TData>(): DataTableContextValue<TData>;