@nswds/ui 3.5.5 → 4.1.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/dist/components/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio.js +24 -0
- package/dist/components/aspect-ratio.js.map +1 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +17 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/drawer.d.ts +15 -0
- package/dist/components/drawer.js +118 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/hover-card.d.ts +8 -0
- package/dist/components/hover-card.js +45 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/masthead.d.ts +34 -0
- package/dist/components/masthead.js +82 -0
- package/dist/components/masthead.js.map +1 -0
- package/dist/components/popover.d.ts +11 -0
- package/dist/components/popover.js +78 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/resizable.d.ts +10 -0
- package/dist/components/resizable.js +46 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +61 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/sheet.d.ts +16 -0
- package/dist/components/sheet.js +122 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skip-link.d.ts +51 -0
- package/dist/components/skip-link.js +118 -0
- package/dist/components/skip-link.js.map +1 -0
- package/dist/components/sonner.d.ts +6 -0
- package/dist/components/sonner.js +40 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +63 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.js +12 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -2
- package/dist/components/description-list.d.ts +0 -16
- package/dist/components/description-list.js +0 -58
- package/dist/components/description-list.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
function ScrollArea({
|
|
7
|
+
className,
|
|
8
|
+
children,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsxs(
|
|
12
|
+
ScrollArea$1.Root,
|
|
13
|
+
{
|
|
14
|
+
"data-slot": "scroll-area",
|
|
15
|
+
className: cn("relative", className),
|
|
16
|
+
...props,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx(
|
|
19
|
+
ScrollArea$1.Viewport,
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "scroll-area-viewport",
|
|
22
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
23
|
+
children
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
27
|
+
/* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
function ScrollBar({
|
|
33
|
+
className,
|
|
34
|
+
orientation = "vertical",
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
ScrollArea$1.Scrollbar,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "scroll-area-scrollbar",
|
|
41
|
+
"data-orientation": orientation,
|
|
42
|
+
orientation,
|
|
43
|
+
className: cn(
|
|
44
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
...props,
|
|
48
|
+
children: /* @__PURE__ */ jsx(
|
|
49
|
+
ScrollArea$1.Thumb,
|
|
50
|
+
{
|
|
51
|
+
"data-slot": "scroll-area-thumb",
|
|
52
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export { ScrollArea, ScrollBar };
|
|
60
|
+
//# sourceMappingURL=scroll-area.js.map
|
|
61
|
+
//# sourceMappingURL=scroll-area.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/scroll-area.tsx"],"names":["ScrollAreaPrimitive"],"mappings":";;;;AAMA,SAAS,UAAA,CAAW;AAAA,EAClB,SAAA;AAAA,EACA,QAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAmC;AACjC,EAAA,uBACE,IAAA;AAAA,IAACA,YAAA,CAAoB,IAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,aAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,UAAA,EAAY,SAAS,CAAA;AAAA,MAClC,GAAG,KAAA;AAAA,MAEJ,QAAA,EAAA;AAAA,wBAAA,GAAA;AAAA,UAACA,YAAA,CAAoB,QAAA;AAAA,UAApB;AAAA,YACC,WAAA,EAAU,sBAAA;AAAA,YACV,SAAA,EAAU,oJAAA;AAAA,YAET;AAAA;AAAA,SACH;AAAA,4BACC,SAAA,EAAA,EAAU,CAAA;AAAA,wBACX,GAAA,CAACA,YAAA,CAAoB,MAAA,EAApB,EAA2B;AAAA;AAAA;AAAA,GAC9B;AAEJ;AAEA,SAAS,SAAA,CAAU;AAAA,EACjB,SAAA;AAAA,EACA,WAAA,GAAc,UAAA;AAAA,EACd,GAAG;AACL,CAAA,EAAwC;AACtC,EAAA,uBACE,GAAA;AAAA,IAACA,YAAA,CAAoB,SAAA;AAAA,IAApB;AAAA,MACC,WAAA,EAAU,uBAAA;AAAA,MACV,kBAAA,EAAkB,WAAA;AAAA,MAClB,WAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA,QACT,oQAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG,KAAA;AAAA,MAEJ,QAAA,kBAAA,GAAA;AAAA,QAACA,YAAA,CAAoB,KAAA;AAAA,QAApB;AAAA,UACC,WAAA,EAAU,mBAAA;AAAA,UACV,SAAA,EAAU;AAAA;AAAA;AACZ;AAAA,GACF;AAEJ","file":"scroll-area.js","sourcesContent":["'use client'\n\nimport { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area'\n\nimport { cn } from '../lib/utils.js'\n\nfunction ScrollArea({\n className,\n children,\n ...props\n}: ScrollAreaPrimitive.Root.Props) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn('relative', className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n )\n}\n\nfunction ScrollBar({\n className,\n orientation = 'vertical',\n ...props\n}: ScrollAreaPrimitive.Scrollbar.Props) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n 'flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent',\n className\n )}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"relative flex-1 rounded-full bg-border\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n )\n}\n\nexport { ScrollArea, ScrollBar }\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
declare function Sheet({ ...props }: Dialog.Root.Props): React.JSX.Element;
|
|
5
|
+
declare function SheetTrigger({ ...props }: Dialog.Trigger.Props): React.JSX.Element;
|
|
6
|
+
declare function SheetClose({ ...props }: Dialog.Close.Props): React.JSX.Element;
|
|
7
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: Dialog.Popup.Props & {
|
|
8
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
12
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
13
|
+
declare function SheetTitle({ className, ...props }: Dialog.Title.Props): React.JSX.Element;
|
|
14
|
+
declare function SheetDescription({ className, ...props }: Dialog.Description.Props): React.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Dialog } from '@base-ui/react/dialog';
|
|
4
|
+
import { Button } from '../components/button.js';
|
|
5
|
+
import { IconClose } from '../icons/index.js';
|
|
6
|
+
import { cn } from '../lib/utils.js';
|
|
7
|
+
|
|
8
|
+
function Sheet({ ...props }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { "data-slot": "sheet", ...props });
|
|
10
|
+
}
|
|
11
|
+
function SheetTrigger({ ...props }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
13
|
+
}
|
|
14
|
+
function SheetClose({ ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx(Dialog.Close, { "data-slot": "sheet-close", ...props });
|
|
16
|
+
}
|
|
17
|
+
function SheetPortal({ ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, { "data-slot": "sheet-portal", ...props });
|
|
19
|
+
}
|
|
20
|
+
function SheetOverlay({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Dialog.Backdrop,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "sheet-overlay",
|
|
25
|
+
className: cn(
|
|
26
|
+
"fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
function SheetContent({
|
|
34
|
+
className,
|
|
35
|
+
children,
|
|
36
|
+
side = "right",
|
|
37
|
+
showCloseButton = true,
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
42
|
+
/* @__PURE__ */ jsxs(
|
|
43
|
+
Dialog.Popup,
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "sheet-content",
|
|
46
|
+
"data-side": side,
|
|
47
|
+
className: cn(
|
|
48
|
+
"fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem]",
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
...props,
|
|
52
|
+
children: [
|
|
53
|
+
children,
|
|
54
|
+
showCloseButton && /* @__PURE__ */ jsx(
|
|
55
|
+
Dialog.Close,
|
|
56
|
+
{
|
|
57
|
+
"data-slot": "sheet-close",
|
|
58
|
+
render: /* @__PURE__ */ jsx(
|
|
59
|
+
Button,
|
|
60
|
+
{
|
|
61
|
+
variant: "ghost",
|
|
62
|
+
color: "grey",
|
|
63
|
+
size: "icon",
|
|
64
|
+
"aria-label": "Close",
|
|
65
|
+
className: "absolute end-4 top-4"
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
children: /* @__PURE__ */ jsx(IconClose, {})
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
function SheetHeader({ className, ...props }) {
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
"div",
|
|
79
|
+
{
|
|
80
|
+
"data-slot": "sheet-header",
|
|
81
|
+
className: cn("flex flex-col gap-1.5 p-6", className),
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
function SheetFooter({ className, ...props }) {
|
|
87
|
+
return /* @__PURE__ */ jsx(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
"data-slot": "sheet-footer",
|
|
91
|
+
className: cn("mt-auto flex flex-col gap-2 p-6", className),
|
|
92
|
+
...props
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
function SheetTitle({ className, ...props }) {
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
Dialog.Title,
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "sheet-title",
|
|
101
|
+
className: cn("text-sm font-medium text-foreground", className),
|
|
102
|
+
...props
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
function SheetDescription({
|
|
107
|
+
className,
|
|
108
|
+
...props
|
|
109
|
+
}) {
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
Dialog.Description,
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "sheet-description",
|
|
114
|
+
className: cn("text-xs/relaxed text-muted-foreground", className),
|
|
115
|
+
...props
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
121
|
+
//# sourceMappingURL=sheet.js.map
|
|
122
|
+
//# sourceMappingURL=sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/sheet.tsx"],"names":["SheetPrimitive"],"mappings":";;;;;;AASA,SAAS,KAAA,CAAM,EAAE,GAAG,KAAA,EAAM,EAA8B;AACtD,EAAA,2BAAQA,MAAA,CAAe,IAAA,EAAf,EAAoB,WAAA,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A;AAAA,GACN;AAEJ;AAEA,SAAS,gBAAA,CAAiB;AAAA,EACxB,SAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAqC;AACnC,EAAA,uBACE,GAAA;AAAA,IAACA,MAAA,CAAe,WAAA;AAAA,IAAf;AAAA,MACC,WAAA,EAAU,mBAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,uCAAA,EAAyC,SAAS,CAAA;AAAA,MAC/D,GAAG;AAAA;AAAA,GACN;AAEJ","file":"sheet.js","sourcesContent":["'use client'\n\nimport { Dialog as SheetPrimitive } from '@base-ui/react/dialog'\nimport * as React from 'react'\n\nimport { Button } from '../components/button.js'\nimport { IconClose } from '../icons/index.js'\nimport { cn } from '../lib/utils.js'\n\nfunction Sheet({ ...props }: SheetPrimitive.Root.Props) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({ ...props }: SheetPrimitive.Close.Props) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({ ...props }: SheetPrimitive.Portal.Props) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({ className, ...props }: SheetPrimitive.Backdrop.Props) {\n return (\n <SheetPrimitive.Backdrop\n data-slot=\"sheet-overlay\"\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n showCloseButton = true,\n ...props\n}: SheetPrimitive.Popup.Props & {\n side?: 'top' | 'right' | 'bottom' | 'left'\n showCloseButton?: boolean\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Popup\n data-slot=\"sheet-content\"\n data-side={side}\n className={cn(\n 'fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem]',\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <SheetPrimitive.Close\n data-slot=\"sheet-close\"\n render={\n <Button\n variant=\"ghost\"\n color=\"grey\"\n size=\"icon\"\n aria-label=\"Close\"\n className=\"absolute end-4 top-4\"\n />\n }\n >\n <IconClose />\n </SheetPrimitive.Close>\n )}\n </SheetPrimitive.Popup>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn('flex flex-col gap-1.5 p-6', className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn('mt-auto flex flex-col gap-2 p-6', className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({ className, ...props }: SheetPrimitive.Title.Props) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-sm font-medium text-foreground', className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: SheetPrimitive.Description.Props) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-xs/relaxed text-muted-foreground', className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetTitle,\n SheetTrigger,\n}\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
|
|
5
|
+
declare const skipLinkVariants: (props?: ({
|
|
6
|
+
color?: "light" | "white" | "grey" | "dark" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
type SkipLinkProps = React__default.ComponentPropsWithoutRef<'a'> & VariantProps<typeof skipLinkVariants> & {
|
|
9
|
+
/** Same-page fragment target, e.g. `"#content"`. */
|
|
10
|
+
href: string;
|
|
11
|
+
ref?: React__default.Ref<HTMLAnchorElement>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A single focus-revealed bypass link (2.4.1 Bypass Blocks). Hidden above the
|
|
15
|
+
* viewport until it receives keyboard focus, then slides in as a full-width
|
|
16
|
+
* bar. Designed to sit inside `SkipLinks`, which provides the positioned
|
|
17
|
+
* `<nav>` landmark; standalone use needs a positioned ancestor.
|
|
18
|
+
*
|
|
19
|
+
* Renders a plain `<a>` (not the themeable `Link`) because skip links are
|
|
20
|
+
* same-page fragment jumps — routing framework link components are
|
|
21
|
+
* unnecessary and can interfere with fragment navigation.
|
|
22
|
+
*/
|
|
23
|
+
declare function SkipLink({ className, color, href, onClick, children, ref, ...props }: SkipLinkProps): React__default.JSX.Element;
|
|
24
|
+
type SkipLinksProps = React__default.ComponentPropsWithoutRef<'nav'> & VariantProps<typeof skipLinkVariants> & {
|
|
25
|
+
ref?: React__default.Ref<HTMLElement>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Fixed landmark that holds the page's skip links, rendered as the first
|
|
29
|
+
* element in the body (before the `Masthead`). Successor to the legacy
|
|
30
|
+
* `.nsw-skip` nav.
|
|
31
|
+
*
|
|
32
|
+
* When the `children` prop is omitted it renders the legacy default pair —
|
|
33
|
+
* "Skip to navigation" (`#nav`) and "Skip to content" (`#content`) — themed
|
|
34
|
+
* by `color`. Any provided children (including an explicitly empty list from
|
|
35
|
+
* a `.map()` or a false conditional) render exactly as given, per normal
|
|
36
|
+
* React semantics — the defaults are never injected alongside or instead of
|
|
37
|
+
* explicit content, since their `#nav`/`#content` targets may not exist on a
|
|
38
|
+
* page that opted into custom links. Compose your own `SkipLink` children
|
|
39
|
+
* for different targets or extra links:
|
|
40
|
+
*
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <SkipLinks>
|
|
43
|
+
* <SkipLink href="#main-navigation">Skip to navigation</SkipLink>
|
|
44
|
+
* <SkipLink href="#main-content">Skip to content</SkipLink>
|
|
45
|
+
* <SkipLink href="#search">Skip to search</SkipLink>
|
|
46
|
+
* </SkipLinks>
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
declare function SkipLinks({ className, color, children, ref, ...props }: SkipLinksProps): React__default.JSX.Element;
|
|
50
|
+
|
|
51
|
+
export { SkipLink, type SkipLinkProps, SkipLinks, type SkipLinksProps, skipLinkVariants };
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
const skipLinkColors = {
|
|
7
|
+
dark: "bg-primary-800 text-white dark:bg-primary-950",
|
|
8
|
+
light: "bg-grey-100 text-grey-900",
|
|
9
|
+
white: "bg-white text-grey-900",
|
|
10
|
+
grey: "bg-grey-800 text-white"
|
|
11
|
+
};
|
|
12
|
+
const skipLinkVariants = cva(
|
|
13
|
+
[
|
|
14
|
+
// Parked above the viewport until focused (legacy translateY(-101%)
|
|
15
|
+
// pattern) — still in the tab order, so it is the first thing keyboard
|
|
16
|
+
// and screen-reader users reach.
|
|
17
|
+
"absolute inset-x-0 top-0 w-full -translate-y-[101%]",
|
|
18
|
+
"transition-transform motion-reduce:transition-none",
|
|
19
|
+
"focus:translate-y-0",
|
|
20
|
+
// min-h-11 keeps the revealed bar at ≥44px — 2.5.5 Target Size (AAA).
|
|
21
|
+
"group flex min-h-11 items-center px-4 py-2 text-xs font-medium no-underline",
|
|
22
|
+
// The visible focus indicator is the ring around the label span
|
|
23
|
+
// (2.4.13 Focus Appearance): outline-current guarantees it contrasts with
|
|
24
|
+
// the bar on every colour variant. outline-hidden (not outline-none) on
|
|
25
|
+
// the anchor keeps a forced-colors fallback outline.
|
|
26
|
+
"focus:outline-hidden"
|
|
27
|
+
],
|
|
28
|
+
{
|
|
29
|
+
variants: {
|
|
30
|
+
color: skipLinkColors
|
|
31
|
+
},
|
|
32
|
+
defaultVariants: {
|
|
33
|
+
color: "dark"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
function focusSkipTarget(event) {
|
|
38
|
+
const hash = event.currentTarget.hash;
|
|
39
|
+
if (!hash || hash === "#") {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
let id = hash.slice(1);
|
|
43
|
+
try {
|
|
44
|
+
id = decodeURIComponent(id);
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
const target = document.getElementById(id);
|
|
48
|
+
if (!target) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (target.tabIndex < 0 && !target.hasAttribute("tabindex")) {
|
|
52
|
+
target.setAttribute("tabindex", "-1");
|
|
53
|
+
target.addEventListener(
|
|
54
|
+
"blur",
|
|
55
|
+
() => {
|
|
56
|
+
target.removeAttribute("tabindex");
|
|
57
|
+
},
|
|
58
|
+
{ once: true }
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
target.focus();
|
|
62
|
+
}
|
|
63
|
+
function SkipLink({
|
|
64
|
+
className,
|
|
65
|
+
color,
|
|
66
|
+
href,
|
|
67
|
+
onClick,
|
|
68
|
+
children,
|
|
69
|
+
ref,
|
|
70
|
+
...props
|
|
71
|
+
}) {
|
|
72
|
+
return /* @__PURE__ */ jsx(
|
|
73
|
+
"a",
|
|
74
|
+
{
|
|
75
|
+
"data-slot": "skip-link",
|
|
76
|
+
...props,
|
|
77
|
+
href,
|
|
78
|
+
onClick: (event) => {
|
|
79
|
+
onClick?.(event);
|
|
80
|
+
if (!event.defaultPrevented) {
|
|
81
|
+
focusSkipTarget(event);
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
className: cn(skipLinkVariants({ color }), className),
|
|
85
|
+
ref,
|
|
86
|
+
children: /* @__PURE__ */ jsx("span", { className: "group-focus:outline group-focus:outline-2 group-focus:outline-offset-2 group-focus:outline-current", children })
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function SkipLinks({
|
|
91
|
+
className,
|
|
92
|
+
color,
|
|
93
|
+
// Destructuring default: applies only when the prop is `undefined`
|
|
94
|
+
// (omitted), never for explicit null/false/[] children. `color` is
|
|
95
|
+
// initialised earlier in the pattern, so it is in scope here.
|
|
96
|
+
children = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
97
|
+
/* @__PURE__ */ jsx(SkipLink, { color, href: "#nav", children: "Skip to navigation" }),
|
|
98
|
+
/* @__PURE__ */ jsx(SkipLink, { color, href: "#content", children: "Skip to content" })
|
|
99
|
+
] }),
|
|
100
|
+
ref,
|
|
101
|
+
...props
|
|
102
|
+
}) {
|
|
103
|
+
return /* @__PURE__ */ jsx(
|
|
104
|
+
"nav",
|
|
105
|
+
{
|
|
106
|
+
"aria-label": "Skip links",
|
|
107
|
+
"data-slot": "skip-links",
|
|
108
|
+
...props,
|
|
109
|
+
className: cn("fixed inset-x-0 top-0 z-50 w-full", className),
|
|
110
|
+
ref,
|
|
111
|
+
children
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { SkipLink, SkipLinks, skipLinkVariants };
|
|
117
|
+
//# sourceMappingURL=skip-link.js.map
|
|
118
|
+
//# sourceMappingURL=skip-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/skip-link.tsx"],"names":[],"mappings":";;;;AAYA,MAAM,cAAA,GAAiB;AAAA,EACrB,IAAA,EAAM,+CAAA;AAAA,EACN,KAAA,EAAO,2BAAA;AAAA,EACP,KAAA,EAAO,wBAAA;AAAA,EACP,IAAA,EAAM;AACR,CAAA;AAEA,MAAM,gBAAA,GAAmB,GAAA;AAAA,EACvB;AAAA;AAAA;AAAA;AAAA,IAIE,qDAAA;AAAA,IACA,oDAAA;AAAA,IACA,qBAAA;AAAA;AAAA,IAEA,6EAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAKA;AAAA,GACF;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,KAAA,EAAO;AAAA,KACT;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,KAAA,EAAO;AAAA;AACT;AAEJ;AAQA,SAAS,gBAAgB,KAAA,EAA4C;AACnE,EAAA,MAAM,IAAA,GAAO,MAAM,aAAA,CAAc,IAAA;AACjC,EAAA,IAAI,CAAC,IAAA,IAAQ,IAAA,K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AA,EAAO,GAAG,SAAS,CAAA;AAAA,MACpD,GAAA;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,oGAAA,EACb,QAAA,EACH;AAAA;AAAA,GACF;AAEJ;AA6BA,SAAS,SAAA,CAAU;AAAA,EACjB,SAAA;AAAA,EACA,KAAA;AAAA;AAAA;AAAA;AAAA,EAIA,2BACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAc,IAAA,EAAK,MAAA,EAAO,QAAA,EAAA,oBAAA,EAEpC,CAAA;AAAA,oBACA,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAc,IAAA,EAAK,YAAW,QAAA,EAAA,iBAAA,EAExC;AAAA,GAAA,EACF,CAAA;AAAA,EAEF,GAAA;AAAA,EACA,GAAG;AACL,CAAA,EAAmB;AACjB,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAW,YAAA;AAAA,MACX,WAAA,EAAU,YAAA;AAAA,MACT,GAAG,KAAA;AAAA,MACJ,SAAA,EAAW,EAAA,CAAG,mCAAA,EAAqC,SAAS,CAAA;AAAA,MAC5D,GAAA;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ","file":"skip-link.js","sourcesContent":["'use client'\n\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport React from 'react'\n\nimport { cn } from '../lib/utils.js'\n\n// Same curated WCAG 2.2 AAA (7:1) pairs as the Masthead — the two components\n// are designed to be themed together, mirroring how the legacy\n// `masthead-theme` option drove both `.nsw-masthead--light` and\n// `.nsw-skip--light`. Kept as a local map (not imported from masthead.tsx) so\n// each file stays standalone for registry distribution.\nconst skipLinkColors = {\n dark: 'bg-primary-800 text-white dark:bg-primary-950',\n light: 'bg-grey-100 text-grey-900',\n white: 'bg-white text-grey-900',\n grey: 'bg-grey-800 text-white',\n}\n\nconst skipLinkVariants = cva(\n [\n // Parked above the viewport until focused (legacy translateY(-101%)\n // pattern) — still in the tab order, so it is the first thing keyboard\n // and screen-reader users reach.\n 'absolute inset-x-0 top-0 w-full -translate-y-[101%]',\n 'transition-transform motion-reduce:transition-none',\n 'focus:translate-y-0',\n // min-h-11 keeps the revealed bar at ≥44px — 2.5.5 Target Size (AAA).\n 'group flex min-h-11 items-center px-4 py-2 text-xs font-medium no-underline',\n // The visible focus indicator is the ring around the label span\n // (2.4.13 Focus Appearance): outline-current guarantees it contrasts with\n // the bar on every colour variant. outline-hidden (not outline-none) on\n // the anchor keeps a forced-colors fallback outline.\n 'focus:outline-hidden',\n ],\n {\n variants: {\n color: skipLinkColors,\n },\n defaultVariants: {\n color: 'dark',\n },\n }\n)\n\n/**\n * Move focus to the skip target. Fragment navigation alone only moves the\n * sequential-focus starting point; explicitly focusing the target makes\n * screen readers announce it. Non-focusable targets get a temporary\n * `tabindex=\"-1\"` (removed on blur), matching the legacy skip-to behaviour.\n */\nfunction focusSkipTarget(event: React.MouseEvent<HTMLAnchorElement>) {\n const hash = event.currentTarget.hash\n if (!hash || hash === '#') {\n return\n }\n\n let id = hash.slice(1)\n try {\n id = decodeURIComponent(id)\n } catch {\n // Malformed escape sequence — fall back to the raw fragment.\n }\n\n const target = document.getElementById(id)\n if (!target) {\n return\n }\n\n if (target.tabIndex < 0 && !target.hasAttribute('tabindex')) {\n target.setAttribute('tabindex', '-1')\n target.addEventListener(\n 'blur',\n () => {\n target.removeAttribute('tabindex')\n },\n { once: true }\n )\n }\n\n target.focus()\n}\n\ntype SkipLinkProps = React.ComponentPropsWithoutRef<'a'> &\n VariantProps<typeof skipLinkVariants> & {\n /** Same-page fragment target, e.g. `\"#content\"`. */\n href: string\n ref?: React.Ref<HTMLAnchorElement>\n }\n\n/**\n * A single focus-revealed bypass link (2.4.1 Bypass Blocks). Hidden above the\n * viewport until it receives keyboard focus, then slides in as a full-width\n * bar. Designed to sit inside `SkipLinks`, which provides the positioned\n * `<nav>` landmark; standalone use needs a positioned ancestor.\n *\n * Renders a plain `<a>` (not the themeable `Link`) because skip links are\n * same-page fragment jumps — routing framework link components are\n * unnecessary and can interfere with fragment navigation.\n */\nfunction SkipLink({\n className,\n color,\n href,\n onClick,\n children,\n ref,\n ...props\n}: SkipLinkProps) {\n return (\n <a\n data-slot=\"skip-link\"\n {...props}\n href={href}\n onClick={(event) => {\n onClick?.(event)\n if (!event.defaultPrevented) {\n focusSkipTarget(event)\n }\n }}\n className={cn(skipLinkVariants({ color }), className)}\n ref={ref}\n >\n <span className=\"group-focus:outline group-focus:outline-2 group-focus:outline-offset-2 group-focus:outline-current\">\n {children}\n </span>\n </a>\n )\n}\n\ntype SkipLinksProps = React.ComponentPropsWithoutRef<'nav'> &\n VariantProps<typeof skipLinkVariants> & {\n ref?: React.Ref<HTMLElement>\n }\n\n/**\n * Fixed landmark that holds the page's skip links, rendered as the first\n * element in the body (before the `Masthead`). Successor to the legacy\n * `.nsw-skip` nav.\n *\n * When the `children` prop is omitted it renders the legacy default pair —\n * \"Skip to navigation\" (`#nav`) and \"Skip to content\" (`#content`) — themed\n * by `color`. Any provided children (including an explicitly empty list from\n * a `.map()` or a false conditional) render exactly as given, per normal\n * React semantics — the defaults are never injected alongside or instead of\n * explicit content, since their `#nav`/`#content` targets may not exist on a\n * page that opted into custom links. Compose your own `SkipLink` children\n * for different targets or extra links:\n *\n * ```tsx\n * <SkipLinks>\n * <SkipLink href=\"#main-navigation\">Skip to navigation</SkipLink>\n * <SkipLink href=\"#main-content\">Skip to content</SkipLink>\n * <SkipLink href=\"#search\">Skip to search</SkipLink>\n * </SkipLinks>\n * ```\n */\nfunction SkipLinks({\n className,\n color,\n // Destructuring default: applies only when the prop is `undefined`\n // (omitted), never for explicit null/false/[] children. `color` is\n // initialised earlier in the pattern, so it is in scope here.\n children = (\n <>\n <SkipLink color={color} href=\"#nav\">\n Skip to navigation\n </SkipLink>\n <SkipLink color={color} href=\"#content\">\n Skip to content\n </SkipLink>\n </>\n ),\n ref,\n ...props\n}: SkipLinksProps) {\n return (\n <nav\n aria-label=\"Skip links\"\n data-slot=\"skip-links\"\n {...props}\n className={cn('fixed inset-x-0 top-0 z-50 w-full', className)}\n ref={ref}\n >\n {children}\n </nav>\n )\n}\n\nexport { SkipLink, SkipLinks, skipLinkVariants }\nexport type { SkipLinkProps, SkipLinksProps }\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useTheme } from 'next-themes';
|
|
4
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
5
|
+
import { Spinner } from '../components/spinner.js';
|
|
6
|
+
import { IconError, IconWarning, IconInfo, IconCheckCircle } from '../icons/index.js';
|
|
7
|
+
|
|
8
|
+
const Toaster = ({ ...props }) => {
|
|
9
|
+
const { theme = "system" } = useTheme();
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Toaster$1,
|
|
12
|
+
{
|
|
13
|
+
theme,
|
|
14
|
+
className: "toaster group",
|
|
15
|
+
icons: {
|
|
16
|
+
success: /* @__PURE__ */ jsx(IconCheckCircle, { className: "size-4" }),
|
|
17
|
+
info: /* @__PURE__ */ jsx(IconInfo, { className: "size-4" }),
|
|
18
|
+
warning: /* @__PURE__ */ jsx(IconWarning, { className: "size-4" }),
|
|
19
|
+
error: /* @__PURE__ */ jsx(IconError, { className: "size-4" }),
|
|
20
|
+
loading: /* @__PURE__ */ jsx(Spinner, { size: "sm", color: "current", label: "" })
|
|
21
|
+
},
|
|
22
|
+
style: {
|
|
23
|
+
"--normal-bg": "var(--popover)",
|
|
24
|
+
"--normal-text": "var(--popover-foreground)",
|
|
25
|
+
"--normal-border": "var(--border)",
|
|
26
|
+
"--border-radius": "var(--radius)"
|
|
27
|
+
},
|
|
28
|
+
toastOptions: {
|
|
29
|
+
classNames: {
|
|
30
|
+
toast: "cn-toast"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export { Toaster };
|
|
39
|
+
//# sourceMappingURL=sonner.js.map
|
|
40
|
+
//# sourceMappingURL=sonner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/sonner.tsx"],"names":["Sonner"],"mappings":";;;;;;AAcA,MAAM,OAAA,GAAU,CAAC,EAAE,GAAG,OAAM,KAAoB;AAC9C,EAAA,MAAM,EAAE,KAAA,GAAQ,QAAA,EAAS,GAAI,QAAA,EAAS;AAEtC,EAAA,uBACE,GAAA;AAAA,IAACA,SAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,SAAA,EAAU,eAAA;AAAA,MACV,KAAA,EAAO;AAAA,QACL,OAAA,kBAAS,GAAA,CAAC,eAAA,EAAA,EAAgB,SAAA,EAAU,QAAA,EAAS,CAAA;AAAA,QAC7C,IAAA,kBAAM,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAU,QAAA,EAAS,CAAA;AAAA,QACnC,OAAA,kBAAS,GAAA,CAAC,WAAA,EAAA,EAAY,SAAA,EAAU,QAAA,EAAS,CAAA;AAAA,QACzC,KAAA,kBAAO,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAU,QAAA,EAAS,CAAA;AAAA,QACrC,OAAA,sBAAU,OAAA,EAAA,EAAQ,IAAA,EAAK,MAAK,KAAA,EAAM,SAAA,EAAU,OAAM,EAAA,EAAG;AAAA,OACvD;AAAA,MACA,KAAA,EACE;AAAA,QACE,aAAA,EAAe,gBAAA;AAAA,QACf,eAAA,EAAiB,2BAAA;AAAA,QACjB,iBAAA,EAAmB,eAAA;AAAA,QACnB,iBAAA,EAAmB;AAAA,OACrB;AAAA,MAEF,YAAA,EAAc;AAAA,QACZ,UAAA,EAAY;AAAA,UACV,KAAA,EAAO;AAAA;AACT,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"sonner.js","sourcesContent":["'use client'\n\nimport { useTheme } from 'next-themes'\nimport * as React from 'react'\nimport { Toaster as Sonner, type ToasterProps } from 'sonner'\n\nimport { Spinner } from '../components/spinner.js'\nimport {\n IconCheckCircle,\n IconError,\n IconInfo,\n IconWarning,\n} from '../icons/index.js'\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n const { theme = 'system' } = useTheme()\n\n return (\n <Sonner\n theme={theme as ToasterProps['theme']}\n className=\"toaster group\"\n icons={{\n success: <IconCheckCircle className=\"size-4\" />,\n info: <IconInfo className=\"size-4\" />,\n warning: <IconWarning className=\"size-4\" />,\n error: <IconError className=\"size-4\" />,\n loading: <Spinner size=\"sm\" color=\"current\" label=\"\" />,\n }}\n style={\n {\n '--normal-bg': 'var(--popover)',\n '--normal-text': 'var(--popover-foreground)',\n '--normal-border': 'var(--border)',\n '--border-radius': 'var(--radius)',\n } as React.CSSProperties\n }\n toastOptions={{\n classNames: {\n toast: 'cn-toast',\n },\n }}\n {...props}\n />\n )\n}\n\nexport { Toaster }\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
3
|
+
|
|
4
|
+
declare function TooltipProvider({ delay, ...props }: Tooltip$1.Provider.Props): React.JSX.Element;
|
|
5
|
+
declare function Tooltip({ ...props }: Tooltip$1.Root.Props): React.JSX.Element;
|
|
6
|
+
declare function TooltipTrigger({ ...props }: Tooltip$1.Trigger.Props): React.JSX.Element;
|
|
7
|
+
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: Tooltip$1.Popup.Props & Pick<Tooltip$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>): React.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
|
|
4
|
+
import { cn } from '../lib/utils.js';
|
|
5
|
+
|
|
6
|
+
function TooltipProvider({
|
|
7
|
+
delay = 0,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Tooltip$1.Provider,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "tooltip-provider",
|
|
14
|
+
delay,
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function Tooltip({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Root, { "data-slot": "tooltip", ...props });
|
|
21
|
+
}
|
|
22
|
+
function TooltipTrigger({ ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
24
|
+
}
|
|
25
|
+
function TooltipContent({
|
|
26
|
+
className,
|
|
27
|
+
side = "top",
|
|
28
|
+
sideOffset = 4,
|
|
29
|
+
align = "center",
|
|
30
|
+
alignOffset = 0,
|
|
31
|
+
children,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
35
|
+
Tooltip$1.Positioner,
|
|
36
|
+
{
|
|
37
|
+
align,
|
|
38
|
+
alignOffset,
|
|
39
|
+
side,
|
|
40
|
+
sideOffset,
|
|
41
|
+
className: "isolate z-50",
|
|
42
|
+
children: /* @__PURE__ */ jsxs(
|
|
43
|
+
Tooltip$1.Popup,
|
|
44
|
+
{
|
|
45
|
+
"data-slot": "tooltip-content",
|
|
46
|
+
className: cn(
|
|
47
|
+
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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",
|
|
48
|
+
className
|
|
49
|
+
),
|
|
50
|
+
...props,
|
|
51
|
+
children: [
|
|
52
|
+
children,
|
|
53
|
+
/* @__PURE__ */ jsx(Tooltip$1.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:-start-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:-end-1 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
) });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
62
|
+
//# sourceMappingURL=tooltip.js.map
|
|
63
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/tooltip.tsx"],"names":["TooltipPrimitive"],"mappings":";;;;AAMA,SAAS,eAAA,CAAgB;AAAA,EACvB,KAAA,GAAQ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,CAAiB,KAAA,EAAjB,EAAuB,WAAU,yhBAAA,EAA0hB;AAAA;AAAA;AAAA;AAC9jB;AAAA,GACF,EACF,CAAA;AAEJ","file":"tooltip.js","sourcesContent":["'use client'\n\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip'\n\nimport { cn } from '../lib/utils.js'\n\nfunction TooltipProvider({\n delay = 0,\n ...props\n}: TooltipPrimitive.Provider.Props) {\n return (\n <TooltipPrimitive.Provider\n data-slot=\"tooltip-provider\"\n delay={delay}\n {...props}\n />\n )\n}\n\nfunction Tooltip({ ...props }: TooltipPrimitive.Root.Props) {\n return <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n}\n\nfunction TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />\n}\n\nfunction TooltipContent({\n className,\n side = 'top',\n sideOffset = 4,\n align = 'center',\n alignOffset = 0,\n children,\n ...props\n}: TooltipPrimitive.Popup.Props &\n Pick<\n TooltipPrimitive.Positioner.Props,\n 'align' | 'alignOffset' | 'side' | 'sideOffset'\n >) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n className={cn(\n 'z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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',\n className\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:-start-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:-end-1 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5\" />\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,40 @@
|
|
|
1
|
+
export { AspectRatio } from './components/aspect-ratio.js';
|
|
1
2
|
export { Badge, BadgeButton, BadgeButtonProps, BadgeLink, BadgeLinkProps, BadgeProps, badgeVariants } from './components/badge.js';
|
|
2
3
|
export { Button, ButtonLink, ButtonLinkProps, ButtonProps, TouchTarget, buttonVariants } from './components/button.js';
|
|
3
4
|
export { Card, CardAction, CardActionProps, CardContent, CardContentProps, CardDescription, CardDescriptionProps, CardFooter, CardFooterProps, CardHeader, CardHeaderProps, CardProps, CardTitle, CardTitleProps } from './components/card.js';
|
|
4
|
-
export {
|
|
5
|
+
export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './components/collapsible.js';
|
|
6
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from './components/drawer.js';
|
|
5
7
|
export { Field, FieldContent, FieldContentProps, FieldDescription, FieldDescriptionProps, FieldError, FieldErrorProps, FieldGroup, FieldGroupProps, FieldLabel, FieldLabelProps, FieldLegend, FieldLegendProps, FieldProps, FieldSeparator, FieldSeparatorProps, FieldSet, FieldSetProps, FieldTitle, FieldTitleProps } from './components/field.js';
|
|
8
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger } from './components/hover-card.js';
|
|
6
9
|
export { Input, InputProps } from './components/input.js';
|
|
7
10
|
export { Label, LabelProps } from './components/label.js';
|
|
8
11
|
export { LabeledSeparator, LabeledSeparatorProps } from './components/labeled-separator.js';
|
|
9
12
|
export { ExternalLink, ExternalLinkProps, Link, LinkComponent, LinkProps, LinkProvider, LinkUrlObject, linkVariants } from './components/link.js';
|
|
10
13
|
export { Logo, LogoProps } from './components/logo.js';
|
|
14
|
+
export { Masthead, MastheadProps, mastheadContainerVariants, mastheadVariants } from './components/masthead.js';
|
|
15
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from './components/popover.js';
|
|
16
|
+
export { ResizableHandle, ResizablePanel, ResizablePanelGroup } from './components/resizable.js';
|
|
17
|
+
export { ScrollArea, ScrollBar } from './components/scroll-area.js';
|
|
11
18
|
export { Separator, SeparatorProps } from './components/separator.js';
|
|
19
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from './components/sheet.js';
|
|
20
|
+
export { SkipLink, SkipLinkProps, SkipLinks, SkipLinksProps, skipLinkVariants } from './components/skip-link.js';
|
|
21
|
+
export { Toaster } from './components/sonner.js';
|
|
12
22
|
export { Spinner, SpinnerProps } from './components/spinner.js';
|
|
23
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/tooltip.js';
|
|
13
24
|
export { cn } from './lib/utils.js';
|
|
25
|
+
import 'react';
|
|
14
26
|
import 'class-variance-authority/types';
|
|
15
27
|
import '@base-ui/react/button';
|
|
16
28
|
import 'class-variance-authority';
|
|
17
|
-
import 'react';
|
|
29
|
+
import '@base-ui/react/collapsible';
|
|
30
|
+
import 'vaul';
|
|
18
31
|
import '@base-ui/react/field';
|
|
32
|
+
import '@base-ui/react/preview-card';
|
|
33
|
+
import '@base-ui/react/popover';
|
|
34
|
+
import 'react-resizable-panels';
|
|
35
|
+
import '@base-ui/react/scroll-area';
|
|
19
36
|
import '@base-ui/react/separator';
|
|
37
|
+
import '@base-ui/react/dialog';
|
|
38
|
+
import 'sonner';
|
|
39
|
+
import '@base-ui/react/tooltip';
|
|
20
40
|
import 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,26 @@
|
|
|
1
|
+
export * from './components/aspect-ratio.js';
|
|
1
2
|
export * from './components/badge.js';
|
|
2
3
|
export * from './components/button.js';
|
|
3
4
|
export * from './components/card.js';
|
|
4
|
-
export * from './components/
|
|
5
|
+
export * from './components/collapsible.js';
|
|
6
|
+
export * from './components/drawer.js';
|
|
5
7
|
export * from './components/field.js';
|
|
8
|
+
export * from './components/hover-card.js';
|
|
6
9
|
export * from './components/input.js';
|
|
7
10
|
export * from './components/label.js';
|
|
8
11
|
export * from './components/labeled-separator.js';
|
|
9
12
|
export * from './components/link.js';
|
|
10
13
|
export * from './components/logo.js';
|
|
14
|
+
export * from './components/masthead.js';
|
|
15
|
+
export * from './components/popover.js';
|
|
16
|
+
export * from './components/resizable.js';
|
|
17
|
+
export * from './components/scroll-area.js';
|
|
11
18
|
export * from './components/separator.js';
|
|
19
|
+
export * from './components/sheet.js';
|
|
20
|
+
export * from './components/skip-link.js';
|
|
21
|
+
export * from './components/sonner.js';
|
|
12
22
|
export * from './components/spinner.js';
|
|
23
|
+
export * from './components/tooltip.js';
|
|
13
24
|
export * from './lib/utils.js';
|
|
14
25
|
//# sourceMappingURL=index.js.map
|
|
15
26
|
//# sourceMappingURL=index.js.map
|