@stagewise/ui 0.1.0 → 0.3.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 +9 -3
- package/package.json +9 -15
- package/src/components/ui/accordion.tsx +13 -15
- package/src/components/ui/alert-dialog.tsx +38 -38
- package/src/components/ui/alert.tsx +22 -22
- package/src/components/ui/aspect-ratio.tsx +6 -6
- package/src/components/ui/avatar.tsx +30 -30
- package/src/components/ui/badge.tsx +24 -22
- package/src/components/ui/breadcrumb.tsx +34 -37
- package/src/components/ui/bubble.tsx +48 -48
- package/src/components/ui/button-group.tsx +24 -24
- package/src/components/ui/button.tsx +24 -24
- package/src/components/ui/calendar.tsx +94 -81
- package/src/components/ui/card.tsx +30 -30
- package/src/components/ui/carousel.tsx +95 -92
- package/src/components/ui/chart.tsx +110 -110
- package/src/components/ui/checkbox.tsx +9 -10
- package/src/components/ui/collapsible.tsx +5 -5
- package/src/components/ui/combobox.tsx +51 -44
- package/src/components/ui/command.tsx +173 -190
- package/src/components/ui/context-menu.tsx +60 -50
- package/src/components/ui/dialog.tsx +33 -34
- package/src/components/ui/direction.tsx +1 -1
- package/src/components/ui/drawer.tsx +61 -61
- package/src/components/ui/dropdown-menu.tsx +54 -50
- package/src/components/ui/empty.tsx +30 -30
- package/src/components/ui/field.tsx +64 -64
- package/src/components/ui/hover-card.tsx +12 -12
- package/src/components/ui/input-group.tsx +54 -54
- package/src/components/ui/input-otp.tsx +24 -25
- package/src/components/ui/input.tsx +8 -8
- package/src/components/ui/item.tsx +64 -64
- package/src/components/ui/kbd.tsx +8 -8
- package/src/components/ui/klex-logo-combo.tsx +69 -0
- package/src/components/ui/klex-logo-text.tsx +70 -0
- package/src/components/ui/klex-logo.tsx +146 -0
- package/src/components/ui/label.tsx +8 -8
- package/src/components/ui/marker.tsx +25 -25
- package/src/components/ui/menubar.tsx +54 -50
- package/src/components/ui/message-scroller.tsx +130 -0
- package/src/components/ui/message.tsx +27 -27
- package/src/components/ui/native-select.tsx +22 -18
- package/src/components/ui/navigation-menu.tsx +37 -34
- package/src/components/ui/pagination.tsx +34 -31
- package/src/components/ui/popover.tsx +19 -19
- package/src/components/ui/progress.tsx +16 -16
- package/src/components/ui/questionnaire.tsx +72 -69
- package/src/components/ui/radio-group.tsx +9 -9
- package/src/components/ui/resizable.tsx +19 -12
- package/src/components/ui/scroll-area.tsx +10 -10
- package/src/components/ui/select.tsx +39 -34
- package/src/components/ui/separator.tsx +7 -7
- package/src/components/ui/sheet.tsx +31 -32
- package/src/components/ui/sidebar.tsx +244 -232
- package/src/components/ui/skeleton.tsx +5 -5
- package/src/components/ui/slider.tsx +11 -7
- package/src/components/ui/spinner.tsx +15 -6
- package/src/components/ui/stagewise-logo-combo.tsx +43 -0
- package/src/components/ui/stagewise-logo-text.tsx +30 -0
- package/src/components/ui/stagewise-logo.tsx +42 -0
- package/src/components/ui/switch.tsx +9 -9
- package/src/components/ui/table.tsx +31 -31
- package/src/components/ui/tabs.tsx +37 -26
- package/src/components/ui/textarea.tsx +7 -7
- package/src/components/ui/toast.tsx +70 -70
- package/src/components/ui/toggle-group.tsx +26 -26
- package/src/components/ui/toggle.tsx +15 -15
- package/src/components/ui/tooltip.tsx +13 -13
- package/src/hooks/use-mobile.ts +13 -11
- package/src/icons/custom/ui-outline-18/IconKlexOutline18.tsx +39 -0
- package/src/icons/custom/ui-outline-18/IconLaptop.tsx +35 -0
- package/src/icons/custom/ui-outline-18/IconSignOut.tsx +33 -0
- package/src/icons/custom/ui-outline-18/index.ts +4 -1
- package/src/icons/index.ts +43 -20
- package/src/icons/nucleo/social-media/IconMicrosoftEntraId.tsx +56 -0
- package/src/icons/nucleo/social-media/index.ts +1 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowDownOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconArrowTurnRightOutline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconArrowUpOutline18.tsx +35 -0
- package/src/icons/nucleo/ui-outline-18/IconChartPieOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconChevronMaximizeDiagonal2Outline18.tsx +33 -0
- package/src/icons/nucleo/ui-outline-18/IconChevronUpOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconEmptyOutline18.tsx +41 -0
- package/src/icons/nucleo/ui-outline-18/IconEyeOffOutline18.tsx +18 -0
- package/src/icons/nucleo/ui-outline-18/IconLinkBrokenOutline18.tsx +66 -0
- package/src/icons/nucleo/ui-outline-18/IconLock18Outline.tsx +48 -0
- package/src/icons/nucleo/ui-outline-18/IconMinusOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconMsgs2Outline18.tsx +32 -0
- package/src/icons/nucleo/ui-outline-18/IconPanelLeftOutline18.tsx +4 -3
- package/src/icons/nucleo/ui-outline-18/IconSidebarLeft2HideOutline18.tsx +63 -0
- package/src/icons/nucleo/ui-outline-18/IconSidebarRight2HideOutline18.tsx +63 -0
- package/src/icons/nucleo/ui-outline-18/index.ts +11 -1
- package/src/icons/provider/IconAnthropic.tsx +15 -0
- package/src/icons/provider/IconAttio.tsx +9 -0
- package/src/icons/provider/IconCodex.tsx +18 -0
- package/src/icons/provider/IconDiscord.tsx +17 -0
- package/src/icons/provider/IconGemini.tsx +152 -0
- package/src/icons/provider/IconLinear.tsx +9 -0
- package/src/icons/provider/IconOpenAI.tsx +15 -0
- package/src/icons/provider/IconOpenRouter.tsx +24 -0
- package/src/icons/provider/IconSlack.tsx +24 -0
- package/src/icons/provider/IconTelegram.tsx +29 -0
- package/src/icons/provider/IconWhatsapp.tsx +14 -0
- package/src/icons/provider/LICENSE +21 -0
- package/src/icons/provider/index.ts +11 -0
- package/src/index.ts +68 -61
- package/src/lib/utils.ts +3 -3
- package/src/styles/bridge.css +7 -3
- package/src/styles/derived-utilities.css +129 -50
- package/src/styles/index.css +17 -2
- package/src/styles/palette.css +266 -105
- package/src/styles/scroll-fade.css +116 -0
- package/src/styles/tailwind-tokens.css +3 -0
- package/src/styles/theme.css +57 -43
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import { ContextMenu as ContextMenuPrimitive } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ContextMenu as ContextMenuPrimitive } from '@base-ui/react/context-menu';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
7
|
-
import { IconChevronRightOutline18, IconCheckOutline18 } from
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
|
+
import { IconChevronRightOutline18, IconCheckOutline18 } from '../../icons';
|
|
8
8
|
|
|
9
9
|
function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {
|
|
10
|
-
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props}
|
|
10
|
+
return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {
|
|
14
14
|
return (
|
|
15
15
|
<ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
|
|
16
|
-
)
|
|
16
|
+
);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function ContextMenuTrigger({
|
|
@@ -23,47 +23,59 @@ function ContextMenuTrigger({
|
|
|
23
23
|
return (
|
|
24
24
|
<ContextMenuPrimitive.Trigger
|
|
25
25
|
data-slot="context-menu-trigger"
|
|
26
|
-
className={cn(
|
|
26
|
+
className={cn('select-none', className)}
|
|
27
27
|
{...props}
|
|
28
28
|
/>
|
|
29
|
-
)
|
|
29
|
+
);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
function ContextMenuContent({
|
|
33
|
+
anchor,
|
|
33
34
|
className,
|
|
34
|
-
align =
|
|
35
|
+
align = 'start',
|
|
35
36
|
alignOffset = 4,
|
|
36
|
-
side =
|
|
37
|
+
side = 'right',
|
|
37
38
|
sideOffset = 0,
|
|
39
|
+
collisionAvoidance,
|
|
38
40
|
...props
|
|
39
41
|
}: ContextMenuPrimitive.Popup.Props &
|
|
40
42
|
Pick<
|
|
41
43
|
ContextMenuPrimitive.Positioner.Props,
|
|
42
|
-
|
|
44
|
+
| 'anchor'
|
|
45
|
+
| 'align'
|
|
46
|
+
| 'alignOffset'
|
|
47
|
+
| 'side'
|
|
48
|
+
| 'sideOffset'
|
|
49
|
+
| 'collisionAvoidance'
|
|
43
50
|
>) {
|
|
44
51
|
return (
|
|
45
52
|
<ContextMenuPrimitive.Portal>
|
|
46
53
|
<ContextMenuPrimitive.Positioner
|
|
47
54
|
className="isolate z-50 outline-none"
|
|
55
|
+
anchor={anchor}
|
|
48
56
|
align={align}
|
|
49
57
|
alignOffset={alignOffset}
|
|
50
58
|
side={side}
|
|
51
59
|
sideOffset={sideOffset}
|
|
60
|
+
collisionAvoidance={collisionAvoidance}
|
|
52
61
|
>
|
|
53
62
|
<ContextMenuPrimitive.Popup
|
|
54
63
|
data-slot="context-menu-content"
|
|
55
|
-
className={cn(
|
|
64
|
+
className={cn(
|
|
65
|
+
'z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 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:fade-out-0 data-closed:zoom-out-95 relative bg-popover **:data-[slot$=-item]:not-data-[variant=destructive]:focus:bg-foreground/10 **:data-[slot$=-item]:not-data-[variant=destructive]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!',
|
|
66
|
+
className,
|
|
67
|
+
)}
|
|
56
68
|
{...props}
|
|
57
69
|
/>
|
|
58
70
|
</ContextMenuPrimitive.Positioner>
|
|
59
71
|
</ContextMenuPrimitive.Portal>
|
|
60
|
-
)
|
|
72
|
+
);
|
|
61
73
|
}
|
|
62
74
|
|
|
63
75
|
function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {
|
|
64
76
|
return (
|
|
65
77
|
<ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
|
|
66
|
-
)
|
|
78
|
+
);
|
|
67
79
|
}
|
|
68
80
|
|
|
69
81
|
function ContextMenuLabel({
|
|
@@ -71,29 +83,29 @@ function ContextMenuLabel({
|
|
|
71
83
|
inset,
|
|
72
84
|
...props
|
|
73
85
|
}: ContextMenuPrimitive.GroupLabel.Props & {
|
|
74
|
-
inset?: boolean
|
|
86
|
+
inset?: boolean;
|
|
75
87
|
}) {
|
|
76
88
|
return (
|
|
77
89
|
<ContextMenuPrimitive.GroupLabel
|
|
78
90
|
data-slot="context-menu-label"
|
|
79
91
|
data-inset={inset}
|
|
80
92
|
className={cn(
|
|
81
|
-
|
|
82
|
-
className
|
|
93
|
+
'px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7',
|
|
94
|
+
className,
|
|
83
95
|
)}
|
|
84
96
|
{...props}
|
|
85
97
|
/>
|
|
86
|
-
)
|
|
98
|
+
);
|
|
87
99
|
}
|
|
88
100
|
|
|
89
101
|
function ContextMenuItem({
|
|
90
102
|
className,
|
|
91
103
|
inset,
|
|
92
|
-
variant =
|
|
104
|
+
variant = 'default',
|
|
93
105
|
...props
|
|
94
106
|
}: ContextMenuPrimitive.Item.Props & {
|
|
95
|
-
inset?: boolean
|
|
96
|
-
variant?:
|
|
107
|
+
inset?: boolean;
|
|
108
|
+
variant?: 'default' | 'destructive';
|
|
97
109
|
}) {
|
|
98
110
|
return (
|
|
99
111
|
<ContextMenuPrimitive.Item
|
|
@@ -101,18 +113,18 @@ function ContextMenuItem({
|
|
|
101
113
|
data-inset={inset}
|
|
102
114
|
data-variant={variant}
|
|
103
115
|
className={cn(
|
|
104
|
-
"group/context-menu-item relative flex cursor-default 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-[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 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
105
|
-
className
|
|
116
|
+
"group/context-menu-item relative flex cursor-default 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-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 dark:data-[variant=destructive]:data-highlighted: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 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",
|
|
117
|
+
className,
|
|
106
118
|
)}
|
|
107
119
|
{...props}
|
|
108
120
|
/>
|
|
109
|
-
)
|
|
121
|
+
);
|
|
110
122
|
}
|
|
111
123
|
|
|
112
124
|
function ContextMenuSub({ ...props }: ContextMenuPrimitive.SubmenuRoot.Props) {
|
|
113
125
|
return (
|
|
114
126
|
<ContextMenuPrimitive.SubmenuRoot data-slot="context-menu-sub" {...props} />
|
|
115
|
-
)
|
|
127
|
+
);
|
|
116
128
|
}
|
|
117
129
|
|
|
118
130
|
function ContextMenuSubTrigger({
|
|
@@ -121,7 +133,7 @@ function ContextMenuSubTrigger({
|
|
|
121
133
|
children,
|
|
122
134
|
...props
|
|
123
135
|
}: ContextMenuPrimitive.SubmenuTrigger.Props & {
|
|
124
|
-
inset?: boolean
|
|
136
|
+
inset?: boolean;
|
|
125
137
|
}) {
|
|
126
138
|
return (
|
|
127
139
|
<ContextMenuPrimitive.SubmenuTrigger
|
|
@@ -129,14 +141,14 @@ function ContextMenuSubTrigger({
|
|
|
129
141
|
data-inset={inset}
|
|
130
142
|
className={cn(
|
|
131
143
|
"flex cursor-default 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-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
132
|
-
className
|
|
144
|
+
className,
|
|
133
145
|
)}
|
|
134
146
|
{...props}
|
|
135
147
|
>
|
|
136
148
|
{children}
|
|
137
|
-
<IconChevronRightOutline18 className="ml-auto" />
|
|
149
|
+
<IconChevronRightOutline18 className="ml-auto size-3" />
|
|
138
150
|
</ContextMenuPrimitive.SubmenuTrigger>
|
|
139
|
-
)
|
|
151
|
+
);
|
|
140
152
|
}
|
|
141
153
|
|
|
142
154
|
function ContextMenuSubContent({
|
|
@@ -145,11 +157,11 @@ function ContextMenuSubContent({
|
|
|
145
157
|
return (
|
|
146
158
|
<ContextMenuContent
|
|
147
159
|
data-slot="context-menu-sub-content"
|
|
148
|
-
className="shadow-lg relative bg-popover
|
|
160
|
+
className="shadow-lg relative bg-popover **:data-[slot$=-item]:not-data-[variant=destructive]:focus:bg-foreground/10 **:data-[slot$=-item]:not-data-[variant=destructive]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10!"
|
|
149
161
|
side="right"
|
|
150
162
|
{...props}
|
|
151
163
|
/>
|
|
152
|
-
)
|
|
164
|
+
);
|
|
153
165
|
}
|
|
154
166
|
|
|
155
167
|
function ContextMenuCheckboxItem({
|
|
@@ -159,7 +171,7 @@ function ContextMenuCheckboxItem({
|
|
|
159
171
|
inset,
|
|
160
172
|
...props
|
|
161
173
|
}: ContextMenuPrimitive.CheckboxItem.Props & {
|
|
162
|
-
inset?: boolean
|
|
174
|
+
inset?: boolean;
|
|
163
175
|
}) {
|
|
164
176
|
return (
|
|
165
177
|
<ContextMenuPrimitive.CheckboxItem
|
|
@@ -167,20 +179,19 @@ function ContextMenuCheckboxItem({
|
|
|
167
179
|
data-inset={inset}
|
|
168
180
|
className={cn(
|
|
169
181
|
"relative flex cursor-default 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 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",
|
|
170
|
-
className
|
|
182
|
+
className,
|
|
171
183
|
)}
|
|
172
184
|
checked={checked}
|
|
173
185
|
{...props}
|
|
174
186
|
>
|
|
175
187
|
<span className="pointer-events-none absolute right-2">
|
|
176
188
|
<ContextMenuPrimitive.CheckboxItemIndicator>
|
|
177
|
-
<IconCheckOutline18
|
|
178
|
-
/>
|
|
189
|
+
<IconCheckOutline18 />
|
|
179
190
|
</ContextMenuPrimitive.CheckboxItemIndicator>
|
|
180
191
|
</span>
|
|
181
192
|
{children}
|
|
182
193
|
</ContextMenuPrimitive.CheckboxItem>
|
|
183
|
-
)
|
|
194
|
+
);
|
|
184
195
|
}
|
|
185
196
|
|
|
186
197
|
function ContextMenuRadioGroup({
|
|
@@ -191,7 +202,7 @@ function ContextMenuRadioGroup({
|
|
|
191
202
|
data-slot="context-menu-radio-group"
|
|
192
203
|
{...props}
|
|
193
204
|
/>
|
|
194
|
-
)
|
|
205
|
+
);
|
|
195
206
|
}
|
|
196
207
|
|
|
197
208
|
function ContextMenuRadioItem({
|
|
@@ -200,7 +211,7 @@ function ContextMenuRadioItem({
|
|
|
200
211
|
inset,
|
|
201
212
|
...props
|
|
202
213
|
}: ContextMenuPrimitive.RadioItem.Props & {
|
|
203
|
-
inset?: boolean
|
|
214
|
+
inset?: boolean;
|
|
204
215
|
}) {
|
|
205
216
|
return (
|
|
206
217
|
<ContextMenuPrimitive.RadioItem
|
|
@@ -208,19 +219,18 @@ function ContextMenuRadioItem({
|
|
|
208
219
|
data-inset={inset}
|
|
209
220
|
className={cn(
|
|
210
221
|
"relative flex cursor-default 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 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",
|
|
211
|
-
className
|
|
222
|
+
className,
|
|
212
223
|
)}
|
|
213
224
|
{...props}
|
|
214
225
|
>
|
|
215
226
|
<span className="pointer-events-none absolute right-2">
|
|
216
227
|
<ContextMenuPrimitive.RadioItemIndicator>
|
|
217
|
-
<IconCheckOutline18
|
|
218
|
-
/>
|
|
228
|
+
<IconCheckOutline18 />
|
|
219
229
|
</ContextMenuPrimitive.RadioItemIndicator>
|
|
220
230
|
</span>
|
|
221
231
|
{children}
|
|
222
232
|
</ContextMenuPrimitive.RadioItem>
|
|
223
|
-
)
|
|
233
|
+
);
|
|
224
234
|
}
|
|
225
235
|
|
|
226
236
|
function ContextMenuSeparator({
|
|
@@ -230,26 +240,26 @@ function ContextMenuSeparator({
|
|
|
230
240
|
return (
|
|
231
241
|
<ContextMenuPrimitive.Separator
|
|
232
242
|
data-slot="context-menu-separator"
|
|
233
|
-
className={cn(
|
|
243
|
+
className={cn('-mx-1 my-1 h-px bg-border', className)}
|
|
234
244
|
{...props}
|
|
235
245
|
/>
|
|
236
|
-
)
|
|
246
|
+
);
|
|
237
247
|
}
|
|
238
248
|
|
|
239
249
|
function ContextMenuShortcut({
|
|
240
250
|
className,
|
|
241
251
|
...props
|
|
242
|
-
}: React.ComponentProps<
|
|
252
|
+
}: React.ComponentProps<'span'>) {
|
|
243
253
|
return (
|
|
244
254
|
<span
|
|
245
255
|
data-slot="context-menu-shortcut"
|
|
246
256
|
className={cn(
|
|
247
|
-
|
|
248
|
-
className
|
|
257
|
+
'ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground',
|
|
258
|
+
className,
|
|
249
259
|
)}
|
|
250
260
|
{...props}
|
|
251
261
|
/>
|
|
252
|
-
)
|
|
262
|
+
);
|
|
253
263
|
}
|
|
254
264
|
|
|
255
265
|
export {
|
|
@@ -268,4 +278,4 @@ export {
|
|
|
268
278
|
ContextMenuSubContent,
|
|
269
279
|
ContextMenuSubTrigger,
|
|
270
280
|
ContextMenuRadioGroup,
|
|
271
|
-
}
|
|
281
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import { Dialog as DialogPrimitive } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Dialog as DialogPrimitive } from '@base-ui/react/dialog';
|
|
5
5
|
|
|
6
|
-
import { cn } from
|
|
7
|
-
import { Button } from
|
|
8
|
-
import { IconXmarkOutline18 } from
|
|
6
|
+
import { cn } from '../../lib/utils';
|
|
7
|
+
import { Button } from './button';
|
|
8
|
+
import { IconXmarkOutline18 } from '../../icons';
|
|
9
9
|
|
|
10
10
|
function Dialog({ ...props }: DialogPrimitive.Root.Props) {
|
|
11
|
-
return <DialogPrimitive.Root data-slot="dialog" {...props}
|
|
11
|
+
return <DialogPrimitive.Root data-slot="dialog" {...props} />;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props) {
|
|
15
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props}
|
|
15
|
+
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function DialogPortal({ ...props }: DialogPrimitive.Portal.Props) {
|
|
19
|
-
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props}
|
|
19
|
+
return <DialogPrimitive.Portal data-slot="dialog-portal" {...props} />;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function DialogClose({ ...props }: DialogPrimitive.Close.Props) {
|
|
23
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props}
|
|
23
|
+
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
function DialogOverlay({
|
|
@@ -31,12 +31,12 @@ function DialogOverlay({
|
|
|
31
31
|
<DialogPrimitive.Backdrop
|
|
32
32
|
data-slot="dialog-overlay"
|
|
33
33
|
className={cn(
|
|
34
|
-
|
|
35
|
-
className
|
|
34
|
+
'fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0',
|
|
35
|
+
className,
|
|
36
36
|
)}
|
|
37
37
|
{...props}
|
|
38
38
|
/>
|
|
39
|
-
)
|
|
39
|
+
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
function DialogContent({
|
|
@@ -45,7 +45,7 @@ function DialogContent({
|
|
|
45
45
|
showCloseButton = true,
|
|
46
46
|
...props
|
|
47
47
|
}: DialogPrimitive.Popup.Props & {
|
|
48
|
-
showCloseButton?: boolean
|
|
48
|
+
showCloseButton?: boolean;
|
|
49
49
|
}) {
|
|
50
50
|
return (
|
|
51
51
|
<DialogPortal>
|
|
@@ -53,8 +53,8 @@ function DialogContent({
|
|
|
53
53
|
<DialogPrimitive.Popup
|
|
54
54
|
data-slot="dialog-content"
|
|
55
55
|
className={cn(
|
|
56
|
-
|
|
57
|
-
className
|
|
56
|
+
'fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',
|
|
57
|
+
className,
|
|
58
58
|
)}
|
|
59
59
|
{...props}
|
|
60
60
|
>
|
|
@@ -70,24 +70,23 @@ function DialogContent({
|
|
|
70
70
|
/>
|
|
71
71
|
}
|
|
72
72
|
>
|
|
73
|
-
<IconXmarkOutline18
|
|
74
|
-
/>
|
|
73
|
+
<IconXmarkOutline18 />
|
|
75
74
|
<span className="sr-only">Close</span>
|
|
76
75
|
</DialogPrimitive.Close>
|
|
77
76
|
)}
|
|
78
77
|
</DialogPrimitive.Popup>
|
|
79
78
|
</DialogPortal>
|
|
80
|
-
)
|
|
79
|
+
);
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
function DialogHeader({ className, ...props }: React.ComponentProps<
|
|
82
|
+
function DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
84
83
|
return (
|
|
85
84
|
<div
|
|
86
85
|
data-slot="dialog-header"
|
|
87
|
-
className={cn(
|
|
86
|
+
className={cn('flex flex-col gap-1.5', className)}
|
|
88
87
|
{...props}
|
|
89
88
|
/>
|
|
90
|
-
)
|
|
89
|
+
);
|
|
91
90
|
}
|
|
92
91
|
|
|
93
92
|
function DialogFooter({
|
|
@@ -95,15 +94,15 @@ function DialogFooter({
|
|
|
95
94
|
showCloseButton = false,
|
|
96
95
|
children,
|
|
97
96
|
...props
|
|
98
|
-
}: React.ComponentProps<
|
|
99
|
-
showCloseButton?: boolean
|
|
97
|
+
}: React.ComponentProps<'div'> & {
|
|
98
|
+
showCloseButton?: boolean;
|
|
100
99
|
}) {
|
|
101
100
|
return (
|
|
102
101
|
<div
|
|
103
102
|
data-slot="dialog-footer"
|
|
104
103
|
className={cn(
|
|
105
|
-
|
|
106
|
-
className
|
|
104
|
+
'-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end',
|
|
105
|
+
className,
|
|
107
106
|
)}
|
|
108
107
|
{...props}
|
|
109
108
|
>
|
|
@@ -114,7 +113,7 @@ function DialogFooter({
|
|
|
114
113
|
</DialogPrimitive.Close>
|
|
115
114
|
)}
|
|
116
115
|
</div>
|
|
117
|
-
)
|
|
116
|
+
);
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
|
|
@@ -122,12 +121,12 @@ function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props) {
|
|
|
122
121
|
<DialogPrimitive.Title
|
|
123
122
|
data-slot="dialog-title"
|
|
124
123
|
className={cn(
|
|
125
|
-
|
|
126
|
-
className
|
|
124
|
+
'font-heading text-base leading-none font-medium',
|
|
125
|
+
className,
|
|
127
126
|
)}
|
|
128
127
|
{...props}
|
|
129
128
|
/>
|
|
130
|
-
)
|
|
129
|
+
);
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
function DialogDescription({
|
|
@@ -138,12 +137,12 @@ function DialogDescription({
|
|
|
138
137
|
<DialogPrimitive.Description
|
|
139
138
|
data-slot="dialog-description"
|
|
140
139
|
className={cn(
|
|
141
|
-
|
|
142
|
-
className
|
|
140
|
+
'text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground',
|
|
141
|
+
className,
|
|
143
142
|
)}
|
|
144
143
|
{...props}
|
|
145
144
|
/>
|
|
146
|
-
)
|
|
145
|
+
);
|
|
147
146
|
}
|
|
148
147
|
|
|
149
148
|
export {
|
|
@@ -157,4 +156,4 @@ export {
|
|
|
157
156
|
DialogPortal,
|
|
158
157
|
DialogTitle,
|
|
159
158
|
DialogTrigger,
|
|
160
|
-
}
|
|
159
|
+
};
|