@segmentify/ui 0.0.59 → 0.0.61
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/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/phone-inpux.d.ts +7 -0
- package/dist/components/atoms/quill-editor.d.ts +1 -1
- 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 +3 -3
- package/dist/components/organisms/data-table/index.d.ts +3 -3
- package/dist/components/organisms/form-checkbox.d.ts +0 -1
- package/dist/components/organisms/form-select.d.ts +1 -1
- package/dist/components/organisms/form-textarea.d.ts +4 -2
- package/dist/components/organisms/timeline.d.ts +1 -1
- package/dist/hooks/use-data-table.d.ts +1 -1
- package/dist/hooks/use-popup-layer-z-index.d.ts +1 -0
- package/dist/index.d.ts +0 -1
- package/dist/mock/columns.d.ts +1 -1
- package/dist/segmentify-ui.cjs +221 -225
- package/dist/segmentify-ui.js +104678 -109276
- package/dist/src/components/atoms/sortable-item.d.ts +9 -0
- package/dist/src/components/molecules/sortable-list.d.ts +9 -0
- package/dist/src/components/organisms/form-sortable-list.d.ts +16 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/ui.css +16 -0
- package/package.json +12 -8
- package/dist/components/atoms/autocomplete.d.ts +0 -13
- package/dist/components/atoms/iphone-15.d.ts +0 -2
- package/dist/components/atoms/preview-single-button.d.ts +0 -6
- package/dist/components/molecules/async-combobox.d.ts +0 -15
- package/dist/components/molecules/autocomplete-field.d.ts +0 -17
- package/dist/components/molecules/confirmation-dialog.d.ts +0 -24
- package/dist/components/molecules/preview-sms.d.ts +0 -5
- package/dist/components/molecules/whatsapp-message.d.ts +0 -15
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SortableItemProps {
|
|
3
|
+
id: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
handleClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const SortableItem: ({ id, children, disabled, className, handleClassName }: SortableItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface SortableListProps {
|
|
3
|
+
itemIds: string[];
|
|
4
|
+
onReorder: (fromIndex: number, toIndex: number) => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
orientation?: 'vertical' | 'horizontal';
|
|
8
|
+
}
|
|
9
|
+
export declare const SortableList: ({ itemIds, onReorder, children, className, orientation, }: SortableListProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ArrayPath, FieldArrayWithId, FieldValues } from 'react-hook-form';
|
|
3
|
+
export type FormSortableListProps<TFieldValues extends FieldValues = FieldValues, TName extends ArrayPath<TFieldValues> = ArrayPath<TFieldValues>> = {
|
|
4
|
+
name: TName;
|
|
5
|
+
renderItem: (field: FieldArrayWithId<TFieldValues, TName, 'id'>, index: number) => React.ReactNode;
|
|
6
|
+
label?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
containerClassName?: string;
|
|
9
|
+
listClassName?: string;
|
|
10
|
+
itemClassName?: string;
|
|
11
|
+
orientation?: 'vertical' | 'horizontal';
|
|
12
|
+
emptyState?: React.ReactNode;
|
|
13
|
+
isItemDisabled?: (field: FieldArrayWithId<TFieldValues, TName, 'id'>, index: number) => boolean;
|
|
14
|
+
hasRequiredIndicator?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare const FormSortableList: <TFieldValues extends FieldValues = FieldValues, TName extends ArrayPath<TFieldValues> = ArrayPath<TFieldValues>>({ name, renderItem, label, description, containerClassName, listClassName, itemClassName, orientation, emptyState, isItemDisabled, hasRequiredIndicator, }: FormSortableListProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -41,6 +41,7 @@ export { FormInput } from './components/organisms/form-input';
|
|
|
41
41
|
export { FormPassword } from './components/organisms/form-password';
|
|
42
42
|
export { FormRadio } from './components/organisms/form-radio';
|
|
43
43
|
export { FormSlider } from './components/organisms/form-slider';
|
|
44
|
+
export { FormSortableList } from './components/organisms/form-sortable-list';
|
|
44
45
|
export { FormSwitch } from './components/organisms/form-switch';
|
|
45
46
|
export { FormTextarea } from './components/organisms/form-textarea';
|
|
46
47
|
export { FormPhoneInput } from './components/molecules/form-phone-input';
|
|
@@ -73,6 +74,8 @@ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter
|
|
|
73
74
|
export { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, } from './components/atoms/sidebar';
|
|
74
75
|
export { Skeleton } from './components/atoms/skeleton';
|
|
75
76
|
export { Slider } from './components/atoms/slider';
|
|
77
|
+
export { SortableItem } from './components/atoms/sortable-item';
|
|
78
|
+
export { SortableList } from './components/molecules/sortable-list';
|
|
76
79
|
export { Toaster } from './components/atoms/sonner';
|
|
77
80
|
export { toast } from 'sonner';
|
|
78
81
|
export { Spinner } from './components/atoms/spinner';
|
package/dist/ui.css
CHANGED
|
@@ -304,6 +304,9 @@
|
|
|
304
304
|
.ui\:row-start-1 {
|
|
305
305
|
grid-row-start: 1;
|
|
306
306
|
}
|
|
307
|
+
.ui\:m-0 {
|
|
308
|
+
margin: calc(var(--ui-spacing) * 0);
|
|
309
|
+
}
|
|
307
310
|
.ui\:-mx-1 {
|
|
308
311
|
margin-inline: calc(var(--ui-spacing) * -1);
|
|
309
312
|
}
|
|
@@ -942,6 +945,9 @@
|
|
|
942
945
|
.ui\:cursor-default {
|
|
943
946
|
cursor: default;
|
|
944
947
|
}
|
|
948
|
+
.ui\:cursor-grab {
|
|
949
|
+
cursor: grab;
|
|
950
|
+
}
|
|
945
951
|
.ui\:cursor-not-allowed {
|
|
946
952
|
cursor: not-allowed;
|
|
947
953
|
}
|
|
@@ -969,6 +975,9 @@
|
|
|
969
975
|
.ui\:list-disc {
|
|
970
976
|
list-style-type: disc;
|
|
971
977
|
}
|
|
978
|
+
.ui\:list-none {
|
|
979
|
+
list-style-type: none;
|
|
980
|
+
}
|
|
972
981
|
.ui\:appearance-none {
|
|
973
982
|
appearance: none;
|
|
974
983
|
}
|
|
@@ -2904,6 +2913,13 @@
|
|
|
2904
2913
|
}
|
|
2905
2914
|
}
|
|
2906
2915
|
}
|
|
2916
|
+
.ui\:hover\:text-gray-600 {
|
|
2917
|
+
&:hover {
|
|
2918
|
+
@media (hover: hover) {
|
|
2919
|
+
color: var(--ui-color-gray-600);
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2907
2923
|
.ui\:hover\:text-green-600 {
|
|
2908
2924
|
&:hover {
|
|
2909
2925
|
@media (hover: hover) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentify/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.61",
|
|
4
4
|
"description": "A collection of reusable React UI components built with Tailwind CSS and Radix UI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@base-ui/react": "^1.5.0",
|
|
40
|
+
"@dnd-kit/core": "^6.3.1",
|
|
41
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
42
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
40
43
|
"@radix-ui/react-accordion": "^1.2.12",
|
|
41
44
|
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
42
45
|
"@radix-ui/react-avatar": "^1.1.11",
|
|
@@ -56,12 +59,12 @@
|
|
|
56
59
|
"@radix-ui/react-switch": "^1.2.6",
|
|
57
60
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
58
61
|
"@radix-ui/react-tooltip": "^1.2.8",
|
|
59
|
-
"@segmentify/common": "0.0.
|
|
62
|
+
"@segmentify/common": "0.0.4",
|
|
60
63
|
"@tanstack/react-table": "^8.21.3",
|
|
61
64
|
"class-variance-authority": "^0.7.1",
|
|
62
65
|
"clsx": "^2.1.1",
|
|
63
66
|
"cmdk": "^1.1.1",
|
|
64
|
-
"date-fns": "^4.
|
|
67
|
+
"date-fns": "^4.3.0",
|
|
65
68
|
"embla-carousel-react": "^8.6.0",
|
|
66
69
|
"input-otp": "^1.4.2",
|
|
67
70
|
"next-themes": "^0.4.6",
|
|
@@ -84,17 +87,18 @@
|
|
|
84
87
|
"@storybook/react-vite": "^10.4.1",
|
|
85
88
|
"@tailwindcss/cli": "^4.3.0",
|
|
86
89
|
"@tailwindcss/vite": "^4.3.0",
|
|
87
|
-
"@tanstack/react-query": "^5.100.
|
|
90
|
+
"@tanstack/react-query": "^5.100.14",
|
|
88
91
|
"@types/node": "^25.9.1",
|
|
89
|
-
"@types/react": "^19.2.
|
|
92
|
+
"@types/react": "^19.2.7",
|
|
90
93
|
"@types/react-dom": "^19.2.3",
|
|
91
|
-
"@vitejs/plugin-react": "^
|
|
94
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
92
95
|
"@vitest/browser-playwright": "^4.1.7",
|
|
93
96
|
"@vitest/coverage-v8": "^4.1.7",
|
|
94
97
|
"eslint": "^10.4.0",
|
|
95
98
|
"eslint-config-prettier": "^10.1.8",
|
|
96
99
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
97
100
|
"eslint-plugin-boundaries": "^6.0.2",
|
|
101
|
+
"eslint-plugin-import": "^2.32.0",
|
|
98
102
|
"eslint-plugin-import-x": "^4.16.2",
|
|
99
103
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
100
104
|
"eslint-plugin-prettier": "^5.5.5",
|
|
@@ -110,7 +114,7 @@
|
|
|
110
114
|
"prettier": "3.8.3",
|
|
111
115
|
"react": "^19.2.0",
|
|
112
116
|
"react-dom": "^19.2.0",
|
|
113
|
-
"react-hook-form": "7.76.
|
|
117
|
+
"react-hook-form": "7.76.1",
|
|
114
118
|
"recharts": "2.15.4",
|
|
115
119
|
"sonner": "^2.0.7",
|
|
116
120
|
"storybook": "^10.4.1",
|
|
@@ -119,7 +123,7 @@
|
|
|
119
123
|
"tw-animate-css": "^1.4.0",
|
|
120
124
|
"typescript": "~6.0.3",
|
|
121
125
|
"typescript-eslint": "^8.59.4",
|
|
122
|
-
"vite": "^
|
|
126
|
+
"vite": "^7.3.0",
|
|
123
127
|
"vitest": "^4.1.7"
|
|
124
128
|
},
|
|
125
129
|
"lint-staged": {
|
|
@@ -1,13 +0,0 @@
|
|
|
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,6 +0,0 @@
|
|
|
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,15 +0,0 @@
|
|
|
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;
|
|
@@ -1,17 +0,0 @@
|
|
|
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,24 +0,0 @@
|
|
|
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,15 +0,0 @@
|
|
|
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 {};
|