@segmentify/ui 0.0.29 → 0.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/atoms/alert-dialog.d.ts +18 -0
- package/dist/components/atoms/combobox.d.ts +24 -0
- package/dist/components/atoms/input-group.d.ts +16 -0
- package/dist/components/molecules/combobox-field.d.ts +19 -24
- package/dist/components/molecules/date-range-picker.d.ts +3 -1
- package/dist/components/organisms/data-table/column-visibility.d.ts +1 -2
- package/dist/components/organisms/data-table/index.d.ts +1 -1
- package/dist/components/organisms/data-table/pagination.d.ts +5 -1
- package/dist/components/organisms/date-preset/date-preset.d.ts +3 -1
- package/dist/components/organisms/form-combobox.d.ts +9 -14
- package/dist/components/organisms/form-file-upload.d.ts +3 -1
- package/dist/components/organisms/timeline.d.ts +25 -0
- package/dist/index.d.ts +12 -5
- package/dist/lib/design-variants.d.ts +1 -1
- package/dist/lib/utils.d.ts +27 -1
- package/dist/segmentify-ui.cjs +97 -72
- package/dist/segmentify-ui.js +31292 -24445
- package/dist/ui.css +777 -22
- package/package.json +3 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from 'radix-ui';
|
|
3
|
+
import { Button } from '../../components/atoms/button';
|
|
4
|
+
declare function AlertDialog({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AlertDialogTrigger({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AlertDialogPortal({ ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AlertDialogContent({ className, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content> & {
|
|
9
|
+
size?: 'default' | 'sm';
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function AlertDialogMedia({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function AlertDialogAction({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function AlertDialogCancel({ className, variant, size, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & Pick<React.ComponentProps<typeof Button>, 'variant' | 'size'>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from '@base-ui/react';
|
|
3
|
+
declare const Combobox: typeof ComboboxPrimitive.Root;
|
|
4
|
+
declare function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ComboboxTrigger({ className, children, ...props }: ComboboxPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ComboboxInput({ className, children, disabled, showTrigger, showClear, ...props }: ComboboxPrimitive.Input.Props & {
|
|
7
|
+
showTrigger?: boolean;
|
|
8
|
+
showClear?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function ComboboxContent({ className, side, sideOffset, align, alignOffset, anchor, ...props }: ComboboxPrimitive.Popup.Props & Pick<ComboboxPrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset' | 'anchor'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function ComboboxLabel({ className, ...props }: ComboboxPrimitive.GroupLabel.Props): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function ComboboxSeparator({ className, ...props }: ComboboxPrimitive.Separator.Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function ComboboxChips({ className, ...props }: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> & ComboboxPrimitive.Chips.Props): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function ComboboxChip({ className, children, showRemove, ...props }: ComboboxPrimitive.Chip.Props & {
|
|
20
|
+
showRemove?: boolean;
|
|
21
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function ComboboxChipsInput({ className, ...props }: ComboboxPrimitive.Input.Props): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function useComboboxAnchor(): React.RefObject<HTMLDivElement | null>;
|
|
24
|
+
export { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem, ComboboxGroup, ComboboxLabel, ComboboxCollection, ComboboxEmpty, ComboboxSeparator, ComboboxChips, ComboboxChip, ComboboxChipsInput, ComboboxTrigger, ComboboxValue, useComboboxAnchor, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { Button } from '../../components/atoms/button';
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<'div'> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "xs" | "sm" | "icon-sm" | "icon-xs" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, 'size'> & VariantProps<typeof inputGroupButtonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<'input'>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<'textarea'>): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea };
|
|
@@ -1,31 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
trigger?: never;
|
|
7
|
-
triggerPlaceholder: string;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ComboboxFieldItem = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
8
6
|
};
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
contentClassName?: string;
|
|
15
|
-
inputPlaceholder: string;
|
|
16
|
-
emptyMessage: string;
|
|
17
|
-
containerClassName?: string;
|
|
18
|
-
contentListClassName?: string;
|
|
19
|
-
closeOnSelect?: boolean;
|
|
20
|
-
align?: 'start' | 'center' | 'end';
|
|
7
|
+
export type ComboboxFieldInputMode = 'input' | 'popup';
|
|
8
|
+
type Props = {
|
|
9
|
+
items: ComboboxFieldItem[];
|
|
10
|
+
value: ComboboxFieldItem[];
|
|
11
|
+
onValueChange: (values: ComboboxFieldItem[]) => void;
|
|
21
12
|
label?: string;
|
|
22
|
-
onInputChange?: (inputValue: string) => void;
|
|
23
|
-
clearable?: boolean;
|
|
24
13
|
multiple?: boolean;
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
hasClearButton?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
containerClassName?: string;
|
|
18
|
+
emptyMessage?: string;
|
|
27
19
|
hasAllOption?: boolean;
|
|
28
20
|
allOptionLabel?: string;
|
|
21
|
+
inputMode?: ComboboxFieldInputMode;
|
|
22
|
+
renderPopupTrigger?: (valueElement: React.ReactNode, selectedValues: ComboboxFieldItem[]) => React.ReactElement;
|
|
23
|
+
onInputChange?: (value: string) => void;
|
|
29
24
|
};
|
|
30
|
-
export declare const ComboboxField: ({
|
|
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;
|
|
31
26
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Locale } from 'date-fns';
|
|
1
2
|
import { type DateRange } from 'react-day-picker';
|
|
2
3
|
import { type ClassValue } from 'clsx';
|
|
3
4
|
type Props = {
|
|
@@ -10,6 +11,7 @@ type Props = {
|
|
|
10
11
|
className?: ClassValue;
|
|
11
12
|
confirmLabel?: string;
|
|
12
13
|
disabledCondition?: boolean | ((date: Date) => boolean);
|
|
14
|
+
dateLocale?: Locale;
|
|
13
15
|
};
|
|
14
|
-
export declare const DateRangePicker: ({ start, end, onConfirm, className, triggerButtonClassName, label, placeholder, confirmLabel, disabledCondition, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const DateRangePicker: ({ start, end, onConfirm, className, triggerButtonClassName, label, placeholder, confirmLabel, disabledCondition, dateLocale, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
interface ColumnVisibilityProps {
|
|
2
|
-
inputPlaceholder?: string;
|
|
3
2
|
emptyMessage?: string;
|
|
4
3
|
allOptionLabel?: string;
|
|
5
4
|
}
|
|
6
|
-
export declare function ColumnVisibility({
|
|
5
|
+
export declare function ColumnVisibility({ emptyMessage, allOptionLabel, }: ColumnVisibilityProps): import("react/jsx-runtime").JSX.Element;
|
|
7
6
|
export {};
|
|
@@ -11,6 +11,6 @@ export declare const DataTable: {
|
|
|
11
11
|
Search: typeof Search;
|
|
12
12
|
ColumnVisibility: typeof ColumnVisibility;
|
|
13
13
|
Content: typeof Content;
|
|
14
|
-
Pagination: ({ showSelectedCount, showPaginationInfo, className }: import("./pagination").PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
Pagination: ({ showSelectedCount, showPaginationInfo, className, showPerPageLabel, selectPlaceholder, selectedCountText, paginationInfoText, }: import("./pagination").PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
Actions: ({ actions }: import("./actions").ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
16
16
|
};
|
|
@@ -2,5 +2,9 @@ export interface PaginationProps {
|
|
|
2
2
|
showSelectedCount?: boolean;
|
|
3
3
|
showPaginationInfo?: boolean;
|
|
4
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;
|
|
5
9
|
}
|
|
6
|
-
export declare const Pagination: ({ showSelectedCount, showPaginationInfo, className }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare const Pagination: ({ showSelectedCount, showPaginationInfo, className, showPerPageLabel, selectPlaceholder, selectedCountText, paginationInfoText, }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Locale } from 'date-fns';
|
|
1
2
|
import { type DatePresetItem } from './presets';
|
|
2
3
|
export interface DatePresetProps {
|
|
3
4
|
presets?: Record<string, DatePresetItem>;
|
|
@@ -5,5 +6,6 @@ export interface DatePresetProps {
|
|
|
5
6
|
confirmLabel?: string;
|
|
6
7
|
placeholder?: string;
|
|
7
8
|
disabledCondition?: boolean | ((date: Date) => boolean);
|
|
9
|
+
dateLocale?: Locale;
|
|
8
10
|
}
|
|
9
|
-
export declare function DatePreset({ presets, className, confirmLabel, placeholder, disabledCondition, }: DatePresetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function DatePreset({ presets, className, confirmLabel, placeholder, disabledCondition, dateLocale, }: DatePresetProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
2
|
-
import type
|
|
2
|
+
import { type ComboboxFieldItem } from '../../components/molecules/combobox-field';
|
|
3
3
|
type FormComboboxProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
4
4
|
name: Path<TFieldValues>;
|
|
5
|
-
label
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
options: SelectItemProps[];
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
items: ComboboxFieldItem[];
|
|
9
8
|
description?: string;
|
|
10
9
|
multiple?: boolean;
|
|
11
|
-
emptyMessage
|
|
10
|
+
emptyMessage?: string;
|
|
12
11
|
containerClassName?: string;
|
|
13
|
-
|
|
14
|
-
contentListClassName?: string;
|
|
15
|
-
avoidCollisions?: boolean;
|
|
16
|
-
clearable?: boolean;
|
|
12
|
+
hasClearButton?: boolean;
|
|
17
13
|
hasAllOption?: boolean;
|
|
18
14
|
allOptionLabel?: string;
|
|
19
|
-
|
|
20
|
-
onInputChange?: (inputValue: string) => void;
|
|
21
|
-
isDisabled?: boolean;
|
|
15
|
+
disabled?: boolean;
|
|
22
16
|
tooltipContent?: string;
|
|
23
17
|
control?: Control<TFieldValues>;
|
|
18
|
+
inputMode?: 'input' | 'popup';
|
|
24
19
|
};
|
|
25
|
-
export declare const FormCombobox: <TFieldValues extends FieldValues = FieldValues>({ name, label,
|
|
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;
|
|
26
21
|
export {};
|
|
@@ -5,6 +5,8 @@ type FormFileUploadProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
|
5
5
|
control?: Control<TFieldValues>;
|
|
6
6
|
label?: string;
|
|
7
7
|
uploadButtonLabel?: string;
|
|
8
|
+
uploadingLabel?: string;
|
|
9
|
+
uploadFailedMessage?: string;
|
|
8
10
|
description?: string;
|
|
9
11
|
accept?: string;
|
|
10
12
|
disabled?: boolean;
|
|
@@ -15,7 +17,7 @@ type FormFileUploadProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
|
15
17
|
onUpload?: (file: File) => Promise<string>;
|
|
16
18
|
};
|
|
17
19
|
export declare const FormFileUpload: {
|
|
18
|
-
<TFieldValues extends FieldValues = FieldValues>({ name, control, label, uploadButtonLabel, description, accept, disabled, multiple, containerClassName, tooltipContent, hasRequiredIndicator, onUpload, }: FormFileUploadProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
|
|
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;
|
|
19
21
|
displayName: string;
|
|
20
22
|
};
|
|
21
23
|
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Locale } from 'date-fns';
|
|
2
|
+
import { type LucideIcon } from 'lucide-react';
|
|
3
|
+
import { type ReactNode } from '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;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './components/atoms/accordion';
|
|
2
|
+
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './components/atoms/alert-dialog';
|
|
2
3
|
export { AspectRatio } from './components/atoms/aspect-ratio';
|
|
3
4
|
export { Avatar, AvatarFallback, AvatarImage } from './components/atoms/avatar';
|
|
4
5
|
export { Badge } from './components/atoms/badge';
|
|
@@ -17,7 +18,6 @@ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, Comman
|
|
|
17
18
|
export { ContentWrapper } from './components/atoms/content-wrapper';
|
|
18
19
|
export { CreatableActionIcons } from './components/molecules/creatable-action-icons';
|
|
19
20
|
export { CheckboxField } from './components/molecules/checkbox-field';
|
|
20
|
-
export { ConfirmationDialog } from './components/molecules/confirmation-dialog';
|
|
21
21
|
export { ComboboxField } from './components/molecules/combobox-field';
|
|
22
22
|
export { FormattedDate } from './components/atoms/date';
|
|
23
23
|
export { DateRangePicker } from './components/molecules/date-range-picker';
|
|
@@ -69,12 +69,19 @@ export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/atoms/tab
|
|
|
69
69
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './components/atoms/table';
|
|
70
70
|
export { Textarea } from './components/atoms/textarea';
|
|
71
71
|
export { TextAreaField } from './components/molecules/textarea-field';
|
|
72
|
+
export { Timeline, type IconConfig, type TimelineItem, type TimelineProps } from './components/organisms/timeline';
|
|
72
73
|
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './components/atoms/tooltip';
|
|
73
74
|
export { TooltipField } from './components/molecules/tooltip-field';
|
|
74
75
|
export { QuillEditor } from './components/atoms/quill-editor';
|
|
75
|
-
export {
|
|
76
|
-
export {
|
|
77
|
-
export {
|
|
78
|
-
export {
|
|
76
|
+
export { DataTable } from './components/organisms/data-table';
|
|
77
|
+
export type { ActionItem, ActionsProps, RenderRowSubComponentProps } from './components/organisms/data-table';
|
|
78
|
+
export { DatePreset } from './components/organisms/date-preset/date-preset';
|
|
79
|
+
export { DatePresetProvider } from './components/organisms/date-preset/root';
|
|
80
|
+
export { useDatePreset } from './components/organisms/date-preset/context';
|
|
81
|
+
export { DATE_PRESETS, DEFAULT_PRESET_KEY, findMatchingPreset } from './components/organisms/date-preset/presets';
|
|
82
|
+
export type { DateRange, DatePresetItem } from './components/organisms/date-preset/presets';
|
|
83
|
+
export type { DatePresetProps } from './components/organisms/date-preset/date-preset';
|
|
84
|
+
export type { DatePresetProviderProps } from './components/organisms/date-preset/root';
|
|
85
|
+
export type { DatePresetContextValue } from './components/organisms/date-preset/context';
|
|
79
86
|
export { useDataTable, type UseDataTableOptions, type UseDataTableReturn, type FetcherParams, type FetcherResponse, } from './hooks/use-data-table';
|
|
80
87
|
export { cn } from './lib/utils';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const buttonVariants: (props?: ({
|
|
2
2
|
variant?: "link" | "primary" | "secondary" | "tertiary" | "success" | "destructive" | "outline" | "ghost" | "action" | "paginationActive" | "paginationInactive" | null | undefined;
|
|
3
|
-
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
3
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
4
4
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
5
5
|
export declare const labelVariants: (props?: ({
|
|
6
6
|
variant?: "default" | null | undefined;
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
1
1
|
import { type ClassValue } from 'clsx';
|
|
2
|
+
import { type FormatOptions } from 'date-fns';
|
|
2
3
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Formats a Date object into a localized string using date-fns.
|
|
6
|
+
* Falls back to formatting the current date if the provided date is invalid.
|
|
7
|
+
*
|
|
8
|
+
* @param date - The Date object to format.
|
|
9
|
+
* @param desiredFormat - A date-fns format string. Default: `'MMM d, yyyy h:mmaaa'`
|
|
10
|
+
* @param options - date-fns `FormatOptions` for locale, week start day, etc.
|
|
11
|
+
* @returns The formatted date string.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Default English format
|
|
15
|
+
* formatDate(new Date('2026-02-05T15:30:00'));
|
|
16
|
+
* // => "Feb 5, 2026 3:30pm"
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* // Turkish locale
|
|
20
|
+
* import { tr } from 'date-fns/locale';
|
|
21
|
+
* formatDate(new Date('2026-02-05T15:30:00'), undefined, { locale: tr });
|
|
22
|
+
* // => "Şub 5, 2026 3:30öö"
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* // Custom format
|
|
26
|
+
* formatDate(new Date('2026-02-05'), 'dd/MM/yyyy');
|
|
27
|
+
* // => "05/02/2026"
|
|
28
|
+
*/
|
|
29
|
+
export declare const formatDate: (date: Date, desiredFormat?: string, options?: FormatOptions) => string;
|