@aback-ui/ui 0.0.0-stage → 0.2.1
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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Aback Group
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @aback-ui/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Accessible, square-cornered React components for the Aback design system: 57 components, from Button and Dialog to Dropzone, Rating, Stat, Steps, and Table of Contents.
|
|
4
|
+
|
|
5
|
+
- Documentation and live previews: [abackui.com](https://abackui.com)
|
|
6
|
+
- Status: pre-1.0. APIs may change before the first stable release.
|
|
7
|
+
- Requires React 19 and Tailwind CSS v4.
|
|
8
|
+
|
|
9
|
+
> This package is built and tested from its packed tarball, but it is **not published to npm yet**.
|
|
10
|
+
|
|
11
|
+
## Two ways to install
|
|
12
|
+
|
|
13
|
+
### Copy the source (aback-ui CLI)
|
|
14
|
+
|
|
15
|
+
You own the files and can edit them.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx aback-ui@latest init
|
|
19
|
+
npx aback-ui@latest add button
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Use the package
|
|
23
|
+
|
|
24
|
+
Take updates with a version bump instead of editing source. Install `@aback-ui/ui` and `@aback-ui/tokens`, then add the theme and point Tailwind at the package:
|
|
25
|
+
|
|
26
|
+
```css
|
|
27
|
+
@import "tailwindcss";
|
|
28
|
+
@import "@aback-ui/tokens/tokens.css";
|
|
29
|
+
@source "../node_modules/@aback-ui/ui/dist";
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The `@source` line is required. Tailwind v4 does not scan `node_modules`, so without it the classes the components use are never generated. The path is relative to the stylesheet. The repository's consumer test compiles this exact stylesheet against the packed tarballs and checks both cases.
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
import { Button, CopyButton } from "@aback-ui/ui";
|
|
36
|
+
|
|
37
|
+
export function SaveBar({ token }: { token: string }) {
|
|
38
|
+
return (
|
|
39
|
+
<div className="flex gap-2">
|
|
40
|
+
<CopyButton value={token} showLabel label="Copy token" />
|
|
41
|
+
<Button>Save changes</Button>
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Dark mode
|
|
48
|
+
|
|
49
|
+
The theme is light by default; a `dark` class on `<html>` switches it. `ThemeToggle`, `useTheme`, and `ThemeScript` (which applies the stored choice before first paint) ship in this package.
|
|
50
|
+
|
|
51
|
+
## Components
|
|
52
|
+
|
|
53
|
+
The live catalogue at [abackui.com/docs/components](https://abackui.com/docs/components) is the authoritative list, with examples, props, keyboard behavior, and accessibility notes for every entry.
|
|
54
|
+
|
|
55
|
+
## Building the package
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bun run build
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
`tsc` emits ESM and declarations into `dist`. A post-build step appends `.js` to relative import specifiers so the output is valid for Node ESM as well as bundlers.
|
|
62
|
+
|
|
63
|
+
## Boundaries
|
|
64
|
+
|
|
65
|
+
- `@aback-ui/ui` does not import the docs app, a product app, or any Aback service.
|
|
66
|
+
- Interactive components carry `"use client"`; presentational components can render on the server.
|
|
67
|
+
- Radix UI supplies the accessible behavior for overlays and form primitives.
|
|
68
|
+
- The Aback name, mark, and Aback Blue are trademarks of Aback Group. The MIT license covers the code.
|
|
69
|
+
|
|
70
|
+
See the [documentation](https://abackui.com/docs) and the repository `AGENTS.md` before changing a public API.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
3
|
+
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
8
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAK3D,QAAA,MAAM,SAAS,8JAA0B,CAAC;AAE1C,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAQtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAuBzD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAazD;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
4
|
+
import { IconChevronDown } from "@tabler/icons-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const Accordion = AccordionPrimitive.Root;
|
|
7
|
+
function AccordionItem({ className, ...props }) {
|
|
8
|
+
return (_jsx(AccordionPrimitive.Item, { "data-slot": "accordion-item", className: cn("border-b border-border", className), ...props }));
|
|
9
|
+
}
|
|
10
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
11
|
+
return (_jsx(AccordionPrimitive.Header, { className: "flex", children: _jsxs(AccordionPrimitive.Trigger, { "data-slot": "accordion-trigger", className: cn("flex flex-1 items-center justify-between gap-3 py-4 text-left text-sm font-medium text-foreground", "outline-none transition-colors duration-200 hover:text-link", "focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background", "disabled:pointer-events-none disabled:opacity-50", "[&[data-state=open]>svg]:rotate-180", className), ...props, children: [children, _jsx(IconChevronDown, { "aria-hidden": "true", className: "size-5 shrink-0 text-muted-foreground transition-transform duration-200" })] }) }));
|
|
12
|
+
}
|
|
13
|
+
function AccordionContent({ className, children, ...props }) {
|
|
14
|
+
return (_jsx(AccordionPrimitive.Content, { "data-slot": "accordion-content", className: cn("overflow-hidden text-sm text-muted-foreground", "data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out]"), ...props, children: _jsx("div", { className: cn("pb-4 leading-relaxed", className), children: children }) }));
|
|
15
|
+
}
|
|
16
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
17
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,SAAS,GAAG,kBAAkB,CAAC,IAAI,CAAC;AAE1C,SAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EAC6C;IACrD,OAAO,CACL,KAAC,kBAAkB,CAAC,IAAI,iBACZ,gBAAgB,EAC1B,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC,KAC9C,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACgD;IACxD,OAAO,CACL,KAAC,kBAAkB,CAAC,MAAM,IAAC,SAAS,EAAC,MAAM,YACzC,MAAC,kBAAkB,CAAC,OAAO,iBACf,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CACX,mGAAmG,EACnG,6DAA6D,EAC7D,qHAAqH,EACrH,kDAAkD,EAClD,qCAAqC,EACrC,SAAS,CACV,KACG,KAAK,aAER,QAAQ,EACT,KAAC,eAAe,mBACF,MAAM,EAClB,SAAS,EAAC,yEAAyE,GACnF,IACyB,GACH,CAC7B,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACgD;IACxD,OAAO,CACL,KAAC,kBAAkB,CAAC,OAAO,iBACf,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CACX,+CAA+C,EAC/C,qHAAqH,CACtH,KACG,KAAK,YAET,cAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAO,GAC5C,CAC9B,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
3
|
+
declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
|
|
4
|
+
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
|
|
6
|
+
declare function AlertDialogOverlay({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>): React.JSX.Element;
|
|
7
|
+
declare function AlertDialogContent({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Content>): React.JSX.Element;
|
|
8
|
+
declare function AlertDialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
|
+
declare function AlertDialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
|
+
declare function AlertDialogTitle({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Title>): React.JSX.Element;
|
|
11
|
+
declare function AlertDialogDescription({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Description>): React.JSX.Element;
|
|
12
|
+
declare function AlertDialogAction({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Action>): React.JSX.Element;
|
|
13
|
+
declare function AlertDialogCancel({ className, ...props }: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>): React.JSX.Element;
|
|
14
|
+
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
15
|
+
//# sourceMappingURL=alert-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.d.ts","sourceRoot":"","sources":["../../src/components/alert-dialog.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,iDAA4B,CAAC;AAC9C,QAAA,MAAM,kBAAkB,wHAA+B,CAAC;AACxD,QAAA,MAAM,iBAAiB,uDAA8B,CAAC;AAStD,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,qBAa3D;AAED,iBAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,OAAO,CAAC,qBAiB3D;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAE9E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ9E;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,KAAK,CAAC,qBAQzD;AAED,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,WAAW,CAAC,qBAQ/D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAa1D;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,MAAM,CAAC,qBAa1D;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
const AlertDialog = AlertDialogPrimitive.Root;
|
|
6
|
+
const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
|
|
7
|
+
const AlertDialogPortal = AlertDialogPrimitive.Portal;
|
|
8
|
+
const buttonBase = "inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap text-sm font-medium 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:pointer-events-none disabled:opacity-50";
|
|
9
|
+
const buttonSizes = {
|
|
10
|
+
default: "h-9 px-4",
|
|
11
|
+
sm: "h-8 px-3",
|
|
12
|
+
};
|
|
13
|
+
function AlertDialogOverlay({ className, ...props }) {
|
|
14
|
+
return (_jsx(AlertDialogPrimitive.Overlay, { "data-slot": "alert-dialog-overlay", className: cn("fixed inset-0 z-50 bg-black/40 backdrop-blur-sm dark:bg-black/60", "data-[state=open]:animate-in data-[state=open]:fade-in-0", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0", className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function AlertDialogContent({ className, ...props }) {
|
|
17
|
+
return (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { "data-slot": "alert-dialog-content", className: cn("fixed left-1/2 top-1/2 z-50 grid max-h-[calc(100dvh-2rem)] w-[calc(100%-2rem)] max-w-md -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto", "border border-border bg-popover p-6 text-popover-foreground shadow-2xl", "duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", className), ...props })] }));
|
|
18
|
+
}
|
|
19
|
+
function AlertDialogHeader({ className, ...props }) {
|
|
20
|
+
return _jsx("div", { "data-slot": "alert-dialog-header", className: cn("flex flex-col gap-1.5", className), ...props });
|
|
21
|
+
}
|
|
22
|
+
function AlertDialogFooter({ className, ...props }) {
|
|
23
|
+
return (_jsx("div", { "data-slot": "alert-dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function AlertDialogTitle({ className, ...props }) {
|
|
26
|
+
return (_jsx(AlertDialogPrimitive.Title, { "data-slot": "alert-dialog-title", className: cn("text-lg font-semibold leading-none tracking-tight", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function AlertDialogDescription({ className, ...props }) {
|
|
29
|
+
return (_jsx(AlertDialogPrimitive.Description, { "data-slot": "alert-dialog-description", className: cn("text-sm leading-relaxed text-muted-foreground", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function AlertDialogAction({ className, ...props }) {
|
|
32
|
+
return (_jsx(AlertDialogPrimitive.Action, { "data-slot": "alert-dialog-action", className: cn(buttonBase, buttonSizes.default, "bg-primary text-primary-foreground hover:bg-primary/90", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
function AlertDialogCancel({ className, ...props }) {
|
|
35
|
+
return (_jsx(AlertDialogPrimitive.Cancel, { "data-slot": "alert-dialog-cancel", className: cn(buttonBase, buttonSizes.default, "border border-input bg-background text-foreground shadow-xs hover:bg-muted", className), ...props }));
|
|
36
|
+
}
|
|
37
|
+
export { AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
|
|
38
|
+
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","sourceRoot":"","sources":["../../src/components/alert-dialog.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;AACxD,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,MAAM,CAAC;AAEtD,MAAM,UAAU,GACd,2TAA2T,CAAC;AAC9T,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,UAAU;IACnB,EAAE,EAAE,UAAU;CACN,CAAC;AAEX,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACkD;IAC1D,OAAO,CACL,KAAC,oBAAoB,CAAC,OAAO,iBACjB,sBAAsB,EAChC,SAAS,EAAE,EAAE,CACX,kEAAkE,EAClE,0DAA0D,EAC1D,gEAAgE,EAChE,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,SAAS,EACT,GAAG,KAAK,EACkD;IAC1D,OAAO,CACL,MAAC,iBAAiB,eAChB,KAAC,kBAAkB,KAAG,EACtB,KAAC,oBAAoB,CAAC,OAAO,iBACjB,sBAAsB,EAChC,SAAS,EAAE,EAAE,CACX,iJAAiJ,EACjJ,wEAAwE,EACxE,oGAAoG,EACpG,gGAAgG,EAChG,SAAS,CACV,KACG,KAAK,GACT,IACgB,CACrB,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC7E,OAAO,2BAAe,qBAAqB,EAAC,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAC/G,CAAC;AAED,SAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC7E,OAAO,CACL,2BACY,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CAAC,wDAAwD,EAAE,SAAS,CAAC,KAC9E,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,GAAG,KAAK,EACgD;IACxD,OAAO,CACL,KAAC,oBAAoB,CAAC,KAAK,iBACf,oBAAoB,EAC9B,SAAS,EAAE,EAAE,CAAC,mDAAmD,EAAE,SAAS,CAAC,KACzE,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACsD;IAC9D,OAAO,CACL,KAAC,oBAAoB,CAAC,WAAW,iBACrB,0BAA0B,EACpC,SAAS,EAAE,EAAE,CAAC,+CAA+C,EAAE,SAAS,CAAC,KACrE,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACiD;IACzD,OAAO,CACL,KAAC,oBAAoB,CAAC,MAAM,iBAChB,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,UAAU,EACV,WAAW,CAAC,OAAO,EACnB,wDAAwD,EACxD,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACiD;IACzD,OAAO,CACL,KAAC,oBAAoB,CAAC,MAAM,iBAChB,qBAAqB,EAC/B,SAAS,EAAE,EAAE,CACX,UAAU,EACV,WAAW,CAAC,OAAO,EACnB,4EAA4E,EAC5E,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const alertVariants: (props?: ({
|
|
4
|
+
variant?: "info" | "success" | "warning" | "destructive" | "muted" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface AlertProps extends React.ComponentProps<"div">, VariantProps<typeof alertVariants> {
|
|
7
|
+
}
|
|
8
|
+
declare function Alert({ className, variant, ...props }: AlertProps): React.JSX.Element;
|
|
9
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
|
|
10
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
+
export { Alert, AlertTitle, AlertDescription, alertVariants };
|
|
12
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EACjC,YAAY,CAAC,OAAO,aAAa,CAAC;CAAG;AAEzC,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBASnE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,qBAQrE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQ7E;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
const alertVariants = cva("relative flex w-full items-start gap-2.5 border p-3 text-sm [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:translate-y-0.5", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
info: "border-primary-200 bg-brand-wash/60 text-foreground dark:border-primary-800/60",
|
|
8
|
+
success: "border-success/25 bg-success-soft text-success-strong",
|
|
9
|
+
warning: "border-warning/25 bg-warning-soft text-warning-strong",
|
|
10
|
+
destructive: "border-danger/25 bg-danger-soft text-danger-strong",
|
|
11
|
+
muted: "border-border bg-muted/40 text-foreground",
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
variant: "info",
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
function Alert({ className, variant = "info", ...props }) {
|
|
19
|
+
return (_jsx("div", { "data-slot": "alert", "data-variant": variant, className: cn(alertVariants({ variant }), className), ...props }));
|
|
20
|
+
}
|
|
21
|
+
function AlertTitle({ className, ...props }) {
|
|
22
|
+
return (_jsx("p", { "data-slot": "alert-title", className: cn("font-medium leading-snug", className), ...props }));
|
|
23
|
+
}
|
|
24
|
+
function AlertDescription({ className, ...props }) {
|
|
25
|
+
return (_jsx("div", { "data-slot": "alert-description", className: cn("text-sm leading-relaxed text-current", className), ...props }));
|
|
26
|
+
}
|
|
27
|
+
export { Alert, AlertTitle, AlertDescription, alertVariants };
|
|
28
|
+
//# sourceMappingURL=alert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.js","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,aAAa,GAAG,GAAG,CACvB,qHAAqH,EACrH;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,IAAI,EACF,gFAAgF;YAClF,OAAO,EAAE,uDAAuD;YAChE,OAAO,EAAE,uDAAuD;YAChE,WAAW,EAAE,oDAAoD;YACjE,KAAK,EAAE,2CAA2C;SACnD;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,MAAM;KAChB;CACF,CACF,CAAC;AAMF,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,KAAK,EAAc;IAClE,OAAO,CACL,2BACY,OAAO,kBACH,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA6B;IACpE,OAAO,CACL,yBACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,0BAA0B,EAAE,SAAS,CAAC,KAChD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IAC5E,OAAO,CACL,2BACY,mBAAmB,EAC7B,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAC5D,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
3
|
+
type AvatarSize = "xs" | "sm" | "default" | "lg" | "xl";
|
|
4
|
+
export interface AvatarProps extends React.ComponentProps<typeof AvatarPrimitive.Root> {
|
|
5
|
+
size?: AvatarSize;
|
|
6
|
+
}
|
|
7
|
+
declare function Avatar({ className, size, ...props }: AvatarProps): React.JSX.Element;
|
|
8
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
|
|
9
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
|
|
10
|
+
export interface AvatarGroupProps extends React.ComponentProps<"div"> {
|
|
11
|
+
/** Avatars shown before the rest collapse into a "+N" count. */
|
|
12
|
+
max?: number;
|
|
13
|
+
/** Total people the group stands for, when more exist than were rendered. */
|
|
14
|
+
total?: number;
|
|
15
|
+
/** Size of the overflow count. Match it to the avatars in the group. */
|
|
16
|
+
size?: AvatarSize;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Overlapping avatars for a team, reviewers, or recent participants. Extra
|
|
20
|
+
* people collapse into a count with a text alternative. Name the group with
|
|
21
|
+
* `aria-label` and keep each avatar's alt text, so the list is not only faces.
|
|
22
|
+
*/
|
|
23
|
+
declare function AvatarGroup({ max, total, size, className, children, ...props }: AvatarGroupProps): React.JSX.Element;
|
|
24
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
|
|
25
|
+
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAIrD,KAAK,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC;AAUxD,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC;IACpF,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED,iBAAS,MAAM,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,qBAarE;AAED,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,qBAQpD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,qBAWvD;AAED,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACnE,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;GAIG;AACH,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,KAAK,EACL,IAAgB,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA8BlB;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Avatar as AvatarPrimitive } from "radix-ui";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const sizeClasses = {
|
|
7
|
+
xs: "size-6 text-[10px]",
|
|
8
|
+
sm: "size-8 text-xs",
|
|
9
|
+
default: "size-9 text-xs",
|
|
10
|
+
lg: "size-11 text-sm",
|
|
11
|
+
xl: "size-14 text-base",
|
|
12
|
+
};
|
|
13
|
+
function Avatar({ className, size = "default", ...props }) {
|
|
14
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn("relative inline-flex shrink-0 overflow-hidden border border-border bg-muted", sizeClasses[size], className), ...props }));
|
|
15
|
+
}
|
|
16
|
+
function AvatarImage({ className, ...props }) {
|
|
17
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn("aspect-square size-full object-cover", className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function AvatarFallback({ className, ...props }) {
|
|
20
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn("flex size-full items-center justify-center bg-muted font-medium uppercase tracking-wide text-foreground", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Overlapping avatars for a team, reviewers, or recent participants. Extra
|
|
24
|
+
* people collapse into a count with a text alternative. Name the group with
|
|
25
|
+
* `aria-label` and keep each avatar's alt text, so the list is not only faces.
|
|
26
|
+
*/
|
|
27
|
+
function AvatarGroup({ max, total, size = "default", className, children, ...props }) {
|
|
28
|
+
const items = React.Children.toArray(children);
|
|
29
|
+
const visible = max === undefined ? items : items.slice(0, Math.max(0, max));
|
|
30
|
+
const overflow = Math.max(0, (total ?? items.length) - visible.length);
|
|
31
|
+
return (_jsxs("div", { role: "group", "data-slot": "avatar-group", className: cn("flex items-center -space-x-2 [&>[data-slot=avatar]]:border-2 [&>[data-slot=avatar]]:border-background", className), ...props, children: [visible, overflow > 0 ? (_jsxs("span", { "data-slot": "avatar-group-overflow", className: cn("relative inline-flex shrink-0 items-center justify-center border-2 border-background bg-secondary font-medium tabular-nums text-secondary-foreground", sizeClasses[size]), children: [_jsxs("span", { "aria-hidden": "true", children: ["+", overflow] }), _jsxs("span", { className: "sr-only", children: ["and ", overflow, " more"] })] })) : null] }));
|
|
32
|
+
}
|
|
33
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarGroup };
|
|
34
|
+
//# sourceMappingURL=avatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar.js","sourceRoot":"","sources":["../../src/components/avatar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAIlC,MAAM,WAAW,GAA+B;IAC9C,EAAE,EAAE,oBAAoB;IACxB,EAAE,EAAE,gBAAgB;IACpB,OAAO,EAAE,gBAAgB;IACzB,EAAE,EAAE,iBAAiB;IACrB,EAAE,EAAE,mBAAmB;CACxB,CAAC;AAMF,SAAS,MAAM,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,SAAS,EAAE,GAAG,KAAK,EAAe;IACpE,OAAO,CACL,KAAC,eAAe,CAAC,IAAI,iBACT,QAAQ,eACP,IAAI,EACf,SAAS,EAAE,EAAE,CACX,6EAA6E,EAC7E,WAAW,CAAC,IAAI,CAAC,EACjB,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EAC2C;IACnD,OAAO,CACL,KAAC,eAAe,CAAC,KAAK,iBACV,cAAc,EACxB,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,KAC5D,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EAC8C;IACtD,OAAO,CACL,KAAC,eAAe,CAAC,QAAQ,iBACb,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CACX,yGAAyG,EACzG,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAWD;;;;GAIG;AACH,SAAS,WAAW,CAAC,EACnB,GAAG,EACH,KAAK,EACL,IAAI,GAAG,SAAS,EAChB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACS;IACjB,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7E,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvE,OAAO,CACL,eACE,IAAI,EAAC,OAAO,eACF,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,uGAAuG,EACvG,SAAS,CACV,KACG,KAAK,aAER,OAAO,EACP,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CACd,6BACY,uBAAuB,EACjC,SAAS,EAAE,EAAE,CACX,sJAAsJ,EACtJ,WAAW,CAAC,IAAI,CAAC,CAClB,aAED,+BAAkB,MAAM,kBAAG,QAAQ,IAAQ,EAC3C,gBAAM,SAAS,EAAC,SAAS,qBAAM,QAAQ,aAAa,IAC/C,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "info" | "success" | "warning" | "destructive" | "muted" | "default" | "secondary" | "outline" | "brand" | "danger" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {
|
|
7
|
+
/**
|
|
8
|
+
* Leads with a small square status dot in the badge's text colour. The dot
|
|
9
|
+
* is decorative; the badge text still has to say what the status is.
|
|
10
|
+
*/
|
|
11
|
+
dot?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function Badge({ className, variant, dot, children, ...props }: BadgeProps): React.JSX.Element;
|
|
14
|
+
export { Badge, badgeVariants };
|
|
15
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EAsBlB,CAAC;AAEF,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAClC,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAqB,EAAE,GAAW,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,qBAc/F;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
const badgeVariants = cva("inline-flex shrink-0 items-center gap-1 border px-2.5 py-0.5 text-xs font-semibold leading-4 [&_svg]:size-3 [&_svg]:shrink-0", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
8
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
9
|
+
outline: "border-border text-foreground",
|
|
10
|
+
brand: "border-primary-200 bg-brand-chip text-primary-700 dark:border-primary-800/40 dark:text-primary-300",
|
|
11
|
+
success: "border-success/20 bg-success-soft text-success-strong",
|
|
12
|
+
warning: "border-warning/20 bg-warning-soft text-warning-strong",
|
|
13
|
+
danger: "border-danger/20 bg-danger-soft text-danger-strong",
|
|
14
|
+
info: "border-info/20 bg-info-soft text-info",
|
|
15
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
16
|
+
muted: "border-transparent bg-muted/60 text-muted-foreground",
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "secondary",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
function Badge({ className, variant = "secondary", dot = false, children, ...props }) {
|
|
24
|
+
return (_jsxs("span", { "data-slot": "badge", "data-variant": variant, className: cn(badgeVariants({ variant }), dot && "gap-1.5", className), ...props, children: [dot ? (_jsx("span", { "aria-hidden": "true", "data-slot": "badge-dot", className: "size-1.5 shrink-0 bg-current" })) : null, children] }));
|
|
25
|
+
}
|
|
26
|
+
export { Badge, badgeVariants };
|
|
27
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/components/badge.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,aAAa,GAAG,GAAG,CACvB,8HAA8H,EAC9H;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,uDAAuD;YAChE,SAAS,EAAE,2DAA2D;YACtE,OAAO,EAAE,+BAA+B;YACxC,KAAK,EACH,oGAAoG;YACtG,OAAO,EAAE,uDAAuD;YAChE,OAAO,EAAE,uDAAuD;YAChE,MAAM,EAAE,oDAAoD;YAC5D,IAAI,EAAE,uCAAuC;YAC7C,WAAW,EAAE,+DAA+D;YAC5E,KAAK,EAAE,sDAAsD;SAC9D;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,WAAW;KACrB;CACF,CACF,CAAC;AAYF,SAAS,KAAK,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,WAAW,EAAE,GAAG,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAc;IAC9F,OAAO,CACL,6BACY,OAAO,kBACH,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,SAAS,EAAE,SAAS,CAAC,KAClE,KAAK,aAER,GAAG,CAAC,CAAC,CAAC,CACL,8BAAkB,MAAM,eAAW,WAAW,EAAC,SAAS,EAAC,8BAA8B,GAAG,CAC3F,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,IACJ,CACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
label: React.ReactNode;
|
|
4
|
+
href?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BreadcrumbsProps extends React.ComponentProps<"nav"> {
|
|
7
|
+
items: BreadcrumbItem[];
|
|
8
|
+
}
|
|
9
|
+
declare function Breadcrumbs({ items, className, ...props }: BreadcrumbsProps): React.JSX.Element;
|
|
10
|
+
export { Breadcrumbs };
|
|
11
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../src/components/breadcrumbs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACnE,KAAK,EAAE,cAAc,EAAE,CAAC;CACzB;AAED,iBAAS,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,qBA2CpE;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconChevronRight } from "@tabler/icons-react";
|
|
3
|
+
import { cn } from "../lib/utils.js";
|
|
4
|
+
function Breadcrumbs({ items, className, ...props }) {
|
|
5
|
+
return (_jsx("nav", { "data-slot": "breadcrumbs", "aria-label": "Breadcrumb", className: cn("text-sm", className), ...props, children: _jsx("ol", { className: "flex flex-wrap items-center gap-1", children: items.map((item, index) => {
|
|
6
|
+
const isCurrent = index === items.length - 1;
|
|
7
|
+
return (_jsxs("li", { className: "flex items-center gap-1", children: [index > 0 ? (_jsx(IconChevronRight, { "aria-hidden": "true", className: "mx-0.5 size-3.5 shrink-0 text-muted-foreground" })) : null, item.href && !isCurrent ? (_jsx("a", { href: item.href, className: cn("text-muted-foreground underline-offset-4 transition-colors hover:text-foreground hover:underline", "outline-none focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"), children: item.label })) : (_jsx("span", { "aria-current": isCurrent ? "page" : undefined, className: cn(isCurrent ? "font-medium text-foreground" : "text-muted-foreground"), children: item.label }))] }, item.href ?? index));
|
|
8
|
+
}) }) }));
|
|
9
|
+
}
|
|
10
|
+
export { Breadcrumbs };
|
|
11
|
+
//# sourceMappingURL=breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","sourceRoot":"","sources":["../../src/components/breadcrumbs.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAWlC,SAAS,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB;IACnE,OAAO,CACL,2BACY,aAAa,gBACZ,YAAY,EACvB,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,KAC/B,KAAK,YAET,aAAI,SAAS,EAAC,mCAAmC,YAC9C,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;gBACzB,MAAM,SAAS,GAAG,KAAK,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;gBAC7C,OAAO,CACL,cAA6B,SAAS,EAAC,yBAAyB,aAC7D,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CACX,KAAC,gBAAgB,mBACH,MAAM,EAClB,SAAS,EAAC,gDAAgD,GAC1D,CACH,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CACzB,YACE,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,SAAS,EAAE,EAAE,CACX,kGAAkG,EAClG,kIAAkI,CACnI,YAEA,IAAI,CAAC,KAAK,GACT,CACL,CAAC,CAAC,CAAC,CACF,+BACgB,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,EAC5C,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,uBAAuB,CAAC,YAEjF,IAAI,CAAC,KAAK,GACN,CACR,KAxBM,IAAI,CAAC,IAAI,IAAI,KAAK,CAyBtB,CACN,CAAC;YACJ,CAAC,CAAC,GACC,GACD,CACP,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "link" | "destructive" | "default" | "secondary" | "outline" | "brand" | "ghost" | null | undefined;
|
|
5
|
+
size?: "xs" | "sm" | "default" | "lg" | "icon" | "icon-sm" | "icon-xs" | "icon-lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface ButtonProps extends React.ComponentProps<"button">, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): React.JSX.Element;
|
|
11
|
+
export { Button, buttonVariants };
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EAsCnB,CAAC;AAEF,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EACpC,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAmB,EACnB,IAAgB,EAChB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,WAAW,qBAYb;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Slot } from "radix-ui";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
const buttonVariants = cva([
|
|
6
|
+
"inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap text-sm font-medium",
|
|
7
|
+
"outline-none transition-[color,background-color,border-color,transform,opacity] duration-200",
|
|
8
|
+
"focus-visible:ring-2 focus-visible:ring-focus-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
|
|
9
|
+
"disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",
|
|
10
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
11
|
+
], {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
15
|
+
brand: "bg-brand-fill text-on-brand-fill hover:bg-link-hover dark:hover:bg-primary-300",
|
|
16
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
17
|
+
outline: "border border-input bg-background text-foreground shadow-xs hover:bg-muted",
|
|
18
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
19
|
+
ghost: "text-foreground hover:bg-muted",
|
|
20
|
+
link: "text-link underline-offset-4 hover:text-link-hover hover:underline",
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
xs: "h-6 gap-1 px-2 text-xs [&_svg:not([class*='size-'])]:size-3",
|
|
24
|
+
sm: "h-8 gap-1.5 px-3",
|
|
25
|
+
default: "h-9 px-4 has-[>svg]:px-3",
|
|
26
|
+
lg: "h-10 px-6",
|
|
27
|
+
icon: "size-9",
|
|
28
|
+
"icon-sm": "size-8",
|
|
29
|
+
"icon-xs": "size-6 [&_svg:not([class*='size-'])]:size-3",
|
|
30
|
+
"icon-lg": "size-10",
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "default",
|
|
35
|
+
size: "default",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
39
|
+
const Comp = asChild ? Slot.Root : "button";
|
|
40
|
+
return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size }), className), ...props }));
|
|
41
|
+
}
|
|
42
|
+
export { Button, buttonVariants };
|
|
43
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../src/components/button.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAElC,MAAM,cAAc,GAAG,GAAG,CACxB;IACE,0GAA0G;IAC1G,8FAA8F;IAC9F,qHAAqH;IACrH,sEAAsE;IACtE,mFAAmF;CACpF,EACD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,wDAAwD;YACjE,KAAK,EACH,gFAAgF;YAClF,WAAW,EACT,oEAAoE;YACtE,OAAO,EACL,4EAA4E;YAC9E,SAAS,EAAE,8DAA8D;YACzE,KAAK,EAAE,gCAAgC;YACvC,IAAI,EAAE,oEAAoE;SAC3E;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,6DAA6D;YACjE,EAAE,EAAE,kBAAkB;YACtB,OAAO,EAAE,0BAA0B;YACnC,EAAE,EAAE,WAAW;YACf,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,QAAQ;YACnB,SAAS,EAAE,6CAA6C;YACxD,SAAS,EAAE,SAAS;SACrB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAQF,SAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,IAAI,GAAG,SAAS,EAChB,OAAO,GAAG,KAAK,EACf,GAAG,KAAK,EACI;IACZ,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;IAE5C,OAAO,CACL,KAAC,IAAI,iBACO,QAAQ,kBACJ,OAAO,eACV,IAAI,EACf,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,SAAS,CAAC,KACvD,KAAK,GACT,CACH,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ClassNames, type DayPickerProps } from "react-day-picker";
|
|
3
|
+
/** The `{ from, to }` shape used by range mode, re-exported so consumers do not need a direct dependency. */
|
|
4
|
+
export type { DateRange } from "react-day-picker";
|
|
5
|
+
export type CalendarProps = DayPickerProps & {
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Override individual slots. Slots you omit keep the Aback styling, so a
|
|
9
|
+
* consumer can adjust one element without restyling the whole calendar.
|
|
10
|
+
*/
|
|
11
|
+
classNames?: Partial<ClassNames>;
|
|
12
|
+
};
|
|
13
|
+
/** Format a date in the visitor's locale, without pulling in a date library. */
|
|
14
|
+
export declare function formatCalendarDate(date: Date, locale?: string, options?: Intl.DateTimeFormatOptions): string;
|
|
15
|
+
/**
|
|
16
|
+
* A month calendar with single, multiple, and range selection.
|
|
17
|
+
*
|
|
18
|
+
* The calendar is a composed control: use it on its own, inside a `Popover`
|
|
19
|
+
* (see `DatePicker`), or inside a dialog. Every date is a real button inside a
|
|
20
|
+
* `grid`, so arrow-key navigation, Home/End, Page Up/Page Down, and the
|
|
21
|
+
* announced selected state come from react-day-picker's accessible grid.
|
|
22
|
+
*/
|
|
23
|
+
declare function Calendar({ className, classNames, components, labels, showOutsideDays, navLayout, ...props }: CalendarProps): React.JSX.Element;
|
|
24
|
+
export { Calendar };
|
|
25
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/components/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,KAAK,UAAU,EAEf,KAAK,cAAc,EAEpB,MAAM,kBAAkB,CAAC;AAK1B,6GAA6G;AAC7G,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;CAClC,CAAC;AAQF,gFAAgF;AAChF,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,EACV,MAAM,CAAC,EAAE,MAAM,EACf,OAAO,GAAE,IAAI,CAAC,qBAAsC,GACnD,MAAM,CAER;AAuED;;;;;;;GAOG;AACH,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,eAAsB,EACtB,SAAoB,EACpB,GAAG,KAAK,EACT,EAAE,aAAa,qBAYf;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { DateLib, DayPicker, } from "react-day-picker";
|
|
4
|
+
import { IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp } from "@tabler/icons-react";
|
|
5
|
+
import { cn } from "../lib/utils.js";
|
|
6
|
+
const DEFAULT_FORMAT = {
|
|
7
|
+
month: "short",
|
|
8
|
+
day: "numeric",
|
|
9
|
+
year: "numeric",
|
|
10
|
+
};
|
|
11
|
+
/** Format a date in the visitor's locale, without pulling in a date library. */
|
|
12
|
+
export function formatCalendarDate(date, locale, options = DEFAULT_FORMAT) {
|
|
13
|
+
return new Intl.DateTimeFormat(locale, options).format(date);
|
|
14
|
+
}
|
|
15
|
+
const navButton = "absolute top-0 z-10 inline-flex size-8 items-center justify-center border border-transparent text-muted-foreground transition-colors " +
|
|
16
|
+
"hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring " +
|
|
17
|
+
"disabled:pointer-events-none disabled:opacity-40";
|
|
18
|
+
const defaultClassNames = {
|
|
19
|
+
root: "relative w-fit",
|
|
20
|
+
months: "flex flex-col gap-4 sm:flex-row sm:gap-6",
|
|
21
|
+
month: "relative flex flex-col gap-3",
|
|
22
|
+
month_caption: "flex h-8 items-center justify-center px-9",
|
|
23
|
+
caption_label: "text-sm font-semibold text-foreground",
|
|
24
|
+
nav: "contents",
|
|
25
|
+
button_previous: cn(navButton, "left-0"),
|
|
26
|
+
button_next: cn(navButton, "right-0"),
|
|
27
|
+
chevron: "size-4",
|
|
28
|
+
month_grid: "w-full border-collapse",
|
|
29
|
+
weekdays: "",
|
|
30
|
+
weekday: "h-8 w-9 p-0 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",
|
|
31
|
+
week: "",
|
|
32
|
+
day: "p-0 text-center align-middle",
|
|
33
|
+
day_button: "mx-auto flex size-9 items-center justify-center text-sm font-normal text-foreground transition-colors " +
|
|
34
|
+
"hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring " +
|
|
35
|
+
"disabled:pointer-events-none disabled:opacity-40",
|
|
36
|
+
selected: "[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:font-medium",
|
|
37
|
+
today: "[&:not([data-selected=true])>button]:font-semibold [&:not([data-selected=true])>button]:text-brand",
|
|
38
|
+
outside: "[&>button]:text-muted-foreground [&>button]:hover:text-foreground",
|
|
39
|
+
disabled: "[&>button]:text-muted-foreground/40 [&>button]:line-through",
|
|
40
|
+
hidden: "invisible",
|
|
41
|
+
range_middle: "[&[data-selected=true].rdp-range_middle>button]:bg-muted " +
|
|
42
|
+
"[&[data-selected=true].rdp-range_middle>button]:text-foreground " +
|
|
43
|
+
"[&[data-selected=true].rdp-range_middle>button]:hover:bg-muted",
|
|
44
|
+
dropdowns: "flex items-center justify-center gap-2 px-9",
|
|
45
|
+
dropdown_root: "relative inline-flex items-center",
|
|
46
|
+
dropdown: "h-8 appearance-none border border-input bg-background px-2 pr-6 text-sm text-foreground outline-none " +
|
|
47
|
+
"focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-focus-ring",
|
|
48
|
+
footer: "border-t border-border px-2 pt-3 text-xs text-muted-foreground",
|
|
49
|
+
};
|
|
50
|
+
// A day button shows only its number, so its accessible name must contain that
|
|
51
|
+
// number as a word (WCAG 2.5.3, Label in Name). The library default reads
|
|
52
|
+
// "November 1st", which does not; this reads "Sunday, November 1, 2026".
|
|
53
|
+
const defaultLabels = {
|
|
54
|
+
labelDayButton: (date, modifiers, options, dateLib) => {
|
|
55
|
+
let label = (dateLib ?? new DateLib(options)).format(date, "EEEE, MMMM d, yyyy");
|
|
56
|
+
if (modifiers.today)
|
|
57
|
+
label = `Today, ${label}`;
|
|
58
|
+
if (modifiers.selected)
|
|
59
|
+
label = `${label}, selected`;
|
|
60
|
+
return label;
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
const defaultComponents = {
|
|
64
|
+
Chevron: ({ orientation = "left", className, size = 16 }) => {
|
|
65
|
+
const Icon = orientation === "left"
|
|
66
|
+
? IconChevronLeft
|
|
67
|
+
: orientation === "right"
|
|
68
|
+
? IconChevronRight
|
|
69
|
+
: orientation === "up"
|
|
70
|
+
? IconChevronUp
|
|
71
|
+
: IconChevronDown;
|
|
72
|
+
return _jsx(Icon, { "aria-hidden": "true", className: cn("size-4", className), size: size });
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* A month calendar with single, multiple, and range selection.
|
|
77
|
+
*
|
|
78
|
+
* The calendar is a composed control: use it on its own, inside a `Popover`
|
|
79
|
+
* (see `DatePicker`), or inside a dialog. Every date is a real button inside a
|
|
80
|
+
* `grid`, so arrow-key navigation, Home/End, Page Up/Page Down, and the
|
|
81
|
+
* announced selected state come from react-day-picker's accessible grid.
|
|
82
|
+
*/
|
|
83
|
+
function Calendar({ className, classNames, components, labels, showOutsideDays = true, navLayout = "around", ...props }) {
|
|
84
|
+
return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, navLayout: navLayout, className: cn("w-fit bg-background p-3 text-foreground", className), classNames: { ...defaultClassNames, ...classNames }, components: { ...defaultComponents, ...components }, labels: { ...defaultLabels, ...labels }, ...props }));
|
|
85
|
+
}
|
|
86
|
+
export { Calendar };
|
|
87
|
+
//# sourceMappingURL=calendar.js.map
|