@mlw-packages/react-components 1.7.11 → 1.7.13
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.css +40 -15
- package/dist/index.d.mts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +215 -55
- package/dist/index.mjs +273 -113
- package/package.json +2 -1
package/dist/index.css
CHANGED
|
@@ -729,6 +729,9 @@ body {
|
|
|
729
729
|
.ml-5 {
|
|
730
730
|
margin-left: 1.25rem;
|
|
731
731
|
}
|
|
732
|
+
.ml-6 {
|
|
733
|
+
margin-left: 1.5rem;
|
|
734
|
+
}
|
|
732
735
|
.ml-64 {
|
|
733
736
|
margin-left: 16rem;
|
|
734
737
|
}
|
|
@@ -750,6 +753,9 @@ body {
|
|
|
750
753
|
.mr-5 {
|
|
751
754
|
margin-right: 1.25rem;
|
|
752
755
|
}
|
|
756
|
+
.ms-6 {
|
|
757
|
+
margin-inline-start: 1.5rem;
|
|
758
|
+
}
|
|
753
759
|
.mt-1 {
|
|
754
760
|
margin-top: 0.25rem;
|
|
755
761
|
}
|
|
@@ -1523,6 +1529,11 @@ body {
|
|
|
1523
1529
|
.list-none {
|
|
1524
1530
|
list-style-type: none;
|
|
1525
1531
|
}
|
|
1532
|
+
.appearance-none {
|
|
1533
|
+
-webkit-appearance: none;
|
|
1534
|
+
-moz-appearance: none;
|
|
1535
|
+
appearance: none;
|
|
1536
|
+
}
|
|
1526
1537
|
.auto-cols-fr {
|
|
1527
1538
|
grid-auto-columns: minmax(0, 1fr);
|
|
1528
1539
|
}
|
|
@@ -2631,6 +2642,9 @@ body {
|
|
|
2631
2642
|
.pe-4 {
|
|
2632
2643
|
padding-inline-end: 1rem;
|
|
2633
2644
|
}
|
|
2645
|
+
.pl-1 {
|
|
2646
|
+
padding-left: 0.25rem;
|
|
2647
|
+
}
|
|
2634
2648
|
.pl-3 {
|
|
2635
2649
|
padding-left: 0.75rem;
|
|
2636
2650
|
}
|
|
@@ -3783,6 +3797,14 @@ body {
|
|
|
3783
3797
|
.last\:border-r-0:last-child {
|
|
3784
3798
|
border-right-width: 0px;
|
|
3785
3799
|
}
|
|
3800
|
+
.checked\:border-blue-600:checked {
|
|
3801
|
+
--tw-border-opacity: 1;
|
|
3802
|
+
border-color: rgb(37 99 235 / var(--tw-border-opacity, 1));
|
|
3803
|
+
}
|
|
3804
|
+
.checked\:bg-blue-600:checked {
|
|
3805
|
+
--tw-bg-opacity: 1;
|
|
3806
|
+
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
3807
|
+
}
|
|
3786
3808
|
.focus-within\:relative:focus-within {
|
|
3787
3809
|
position: relative;
|
|
3788
3810
|
}
|
|
@@ -3977,6 +3999,10 @@ body {
|
|
|
3977
3999
|
.hover\:bg-sky-200\/40:hover {
|
|
3978
4000
|
background-color: rgb(186 230 253 / 0.4);
|
|
3979
4001
|
}
|
|
4002
|
+
.hover\:bg-slate-100:hover {
|
|
4003
|
+
--tw-bg-opacity: 1;
|
|
4004
|
+
background-color: rgb(241 245 249 / var(--tw-bg-opacity, 1));
|
|
4005
|
+
}
|
|
3980
4006
|
.hover\:bg-violet-200\/40:hover {
|
|
3981
4007
|
background-color: rgb(221 214 254 / 0.4);
|
|
3982
4008
|
}
|
|
@@ -4437,6 +4463,9 @@ body {
|
|
|
4437
4463
|
.aria-selected\:opacity-30[aria-selected=true] {
|
|
4438
4464
|
opacity: 0.3;
|
|
4439
4465
|
}
|
|
4466
|
+
.aria-\[selected\=true\]\:bg-accent[aria-selected=true] {
|
|
4467
|
+
background-color: hsl(var(--accent));
|
|
4468
|
+
}
|
|
4440
4469
|
.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true] {
|
|
4441
4470
|
pointer-events: none;
|
|
4442
4471
|
}
|
|
@@ -4651,6 +4680,9 @@ body {
|
|
|
4651
4680
|
.data-\[active\=true\]\:bg-accent\/50[data-active=true] {
|
|
4652
4681
|
background-color: hsl(var(--accent) / 0.5);
|
|
4653
4682
|
}
|
|
4683
|
+
.data-\[highlighted\]\:bg-accent[data-highlighted] {
|
|
4684
|
+
background-color: hsl(var(--accent));
|
|
4685
|
+
}
|
|
4654
4686
|
.data-\[selected\=true\]\:bg-muted[data-selected=true] {
|
|
4655
4687
|
background-color: hsl(var(--muted));
|
|
4656
4688
|
}
|
|
@@ -4685,9 +4717,6 @@ body {
|
|
|
4685
4717
|
--tw-bg-opacity: 1;
|
|
4686
4718
|
background-color: rgb(167 139 250 / var(--tw-bg-opacity, 1));
|
|
4687
4719
|
}
|
|
4688
|
-
.data-\[state\=indeterminate\]\:bg-primary[data-state=indeterminate] {
|
|
4689
|
-
background-color: hsl(var(--primary));
|
|
4690
|
-
}
|
|
4691
4720
|
.data-\[state\=open\]\:bg-accent[data-state=open] {
|
|
4692
4721
|
background-color: hsl(var(--accent));
|
|
4693
4722
|
}
|
|
@@ -4734,12 +4763,6 @@ body {
|
|
|
4734
4763
|
.data-\[state\=active\]\:text-primary[data-state=active] {
|
|
4735
4764
|
color: hsl(var(--primary));
|
|
4736
4765
|
}
|
|
4737
|
-
.data-\[state\=checked\]\:text-primary-foreground[data-state=checked] {
|
|
4738
|
-
color: hsl(var(--primary-foreground));
|
|
4739
|
-
}
|
|
4740
|
-
.data-\[state\=indeterminate\]\:text-primary-foreground[data-state=indeterminate] {
|
|
4741
|
-
color: hsl(var(--primary-foreground));
|
|
4742
|
-
}
|
|
4743
4766
|
.data-\[state\=open\]\:text-accent-foreground[data-state=open] {
|
|
4744
4767
|
color: hsl(var(--accent-foreground));
|
|
4745
4768
|
}
|
|
@@ -5010,12 +5033,6 @@ body {
|
|
|
5010
5033
|
.group\/navigation-menu[data-viewport=false] .group-data-\[viewport\=false\]\/navigation-menu\:mt-1\.5 {
|
|
5011
5034
|
margin-top: 0.375rem;
|
|
5012
5035
|
}
|
|
5013
|
-
.group[data-state=checked] .group-data-\[state\=checked\]\:block {
|
|
5014
|
-
display: block;
|
|
5015
|
-
}
|
|
5016
|
-
.group[data-state=indeterminate] .group-data-\[state\=indeterminate\]\:block {
|
|
5017
|
-
display: block;
|
|
5018
|
-
}
|
|
5019
5036
|
.group\/drawer-content[data-vaul-drawer-direction=bottom] .group-data-\[vaul-drawer-direction\=bottom\]\/drawer-content\:block {
|
|
5020
5037
|
display: block;
|
|
5021
5038
|
}
|
|
@@ -5284,6 +5301,10 @@ body {
|
|
|
5284
5301
|
.dark\:bg-slate-800\/60:is(.dark *) {
|
|
5285
5302
|
background-color: rgb(30 41 59 / 0.6);
|
|
5286
5303
|
}
|
|
5304
|
+
.dark\:bg-slate-900:is(.dark *) {
|
|
5305
|
+
--tw-bg-opacity: 1;
|
|
5306
|
+
background-color: rgb(15 23 42 / var(--tw-bg-opacity, 1));
|
|
5307
|
+
}
|
|
5287
5308
|
.dark\:bg-slate-900\/30:is(.dark *) {
|
|
5288
5309
|
background-color: rgb(15 23 42 / 0.3);
|
|
5289
5310
|
}
|
|
@@ -5432,6 +5453,10 @@ body {
|
|
|
5432
5453
|
--tw-bg-opacity: 1;
|
|
5433
5454
|
background-color: rgb(51 65 85 / var(--tw-bg-opacity, 1));
|
|
5434
5455
|
}
|
|
5456
|
+
.dark\:hover\:bg-slate-800:hover:is(.dark *) {
|
|
5457
|
+
--tw-bg-opacity: 1;
|
|
5458
|
+
background-color: rgb(30 41 59 / var(--tw-bg-opacity, 1));
|
|
5459
|
+
}
|
|
5435
5460
|
.dark\:hover\:bg-violet-400\/20:hover:is(.dark *) {
|
|
5436
5461
|
background-color: rgb(167 139 250 / 0.2);
|
|
5437
5462
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -93,11 +93,12 @@ interface ComboboxProps<T extends string> extends ErrorMessageProps {
|
|
|
93
93
|
className?: string;
|
|
94
94
|
placeholder?: string;
|
|
95
95
|
searchPlaceholder?: string;
|
|
96
|
+
empty?: React.ReactNode;
|
|
96
97
|
label?: string;
|
|
97
98
|
labelClassname?: string;
|
|
98
99
|
testIds?: ComboboxTestIds;
|
|
99
100
|
}
|
|
100
|
-
declare function Combobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, label, labelClassname, testIds, error, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare function Combobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, empty, label, labelClassname, testIds, error, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
101
102
|
|
|
102
103
|
interface MultiComboboxTestIds {
|
|
103
104
|
root?: string;
|
|
@@ -1527,6 +1528,23 @@ interface WeekViewProps {
|
|
|
1527
1528
|
}
|
|
1528
1529
|
declare function WeekView({ currentDate, events, onEventSelect, onEventCreate, }: WeekViewProps): react_jsx_runtime.JSX.Element;
|
|
1529
1530
|
|
|
1531
|
+
interface TreeNode {
|
|
1532
|
+
id: string;
|
|
1533
|
+
label: string;
|
|
1534
|
+
defaultChecked?: boolean;
|
|
1535
|
+
children?: TreeNode[];
|
|
1536
|
+
}
|
|
1537
|
+
interface CheckboxTreeProps {
|
|
1538
|
+
tree: TreeNode;
|
|
1539
|
+
renderNode: (props: {
|
|
1540
|
+
node: TreeNode;
|
|
1541
|
+
isChecked: boolean | "indeterminate";
|
|
1542
|
+
onCheckedChange: () => void;
|
|
1543
|
+
children: React__default.ReactNode;
|
|
1544
|
+
}) => React__default.ReactNode;
|
|
1545
|
+
}
|
|
1546
|
+
declare function CheckboxTree({ tree, renderNode }: CheckboxTreeProps): React__default.ReactNode;
|
|
1547
|
+
|
|
1530
1548
|
declare function useIsMobile(): boolean;
|
|
1531
1549
|
|
|
1532
1550
|
interface Position {
|
|
@@ -1546,4 +1564,4 @@ declare const useDrag: (options?: UseDragOptions) => {
|
|
|
1546
1564
|
isDragging: boolean;
|
|
1547
1565
|
};
|
|
1548
1566
|
|
|
1549
|
-
export { AddButton, AgendaDaysToShow, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, AvatarSelect, type AvatarSelectItem, BackButton, Badge, type BadgeColorType, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, type CalendarEvent, type CalendarProps, type CalendarView, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, CheckButton, CheckboxBase, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DebouncedInput, type DebouncedInputProps, DefaultEndHour, DefaultStartHour, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, EditButton, EndHour, ErrorMessage, EventCalendar, type EventColor, EventDialog, EventGap, EventHeight, EventItem, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RangePicker, type RangePickerProps, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, StartHour, StatusIndicator, type StatusProps, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, type TimePickerType, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, WeekCellsHeight, WeekView, addHoursToDate, badgeVariants, buttonVariantsBase, compactTick, convert12HourTo24Hour, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, getAgendaEventsForDay, getAllEventsForDay, getArrowByType, getBorderRadiusClasses, getDateByType, getEventColorClasses, getEventsForDay, getSpanningEventsForDay, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, toast, useCalendarDnd, useChartHighlights, useCurrentTimeIndicator, useDrag, useEventVisibility, useIsMobile, useTheme, type valueFormatter };
|
|
1567
|
+
export { AddButton, AgendaDaysToShow, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, AvatarSelect, type AvatarSelectItem, BackButton, Badge, type BadgeColorType, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, type CalendarEvent, type CalendarProps, type CalendarView, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DebouncedInput, type DebouncedInputProps, DefaultEndHour, DefaultStartHour, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, EditButton, EndHour, ErrorMessage, EventCalendar, type EventColor, EventDialog, EventGap, EventHeight, EventItem, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RangePicker, type RangePickerProps, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, StartHour, StatusIndicator, type StatusProps, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, type TimePickerType, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, WeekCellsHeight, WeekView, addHoursToDate, badgeVariants, buttonVariantsBase, compactTick, convert12HourTo24Hour, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, getAgendaEventsForDay, getAllEventsForDay, getArrowByType, getBorderRadiusClasses, getDateByType, getEventColorClasses, getEventsForDay, getSpanningEventsForDay, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, toast, useCalendarDnd, useChartHighlights, useCurrentTimeIndicator, useDrag, useEventVisibility, useIsMobile, useTheme, type valueFormatter };
|
package/dist/index.d.ts
CHANGED
|
@@ -93,11 +93,12 @@ interface ComboboxProps<T extends string> extends ErrorMessageProps {
|
|
|
93
93
|
className?: string;
|
|
94
94
|
placeholder?: string;
|
|
95
95
|
searchPlaceholder?: string;
|
|
96
|
+
empty?: React.ReactNode;
|
|
96
97
|
label?: string;
|
|
97
98
|
labelClassname?: string;
|
|
98
99
|
testIds?: ComboboxTestIds;
|
|
99
100
|
}
|
|
100
|
-
declare function Combobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, label, labelClassname, testIds, error, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
101
|
+
declare function Combobox<T extends string>({ items, selected, onChange, className, placeholder, searchPlaceholder, empty, label, labelClassname, testIds, error, }: ComboboxProps<T>): react_jsx_runtime.JSX.Element;
|
|
101
102
|
|
|
102
103
|
interface MultiComboboxTestIds {
|
|
103
104
|
root?: string;
|
|
@@ -1527,6 +1528,23 @@ interface WeekViewProps {
|
|
|
1527
1528
|
}
|
|
1528
1529
|
declare function WeekView({ currentDate, events, onEventSelect, onEventCreate, }: WeekViewProps): react_jsx_runtime.JSX.Element;
|
|
1529
1530
|
|
|
1531
|
+
interface TreeNode {
|
|
1532
|
+
id: string;
|
|
1533
|
+
label: string;
|
|
1534
|
+
defaultChecked?: boolean;
|
|
1535
|
+
children?: TreeNode[];
|
|
1536
|
+
}
|
|
1537
|
+
interface CheckboxTreeProps {
|
|
1538
|
+
tree: TreeNode;
|
|
1539
|
+
renderNode: (props: {
|
|
1540
|
+
node: TreeNode;
|
|
1541
|
+
isChecked: boolean | "indeterminate";
|
|
1542
|
+
onCheckedChange: () => void;
|
|
1543
|
+
children: React__default.ReactNode;
|
|
1544
|
+
}) => React__default.ReactNode;
|
|
1545
|
+
}
|
|
1546
|
+
declare function CheckboxTree({ tree, renderNode }: CheckboxTreeProps): React__default.ReactNode;
|
|
1547
|
+
|
|
1530
1548
|
declare function useIsMobile(): boolean;
|
|
1531
1549
|
|
|
1532
1550
|
interface Position {
|
|
@@ -1546,4 +1564,4 @@ declare const useDrag: (options?: UseDragOptions) => {
|
|
|
1546
1564
|
isDragging: boolean;
|
|
1547
1565
|
};
|
|
1548
1566
|
|
|
1549
|
-
export { AddButton, AgendaDaysToShow, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, AvatarSelect, type AvatarSelectItem, BackButton, Badge, type BadgeColorType, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, type CalendarEvent, type CalendarProps, type CalendarView, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, CheckButton, CheckboxBase, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DebouncedInput, type DebouncedInputProps, DefaultEndHour, DefaultStartHour, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, EditButton, EndHour, ErrorMessage, EventCalendar, type EventColor, EventDialog, EventGap, EventHeight, EventItem, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RangePicker, type RangePickerProps, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, StartHour, StatusIndicator, type StatusProps, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, type TimePickerType, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, WeekCellsHeight, WeekView, addHoursToDate, badgeVariants, buttonVariantsBase, compactTick, convert12HourTo24Hour, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, getAgendaEventsForDay, getAllEventsForDay, getArrowByType, getBorderRadiusClasses, getDateByType, getEventColorClasses, getEventsForDay, getSpanningEventsForDay, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, toast, useCalendarDnd, useChartHighlights, useCurrentTimeIndicator, useDrag, useEventVisibility, useIsMobile, useTheme, type valueFormatter };
|
|
1567
|
+
export { AddButton, AgendaDaysToShow, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarFallbackBase, AvatarImageBase, AvatarSelect, type AvatarSelectItem, BackButton, Badge, type BadgeColorType, BarChart, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, ButtonBase, ButtonGroupBase, type ButtonProps, CalendarBase, CalendarDndProvider, type CalendarEvent, type CalendarProps, type CalendarView, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, type CarouselApi, CarouselBase, CarouselContentBase, CarouselItemBase, CarouselNextBase, CarouselPreviousBase, ChangeButton, Chart, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, type ComboboxProps, type ComboboxTestIds, CommandBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DebouncedInput, type DebouncedInputProps, DefaultEndHour, DefaultStartHour, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent, DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, EditButton, EndHour, ErrorMessage, EventCalendar, type EventColor, EventDialog, EventGap, EventHeight, EventItem, EventsPopup, FavoriteButton, FileUploader, type FileUploaderProps, type FileWithPreview, FilterButton, HideButton, Highlights, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, InputBase, type InputBaseProps, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase, LikeButton, CustomLineChart as LineChart, LoadingBase, LockButton, type Margins, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MoreButton, MultiCombobox, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NotificationButton, type Padding, type Period, PeriodsDropdown, CustomPieChart as PieChart, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, type ProgressBaseProps, ProgressCirclesBase, type ProgressCirclesBaseProps, ProgressPanelsBase, type ProgressPanelsBaseProps, ProgressSegmentsBase, type ProgressSegmentsBaseProps, type ProgressType, RangePicker, type RangePickerProps, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectGroupBase, type SelectItem, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, type SliderBaseProps, StartHour, StatusIndicator, type StatusProps, SwitchBase, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, type TextAreaBaseProps, type Theme, ThemeProviderBase, TimePicker, TimePickerInput, type TimePickerInputProps, type TimePickerType, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple, TooltipTriggerBase, RechartTooltipWithTotal as TooltipWithTotal, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, ViewButton, VisibilityButton, WeekCellsHeight, WeekView, addHoursToDate, badgeVariants, buttonVariantsBase, compactTick, convert12HourTo24Hour, detectDataFields, detectXAxis, display12HourValue, formatFieldName, generateAdditionalColors, getAgendaEventsForDay, getAllEventsForDay, getArrowByType, getBorderRadiusClasses, getDateByType, getEventColorClasses, getEventsForDay, getSpanningEventsForDay, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, toast, useCalendarDnd, useChartHighlights, useCurrentTimeIndicator, useDrag, useEventVisibility, useIsMobile, useTheme, type valueFormatter };
|
package/dist/index.js
CHANGED
|
@@ -532,6 +532,7 @@ __export(index_exports, {
|
|
|
532
532
|
Chart: () => Chart_default,
|
|
533
533
|
CheckButton: () => CheckButton,
|
|
534
534
|
CheckboxBase: () => CheckboxBase,
|
|
535
|
+
CheckboxTree: () => CheckboxTree,
|
|
535
536
|
CloseAllButton: () => CloseAllButton_default,
|
|
536
537
|
CloseButton: () => CloseButton,
|
|
537
538
|
CodeBlock: () => CodeBlock,
|
|
@@ -1222,7 +1223,7 @@ var CommandItemBase = React5.forwardRef(({ className, testid: dataTestId = "comm
|
|
|
1222
1223
|
{
|
|
1223
1224
|
ref,
|
|
1224
1225
|
className: cn(
|
|
1225
|
-
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-muted data-[selected=true]:text-primary data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-[1.02] active:scale-[0.98]",
|
|
1226
|
+
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-muted data-[selected=true]:text-primary data-[disabled=true]:opacity-50 aria-[selected=true]:bg-accent hover:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-[1.02] active:scale-[0.98]",
|
|
1226
1227
|
className
|
|
1227
1228
|
),
|
|
1228
1229
|
"data-testid": dataTestId,
|
|
@@ -1291,6 +1292,7 @@ function ComboboxBase({
|
|
|
1291
1292
|
keepOpen = false,
|
|
1292
1293
|
closeAll,
|
|
1293
1294
|
searchPlaceholder,
|
|
1295
|
+
empty = "Nenhum dado encontrado",
|
|
1294
1296
|
error,
|
|
1295
1297
|
testIds = {}
|
|
1296
1298
|
}) {
|
|
@@ -1356,7 +1358,7 @@ function ComboboxBase({
|
|
|
1356
1358
|
}
|
|
1357
1359
|
),
|
|
1358
1360
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(CommandListBase, { "data-testid": testIds.list ?? "combobox-list", children: [
|
|
1359
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CommandEmptyBase, { "data-testid": testIds.empty ?? "combobox-empty", children:
|
|
1361
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CommandEmptyBase, { "data-testid": testIds.empty ?? "combobox-empty", children: empty }),
|
|
1360
1362
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CommandGroupBase, { "data-testid": testIds.group ?? "combobox-group", children: items.map((item) => {
|
|
1361
1363
|
const isSelected = checkIsSelected(item.value);
|
|
1362
1364
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
@@ -1421,6 +1423,7 @@ function Combobox({
|
|
|
1421
1423
|
className,
|
|
1422
1424
|
placeholder,
|
|
1423
1425
|
searchPlaceholder,
|
|
1426
|
+
empty,
|
|
1424
1427
|
label,
|
|
1425
1428
|
labelClassname,
|
|
1426
1429
|
testIds,
|
|
@@ -1457,6 +1460,7 @@ function Combobox({
|
|
|
1457
1460
|
handleSelection,
|
|
1458
1461
|
checkIsSelected,
|
|
1459
1462
|
searchPlaceholder,
|
|
1463
|
+
empty,
|
|
1460
1464
|
error,
|
|
1461
1465
|
testIds
|
|
1462
1466
|
}
|
|
@@ -1748,7 +1752,7 @@ var SelectItemBase = React8.forwardRef(({ className, children, ...props }, ref)
|
|
|
1748
1752
|
{
|
|
1749
1753
|
ref,
|
|
1750
1754
|
className: cn(
|
|
1751
|
-
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5
|
|
1755
|
+
"relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 hover:bg-accent focus:bg-accent data-[highlighted]:bg-accent text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-muted data-[selected=true]:text-primary data-[disabled=true]:opacity-50",
|
|
1752
1756
|
className
|
|
1753
1757
|
),
|
|
1754
1758
|
...props,
|
|
@@ -2129,7 +2133,7 @@ function Select({
|
|
|
2129
2133
|
className
|
|
2130
2134
|
}) {
|
|
2131
2135
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { "data-testid": testIds.root ?? "select-root", children: [
|
|
2132
|
-
label
|
|
2136
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LabelBase_default, { className: labelClassname, children: label }),
|
|
2133
2137
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
2134
2138
|
SelectBase,
|
|
2135
2139
|
{
|
|
@@ -7524,44 +7528,50 @@ var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
|
7524
7528
|
var import_react30 = require("@phosphor-icons/react");
|
|
7525
7529
|
var import_framer_motion11 = require("framer-motion");
|
|
7526
7530
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
7527
|
-
var CheckboxBase = React24.forwardRef(({ className, testid: dataTestId = "checkbox-base", ...props }, ref) =>
|
|
7528
|
-
|
|
7529
|
-
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7534
|
-
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
))
|
|
7531
|
+
var CheckboxBase = React24.forwardRef(({ className, testid: dataTestId = "checkbox-base", checked: checkedProp, defaultChecked, onCheckedChange, ...props }, ref) => {
|
|
7532
|
+
const isControlled = checkedProp !== void 0;
|
|
7533
|
+
const [checkedState, setCheckedState] = React24.useState(
|
|
7534
|
+
isControlled ? checkedProp : defaultChecked ?? false
|
|
7535
|
+
);
|
|
7536
|
+
React24.useEffect(() => {
|
|
7537
|
+
if (isControlled) setCheckedState(checkedProp);
|
|
7538
|
+
}, [checkedProp, isControlled]);
|
|
7539
|
+
const handleCheckedChange = (next) => {
|
|
7540
|
+
if (!isControlled) setCheckedState(next);
|
|
7541
|
+
onCheckedChange?.(next);
|
|
7542
|
+
};
|
|
7543
|
+
const stateClass = checkedState === true || checkedState === "indeterminate" ? "bg-primary text-primary-foreground" : "";
|
|
7544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
7545
|
+
CheckboxPrimitive.Root,
|
|
7546
|
+
{
|
|
7547
|
+
ref,
|
|
7548
|
+
checked: checkedProp,
|
|
7549
|
+
defaultChecked,
|
|
7550
|
+
onCheckedChange: handleCheckedChange,
|
|
7551
|
+
className: cn(
|
|
7552
|
+
"group h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 transition-colors",
|
|
7553
|
+
stateClass,
|
|
7554
|
+
className
|
|
7555
|
+
),
|
|
7556
|
+
"data-testid": dataTestId,
|
|
7557
|
+
...props,
|
|
7558
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
7559
|
+
import_framer_motion11.motion.div,
|
|
7560
|
+
{
|
|
7561
|
+
initial: { scale: 0, opacity: 0, rotate: -90 },
|
|
7562
|
+
animate: { scale: 1, opacity: 1, rotate: 0 },
|
|
7563
|
+
exit: { scale: 0, opacity: 0, rotate: 90 },
|
|
7564
|
+
transition: { type: "spring", stiffness: 500, damping: 30 },
|
|
7565
|
+
className: "flex items-center justify-center text-current",
|
|
7566
|
+
children: [
|
|
7567
|
+
checkedState === true && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react30.CheckIcon, { className: "h-4 w-4", weight: "bold" }),
|
|
7568
|
+
checkedState === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react30.MinusIcon, { className: "h-4 w-4", weight: "bold" })
|
|
7569
|
+
]
|
|
7570
|
+
}
|
|
7571
|
+
) })
|
|
7572
|
+
}
|
|
7573
|
+
);
|
|
7574
|
+
});
|
|
7565
7575
|
CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
|
|
7566
7576
|
|
|
7567
7577
|
// src/components/ui/form/CollapsibleBase.tsx
|
|
@@ -10959,7 +10969,7 @@ function DateTimePicker({
|
|
|
10959
10969
|
{
|
|
10960
10970
|
variant: "outline",
|
|
10961
10971
|
className: cn(
|
|
10962
|
-
"w-full justify-start text-left min-w-0 overflow-hidden
|
|
10972
|
+
"w-full justify-start text-left min-w-0 overflow-hidden",
|
|
10963
10973
|
!date && "text-muted-foreground"
|
|
10964
10974
|
),
|
|
10965
10975
|
children: [
|
|
@@ -14478,14 +14488,164 @@ function WeekView({
|
|
|
14478
14488
|
] });
|
|
14479
14489
|
}
|
|
14480
14490
|
|
|
14481
|
-
// src/
|
|
14491
|
+
// src/components/ui/form/CheckBoxThree.tsx
|
|
14482
14492
|
var import_react69 = require("react");
|
|
14493
|
+
var import_framer_motion19 = require("framer-motion");
|
|
14494
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
14495
|
+
function useCheckboxTree(initialTree) {
|
|
14496
|
+
const initialCheckedNodes = (0, import_react69.useMemo)(() => {
|
|
14497
|
+
const checkedSet = /* @__PURE__ */ new Set();
|
|
14498
|
+
const initializeCheckedNodes = (node) => {
|
|
14499
|
+
if (node.defaultChecked) {
|
|
14500
|
+
checkedSet.add(node.id);
|
|
14501
|
+
}
|
|
14502
|
+
node.children?.forEach(initializeCheckedNodes);
|
|
14503
|
+
};
|
|
14504
|
+
initializeCheckedNodes(initialTree);
|
|
14505
|
+
return checkedSet;
|
|
14506
|
+
}, [initialTree]);
|
|
14507
|
+
const [checkedNodes, setCheckedNodes] = (0, import_react69.useState)(initialCheckedNodes);
|
|
14508
|
+
const isChecked = (0, import_react69.useCallback)(
|
|
14509
|
+
(node) => {
|
|
14510
|
+
if (!node.children) {
|
|
14511
|
+
return checkedNodes.has(node.id);
|
|
14512
|
+
}
|
|
14513
|
+
const childrenChecked = node.children.map((child) => isChecked(child));
|
|
14514
|
+
if (childrenChecked.every((status) => status === true)) {
|
|
14515
|
+
return true;
|
|
14516
|
+
}
|
|
14517
|
+
if (childrenChecked.some(
|
|
14518
|
+
(status) => status === true || status === "indeterminate"
|
|
14519
|
+
)) {
|
|
14520
|
+
return "indeterminate";
|
|
14521
|
+
}
|
|
14522
|
+
return false;
|
|
14523
|
+
},
|
|
14524
|
+
[checkedNodes]
|
|
14525
|
+
);
|
|
14526
|
+
const handleCheck = (0, import_react69.useCallback)(
|
|
14527
|
+
(node) => {
|
|
14528
|
+
const newCheckedNodes = new Set(checkedNodes);
|
|
14529
|
+
const toggleNode = (n, check) => {
|
|
14530
|
+
if (check) {
|
|
14531
|
+
newCheckedNodes.add(n.id);
|
|
14532
|
+
} else {
|
|
14533
|
+
newCheckedNodes.delete(n.id);
|
|
14534
|
+
}
|
|
14535
|
+
for (const child of n.children ?? []) {
|
|
14536
|
+
toggleNode(child, check);
|
|
14537
|
+
}
|
|
14538
|
+
};
|
|
14539
|
+
const currentStatus = isChecked(node);
|
|
14540
|
+
const newCheck = currentStatus !== true;
|
|
14541
|
+
toggleNode(node, newCheck);
|
|
14542
|
+
setCheckedNodes(newCheckedNodes);
|
|
14543
|
+
},
|
|
14544
|
+
[checkedNodes, isChecked]
|
|
14545
|
+
);
|
|
14546
|
+
return { handleCheck, isChecked };
|
|
14547
|
+
}
|
|
14548
|
+
function CheckboxTree({ tree, renderNode }) {
|
|
14549
|
+
const { isChecked, handleCheck } = useCheckboxTree(tree);
|
|
14550
|
+
const DefaultNode = ({
|
|
14551
|
+
node,
|
|
14552
|
+
isChecked: status,
|
|
14553
|
+
onCheckedChange,
|
|
14554
|
+
children
|
|
14555
|
+
}) => {
|
|
14556
|
+
const [open, setOpen] = (0, import_react69.useState)(() => !!node.children && status !== false);
|
|
14557
|
+
const checkboxRef = (0, import_react69.useRef)(null);
|
|
14558
|
+
(0, import_react69.useEffect)(() => {
|
|
14559
|
+
if (checkboxRef.current) {
|
|
14560
|
+
checkboxRef.current.indeterminate = status === "indeterminate";
|
|
14561
|
+
}
|
|
14562
|
+
if (node.children) {
|
|
14563
|
+
setOpen(status !== false);
|
|
14564
|
+
}
|
|
14565
|
+
}, [status, node.children]);
|
|
14566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "pl-1", children: [
|
|
14567
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
14568
|
+
node.children ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
14569
|
+
"button",
|
|
14570
|
+
{
|
|
14571
|
+
"aria-label": open ? "Fechar" : "Abrir",
|
|
14572
|
+
onClick: () => setOpen((v) => !v),
|
|
14573
|
+
className: "w-6 h-6 flex items-center justify-center rounded hover:bg-slate-100 dark:hover:bg-slate-800",
|
|
14574
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
14575
|
+
import_framer_motion19.motion.span,
|
|
14576
|
+
{
|
|
14577
|
+
animate: { rotate: open ? 90 : 0 },
|
|
14578
|
+
transition: { duration: 0.18 },
|
|
14579
|
+
className: "inline-block text-slate-500",
|
|
14580
|
+
children: "\u25B6"
|
|
14581
|
+
}
|
|
14582
|
+
)
|
|
14583
|
+
}
|
|
14584
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "w-6 h-6" }),
|
|
14585
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [
|
|
14586
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { className: "relative", children: [
|
|
14587
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
14588
|
+
"input",
|
|
14589
|
+
{
|
|
14590
|
+
ref: checkboxRef,
|
|
14591
|
+
type: "checkbox",
|
|
14592
|
+
checked: status === true,
|
|
14593
|
+
onChange: onCheckedChange,
|
|
14594
|
+
className: "appearance-none w-5 h-5 rounded border border-slate-300 dark:border-slate-700 flex items-center justify-center bg-white dark:bg-slate-900 checked:bg-blue-600 checked:border-blue-600 focus:outline-none"
|
|
14595
|
+
}
|
|
14596
|
+
),
|
|
14597
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
14598
|
+
import_framer_motion19.motion.span,
|
|
14599
|
+
{
|
|
14600
|
+
initial: false,
|
|
14601
|
+
animate: { scale: status === true ? 1 : 0.8, opacity: status === true ? 1 : 0 },
|
|
14602
|
+
transition: { duration: 0.14 },
|
|
14603
|
+
className: "pointer-events-none absolute left-0 top-0 w-5 h-5 flex items-center justify-center text-white",
|
|
14604
|
+
children: status === true ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("svg", { width: "12", height: "10", viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", { d: "M1 5L4 8L11 1", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : null
|
|
14605
|
+
}
|
|
14606
|
+
)
|
|
14607
|
+
] }),
|
|
14608
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: "text-sm text-slate-700 dark:text-slate-200", children: node.label })
|
|
14609
|
+
] })
|
|
14610
|
+
] }),
|
|
14611
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_framer_motion19.AnimatePresence, { initial: false, children: open && node.children && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
14612
|
+
import_framer_motion19.motion.div,
|
|
14613
|
+
{
|
|
14614
|
+
initial: { height: 0, opacity: 0 },
|
|
14615
|
+
animate: { height: "auto", opacity: 1 },
|
|
14616
|
+
exit: { height: 0, opacity: 0 },
|
|
14617
|
+
transition: { duration: 0.18 },
|
|
14618
|
+
className: "ml-6 mt-2 overflow-hidden",
|
|
14619
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "flex flex-col gap-1", children })
|
|
14620
|
+
},
|
|
14621
|
+
"children"
|
|
14622
|
+
) })
|
|
14623
|
+
] });
|
|
14624
|
+
};
|
|
14625
|
+
const renderTreeNode = (node) => {
|
|
14626
|
+
const children = node.children?.map(renderTreeNode);
|
|
14627
|
+
const nodePayload = {
|
|
14628
|
+
children,
|
|
14629
|
+
isChecked: isChecked(node),
|
|
14630
|
+
node,
|
|
14631
|
+
onCheckedChange: () => handleCheck(node)
|
|
14632
|
+
};
|
|
14633
|
+
if (renderNode) {
|
|
14634
|
+
return renderNode(nodePayload);
|
|
14635
|
+
}
|
|
14636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(DefaultNode, { ...nodePayload });
|
|
14637
|
+
};
|
|
14638
|
+
return renderTreeNode(tree);
|
|
14639
|
+
}
|
|
14640
|
+
|
|
14641
|
+
// src/hooks/use-drag.tsx
|
|
14642
|
+
var import_react70 = require("react");
|
|
14483
14643
|
var useDrag = (options = {}) => {
|
|
14484
|
-
const [isDragging, setIsDragging] = (0,
|
|
14485
|
-
const [positions, setPositions] = (0,
|
|
14486
|
-
const dragStartPos = (0,
|
|
14487
|
-
const dragId = (0,
|
|
14488
|
-
const handleMouseDown = (0,
|
|
14644
|
+
const [isDragging, setIsDragging] = (0, import_react70.useState)(null);
|
|
14645
|
+
const [positions, setPositions] = (0, import_react70.useState)({});
|
|
14646
|
+
const dragStartPos = (0, import_react70.useRef)(null);
|
|
14647
|
+
const dragId = (0, import_react70.useRef)(null);
|
|
14648
|
+
const handleMouseDown = (0, import_react70.useCallback)((id, e) => {
|
|
14489
14649
|
e.preventDefault();
|
|
14490
14650
|
const currentPosition = positions[id] || { top: 0, left: 0 };
|
|
14491
14651
|
dragStartPos.current = {
|
|
@@ -14498,7 +14658,7 @@ var useDrag = (options = {}) => {
|
|
|
14498
14658
|
setIsDragging(id);
|
|
14499
14659
|
options.onDragStart?.(id);
|
|
14500
14660
|
}, [positions, options]);
|
|
14501
|
-
const handleMouseMove = (0,
|
|
14661
|
+
const handleMouseMove = (0, import_react70.useCallback)((e) => {
|
|
14502
14662
|
if (!isDragging || !dragStartPos.current || !dragId.current) return;
|
|
14503
14663
|
const deltaX = e.clientX - dragStartPos.current.x;
|
|
14504
14664
|
const deltaY = e.clientY - dragStartPos.current.y;
|
|
@@ -14514,7 +14674,7 @@ var useDrag = (options = {}) => {
|
|
|
14514
14674
|
}));
|
|
14515
14675
|
options.onDrag?.(dragId.current, newPosition);
|
|
14516
14676
|
}, [isDragging, options]);
|
|
14517
|
-
const handleMouseUp = (0,
|
|
14677
|
+
const handleMouseUp = (0, import_react70.useCallback)(() => {
|
|
14518
14678
|
if (dragId.current) {
|
|
14519
14679
|
options.onDragEnd?.(dragId.current);
|
|
14520
14680
|
}
|
|
@@ -14522,7 +14682,7 @@ var useDrag = (options = {}) => {
|
|
|
14522
14682
|
dragStartPos.current = null;
|
|
14523
14683
|
dragId.current = null;
|
|
14524
14684
|
}, [options]);
|
|
14525
|
-
(0,
|
|
14685
|
+
(0, import_react70.useEffect)(() => {
|
|
14526
14686
|
if (isDragging) {
|
|
14527
14687
|
document.addEventListener("mousemove", handleMouseMove);
|
|
14528
14688
|
document.addEventListener("mouseup", handleMouseUp);
|
|
@@ -14534,16 +14694,16 @@ var useDrag = (options = {}) => {
|
|
|
14534
14694
|
};
|
|
14535
14695
|
}
|
|
14536
14696
|
}, [isDragging, handleMouseMove, handleMouseUp]);
|
|
14537
|
-
const setPosition = (0,
|
|
14697
|
+
const setPosition = (0, import_react70.useCallback)((id, position) => {
|
|
14538
14698
|
setPositions((prev) => ({
|
|
14539
14699
|
...prev,
|
|
14540
14700
|
[id]: position
|
|
14541
14701
|
}));
|
|
14542
14702
|
}, []);
|
|
14543
|
-
const getPosition = (0,
|
|
14703
|
+
const getPosition = (0, import_react70.useCallback)((id) => {
|
|
14544
14704
|
return positions[id] || { top: 0, left: 0 };
|
|
14545
14705
|
}, [positions]);
|
|
14546
|
-
const isElementDragging = (0,
|
|
14706
|
+
const isElementDragging = (0, import_react70.useCallback)((id) => {
|
|
14547
14707
|
return isDragging === id;
|
|
14548
14708
|
}, [isDragging]);
|
|
14549
14709
|
return {
|