@estiato/ui 0.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/accordion.d.ts +9 -0
- package/dist/components/accordion.js +43 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.js +38 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/avatar.d.ts +8 -0
- package/dist/components/avatar.js +41 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +28 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.d.ts +14 -0
- package/dist/components/button.js +40 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/card.d.ts +10 -0
- package/dist/components/card.js +51 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox.d.ts +6 -0
- package/dist/components/checkbox.js +26 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/dialog.d.ts +22 -0
- package/dist/components/dialog.js +87 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +23 -0
- package/dist/components/dropdown-menu.js +96 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.js +28 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.d.ts +6 -0
- package/dist/components/label.js +21 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/offline-screen.d.ts +26 -0
- package/dist/components/offline-screen.js +66 -0
- package/dist/components/offline-screen.js.map +1 -0
- package/dist/components/popover.d.ts +9 -0
- package/dist/components/popover.js +30 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/radio-group.d.ts +7 -0
- package/dist/components/radio-group.js +27 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/select.d.ts +13 -0
- package/dist/components/select.js +102 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +24 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/skeleton.d.ts +6 -0
- package/dist/components/skeleton.js +16 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/sonner.d.ts +7 -0
- package/dist/components/sonner.js +26 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +33 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.d.ts +9 -0
- package/dist/components/tabs.js +52 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +24 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +29 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.js +141 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
|
+
import { Check, ChevronRight } from "@estiato/icons";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
const DropdownMenu = DropdownMenuPrimitive.Root;
|
|
8
|
+
const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
9
|
+
const DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
10
|
+
const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
11
|
+
const DropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
12
|
+
const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
13
|
+
const itemBase = "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-secondary";
|
|
14
|
+
const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
15
|
+
DropdownMenuPrimitive.Content,
|
|
16
|
+
{
|
|
17
|
+
ref,
|
|
18
|
+
sideOffset,
|
|
19
|
+
className: cn(
|
|
20
|
+
"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface p-1 text-foreground shadow-diffuse",
|
|
21
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
) }));
|
|
27
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
28
|
+
const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
29
|
+
DropdownMenuPrimitive.Item,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn(itemBase, inset && "pl-8", className),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
));
|
|
36
|
+
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
37
|
+
const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
38
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
className: cn(itemBase, "pl-8", className),
|
|
42
|
+
checked,
|
|
43
|
+
...props,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
46
|
+
children
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
));
|
|
50
|
+
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
51
|
+
const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
52
|
+
DropdownMenuPrimitive.Label,
|
|
53
|
+
{
|
|
54
|
+
ref,
|
|
55
|
+
className: cn("px-2 py-1.5 text-sm font-semibold text-foreground", inset && "pl-8", className),
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
60
|
+
const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
61
|
+
DropdownMenuPrimitive.Separator,
|
|
62
|
+
{
|
|
63
|
+
ref,
|
|
64
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
65
|
+
...props
|
|
66
|
+
}
|
|
67
|
+
));
|
|
68
|
+
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
69
|
+
const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
70
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
className: cn(itemBase, "data-[state=open]:bg-surface-secondary", inset && "pl-8", className),
|
|
74
|
+
...props,
|
|
75
|
+
children: [
|
|
76
|
+
children,
|
|
77
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto h-4 w-4" })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
));
|
|
81
|
+
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
82
|
+
export {
|
|
83
|
+
DropdownMenu,
|
|
84
|
+
DropdownMenuCheckboxItem,
|
|
85
|
+
DropdownMenuContent,
|
|
86
|
+
DropdownMenuGroup,
|
|
87
|
+
DropdownMenuItem,
|
|
88
|
+
DropdownMenuLabel,
|
|
89
|
+
DropdownMenuPortal,
|
|
90
|
+
DropdownMenuRadioGroup,
|
|
91
|
+
DropdownMenuSeparator,
|
|
92
|
+
DropdownMenuSub,
|
|
93
|
+
DropdownMenuSubTrigger,
|
|
94
|
+
DropdownMenuTrigger
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/dropdown-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight } from \"@estiato/icons\";\nimport { cn } from \"../lib/utils\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst itemBase =\n \"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-foreground outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-surface-secondary\";\n\nexport const DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface p-1 text-foreground shadow-diffuse\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nexport const DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(itemBase, inset && \"pl-8\", className)}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nexport const DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(itemBase, \"pl-8\", className)}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nexport const DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & { inset?: boolean }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-foreground\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nexport const DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nexport const DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & { inset?: boolean }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(itemBase, \"data-[state=open]:bg-surface-secondary\", inset && \"pl-8\", className)}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n"],"mappings":";AAsBI,cA8BF,YA9BE;AApBJ,YAAY,WAAW;AACvB,YAAY,2BAA2B;AACvC,SAAS,OAAO,oBAAoB;AACpC,SAAS,UAAU;AAEZ,MAAM,eAAe,sBAAsB;AAC3C,MAAM,sBAAsB,sBAAsB;AAClD,MAAM,oBAAoB,sBAAsB;AAChD,MAAM,qBAAqB,sBAAsB;AACjD,MAAM,kBAAkB,sBAAsB;AAC9C,MAAM,yBAAyB,sBAAsB;AAE5D,MAAM,WACJ;AAEK,MAAM,sBAAsB,MAAM,WAGvC,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C,oBAAC,sBAAsB,QAAtB,EACC;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,oBAAoB,cAAc,sBAAsB,QAAQ;AAEzD,MAAM,mBAAmB,MAAM,WAGpC,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,UAAU,SAAS,QAAQ,SAAS;AAAA,IACjD,GAAG;AAAA;AACN,CACD;AACD,iBAAiB,cAAc,sBAAsB,KAAK;AAEnD,MAAM,2BAA2B,MAAM,WAG5C,CAAC,EAAE,WAAW,UAAU,SAAS,GAAG,MAAM,GAAG,QAC7C;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,UAAU,QAAQ,SAAS;AAAA,IACzC;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,gEACd,8BAAC,sBAAsB,eAAtB,EACC,8BAAC,SAAM,WAAU,WAAU,GAC7B,GACF;AAAA,MACC;AAAA;AAAA;AACH,CACD;AACD,yBAAyB,cAAc,sBAAsB,aAAa;AAEnE,MAAM,oBAAoB,MAAM,WAGrC,CAAC,EAAE,WAAW,OAAO,GAAG,MAAM,GAAG,QACjC;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS,QAAQ,SAAS;AAAA,IAC5F,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc,sBAAsB,MAAM;AAErD,MAAM,wBAAwB,MAAM,WAGzC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,6BAA6B,SAAS;AAAA,IACnD,GAAG;AAAA;AACN,CACD;AACD,sBAAsB,cAAc,sBAAsB,UAAU;AAE7D,MAAM,yBAAyB,MAAM,WAG1C,CAAC,EAAE,WAAW,OAAO,UAAU,GAAG,MAAM,GAAG,QAC3C;AAAA,EAAC,sBAAsB;AAAA,EAAtB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,UAAU,0CAA0C,SAAS,QAAQ,SAAS;AAAA,IAC3F,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,gBAAa,WAAU,mBAAkB;AAAA;AAAA;AAC5C,CACD;AACD,uBAAuB,cAAc,sBAAsB,WAAW;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils";
|
|
5
|
+
const Input = React.forwardRef(
|
|
6
|
+
({ className, type, ...props }, ref) => {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
"input",
|
|
9
|
+
{
|
|
10
|
+
type,
|
|
11
|
+
ref,
|
|
12
|
+
className: cn(
|
|
13
|
+
"flex h-10 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-foreground placeholder:text-muted",
|
|
14
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
15
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
16
|
+
"file:border-0 file:bg-transparent file:text-sm file:font-medium",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
Input.displayName = "Input";
|
|
25
|
+
export {
|
|
26
|
+
Input
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/input.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement>;\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n ref={ref}\n className={cn(\n \"flex h-10 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-foreground placeholder:text-muted\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n \"file:border-0 file:bg-transparent file:text-sm file:font-medium\",\n className,\n )}\n {...props}\n />\n );\n },\n);\nInput.displayName = \"Input\";\n"],"mappings":";AAUM;AARN,YAAY,WAAW;AACvB,SAAS,UAAU;AAIZ,MAAM,QAAQ,MAAM;AAAA,EACzB,CAAC,EAAE,WAAW,MAAM,GAAG,MAAM,GAAG,QAAQ;AACtC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACC,GAAG;AAAA;AAAA,IACN;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
|
|
4
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
+
|
|
6
|
+
export { Label };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
LabelPrimitive.Root,
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
className: cn(
|
|
11
|
+
"text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
18
|
+
export {
|
|
19
|
+
Label
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/label.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as LabelPrimitive from \"@radix-ui/react-label\";\nimport { cn } from \"../lib/utils\";\n\nexport const Label = React.forwardRef<\n React.ElementRef<typeof LabelPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <LabelPrimitive.Root\n ref={ref}\n className={cn(\n \"text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70\",\n className,\n )}\n {...props}\n />\n));\nLabel.displayName = LabelPrimitive.Root.displayName;\n"],"mappings":";AAUE;AARF,YAAY,WAAW;AACvB,YAAY,oBAAoB;AAChC,SAAS,UAAU;AAEZ,MAAM,QAAQ,MAAM,WAGzB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,eAAe;AAAA,EAAf;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,MAAM,cAAc,eAAe,KAAK;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface OfflineScreenProps {
|
|
4
|
+
/** Title shown on the offline screen. Defaults to "You're offline." */
|
|
5
|
+
title?: string;
|
|
6
|
+
/** Body copy. Defaults to a friendly explanation. */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** Label for the retry button. Defaults to "Try again". */
|
|
9
|
+
retryLabel?: string;
|
|
10
|
+
/** Optional className to extend the outer container. */
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Full-screen overlay shown when the browser reports it has lost network
|
|
15
|
+
* connectivity. Renders nothing while online.
|
|
16
|
+
*
|
|
17
|
+
* Detection is purely client-side via the `online`/`offline` window events
|
|
18
|
+
* and `navigator.onLine` — no service worker required.
|
|
19
|
+
*
|
|
20
|
+
* Drop into the root layout of any consumer app:
|
|
21
|
+
*
|
|
22
|
+
* <OfflineScreen />
|
|
23
|
+
*/
|
|
24
|
+
declare function OfflineScreen({ title, description, retryLabel, className, }: OfflineScreenProps): react_jsx_runtime.JSX.Element | null;
|
|
25
|
+
|
|
26
|
+
export { OfflineScreen, type OfflineScreenProps };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { WifiOff } from "@estiato/icons";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
function OfflineScreen({
|
|
7
|
+
title = "You're offline",
|
|
8
|
+
description = "We can't reach the network right now. Check your Wi-Fi or mobile data and try again.",
|
|
9
|
+
retryLabel = "Try again",
|
|
10
|
+
className
|
|
11
|
+
}) {
|
|
12
|
+
const [isOffline, setIsOffline] = React.useState(false);
|
|
13
|
+
React.useEffect(() => {
|
|
14
|
+
setIsOffline(!navigator.onLine);
|
|
15
|
+
const handleOnline = () => setIsOffline(false);
|
|
16
|
+
const handleOffline = () => setIsOffline(true);
|
|
17
|
+
window.addEventListener("online", handleOnline);
|
|
18
|
+
window.addEventListener("offline", handleOffline);
|
|
19
|
+
return () => {
|
|
20
|
+
window.removeEventListener("online", handleOnline);
|
|
21
|
+
window.removeEventListener("offline", handleOffline);
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
if (!isOffline) return null;
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
role: "alertdialog",
|
|
29
|
+
"aria-modal": "true",
|
|
30
|
+
"aria-labelledby": "estiato-offline-title",
|
|
31
|
+
"aria-describedby": "estiato-offline-description",
|
|
32
|
+
className: cn(
|
|
33
|
+
"fixed inset-0 z-[100] flex items-center justify-center bg-background p-6",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex max-w-sm flex-col items-center gap-4 text-center", children: [
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-surface-secondary", children: /* @__PURE__ */ jsx(WifiOff, { className: "h-8 w-8 text-accent", "aria-hidden": "true" }) }),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
"h1",
|
|
40
|
+
{
|
|
41
|
+
id: "estiato-offline-title",
|
|
42
|
+
className: "text-xl font-semibold tracking-tight text-foreground",
|
|
43
|
+
children: title
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ jsx("p", { id: "estiato-offline-description", className: "text-sm text-muted", children: description }),
|
|
47
|
+
/* @__PURE__ */ jsx(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
type: "button",
|
|
51
|
+
onClick: () => {
|
|
52
|
+
if (navigator.onLine) setIsOffline(false);
|
|
53
|
+
else window.location.reload();
|
|
54
|
+
},
|
|
55
|
+
className: "mt-2 inline-flex h-10 items-center justify-center rounded-md bg-accent px-4 text-sm font-medium text-surface transition-colors hover:bg-accent-dark focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
56
|
+
children: retryLabel
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
] })
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
export {
|
|
64
|
+
OfflineScreen
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=offline-screen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/offline-screen.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { WifiOff } from \"@estiato/icons\";\nimport { cn } from \"../lib/utils\";\n\nexport interface OfflineScreenProps {\n /** Title shown on the offline screen. Defaults to \"You're offline.\" */\n title?: string;\n /** Body copy. Defaults to a friendly explanation. */\n description?: string;\n /** Label for the retry button. Defaults to \"Try again\". */\n retryLabel?: string;\n /** Optional className to extend the outer container. */\n className?: string;\n}\n\n/**\n * Full-screen overlay shown when the browser reports it has lost network\n * connectivity. Renders nothing while online.\n *\n * Detection is purely client-side via the `online`/`offline` window events\n * and `navigator.onLine` — no service worker required.\n *\n * Drop into the root layout of any consumer app:\n *\n * <OfflineScreen />\n */\nexport function OfflineScreen({\n title = \"You're offline\",\n description = \"We can't reach the network right now. Check your Wi-Fi or mobile data and try again.\",\n retryLabel = \"Try again\",\n className,\n}: OfflineScreenProps) {\n const [isOffline, setIsOffline] = React.useState(false);\n\n React.useEffect(() => {\n // Initialize from the current connectivity state. `navigator.onLine` is\n // not perfectly reliable but it's correct for the common cases we care\n // about (real disconnect, airplane mode, captive portal pre-auth).\n setIsOffline(!navigator.onLine);\n\n const handleOnline = () => setIsOffline(false);\n const handleOffline = () => setIsOffline(true);\n\n window.addEventListener(\"online\", handleOnline);\n window.addEventListener(\"offline\", handleOffline);\n return () => {\n window.removeEventListener(\"online\", handleOnline);\n window.removeEventListener(\"offline\", handleOffline);\n };\n }, []);\n\n if (!isOffline) return null;\n\n return (\n <div\n role=\"alertdialog\"\n aria-modal=\"true\"\n aria-labelledby=\"estiato-offline-title\"\n aria-describedby=\"estiato-offline-description\"\n className={cn(\n \"fixed inset-0 z-[100] flex items-center justify-center bg-background p-6\",\n className,\n )}\n >\n <div className=\"flex max-w-sm flex-col items-center gap-4 text-center\">\n <div className=\"flex h-16 w-16 items-center justify-center rounded-full bg-surface-secondary\">\n <WifiOff className=\"h-8 w-8 text-accent\" aria-hidden=\"true\" />\n </div>\n <h1\n id=\"estiato-offline-title\"\n className=\"text-xl font-semibold tracking-tight text-foreground\"\n >\n {title}\n </h1>\n <p id=\"estiato-offline-description\" className=\"text-sm text-muted\">\n {description}\n </p>\n <button\n type=\"button\"\n onClick={() => {\n if (navigator.onLine) setIsOffline(false);\n else window.location.reload();\n }}\n className=\"mt-2 inline-flex h-10 items-center justify-center rounded-md bg-accent px-4 text-sm font-medium text-surface transition-colors hover:bg-accent-dark focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background\"\n >\n {retryLabel}\n </button>\n </div>\n </div>\n );\n}\n"],"mappings":";AAkEM,SAEI,KAFJ;AAhEN,YAAY,WAAW;AACvB,SAAS,eAAe;AACxB,SAAS,UAAU;AAwBZ,SAAS,cAAc;AAAA,EAC5B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb;AACF,GAAuB;AACrB,QAAM,CAAC,WAAW,YAAY,IAAI,MAAM,SAAS,KAAK;AAEtD,QAAM,UAAU,MAAM;AAIpB,iBAAa,CAAC,UAAU,MAAM;AAE9B,UAAM,eAAe,MAAM,aAAa,KAAK;AAC7C,UAAM,gBAAgB,MAAM,aAAa,IAAI;AAE7C,WAAO,iBAAiB,UAAU,YAAY;AAC9C,WAAO,iBAAiB,WAAW,aAAa;AAChD,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,YAAY;AACjD,aAAO,oBAAoB,WAAW,aAAa;AAAA,IACrD;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,MAAI,CAAC,UAAW,QAAO;AAEvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,mBAAgB;AAAA,MAChB,oBAAiB;AAAA,MACjB,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA,+BAAC,SAAI,WAAU,yDACb;AAAA,4BAAC,SAAI,WAAU,gFACb,8BAAC,WAAQ,WAAU,uBAAsB,eAAY,QAAO,GAC9D;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAU;AAAA,YAET;AAAA;AAAA,QACH;AAAA,QACA,oBAAC,OAAE,IAAG,+BAA8B,WAAU,sBAC3C,uBACH;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,SAAS,MAAM;AACb,kBAAI,UAAU,OAAQ,cAAa,KAAK;AAAA,kBACnC,QAAO,SAAS,OAAO;AAAA,YAC9B;AAAA,YACA,WAAU;AAAA,YAET;AAAA;AAAA,QACH;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
|
|
4
|
+
declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
|
|
5
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
|
|
9
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const Popover = PopoverPrimitive.Root;
|
|
7
|
+
const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
8
|
+
const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
9
|
+
const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
10
|
+
PopoverPrimitive.Content,
|
|
11
|
+
{
|
|
12
|
+
ref,
|
|
13
|
+
align,
|
|
14
|
+
sideOffset,
|
|
15
|
+
className: cn(
|
|
16
|
+
"z-50 w-72 rounded-md border border-border bg-surface p-4 text-foreground shadow-diffuse outline-none",
|
|
17
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
) }));
|
|
23
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
24
|
+
export {
|
|
25
|
+
Popover,
|
|
26
|
+
PopoverAnchor,
|
|
27
|
+
PopoverContent,
|
|
28
|
+
PopoverTrigger
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/popover.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"../lib/utils\";\n\nexport const Popover = PopoverPrimitive.Root;\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\n\nexport const PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border border-border bg-surface p-4 text-foreground shadow-diffuse outline-none\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n"],"mappings":";AAeI;AAbJ,YAAY,WAAW;AACvB,YAAY,sBAAsB;AAClC,SAAS,UAAU;AAEZ,MAAM,UAAU,iBAAiB;AACjC,MAAM,iBAAiB,iBAAiB;AACxC,MAAM,gBAAgB,iBAAiB;AAEvC,MAAM,iBAAiB,MAAM,WAGlC,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,GAAG,MAAM,GAAG,QAC5D,oBAAC,iBAAiB,QAAjB,EACC;AAAA,EAAC,iBAAiB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,GACF,CACD;AACD,eAAe,cAAc,iBAAiB,QAAQ;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
|
|
4
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
|
|
7
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const RadioGroup = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { ref, className: cn("grid gap-2", className), ...props }));
|
|
7
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
8
|
+
const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
9
|
+
RadioGroupPrimitive.Item,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: cn(
|
|
13
|
+
"aspect-square h-4 w-4 rounded-full border border-border bg-surface text-accent",
|
|
14
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
15
|
+
"disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props,
|
|
19
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { className: "h-2 w-2 rounded-full bg-accent" }) })
|
|
20
|
+
}
|
|
21
|
+
));
|
|
22
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
23
|
+
export {
|
|
24
|
+
RadioGroup,
|
|
25
|
+
RadioGroupItem
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { cn } from \"../lib/utils\";\n\nexport const RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root ref={ref} className={cn(\"grid gap-2\", className)} {...props} />\n));\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nexport const RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-border bg-surface text-accent\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-accent\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className=\"h-2 w-2 rounded-full bg-accent\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n));\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n"],"mappings":";AAUE;AARF,YAAY,WAAW;AACvB,YAAY,yBAAyB;AACrC,SAAS,UAAU;AAEZ,MAAM,aAAa,MAAM,WAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,oBAAoB,MAApB,EAAyB,KAAU,WAAW,GAAG,cAAc,SAAS,GAAI,GAAG,OAAO,CACxF;AACD,WAAW,cAAc,oBAAoB,KAAK;AAE3C,MAAM,iBAAiB,MAAM,WAGlC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,oBAAoB;AAAA,EAApB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ,8BAAC,oBAAoB,WAApB,EAA8B,WAAU,oCACvC,8BAAC,UAAK,WAAU,kCAAiC,GACnD;AAAA;AACF,CACD;AACD,eAAe,cAAc,oBAAoB,KAAK;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
|
+
|
|
4
|
+
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
5
|
+
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
+
import { Check, ChevronDown, ChevronUp } from "@estiato/icons";
|
|
6
|
+
import { cn } from "../lib/utils";
|
|
7
|
+
const Select = SelectPrimitive.Root;
|
|
8
|
+
const SelectGroup = SelectPrimitive.Group;
|
|
9
|
+
const SelectValue = SelectPrimitive.Value;
|
|
10
|
+
const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
11
|
+
SelectPrimitive.Trigger,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
className: cn(
|
|
15
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-border bg-surface px-3 py-2 text-sm text-foreground",
|
|
16
|
+
"placeholder:text-muted focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2 focus:ring-offset-background",
|
|
17
|
+
"disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
18
|
+
className
|
|
19
|
+
),
|
|
20
|
+
...props,
|
|
21
|
+
children: [
|
|
22
|
+
children,
|
|
23
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
));
|
|
27
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
28
|
+
const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
29
|
+
SelectPrimitive.Content,
|
|
30
|
+
{
|
|
31
|
+
ref,
|
|
32
|
+
className: cn(
|
|
33
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface text-foreground shadow-diffuse",
|
|
34
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
35
|
+
position === "popper" && "data-[side=bottom]:translate-y-1",
|
|
36
|
+
className
|
|
37
|
+
),
|
|
38
|
+
position,
|
|
39
|
+
...props,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" }) }),
|
|
42
|
+
/* @__PURE__ */ jsx(
|
|
43
|
+
SelectPrimitive.Viewport,
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"p-1",
|
|
47
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
48
|
+
),
|
|
49
|
+
children
|
|
50
|
+
}
|
|
51
|
+
),
|
|
52
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, { className: "flex cursor-default items-center justify-center py-1", children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
) }));
|
|
56
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
57
|
+
const SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
58
|
+
SelectPrimitive.Label,
|
|
59
|
+
{
|
|
60
|
+
ref,
|
|
61
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold text-muted", className),
|
|
62
|
+
...props
|
|
63
|
+
}
|
|
64
|
+
));
|
|
65
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
66
|
+
const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
67
|
+
SelectPrimitive.Item,
|
|
68
|
+
{
|
|
69
|
+
ref,
|
|
70
|
+
className: cn(
|
|
71
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none",
|
|
72
|
+
"focus:bg-surface-secondary focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
73
|
+
className
|
|
74
|
+
),
|
|
75
|
+
...props,
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
78
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
));
|
|
82
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
83
|
+
const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
84
|
+
SelectPrimitive.Separator,
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
));
|
|
91
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
92
|
+
export {
|
|
93
|
+
Select,
|
|
94
|
+
SelectContent,
|
|
95
|
+
SelectGroup,
|
|
96
|
+
SelectItem,
|
|
97
|
+
SelectLabel,
|
|
98
|
+
SelectSeparator,
|
|
99
|
+
SelectTrigger,
|
|
100
|
+
SelectValue
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/select.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"@estiato/icons\";\nimport { cn } from \"../lib/utils\";\n\nexport const Select = SelectPrimitive.Root;\nexport const SelectGroup = SelectPrimitive.Group;\nexport const SelectValue = SelectPrimitive.Value;\n\nexport const SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-border bg-surface px-3 py-2 text-sm text-foreground\",\n \"placeholder:text-muted focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2 focus:ring-offset-background\",\n \"disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nexport const SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-surface text-foreground shadow-diffuse\",\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n position === \"popper\" && \"data-[side=bottom]:translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectPrimitive.ScrollUpButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n <SelectPrimitive.Viewport\n className={cn(\n \"p-1\",\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectPrimitive.ScrollDownButton className=\"flex cursor-default items-center justify-center py-1\">\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nexport const SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold text-muted\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nexport const SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none\",\n \"focus:bg-surface-secondary focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nexport const SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n"],"mappings":";AAeE,SAYI,KAZJ;AAbF,YAAY,WAAW;AACvB,YAAY,qBAAqB;AACjC,SAAS,OAAO,aAAa,iBAAiB;AAC9C,SAAS,UAAU;AAEZ,MAAM,SAAS,gBAAgB;AAC/B,MAAM,cAAc,gBAAgB;AACpC,MAAM,cAAc,gBAAgB;AAEpC,MAAM,gBAAgB,MAAM,WAGjC,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEH;AAAA;AAAA,MACD,oBAAC,gBAAgB,MAAhB,EAAqB,SAAO,MAC3B,8BAAC,eAAY,WAAU,sBAAqB,GAC9C;AAAA;AAAA;AACF,CACD;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAE7C,MAAM,gBAAgB,MAAM,WAGjC,CAAC,EAAE,WAAW,UAAU,WAAW,UAAU,GAAG,MAAM,GAAG,QACzD,oBAAC,gBAAgB,QAAhB,EACC;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA,aAAa,YAAY;AAAA,MACzB;AAAA,IACF;AAAA,IACA;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,gBAAgB,gBAAhB,EAA+B,WAAU,wDACxC,8BAAC,aAAU,WAAU,WAAU,GACjC;AAAA,MACA;AAAA,QAAC,gBAAgB;AAAA,QAAhB;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA,aAAa,YACX;AAAA,UACJ;AAAA,UAEC;AAAA;AAAA,MACH;AAAA,MACA,oBAAC,gBAAgB,kBAAhB,EAAiC,WAAU,wDAC1C,8BAAC,eAAY,WAAU,WAAU,GACnC;AAAA;AAAA;AACF,GACF,CACD;AACD,cAAc,cAAc,gBAAgB,QAAQ;AAE7C,MAAM,cAAc,MAAM,WAG/B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEzC,MAAM,aAAa,MAAM,WAG9B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QACpC;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA,IAEJ;AAAA,0BAAC,UAAK,WAAU,gEACd,8BAAC,gBAAgB,eAAhB,EACC,8BAAC,SAAM,WAAU,WAAU,GAC7B,GACF;AAAA,MACA,oBAAC,gBAAgB,UAAhB,EAA0B,UAAS;AAAA;AAAA;AACtC,CACD;AACD,WAAW,cAAc,gBAAgB,KAAK;AAEvC,MAAM,kBAAkB,MAAM,WAGnC,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAC,gBAAgB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,6BAA6B,SAAS;AAAA,IACnD,GAAG;AAAA;AACN,CACD;AACD,gBAAgB,cAAc,gBAAgB,UAAU;","names":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
|
|
4
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
|
|
6
|
+
export { Separator };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
+
import { cn } from "../lib/utils";
|
|
6
|
+
const Separator = React.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
SeparatorPrimitive.Root,
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
decorative,
|
|
11
|
+
orientation,
|
|
12
|
+
className: cn(
|
|
13
|
+
"shrink-0 bg-border",
|
|
14
|
+
orientation === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
));
|
|
20
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
21
|
+
export {
|
|
22
|
+
Separator
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/separator.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport { cn } from \"../lib/utils\";\n\nexport const Separator = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root>\n>(({ className, orientation = \"horizontal\", decorative = true, ...props }, ref) => (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative={decorative}\n orientation={orientation}\n className={cn(\n \"shrink-0 bg-border\",\n orientation === \"horizontal\" ? \"h-px w-full\" : \"h-full w-px\",\n className,\n )}\n {...props}\n />\n));\nSeparator.displayName = SeparatorPrimitive.Root.displayName;\n"],"mappings":";AAUE;AARF,YAAY,WAAW;AACvB,YAAY,wBAAwB;AACpC,SAAS,UAAU;AAEZ,MAAM,YAAY,MAAM,WAG7B,CAAC,EAAE,WAAW,cAAc,cAAc,aAAa,MAAM,GAAG,MAAM,GAAG,QACzE;AAAA,EAAC,mBAAmB;AAAA,EAAnB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA,gBAAgB,eAAe,gBAAgB;AAAA,MAC/C;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,UAAU,cAAc,mBAAmB,KAAK;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../lib/utils";
|
|
4
|
+
function Skeleton({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
className: cn("animate-pulse rounded-md bg-surface-secondary", className),
|
|
9
|
+
...props
|
|
10
|
+
}
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
Skeleton
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../lib/utils\";\n\nexport function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {\n return (\n <div\n className={cn(\"animate-pulse rounded-md bg-surface-secondary\", className)}\n {...props}\n />\n );\n}\n"],"mappings":"AAKI;AALJ,YAAY,WAAW;AACvB,SAAS,UAAU;AAEZ,SAAS,SAAS,EAAE,WAAW,GAAG,MAAM,GAAyC;AACtF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,GAAG,iDAAiD,SAAS;AAAA,MACvE,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toaster as Sonner } from "sonner";
|
|
4
|
+
function Toaster({ ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
Sonner,
|
|
7
|
+
{
|
|
8
|
+
className: "toaster group",
|
|
9
|
+
toastOptions: {
|
|
10
|
+
classNames: {
|
|
11
|
+
toast: "group toast group-[.toaster]:bg-surface group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-diffuse",
|
|
12
|
+
description: "group-[.toast]:text-muted",
|
|
13
|
+
actionButton: "group-[.toast]:bg-accent group-[.toast]:text-surface",
|
|
14
|
+
cancelButton: "group-[.toast]:bg-surface-secondary group-[.toast]:text-foreground"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
import { toast } from "sonner";
|
|
22
|
+
export {
|
|
23
|
+
Toaster,
|
|
24
|
+
toast
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=sonner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/sonner.tsx"],"sourcesContent":["\"use client\";\n\nimport { Toaster as Sonner, type ToasterProps } from \"sonner\";\n\nexport function Toaster({ ...props }: ToasterProps) {\n return (\n <Sonner\n className=\"toaster group\"\n toastOptions={{\n classNames: {\n toast:\n \"group toast group-[.toaster]:bg-surface group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-diffuse\",\n description: \"group-[.toast]:text-muted\",\n actionButton: \"group-[.toast]:bg-accent group-[.toast]:text-surface\",\n cancelButton: \"group-[.toast]:bg-surface-secondary group-[.toast]:text-foreground\",\n },\n }}\n {...props}\n />\n );\n}\n\nexport { toast } from \"sonner\";\n"],"mappings":";AAMI;AAJJ,SAAS,WAAW,cAAiC;AAE9C,SAAS,QAAQ,EAAE,GAAG,MAAM,GAAiB;AAClD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAc;AAAA,QACZ,YAAY;AAAA,UACV,OACE;AAAA,UACF,aAAa;AAAA,UACb,cAAc;AAAA,UACd,cAAc;AAAA,QAChB;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,SAAS,aAAa;","names":[]}
|