@gentleduck/registry-ui 0.2.12 → 0.3.1

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.
Files changed (45) hide show
  1. package/.turbo/turbo-test.log +5 -5
  2. package/CHANGELOG.md +26 -0
  3. package/LICENSE +21 -0
  4. package/SECURITY.md +19 -0
  5. package/package.json +10 -2
  6. package/src/accordion/accordion.tsx +1 -1
  7. package/src/alert/alert.tsx +1 -1
  8. package/src/alert-dialog/alert-dialog.tsx +7 -7
  9. package/src/avatar/avatar.tsx +1 -1
  10. package/src/breadcrumb/breadcrumb.tsx +2 -2
  11. package/src/button/button.tsx +1 -1
  12. package/src/calendar/calendar-day.tsx +131 -0
  13. package/src/calendar/calendar-header.tsx +291 -0
  14. package/src/calendar/calendar.tsx +195 -182
  15. package/src/calendar/calendar.types.ts +135 -0
  16. package/src/calendar/calendar.utils.ts +23 -0
  17. package/src/calendar/index.ts +2 -1
  18. package/src/card/card.tsx +1 -1
  19. package/src/carousel/carousel.tsx +1 -1
  20. package/src/chart/chart.tsx +1 -1
  21. package/src/collapsible/collapsible.tsx +1 -1
  22. package/src/combobox/combobox.tsx +1 -0
  23. package/src/command/command.tsx +13 -8
  24. package/src/context-menu/context-menu.tsx +6 -6
  25. package/src/dialog/dialog-responsive.tsx +5 -5
  26. package/src/dialog/dialog.tsx +13 -11
  27. package/src/direction/direction.tsx +2 -1
  28. package/src/drawer/drawer.tsx +5 -5
  29. package/src/dropdown-menu/dropdown-menu.tsx +6 -6
  30. package/src/empty/empty.tsx +1 -1
  31. package/src/field/field.tsx +2 -2
  32. package/src/hover-card/hover-card.tsx +1 -1
  33. package/src/input-group/input-group.tsx +1 -1
  34. package/src/input-otp/input-otp.tsx +1 -1
  35. package/src/item/item.tsx +5 -5
  36. package/src/menubar/menubar.tsx +8 -8
  37. package/src/navigation-menu/navigation-menu.tsx +4 -4
  38. package/src/popover/popover.tsx +1 -1
  39. package/src/resizable/resizable.tsx +1 -1
  40. package/src/select/select.tsx +6 -6
  41. package/src/sheet/sheet.tsx +5 -5
  42. package/src/sonner/sonner.chunks.tsx +0 -1
  43. package/src/table/table.tsx +1 -1
  44. package/src/tabs/tabs.tsx +1 -1
  45. package/src/tooltip/tooltip.tsx +1 -1
@@ -29,8 +29,9 @@ const CommandInput = React.forwardRef<
29
29
  React.ComponentRef<typeof CommandPrimitive.Input>,
30
30
  React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input> & {
31
31
  wrapperClassName?: string
32
+ children?: React.ReactNode
32
33
  }
33
- >(({ className, wrapperClassName, placeholder = 'Search...', autoFocus = false, ...props }, ref) => (
34
+ >(({ className, wrapperClassName, placeholder = 'Search...', autoFocus = false, children, ...props }, ref) => (
34
35
  <div className={cn('mb-2 flex items-center gap-2 border-b px-1', wrapperClassName)} data-slot="command-input">
35
36
  <Search aria-hidden="true" className="size-5 shrink-0 opacity-50" />
36
37
  <CommandPrimitive.Input
@@ -44,6 +45,7 @@ const CommandInput = React.forwardRef<
44
45
  // tabIndex={0}
45
46
  {...props}
46
47
  />
48
+ {children}
47
49
  </div>
48
50
  ))
49
51
  CommandInput.displayName = CommandPrimitive.Input.displayName
@@ -161,11 +163,14 @@ CommandShortcut.displayName = 'CommandShortcut'
161
163
  function CommandDialog({
162
164
  children,
163
165
  shouldFilter,
166
+ contentClassName,
164
167
  ...props
165
- }: React.ComponentPropsWithoutRef<typeof Dialog> & { shouldFilter?: boolean }) {
168
+ }: React.ComponentPropsWithoutRef<typeof Dialog> & { shouldFilter?: boolean; contentClassName?: string }) {
166
169
  return (
167
170
  <Dialog {...props}>
168
- <DialogContent className="h-125 max-w-full p-0 lg:w-[700px]">
171
+ <DialogContent
172
+ className={cn('h-125 max-w-full p-0 transition-all duration-200 lg:w-[700px]', contentClassName)}
173
+ hideClose>
169
174
  <DialogTitle className="sr-only">Command palette</DialogTitle>
170
175
  <DialogDescription className="sr-only">Search for commands and navigation items</DialogDescription>
171
176
  <Command className="max-w-full" shouldFilter={shouldFilter}>
@@ -183,13 +188,13 @@ function useCommandListContext(__scopeCommand: Parameters<typeof CommandPrimitiv
183
188
 
184
189
  export {
185
190
  Command,
186
- CommandInput,
187
- CommandList,
191
+ CommandDialog,
192
+ CommandEmpty,
188
193
  CommandGroup,
194
+ CommandInput,
189
195
  CommandItem,
190
- CommandEmpty,
191
- CommandShortcut,
196
+ CommandList,
192
197
  CommandSeparator,
193
- CommandDialog,
198
+ CommandShortcut,
194
199
  useCommandListContext,
195
200
  }
@@ -169,18 +169,18 @@ ContextMenuShortcut.displayName = 'ContextMenuShortcut'
169
169
 
170
170
  export {
171
171
  ContextMenu,
172
- ContextMenuTrigger,
172
+ ContextMenuCheckboxItem,
173
173
  ContextMenuContent,
174
+ ContextMenuGroup,
174
175
  ContextMenuItem,
175
- ContextMenuCheckboxItem,
176
- ContextMenuRadioItem,
177
176
  ContextMenuLabel,
177
+ ContextMenuPortal,
178
+ ContextMenuRadioGroup,
179
+ ContextMenuRadioItem,
178
180
  ContextMenuSeparator,
179
181
  ContextMenuShortcut,
180
- ContextMenuGroup,
181
- ContextMenuPortal,
182
182
  ContextMenuSub,
183
183
  ContextMenuSubContent,
184
184
  ContextMenuSubTrigger,
185
- ContextMenuRadioGroup,
185
+ ContextMenuTrigger,
186
186
  }
@@ -137,12 +137,12 @@ DialogDescriptionResponsive.displayName = 'DialogDescriptionResponsive'
137
137
  DialogCloseResponsive.displayName = 'DialogCloseResponsive'
138
138
 
139
139
  export {
140
- DialogResponsive,
141
- DialogTriggerResponsive,
140
+ DialogCloseResponsive,
142
141
  DialogContentResponsive,
143
- DialogHeaderResponsive,
142
+ DialogDescriptionResponsive,
144
143
  DialogFooterResponsive,
144
+ DialogHeaderResponsive,
145
+ DialogResponsive,
145
146
  DialogTitleResponsive,
146
- DialogDescriptionResponsive,
147
- DialogCloseResponsive,
147
+ DialogTriggerResponsive,
148
148
  }
@@ -35,8 +35,8 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName
35
35
 
36
36
  const DialogContent = React.forwardRef<
37
37
  React.ComponentRef<typeof DialogPrimitive.Content>,
38
- React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { closeText?: string }
39
- >(({ className, children, closeText = 'Close', ...props }, ref) => (
38
+ React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { closeText?: string; hideClose?: boolean }
39
+ >(({ className, children, closeText = 'Close', hideClose = false, ...props }, ref) => (
40
40
  <DialogPortal>
41
41
  <DialogOverlay />
42
42
  <DialogPrimitive.Content
@@ -48,10 +48,12 @@ const DialogContent = React.forwardRef<
48
48
  )}
49
49
  {...props}>
50
50
  {children}
51
- <DialogPrimitive.Close className="absolute end-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
52
- <X aria-hidden="true" className="h-4 w-4" />
53
- <span className="sr-only">{closeText}</span>
54
- </DialogPrimitive.Close>
51
+ {!hideClose && (
52
+ <DialogPrimitive.Close className="absolute end-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
53
+ <X aria-hidden="true" className="h-4 w-4" />
54
+ <span className="sr-only">{closeText}</span>
55
+ </DialogPrimitive.Close>
56
+ )}
55
57
  </DialogPrimitive.Content>
56
58
  </DialogPortal>
57
59
  ))
@@ -93,13 +95,13 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName
93
95
 
94
96
  export {
95
97
  Dialog,
96
- DialogPortal,
97
- DialogOverlay,
98
- DialogTrigger,
99
98
  DialogClose,
100
99
  DialogContent,
101
- DialogHeader,
100
+ DialogDescription,
102
101
  DialogFooter,
102
+ DialogHeader,
103
+ DialogOverlay,
104
+ DialogPortal,
103
105
  DialogTitle,
104
- DialogDescription,
106
+ DialogTrigger,
105
107
  }
@@ -9,5 +9,6 @@ import {
9
9
  Provider,
10
10
  useDirection,
11
11
  } from '@gentleduck/primitives/direction'
12
+
12
13
  export type { Direction, DirectionProviderProps }
13
- export { useDirection, Provider, DirectionProvider, DirectionContext, DIRECTION_DICTIONARY }
14
+ export { DIRECTION_DICTIONARY, DirectionContext, DirectionProvider, Provider, useDirection }
@@ -173,13 +173,13 @@ DrawerDescription.displayName = 'DrawerDescription'
173
173
 
174
174
  export {
175
175
  Drawer,
176
- DrawerPortal,
177
- DrawerOverlay,
178
- DrawerTrigger,
179
176
  DrawerClose,
180
177
  DrawerContent,
181
- DrawerHeader,
178
+ DrawerDescription,
182
179
  DrawerFooter,
180
+ DrawerHeader,
181
+ DrawerOverlay,
182
+ DrawerPortal,
183
183
  DrawerTitle,
184
- DrawerDescription,
184
+ DrawerTrigger,
185
185
  }
@@ -172,18 +172,18 @@ DropdownMenuShortcut.displayName = 'DropdownMenuShortcut'
172
172
 
173
173
  export {
174
174
  DropdownMenu,
175
- DropdownMenuTrigger,
175
+ DropdownMenuCheckboxItem,
176
176
  DropdownMenuContent,
177
+ DropdownMenuGroup,
177
178
  DropdownMenuItem,
178
- DropdownMenuCheckboxItem,
179
- DropdownMenuRadioItem,
180
179
  DropdownMenuLabel,
180
+ DropdownMenuPortal,
181
+ DropdownMenuRadioGroup,
182
+ DropdownMenuRadioItem,
181
183
  DropdownMenuSeparator,
182
184
  DropdownMenuShortcut,
183
- DropdownMenuGroup,
184
- DropdownMenuPortal,
185
185
  DropdownMenuSub,
186
186
  DropdownMenuSubContent,
187
187
  DropdownMenuSubTrigger,
188
- DropdownMenuRadioGroup,
188
+ DropdownMenuTrigger,
189
189
  }
@@ -83,4 +83,4 @@ const EmptyContent = React.forwardRef<HTMLDivElement, React.ComponentProps<'div'
83
83
  })
84
84
  EmptyContent.displayName = 'EmptyContent'
85
85
 
86
- export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia }
86
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle }
@@ -220,13 +220,13 @@ FieldError.displayName = 'FieldError'
220
220
 
221
221
  export {
222
222
  Field,
223
- FieldLabel,
223
+ FieldContent,
224
224
  FieldDescription,
225
225
  FieldError,
226
226
  FieldGroup,
227
+ FieldLabel,
227
228
  FieldLegend,
228
229
  FieldSeparator,
229
230
  FieldSet,
230
- FieldContent,
231
231
  FieldTitle,
232
232
  }
@@ -76,4 +76,4 @@ const HoverCardContent = React.forwardRef<
76
76
  })
77
77
  HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
78
78
 
79
- export { HoverCard, HoverCardTrigger, HoverCardContent }
79
+ export { HoverCard, HoverCardContent, HoverCardTrigger }
@@ -170,4 +170,4 @@ const InputGroupTextarea = React.forwardRef<HTMLTextAreaElement, React.Component
170
170
  )
171
171
  InputGroupTextarea.displayName = 'InputGroupTextarea'
172
172
 
173
- export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea }
173
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea }
@@ -63,4 +63,4 @@ InputOTPSeparator.displayName = 'InputOTPSeparator'
63
63
  const REGEXP_ONLY_DIGITS_AND_CHARS = InputOTPPrimitive.REGEXP_ONLY_DIGITS_AND_CHARS
64
64
  const REGEXP_ONLY_DIGITS = InputOTPPrimitive.REGEXP_ONLY_DIGITS
65
65
 
66
- export { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator, REGEXP_ONLY_DIGITS_AND_CHARS, REGEXP_ONLY_DIGITS }
66
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS }
package/src/item/item.tsx CHANGED
@@ -174,13 +174,13 @@ ItemFooter.displayName = 'ItemFooter'
174
174
 
175
175
  export {
176
176
  Item,
177
- ItemMedia,
178
- ItemContent,
179
177
  ItemActions,
178
+ ItemContent,
179
+ ItemDescription,
180
+ ItemFooter,
180
181
  ItemGroup,
182
+ ItemHeader,
183
+ ItemMedia,
181
184
  ItemSeparator,
182
185
  ItemTitle,
183
- ItemDescription,
184
- ItemHeader,
185
- ItemFooter,
186
186
  }
@@ -202,19 +202,19 @@ MenubarShortcut.displayName = 'MenubarShortcut'
202
202
 
203
203
  export {
204
204
  Menubar,
205
- MenubarMenu,
206
- MenubarTrigger,
205
+ MenubarCheckboxItem,
207
206
  MenubarContent,
207
+ MenubarGroup,
208
208
  MenubarItem,
209
- MenubarSeparator,
210
209
  MenubarLabel,
211
- MenubarCheckboxItem,
210
+ MenubarMenu,
211
+ MenubarPortal,
212
212
  MenubarRadioGroup,
213
213
  MenubarRadioItem,
214
- MenubarPortal,
214
+ MenubarSeparator,
215
+ MenubarShortcut,
216
+ MenubarSub,
215
217
  MenubarSubContent,
216
218
  MenubarSubTrigger,
217
- MenubarGroup,
218
- MenubarSub,
219
- MenubarShortcut,
219
+ MenubarTrigger,
220
220
  }
@@ -141,12 +141,12 @@ NavigationMenuIndicator.displayName = NavigationMenuPrimitive.Indicator.displayN
141
141
 
142
142
  export {
143
143
  NavigationMenu,
144
- NavigationMenuList,
145
- NavigationMenuItem,
146
144
  NavigationMenuContent,
147
- NavigationMenuTrigger,
148
- NavigationMenuLink,
149
145
  NavigationMenuIndicator,
146
+ NavigationMenuItem,
147
+ NavigationMenuLink,
148
+ NavigationMenuList,
149
+ NavigationMenuTrigger,
150
150
  NavigationMenuViewport,
151
151
  navigationMenuTriggerStyle,
152
152
  }
@@ -36,4 +36,4 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName
36
36
  export const PopoverClose: typeof PopoverPrimitive.Close = PopoverPrimitive.Close
37
37
  PopoverClose.displayName = 'PopoverClose'
38
38
 
39
- export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }
39
+ export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger }
@@ -51,4 +51,4 @@ const ResizableHandle = React.forwardRef<
51
51
  ))
52
52
  ResizableHandle.displayName = 'ResizableHandle'
53
53
 
54
- export { ResizablePanelGroup, ResizablePanel, ResizableHandle }
54
+ export { ResizableHandle, ResizablePanel, ResizablePanelGroup }
@@ -131,13 +131,13 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName
131
131
 
132
132
  export {
133
133
  Select,
134
- SelectGroup,
135
- SelectValue,
136
- SelectTrigger,
137
134
  SelectContent,
138
- SelectLabel,
135
+ SelectGroup,
139
136
  SelectItem,
140
- SelectSeparator,
141
- SelectScrollUpButton,
137
+ SelectLabel,
142
138
  SelectScrollDownButton,
139
+ SelectScrollUpButton,
140
+ SelectSeparator,
141
+ SelectTrigger,
142
+ SelectValue,
143
143
  }
@@ -92,13 +92,13 @@ SheetDescription.displayName = SheetPrimitive.Description.displayName
92
92
 
93
93
  export {
94
94
  Sheet,
95
- SheetPortal,
96
- SheetOverlay,
97
- SheetTrigger,
98
95
  SheetClose,
99
96
  SheetContent,
100
- SheetHeader,
97
+ SheetDescription,
101
98
  SheetFooter,
99
+ SheetHeader,
100
+ SheetOverlay,
101
+ SheetPortal,
102
102
  SheetTitle,
103
- SheetDescription,
103
+ SheetTrigger,
104
104
  }
@@ -31,7 +31,6 @@ const SonnerUpload = ({
31
31
  )}
32
32
  />
33
33
  <div className="flex w-full flex-col gap-2">
34
- {/* biome-ignore lint/a11y/useSemanticElements: status role on div is intentional for live region announcements */}
35
34
  <div className="flex w-full justify-between" role="status">
36
35
  <p className="text-foreground text-sm">
37
36
  {progress >= 100
@@ -92,4 +92,4 @@ const TableCaption = React.forwardRef<HTMLTableCaptionElement, React.HTMLAttribu
92
92
  )
93
93
  TableCaption.displayName = 'TableCaption'
94
94
 
95
- export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption }
95
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow }
package/src/tabs/tabs.tsx CHANGED
@@ -148,4 +148,4 @@ const TabsContent = React.forwardRef<
148
148
  })
149
149
  TabsContent.displayName = 'TabsContent'
150
150
 
151
- export { Tabs, TabsList, TabsTrigger, TabsContent }
151
+ export { Tabs, TabsContent, TabsList, TabsTrigger }
@@ -32,4 +32,4 @@ const TooltipContent = React.forwardRef<
32
32
  ))
33
33
  TooltipContent.displayName = TooltipPrimitive.Content.displayName
34
34
 
35
- export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
35
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }