@stagewise/ui 0.1.0 → 0.2.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 +42 -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/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 +10 -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,29 +1,29 @@
|
|
|
1
|
-
import { NavigationMenu as NavigationMenuPrimitive } from
|
|
2
|
-
import { cva } from
|
|
1
|
+
import { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
5
|
-
import { IconChevronDownOutline18 } from
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { IconChevronDownOutline18 } from '../../icons';
|
|
6
6
|
|
|
7
7
|
function NavigationMenu({
|
|
8
|
-
align =
|
|
8
|
+
align = 'start',
|
|
9
9
|
className,
|
|
10
10
|
children,
|
|
11
11
|
...props
|
|
12
12
|
}: NavigationMenuPrimitive.Root.Props &
|
|
13
|
-
Pick<NavigationMenuPrimitive.Positioner.Props,
|
|
13
|
+
Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) {
|
|
14
14
|
return (
|
|
15
15
|
<NavigationMenuPrimitive.Root
|
|
16
16
|
data-slot="navigation-menu"
|
|
17
17
|
className={cn(
|
|
18
|
-
|
|
19
|
-
className
|
|
18
|
+
'group/navigation-menu relative flex max-w-max flex-1 items-center justify-center',
|
|
19
|
+
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
22
22
|
>
|
|
23
23
|
{children}
|
|
24
24
|
<NavigationMenuPositioner align={align} />
|
|
25
25
|
</NavigationMenuPrimitive.Root>
|
|
26
|
-
)
|
|
26
|
+
);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function NavigationMenuList({
|
|
@@ -34,12 +34,12 @@ function NavigationMenuList({
|
|
|
34
34
|
<NavigationMenuPrimitive.List
|
|
35
35
|
data-slot="navigation-menu-list"
|
|
36
36
|
className={cn(
|
|
37
|
-
|
|
38
|
-
className
|
|
37
|
+
'group flex flex-1 list-none items-center justify-center gap-0',
|
|
38
|
+
className,
|
|
39
39
|
)}
|
|
40
40
|
{...props}
|
|
41
41
|
/>
|
|
42
|
-
)
|
|
42
|
+
);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
function NavigationMenuItem({
|
|
@@ -49,15 +49,15 @@ function NavigationMenuItem({
|
|
|
49
49
|
return (
|
|
50
50
|
<NavigationMenuPrimitive.Item
|
|
51
51
|
data-slot="navigation-menu-item"
|
|
52
|
-
className={cn(
|
|
52
|
+
className={cn('relative', className)}
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
|
-
)
|
|
55
|
+
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
const navigationMenuTriggerStyle = cva(
|
|
59
|
-
|
|
60
|
-
)
|
|
59
|
+
'group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5 text-sm font-medium transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted',
|
|
60
|
+
);
|
|
61
61
|
|
|
62
62
|
function NavigationMenuTrigger({
|
|
63
63
|
className,
|
|
@@ -67,13 +67,16 @@ function NavigationMenuTrigger({
|
|
|
67
67
|
return (
|
|
68
68
|
<NavigationMenuPrimitive.Trigger
|
|
69
69
|
data-slot="navigation-menu-trigger"
|
|
70
|
-
className={cn(navigationMenuTriggerStyle(),
|
|
70
|
+
className={cn(navigationMenuTriggerStyle(), 'group', className)}
|
|
71
71
|
{...props}
|
|
72
72
|
>
|
|
73
|
-
{children}{
|
|
74
|
-
<IconChevronDownOutline18
|
|
73
|
+
{children}{' '}
|
|
74
|
+
<IconChevronDownOutline18
|
|
75
|
+
className="relative top-px ml-1 size-3 transition duration-300 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180"
|
|
76
|
+
aria-hidden="true"
|
|
77
|
+
/>
|
|
75
78
|
</NavigationMenuPrimitive.Trigger>
|
|
76
|
-
)
|
|
79
|
+
);
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
function NavigationMenuContent({
|
|
@@ -84,19 +87,19 @@ function NavigationMenuContent({
|
|
|
84
87
|
<NavigationMenuPrimitive.Content
|
|
85
88
|
data-slot="navigation-menu-content"
|
|
86
89
|
className={cn(
|
|
87
|
-
|
|
88
|
-
className
|
|
90
|
+
'data-ending-style:data-activation-direction=left:translate-x-[50%] data-ending-style:data-activation-direction=right:translate-x-[-50%] data-starting-style:data-activation-direction=left:translate-x-[-50%] data-starting-style:data-activation-direction=right:translate-x-[50%] h-full w-auto p-1 transition-[opacity,transform,translate] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-lg group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:ring-foreground/10 group-data-[viewport=false]/navigation-menu:duration-300 data-ending-style:opacity-0 data-starting-style:opacity-0 data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 data-[motion^=from-]:animate-in data-[motion^=from-]:fade-in data-[motion^=to-]:animate-out data-[motion^=to-]:fade-out **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95',
|
|
91
|
+
className,
|
|
89
92
|
)}
|
|
90
93
|
{...props}
|
|
91
94
|
/>
|
|
92
|
-
)
|
|
95
|
+
);
|
|
93
96
|
}
|
|
94
97
|
|
|
95
98
|
function NavigationMenuPositioner({
|
|
96
99
|
className,
|
|
97
|
-
side =
|
|
100
|
+
side = 'bottom',
|
|
98
101
|
sideOffset = 8,
|
|
99
|
-
align =
|
|
102
|
+
align = 'start',
|
|
100
103
|
alignOffset = 0,
|
|
101
104
|
...props
|
|
102
105
|
}: NavigationMenuPrimitive.Positioner.Props) {
|
|
@@ -108,8 +111,8 @@ function NavigationMenuPositioner({
|
|
|
108
111
|
align={align}
|
|
109
112
|
alignOffset={alignOffset}
|
|
110
113
|
className={cn(
|
|
111
|
-
|
|
112
|
-
className
|
|
114
|
+
'isolate z-50 h-(--positioner-height) w-(--positioner-width) max-w-(--available-width) transition-[top,left,right,bottom] duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] data-instant:transition-none data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0',
|
|
115
|
+
className,
|
|
113
116
|
)}
|
|
114
117
|
{...props}
|
|
115
118
|
>
|
|
@@ -118,7 +121,7 @@ function NavigationMenuPositioner({
|
|
|
118
121
|
</NavigationMenuPrimitive.Popup>
|
|
119
122
|
</NavigationMenuPrimitive.Positioner>
|
|
120
123
|
</NavigationMenuPrimitive.Portal>
|
|
121
|
-
)
|
|
124
|
+
);
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
function NavigationMenuLink({
|
|
@@ -130,11 +133,11 @@ function NavigationMenuLink({
|
|
|
130
133
|
data-slot="navigation-menu-link"
|
|
131
134
|
className={cn(
|
|
132
135
|
"flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4",
|
|
133
|
-
className
|
|
136
|
+
className,
|
|
134
137
|
)}
|
|
135
138
|
{...props}
|
|
136
139
|
/>
|
|
137
|
-
)
|
|
140
|
+
);
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
function NavigationMenuIndicator({
|
|
@@ -145,14 +148,14 @@ function NavigationMenuIndicator({
|
|
|
145
148
|
<NavigationMenuPrimitive.Icon
|
|
146
149
|
data-slot="navigation-menu-indicator"
|
|
147
150
|
className={cn(
|
|
148
|
-
|
|
149
|
-
className
|
|
151
|
+
'top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:animate-in data-[state=visible]:fade-in',
|
|
152
|
+
className,
|
|
150
153
|
)}
|
|
151
154
|
{...props}
|
|
152
155
|
>
|
|
153
156
|
<div className="relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" />
|
|
154
157
|
</NavigationMenuPrimitive.Icon>
|
|
155
|
-
)
|
|
158
|
+
);
|
|
156
159
|
}
|
|
157
160
|
|
|
158
161
|
export {
|
|
@@ -165,4 +168,4 @@ export {
|
|
|
165
168
|
NavigationMenuTrigger,
|
|
166
169
|
navigationMenuTriggerStyle,
|
|
167
170
|
NavigationMenuPositioner,
|
|
168
|
-
}
|
|
171
|
+
};
|
|
@@ -1,122 +1,125 @@
|
|
|
1
|
-
import * as React from
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import { cn } from
|
|
4
|
-
import { Button } from
|
|
5
|
-
import {
|
|
3
|
+
import { cn } from '../../lib/utils';
|
|
4
|
+
import { Button } from './button';
|
|
5
|
+
import {
|
|
6
|
+
IconChevronLeftOutline18,
|
|
7
|
+
IconChevronRightOutline18,
|
|
8
|
+
IconDotsOutline18,
|
|
9
|
+
} from '../../icons';
|
|
6
10
|
|
|
7
|
-
function Pagination({ className, ...props }: React.ComponentProps<
|
|
11
|
+
function Pagination({ className, ...props }: React.ComponentProps<'nav'>) {
|
|
8
12
|
return (
|
|
9
13
|
<nav
|
|
10
14
|
role="navigation"
|
|
11
15
|
aria-label="pagination"
|
|
12
16
|
data-slot="pagination"
|
|
13
|
-
className={cn(
|
|
17
|
+
className={cn('mx-auto flex w-full justify-center', className)}
|
|
14
18
|
{...props}
|
|
15
19
|
/>
|
|
16
|
-
)
|
|
20
|
+
);
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
function PaginationContent({
|
|
20
24
|
className,
|
|
21
25
|
...props
|
|
22
|
-
}: React.ComponentProps<
|
|
26
|
+
}: React.ComponentProps<'ul'>) {
|
|
23
27
|
return (
|
|
24
28
|
<ul
|
|
25
29
|
data-slot="pagination-content"
|
|
26
|
-
className={cn(
|
|
30
|
+
className={cn('flex items-center gap-0.5', className)}
|
|
27
31
|
{...props}
|
|
28
32
|
/>
|
|
29
|
-
)
|
|
33
|
+
);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
|
-
function PaginationItem({ ...props }: React.ComponentProps<
|
|
33
|
-
return <li data-slot="pagination-item" {...props}
|
|
36
|
+
function PaginationItem({ ...props }: React.ComponentProps<'li'>) {
|
|
37
|
+
return <li data-slot="pagination-item" {...props} />;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
type PaginationLinkProps = {
|
|
37
|
-
isActive?: boolean
|
|
38
|
-
} & Pick<React.ComponentProps<typeof Button>,
|
|
39
|
-
React.ComponentProps<
|
|
41
|
+
isActive?: boolean;
|
|
42
|
+
} & Pick<React.ComponentProps<typeof Button>, 'size'> &
|
|
43
|
+
React.ComponentProps<'a'>;
|
|
40
44
|
|
|
41
45
|
function PaginationLink({
|
|
42
46
|
className,
|
|
43
47
|
isActive,
|
|
44
|
-
size =
|
|
48
|
+
size = 'icon',
|
|
45
49
|
...props
|
|
46
50
|
}: PaginationLinkProps) {
|
|
47
51
|
return (
|
|
48
52
|
<Button
|
|
49
|
-
variant={isActive ?
|
|
53
|
+
variant={isActive ? 'outline' : 'ghost'}
|
|
50
54
|
size={size}
|
|
51
55
|
className={cn(className)}
|
|
52
56
|
nativeButton={false}
|
|
53
57
|
render={
|
|
54
58
|
<a
|
|
55
|
-
aria-current={isActive ?
|
|
59
|
+
aria-current={isActive ? 'page' : undefined}
|
|
56
60
|
data-slot="pagination-link"
|
|
57
61
|
data-active={isActive}
|
|
58
62
|
{...props}
|
|
59
63
|
/>
|
|
60
64
|
}
|
|
61
65
|
/>
|
|
62
|
-
)
|
|
66
|
+
);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
function PaginationPrevious({
|
|
66
70
|
className,
|
|
67
|
-
text =
|
|
71
|
+
text = 'Previous',
|
|
68
72
|
...props
|
|
69
73
|
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
70
74
|
return (
|
|
71
75
|
<PaginationLink
|
|
72
76
|
aria-label="Go to previous page"
|
|
73
77
|
size="default"
|
|
74
|
-
className={cn(
|
|
78
|
+
className={cn('pl-1.5!', className)}
|
|
75
79
|
{...props}
|
|
76
80
|
>
|
|
77
81
|
<IconChevronLeftOutline18 data-icon="inline-start" />
|
|
78
82
|
<span className="hidden sm:block">{text}</span>
|
|
79
83
|
</PaginationLink>
|
|
80
|
-
)
|
|
84
|
+
);
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
function PaginationNext({
|
|
84
88
|
className,
|
|
85
|
-
text =
|
|
89
|
+
text = 'Next',
|
|
86
90
|
...props
|
|
87
91
|
}: React.ComponentProps<typeof PaginationLink> & { text?: string }) {
|
|
88
92
|
return (
|
|
89
93
|
<PaginationLink
|
|
90
94
|
aria-label="Go to next page"
|
|
91
95
|
size="default"
|
|
92
|
-
className={cn(
|
|
96
|
+
className={cn('pr-1.5!', className)}
|
|
93
97
|
{...props}
|
|
94
98
|
>
|
|
95
99
|
<span className="hidden sm:block">{text}</span>
|
|
96
100
|
<IconChevronRightOutline18 data-icon="inline-end" />
|
|
97
101
|
</PaginationLink>
|
|
98
|
-
)
|
|
102
|
+
);
|
|
99
103
|
}
|
|
100
104
|
|
|
101
105
|
function PaginationEllipsis({
|
|
102
106
|
className,
|
|
103
107
|
...props
|
|
104
|
-
}: React.ComponentProps<
|
|
108
|
+
}: React.ComponentProps<'span'>) {
|
|
105
109
|
return (
|
|
106
110
|
<span
|
|
107
111
|
aria-hidden
|
|
108
112
|
data-slot="pagination-ellipsis"
|
|
109
113
|
className={cn(
|
|
110
114
|
"flex size-8 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
111
|
-
className
|
|
115
|
+
className,
|
|
112
116
|
)}
|
|
113
117
|
{...props}
|
|
114
118
|
>
|
|
115
|
-
<IconDotsOutline18
|
|
116
|
-
/>
|
|
119
|
+
<IconDotsOutline18 />
|
|
117
120
|
<span className="sr-only">More pages</span>
|
|
118
121
|
</span>
|
|
119
|
-
)
|
|
122
|
+
);
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
export {
|
|
@@ -127,4 +130,4 @@ export {
|
|
|
127
130
|
PaginationLink,
|
|
128
131
|
PaginationNext,
|
|
129
132
|
PaginationPrevious,
|
|
130
|
-
}
|
|
133
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { Popover as PopoverPrimitive } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
|
|
3
3
|
|
|
4
|
-
import { cn } from
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
5
|
|
|
6
6
|
function Popover({ ...props }: PopoverPrimitive.Root.Props) {
|
|
7
|
-
return <PopoverPrimitive.Root data-slot="popover" {...props}
|
|
7
|
+
return <PopoverPrimitive.Root data-slot="popover" {...props} />;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) {
|
|
11
|
-
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props}
|
|
11
|
+
return <PopoverPrimitive.Trigger data-slot="popover-trigger" {...props} />;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
function PopoverContent({
|
|
15
15
|
className,
|
|
16
|
-
align =
|
|
16
|
+
align = 'center',
|
|
17
17
|
alignOffset = 0,
|
|
18
|
-
side =
|
|
18
|
+
side = 'bottom',
|
|
19
19
|
sideOffset = 4,
|
|
20
20
|
...props
|
|
21
21
|
}: PopoverPrimitive.Popup.Props &
|
|
22
22
|
Pick<
|
|
23
23
|
PopoverPrimitive.Positioner.Props,
|
|
24
|
-
|
|
24
|
+
'align' | 'alignOffset' | 'side' | 'sideOffset'
|
|
25
25
|
>) {
|
|
26
26
|
return (
|
|
27
27
|
<PopoverPrimitive.Portal>
|
|
@@ -35,34 +35,34 @@ function PopoverContent({
|
|
|
35
35
|
<PopoverPrimitive.Popup
|
|
36
36
|
data-slot="popover-content"
|
|
37
37
|
className={cn(
|
|
38
|
-
|
|
39
|
-
className
|
|
38
|
+
'z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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',
|
|
39
|
+
className,
|
|
40
40
|
)}
|
|
41
41
|
{...props}
|
|
42
42
|
/>
|
|
43
43
|
</PopoverPrimitive.Positioner>
|
|
44
44
|
</PopoverPrimitive.Portal>
|
|
45
|
-
)
|
|
45
|
+
);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
function PopoverHeader({ className, ...props }: React.ComponentProps<
|
|
48
|
+
function PopoverHeader({ className, ...props }: React.ComponentProps<'div'>) {
|
|
49
49
|
return (
|
|
50
50
|
<div
|
|
51
51
|
data-slot="popover-header"
|
|
52
|
-
className={cn(
|
|
52
|
+
className={cn('flex flex-col gap-0.5 text-sm', className)}
|
|
53
53
|
{...props}
|
|
54
54
|
/>
|
|
55
|
-
)
|
|
55
|
+
);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props) {
|
|
59
59
|
return (
|
|
60
60
|
<PopoverPrimitive.Title
|
|
61
61
|
data-slot="popover-title"
|
|
62
|
-
className={cn(
|
|
62
|
+
className={cn('font-medium', className)}
|
|
63
63
|
{...props}
|
|
64
64
|
/>
|
|
65
|
-
)
|
|
65
|
+
);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
function PopoverDescription({
|
|
@@ -72,10 +72,10 @@ function PopoverDescription({
|
|
|
72
72
|
return (
|
|
73
73
|
<PopoverPrimitive.Description
|
|
74
74
|
data-slot="popover-description"
|
|
75
|
-
className={cn(
|
|
75
|
+
className={cn('text-muted-foreground', className)}
|
|
76
76
|
{...props}
|
|
77
77
|
/>
|
|
78
|
-
)
|
|
78
|
+
);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
export {
|
|
@@ -85,4 +85,4 @@ export {
|
|
|
85
85
|
PopoverHeader,
|
|
86
86
|
PopoverTitle,
|
|
87
87
|
PopoverTrigger,
|
|
88
|
-
}
|
|
88
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import { Progress as ProgressPrimitive } from
|
|
3
|
+
import { Progress as ProgressPrimitive } from '@base-ui/react/progress';
|
|
4
4
|
|
|
5
|
-
import { cn } from
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
6
|
|
|
7
7
|
function Progress({
|
|
8
8
|
className,
|
|
@@ -14,7 +14,7 @@ function Progress({
|
|
|
14
14
|
<ProgressPrimitive.Root
|
|
15
15
|
value={value}
|
|
16
16
|
data-slot="progress"
|
|
17
|
-
className={cn(
|
|
17
|
+
className={cn('flex flex-wrap gap-3', className)}
|
|
18
18
|
{...props}
|
|
19
19
|
>
|
|
20
20
|
{children}
|
|
@@ -22,20 +22,20 @@ function Progress({
|
|
|
22
22
|
<ProgressIndicator />
|
|
23
23
|
</ProgressTrack>
|
|
24
24
|
</ProgressPrimitive.Root>
|
|
25
|
-
)
|
|
25
|
+
);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props) {
|
|
29
29
|
return (
|
|
30
30
|
<ProgressPrimitive.Track
|
|
31
31
|
className={cn(
|
|
32
|
-
|
|
33
|
-
className
|
|
32
|
+
'relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted',
|
|
33
|
+
className,
|
|
34
34
|
)}
|
|
35
35
|
data-slot="progress-track"
|
|
36
36
|
{...props}
|
|
37
37
|
/>
|
|
38
|
-
)
|
|
38
|
+
);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
function ProgressIndicator({
|
|
@@ -45,33 +45,33 @@ function ProgressIndicator({
|
|
|
45
45
|
return (
|
|
46
46
|
<ProgressPrimitive.Indicator
|
|
47
47
|
data-slot="progress-indicator"
|
|
48
|
-
className={cn(
|
|
48
|
+
className={cn('h-full bg-primary transition-all', className)}
|
|
49
49
|
{...props}
|
|
50
50
|
/>
|
|
51
|
-
)
|
|
51
|
+
);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props) {
|
|
55
55
|
return (
|
|
56
56
|
<ProgressPrimitive.Label
|
|
57
|
-
className={cn(
|
|
57
|
+
className={cn('text-sm font-medium', className)}
|
|
58
58
|
data-slot="progress-label"
|
|
59
59
|
{...props}
|
|
60
60
|
/>
|
|
61
|
-
)
|
|
61
|
+
);
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props) {
|
|
65
65
|
return (
|
|
66
66
|
<ProgressPrimitive.Value
|
|
67
67
|
className={cn(
|
|
68
|
-
|
|
69
|
-
className
|
|
68
|
+
'ml-auto text-sm text-muted-foreground tabular-nums',
|
|
69
|
+
className,
|
|
70
70
|
)}
|
|
71
71
|
data-slot="progress-value"
|
|
72
72
|
{...props}
|
|
73
73
|
/>
|
|
74
|
-
)
|
|
74
|
+
);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
export {
|
|
@@ -80,4 +80,4 @@ export {
|
|
|
80
80
|
ProgressIndicator,
|
|
81
81
|
ProgressLabel,
|
|
82
82
|
ProgressValue,
|
|
83
|
-
}
|
|
83
|
+
};
|