lecom-ui 5.2.60 → 5.2.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.
@@ -42,7 +42,8 @@ function OptionButtons({
42
42
  plain,
43
43
  optionLabels,
44
44
  ButtonComponent,
45
- buttonSize
45
+ buttonSize,
46
+ buttonClassName
46
47
  }) {
47
48
  const [labelAnd, labelOr] = optionLabels;
48
49
  const Btn = ButtonComponent;
@@ -64,7 +65,8 @@ function OptionButtons({
64
65
  disabled: !isActive,
65
66
  className: cn(
66
67
  "px-4 py-1 text-sm transition !rounded-none",
67
- value === "AND" ? "bg-blue-600 text-white hover:bg-blue-500" : "bg-white text-gray-700 hover:bg-blue-50"
68
+ value === "AND" ? "bg-blue-600 text-white hover:bg-blue-500" : "bg-white text-gray-700 hover:bg-blue-50",
69
+ buttonClassName
68
70
  )
69
71
  },
70
72
  labelAnd
@@ -79,7 +81,8 @@ function OptionButtons({
79
81
  disabled: !isActive,
80
82
  className: cn(
81
83
  "px-4 py-1 text-sm transition !rounded-none",
82
- value === "OR" ? "bg-blue-600 text-white hover:bg-blue-500" : "bg-white text-gray-700 hover:bg-blue-50"
84
+ value === "OR" ? "bg-blue-600 text-white hover:bg-blue-500" : "bg-white text-gray-700 hover:bg-blue-50",
85
+ buttonClassName
83
86
  )
84
87
  },
85
88
  labelOr
@@ -98,11 +101,10 @@ function CustomDivider({
98
101
  optionLabels = ["E", "OU"],
99
102
  ButtonComponent = Button,
100
103
  buttonSize = "medium",
104
+ buttonClassName,
101
105
  className,
102
106
  style
103
107
  }) {
104
- const formContext = useFormContext();
105
- const controlToUse = control ?? formContext.control;
106
108
  if (lineOnly) {
107
109
  return /* @__PURE__ */ React.createElement(
108
110
  DividerLine,
@@ -116,6 +118,8 @@ function CustomDivider({
116
118
  }
117
119
  );
118
120
  }
121
+ const formContext = useFormContext();
122
+ const controlToUse = control ?? formContext.control;
119
123
  const justifyMap = {
120
124
  left: "justify-start",
121
125
  center: "justify-center",
@@ -158,7 +162,8 @@ function CustomDivider({
158
162
  plain,
159
163
  optionLabels,
160
164
  ButtonComponent,
161
- buttonSize
165
+ buttonSize,
166
+ buttonClassName
162
167
  }
163
168
  )
164
169
  }
package/dist/index.d.ts CHANGED
@@ -1132,18 +1132,17 @@ interface CustomDividerProps<T extends FieldValues> {
1132
1132
  dashed?: boolean;
1133
1133
  plain?: boolean;
1134
1134
  lineOnly?: boolean;
1135
- /** Rótulo customizado para as duas opções [primeira, segunda] */
1136
1135
  optionLabels?: [React$1.ReactNode, React$1.ReactNode];
1137
- /** Componente de botão para renderizar as opções */
1138
1136
  ButtonComponent?: React$1.ComponentType<ButtonProps & {
1139
1137
  onClick(): void;
1140
1138
  }>;
1141
- /** Tamanho dos botões internos */
1142
1139
  buttonSize?: ButtonProps['size'];
1140
+ /** Classes customizadas para os botões */
1141
+ buttonClassName?: string;
1143
1142
  className?: string;
1144
1143
  style?: React$1.CSSProperties;
1145
1144
  }
1146
- declare function CustomDivider<T extends FieldValues>({ name, control, isActive, isGroupDivider, orientation, dashed, plain, lineOnly, optionLabels, ButtonComponent, buttonSize, 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, }: 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.60",
3
+ "version": "5.2.62",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",