@segmentify/ui 0.0.58 → 0.0.60

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 (141) hide show
  1. package/dist/components/atoms/calendar.d.ts +1 -1
  2. package/dist/components/atoms/chart.d.ts +1 -1
  3. package/dist/components/atoms/form.d.ts +1 -1
  4. package/dist/components/atoms/quill-editor.d.ts +1 -1
  5. package/dist/components/molecules/async-combobox.d.ts +1 -1
  6. package/dist/components/molecules/base-button.d.ts +1 -1
  7. package/dist/components/molecules/date-range-picker.d.ts +1 -1
  8. package/dist/components/molecules/form-phone-input.d.ts +1 -1
  9. package/dist/components/molecules/recommendation-card/components/selected-algorithms.d.ts +1 -1
  10. package/dist/components/molecules/select-multi-field.d.ts +1 -1
  11. package/dist/components/molecules/textarea-field.d.ts +1 -1
  12. package/dist/components/organisms/data-table/index.d.ts +3 -3
  13. package/dist/components/organisms/form-select.d.ts +1 -1
  14. package/dist/components/organisms/timeline.d.ts +1 -1
  15. package/dist/hooks/use-data-table.d.ts +1 -1
  16. package/dist/mock/columns.d.ts +1 -1
  17. package/dist/segmentify-ui.cjs +169 -186
  18. package/dist/segmentify-ui.js +37640 -36533
  19. package/dist/src/app.d.ts +14 -0
  20. package/dist/src/components/atoms/accordion.d.ts +9 -0
  21. package/dist/src/components/atoms/alert-dialog.d.ts +18 -0
  22. package/dist/src/components/atoms/aspect-ratio.d.ts +3 -0
  23. package/dist/src/components/atoms/avatar.d.ts +6 -0
  24. package/dist/src/components/atoms/badge.d.ts +7 -0
  25. package/dist/src/components/atoms/breadcrumb.d.ts +11 -0
  26. package/dist/src/components/atoms/button.d.ts +10 -0
  27. package/dist/src/components/atoms/calendar.d.ts +8 -0
  28. package/dist/src/components/atoms/card.d.ts +9 -0
  29. package/dist/src/components/atoms/carousel.d.ts +19 -0
  30. package/dist/src/components/atoms/chart.d.ts +40 -0
  31. package/dist/src/components/atoms/checkbox.d.ts +4 -0
  32. package/dist/src/components/atoms/collapsible.d.ts +5 -0
  33. package/dist/src/components/atoms/combobox.d.ts +24 -0
  34. package/dist/src/components/atoms/command.d.ts +20 -0
  35. package/dist/src/components/atoms/component-switch.d.ts +19 -0
  36. package/dist/src/components/atoms/content-wrapper.d.ts +11 -0
  37. package/dist/src/components/atoms/date.d.ts +4 -0
  38. package/dist/src/components/atoms/dialog.d.ts +16 -0
  39. package/dist/src/components/atoms/drawer.d.ts +13 -0
  40. package/dist/src/components/atoms/dropdown-menu.d.ts +25 -0
  41. package/dist/src/components/atoms/empty.d.ts +11 -0
  42. package/dist/src/components/atoms/error-message.d.ts +6 -0
  43. package/dist/src/components/atoms/field-description.d.ts +6 -0
  44. package/dist/src/components/atoms/form.d.ts +17 -0
  45. package/dist/src/components/atoms/hover-card.d.ts +6 -0
  46. package/dist/src/components/atoms/icon.d.ts +6 -0
  47. package/dist/src/components/atoms/input-group.d.ts +16 -0
  48. package/dist/src/components/atoms/input-otp.d.ts +20 -0
  49. package/dist/src/components/atoms/input.d.ts +3 -0
  50. package/dist/src/components/atoms/kbd.d.ts +3 -0
  51. package/dist/src/components/atoms/label.d.ts +9 -0
  52. package/dist/src/components/atoms/native-select.d.ts +7 -0
  53. package/dist/src/components/atoms/pagination.d.ts +13 -0
  54. package/dist/src/components/atoms/phone-input.d.ts +7 -0
  55. package/dist/src/components/atoms/phone-preview.d.ts +5 -0
  56. package/dist/src/components/atoms/popover.d.ts +7 -0
  57. package/dist/src/components/atoms/quill-editor.d.ts +11 -0
  58. package/dist/src/components/atoms/radio-group.d.ts +5 -0
  59. package/dist/src/components/atoms/scroll-area.d.ts +5 -0
  60. package/dist/src/components/atoms/select.d.ts +18 -0
  61. package/dist/src/components/atoms/separator.d.ts +4 -0
  62. package/dist/src/components/atoms/sheet.d.ts +13 -0
  63. package/dist/src/components/atoms/sidebar.d.ts +59 -0
  64. package/dist/src/components/atoms/skeleton.d.ts +3 -0
  65. package/dist/src/components/atoms/slider.d.ts +4 -0
  66. package/dist/src/components/atoms/sonner.d.ts +3 -0
  67. package/dist/src/components/atoms/spinner.d.ts +7 -0
  68. package/dist/src/components/atoms/switch.d.ts +4 -0
  69. package/dist/src/components/atoms/table.d.ts +10 -0
  70. package/dist/src/components/atoms/tabs.d.ts +7 -0
  71. package/dist/src/components/atoms/textarea.d.ts +3 -0
  72. package/dist/src/components/atoms/tooltip.d.ts +8 -0
  73. package/dist/src/components/molecules/async-combobox.d.ts +15 -0
  74. package/dist/src/components/molecules/base-button.d.ts +15 -0
  75. package/dist/src/components/molecules/campaign-title.d.ts +9 -0
  76. package/dist/src/components/molecules/checkbox-field.d.ts +10 -0
  77. package/dist/src/components/molecules/combobox-field.d.ts +26 -0
  78. package/dist/src/components/molecules/creatable-action-icons.d.ts +9 -0
  79. package/dist/src/components/molecules/date-range-picker.d.ts +17 -0
  80. package/dist/src/components/molecules/debounced-input.d.ts +19 -0
  81. package/dist/src/components/molecules/detailed-image-modal.d.ts +18 -0
  82. package/dist/src/components/molecules/form-checkbox.d.ts +9 -0
  83. package/dist/src/components/molecules/form-phone-input.d.ts +14 -0
  84. package/dist/src/components/molecules/input-field.d.ts +15 -0
  85. package/dist/src/components/molecules/messaging-phone.d.ts +2 -0
  86. package/dist/src/components/molecules/messaging-preview.d.ts +5 -0
  87. package/dist/src/components/molecules/mobile-preview-message.d.ts +8 -0
  88. package/dist/src/components/molecules/multi-select-dropdown.d.ts +18 -0
  89. package/dist/src/components/molecules/preview-carousel.d.ts +2 -0
  90. package/dist/src/components/molecules/preview-rich-media.d.ts +5 -0
  91. package/dist/src/components/molecules/recommendation-card/components/recommendation-filters-button.d.ts +9 -0
  92. package/dist/src/components/molecules/recommendation-card/components/selected-algorithms.d.ts +12 -0
  93. package/dist/src/components/molecules/recommendation-card/index.d.ts +2 -0
  94. package/dist/src/components/molecules/recommendation-card/types/index.d.ts +82 -0
  95. package/dist/src/components/molecules/select-field.d.ts +18 -0
  96. package/dist/src/components/molecules/select-multi-field.d.ts +20 -0
  97. package/dist/src/components/molecules/switch-field.d.ts +7 -0
  98. package/dist/src/components/molecules/textarea-field.d.ts +11 -0
  99. package/dist/src/components/molecules/tooltip-field.d.ts +13 -0
  100. package/dist/src/components/organisms/data-table/actions.d.ts +12 -0
  101. package/dist/src/components/organisms/data-table/column-visibility.d.ts +6 -0
  102. package/dist/src/components/organisms/data-table/content.d.ts +18 -0
  103. package/dist/src/components/organisms/data-table/context.d.ts +10 -0
  104. package/dist/src/components/organisms/data-table/index.d.ts +17 -0
  105. package/dist/src/components/organisms/data-table/pagination.d.ts +10 -0
  106. package/dist/src/components/organisms/data-table/root.d.ts +13 -0
  107. package/dist/src/components/organisms/data-table/search.d.ts +8 -0
  108. package/dist/src/components/organisms/data-table/toolbar.d.ts +7 -0
  109. package/dist/src/components/organisms/date-preset/context.d.ts +8 -0
  110. package/dist/src/components/organisms/date-preset/date-preset.d.ts +11 -0
  111. package/dist/src/components/organisms/date-preset/index.d.ts +8 -0
  112. package/dist/src/components/organisms/date-preset/presets.d.ts +21 -0
  113. package/dist/src/components/organisms/date-preset/root.d.ts +9 -0
  114. package/dist/src/components/organisms/form-combobox.d.ts +21 -0
  115. package/dist/src/components/organisms/form-date-picker.d.ts +13 -0
  116. package/dist/src/components/organisms/form-file-upload.d.ts +23 -0
  117. package/dist/src/components/organisms/form-input.d.ts +16 -0
  118. package/dist/src/components/organisms/form-password.d.ts +14 -0
  119. package/dist/src/components/organisms/form-radio.d.ts +15 -0
  120. package/dist/src/components/organisms/form-select.d.ts +19 -0
  121. package/dist/src/components/organisms/form-slider.d.ts +23 -0
  122. package/dist/src/components/organisms/form-switch.d.ts +10 -0
  123. package/dist/src/components/organisms/form-textarea.d.ts +11 -0
  124. package/dist/src/components/organisms/form-time-picker.d.ts +22 -0
  125. package/dist/src/components/organisms/timeline.d.ts +25 -0
  126. package/dist/src/hooks/use-data-table.d.ts +165 -0
  127. package/dist/src/hooks/use-form-field.d.ts +19 -0
  128. package/dist/src/hooks/use-mobile.d.ts +1 -0
  129. package/dist/src/hooks/use-popup-layer.d.ts +10 -0
  130. package/dist/src/hooks/use-sidebar.d.ts +12 -0
  131. package/dist/src/index.d.ts +102 -0
  132. package/dist/src/lib/design-variants.d.ts +13 -0
  133. package/dist/src/lib/types.d.ts +7 -0
  134. package/dist/src/lib/utils.d.ts +31 -0
  135. package/dist/src/main.d.ts +1 -0
  136. package/dist/src/mock/actions.d.ts +6 -0
  137. package/dist/src/mock/columns.d.ts +9 -0
  138. package/dist/src/providers/popup-layer-provider.d.ts +14 -0
  139. package/dist/src/types/messaging.d.ts +34 -0
  140. package/dist/ui.css +1 -1
  141. package/package.json +38 -38
@@ -0,0 +1,17 @@
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
+ };
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,13 @@
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 {};
@@ -0,0 +1,8 @@
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 {};
@@ -0,0 +1,7 @@
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 {};
@@ -0,0 +1,8 @@
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;
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1,8 @@
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';
@@ -0,0 +1,21 @@
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;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1,21 @@
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 {};
@@ -0,0 +1,13 @@
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;
@@ -0,0 +1,23 @@
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 {};
@@ -0,0 +1,16 @@
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 {};
@@ -0,0 +1,14 @@
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 {};
@@ -0,0 +1,15 @@
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 {};
@@ -0,0 +1,19 @@
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 {};
@@ -0,0 +1,23 @@
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 {};
@@ -0,0 +1,10 @@
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 {};
@@ -0,0 +1,11 @@
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 {};
@@ -0,0 +1,22 @@
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 {};
@@ -0,0 +1,25 @@
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;
@@ -0,0 +1,165 @@
1
+ import { type UseQueryOptions } from '@tanstack/react-query';
2
+ import { type ColumnDef, type ColumnFiltersState, type ColumnPinningState, type ExpandedState, type PaginationState, type RowSelectionState, type SortingState, type Table, type VisibilityState } from '@tanstack/react-table';
3
+ export interface FetcherParams {
4
+ pageNo: number;
5
+ pageSize: number;
6
+ sortBy: SortingState;
7
+ reversed: boolean;
8
+ columnFilters: ColumnFiltersState;
9
+ search: string;
10
+ }
11
+ export interface FetcherResponse<TData> {
12
+ data: TData[];
13
+ totalCount?: number;
14
+ }
15
+ export interface UseDataTableOptions<TData> {
16
+ /**
17
+ * Unique key for the query cache
18
+ * @required
19
+ */
20
+ queryKey: string;
21
+ /**
22
+ * Column definitions for the table
23
+ */
24
+ columns: ColumnDef<TData>[];
25
+ /**
26
+ * Fetcher function to load data
27
+ * Receives fetch params and should return data + optional totalCount
28
+ */
29
+ fetcher: (params: FetcherParams) => Promise<FetcherResponse<TData>>;
30
+ /**
31
+ * Initial page size
32
+ * @default 10
33
+ */
34
+ initialPageSize?: number;
35
+ /**
36
+ * Initial sorting state
37
+ */
38
+ initialSorting?: SortingState;
39
+ /**
40
+ * Initial column visibility
41
+ */
42
+ initialColumnVisibility?: VisibilityState;
43
+ /**
44
+ * Initial column pinning state
45
+ * @example { left: ['select'], right: ['actions'] }
46
+ */
47
+ initialColumnPinning?: ColumnPinningState;
48
+ /**
49
+ * Whether pagination is handled manually (server-side)
50
+ * @default false
51
+ */
52
+ manualPagination?: boolean;
53
+ /**
54
+ * Whether sorting is handled manually (server-side)
55
+ * @default false
56
+ */
57
+ manualSorting?: boolean;
58
+ /**
59
+ * Whether filtering is handled manually (server-side)
60
+ * @default false
61
+ */
62
+ manualFiltering?: boolean;
63
+ /**
64
+ * Function to get sub-rows from a row (for expandable rows)
65
+ * @example (row) => row.subRows
66
+ */
67
+ getSubRows?: (row: TData) => TData[] | undefined;
68
+ /**
69
+ * Function to determine if a row can be expanded.
70
+ * Set to `() => true` to allow all rows to expand (useful for lazy-loaded sub-components).
71
+ * @example () => true
72
+ * @example (row) => row.original.hasDetails
73
+ */
74
+ getRowCanExpand?: (row: {
75
+ original: TData;
76
+ }) => boolean;
77
+ /**
78
+ * Additional react-query options
79
+ * Allows customizing staleTime, gcTime, refetchInterval, etc.
80
+ */
81
+ queryOptions?: Omit<UseQueryOptions<FetcherResponse<TData>, Error>, 'queryKey' | 'queryFn'>;
82
+ /**
83
+ * Additional metadata to pass to the table instance (accessible via table.options.meta)
84
+ */
85
+ meta?: Record<string, unknown>;
86
+ }
87
+ export interface UseDataTableReturn<TData> {
88
+ /**
89
+ * The table instance from @tanstack/react-table
90
+ */
91
+ table: Table<TData>;
92
+ /**
93
+ * The current data array
94
+ */
95
+ data: TData[];
96
+ /**
97
+ * Whether the initial data is loading (no data yet)
98
+ */
99
+ isLoading: boolean;
100
+ /**
101
+ * Whether data is being fetched (including background refetches)
102
+ */
103
+ isFetching: boolean;
104
+ /**
105
+ * Whether a refetch is in progress
106
+ */
107
+ isRefetching: boolean;
108
+ /**
109
+ * Error if the fetch failed
110
+ */
111
+ error: Error | null;
112
+ /**
113
+ * Total count of items (for pagination)
114
+ */
115
+ totalCount: number;
116
+ /**
117
+ * Refetch the data
118
+ */
119
+ refetch: () => void;
120
+ /**
121
+ * Current search (global filter) value
122
+ */
123
+ search: string;
124
+ /**
125
+ * Set the search (global filter)
126
+ */
127
+ setSearch: (value: string) => void;
128
+ /**
129
+ * Current sorting state
130
+ */
131
+ sortBy: SortingState;
132
+ /**
133
+ * Current pagination state
134
+ */
135
+ pagination: PaginationState;
136
+ /**
137
+ * Current column filters
138
+ */
139
+ columnFilters: ColumnFiltersState;
140
+ /**
141
+ * Current column visibility
142
+ */
143
+ columnVisibility: VisibilityState;
144
+ /**
145
+ * Current row selection
146
+ */
147
+ rowSelection: RowSelectionState;
148
+ /**
149
+ * Current column pinning state
150
+ */
151
+ columnPinning: ColumnPinningState;
152
+ /**
153
+ * Current expanded state
154
+ */
155
+ expanded: ExpandedState;
156
+ /**
157
+ * Whether the query is in success state
158
+ */
159
+ isSuccess: boolean;
160
+ /**
161
+ * Whether the query is in error state
162
+ */
163
+ isError: boolean;
164
+ }
165
+ export declare function useDataTable<TData>({ queryKey, columns, fetcher, initialPageSize, initialSorting, initialColumnVisibility, initialColumnPinning, manualPagination, manualSorting, manualFiltering, getSubRows, getRowCanExpand, queryOptions, meta, }: UseDataTableOptions<TData>): UseDataTableReturn<TData>;
@@ -0,0 +1,19 @@
1
+ import * as React from 'react';
2
+ import type { FieldError } from 'react-hook-form';
3
+ type FormFieldContextValue = {
4
+ name: string;
5
+ error?: FieldError;
6
+ };
7
+ type FormItemContextValue = {
8
+ id: string;
9
+ };
10
+ export declare const FormFieldContext: React.Context<FormFieldContextValue | null>;
11
+ export declare const FormItemContext: React.Context<FormItemContextValue | null>;
12
+ export declare const useFormField: () => {
13
+ name: string;
14
+ error: FieldError | undefined;
15
+ formItemId: string;
16
+ formDescriptionId: string;
17
+ formMessageId: string;
18
+ };
19
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useIsMobile(): boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Returns the computed z-index of the nearest overlay layer (e.g. Dialog), or
3
+ * `undefined` when rendered outside one. Portaled popup components use this to
4
+ * set their own z-index one level higher so they appear above the overlay.
5
+ *
6
+ * @see {@link PopupLayerContext} for the full rationale.
7
+ */
8
+ export declare const usePopupLayer: () => {
9
+ layer: HTMLDivElement | undefined;
10
+ };
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ export type SidebarContextProps = {
3
+ state: 'expanded' | 'collapsed';
4
+ open: boolean;
5
+ setOpen: (open: boolean) => void;
6
+ openMobile: boolean;
7
+ setOpenMobile: (open: boolean) => void;
8
+ isMobile: boolean;
9
+ toggleSidebar: () => void;
10
+ };
11
+ export declare const SidebarContext: React.Context<SidebarContextProps | null>;
12
+ export declare function useSidebar(): SidebarContextProps;