@adea-ai/ui 0.22.2 → 0.23.0
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/README.md +6 -3
- package/dist/components/account-drawer.d.ts +3 -3
- package/dist/components/account-drawer.js +119 -19
- package/dist/components/on-screen-controls.d.ts +2 -1
- package/dist/components/on-screen-controls.js +158 -46
- package/dist/components/scene-settings.d.ts +3 -3
- package/dist/components/scene-settings.js +247 -28
- package/dist/components/theme-provider.d.ts +27 -5
- package/dist/components/theme-provider.js +96 -7
- package/dist/components/theme-toggle.d.ts +4 -4
- package/dist/components/theme-toggle.js +62 -18
- package/dist/components/ui/badge.d.ts +4 -3
- package/dist/components/ui/badge.js +31 -30
- package/dist/components/ui/button.d.ts +4 -3
- package/dist/components/ui/button.js +49 -32
- package/dist/components/ui/card.d.ts +3 -3
- package/dist/components/ui/card.js +25 -6
- package/dist/components/ui/dialog.d.ts +13 -13
- package/dist/components/ui/dialog.js +94 -26
- package/dist/components/ui/drawer.d.ts +23 -15
- package/dist/components/ui/drawer.js +109 -64
- package/dist/components/ui/dropdown-menu.d.ts +28 -22
- package/dist/components/ui/dropdown-menu.js +165 -36
- package/dist/components/ui/empty.d.ts +7 -6
- package/dist/components/ui/empty.js +78 -26
- package/dist/components/ui/field.d.ts +15 -14
- package/dist/components/ui/field.js +177 -55
- package/dist/components/ui/input.d.ts +2 -2
- package/dist/components/ui/input.js +20 -5
- package/dist/components/ui/label.d.ts +2 -2
- package/dist/components/ui/label.js +15 -5
- package/dist/components/ui/radio-group.d.ts +4 -4
- package/dist/components/ui/radio-group.js +36 -9
- package/dist/components/ui/separator.d.ts +6 -2
- package/dist/components/ui/separator.js +18 -6
- package/dist/components/ui/skeleton.d.ts +2 -1
- package/dist/components/ui/skeleton.js +15 -4
- package/dist/components/ui/spinner.d.ts +4 -3
- package/dist/components/ui/spinner.js +15 -5
- package/dist/components/ui/switch.d.ts +6 -3
- package/dist/components/ui/switch.js +57 -6
- package/dist/components/ui/tabs.d.ts +6 -5
- package/dist/components/ui/tabs.js +52 -24
- package/dist/components/ui/toggle-group.d.ts +10 -8
- package/dist/components/ui/toggle-group.js +91 -20
- package/dist/components/ui/toggle.d.ts +4 -2
- package/dist/components/ui/toggle.js +38 -23
- package/dist/components/ui/tooltip.d.ts +13 -6
- package/dist/components/ui/tooltip.js +51 -14
- package/dist/components/version-dialog.d.ts +2 -2
- package/dist/components/version-dialog.js +322 -129
- package/dist/components/workspace-brand.d.ts +1 -1
- package/dist/components/workspace-brand.js +12 -3
- package/dist/components/workspace-logo.d.ts +2 -2
- package/dist/components/workspace-logo.js +15 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +20 -19
- package/dist/lib/utils.js +7 -4
- package/dist/lib/version-notes.js +14 -29
- package/package.json +18 -16
- package/src/components/account-drawer.tsx +48 -67
- package/src/components/on-screen-controls.tsx +55 -62
- package/src/components/scene-settings.tsx +97 -100
- package/src/components/theme-provider.tsx +122 -22
- package/src/components/theme-toggle.tsx +29 -54
- package/src/components/ui/badge.tsx +14 -23
- package/src/components/ui/button.tsx +9 -11
- package/src/components/ui/card.tsx +9 -6
- package/src/components/ui/dialog.tsx +58 -55
- package/src/components/ui/drawer.tsx +84 -125
- package/src/components/ui/dropdown-menu.tsx +130 -153
- package/src/components/ui/empty.tsx +29 -26
- package/src/components/ui/field.tsx +83 -87
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/label.tsx +6 -7
- package/src/components/ui/radio-group.tsx +22 -19
- package/src/components/ui/separator.tsx +16 -9
- package/src/components/ui/skeleton.tsx +6 -3
- package/src/components/ui/spinner.tsx +9 -5
- package/src/components/ui/switch.tsx +47 -20
- package/src/components/ui/tabs.tsx +31 -30
- package/src/components/ui/toggle-group.tsx +65 -54
- package/src/components/ui/toggle.tsx +9 -12
- package/src/components/ui/tooltip.tsx +41 -36
- package/src/components/version-dialog.tsx +144 -144
- package/src/components/workspace-brand.tsx +5 -5
- package/src/components/workspace-logo.tsx +9 -8
- package/src/index.tsx +7 -1
- package/src/styles/base.css +637 -0
- package/src/styles/globals.css +1 -1
- package/tsconfig.json +2 -1
- package/components.json +0 -19
|
@@ -1,240 +1,217 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import { Menu as MenuPrimitive } from '@base-ui/react/menu'
|
|
1
|
+
import { DropdownMenu as DropdownMenuPrimitive } from '@kobalte/core/dropdown-menu'
|
|
2
|
+
import { ChevronRightIcon, CheckIcon } from 'lucide-solid'
|
|
3
|
+
import { splitProps, type ComponentProps } from 'solid-js'
|
|
5
4
|
|
|
6
5
|
import { cn } from '#lib/utils'
|
|
7
|
-
import { ChevronRightIcon, CheckIcon } from 'lucide-react'
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
type DropdownMenuContentProps = ComponentProps<typeof DropdownMenuPrimitive.Content> & {
|
|
8
|
+
side?: 'top' | 'right' | 'bottom' | 'left'
|
|
9
|
+
align?: 'start' | 'center' | 'end'
|
|
10
|
+
sideOffset?: number
|
|
11
|
+
alignOffset?: number
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive>) {
|
|
15
|
+
return <DropdownMenuPrimitive data-slot="dropdown-menu" {...props} />
|
|
11
16
|
}
|
|
12
17
|
|
|
13
|
-
function DropdownMenuPortal(
|
|
14
|
-
return <
|
|
18
|
+
function DropdownMenuPortal(props: ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
|
19
|
+
return <DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
15
20
|
}
|
|
16
21
|
|
|
17
|
-
function DropdownMenuTrigger(
|
|
18
|
-
return <
|
|
22
|
+
function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
|
23
|
+
return <DropdownMenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
|
|
19
24
|
}
|
|
20
25
|
|
|
21
|
-
function DropdownMenuContent({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
sideOffset = 4,
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: MenuPrimitive.Popup.Props &
|
|
29
|
-
Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>) {
|
|
26
|
+
function DropdownMenuContent(props: DropdownMenuContentProps) {
|
|
27
|
+
const [local, rest] = splitProps(props, ['class', 'side', 'align', 'sideOffset', 'children'])
|
|
28
|
+
const placement = () => `${local.side ?? 'bottom'}${local.align ? `-${local.align}` : ''}`
|
|
29
|
+
|
|
30
30
|
return (
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
<DropdownMenuPrimitive.Portal>
|
|
32
|
+
<DropdownMenuPrimitive.Content
|
|
33
|
+
data-slot="dropdown-menu-content"
|
|
34
|
+
placement={placement()}
|
|
35
|
+
gutter={local.sideOffset ?? 4}
|
|
36
|
+
class={cn(
|
|
37
|
+
'z-[140] max-h-(--kb-popper-available-height) min-w-32 origin-(--kb-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',
|
|
38
|
+
local.class
|
|
39
|
+
)}
|
|
40
|
+
{...rest}
|
|
38
41
|
>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
'z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95',
|
|
43
|
-
className
|
|
44
|
-
)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
</MenuPrimitive.Positioner>
|
|
48
|
-
</MenuPrimitive.Portal>
|
|
42
|
+
{local.children}
|
|
43
|
+
</DropdownMenuPrimitive.Content>
|
|
44
|
+
</DropdownMenuPrimitive.Portal>
|
|
49
45
|
)
|
|
50
46
|
}
|
|
51
47
|
|
|
52
|
-
function DropdownMenuGroup(
|
|
53
|
-
return <
|
|
48
|
+
function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
|
49
|
+
return <DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
54
50
|
}
|
|
55
51
|
|
|
56
|
-
function DropdownMenuLabel(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
inset
|
|
62
|
-
}) {
|
|
52
|
+
function DropdownMenuLabel(
|
|
53
|
+
props: ComponentProps<typeof DropdownMenuPrimitive.GroupLabel> & {
|
|
54
|
+
inset?: boolean
|
|
55
|
+
}
|
|
56
|
+
) {
|
|
57
|
+
const [local, rest] = splitProps(props, ['class', 'inset'])
|
|
63
58
|
return (
|
|
64
|
-
<
|
|
59
|
+
<DropdownMenuPrimitive.GroupLabel
|
|
65
60
|
data-slot="dropdown-menu-label"
|
|
66
|
-
data-inset={inset}
|
|
67
|
-
|
|
68
|
-
'px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7',
|
|
69
|
-
|
|
61
|
+
data-inset={local.inset}
|
|
62
|
+
class={cn(
|
|
63
|
+
'px-1.5 py-1 text-xs font-medium text-muted-foreground data-[inset]:pl-7',
|
|
64
|
+
local.class
|
|
70
65
|
)}
|
|
71
|
-
{...
|
|
66
|
+
{...rest}
|
|
72
67
|
/>
|
|
73
68
|
)
|
|
74
69
|
}
|
|
75
70
|
|
|
76
|
-
function DropdownMenuItem(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
inset
|
|
83
|
-
variant?: 'default' | 'destructive'
|
|
84
|
-
}) {
|
|
71
|
+
function DropdownMenuItem(
|
|
72
|
+
props: ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
73
|
+
inset?: boolean
|
|
74
|
+
variant?: 'default' | 'destructive'
|
|
75
|
+
}
|
|
76
|
+
) {
|
|
77
|
+
const [local, rest] = splitProps(props, ['class', 'inset', 'variant'])
|
|
85
78
|
return (
|
|
86
|
-
<
|
|
79
|
+
<DropdownMenuPrimitive.Item
|
|
87
80
|
data-slot="dropdown-menu-item"
|
|
88
|
-
data-inset={inset}
|
|
89
|
-
data-variant={variant}
|
|
90
|
-
|
|
91
|
-
"group/dropdown-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
92
|
-
|
|
81
|
+
data-inset={local.inset}
|
|
82
|
+
data-variant={local.variant ?? 'default'}
|
|
83
|
+
class={cn(
|
|
84
|
+
"group/dropdown-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[inset]:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-highlighted:bg-accent data-highlighted:text-accent-foreground data-highlighted:not-data-[variant=destructive]:text-accent-foreground data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
|
85
|
+
local.class
|
|
93
86
|
)}
|
|
94
|
-
{...
|
|
87
|
+
{...rest}
|
|
95
88
|
/>
|
|
96
89
|
)
|
|
97
90
|
}
|
|
98
91
|
|
|
99
|
-
function DropdownMenuSub(
|
|
100
|
-
return <
|
|
92
|
+
function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
|
93
|
+
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
|
101
94
|
}
|
|
102
95
|
|
|
103
|
-
function DropdownMenuSubTrigger(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
inset?: boolean
|
|
110
|
-
}) {
|
|
96
|
+
function DropdownMenuSubTrigger(
|
|
97
|
+
props: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
98
|
+
inset?: boolean
|
|
99
|
+
}
|
|
100
|
+
) {
|
|
101
|
+
const [local, rest] = splitProps(props, ['class', 'inset', 'children'])
|
|
111
102
|
return (
|
|
112
|
-
<
|
|
103
|
+
<DropdownMenuPrimitive.SubTrigger
|
|
113
104
|
data-slot="dropdown-menu-sub-trigger"
|
|
114
|
-
data-inset={inset}
|
|
115
|
-
|
|
116
|
-
"flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground
|
|
117
|
-
|
|
105
|
+
data-inset={local.inset}
|
|
106
|
+
class={cn(
|
|
107
|
+
"flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[inset]:pl-7 data-expanded:bg-accent data-expanded:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
108
|
+
local.class
|
|
118
109
|
)}
|
|
119
|
-
{...
|
|
110
|
+
{...rest}
|
|
120
111
|
>
|
|
121
|
-
{children}
|
|
122
|
-
<ChevronRightIcon
|
|
123
|
-
</
|
|
112
|
+
{local.children}
|
|
113
|
+
<ChevronRightIcon class="ml-auto" />
|
|
114
|
+
</DropdownMenuPrimitive.SubTrigger>
|
|
124
115
|
)
|
|
125
116
|
}
|
|
126
117
|
|
|
127
|
-
function DropdownMenuSubContent({
|
|
128
|
-
|
|
129
|
-
alignOffset = -3,
|
|
130
|
-
side = 'right',
|
|
131
|
-
sideOffset = 0,
|
|
132
|
-
className,
|
|
133
|
-
...props
|
|
134
|
-
}: React.ComponentProps<typeof DropdownMenuContent>) {
|
|
118
|
+
function DropdownMenuSubContent(props: ComponentProps<typeof DropdownMenuContent>) {
|
|
119
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
135
120
|
return (
|
|
136
121
|
<DropdownMenuContent
|
|
137
122
|
data-slot="dropdown-menu-sub-content"
|
|
138
|
-
|
|
139
|
-
'w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-
|
|
140
|
-
|
|
123
|
+
class={cn(
|
|
124
|
+
'w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-expanded:animate-in data-expanded:fade-in-0 data-expanded:zoom-in-95',
|
|
125
|
+
local.class
|
|
141
126
|
)}
|
|
142
|
-
|
|
143
|
-
alignOffset={alignOffset}
|
|
144
|
-
side={side}
|
|
145
|
-
sideOffset={sideOffset}
|
|
146
|
-
{...props}
|
|
127
|
+
{...rest}
|
|
147
128
|
/>
|
|
148
129
|
)
|
|
149
130
|
}
|
|
150
131
|
|
|
151
|
-
function DropdownMenuCheckboxItem(
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
}: MenuPrimitive.CheckboxItem.Props & {
|
|
158
|
-
inset?: boolean
|
|
159
|
-
}) {
|
|
132
|
+
function DropdownMenuCheckboxItem(
|
|
133
|
+
props: ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
|
134
|
+
inset?: boolean
|
|
135
|
+
}
|
|
136
|
+
) {
|
|
137
|
+
const [local, rest] = splitProps(props, ['class', 'children', 'inset'])
|
|
160
138
|
return (
|
|
161
|
-
<
|
|
139
|
+
<DropdownMenuPrimitive.CheckboxItem
|
|
162
140
|
data-slot="dropdown-menu-checkbox-item"
|
|
163
|
-
data-inset={inset}
|
|
164
|
-
|
|
165
|
-
"relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
166
|
-
|
|
141
|
+
data-inset={local.inset}
|
|
142
|
+
class={cn(
|
|
143
|
+
"relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
144
|
+
local.class
|
|
167
145
|
)}
|
|
168
|
-
|
|
169
|
-
{...props}
|
|
146
|
+
{...rest}
|
|
170
147
|
>
|
|
171
148
|
<span
|
|
172
|
-
|
|
149
|
+
class="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
173
150
|
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
174
151
|
>
|
|
175
|
-
<
|
|
152
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
176
153
|
<CheckIcon />
|
|
177
|
-
</
|
|
154
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
178
155
|
</span>
|
|
179
|
-
{children}
|
|
180
|
-
</
|
|
156
|
+
{local.children}
|
|
157
|
+
</DropdownMenuPrimitive.CheckboxItem>
|
|
181
158
|
)
|
|
182
159
|
}
|
|
183
160
|
|
|
184
|
-
function DropdownMenuRadioGroup(
|
|
185
|
-
return <
|
|
161
|
+
function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
|
162
|
+
return <DropdownMenuPrimitive.RadioGroup data-slot="dropdown-menu-radio-group" {...props} />
|
|
186
163
|
}
|
|
187
164
|
|
|
188
|
-
function DropdownMenuRadioItem(
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
inset?: boolean
|
|
195
|
-
}) {
|
|
165
|
+
function DropdownMenuRadioItem(
|
|
166
|
+
props: ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
|
167
|
+
inset?: boolean
|
|
168
|
+
}
|
|
169
|
+
) {
|
|
170
|
+
const [local, rest] = splitProps(props, ['class', 'children', 'inset'])
|
|
196
171
|
return (
|
|
197
|
-
<
|
|
172
|
+
<DropdownMenuPrimitive.RadioItem
|
|
198
173
|
data-slot="dropdown-menu-radio-item"
|
|
199
|
-
data-inset={inset}
|
|
200
|
-
|
|
201
|
-
"relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
202
|
-
|
|
174
|
+
data-inset={local.inset}
|
|
175
|
+
class={cn(
|
|
176
|
+
"relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-[inset]:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
177
|
+
local.class
|
|
203
178
|
)}
|
|
204
|
-
{...
|
|
179
|
+
{...rest}
|
|
205
180
|
>
|
|
206
181
|
<span
|
|
207
|
-
|
|
182
|
+
class="pointer-events-none absolute right-2 flex items-center justify-center"
|
|
208
183
|
data-slot="dropdown-menu-radio-item-indicator"
|
|
209
184
|
>
|
|
210
|
-
<
|
|
185
|
+
<DropdownMenuPrimitive.ItemIndicator>
|
|
211
186
|
<CheckIcon />
|
|
212
|
-
</
|
|
187
|
+
</DropdownMenuPrimitive.ItemIndicator>
|
|
213
188
|
</span>
|
|
214
|
-
{children}
|
|
215
|
-
</
|
|
189
|
+
{local.children}
|
|
190
|
+
</DropdownMenuPrimitive.RadioItem>
|
|
216
191
|
)
|
|
217
192
|
}
|
|
218
193
|
|
|
219
|
-
function DropdownMenuSeparator(
|
|
194
|
+
function DropdownMenuSeparator(props: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
|
195
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
220
196
|
return (
|
|
221
|
-
<
|
|
197
|
+
<DropdownMenuPrimitive.Separator
|
|
222
198
|
data-slot="dropdown-menu-separator"
|
|
223
|
-
|
|
224
|
-
{...
|
|
199
|
+
class={cn('-mx-1 my-1 h-px bg-border', local.class)}
|
|
200
|
+
{...rest}
|
|
225
201
|
/>
|
|
226
202
|
)
|
|
227
203
|
}
|
|
228
204
|
|
|
229
|
-
function DropdownMenuShortcut(
|
|
205
|
+
function DropdownMenuShortcut(props: ComponentProps<'span'>) {
|
|
206
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
230
207
|
return (
|
|
231
208
|
<span
|
|
232
209
|
data-slot="dropdown-menu-shortcut"
|
|
233
|
-
|
|
210
|
+
class={cn(
|
|
234
211
|
'ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground',
|
|
235
|
-
|
|
212
|
+
local.class
|
|
236
213
|
)}
|
|
237
|
-
{...
|
|
214
|
+
{...rest}
|
|
238
215
|
/>
|
|
239
216
|
)
|
|
240
217
|
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import { cva, type VariantProps } from 'class-variance-authority'
|
|
2
|
+
import { splitProps, type ComponentProps } from 'solid-js'
|
|
2
3
|
|
|
3
4
|
import { cn } from '#lib/utils'
|
|
4
5
|
|
|
5
|
-
function Empty(
|
|
6
|
+
function Empty(props: ComponentProps<'div'>) {
|
|
7
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
6
8
|
return (
|
|
7
9
|
<div
|
|
8
10
|
data-slot="empty"
|
|
9
|
-
|
|
11
|
+
class={cn(
|
|
10
12
|
'flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance',
|
|
11
|
-
|
|
13
|
+
local.class
|
|
12
14
|
)}
|
|
13
|
-
{...
|
|
15
|
+
{...rest}
|
|
14
16
|
/>
|
|
15
17
|
)
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
function EmptyHeader(
|
|
20
|
+
function EmptyHeader(props: ComponentProps<'div'>) {
|
|
21
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
19
22
|
return (
|
|
20
23
|
<div
|
|
21
24
|
data-slot="empty-header"
|
|
22
|
-
|
|
23
|
-
{...
|
|
25
|
+
class={cn('flex max-w-sm flex-col items-center gap-2', local.class)}
|
|
26
|
+
{...rest}
|
|
24
27
|
/>
|
|
25
28
|
)
|
|
26
29
|
}
|
|
@@ -40,53 +43,53 @@ const emptyMediaVariants = cva(
|
|
|
40
43
|
}
|
|
41
44
|
)
|
|
42
45
|
|
|
43
|
-
function EmptyMedia({
|
|
44
|
-
|
|
45
|
-
variant = 'default',
|
|
46
|
-
...props
|
|
47
|
-
}: React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {
|
|
46
|
+
function EmptyMedia(props: ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>) {
|
|
47
|
+
const [local, rest] = splitProps(props, ['class', 'variant'])
|
|
48
48
|
return (
|
|
49
49
|
<div
|
|
50
50
|
data-slot="empty-icon"
|
|
51
|
-
data-variant={variant}
|
|
52
|
-
|
|
53
|
-
{...
|
|
51
|
+
data-variant={local.variant ?? 'default'}
|
|
52
|
+
class={cn(emptyMediaVariants({ variant: local.variant }), local.class)}
|
|
53
|
+
{...rest}
|
|
54
54
|
/>
|
|
55
55
|
)
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
function EmptyTitle(
|
|
58
|
+
function EmptyTitle(props: ComponentProps<'div'>) {
|
|
59
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
59
60
|
return (
|
|
60
61
|
<div
|
|
61
62
|
data-slot="empty-title"
|
|
62
|
-
|
|
63
|
-
{...
|
|
63
|
+
class={cn('text-sm font-medium tracking-tight', local.class)}
|
|
64
|
+
{...rest}
|
|
64
65
|
/>
|
|
65
66
|
)
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
function EmptyDescription(
|
|
69
|
+
function EmptyDescription(props: ComponentProps<'p'>) {
|
|
70
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
69
71
|
return (
|
|
70
72
|
<div
|
|
71
73
|
data-slot="empty-description"
|
|
72
|
-
|
|
74
|
+
class={cn(
|
|
73
75
|
'text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary',
|
|
74
|
-
|
|
76
|
+
local.class
|
|
75
77
|
)}
|
|
76
|
-
{...
|
|
78
|
+
{...rest}
|
|
77
79
|
/>
|
|
78
80
|
)
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
function EmptyContent(
|
|
83
|
+
function EmptyContent(props: ComponentProps<'div'>) {
|
|
84
|
+
const [local, rest] = splitProps(props, ['class'])
|
|
82
85
|
return (
|
|
83
86
|
<div
|
|
84
87
|
data-slot="empty-content"
|
|
85
|
-
|
|
88
|
+
class={cn(
|
|
86
89
|
'flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance',
|
|
87
|
-
|
|
90
|
+
local.class
|
|
88
91
|
)}
|
|
89
|
-
{...
|
|
92
|
+
{...rest}
|
|
90
93
|
/>
|
|
91
94
|
)
|
|
92
95
|
}
|