@segmentify/ui 0.0.63 → 0.0.65

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 (139) hide show
  1. package/dist/components/atoms/chart.d.ts +1 -1
  2. package/dist/index.d.ts +3 -0
  3. package/dist/lib/design-variants.d.ts +1 -1
  4. package/dist/segmentify-ui.cjs +29 -29
  5. package/dist/segmentify-ui.js +757 -756
  6. package/dist/ui.css +30 -0
  7. package/package.json +2 -2
  8. package/dist/components/atoms/autocomplete.d.ts +0 -13
  9. package/dist/components/atoms/iphone-15.d.ts +0 -2
  10. package/dist/components/atoms/preview-single-button.d.ts +0 -6
  11. package/dist/components/molecules/autocomplete-field.d.ts +0 -17
  12. package/dist/components/molecules/confirmation-dialog.d.ts +0 -24
  13. package/dist/components/molecules/preview-sms.d.ts +0 -5
  14. package/dist/components/molecules/whatsapp-message.d.ts +0 -15
  15. package/dist/components/organisms/form-checkbox.d.ts +0 -10
  16. package/dist/src/app.d.ts +0 -14
  17. package/dist/src/components/atoms/accordion.d.ts +0 -9
  18. package/dist/src/components/atoms/alert-dialog.d.ts +0 -18
  19. package/dist/src/components/atoms/aspect-ratio.d.ts +0 -3
  20. package/dist/src/components/atoms/avatar.d.ts +0 -6
  21. package/dist/src/components/atoms/badge.d.ts +0 -7
  22. package/dist/src/components/atoms/breadcrumb.d.ts +0 -11
  23. package/dist/src/components/atoms/button.d.ts +0 -10
  24. package/dist/src/components/atoms/calendar.d.ts +0 -8
  25. package/dist/src/components/atoms/card.d.ts +0 -9
  26. package/dist/src/components/atoms/carousel.d.ts +0 -19
  27. package/dist/src/components/atoms/chart.d.ts +0 -40
  28. package/dist/src/components/atoms/checkbox.d.ts +0 -4
  29. package/dist/src/components/atoms/collapsible.d.ts +0 -5
  30. package/dist/src/components/atoms/combobox.d.ts +0 -24
  31. package/dist/src/components/atoms/command.d.ts +0 -20
  32. package/dist/src/components/atoms/component-switch.d.ts +0 -19
  33. package/dist/src/components/atoms/content-wrapper.d.ts +0 -11
  34. package/dist/src/components/atoms/date.d.ts +0 -4
  35. package/dist/src/components/atoms/dialog.d.ts +0 -16
  36. package/dist/src/components/atoms/drawer.d.ts +0 -13
  37. package/dist/src/components/atoms/dropdown-menu.d.ts +0 -25
  38. package/dist/src/components/atoms/empty.d.ts +0 -11
  39. package/dist/src/components/atoms/error-message.d.ts +0 -6
  40. package/dist/src/components/atoms/field-description.d.ts +0 -6
  41. package/dist/src/components/atoms/form.d.ts +0 -17
  42. package/dist/src/components/atoms/hover-card.d.ts +0 -6
  43. package/dist/src/components/atoms/icon.d.ts +0 -6
  44. package/dist/src/components/atoms/input-group.d.ts +0 -16
  45. package/dist/src/components/atoms/input-otp.d.ts +0 -20
  46. package/dist/src/components/atoms/input.d.ts +0 -3
  47. package/dist/src/components/atoms/kbd.d.ts +0 -3
  48. package/dist/src/components/atoms/label.d.ts +0 -9
  49. package/dist/src/components/atoms/native-select.d.ts +0 -7
  50. package/dist/src/components/atoms/pagination.d.ts +0 -13
  51. package/dist/src/components/atoms/phone-input.d.ts +0 -7
  52. package/dist/src/components/atoms/phone-preview.d.ts +0 -5
  53. package/dist/src/components/atoms/popover.d.ts +0 -7
  54. package/dist/src/components/atoms/quill-editor.d.ts +0 -11
  55. package/dist/src/components/atoms/radio-group.d.ts +0 -5
  56. package/dist/src/components/atoms/scroll-area.d.ts +0 -5
  57. package/dist/src/components/atoms/select.d.ts +0 -18
  58. package/dist/src/components/atoms/separator.d.ts +0 -4
  59. package/dist/src/components/atoms/sheet.d.ts +0 -13
  60. package/dist/src/components/atoms/sidebar.d.ts +0 -59
  61. package/dist/src/components/atoms/skeleton.d.ts +0 -3
  62. package/dist/src/components/atoms/slider.d.ts +0 -4
  63. package/dist/src/components/atoms/sonner.d.ts +0 -3
  64. package/dist/src/components/atoms/spinner.d.ts +0 -7
  65. package/dist/src/components/atoms/switch.d.ts +0 -4
  66. package/dist/src/components/atoms/table.d.ts +0 -10
  67. package/dist/src/components/atoms/tabs.d.ts +0 -7
  68. package/dist/src/components/atoms/textarea.d.ts +0 -3
  69. package/dist/src/components/atoms/tooltip.d.ts +0 -8
  70. package/dist/src/components/molecules/async-combobox.d.ts +0 -15
  71. package/dist/src/components/molecules/base-button.d.ts +0 -15
  72. package/dist/src/components/molecules/campaign-title.d.ts +0 -9
  73. package/dist/src/components/molecules/checkbox-field.d.ts +0 -10
  74. package/dist/src/components/molecules/combobox-field.d.ts +0 -26
  75. package/dist/src/components/molecules/creatable-action-icons.d.ts +0 -9
  76. package/dist/src/components/molecules/date-range-picker.d.ts +0 -17
  77. package/dist/src/components/molecules/debounced-input.d.ts +0 -19
  78. package/dist/src/components/molecules/detailed-image-modal.d.ts +0 -18
  79. package/dist/src/components/molecules/form-checkbox.d.ts +0 -9
  80. package/dist/src/components/molecules/form-phone-input.d.ts +0 -14
  81. package/dist/src/components/molecules/input-field.d.ts +0 -15
  82. package/dist/src/components/molecules/messaging-phone.d.ts +0 -2
  83. package/dist/src/components/molecules/messaging-preview.d.ts +0 -5
  84. package/dist/src/components/molecules/mobile-preview-message.d.ts +0 -8
  85. package/dist/src/components/molecules/multi-select-dropdown.d.ts +0 -18
  86. package/dist/src/components/molecules/preview-carousel.d.ts +0 -2
  87. package/dist/src/components/molecules/preview-rich-media.d.ts +0 -5
  88. package/dist/src/components/molecules/recommendation-card/components/recommendation-filters-button.d.ts +0 -9
  89. package/dist/src/components/molecules/recommendation-card/components/selected-algorithms.d.ts +0 -12
  90. package/dist/src/components/molecules/recommendation-card/index.d.ts +0 -2
  91. package/dist/src/components/molecules/recommendation-card/types/index.d.ts +0 -82
  92. package/dist/src/components/molecules/select-field.d.ts +0 -18
  93. package/dist/src/components/molecules/select-multi-field.d.ts +0 -20
  94. package/dist/src/components/molecules/switch-field.d.ts +0 -7
  95. package/dist/src/components/molecules/textarea-field.d.ts +0 -11
  96. package/dist/src/components/molecules/tooltip-field.d.ts +0 -13
  97. package/dist/src/components/organisms/data-table/actions.d.ts +0 -12
  98. package/dist/src/components/organisms/data-table/column-visibility.d.ts +0 -6
  99. package/dist/src/components/organisms/data-table/content.d.ts +0 -18
  100. package/dist/src/components/organisms/data-table/context.d.ts +0 -10
  101. package/dist/src/components/organisms/data-table/index.d.ts +0 -17
  102. package/dist/src/components/organisms/data-table/pagination.d.ts +0 -10
  103. package/dist/src/components/organisms/data-table/root.d.ts +0 -13
  104. package/dist/src/components/organisms/data-table/search.d.ts +0 -8
  105. package/dist/src/components/organisms/data-table/toolbar.d.ts +0 -7
  106. package/dist/src/components/organisms/date-preset/context.d.ts +0 -8
  107. package/dist/src/components/organisms/date-preset/date-preset.d.ts +0 -11
  108. package/dist/src/components/organisms/date-preset/index.d.ts +0 -8
  109. package/dist/src/components/organisms/date-preset/presets.d.ts +0 -21
  110. package/dist/src/components/organisms/date-preset/root.d.ts +0 -9
  111. package/dist/src/components/organisms/form-combobox.d.ts +0 -21
  112. package/dist/src/components/organisms/form-date-picker.d.ts +0 -13
  113. package/dist/src/components/organisms/form-file-upload.d.ts +0 -23
  114. package/dist/src/components/organisms/form-input.d.ts +0 -16
  115. package/dist/src/components/organisms/form-password.d.ts +0 -14
  116. package/dist/src/components/organisms/form-radio.d.ts +0 -15
  117. package/dist/src/components/organisms/form-select.d.ts +0 -19
  118. package/dist/src/components/organisms/form-slider.d.ts +0 -23
  119. package/dist/src/components/organisms/form-switch.d.ts +0 -10
  120. package/dist/src/components/organisms/form-textarea.d.ts +0 -11
  121. package/dist/src/components/organisms/form-time-picker.d.ts +0 -22
  122. package/dist/src/components/organisms/timeline.d.ts +0 -25
  123. package/dist/src/hooks/use-data-table.d.ts +0 -165
  124. package/dist/src/hooks/use-form-field.d.ts +0 -19
  125. package/dist/src/hooks/use-mobile.d.ts +0 -1
  126. package/dist/src/hooks/use-popup-layer.d.ts +0 -10
  127. package/dist/src/hooks/use-sidebar.d.ts +0 -12
  128. package/dist/src/index.d.ts +0 -105
  129. package/dist/src/lib/design-variants.d.ts +0 -13
  130. package/dist/src/lib/types.d.ts +0 -7
  131. package/dist/src/lib/utils.d.ts +0 -31
  132. package/dist/src/main.d.ts +0 -1
  133. package/dist/src/mock/actions.d.ts +0 -6
  134. package/dist/src/mock/columns.d.ts +0 -9
  135. package/dist/src/providers/popup-layer-provider.d.ts +0 -14
  136. package/dist/src/types/messaging.d.ts +0 -34
  137. /package/dist/{src/components → components}/atoms/sortable-item.d.ts +0 -0
  138. /package/dist/{src/components → components}/molecules/sortable-list.d.ts +0 -0
  139. /package/dist/{src/components → components}/organisms/form-sortable-list.d.ts +0 -0
@@ -1,82 +0,0 @@
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
- }
@@ -1,18 +0,0 @@
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 {};
@@ -1,20 +0,0 @@
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 {};
@@ -1,7 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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 {};
@@ -1,13 +0,0 @@
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 };
@@ -1,12 +0,0 @@
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;
@@ -1,6 +0,0 @@
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 {};
@@ -1,18 +0,0 @@
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 {};
@@ -1,10 +0,0 @@
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>;
@@ -1,17 +0,0 @@
1
- import { ColumnVisibility } from './column-visibility';
2
- import { Content } from './content';
3
- import { Root } from './root';
4
- import { Search } from './search';
5
- import { Toolbar } from './toolbar';
6
- export type { ActionItem, ActionsProps } from './actions';
7
- export type { RenderRowSubComponentProps } from './content';
8
- export { type ColumnDef, type Column } from '@tanstack/react-table';
9
- export declare const DataTable: {
10
- Root: typeof Root;
11
- Toolbar: typeof Toolbar;
12
- Search: typeof Search;
13
- ColumnVisibility: typeof ColumnVisibility;
14
- Content: typeof Content;
15
- Pagination: ({ showSelectedCount, showPaginationInfo, className, showPerPageLabel, selectPlaceholder, selectedCountText, paginationInfoText, }: import("./pagination").PaginationProps) => import("react/jsx-runtime").JSX.Element;
16
- Actions: ({ actions }: import("./actions").ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
17
- };
@@ -1,10 +0,0 @@
1
- export interface PaginationProps {
2
- showSelectedCount?: boolean;
3
- showPaginationInfo?: boolean;
4
- className?: string;
5
- showPerPageLabel?: string;
6
- selectPlaceholder?: string;
7
- selectedCountText?: (selected: number, total: number) => string;
8
- paginationInfoText?: (start: number, end: number, total: number) => string;
9
- }
10
- export declare const Pagination: ({ showSelectedCount, showPaginationInfo, className, showPerPageLabel, selectPlaceholder, selectedCountText, paginationInfoText, }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,13 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { type Table as TanstackTable } from '@tanstack/react-table';
3
- interface RootProps<TData> {
4
- table: TanstackTable<TData>;
5
- children: ReactNode;
6
- isLoading?: boolean;
7
- search?: string;
8
- onSearchChange?: (value: string) => void;
9
- totalCount?: number;
10
- className?: string;
11
- }
12
- export declare function Root<TData>({ table, children, isLoading, search, onSearchChange, totalCount, className, }: RootProps<TData>): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,8 +0,0 @@
1
- interface SearchProps {
2
- placeholder?: string;
3
- filterColumn?: string;
4
- className?: string;
5
- label?: string;
6
- }
7
- export declare function Search({ placeholder, filterColumn, className, label }: SearchProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface ToolbarProps {
3
- children: ReactNode;
4
- className?: string;
5
- }
6
- export declare function Toolbar({ children, className }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,8 +0,0 @@
1
- import { type DateRange } from './presets';
2
- export interface DatePresetContextValue {
3
- range: DateRange;
4
- preset: string | null;
5
- setRange: (range: DateRange, preset?: string | null) => void;
6
- }
7
- export declare const DatePresetContext: import("react").Context<DatePresetContextValue | null>;
8
- export declare function useDatePreset(): DatePresetContextValue;
@@ -1,11 +0,0 @@
1
- import { type Locale } from 'date-fns';
2
- import { type DatePresetItem } from './presets';
3
- export interface DatePresetProps {
4
- presets?: Record<string, DatePresetItem>;
5
- className?: string;
6
- confirmLabel?: string;
7
- placeholder?: string;
8
- disabledCondition?: boolean | ((date: Date) => boolean);
9
- dateLocale?: Locale;
10
- }
11
- export declare function DatePreset({ presets, className, confirmLabel, placeholder, disabledCondition, dateLocale, }: DatePresetProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +0,0 @@
1
- export type { DateRange, DatePresetItem } from './presets';
2
- export type { DatePresetContextValue } from './context';
3
- export type { DatePresetProps } from './date-preset';
4
- export type { DatePresetProviderProps } from './root';
5
- export { DATE_PRESETS, DEFAULT_PRESET_KEY, findMatchingPreset } from './presets';
6
- export { useDatePreset } from './context';
7
- export { DatePreset } from './date-preset';
8
- export { DatePresetProvider } from './root';
@@ -1,21 +0,0 @@
1
- export interface DateRange {
2
- from: Date;
3
- to: Date;
4
- }
5
- export interface DateRangeOptional {
6
- from?: Date;
7
- to?: Date;
8
- }
9
- export interface DatePresetItem {
10
- key: string;
11
- label: string;
12
- getRange: () => DateRange;
13
- }
14
- export declare const DATE_PRESETS: Record<string, DatePresetItem>;
15
- export declare const DEFAULT_PRESET_KEY = "LAST_7_DAYS";
16
- /**
17
- * Finds a matching preset for a given date range.
18
- * Compares dates by day (ignores time).
19
- * @returns The matching preset key or null if no match found.
20
- */
21
- export declare function findMatchingPreset(range: DateRange, presets?: Record<string, DatePresetItem>): string | null;
@@ -1,9 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type DateRange } from './presets';
3
- export interface DatePresetProviderProps {
4
- children: ReactNode;
5
- initialRange?: DateRange;
6
- initialPreset?: string | null;
7
- onRangeChange?: (range: DateRange, preset: string | null) => void;
8
- }
9
- export declare function DatePresetProvider({ children, initialRange, initialPreset, onRangeChange, }: DatePresetProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- import { type ComboboxFieldItem } from '../../../components/molecules/combobox-field';
3
- type FormComboboxProps<TFieldValues extends FieldValues = FieldValues> = {
4
- name: Path<TFieldValues>;
5
- label?: string;
6
- placeholder?: string;
7
- items: ComboboxFieldItem[];
8
- description?: string;
9
- multiple?: boolean;
10
- emptyMessage?: string;
11
- containerClassName?: string;
12
- hasClearButton?: boolean;
13
- hasAllOption?: boolean;
14
- allOptionLabel?: string;
15
- disabled?: boolean;
16
- tooltipContent?: string;
17
- control?: Control<TFieldValues>;
18
- inputMode?: 'input' | 'popup';
19
- };
20
- export declare const FormCombobox: <TFieldValues extends FieldValues = FieldValues>({ name, label, placeholder, items, description, multiple, emptyMessage, containerClassName, hasClearButton, hasAllOption, allOptionLabel, disabled, tooltipContent, control, inputMode, }: FormComboboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
21
- export {};
@@ -1,13 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- export interface FormDatePickerProps<TFieldValues extends FieldValues = FieldValues> {
3
- name: Path<TFieldValues>;
4
- control?: Control<TFieldValues>;
5
- disabledCondition?: boolean | ((date: Date) => boolean);
6
- label?: string;
7
- placeholder?: string;
8
- description?: string;
9
- containerClassName?: string;
10
- triggerClassName?: string;
11
- showErrorPlaceholder?: boolean;
12
- }
13
- export declare const FormDatePicker: <TFieldValues extends FieldValues = FieldValues>({ name, control, disabledCondition, label, placeholder, description, containerClassName, triggerClassName, showErrorPlaceholder, }: FormDatePickerProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
@@ -1,23 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- import type { ClassValue } from 'clsx';
3
- type FormFileUploadProps<TFieldValues extends FieldValues = FieldValues> = {
4
- name: Path<TFieldValues>;
5
- control?: Control<TFieldValues>;
6
- label?: string;
7
- uploadButtonLabel?: string;
8
- uploadingLabel?: string;
9
- uploadFailedMessage?: string;
10
- description?: string;
11
- accept?: string;
12
- disabled?: boolean;
13
- multiple?: boolean;
14
- containerClassName?: ClassValue;
15
- tooltipContent?: string;
16
- hasRequiredIndicator?: boolean;
17
- onUpload?: (file: File) => Promise<string>;
18
- };
19
- export declare const FormFileUpload: {
20
- <TFieldValues extends FieldValues = FieldValues>({ name, control, label, uploadButtonLabel, uploadingLabel, uploadFailedMessage, description, accept, disabled, multiple, containerClassName, tooltipContent, hasRequiredIndicator, onUpload, }: FormFileUploadProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
21
- displayName: string;
22
- };
23
- export {};
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
3
- import type { ClassValue } from 'clsx';
4
- type Props<TFieldValues extends FieldValues = FieldValues> = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'name' | 'defaultValue'> & {
5
- name: Path<TFieldValues>;
6
- label: string;
7
- placeholder?: string;
8
- control?: Control<TFieldValues>;
9
- containerClassName?: ClassValue;
10
- inputClassName?: ClassValue;
11
- description?: string;
12
- tooltipContent?: string;
13
- hasRequiredIndicator?: boolean;
14
- };
15
- export declare const FormInput: <TFieldValues extends FieldValues>({ label, containerClassName, inputClassName, name, description, placeholder, tooltipContent, hasRequiredIndicator, control, type, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,14 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- import type { ClassValue } from 'clsx';
3
- type Props<TFieldValues extends FieldValues = FieldValues> = {
4
- label: string;
5
- name: Path<TFieldValues>;
6
- placeholder: string;
7
- control?: Control<TFieldValues>;
8
- containerClassName?: ClassValue;
9
- description?: string;
10
- tooltipContent?: string;
11
- hasRequiredIndicator?: boolean;
12
- };
13
- export declare const FormPassword: <TFieldValues extends FieldValues = FieldValues>({ label, name, containerClassName, description, placeholder, tooltipContent, control, hasRequiredIndicator, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,15 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- import type { SelectItemProps } from '../../../lib/types';
3
- type Props<TFieldValues extends FieldValues = FieldValues> = {
4
- name: Path<TFieldValues>;
5
- label: string;
6
- items: SelectItemProps[];
7
- control?: Control<TFieldValues>;
8
- containerClassName?: string;
9
- itemClassName?: string;
10
- itemLabelClassName?: string;
11
- selectedClassName?: string;
12
- description?: string;
13
- };
14
- export declare const FormRadio: <TFieldValues extends FieldValues = FieldValues>({ name, label, items, control, containerClassName, itemClassName, itemLabelClassName, selectedClassName, description, }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
3
- import { SelectField } from '../../../components/molecules/select-field';
4
- import type { SelectItemProps } from '../../../lib/types';
5
- import type { ClassValue } from 'clsx';
6
- type SelectFieldRest = Omit<React.ComponentProps<typeof SelectField>, 'value' | 'onChange' | 'hasFormControlWrapper' | 'label' | 'labelClassName'>;
7
- type FormSelectProps<TFieldValues extends FieldValues = FieldValues> = {
8
- name: Path<TFieldValues>;
9
- label: string;
10
- options: SelectItemProps[];
11
- placeholder: string;
12
- control?: Control<TFieldValues>;
13
- description?: string;
14
- tooltipContent?: string;
15
- hasRequiredIndicator?: boolean;
16
- containerClassName?: ClassValue;
17
- } & SelectFieldRest;
18
- export declare const FormSelect: <TFieldValues extends FieldValues = FieldValues>({ name, label, options, placeholder, description, tooltipContent, hasRequiredIndicator, containerClassName, control, ...selectFieldProps }: FormSelectProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
19
- export {};
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
3
- import { Slider } from '../../../components/atoms/slider';
4
- type FormSliderProps<TFieldValues extends FieldValues = FieldValues> = {
5
- name: Path<TFieldValues>;
6
- control?: Control<TFieldValues>;
7
- label?: string;
8
- description?: string;
9
- min?: number;
10
- max?: number;
11
- step?: number;
12
- leftLabel?: string;
13
- rightLabel?: string;
14
- showLabels?: boolean;
15
- complementaryField?: Path<TFieldValues>;
16
- onValueChange?: (value: number) => void;
17
- containerClassName?: string;
18
- labelClassName?: string;
19
- showErrorPlaceholder?: boolean;
20
- tooltipContent?: string;
21
- } & Omit<React.ComponentProps<typeof Slider>, 'name' | 'onValueChange'>;
22
- export declare const FormSlider: <TFieldValues extends FieldValues = FieldValues>({ name, control, label, description, min, max, step, leftLabel, rightLabel, showLabels, complementaryField, onValueChange, containerClassName, labelClassName, showErrorPlaceholder, tooltipContent, ...props }: FormSliderProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
23
- export {};
@@ -1,10 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- type Props<TFieldValues extends FieldValues = FieldValues> = {
3
- name: Path<TFieldValues>;
4
- label?: string;
5
- control?: Control<TFieldValues>;
6
- description?: string;
7
- className?: string;
8
- };
9
- export declare const FormSwitch: <TFieldValues extends FieldValues = FieldValues>({ name, label, description, control, className, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,11 +0,0 @@
1
- import { type Control, type FieldValues, type Path } from 'react-hook-form';
2
- type Props<TFieldValues extends FieldValues = FieldValues> = {
3
- label: string;
4
- name: Path<TFieldValues>;
5
- placeholder: string;
6
- control?: Control<TFieldValues>;
7
- description?: string;
8
- containerClassName?: string;
9
- };
10
- export declare const FormTextarea: <TFieldValues extends FieldValues = FieldValues>({ label, name, description, placeholder, containerClassName, control, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,22 +0,0 @@
1
- /**
2
- * TimePicker component for selecting time values in forms.
3
- *
4
- * @component
5
- * @param {Object} props - The component props.
6
- * @param {string} props.name - The name of the input field for form registration.
7
- * @param {string} [props.label] - The label message ID for internationalization.
8
- * @param {string} [props.description] - The description message ID for internationalization.
9
- * @param {string} [props.containerClassName] - Additional CSS classes for the container.
10
- * @param {number} [props.step=60] - The step interval in seconds for the time input.
11
- * @returns {JSX.Element} The rendered TimePicker component.
12
- */
13
- type FormTimePickerProps = {
14
- name: string;
15
- label?: string;
16
- description?: string;
17
- containerClassName?: string;
18
- showErrorPlaceholder?: boolean;
19
- step?: number;
20
- };
21
- export declare const FormTimePicker: ({ name, label, description, containerClassName, showErrorPlaceholder, step, }: FormTimePickerProps) => import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,25 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import { type Locale } from 'date-fns';
3
- import { type LucideIcon } from 'lucide-react';
4
- export interface IconConfig {
5
- icon: LucideIcon;
6
- bg?: string;
7
- text?: string;
8
- }
9
- export interface TimelineItem {
10
- iconConfig: IconConfig;
11
- title: string;
12
- description: string;
13
- timestamp: number;
14
- tags?: string[];
15
- topRightSlot?: ReactNode;
16
- bottomRightSlot?: ReactNode;
17
- }
18
- export interface TimelineProps {
19
- items: TimelineItem[];
20
- header?: ReactNode;
21
- className?: string;
22
- onItemClick?: (item: TimelineItem, index: number) => void;
23
- dateLocale?: Locale;
24
- }
25
- export declare const Timeline: ({ items, header, className, onItemClick, dateLocale }: TimelineProps) => import("react/jsx-runtime").JSX.Element;