@segmentify/ui 0.0.60 → 0.0.62
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/chart.d.ts +1 -1
- package/dist/components/atoms/sortable-item.d.ts +10 -0
- package/dist/components/molecules/sortable-list.d.ts +10 -0
- package/dist/components/organisms/form-sortable-list.d.ts +17 -0
- package/dist/index.d.ts +1 -102
- package/dist/segmentify-ui.cjs +173 -169
- package/dist/segmentify-ui.js +27844 -24697
- package/dist/src/components/atoms/sortable-item.d.ts +10 -0
- package/dist/src/components/molecules/sortable-list.d.ts +10 -0
- package/dist/src/components/organisms/form-sortable-list.d.ts +17 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/ui.css +16 -0
- package/package.json +5 -1
- 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/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
- package/dist/components/organisms/form-checkbox.d.ts +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface SortableItemProps {
|
|
3
|
+
id: string;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
handleClassName?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const SortableItem: ({ id, children, disabled, className, handleClassName }: SortableItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { SortableItem };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
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
|
+
declare const SortableList: ({ itemIds, onReorder, children, className, orientation }: SortableListProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { SortableList };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ArrayPath, FieldArrayWithId, FieldValues } from 'react-hook-form';
|
|
3
|
+
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;
|
|
17
|
+
export {};
|
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.62",
|
|
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",
|
|
@@ -96,6 +99,7 @@
|
|
|
96
99
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
97
100
|
"eslint-plugin-boundaries": "^6.0.2",
|
|
98
101
|
"eslint-plugin-import": "^2.32.0",
|
|
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",
|
|
101
105
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
@@ -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,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 {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Control, type FieldValues, type Path } from 'react-hook-form';
|
|
2
|
-
type FormCheckboxProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
3
|
-
name: Path<TFieldValues>;
|
|
4
|
-
control?: Control<TFieldValues>;
|
|
5
|
-
label: string;
|
|
6
|
-
formClassName?: string;
|
|
7
|
-
containerClassName?: string;
|
|
8
|
-
};
|
|
9
|
-
export declare const FormCheckbox: <TFieldValues extends FieldValues = FieldValues>({ name, control, formClassName, ...props }: FormCheckboxProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|