@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.
- package/dist/components/atoms/autocomplete.d.ts +13 -0
- package/dist/components/atoms/calendar.d.ts +1 -1
- package/dist/components/atoms/chart.d.ts +1 -1
- package/dist/components/atoms/form.d.ts +1 -1
- package/dist/components/atoms/quill-editor.d.ts +1 -1
- package/dist/components/molecules/async-combobox.d.ts +15 -0
- package/dist/components/molecules/autocomplete-field.d.ts +17 -0
- package/dist/components/molecules/base-button.d.ts +1 -1
- package/dist/components/molecules/date-range-picker.d.ts +1 -1
- package/dist/components/molecules/form-phone-input.d.ts +1 -1
- package/dist/components/molecules/recommendation-card/components/selected-algorithms.d.ts +1 -1
- package/dist/components/molecules/select-multi-field.d.ts +1 -1
- package/dist/components/molecules/textarea-field.d.ts +1 -1
- package/dist/components/organisms/data-table/index.d.ts +3 -3
- package/dist/components/organisms/form-select.d.ts +1 -1
- package/dist/components/organisms/timeline.d.ts +1 -1
- package/dist/hooks/use-data-table.d.ts +6 -2
- package/dist/index.d.ts +1 -0
- package/dist/mock/columns.d.ts +1 -1
- package/dist/segmentify-ui.cjs +271 -118
- package/dist/segmentify-ui.js +109517 -57667
- package/dist/src/app.d.ts +14 -0
- package/dist/src/components/atoms/accordion.d.ts +9 -0
- package/dist/src/components/atoms/alert-dialog.d.ts +18 -0
- package/dist/src/components/atoms/aspect-ratio.d.ts +3 -0
- package/dist/src/components/atoms/avatar.d.ts +6 -0
- package/dist/src/components/atoms/badge.d.ts +7 -0
- package/dist/src/components/atoms/breadcrumb.d.ts +11 -0
- package/dist/src/components/atoms/button.d.ts +10 -0
- package/dist/src/components/atoms/calendar.d.ts +8 -0
- package/dist/src/components/atoms/card.d.ts +9 -0
- package/dist/src/components/atoms/carousel.d.ts +19 -0
- package/dist/src/components/atoms/chart.d.ts +40 -0
- package/dist/src/components/atoms/checkbox.d.ts +4 -0
- package/dist/src/components/atoms/collapsible.d.ts +5 -0
- package/dist/src/components/atoms/combobox.d.ts +24 -0
- package/dist/src/components/atoms/command.d.ts +20 -0
- package/dist/src/components/atoms/component-switch.d.ts +19 -0
- package/dist/src/components/atoms/content-wrapper.d.ts +11 -0
- package/dist/src/components/atoms/date.d.ts +4 -0
- package/dist/src/components/atoms/dialog.d.ts +16 -0
- package/dist/src/components/atoms/drawer.d.ts +13 -0
- package/dist/src/components/atoms/dropdown-menu.d.ts +25 -0
- package/dist/src/components/atoms/empty.d.ts +11 -0
- package/dist/src/components/atoms/error-message.d.ts +6 -0
- package/dist/src/components/atoms/field-description.d.ts +6 -0
- package/dist/src/components/atoms/form.d.ts +17 -0
- package/dist/src/components/atoms/hover-card.d.ts +6 -0
- package/dist/src/components/atoms/icon.d.ts +6 -0
- package/dist/src/components/atoms/input-group.d.ts +16 -0
- package/dist/src/components/atoms/input-otp.d.ts +20 -0
- package/dist/src/components/atoms/input.d.ts +3 -0
- package/dist/src/components/atoms/kbd.d.ts +3 -0
- package/dist/src/components/atoms/label.d.ts +9 -0
- package/dist/src/components/atoms/native-select.d.ts +7 -0
- package/dist/src/components/atoms/pagination.d.ts +13 -0
- package/dist/src/components/atoms/phone-input.d.ts +7 -0
- package/dist/src/components/atoms/phone-preview.d.ts +5 -0
- package/dist/src/components/atoms/popover.d.ts +7 -0
- package/dist/src/components/atoms/quill-editor.d.ts +11 -0
- package/dist/src/components/atoms/radio-group.d.ts +5 -0
- package/dist/src/components/atoms/scroll-area.d.ts +5 -0
- package/dist/src/components/atoms/select.d.ts +18 -0
- package/dist/src/components/atoms/separator.d.ts +4 -0
- package/dist/src/components/atoms/sheet.d.ts +13 -0
- package/dist/src/components/atoms/sidebar.d.ts +59 -0
- package/dist/src/components/atoms/skeleton.d.ts +3 -0
- package/dist/src/components/atoms/slider.d.ts +4 -0
- package/dist/src/components/atoms/sonner.d.ts +3 -0
- package/dist/src/components/atoms/spinner.d.ts +7 -0
- package/dist/src/components/atoms/switch.d.ts +4 -0
- package/dist/src/components/atoms/table.d.ts +10 -0
- package/dist/src/components/atoms/tabs.d.ts +7 -0
- package/dist/src/components/atoms/textarea.d.ts +3 -0
- package/dist/src/components/atoms/tooltip.d.ts +8 -0
- package/dist/src/components/molecules/async-combobox.d.ts +15 -0
- package/dist/src/components/molecules/base-button.d.ts +15 -0
- package/dist/src/components/molecules/campaign-title.d.ts +9 -0
- package/dist/src/components/molecules/checkbox-field.d.ts +10 -0
- package/dist/src/components/molecules/combobox-field.d.ts +26 -0
- package/dist/src/components/molecules/creatable-action-icons.d.ts +9 -0
- package/dist/src/components/molecules/date-range-picker.d.ts +17 -0
- package/dist/src/components/molecules/debounced-input.d.ts +19 -0
- package/dist/src/components/molecules/detailed-image-modal.d.ts +18 -0
- package/dist/src/components/molecules/form-checkbox.d.ts +9 -0
- package/dist/src/components/molecules/form-phone-input.d.ts +14 -0
- package/dist/src/components/molecules/input-field.d.ts +15 -0
- package/dist/src/components/molecules/messaging-phone.d.ts +2 -0
- package/dist/src/components/molecules/messaging-preview.d.ts +5 -0
- package/dist/src/components/molecules/mobile-preview-message.d.ts +8 -0
- package/dist/src/components/molecules/multi-select-dropdown.d.ts +18 -0
- package/dist/src/components/molecules/preview-carousel.d.ts +2 -0
- package/dist/src/components/molecules/preview-rich-media.d.ts +5 -0
- package/dist/src/components/molecules/recommendation-card/components/recommendation-filters-button.d.ts +9 -0
- package/dist/src/components/molecules/recommendation-card/components/selected-algorithms.d.ts +12 -0
- package/dist/src/components/molecules/recommendation-card/index.d.ts +2 -0
- package/dist/src/components/molecules/recommendation-card/types/index.d.ts +82 -0
- package/dist/src/components/molecules/select-field.d.ts +18 -0
- package/dist/src/components/molecules/select-multi-field.d.ts +20 -0
- package/dist/src/components/molecules/switch-field.d.ts +7 -0
- package/dist/src/components/molecules/textarea-field.d.ts +11 -0
- package/dist/src/components/molecules/tooltip-field.d.ts +13 -0
- package/dist/src/components/organisms/data-table/actions.d.ts +12 -0
- package/dist/src/components/organisms/data-table/column-visibility.d.ts +6 -0
- package/dist/src/components/organisms/data-table/content.d.ts +18 -0
- package/dist/src/components/organisms/data-table/context.d.ts +10 -0
- package/dist/src/components/organisms/data-table/index.d.ts +17 -0
- package/dist/src/components/organisms/data-table/pagination.d.ts +10 -0
- package/dist/src/components/organisms/data-table/root.d.ts +13 -0
- package/dist/src/components/organisms/data-table/search.d.ts +8 -0
- package/dist/src/components/organisms/data-table/toolbar.d.ts +7 -0
- package/dist/src/components/organisms/date-preset/context.d.ts +8 -0
- package/dist/src/components/organisms/date-preset/date-preset.d.ts +11 -0
- package/dist/src/components/organisms/date-preset/index.d.ts +8 -0
- package/dist/src/components/organisms/date-preset/presets.d.ts +21 -0
- package/dist/src/components/organisms/date-preset/root.d.ts +9 -0
- package/dist/src/components/organisms/form-combobox.d.ts +21 -0
- package/dist/src/components/organisms/form-date-picker.d.ts +13 -0
- package/dist/src/components/organisms/form-file-upload.d.ts +23 -0
- package/dist/src/components/organisms/form-input.d.ts +16 -0
- package/dist/src/components/organisms/form-password.d.ts +14 -0
- package/dist/src/components/organisms/form-radio.d.ts +15 -0
- package/dist/src/components/organisms/form-select.d.ts +19 -0
- package/dist/src/components/organisms/form-slider.d.ts +23 -0
- package/dist/src/components/organisms/form-switch.d.ts +10 -0
- package/dist/src/components/organisms/form-textarea.d.ts +11 -0
- package/dist/src/components/organisms/form-time-picker.d.ts +22 -0
- package/dist/src/components/organisms/timeline.d.ts +25 -0
- package/dist/src/hooks/use-data-table.d.ts +165 -0
- package/dist/src/hooks/use-form-field.d.ts +19 -0
- package/dist/src/hooks/use-mobile.d.ts +1 -0
- package/dist/src/hooks/use-popup-layer.d.ts +10 -0
- package/dist/src/hooks/use-sidebar.d.ts +12 -0
- package/dist/src/index.d.ts +102 -0
- package/dist/src/lib/design-variants.d.ts +13 -0
- package/dist/src/lib/types.d.ts +7 -0
- package/dist/src/lib/utils.d.ts +31 -0
- package/dist/src/main.d.ts +1 -0
- package/dist/src/mock/actions.d.ts +6 -0
- package/dist/src/mock/columns.d.ts +9 -0
- package/dist/src/providers/popup-layer-provider.d.ts +14 -0
- package/dist/src/types/messaging.d.ts +34 -0
- package/dist/ui.css +1 -1
- package/package.json +42 -41
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Autocomplete as AutocompletePrimitive } from '@base-ui/react';
|
|
2
|
+
declare const Autocomplete: typeof AutocompletePrimitive.Root;
|
|
3
|
+
declare function AutocompleteValue({ ...props }: AutocompletePrimitive.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AutocompleteTrigger({ className, children, ...props }: AutocompletePrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AutocompleteInput({ className, children, disabled, showTrigger, showClear, ...props }: AutocompletePrimitive.Input.Props & {
|
|
6
|
+
showTrigger?: boolean;
|
|
7
|
+
showClear?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AutocompleteContent({ className, side, sideOffset, align, alignOffset, ...props }: AutocompletePrimitive.Popup.Props & Pick<AutocompletePrimitive.Positioner.Props, 'side' | 'align' | 'sideOffset' | 'alignOffset'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AutocompleteList({ className, ...props }: AutocompletePrimitive.List.Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function AutocompleteItem({ className, children, ...props }: AutocompletePrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function AutocompleteEmpty({ className, ...props }: AutocompletePrimitive.Empty.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Autocomplete, AutocompleteInput, AutocompleteContent, AutocompleteList, AutocompleteItem, AutocompleteEmpty, AutocompleteTrigger, AutocompleteValue, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { type DayButton, DayPicker } from 'react-day-picker';
|
|
3
3
|
import { Button } from './button';
|
|
4
4
|
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
5
|
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
@@ -32,7 +32,7 @@ declare function ChartTooltipContent({ active, payload, className, indicator, hi
|
|
|
32
32
|
nameKey?: string;
|
|
33
33
|
labelKey?: string;
|
|
34
34
|
}): import("react/jsx-runtime").JSX.Element | null;
|
|
35
|
-
declare const ChartLegend:
|
|
35
|
+
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
36
36
|
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & Pick<RechartsPrimitive.LegendProps, 'payload' | 'verticalAlign'> & {
|
|
37
37
|
hideIcon?: boolean;
|
|
38
38
|
nameKey?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import type * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
2
|
import { Slot } from '@radix-ui/react-slot';
|
|
4
3
|
import { type ControllerProps, type FieldPath, type FieldValues } from 'react-hook-form';
|
|
4
|
+
import type * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
5
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(props: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare function FormItem({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
type FormLabelProps = React.ComponentProps<typeof LabelPrimitive.Root> & {
|
|
@@ -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,17 @@
|
|
|
1
|
+
export type AutocompleteFieldItem = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
type Props = {
|
|
6
|
+
items: AutocompleteFieldItem[];
|
|
7
|
+
value: string;
|
|
8
|
+
onValueChange: (value: string) => void;
|
|
9
|
+
label?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
onInputChange?: (value: string) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare const AutocompleteField: ({ items, label, disabled, placeholder, containerClassName, emptyMessage, onInputChange, value, onValueChange, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { buttonVariants } from '../../lib/design-variants';
|
|
3
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { buttonVariants } from '../../lib/design-variants';
|
|
4
4
|
declare const BaseButton: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "children"> & {
|
|
5
5
|
size?: VariantProps<typeof buttonVariants>["size"];
|
|
6
6
|
variant?: VariantProps<typeof buttonVariants>["variant"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PhoneInput } from '../../components/atoms/phone-input';
|
|
3
2
|
import flags from 'react-phone-number-input/flags';
|
|
3
|
+
import { PhoneInput } from '../../components/atoms/phone-input';
|
|
4
4
|
export type FormPhoneInputProps = {
|
|
5
5
|
label: string;
|
|
6
6
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import {
|
|
3
|
+
import { RecommendationCardConfig, SharedAlgorithmProps } from '../types';
|
|
4
4
|
interface SelectedAlgorithmsProps<TFieldValues extends FieldValues = FieldValues> extends SharedAlgorithmProps<TFieldValues> {
|
|
5
5
|
update: (index: number, value: unknown) => void;
|
|
6
6
|
swap: (index1: number, index2: number) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ActionMeta, type
|
|
1
|
+
import { type ActionMeta, type InputActionMeta, type MultiValue, type SingleValue } from 'react-select';
|
|
2
2
|
import { SelectItemProps } from '../../lib/types';
|
|
3
3
|
type SelectFieldProps = {
|
|
4
4
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Textarea } from '../../components/atoms/textarea';
|
|
3
2
|
import { type ClassValue } from 'clsx';
|
|
3
|
+
import { Textarea } from '../../components/atoms/textarea';
|
|
4
4
|
interface Props extends React.ComponentProps<typeof Textarea> {
|
|
5
5
|
textAreaClassName?: ClassValue;
|
|
6
6
|
value: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Root } from './root';
|
|
2
|
-
import { Toolbar } from './toolbar';
|
|
3
|
-
import { Search } from './search';
|
|
4
1
|
import { ColumnVisibility } from './column-visibility';
|
|
5
2
|
import { Content } from './content';
|
|
3
|
+
import { Root } from './root';
|
|
4
|
+
import { Search } from './search';
|
|
5
|
+
import { Toolbar } from './toolbar';
|
|
6
6
|
export type { ActionItem, ActionsProps } from './actions';
|
|
7
7
|
export type { RenderRowSubComponentProps } from './content';
|
|
8
8
|
export { type ColumnDef, type Column } from '@tanstack/react-table';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ClassValue } from 'clsx';
|
|
3
2
|
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
4
3
|
import { SelectField } from '../../components/molecules/select-field';
|
|
5
4
|
import type { SelectItemProps } from '../../lib/types';
|
|
5
|
+
import type { ClassValue } from 'clsx';
|
|
6
6
|
type SelectFieldRest = Omit<React.ComponentProps<typeof SelectField>, 'value' | 'onChange' | 'hasFormControlWrapper' | 'label' | 'labelClassName'>;
|
|
7
7
|
type FormSelectProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
8
8
|
name: Path<TFieldValues>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ColumnDef, type ColumnFiltersState, type SortingState, type VisibilityState, type PaginationState, type RowSelectionState, type ColumnPinningState, type ExpandedState, type Table } from '@tanstack/react-table';
|
|
2
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
3
|
export interface FetcherParams {
|
|
4
4
|
pageNo: number;
|
|
5
5
|
pageSize: number;
|
|
@@ -79,6 +79,10 @@ export interface UseDataTableOptions<TData> {
|
|
|
79
79
|
* Allows customizing staleTime, gcTime, refetchInterval, etc.
|
|
80
80
|
*/
|
|
81
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>;
|
|
82
86
|
}
|
|
83
87
|
export interface UseDataTableReturn<TData> {
|
|
84
88
|
/**
|
|
@@ -158,4 +162,4 @@ export interface UseDataTableReturn<TData> {
|
|
|
158
162
|
*/
|
|
159
163
|
isError: boolean;
|
|
160
164
|
}
|
|
161
|
-
export declare function useDataTable<TData>({ queryKey, columns, fetcher, initialPageSize, initialSorting, initialColumnVisibility, initialColumnPinning, manualPagination, manualSorting, manualFiltering, getSubRows, getRowCanExpand, queryOptions, }: UseDataTableOptions<TData>): UseDataTableReturn<TData>;
|
|
165
|
+
export declare function useDataTable<TData>({ queryKey, columns, fetcher, initialPageSize, initialSorting, initialColumnVisibility, initialColumnPinning, manualPagination, manualSorting, manualFiltering, getSubRows, getRowCanExpand, queryOptions, meta, }: UseDataTableOptions<TData>): UseDataTableReturn<TData>;
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { ContentWrapper } from './components/atoms/content-wrapper';
|
|
|
19
19
|
export { CreatableActionIcons } from './components/molecules/creatable-action-icons';
|
|
20
20
|
export { CheckboxField } from './components/molecules/checkbox-field';
|
|
21
21
|
export { ComboboxField, type ComboboxFieldItem, type ComboboxFieldInputMode, } from './components/molecules/combobox-field';
|
|
22
|
+
export { AsyncCombobox, type AsyncComboboxItem } from './components/molecules/async-combobox';
|
|
22
23
|
export { FormattedDate } from './components/atoms/date';
|
|
23
24
|
export { DateRangePicker } from './components/molecules/date-range-picker';
|
|
24
25
|
export { DebouncedInput } from './components/molecules/debounced-input';
|
package/dist/mock/columns.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import { ColumnDef } from '@tanstack/react-table';
|
|
2
3
|
import { Product } from '../app';
|
|
3
|
-
import { type ReactNode } from 'react';
|
|
4
4
|
export type ColumnDefWithSubCell<TData> = ColumnDef<TData> & {
|
|
5
5
|
meta?: {
|
|
6
6
|
subCell?: (data: TData) => ReactNode;
|