@gentleduck/registry-ui 0.2.6 → 0.2.9
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/.turbo/turbo-test.log +6 -6
- package/CHANGELOG.md +14 -0
- package/package.json +8 -8
- package/src/alert-dialog/alert-dialog.tsx +11 -4
- package/src/aspect-ratio/aspect-ratio.tsx +9 -11
- package/src/audio/audio-visualizer.tsx +2 -0
- package/src/button/button.constants.ts +25 -1
- package/src/calendar/calendar.tsx +161 -141
- package/src/chart/chart.tsx +11 -6
- package/src/combobox/combobox.tsx +96 -69
- package/src/command/command.tsx +34 -37
- package/src/context-menu/context-menu.tsx +11 -3
- package/src/dialog/dialog-responsive.tsx +9 -0
- package/src/dialog/dialog.tsx +12 -4
- package/src/dropdown-menu/dropdown-menu.tsx +11 -3
- package/src/empty/empty.tsx +30 -17
- package/src/field/field.tsx +136 -109
- package/src/json-editor/json-editor.tsx +1 -0
- package/src/json-editor/json-editor.view.tsx +1 -0
- package/src/menubar/menubar.tsx +10 -3
- package/src/popover/popover.tsx +4 -0
- package/src/preview-panel/preview-panel-dialog.tsx +86 -80
- package/src/preview-panel/preview-panel.tsx +280 -273
- package/src/resizable/resizable.tsx +17 -15
- package/src/select/select.tsx +23 -18
- package/src/sheet/sheet.tsx +16 -4
- package/src/sidebar/sidebar.tsx +434 -376
- package/src/slider/slider.tsx +7 -10
- package/src/sonner/sonner.chunks.tsx +2 -0
- package/src/sonner/sonner.tsx +23 -20
- package/src/toggle/toggle.constants.ts +2 -2
- package/src/tooltip/tooltip.tsx +3 -0
- package/tsconfig.json +0 -1
package/src/select/select.tsx
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
3
|
import { cn } from '@gentleduck/libs/cn'
|
|
4
|
+
import type { SelectTriggerProps as PrimitiveSelectTriggerProps } from '@gentleduck/primitives/select'
|
|
4
5
|
import * as SelectPrimitive from '@gentleduck/primitives/select'
|
|
5
6
|
import { Check, ChevronDown, ChevronUp } from 'lucide-react'
|
|
6
7
|
import * as React from 'react'
|
|
7
8
|
|
|
8
9
|
const Select = SelectPrimitive.Root
|
|
10
|
+
Select.displayName = 'Select'
|
|
9
11
|
|
|
10
12
|
const SelectGroup = SelectPrimitive.Group
|
|
13
|
+
SelectGroup.displayName = 'SelectGroup'
|
|
11
14
|
|
|
12
15
|
const SelectValue = SelectPrimitive.Value
|
|
16
|
+
SelectValue.displayName = 'SelectValue'
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)
|
|
18
|
+
export interface SelectTriggerProps extends PrimitiveSelectTriggerProps {}
|
|
19
|
+
|
|
20
|
+
const SelectTrigger = React.forwardRef<React.ComponentRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(
|
|
21
|
+
({ className, children, ...props }, ref) => (
|
|
22
|
+
<SelectPrimitive.Trigger
|
|
23
|
+
ref={ref}
|
|
24
|
+
data-slot="select-trigger"
|
|
25
|
+
className={cn(
|
|
26
|
+
'flex h-9 min-w-32 items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-muted-foreground [&>span]:line-clamp-1',
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...props}>
|
|
30
|
+
{children}
|
|
31
|
+
<SelectPrimitive.Icon asChild>
|
|
32
|
+
<ChevronDown aria-hidden="true" className="size-4 opacity-50" />
|
|
33
|
+
</SelectPrimitive.Icon>
|
|
34
|
+
</SelectPrimitive.Trigger>
|
|
35
|
+
),
|
|
36
|
+
)
|
|
32
37
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName
|
|
33
38
|
|
|
34
39
|
const SelectScrollUpButton = React.forwardRef<
|
package/src/sheet/sheet.tsx
CHANGED
|
@@ -8,12 +8,16 @@ import * as React from 'react'
|
|
|
8
8
|
import { sheetVariants } from './sheet.constants'
|
|
9
9
|
|
|
10
10
|
const Sheet = SheetPrimitive.Root
|
|
11
|
+
Sheet.displayName = 'Sheet'
|
|
11
12
|
|
|
12
13
|
const SheetTrigger = SheetPrimitive.Trigger
|
|
14
|
+
SheetTrigger.displayName = 'SheetTrigger'
|
|
13
15
|
|
|
14
16
|
const SheetClose = SheetPrimitive.Close
|
|
17
|
+
SheetClose.displayName = 'SheetClose'
|
|
15
18
|
|
|
16
19
|
const SheetPortal = SheetPrimitive.Portal
|
|
20
|
+
SheetPortal.displayName = 'SheetPortal'
|
|
17
21
|
|
|
18
22
|
const SheetOverlay = React.forwardRef<
|
|
19
23
|
React.ComponentRef<typeof SheetPrimitive.Overlay>,
|
|
@@ -52,13 +56,21 @@ const SheetContent = React.forwardRef<
|
|
|
52
56
|
))
|
|
53
57
|
SheetContent.displayName = SheetPrimitive.Content.displayName
|
|
54
58
|
|
|
55
|
-
const SheetHeader =
|
|
56
|
-
|
|
59
|
+
const SheetHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
60
|
+
({ className, ...props }, ref) => (
|
|
61
|
+
<div ref={ref} className={cn('flex flex-col space-y-2 text-center sm:text-start', className)} {...props} />
|
|
62
|
+
),
|
|
57
63
|
)
|
|
58
64
|
SheetHeader.displayName = 'SheetHeader'
|
|
59
65
|
|
|
60
|
-
const SheetFooter =
|
|
61
|
-
|
|
66
|
+
const SheetFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
|
|
67
|
+
({ className, ...props }, ref) => (
|
|
68
|
+
<div
|
|
69
|
+
ref={ref}
|
|
70
|
+
className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}
|
|
71
|
+
{...props}
|
|
72
|
+
/>
|
|
73
|
+
),
|
|
62
74
|
)
|
|
63
75
|
SheetFooter.displayName = 'SheetFooter'
|
|
64
76
|
|