lecom-ui 5.2.64 → 5.2.65

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.
@@ -105,7 +105,8 @@ function CustomDivider({
105
105
  buttonSize = "medium",
106
106
  buttonClassName,
107
107
  className,
108
- style
108
+ style,
109
+ children
109
110
  }) {
110
111
  if (lineOnly) {
111
112
  return /* @__PURE__ */ React.createElement(
@@ -120,6 +121,49 @@ function CustomDivider({
120
121
  }
121
122
  );
122
123
  }
124
+ const dividerLineProps = {
125
+ dashed,
126
+ plain,
127
+ isGroupDivider,
128
+ isActive,
129
+ className,
130
+ style
131
+ };
132
+ if (lineOnly && children == null) {
133
+ return /* @__PURE__ */ React.createElement(DividerLine, { ...dividerLineProps });
134
+ }
135
+ if (children != null) {
136
+ const justifyMap2 = {
137
+ left: "justify-start",
138
+ center: "justify-center",
139
+ right: "justify-end"
140
+ };
141
+ return /* @__PURE__ */ React.createElement(
142
+ "div",
143
+ {
144
+ className: cn(
145
+ "relative w-full flex items-center",
146
+ isGroupDivider ? "my-4" : "my-2",
147
+ isActive ? "opacity-100" : "opacity-50",
148
+ justifyMap2[orientation],
149
+ className
150
+ ),
151
+ style
152
+ },
153
+ /* @__PURE__ */ React.createElement(
154
+ "div",
155
+ {
156
+ className: cn(
157
+ "absolute inset-x-0",
158
+ dashed ? "border-dashed" : "border-solid",
159
+ plain ? "border-gray-200" : "border-gray-300",
160
+ "border-t"
161
+ )
162
+ }
163
+ ),
164
+ /* @__PURE__ */ React.createElement("span", { className: "relative z-10 px-2 bg-white" }, children)
165
+ );
166
+ }
123
167
  if (!name) {
124
168
  throw new Error(
125
169
  "CustomDivider: prop `name` is required when `lineOnly` is false."
package/dist/index.d.ts CHANGED
@@ -1124,7 +1124,6 @@ declare function Combobox({ options, value, onChange, placeholder, disabled, not
1124
1124
 
1125
1125
  type Orientation = 'left' | 'center' | 'right';
1126
1126
  interface CustomDividerProps<T extends FieldValues> {
1127
- /** Nome do campo no formulário (necessário se não for `lineOnly`) */
1128
1127
  name?: FieldPath<T>;
1129
1128
  control?: Control<T>;
1130
1129
  isActive?: boolean;
@@ -1138,12 +1137,12 @@ interface CustomDividerProps<T extends FieldValues> {
1138
1137
  onClick(): void;
1139
1138
  }>;
1140
1139
  buttonSize?: ButtonProps['size'];
1141
- /** Classes customizadas para os botões */
1142
1140
  buttonClassName?: string;
1143
1141
  className?: string;
1144
1142
  style?: React$1.CSSProperties;
1143
+ children?: React$1.ReactNode;
1145
1144
  }
1146
- declare function CustomDivider<T extends FieldValues>({ name, control, isActive, isGroupDivider, orientation, dashed, plain, lineOnly, optionLabels, ButtonComponent, buttonSize, buttonClassName, className, style, }: CustomDividerProps<T>): React$1.JSX.Element;
1145
+ declare function CustomDivider<T extends FieldValues>({ name, control, isActive, isGroupDivider, orientation, dashed, plain, lineOnly, optionLabels, ButtonComponent, buttonSize, buttonClassName, className, style, children, }: CustomDividerProps<T>): React$1.JSX.Element;
1147
1146
 
1148
1147
  export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CadastroFacil, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Combobox, CustomDivider, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogScroll, DialogTitle, DialogTrigger, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ErrorEmptyDisplay, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Input, Layout, LogoLecom, LogoLecomBrand, ModoTeste, MultiSelect, Notification, Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationIndex, PaginationItem, PaginationLast, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Rpa, SairModoTeste, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Spin, Switch, TOAST_REMOVE_DELAY, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TagInput, Textarea, ToggleGroup, ToggleGroupItem, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipTrigger, Translations, TypeMessageNotification, Typography, Upload, accordionVariants, buttonVariants, colors, fonts, initializeI18n, inputVariants, notificationVariants, reducer, tagVariants, textareaVariants, toast, typographyVariants, useFormField, useIsMobile, useNotificationToast, usePagination, useSidebar };
1149
1148
  export type { BgColor, BuildCellSelect, BuildColumns, BuildHeaderSelect, ButtonProps, CadastroFacilProps, CalloutNotificationProps, ChartConfig, CheckboxProps, CheckedCell, CheckedCellChange, CheckedHeader, CheckedHeaderChange, Color, ColorToken, Column, ColumnRender, ColumnSort, ColumnSortClient, ColumnTitle, ComboboxGroup, ComboboxOption, CustomStyles$1 as CustomStyles, DataTableProps, DialogContentProps, ErrorEmptyDisplayProps, File, FillColor, Fonts, Header, HeaderProps, InlineNotificationProps, InputProps, LayoutProps, LogoLecomBrandProps, LogoLecomProps, Meta, ModoTesteProps, NotificationProps, PaginationProps, Row, RpaProps, SideBarProps, SpinProps, TableProps, TagItem, TagProps, TextColor, TextareaProps, ToastNotificationProps, ToasterToast, TooltipContentProps, TypographyProps, UploadProps, UsePaginationItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lecom-ui",
3
- "version": "5.2.64",
3
+ "version": "5.2.65",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",