eai-frontend-components 2.0.87 → 2.0.89
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/index.d.ts +6 -6
- package/dist/index.esm.js +5 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -80,7 +80,7 @@ declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitiv
|
|
|
80
80
|
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
81
81
|
|
|
82
82
|
declare const badgeVariants: (props?: ({
|
|
83
|
-
variant?: "default" | "
|
|
83
|
+
variant?: "default" | "secondary" | "surface" | "destructive" | "outline" | "green" | "red" | "gray" | "blue" | "orange" | "yellow" | null | undefined;
|
|
84
84
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
85
85
|
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
86
86
|
}
|
|
@@ -105,7 +105,7 @@ declare const BreadcrumbEllipsis: {
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
declare const buttonVariants: (props?: ({
|
|
108
|
-
variant?: "
|
|
108
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "link" | "primary" | "ghost" | null | undefined;
|
|
109
109
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
110
110
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
111
111
|
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -224,7 +224,7 @@ declare const CommandInput: React$1.ForwardRefExoticComponent<Omit<Omit<Pick<Pic
|
|
|
224
224
|
ref?: React$1.Ref<HTMLInputElement>;
|
|
225
225
|
} & {
|
|
226
226
|
asChild?: boolean;
|
|
227
|
-
}, "key" | "asChild" | keyof React$1.InputHTMLAttributes<HTMLInputElement>>, "
|
|
227
|
+
}, "key" | "asChild" | keyof React$1.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
228
228
|
value?: string;
|
|
229
229
|
onValueChange?: (search: string) => void;
|
|
230
230
|
} & React$1.RefAttributes<HTMLInputElement>, "ref"> & React$1.RefAttributes<HTMLInputElement>>;
|
|
@@ -268,7 +268,7 @@ declare const CommandItem: React$1.ForwardRefExoticComponent<Omit<{
|
|
|
268
268
|
ref?: React$1.Ref<HTMLDivElement>;
|
|
269
269
|
} & {
|
|
270
270
|
asChild?: boolean;
|
|
271
|
-
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "
|
|
271
|
+
}, "key" | "asChild" | keyof React$1.HTMLAttributes<HTMLDivElement>>, "onSelect" | "value" | "disabled"> & {
|
|
272
272
|
disabled?: boolean;
|
|
273
273
|
onSelect?: (value: string) => void;
|
|
274
274
|
value?: string;
|
|
@@ -883,7 +883,7 @@ interface Props$8 {
|
|
|
883
883
|
declare const FormInputMask: React.FC<Props$8>;
|
|
884
884
|
|
|
885
885
|
declare const multiSelectVariants: (props?: ({
|
|
886
|
-
variant?: "default" | "
|
|
886
|
+
variant?: "default" | "secondary" | "destructive" | "inverted" | null | undefined;
|
|
887
887
|
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
888
888
|
interface MultiSelectOption {
|
|
889
889
|
value: string;
|
|
@@ -1132,7 +1132,7 @@ interface OrgChartProps {
|
|
|
1132
1132
|
defaultSearch?: string;
|
|
1133
1133
|
setSearch?: (value?: string) => void;
|
|
1134
1134
|
actions?: ActionOrgChart[];
|
|
1135
|
-
data: OrgChartNodeData;
|
|
1135
|
+
data: OrgChartNodeData | undefined;
|
|
1136
1136
|
onNodeClick?: (node: OrgChartNodeData) => void;
|
|
1137
1137
|
defaultExpanded?: boolean;
|
|
1138
1138
|
className?: string;
|
package/dist/index.esm.js
CHANGED
|
@@ -10146,8 +10146,11 @@ function NodeCard({ node, onNodeClick, isExpanded, hasChildren, onToggle }) {
|
|
|
10146
10146
|
}
|
|
10147
10147
|
function OrgChartTreeNode({ node, onNodeClick, defaultExpanded, renderNode }) {
|
|
10148
10148
|
const [isExpanded, setIsExpanded] = useState(defaultExpanded);
|
|
10149
|
-
const children = node
|
|
10149
|
+
const children = node?.children ?? [];
|
|
10150
10150
|
const hasChildren = children.length > 0;
|
|
10151
|
+
if (!node) {
|
|
10152
|
+
return jsx("div", { className: 'flex flex-col items-center text-sm font-medium', children: "Nenhum dado dispon\u00EDvel" });
|
|
10153
|
+
}
|
|
10151
10154
|
const cardProps = {
|
|
10152
10155
|
node,
|
|
10153
10156
|
onNodeClick,
|
|
@@ -10173,7 +10176,7 @@ function OrgChart({ defaultSearch, setSearch, actions, data, onNodeClick, defaul
|
|
|
10173
10176
|
setSearch?.(value);
|
|
10174
10177
|
}, 300);
|
|
10175
10178
|
};
|
|
10176
|
-
return (jsxs("div", { className: 'flex
|
|
10179
|
+
return (jsxs("div", { className: 'flex flex-col flex-1 gap-4', children: [jsxs("div", { className: 'flex items-end justify-between space-x-6', children: [jsx("div", { className: 'flex gap-x-4', children: jsxs("div", { className: 'flex bg-background items-center border border-slate-300 rounded-sm w-[350px] overflow-hidden focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 group', children: [jsx("div", { className: 'pl-3.5 transform transition-transform duration-300 group-hover:-translate-x-1', children: jsx(Search, { size: 18, className: 'w-5 h-5 stroke-zinc-500 dark:stroke-default' }) }), jsx("input", { placeholder: 'Buscar', defaultValue: defaultSearch, onChange: (event) => {
|
|
10177
10180
|
handleSearchChange(event);
|
|
10178
10181
|
}, className: 'w-full bg-background text-default border-none focus:ring-0 focus:outline-none px-3 py-2 transform transition-transform duration-300 group-hover:-translate-x-1 ' })] }) }), jsx("div", { className: 'flex space-x-4 content-end', children: actions?.map((action, index) => (jsx("div", { children: jsxs(Button, { type: 'button', onClick: () => action.onClick?.(), className: cn(action.className), variant: action.variant || 'default', disabled: action.disabled, children: [jsx("div", { className: '[&_svg]:size-5', children: action.icon }), action.label] }) }, `action-table-${index}`))) })] }), jsx(Card, { className: 'flex-1 overflow-hidden', children: jsx(CardContent, { className: 'h-full p-0', children: jsx("div", { className: cn('w-full overflow-x-auto', className), children: jsx("div", { className: 'flex justify-center px-4 py-6', children: jsx(OrgChartTreeNode, { node: data, onNodeClick: onNodeClick, defaultExpanded: defaultExpanded, renderNode: renderNode }) }) }) }) })] }));
|
|
10179
10182
|
}
|