@segmentify/ui 0.0.72 → 1.0.0

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/README.md CHANGED
@@ -48,6 +48,20 @@ function App() {
48
48
  }
49
49
  ```
50
50
 
51
+ ### Visual brand and appearance
52
+
53
+ Segmentify is the marker-free default. To activate the Unifonic token set, the consuming application must place the explicit marker on the document root before rendering package components:
54
+
55
+ ```ts
56
+ document.documentElement.dataset.theme = 'unifonic';
57
+ ```
58
+
59
+ Remove `data-theme` or omit it to retain Segmentify. Visual brand is independent from light or dark appearance; the existing `dark` class continues to control appearance and must not be used to select a brand.
60
+
61
+ The Unifonic font token uses an Inter-first fallback stack. Consumers are responsible for loading an approved Inter asset once at their application boundary. This package neither bundles an unconfirmed font asset nor downloads one from an external origin.
62
+
63
+ Package-owned portaled content establishes `ui-lib-root` automatically. Consumers should establish the root only around normal package content and must not locate internal portal nodes or add private portal classes.
64
+
51
65
  ## Development
52
66
 
53
67
  ### Scripts
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ type CodeBlockProps = Omit<React.ComponentProps<'pre'>, 'children'> & {
3
+ code: string;
4
+ language?: 'json' | 'text';
5
+ };
6
+ declare function CodeBlock({ code, language, className, ...props }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
7
+ export { CodeBlock };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Command as CommandPrimitive } from 'cmdk';
3
3
  import { Dialog } from '../../components/atoms/dialog';
4
- declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Command({ className, shouldFilter, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
5
  declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: React.ComponentProps<typeof Dialog> & {
6
6
  title?: string;
7
7
  description?: string;
@@ -1,4 +1,4 @@
1
1
  export declare const FormattedDate: ({ date, format }: {
2
2
  date: Date;
3
- format: string;
3
+ format?: string;
4
4
  }) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,4 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as SliderPrimitive from '@radix-ui/react-slider';
3
- declare function Slider({ className, defaultValue, value, min, max, ...props }: React.ComponentProps<typeof SliderPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ type SliderProps = React.ComponentProps<typeof SliderPrimitive.Root> & {
4
+ thumbProps?: React.ComponentProps<typeof SliderPrimitive.Thumb>[];
5
+ };
6
+ declare function Slider({ className, defaultValue, value, min, max, thumbProps, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
4
7
  export { Slider };
@@ -1,3 +1,3 @@
1
1
  import { type ToasterProps } from 'sonner';
2
- declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Toaster: ({ className, ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export { Toaster };
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ declare const toggleGroupVariants: (props?: ({
5
+ size?: "default" | "sm" | "lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare const toggleGroupItemVariants: (props?: ({
8
+ size?: "default" | "sm" | "lg" | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ declare function ToggleGroup({ className, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof toggleGroupVariants>): import("react/jsx-runtime").JSX.Element;
11
+ declare function ToggleGroupItem({ className, size, children, ...props }: React.ComponentProps<typeof ToggleGroupPrimitive.Item> & VariantProps<typeof toggleGroupItemVariants>): import("react/jsx-runtime").JSX.Element;
12
+ export { ToggleGroup, ToggleGroupItem };
@@ -6,6 +6,12 @@ export type ComboboxFieldItem = {
6
6
  };
7
7
  export type ComboboxFieldInputMode = 'input' | 'popup';
8
8
  type Props = {
9
+ id?: string;
10
+ 'aria-label'?: string;
11
+ 'aria-labelledby'?: string;
12
+ 'aria-describedby'?: string;
13
+ 'aria-invalid'?: React.AriaAttributes['aria-invalid'];
14
+ 'data-slot'?: string;
9
15
  items: ComboboxFieldItem[];
10
16
  value: ComboboxFieldItem[];
11
17
  onValueChange: (values: ComboboxFieldItem[]) => void;
@@ -22,5 +28,5 @@ type Props = {
22
28
  renderPopupTrigger?: (valueElement: React.ReactNode, selectedValues: ComboboxFieldItem[]) => React.ReactElement;
23
29
  onInputChange?: (value: string) => void;
24
30
  };
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
+ export declare const ComboboxField: ({ id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, items, label, multiple, hasClearButton, disabled, placeholder, containerClassName, emptyMessage, hasAllOption, allOptionLabel, inputMode, renderPopupTrigger, onInputChange, value, onValueChange, }: Props) => import("react/jsx-runtime").JSX.Element;
26
32
  export {};
@@ -2,16 +2,18 @@ import { type ClassValue } from 'clsx';
2
2
  import { type Locale } from 'date-fns';
3
3
  import { type DateRange } from 'react-day-picker';
4
4
  type Props = {
5
+ id?: string;
5
6
  start?: Date;
6
7
  end?: Date;
7
8
  onConfirm: (range: DateRange) => void;
8
9
  label?: string;
9
10
  placeholder: string;
10
11
  triggerButtonClassName?: ClassValue;
12
+ popoverContentClassName?: ClassValue;
11
13
  className?: ClassValue;
12
14
  confirmLabel?: string;
13
15
  disabledCondition?: boolean | ((date: Date) => boolean);
14
16
  dateLocale?: Locale;
15
17
  };
16
- export declare const DateRangePicker: ({ start, end, onConfirm, className, triggerButtonClassName, label, placeholder, confirmLabel, disabledCondition, dateLocale, }: Props) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const DateRangePicker: ({ id, start, end, onConfirm, className, triggerButtonClassName, popoverContentClassName, label, placeholder, confirmLabel, disabledCondition, dateLocale, }: Props) => import("react/jsx-runtime").JSX.Element;
17
19
  export {};
@@ -0,0 +1,12 @@
1
+ export type LogicalOperatorValue = 'AND' | 'OR';
2
+ type LogicalOperatorToggleProps = {
3
+ value: LogicalOperatorValue;
4
+ onValueChange: (value: LogicalOperatorValue) => void;
5
+ size?: 'default' | 'sm' | 'lg';
6
+ className?: string;
7
+ disabled?: boolean;
8
+ andLabel?: string;
9
+ orLabel?: string;
10
+ };
11
+ declare function LogicalOperatorToggle({ value, onValueChange, size, className, disabled, andLabel, orLabel, }: LogicalOperatorToggleProps): import("react/jsx-runtime").JSX.Element;
12
+ export { LogicalOperatorToggle };
@@ -0,0 +1,7 @@
1
+ type PreviewImageProps = {
2
+ src?: string;
3
+ alt?: string;
4
+ className?: string;
5
+ };
6
+ export declare const PreviewImage: ({ src, alt, className }: PreviewImageProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { Select } from '../../components/atoms/select';
3
3
  import type { SelectItemProps } from '../../lib/types';
4
4
  interface SelectFieldProps extends React.ComponentProps<typeof Select> {
5
+ id?: string;
5
6
  options: SelectItemProps[];
6
7
  placeholder: string;
7
8
  onChange: (value: string) => void;
@@ -14,5 +15,5 @@ interface SelectFieldProps extends React.ComponentProps<typeof Select> {
14
15
  hasFormControlWrapper?: boolean;
15
16
  selectContentClassName?: string;
16
17
  }
17
- export declare const SelectField: ({ options, placeholder, hasFormControlWrapper, selectContentClassName, onChange, value, label, triggerClassName, labelClassName, containerClassName, isPortal, ...props }: SelectFieldProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const SelectField: ({ id, options, placeholder, hasFormControlWrapper, selectContentClassName, onChange, value, label, triggerClassName, labelClassName, containerClassName, isPortal, ...props }: SelectFieldProps) => import("react/jsx-runtime").JSX.Element;
18
19
  export {};
@@ -1,6 +1,7 @@
1
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
+ id?: string;
4
5
  label?: string;
5
6
  name: string;
6
7
  options: SelectItemProps[];
@@ -16,5 +17,5 @@ type SelectFieldProps = {
16
17
  description?: string;
17
18
  className?: string;
18
19
  };
19
- export declare function SelectMultiField({ label, name, options, value, onChange, onInputChange, placeholder, isClearable, isSearchable, isMulti, isDisabled, description, className, isCreatable, }: SelectFieldProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function SelectMultiField({ id, label, name, options, value, onChange, onInputChange, placeholder, isClearable, isSearchable, isMulti, isDisabled, description, className, isCreatable, }: SelectFieldProps): import("react/jsx-runtime").JSX.Element;
20
21
  export {};
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ export type SortableMultiContainer = {
3
+ id: string;
4
+ itemIds: string[];
5
+ };
6
+ export type SortableContainerDragHandle = {
7
+ attributes: object;
8
+ listeners?: object;
9
+ };
10
+ type SortableMultiListProps = {
11
+ containers: SortableMultiContainer[];
12
+ onReorderWithin: (containerId: string, fromIndex: number, toIndex: number) => void;
13
+ onMoveBetween: (fromContainerId: string, fromIndex: number, toContainerId: string, toIndex: number) => void;
14
+ onReorderContainers?: (fromIndex: number, toIndex: number) => void;
15
+ renderContainer: (container: SortableMultiContainer, meta: {
16
+ dragHandle: SortableContainerDragHandle;
17
+ }) => React.ReactNode;
18
+ className?: string;
19
+ containerClassName?: string;
20
+ orientation?: 'vertical' | 'horizontal';
21
+ };
22
+ declare function SortableMultiList({ containers, onReorderWithin, onMoveBetween, onReorderContainers, renderContainer, className, containerClassName, orientation, }: SortableMultiListProps): import("react/jsx-runtime").JSX.Element;
23
+ export { SortableMultiList };
@@ -7,5 +7,5 @@ interface Props extends React.ComponentProps<typeof Textarea> {
7
7
  onChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
8
8
  label?: string;
9
9
  }
10
- export declare const TextAreaField: ({ textAreaClassName, value, onChange, label, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const TextAreaField: ({ textAreaClassName, value, onChange, label, id, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
11
11
  export {};
@@ -8,5 +8,6 @@ export interface ActionItem {
8
8
  }
9
9
  export interface ActionsProps {
10
10
  actions: ActionItem[];
11
+ menuTriggerLabel?: string;
11
12
  }
12
- export declare const Actions: ({ actions }: ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
13
+ export declare const Actions: ({ actions, menuTriggerLabel }: ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,6 +1,7 @@
1
1
  interface ColumnVisibilityProps {
2
2
  emptyMessage?: string;
3
3
  allOptionLabel?: string;
4
+ triggerLabel?: string;
4
5
  }
5
- export declare function ColumnVisibility({ emptyMessage, allOptionLabel, }: ColumnVisibilityProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ColumnVisibility({ emptyMessage, allOptionLabel, triggerLabel, }: ColumnVisibilityProps): import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -13,6 +13,12 @@ interface ContentProps {
13
13
  * @example ({ row }) => <SubRowAsync row={row} />
14
14
  */
15
15
  renderRowSubComponent?: (props: RenderRowSubComponentProps) => ReactNode;
16
+ /**
17
+ * Whether a `DataTable.Pagination` sibling is rendered below this content.
18
+ * Determines whether the Unifonic card shell keeps an open bottom edge.
19
+ * Defaults to `true` to preserve existing composition behavior.
20
+ */
21
+ hasPagination?: boolean;
16
22
  }
17
- export declare function Content({ className, loadingContent, emptyContent, renderRowSubComponent, }: ContentProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function Content({ className, loadingContent, emptyContent, renderRowSubComponent, hasPagination, }: ContentProps): import("react/jsx-runtime").JSX.Element;
18
24
  export {};
@@ -13,5 +13,5 @@ export declare const DataTable: {
13
13
  ColumnVisibility: typeof ColumnVisibility;
14
14
  Content: typeof Content;
15
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;
16
+ Actions: ({ actions, menuTriggerLabel }: import("./actions").ActionsProps) => import("react/jsx-runtime").JSX.Element | null;
17
17
  };
@@ -7,6 +7,7 @@ type FormFileUploadProps<TFieldValues extends FieldValues = FieldValues> = {
7
7
  uploadButtonLabel?: string;
8
8
  uploadingLabel?: string;
9
9
  uploadFailedMessage?: string;
10
+ removeFileButtonLabel?: string;
10
11
  description?: string;
11
12
  accept?: string;
12
13
  disabled?: boolean;
@@ -17,7 +18,7 @@ type FormFileUploadProps<TFieldValues extends FieldValues = FieldValues> = {
17
18
  onUpload?: (file: File) => Promise<string>;
18
19
  };
19
20
  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
+ <TFieldValues extends FieldValues = FieldValues>({ name, control, label, uploadButtonLabel, uploadingLabel, uploadFailedMessage, removeFileButtonLabel, description, accept, disabled, multiple, containerClassName, tooltipContent, hasRequiredIndicator, onUpload, }: FormFileUploadProps<TFieldValues>): import("react/jsx-runtime").JSX.Element;
21
22
  displayName: string;
22
23
  };
23
24
  export {};
@@ -9,6 +9,8 @@ type Props<TFieldValues extends FieldValues = FieldValues> = {
9
9
  description?: string;
10
10
  tooltipContent?: string;
11
11
  hasRequiredIndicator?: boolean;
12
+ showPasswordLabel?: string;
13
+ hidePasswordLabel?: string;
12
14
  };
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;
15
+ export declare const FormPassword: <TFieldValues extends FieldValues = FieldValues>({ label, name, containerClassName, description, placeholder, tooltipContent, control, hasRequiredIndicator, showPasswordLabel, hidePasswordLabel, ...props }: Props<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
14
16
  export {};
package/dist/index.d.ts CHANGED
@@ -13,6 +13,7 @@ export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrev
13
13
  export { Case, ComponentSwitch, Default } from './components/atoms/component-switch';
14
14
  export { ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, ChartLegendContent, ChartStyle, type ChartConfig, } from './components/atoms/chart';
15
15
  export { Checkbox } from './components/atoms/checkbox';
16
+ export { CodeBlock } from './components/atoms/code-block';
16
17
  export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './components/atoms/collapsible';
17
18
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, } from './components/atoms/command';
18
19
  export { ContentWrapper } from './components/atoms/content-wrapper';
@@ -45,6 +46,7 @@ export { FormSortableList } from './components/organisms/form-sortable-list';
45
46
  export { FormSwitch } from './components/organisms/form-switch';
46
47
  export { FormTextarea } from './components/organisms/form-textarea';
47
48
  export { FormPhoneInput } from './components/molecules/form-phone-input';
49
+ export { LogicalOperatorToggle, type LogicalOperatorValue } from './components/molecules/logical-operator-toggle';
48
50
  export { HoverCard, HoverCardContent, HoverCardTrigger } from './components/atoms/hover-card';
49
51
  export { Icon } from './components/atoms/icon';
50
52
  export { Input } from './components/atoms/input';
@@ -76,12 +78,14 @@ export { Skeleton } from './components/atoms/skeleton';
76
78
  export { Slider } from './components/atoms/slider';
77
79
  export { SortableItem } from './components/atoms/sortable-item';
78
80
  export { SortableList } from './components/molecules/sortable-list';
81
+ export { SortableMultiList, type SortableMultiContainer, type SortableContainerDragHandle, } from './components/molecules/sortable-multi-list';
79
82
  export { Toaster } from './components/atoms/sonner';
80
83
  export { toast } from 'sonner';
81
84
  export { Spinner } from './components/atoms/spinner';
82
85
  export { Switch } from './components/atoms/switch';
83
86
  export { SwitchField } from './components/molecules/switch-field';
84
87
  export { Tabs, TabsList, TabsTrigger, TabsContent } from './components/atoms/tabs';
88
+ export { ToggleGroup, ToggleGroupItem } from './components/atoms/toggle-group';
85
89
  export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './components/atoms/table';
86
90
  export { Textarea } from './components/atoms/textarea';
87
91
  export { TextAreaField } from './components/molecules/textarea-field';