@aback-ui/ui 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +69 -2
- package/dist/components/accordion.d.ts +8 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +17 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +38 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +12 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +28 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/avatar.d.ts +25 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +34 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +15 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +27 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/breadcrumbs.d.ts +11 -0
- package/dist/components/breadcrumbs.d.ts.map +1 -0
- package/dist/components/breadcrumbs.js +11 -0
- package/dist/components/breadcrumbs.js.map +1 -0
- package/dist/components/button.d.ts +12 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +43 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +25 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +87 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +12 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +25 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/checkbox.d.ts +5 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +10 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/code-block.d.ts +25 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +19 -0
- package/dist/components/code-block.js.map +1 -0
- package/dist/components/collapsible.d.ts +7 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +11 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/combobox.d.ts +40 -0
- package/dist/components/combobox.d.ts.map +1 -0
- package/dist/components/combobox.js +27 -0
- package/dist/components/combobox.js.map +1 -0
- package/dist/components/command.d.ts +24 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +35 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/copy-button.d.ts +32 -0
- package/dist/components/copy-button.d.ts.map +1 -0
- package/dist/components/copy-button.js +65 -0
- package/dist/components/copy-button.js.map +1 -0
- package/dist/components/date-picker.d.ts +66 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-picker.js +75 -0
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/description-list.d.ts +29 -0
- package/dist/components/description-list.d.ts.map +1 -0
- package/dist/components/description-list.js +28 -0
- package/dist/components/description-list.js.map +1 -0
- package/dist/components/dialog.d.ts +16 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +29 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +26 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +41 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/dropzone.d.ts +47 -0
- package/dist/components/dropzone.d.ts.map +1 -0
- package/dist/components/dropzone.js +125 -0
- package/dist/components/dropzone.js.map +1 -0
- package/dist/components/empty-state.d.ts +10 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +8 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/field.d.ts +17 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +13 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/hover-card.d.ts +7 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +11 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.d.ts +26 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +41 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +5 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +19 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/kbd.d.ts +4 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +7 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +9 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/layout.d.ts +69 -0
- package/dist/components/layout.d.ts.map +1 -0
- package/dist/components/layout.js +61 -0
- package/dist/components/layout.js.map +1 -0
- package/dist/components/page-header.d.ts +20 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/page-header.js +11 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/pagination.d.ts +20 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +51 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/popover.d.ts +8 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +12 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +12 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +11 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-group.d.ts +6 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +12 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/rating.d.ts +33 -0
- package/dist/components/rating.d.ts.map +1 -0
- package/dist/components/rating.js +52 -0
- package/dist/components/rating.js.map +1 -0
- package/dist/components/reading-progress.d.ts +16 -0
- package/dist/components/reading-progress.d.ts.map +1 -0
- package/dist/components/reading-progress.js +54 -0
- package/dist/components/reading-progress.js.map +1 -0
- package/dist/components/relative-time.d.ts +26 -0
- package/dist/components/relative-time.d.ts.map +1 -0
- package/dist/components/relative-time.js +83 -0
- package/dist/components/relative-time.js.map +1 -0
- package/dist/components/scroll-area.d.ts +10 -0
- package/dist/components/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area.js +9 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/section-heading.d.ts +28 -0
- package/dist/components/section-heading.d.ts.map +1 -0
- package/dist/components/section-heading.js +23 -0
- package/dist/components/section-heading.js.map +1 -0
- package/dist/components/select.d.ts +5 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +17 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +5 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +9 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/share-buttons.d.ts +25 -0
- package/dist/components/share-buttons.d.ts.map +1 -0
- package/dist/components/share-buttons.js +67 -0
- package/dist/components/share-buttons.js.map +1 -0
- package/dist/components/sheet.d.ts +18 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sheet.js +35 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.d.ts +4 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +7 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/skip-link.d.ts +13 -0
- package/dist/components/skip-link.d.ts.map +1 -0
- package/dist/components/skip-link.js +12 -0
- package/dist/components/skip-link.js.map +1 -0
- package/dist/components/slider.d.ts +9 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +9 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/spinner.d.ts +14 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +13 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stat.d.ts +54 -0
- package/dist/components/stat.d.ts.map +1 -0
- package/dist/components/stat.js +62 -0
- package/dist/components/stat.js.map +1 -0
- package/dist/components/steps.d.ts +21 -0
- package/dist/components/steps.d.ts.map +1 -0
- package/dist/components/steps.js +26 -0
- package/dist/components/steps.js.map +1 -0
- package/dist/components/switch.d.ts +5 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +9 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table-of-contents.d.ts +28 -0
- package/dist/components/table-of-contents.d.ts.map +1 -0
- package/dist/components/table-of-contents.js +79 -0
- package/dist/components/table-of-contents.js.map +1 -0
- package/dist/components/table.d.ts +15 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +29 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +8 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +16 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +18 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/theme-toggle.d.ts +43 -0
- package/dist/components/theme-toggle.d.ts.map +1 -0
- package/dist/components/theme-toggle.js +99 -0
- package/dist/components/theme-toggle.js.map +1 -0
- package/dist/components/toaster.d.ts +27 -0
- package/dist/components/toaster.d.ts.map +1 -0
- package/dist/components/toaster.js +52 -0
- package/dist/components/toaster.js.map +1 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +39 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/tooltip.d.ts +10 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +14 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +59 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +6 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +76 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EACL,OAAO,EACP,SAAS,GAKV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAExG,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAclC,MAAM,cAAc,GAA+B;IACjD,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,gFAAgF;AAChF,MAAM,UAAU,kBAAkB,CAChC,IAAU,EACV,MAAe,EACf,UAAsC,cAAc;IAEpD,OAAO,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,SAAS,GACb,uIAAuI;IACvI,qHAAqH;IACrH,kDAAkD,CAAC;AAErD,MAAM,iBAAiB,GAAwB;IAC7C,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,0CAA0C;IAClD,KAAK,EAAE,8BAA8B;IACrC,aAAa,EAAE,2CAA2C;IAC1D,aAAa,EAAE,uCAAuC;IACtD,GAAG,EAAE,UAAU;IACf,eAAe,EAAE,EAAE,CAAC,SAAS,EAAE,QAAQ,CAAC;IACxC,WAAW,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;IACrC,OAAO,EAAE,QAAQ;IACjB,UAAU,EAAE,wBAAwB;IACpC,QAAQ,EAAE,EAAE;IACZ,OAAO,EACL,mFAAmF;IACrF,IA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e,CAAC;QAC1B,OAAO,KAAC,IAAI,mBAAa,MAAM,EAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;IACrF,CAAC;CACF,CAAC;AAEF;;;;;;;GAOG;AACH,SAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,eAAe,GAAG,IAAI,EACtB,SAAS,GAAG,QAAQ,EACpB,GAAG,KAAK,EACM;IACd,OAAO,CACL,KAAC,SAAS,IACR,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,EAAE,CAAC,yCAAyC,EAAE,SAAS,CAAC,EACnE,UAAU,EAAE,EAAE,GAAG,iBAAiB,EAAE,GAAG,UAAU,EAAE,EACnD,UAAU,EAAE,EAAE,GAAG,iBAAiB,EAAE,GAAG,UAAU,EAAE,EACnD,MAAM,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,MAAM,EAAE,KACnC,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
3
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
4
|
+
declare function CardTitle({ className, as: Comp, ...props }: React.ComponentProps<"h3"> & {
|
|
5
|
+
as?: "h2" | "h3" | "h4";
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
8
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter, };
|
|
12
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWjE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWvE;AAED,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,EAAE,EAAE,IAAW,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG;IAAE,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;CAAE,qBAQ1D;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQ1E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAExE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
function Card({ className, ...props }) {
|
|
4
|
+
return (_jsx("div", { "data-slot": "card", className: cn("flex flex-col gap-6 border border-border bg-card py-6 text-card-foreground shadow-sm", className), ...props }));
|
|
5
|
+
}
|
|
6
|
+
function CardHeader({ className, ...props }) {
|
|
7
|
+
return (_jsx("div", { "data-slot": "card-header", className: cn("grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]", className), ...props }));
|
|
8
|
+
}
|
|
9
|
+
function CardTitle({ className, as: Comp = "h3", ...props }) {
|
|
10
|
+
return (_jsx(Comp, { "data-slot": "card-title", className: cn("font-semibold leading-none tracking-tight", className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function CardDescription({ className, ...props }) {
|
|
13
|
+
return (_jsx("p", { "data-slot": "card-description", className: cn("text-sm leading-relaxed text-muted-foreground", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
function CardAction({ className, ...props }) {
|
|
16
|
+
return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
|
|
17
|
+
}
|
|
18
|
+
function CardContent({ className, ...props }) {
|
|
19
|
+
return _jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props });
|
|
20
|
+
}
|
|
21
|
+
function CardFooter({ className, ...props }) {
|
|
22
|
+
return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter, };
|
|
25
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../src/components/card.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,EAAE,EAAE,MAAM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L,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAC9C,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,eAAe,EACf,UAAU,EACV,WAAW,EACX,UAAU,GACX,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
3
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
export { Checkbox };
|
|
5
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAKzD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,qBAsBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
4
|
+
import { IconCheck } from "@tabler/icons-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
function Checkbox({ className, ...props }) {
|
|
7
|
+
return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer size-4 shrink-0 cursor-pointer border border-input bg-transparent shadow-xs outline-none transition-colors duration-200", "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", "data-[state=indeterminate]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current", children: _jsx(IconCheck, { "aria-hidden": "true", className: "size-3.5", stroke: 3 }) }) }));
|
|
8
|
+
}
|
|
9
|
+
export { Checkbox };
|
|
10
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,SAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EAC4C;IACpD,OAAO,CACL,KAAC,iBAAiB,CAAC,IAAI,iBACX,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,8HAA8H,EAC9H,qHAAqH,EACrH,iDAAiD,EACjD,kHAAkH,EAClH,oIAAoI,EACpI,SAAS,CACV,KACG,KAAK,YAET,KAAC,iBAAiB,CAAC,SAAS,iBAChB,oBAAoB,EAC9B,SAAS,EAAC,+CAA+C,YAEzD,KAAC,SAAS,mBAAa,MAAM,EAAC,SAAS,EAAC,UAAU,EAAC,MAAM,EAAE,CAAC,GAAI,GACpC,GACP,CAC1B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface CodeBlockProps extends Omit<React.ComponentProps<"figure">, "children"> {
|
|
3
|
+
/** The exact source. It is what the copy button writes. */
|
|
4
|
+
code: string;
|
|
5
|
+
/** Shown in the caption bar, such as "tsx" or "bash". */
|
|
6
|
+
language?: string;
|
|
7
|
+
/** Shown in the caption bar and used to name the scroll region. */
|
|
8
|
+
filename?: string;
|
|
9
|
+
/** Show the copy button. */
|
|
10
|
+
copyable?: boolean;
|
|
11
|
+
/** Number the lines. Numbers are generated by CSS and never copied. */
|
|
12
|
+
showLineNumbers?: boolean;
|
|
13
|
+
/** Caps the height and scrolls, for long files. */
|
|
14
|
+
maxHeight?: number | string;
|
|
15
|
+
/** Accessible name of the copy button. */
|
|
16
|
+
copyLabel?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* A captioned code sample with a copy button. The scroll region is focusable
|
|
20
|
+
* so a keyboard can scroll a long line, and it has a name. No highlighter is
|
|
21
|
+
* bundled; the block renders plain text so it stays light and safe.
|
|
22
|
+
*/
|
|
23
|
+
declare function CodeBlock({ code, language, filename, copyable, showLineNumbers, maxHeight, copyLabel, className, ...props }: CodeBlockProps): React.JSX.Element;
|
|
24
|
+
export { CodeBlock };
|
|
25
|
+
//# sourceMappingURL=code-block.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.d.ts","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtF,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAe,EACf,eAAuB,EACvB,SAAS,EACT,SAAuB,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,qBA8ChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { CopyButton } from "./copy-button.js";
|
|
6
|
+
/**
|
|
7
|
+
* A captioned code sample with a copy button. The scroll region is focusable
|
|
8
|
+
* so a keyboard can scroll a long line, and it has a name. No highlighter is
|
|
9
|
+
* bundled; the block renders plain text so it stays light and safe.
|
|
10
|
+
*/
|
|
11
|
+
function CodeBlock({ code, language, filename, copyable = true, showLineNumbers = false, maxHeight, copyLabel = "Copy code", className, ...props }) {
|
|
12
|
+
const lines = React.useMemo(() => code.replace(/\n$/, "").split("\n"), [code]);
|
|
13
|
+
const hasCaption = Boolean(filename || language || copyable);
|
|
14
|
+
return (_jsxs("figure", { "data-slot": "code-block", className: cn("min-w-0 overflow-hidden border border-border bg-muted/30", className), ...props, children: [hasCaption ? (_jsxs("figcaption", { className: "flex min-h-10 items-center justify-between gap-3 border-b border-border bg-muted px-4 py-1.5", children: [_jsxs("span", { className: "flex min-w-0 items-center gap-3", children: [filename ? (_jsx("span", { className: "truncate font-mono text-xs text-foreground", children: filename })) : null, language ? (_jsx("span", { className: "shrink-0 text-[10px] font-bold uppercase tracking-[0.12em] text-foreground", children: language })) : null] }), copyable ? _jsx(CopyButton, { value: code, label: copyLabel }) : null] })) : null, _jsx("pre", { tabIndex: 0, "aria-label": filename ? `${filename} source` : "Code sample", className: "overflow-auto p-4 text-[13px] leading-relaxed text-foreground outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring", style: maxHeight !== undefined ? { maxHeight } : undefined, children: _jsx("code", { className: cn("font-mono", showLineNumbers && "grid [counter-reset:line]"), children: showLineNumbers
|
|
15
|
+
? lines.map((line, index) => (_jsx("span", { className: "[counter-increment:line] before:mr-4 before:inline-block before:w-6 before:select-none before:text-right before:text-muted-foreground before:content-[counter(line)]", children: line || " " }, index)))
|
|
16
|
+
: code }) })] }));
|
|
17
|
+
}
|
|
18
|
+
export { CodeBlock };
|
|
19
|
+
//# sourceMappingURL=code-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-block.js","sourceRoot":"","sources":["../../src/components/code-block.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAmB3C;;;;GAIG;AACH,SAAS,SAAS,CAAC,EACjB,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,QAAQ,GAAG,IAAI,EACf,eAAe,GAAG,KAAK,EACvB,SAAS,EACT,SAAS,GAAG,WAAW,EACvB,SAAS,EACT,GAAG,KAAK,EACO;IACf,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC/E,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,IAAI,QAAQ,IAAI,QAAQ,CAAC,CAAC;IAE7D,OAAO,CACL,+BACY,YAAY,EACtB,S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3
|
+
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare function CollapsibleContent({ className, ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Content>): React.JSX.Element;
|
|
6
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
7
|
+
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAI/D,QAAA,MAAM,WAAW,8GAA4B,CAAC;AAC9C,QAAA,MAAM,kBAAkB,wHAA+B,CAAC;AAExD,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,qBAQ3D;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Collapsible as CollapsiblePrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
const Collapsible = CollapsiblePrimitive.Root;
|
|
6
|
+
const CollapsibleTrigger = CollapsiblePrimitive.Trigger;
|
|
7
|
+
function CollapsibleContent({ className, ...props }) {
|
|
8
|
+
return (_jsx(CollapsiblePrimitive.Content, { "data-slot": "collapsible-content", className: cn("overflow-hidden", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
11
|
+
//# sourceMappingURL=collapsible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.js","sourceRoot":"","sources":["../../src/components/collapsible.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,WAAW,GAAG,oBAAoB,CAAC,IAAI,CAAC;AAC9C,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC;AAExD,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACkD;IAC1D,OAAO,CACL,KAAC,oBAAoB,CAAC,OAAO,iBACjB,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,KACvC,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ComboboxOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** Secondary line shown under the label in the list. */
|
|
6
|
+
description?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
/** Extra words that should match the search without appearing as the label. */
|
|
9
|
+
keywords?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface ComboboxProps {
|
|
12
|
+
options: ComboboxOption[];
|
|
13
|
+
value?: string;
|
|
14
|
+
onValueChange?: (value: string) => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
searchPlaceholder?: string;
|
|
17
|
+
emptyMessage?: string;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Accessible name for the trigger when there is no visible `Label`. */
|
|
20
|
+
"aria-label"?: string;
|
|
21
|
+
"aria-labelledby"?: string;
|
|
22
|
+
"aria-describedby"?: string;
|
|
23
|
+
"aria-invalid"?: boolean;
|
|
24
|
+
id?: string;
|
|
25
|
+
name?: string;
|
|
26
|
+
className?: string;
|
|
27
|
+
triggerClassName?: string;
|
|
28
|
+
align?: "start" | "center" | "end";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* A single-select combobox: a button that opens a searchable list.
|
|
32
|
+
*
|
|
33
|
+
* Built from `Popover` and `Command`, so filtering, type-ahead, arrow keys,
|
|
34
|
+
* Home/End, Enter, and Escape are real interactions rather than decoration.
|
|
35
|
+
* The trigger keeps the current label, and the selected item is marked with a
|
|
36
|
+
* check icon and `aria-selected` from the listbox.
|
|
37
|
+
*/
|
|
38
|
+
declare function Combobox({ options, value, onValueChange, placeholder, searchPlaceholder, emptyMessage, disabled, id, name, className, triggerClassName, align, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, }: ComboboxProps): React.JSX.Element;
|
|
39
|
+
export { Combobox };
|
|
40
|
+
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACpC;AAED;;;;;;;GAOG;AACH,iBAAS,QAAQ,CAAC,EAChB,OAAO,EACP,KAAK,EACL,aAAa,EACb,WAAgC,EAChC,iBAA6B,EAC7B,YAAqC,EACrC,QAAQ,EACR,EAAE,EACF,IAAI,EACJ,SAAS,EACT,gBAAgB,EAChB,KAAe,EACf,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eAAe,EACnC,cAAc,EAAE,WAAW,GAC5B,EAAE,aAAa,qBAwFf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { IconCheck, IconChevronDown } from "@tabler/icons-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { Command, CommandEmpty, CommandInput, CommandItem, CommandList } from "./command.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
8
|
+
/**
|
|
9
|
+
* A single-select combobox: a button that opens a searchable list.
|
|
10
|
+
*
|
|
11
|
+
* Built from `Popover` and `Command`, so filtering, type-ahead, arrow keys,
|
|
12
|
+
* Home/End, Enter, and Escape are real interactions rather than decoration.
|
|
13
|
+
* The trigger keeps the current label, and the selected item is marked with a
|
|
14
|
+
* check icon and `aria-selected` from the listbox.
|
|
15
|
+
*/
|
|
16
|
+
function Combobox({ options, value, onValueChange, placeholder = "Select an option", searchPlaceholder = "Search…", emptyMessage = "No matching options.", disabled, id, name, className, triggerClassName, align = "start", "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, }) {
|
|
17
|
+
const [open, setOpen] = React.useState(false);
|
|
18
|
+
const selected = options.find((option) => option.value === value);
|
|
19
|
+
const generatedId = React.useId();
|
|
20
|
+
const triggerId = id ?? generatedId;
|
|
21
|
+
return (_jsxs("div", { "data-slot": "combobox", className: cn("relative w-full", className), children: [_jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { id: triggerId, type: "button", "aria-expanded": open, "aria-haspopup": "listbox", "aria-controls": open ? `${triggerId}-listbox` : undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, disabled: disabled, className: cn("flex h-9 w-full items-center justify-between gap-2 border border-input bg-background px-3 text-left text-sm text-foreground shadow-xs", "outline-none transition-[color,background-color,border-color,box-shadow] duration-200", "hover:bg-muted/40", "focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:cursor-not-allowed disabled:opacity-50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20", triggerClassName), children: [_jsx("span", { className: cn("truncate", !selected && "text-muted-foreground"), children: selected?.label ?? placeholder }), _jsx(IconChevronDown, { "aria-hidden": "true", className: cn("size-4 shrink-0 text-muted-foreground transition-transform duration-200", open && "rotate-180") })] }) }), _jsx(PopoverContent, { align: align, "aria-label": ariaLabel ?? "Choose an option", className: "w-[var(--radix-popover-trigger-width)] min-w-56 p-0", children: _jsxs(Command, { label: ariaLabel ?? "Options", children: [_jsx(CommandInput, { placeholder: searchPlaceholder, autoFocus: true }), _jsxs(CommandList, { id: `${triggerId}-listbox`, children: [_jsx(CommandEmpty, { children: emptyMessage }), options.map((option) => (_jsxs(CommandItem, { value: option.value, keywords: [option.label, ...(option.keywords ?? [])], disabled: option.disabled, onSelect: () => {
|
|
22
|
+
onValueChange?.(option.value);
|
|
23
|
+
setOpen(false);
|
|
24
|
+
}, className: "items-start gap-2", children: [_jsx(IconCheck, { "aria-hidden": "true", className: cn("mt-0.5 size-4 shrink-0", option.value === value ? "opacity-100" : "opacity-0") }), _jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [_jsx("span", { className: "truncate", children: option.label }), option.description ? (_jsx("span", { className: "truncate text-xs text-muted-foreground", children: option.description })) : null] })] }, option.value)))] })] }) })] }), name ? _jsx("input", { type: "hidden", name: name, value: value ?? "" }) : null] }));
|
|
25
|
+
}
|
|
26
|
+
export { Combobox };
|
|
27
|
+
//# sourceMappingURL=combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox.js","sourceRoot":"","sources":["../../src/components/combobox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,W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W,CAAC,CAAC,CAAC,CACpB,eAAM,SAAS,EAAC,wCAAwC,YACrD,MAAM,CAAC,WAAW,GACd,CACR,CAAC,CAAC,CAAC,IAAI,IACH,KAxBF,MAAM,CAAC,KAAK,CAyBL,CACf,CAAC,IACU,IACN,GACK,IACT,EACT,IAAI,CAAC,CAAC,CAAC,gBAAO,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI,IAClE,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
3
|
+
import { Dialog } from "./dialog.js";
|
|
4
|
+
declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): React.JSX.Element;
|
|
5
|
+
export interface CommandDialogProps extends React.ComponentProps<typeof Dialog> {
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
/** Show the dialog's close button. Defaults to `true`; a search surface usually sets it to `false`. */
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: CommandDialogProps): React.JSX.Element;
|
|
13
|
+
declare function CommandInput({ className, wrapperClassName, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Input> & {
|
|
14
|
+
wrapperClassName?: string;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}): React.JSX.Element;
|
|
17
|
+
declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): React.JSX.Element;
|
|
18
|
+
declare function CommandEmpty(props: React.ComponentProps<typeof CommandPrimitive.Empty>): React.JSX.Element;
|
|
19
|
+
declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): React.JSX.Element;
|
|
20
|
+
declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): React.JSX.Element;
|
|
21
|
+
declare function CommandItem({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): React.JSX.Element;
|
|
22
|
+
declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
23
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, };
|
|
24
|
+
//# sourceMappingURL=command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../src/components/command.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AAInD,OAAO,EACL,MAAM,EAKP,MAAM,UAAU,CAAC;AAElB,iBAAS,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,qBAWtF;AAED,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uGAAuG;IACvG,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,iBAAS,aAAa,CAAC,EACrB,KAAyB,EACzB,WAA4C,EAC5C,QAAQ,EACR,SAAS,EACT,eAAsB,EACtB,GAAG,KAAK,EACT,EAAE,kBAAkB,qBAYpB;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,GAAG;IACvD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,qBAoBA;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAQpD;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAQ/E;AAED,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,KAAK,CAAC,qBAerD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,SAAS,CAAC,qBAQzD;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,qBAcpD;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAQ7E;AAED,OAAO,EACL,OAAO,EACP,aAAa,EACb,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
4
|
+
import { IconSearch } from "@tabler/icons-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "./dialog.js";
|
|
7
|
+
function Command({ className, ...props }) {
|
|
8
|
+
return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex h-full w-full flex-col overflow-hidden bg-popover text-popover-foreground", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function CommandDialog({ title = "Command palette", description = "Search for a command to run.", children, className, showCloseButton = true, ...props }) {
|
|
11
|
+
return (_jsx(Dialog, { ...props, children: _jsxs(DialogContent, { showCloseButton: showCloseButton, className: cn("overflow-hidden p-0", className), children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(Command, { label: title, children: children })] }) }));
|
|
12
|
+
}
|
|
13
|
+
function CommandInput({ className, wrapperClassName, children, ...props }) {
|
|
14
|
+
return (_jsxs("div", { "data-slot": "command-input-wrapper", className: cn("flex h-11 items-center gap-2 border-b border-border px-3", wrapperClassName), children: [_jsx(IconSearch, { "aria-hidden": "true", className: "size-4 shrink-0 text-muted-foreground" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("flex h-11 w-full bg-transparent py-3 text-sm text-foreground outline-none", "placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", "focus-visible:outline-none", className), ...props }), children] }));
|
|
15
|
+
}
|
|
16
|
+
function CommandList({ className, ...props }) {
|
|
17
|
+
return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-80 overflow-y-auto overflow-x-hidden p-1", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function CommandEmpty(props) {
|
|
20
|
+
return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "px-3 py-8 text-center text-sm text-muted-foreground", ...props }));
|
|
21
|
+
}
|
|
22
|
+
function CommandGroup({ className, ...props }) {
|
|
23
|
+
return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("overflow-hidden text-foreground", "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5", "[&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-semibold", "[&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wider", "[&_[cmdk-group-heading]]:text-muted-foreground", className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function CommandSeparator({ className, ...props }) {
|
|
26
|
+
return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("my-1 h-px bg-border", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function CommandItem({ className, ...props }) {
|
|
29
|
+
return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("relative flex cursor-pointer select-none items-center gap-2 px-2 py-2 text-sm outline-none", "data-[selected=true]:bg-muted data-[selected=true]:text-foreground", "data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function CommandShortcut({ className, ...props }) {
|
|
32
|
+
return (_jsx("span", { "data-slot": "command-shortcut", className: cn("ml-auto font-mono text-xs tracking-wide text-muted-foreground", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandSeparator, CommandShortcut, };
|
|
35
|
+
//# sourceMappingURL=command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../src/components/command.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,MAAM,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EACL,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,MAAM,UAAU,CAAC;AAElB,SAAS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,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,eAAe,GAChB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ButtonProps } from "./button.js";
|
|
3
|
+
/**
|
|
4
|
+
* Writes text to the clipboard. Falls back to a temporary textarea and
|
|
5
|
+
* `execCommand("copy")` where the async Clipboard API is unavailable, such as
|
|
6
|
+
* an insecure origin or an older embedded browser. Rejects when both fail.
|
|
7
|
+
*/
|
|
8
|
+
declare function copyToClipboard(value: string): Promise<void>;
|
|
9
|
+
export interface CopyButtonProps extends Omit<ButtonProps, "value" | "onClick" | "children" | "asChild" | "onCopy"> {
|
|
10
|
+
/** The exact text written to the clipboard. An empty string disables the button. */
|
|
11
|
+
value: string;
|
|
12
|
+
/** Accessible name and visible text before copying. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Text shown and announced after a successful copy. */
|
|
15
|
+
copiedLabel?: string;
|
|
16
|
+
/** Text shown and announced when the browser refuses the write. */
|
|
17
|
+
errorLabel?: string;
|
|
18
|
+
/** Render the label next to the icon instead of an icon-only button. */
|
|
19
|
+
showLabel?: boolean;
|
|
20
|
+
/** How long the copied or error state stays visible, in milliseconds. */
|
|
21
|
+
timeout?: number;
|
|
22
|
+
onCopy?: (value: string) => void;
|
|
23
|
+
onCopyError?: (error: unknown) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Copies a value and confirms it in place: the icon and label swap for a
|
|
27
|
+
* moment, and a polite live region announces the result. It never toasts,
|
|
28
|
+
* so the confirmation stays next to the thing that was copied.
|
|
29
|
+
*/
|
|
30
|
+
declare function CopyButton({ value, label, copiedLabel, errorLabel, showLabel, timeout, onCopy, onCopyError, variant, size, disabled, className, ...props }: CopyButtonProps): React.JSX.Element;
|
|
31
|
+
export { CopyButton, copyToClipboard };
|
|
32
|
+
//# sourceMappingURL=copy-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../src/components/copy-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAEpD;;;;GAIG;AACH,iBAAe,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB3D;AAID,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAClF,oFAAoF;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,KAAc,EACd,WAAsB,EACtB,UAA0B,EAC1B,SAAiB,EACjB,OAAc,EACd,MAAM,EACN,WAAW,EACX,OAAiB,EACjB,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,eAAe,qBA2DjB;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { IconCheck, IconCopy, IconX } from "@tabler/icons-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
/**
|
|
8
|
+
* Writes text to the clipboard. Falls back to a temporary textarea and
|
|
9
|
+
* `execCommand("copy")` where the async Clipboard API is unavailable, such as
|
|
10
|
+
* an insecure origin or an older embedded browser. Rejects when both fail.
|
|
11
|
+
*/
|
|
12
|
+
async function copyToClipboard(value) {
|
|
13
|
+
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
|
14
|
+
await navigator.clipboard.writeText(value);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const textarea = document.createElement("textarea");
|
|
18
|
+
textarea.value = value;
|
|
19
|
+
textarea.setAttribute("readonly", "");
|
|
20
|
+
textarea.style.position = "fixed";
|
|
21
|
+
textarea.style.opacity = "0";
|
|
22
|
+
document.body.appendChild(textarea);
|
|
23
|
+
textarea.select();
|
|
24
|
+
const copied = document.execCommand("copy");
|
|
25
|
+
document.body.removeChild(textarea);
|
|
26
|
+
if (!copied)
|
|
27
|
+
throw new Error("Copy failed");
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Copies a value and confirms it in place: the icon and label swap for a
|
|
31
|
+
* moment, and a polite live region announces the result. It never toasts,
|
|
32
|
+
* so the confirmation stays next to the thing that was copied.
|
|
33
|
+
*/
|
|
34
|
+
function CopyButton({ value, label = "Copy", copiedLabel = "Copied", errorLabel = "Copy failed", showLabel = false, timeout = 2000, onCopy, onCopyError, variant = "ghost", size, disabled, className, ...props }) {
|
|
35
|
+
const [state, setState] = React.useState("idle");
|
|
36
|
+
const timer = React.useRef(null);
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
return () => {
|
|
39
|
+
if (timer.current)
|
|
40
|
+
clearTimeout(timer.current);
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
function settle(next) {
|
|
44
|
+
setState(next);
|
|
45
|
+
if (timer.current)
|
|
46
|
+
clearTimeout(timer.current);
|
|
47
|
+
timer.current = setTimeout(() => setState("idle"), timeout);
|
|
48
|
+
}
|
|
49
|
+
async function handleClick() {
|
|
50
|
+
try {
|
|
51
|
+
await copyToClipboard(value);
|
|
52
|
+
settle("copied");
|
|
53
|
+
onCopy?.(value);
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
settle("error");
|
|
57
|
+
onCopyError?.(error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const currentLabel = state === "copied" ? copiedLabel : state === "error" ? errorLabel : label;
|
|
61
|
+
const Icon = state === "copied" ? IconCheck : state === "error" ? IconX : IconCopy;
|
|
62
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Button, { type: "button", "data-slot": "copy-button", "data-state": state, variant: variant, size: size ?? (showLabel ? "sm" : "icon-sm"), disabled: disabled || value.length === 0, "aria-label": showLabel ? undefined : currentLabel, title: showLabel ? undefined : currentLabel, onClick: handleClick, className: cn(className), ...props, children: [_jsx(Icon, { "aria-hidden": "true", className: cn(state === "copied" && "text-success", state === "error" && "text-danger") }), showLabel ? _jsx("span", { children: currentLabel }) : null] }), _jsx("span", { role: "status", "aria-live": "polite", className: "sr-only", children: state === "copied" ? `${copiedLabel} to clipboard` : state === "error" ? errorLabel : "" })] }));
|
|
63
|
+
}
|
|
64
|
+
export { CopyButton, copyToClipboard };
|
|
65
|
+
//# sourceMappingURL=copy-button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-button.js","sourceRoot":"","sources":["../../src/components/copy-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,MAAM,E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ACjB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,EAC5C,QAAQ,EAAE,QAAQ,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,gBAC5B,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,EAChD,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,EAC3C,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,KACpB,KAAK,aAET,KAAC,IAAI,mBACS,MAAM,EAClB,SAAS,EAAE,EAAE,CACX,KAAK,KAAK,QAAQ,IAAI,cAAc,EACpC,KAAK,KAAK,OAAO,IAAI,aAAa,CACnC,GACD,EACD,SAAS,CAAC,CAAC,CAAC,yBAAO,YAAY,GAAQ,CAAC,CAAC,CAAC,IAAI,IACxC,EACT,eAAM,IAAI,EAAC,QAAQ,eAAW,QAAQ,EAAC,SAAS,EAAC,SAAS,YACvD,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,WAAW,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GACpF,IACN,CACJ,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { DateRange } from "react-day-picker";
|
|
3
|
+
export interface DatePickerProps {
|
|
4
|
+
value?: Date;
|
|
5
|
+
onChange?: (date: Date | undefined) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
/** Reject dates before this day. */
|
|
8
|
+
min?: Date;
|
|
9
|
+
/** Reject dates after this day. */
|
|
10
|
+
max?: Date;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Show the "Clear" action inside the calendar. Defaults to `true`. */
|
|
13
|
+
clearable?: boolean;
|
|
14
|
+
/** Locale used for the trigger label, for example `en-GB`. */
|
|
15
|
+
locale?: string;
|
|
16
|
+
/** Replace the default `Oct 24, 2026` label. */
|
|
17
|
+
format?: (date: Date) => string;
|
|
18
|
+
/** Month shown before the visitor picks a date. */
|
|
19
|
+
defaultMonth?: Date;
|
|
20
|
+
id?: string;
|
|
21
|
+
/** Renders a hidden input so the value submits with a native form. */
|
|
22
|
+
name?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
align?: "start" | "center" | "end";
|
|
25
|
+
"aria-describedby"?: string;
|
|
26
|
+
"aria-invalid"?: boolean;
|
|
27
|
+
"aria-labelledby"?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A date field: a button that opens a calendar in a popover.
|
|
31
|
+
*
|
|
32
|
+
* The trigger is a real button, so the field is reachable and operable by
|
|
33
|
+
* keyboard. Selecting a day closes the popover and returns focus to the
|
|
34
|
+
* trigger; Escape closes without changing the value. When `name` is set, a
|
|
35
|
+
* hidden input carries the `yyyy-mm-dd` value into native form submission.
|
|
36
|
+
*/
|
|
37
|
+
declare function DatePicker({ value, onChange, placeholder, min, max, disabled, clearable, locale, format, defaultMonth, id, name, className, align, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "aria-labelledby": ariaLabelledBy, }: DatePickerProps): React.JSX.Element;
|
|
38
|
+
export interface DateRangePickerProps {
|
|
39
|
+
value?: DateRange;
|
|
40
|
+
onChange?: (range: DateRange | undefined) => void;
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
min?: Date;
|
|
43
|
+
max?: Date;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
clearable?: boolean;
|
|
46
|
+
locale?: string;
|
|
47
|
+
format?: (date: Date) => string;
|
|
48
|
+
/** Number of months shown side by side on wide screens. Defaults to `1`. */
|
|
49
|
+
numberOfMonths?: number;
|
|
50
|
+
defaultMonth?: Date;
|
|
51
|
+
id?: string;
|
|
52
|
+
className?: string;
|
|
53
|
+
align?: "start" | "center" | "end";
|
|
54
|
+
"aria-describedby"?: string;
|
|
55
|
+
"aria-labelledby"?: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* A range field for reports, filters, and booking windows.
|
|
59
|
+
*
|
|
60
|
+
* The popover stays open until both ends are chosen, so the visitor can see
|
|
61
|
+
* the in-progress range. A completed range is announced through the calendar
|
|
62
|
+
* grid's `aria-multiselectable` and per-day selected state.
|
|
63
|
+
*/
|
|
64
|
+
declare function DateRangePicker({ value, onChange, placeholder, min, max, disabled, clearable, locale, format, numberOfMonths, defaultMonth, id, className, align, "aria-describedby": ariaDescribedBy, "aria-labelledby": ariaLabelledBy, }: DateRangePickerProps): React.JSX.Element;
|
|
65
|
+
export { DatePicker, DateRangePicker };
|
|
66
|
+
//# sourceMappingURL=date-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-picker.d.ts","sourceRoot":"","sources":["../../src/components/date-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqBlD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oCAAoC;IACpC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,mCAAmC;IACnC,GAAG,CAAC,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,MAAM,CAAC,EAAE,C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