@segmentify/ui 0.0.61 → 0.0.63

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 (34) hide show
  1. package/dist/components/atoms/autocomplete.d.ts +13 -0
  2. package/dist/components/atoms/calendar.d.ts +1 -1
  3. package/dist/components/atoms/chart.d.ts +1 -1
  4. package/dist/components/atoms/form.d.ts +1 -1
  5. package/dist/components/atoms/iphone-15.d.ts +2 -0
  6. package/dist/components/atoms/preview-single-button.d.ts +6 -0
  7. package/dist/components/atoms/quill-editor.d.ts +1 -1
  8. package/dist/components/molecules/async-combobox.d.ts +15 -0
  9. package/dist/components/molecules/autocomplete-field.d.ts +17 -0
  10. package/dist/components/molecules/base-button.d.ts +1 -1
  11. package/dist/components/molecules/confirmation-dialog.d.ts +24 -0
  12. package/dist/components/molecules/date-range-picker.d.ts +1 -1
  13. package/dist/components/molecules/form-phone-input.d.ts +1 -1
  14. package/dist/components/molecules/preview-sms.d.ts +5 -0
  15. package/dist/components/molecules/recommendation-card/components/selected-algorithms.d.ts +1 -1
  16. package/dist/components/molecules/select-multi-field.d.ts +1 -1
  17. package/dist/components/molecules/textarea-field.d.ts +3 -3
  18. package/dist/components/molecules/whatsapp-message.d.ts +15 -0
  19. package/dist/components/organisms/data-table/index.d.ts +3 -3
  20. package/dist/components/organisms/form-checkbox.d.ts +1 -0
  21. package/dist/components/organisms/form-select.d.ts +1 -1
  22. package/dist/components/organisms/form-textarea.d.ts +2 -4
  23. package/dist/components/organisms/timeline.d.ts +1 -1
  24. package/dist/hooks/use-data-table.d.ts +1 -1
  25. package/dist/index.d.ts +1 -0
  26. package/dist/mock/columns.d.ts +1 -1
  27. package/dist/segmentify-ui.cjs +84 -84
  28. package/dist/segmentify-ui.js +11658 -11609
  29. package/dist/src/components/atoms/sortable-item.d.ts +3 -2
  30. package/dist/src/components/molecules/sortable-list.d.ts +3 -2
  31. package/dist/src/components/organisms/form-sortable-list.d.ts +2 -1
  32. package/package.json +1 -1
  33. package/dist/components/atoms/phone-inpux.d.ts +0 -7
  34. package/dist/hooks/use-popup-layer-z-index.d.ts +0 -1
@@ -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 { DayPicker, type DayButton } from 'react-day-picker';
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: typeof RechartsPrimitive.Legend;
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,2 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ export declare const Iphone15: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ type PreviewSingleButtonProps = {
3
+ className?: string;
4
+ };
5
+ export declare const PreviewSingleButton: ({ children, className }: PropsWithChildren<PreviewSingleButtonProps>) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import Quill, { Delta, Range, EmitterSource } from 'quill';
2
+ import Quill, { Delta, EmitterSource, Range } from 'quill';
3
3
  interface EditorProps {
4
4
  readOnly?: boolean;
5
5
  defaultValue?: Delta;
@@ -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"];
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import type { VariantProps } from 'class-variance-authority';
3
+ import { buttonVariants } from '../../lib/design-variants';
4
+ import type { Union } from 'ts-toolbelt';
5
+ type BaseProps = {
6
+ title: string;
7
+ description: string;
8
+ onAction: () => void;
9
+ children?: React.ReactNode;
10
+ cancelLabel: string;
11
+ actionLabel: string;
12
+ actionVariant?: VariantProps<typeof buttonVariants>['variant'];
13
+ };
14
+ type ControlledProps = BaseProps & {
15
+ controlled: true;
16
+ open: boolean;
17
+ setOpen: (open: boolean) => void;
18
+ };
19
+ type UncontrolledProps = BaseProps & {
20
+ controlled?: false;
21
+ };
22
+ type Props = Union.Strict<ControlledProps | UncontrolledProps>;
23
+ export declare const ConfirmationDialog: ({ title, description, onAction, children, cancelLabel, actionLabel, actionVariant, open, setOpen, controlled, }: Props) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
@@ -1,6 +1,6 @@
1
+ import { type ClassValue } from 'clsx';
1
2
  import { type Locale } from 'date-fns';
2
3
  import { type DateRange } from 'react-day-picker';
3
- import { type ClassValue } from 'clsx';
4
4
  type Props = {
5
5
  start?: Date;
6
6
  end?: Date;
@@ -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;
@@ -0,0 +1,5 @@
1
+ import { MessagingPhoneProps } from '../../types/messaging';
2
+ export declare const PreviewSMS: {
3
+ ({ messageData }: MessagingPhoneProps): import("react/jsx-runtime").JSX.Element | null;
4
+ displayName: string;
5
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FieldValues } from 'react-hook-form';
3
- import { SharedAlgorithmProps, RecommendationCardConfig } from '../types';
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 SingleValue, type MultiValue, type InputActionMeta } from 'react-select';
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,10 +1,10 @@
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
- value?: string;
7
- onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
6
+ value: string;
7
+ onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
8
8
  label?: string;
9
9
  }
10
10
  export declare const TextAreaField: ({ textAreaClassName, value, onChange, label, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ type WhatsappMessageProps = {
3
+ cards?: {
4
+ image?: string;
5
+ title?: string;
6
+ content?: string;
7
+ buttons: {
8
+ text?: string;
9
+ yupButtonsText?: string;
10
+ }[];
11
+ }[];
12
+ includeTime?: boolean;
13
+ };
14
+ export declare const WhatsappMessage: ({ children, cards, includeTime }: PropsWithChildren<WhatsappMessageProps>) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -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';
@@ -4,6 +4,7 @@ type FormCheckboxProps<TFieldValues extends FieldValues = FieldValues> = {
4
4
  control?: Control<TFieldValues>;
5
5
  label: string;
6
6
  formClassName?: string;
7
+ containerClassName?: string;
7
8
  };
8
9
  export declare const FormCheckbox: <TFieldValues extends FieldValues = FieldValues>({ name, control, formClassName, ...props }: FormCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -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,8 +1,6 @@
1
- import React from 'react';
2
- import { TextAreaField } from '../../components/molecules/textarea-field';
3
1
  import { type Control, type FieldValues, type Path } from 'react-hook-form';
4
- type Props<TFieldValues extends FieldValues = FieldValues> = React.ComponentProps<typeof TextAreaField> & {
5
- label?: string;
2
+ type Props<TFieldValues extends FieldValues = FieldValues> = {
3
+ label: string;
6
4
  name: Path<TFieldValues>;
7
5
  placeholder: string;
8
6
  control?: Control<TFieldValues>;
@@ -1,6 +1,6 @@
1
+ import { type ReactNode } from 'react';
1
2
  import { type Locale } from 'date-fns';
2
3
  import { type LucideIcon } from 'lucide-react';
3
- import { type ReactNode } from 'react';
4
4
  export interface IconConfig {
5
5
  icon: LucideIcon;
6
6
  bg?: string;
@@ -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;
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';
@@ -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;